You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1041 lines
1.2 MiB
1041 lines
1.2 MiB
!(function(){var hl=Math.pow;(self.webpackChunk=self.webpackChunk||[]).push([[3433],{65352:function(on,je,E){"use strict";E.d(je,{Z:function(){return tt}});var x=E(89490),ae=E(11036),ve=E(39224),fe=E(43403),F=E(92310),f=E.n(F),ue=E(29301),te=E(76846),o=E(96452),y=E(6089),C=E(80402),h=E(34280),g=E(49658),_=E(59301),S=E(71409),L=E(77900),N=E(8654);function H(Re){var ye=Re.prefixCls,Z=Re.align,we=Re.arrow,Le=Re.arrowPos,$=we||{},P=$.className,K=$.content,ne=Le.x,M=ne===void 0?0:ne,B=Le.y,j=B===void 0?0:B,me=_.useRef();if(!Z||!Z.points)return null;var de={position:"absolute"};if(Z.autoArrow!==!1){var Ae=Z.points[0],Ee=Z.points[1],Ce=Ae[0],Fe=Ae[1],Be=Ee[0],Ye=Ee[1];Ce===Be||!["t","b"].includes(Ce)?de.top=j:Ce==="t"?de.top=0:de.bottom=0,Fe===Ye||!["l","r"].includes(Fe)?de.left=M:Fe==="l"?de.left=0:de.right=0}return _.createElement("div",{ref:me,className:f()("".concat(ye,"-arrow"),P),style:de},K)}function R(Re){var ye=Re.prefixCls,Z=Re.open,we=Re.zIndex,Le=Re.mask,$=Re.motion;return Le?_.createElement(L.default,(0,S.Z)({},$,{motionAppear:!0,visible:Z,removeOnLeave:!0}),function(P){var K=P.className;return _.createElement("div",{style:{zIndex:we},className:f()("".concat(ye,"-mask"),K)})}):null}var k=_.memo(function(Re){var ye=Re.children;return ye},function(Re,ye){return ye.cache}),T=k,A=_.forwardRef(function(Re,ye){var Z=Re.popup,we=Re.className,Le=Re.prefixCls,$=Re.style,P=Re.target,K=Re.onVisibleChanged,ne=Re.open,M=Re.keepDom,B=Re.fresh,j=Re.onClick,me=Re.mask,de=Re.arrow,Ae=Re.arrowPos,Ee=Re.align,Ce=Re.motion,Fe=Re.maskMotion,Be=Re.forceRender,Ye=Re.getPopupContainer,xt=Re.autoDestroy,lt=Re.portal,nt=Re.zIndex,Ut=Re.onMouseEnter,Vt=Re.onMouseLeave,Ct=Re.onPointerEnter,Jt=Re.onPointerDownCapture,wn=Re.ready,Rt=Re.offsetX,Yt=Re.offsetY,Ne=Re.offsetR,ke=Re.offsetB,Pe=Re.onAlign,z=Re.onPrepare,oe=Re.stretch,he=Re.targetWidth,ce=Re.targetHeight,be=typeof Z=="function"?Z():Z,ze=ne||M,Ze=(Ye==null?void 0:Ye.length)>0,$e=_.useState(!Ye||!Ze),ft=(0,ae.Z)($e,2),en=ft[0],an=ft[1];if((0,h.Z)(function(){!en&&Ze&&P&&an(!0)},[en,Ze,P]),!en)return null;var yt="auto",Gt={left:"-1000vw",top:"-1000vh",right:yt,bottom:yt};if(wn||!ne){var _n,Bn=Ee.points,cn=Ee.dynamicInset||((_n=Ee._experimental)===null||_n===void 0?void 0:_n.dynamicInset),pn=cn&&Bn[0][1]==="r",Tn=cn&&Bn[0][0]==="b";pn?(Gt.right=Ne,Gt.left=yt):(Gt.left=Rt,Gt.right=yt),Tn?(Gt.bottom=ke,Gt.top=yt):(Gt.top=Yt,Gt.bottom=yt)}var mn={};return oe&&(oe.includes("height")&&ce?mn.height=ce:oe.includes("minHeight")&&ce&&(mn.minHeight=ce),oe.includes("width")&&he?mn.width=he:oe.includes("minWidth")&&he&&(mn.minWidth=he)),ne||(mn.pointerEvents="none"),_.createElement(lt,{open:Be||ze,getContainer:Ye&&function(){return Ye(P)},autoDestroy:xt},_.createElement(R,{prefixCls:Le,open:ne,zIndex:nt,mask:me,motion:Fe}),_.createElement(ue.Z,{onResize:Pe,disabled:!ne},function(An){return _.createElement(L.default,(0,S.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:Be,leavedClassName:"".concat(Le,"-hidden")},Ce,{onAppearPrepare:z,onEnterPrepare:z,visible:ne,onVisibleChanged:function(Wn){var Ue;Ce==null||(Ue=Ce.onVisibleChanged)===null||Ue===void 0||Ue.call(Ce,Wn),K(Wn)}}),function(Ft,Wn){var Ue=Ft.className,Oe=Ft.style,Bt=f()(Le,Ue,we);return _.createElement("div",{ref:(0,N.sQ)(An,ye,Wn),className:Bt,style:(0,x.Z)((0,x.Z)((0,x.Z)((0,x.Z)({"--arrow-x":"".concat(Ae.x||0,"px"),"--arrow-y":"".concat(Ae.y||0,"px")},Gt),mn),Oe),{},{boxSizing:"border-box",zIndex:nt},$),onMouseEnter:Ut,onMouseLeave:Vt,onPointerEnter:Ct,onClick:j,onPointerDownCapture:Jt},de&&_.createElement(H,{prefixCls:Le,arrow:de,arrowPos:Ae,align:Ee}),_.createElement(T,{cache:!ne&&!B},be))})}))}),J=A,ee=_.forwardRef(function(Re,ye){var Z=Re.children,we=Re.getTriggerDOMNode,Le=(0,N.Yr)(Z),$=_.useCallback(function(K){(0,N.mH)(ye,we?we(K):K)},[we]),P=(0,N.x1)($,(0,N.C4)(Z));return Le?_.cloneElement(Z,{ref:P}):Z}),G=ee,I=_.createContext(null),re=I;function le(Re){return Re?Array.isArray(Re)?Re:[Re]:[]}function Te(Re,ye,Z,we){return _.useMemo(function(){var Le=le(Z!=null?Z:ye),$=le(we!=null?we:ye),P=new Set(Le),K=new Set($);return Re&&(P.has("hover")&&(P.delete("hover"),P.add("click")),K.has("hover")&&(K.delete("hover"),K.add("click"))),[P,K]},[Re,ye,Z,we])}var W=E(29194);function O(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Z=arguments.length>2?arguments[2]:void 0;return Z?Re[0]===ye[0]:Re[0]===ye[0]&&Re[1]===ye[1]}function Q(Re,ye,Z,we){for(var Le=Z.points,$=Object.keys(Re),P=0;P<$.length;P+=1){var K,ne=$[P];if(O((K=Re[ne])===null||K===void 0?void 0:K.points,Le,we))return"".concat(ye,"-placement-").concat(ne)}return""}function q(Re,ye,Z,we){return ye||(Z?{motionName:"".concat(Re,"-").concat(Z)}:we?{motionName:we}:null)}function ie(Re){return Re.ownerDocument.defaultView}function V(Re){for(var ye=[],Z=Re==null?void 0:Re.parentElement,we=["hidden","scroll","clip","auto"];Z;){var Le=ie(Z).getComputedStyle(Z),$=Le.overflowX,P=Le.overflowY,K=Le.overflow;[$,P,K].some(function(ne){return we.includes(ne)})&&ye.push(Z),Z=Z.parentElement}return ye}function v(Re){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(Re)?ye:Re}function m(Re){return v(parseFloat(Re),0)}function U(Re,ye){var Z=(0,x.Z)({},Re);return(ye||[]).forEach(function(we){if(!(we instanceof HTMLBodyElement||we instanceof HTMLHtmlElement)){var Le=ie(we).getComputedStyle(we),$=Le.overflow,P=Le.overflowClipMargin,K=Le.borderTopWidth,ne=Le.borderBottomWidth,M=Le.borderLeftWidth,B=Le.borderRightWidth,j=we.getBoundingClientRect(),me=we.offsetHeight,de=we.clientHeight,Ae=we.offsetWidth,Ee=we.clientWidth,Ce=m(K),Fe=m(ne),Be=m(M),Ye=m(B),xt=v(Math.round(j.width/Ae*1e3)/1e3),lt=v(Math.round(j.height/me*1e3)/1e3),nt=(Ae-Ee-Be-Ye)*xt,Ut=(me-de-Ce-Fe)*lt,Vt=Ce*lt,Ct=Fe*lt,Jt=Be*xt,wn=Ye*xt,Rt=0,Yt=0;if($==="clip"){var Ne=m(P);Rt=Ne*xt,Yt=Ne*lt}var ke=j.x+Jt-Rt,Pe=j.y+Vt-Yt,z=ke+j.width+2*Rt-Jt-wn-nt,oe=Pe+j.height+2*Yt-Vt-Ct-Ut;Z.left=Math.max(Z.left,ke),Z.top=Math.max(Z.top,Pe),Z.right=Math.min(Z.right,z),Z.bottom=Math.min(Z.bottom,oe)}}),Z}function se(Re){var ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Z="".concat(ye),we=Z.match(/^(.*)\%$/);return we?Re*(parseFloat(we[1])/100):parseFloat(Z)}function pe(Re,ye){var Z=ye||[],we=(0,ae.Z)(Z,2),Le=we[0],$=we[1];return[se(Re.width,Le),se(Re.height,$)]}function He(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[Re[0],Re[1]]}function qe(Re,ye){var Z=ye[0],we=ye[1],Le,$;return Z==="t"?$=Re.y:Z==="b"?$=Re.y+Re.height:$=Re.y+Re.height/2,we==="l"?Le=Re.x:we==="r"?Le=Re.x+Re.width:Le=Re.x+Re.width/2,{x:Le,y:$}}function ot(Re,ye){var Z={t:"b",b:"t",l:"r",r:"l"};return Re.map(function(we,Le){return Le===ye?Z[we]||"c":we}).join("")}function Ot(Re,ye,Z,we,Le,$,P){var K=_.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:Le[we]||{}}),ne=(0,ae.Z)(K,2),M=ne[0],B=ne[1],j=_.useRef(0),me=_.useMemo(function(){return ye?V(ye):[]},[ye]),de=_.useRef({}),Ae=function(){de.current={}};Re||Ae();var Ee=(0,y.Z)(function(){if(ye&&Z&&Re){let kr=function(gr,pr){var tn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:fn,zn=$e.x+gr,Jn=$e.y+pr,nr=zn+pn,_r=Jn+cn,Tr=Math.max(zn,tn.left),Ln=Math.max(Jn,tn.top),Gn=Math.min(nr,tn.right),yr=Math.min(_r,tn.bottom);return Math.max(0,(Gn-Tr)*(yr-Ln))},Dr=function(){it=$e.y+In,ht=it+cn,Pt=$e.x+Rn,Dt=Pt+pn};var Be,Ye,xt,lt,nt=ye,Ut=nt.ownerDocument,Vt=ie(nt),Ct=Vt.getComputedStyle(nt),Jt=Ct.width,wn=Ct.height,Rt=Ct.position,Yt=nt.style.left,Ne=nt.style.top,ke=nt.style.right,Pe=nt.style.bottom,z=nt.style.overflow,oe=(0,x.Z)((0,x.Z)({},Le[we]),$),he=Ut.createElement("div");(Be=nt.parentElement)===null||Be===void 0||Be.appendChild(he),he.style.left="".concat(nt.offsetLeft,"px"),he.style.top="".concat(nt.offsetTop,"px"),he.style.position=Rt,he.style.height="".concat(nt.offsetHeight,"px"),he.style.width="".concat(nt.offsetWidth,"px"),nt.style.left="0",nt.style.top="0",nt.style.right="auto",nt.style.bottom="auto",nt.style.overflow="hidden";var ce;if(Array.isArray(Z))ce={x:Z[0],y:Z[1],width:0,height:0};else{var be,ze,Ze=Z.getBoundingClientRect();Ze.x=(be=Ze.x)!==null&&be!==void 0?be:Ze.left,Ze.y=(ze=Ze.y)!==null&&ze!==void 0?ze:Ze.top,ce={x:Ze.x,y:Ze.y,width:Ze.width,height:Ze.height}}var $e=nt.getBoundingClientRect();$e.x=(Ye=$e.x)!==null&&Ye!==void 0?Ye:$e.left,$e.y=(xt=$e.y)!==null&&xt!==void 0?xt:$e.top;var ft=Ut.documentElement,en=ft.clientWidth,an=ft.clientHeight,yt=ft.scrollWidth,Gt=ft.scrollHeight,_n=ft.scrollTop,Bn=ft.scrollLeft,cn=$e.height,pn=$e.width,Tn=ce.height,mn=ce.width,An={left:0,top:0,right:en,bottom:an},Ft={left:-Bn,top:-_n,right:yt-Bn,bottom:Gt-_n},Wn=oe.htmlRegion,Ue="visible",Oe="visibleFirst";Wn!=="scroll"&&Wn!==Oe&&(Wn=Ue);var Bt=Wn===Oe,kt=U(Ft,me),St=U(An,me),fn=Wn===Ue?St:kt,Ve=Bt?St:fn;nt.style.left="auto",nt.style.top="auto",nt.style.right="0",nt.style.bottom="0";var Qe=nt.getBoundingClientRect();nt.style.left=Yt,nt.style.top=Ne,nt.style.right=ke,nt.style.bottom=Pe,nt.style.overflow=z,(lt=nt.parentElement)===null||lt===void 0||lt.removeChild(he);var Tt=v(Math.round(pn/parseFloat(Jt)*1e3)/1e3),Et=v(Math.round(cn/parseFloat(wn)*1e3)/1e3);if(Tt===0||Et===0||(0,te.Sh)(Z)&&!(0,W.Z)(Z))return;var Xt=oe.offset,ln=oe.targetOffset,nn=pe($e,Xt),zt=(0,ae.Z)(nn,2),De=zt[0],Se=zt[1],et=pe(ce,ln),rt=(0,ae.Z)(et,2),It=rt[0],Nt=rt[1];ce.x-=It,ce.y-=Nt;var wt=oe.points||[],Zt=(0,ae.Z)(wt,2),$t=Zt[0],jt=Zt[1],xn=He(jt),un=He($t),Cn=qe(ce,xn),Un=qe($e,un),Nn=(0,x.Z)({},oe),Rn=Cn.x-Un.x+De,In=Cn.y-Un.y+Se,$n=kr(Rn,In),sn=kr(Rn,In,St),gn=qe(ce,["t","l"]),yn=qe($e,["t","l"]),jn=qe(ce,["b","r"]),kn=qe($e,["b","r"]),Vn=oe.overflow||{},or=Vn.adjustX,ge=Vn.adjustY,Xe=Vn.shiftX,Ke=Vn.shiftY,We=function(pr){return typeof pr=="boolean"?pr:pr>=0},it,ht,Pt,Dt;Dr();var pt=We(ge),Ge=un[0]===xn[0];if(pt&&un[0]==="t"&&(ht>Ve.bottom||de.current.bt)){var Je=In;Ge?Je-=cn-Tn:Je=gn.y-kn.y-Se;var at=kr(Rn,Je),dt=kr(Rn,Je,St);at>$n||at===$n&&(!Bt||dt>=sn)?(de.current.bt=!0,In=Je,Se=-Se,Nn.points=[ot(un,0),ot(xn,0)]):de.current.bt=!1}if(pt&&un[0]==="b"&&(it<Ve.top||de.current.tb)){var gt=In;Ge?gt+=cn-Tn:gt=jn.y-yn.y-Se;var Wt=kr(Rn,gt),vn=kr(Rn,gt,St);Wt>$n||Wt===$n&&(!Bt||vn>=sn)?(de.current.tb=!0,In=gt,Se=-Se,Nn.points=[ot(un,0),ot(xn,0)]):de.current.tb=!1}var rn=We(or),Pn=un[1]===xn[1];if(rn&&un[1]==="l"&&(Dt>Ve.right||de.current.rl)){var Zn=Rn;Pn?Zn-=pn-mn:Zn=gn.x-kn.x-De;var Kn=kr(Zn,In),er=kr(Zn,In,St);Kn>$n||Kn===$n&&(!Bt||er>=sn)?(de.current.rl=!0,Rn=Zn,De=-De,Nn.points=[ot(un,1),ot(xn,1)]):de.current.rl=!1}if(rn&&un[1]==="r"&&(Pt<Ve.left||de.current.lr)){var dn=Rn;Pn?dn+=pn-mn:dn=jn.x-yn.x-De;var dr=kr(dn,In),ir=kr(dn,In,St);dr>$n||dr===$n&&(!Bt||ir>=sn)?(de.current.lr=!0,Rn=dn,De=-De,Nn.points=[ot(un,1),ot(xn,1)]):de.current.lr=!1}Dr();var tr=Xe===!0?0:Xe;typeof tr=="number"&&(Pt<St.left&&(Rn-=Pt-St.left-De,ce.x+mn<St.left+tr&&(Rn+=ce.x-St.left+mn-tr)),Dt>St.right&&(Rn-=Dt-St.right-De,ce.x>St.right-tr&&(Rn+=ce.x-St.right+tr)));var Yn=Ke===!0?0:Ke;typeof Yn=="number"&&(it<St.top&&(In-=it-St.top-Se,ce.y+Tn<St.top+Yn&&(In+=ce.y-St.top+Tn-Yn)),ht>St.bottom&&(In-=ht-St.bottom-Se,ce.y>St.bottom-Yn&&(In+=ce.y-St.bottom+Yn)));var hn=$e.x+Rn,mr=hn+pn,rr=$e.y+In,lr=rr+cn,Hn=ce.x,Sn=Hn+mn,On=ce.y,Qn=On+Tn,Fn=Math.max(hn,Hn),sr=Math.min(mr,Sn),ar=(Fn+sr)/2,Pr=ar-hn,zr=Math.max(rr,On),Kr=Math.min(lr,Qn),ei=(zr+Kr)/2,Zr=ei-rr;P==null||P(ye,Nn);var Br=Qe.right-$e.x-(Rn+$e.width),hr=Qe.bottom-$e.y-(In+$e.height);Tt===1&&(Rn=Math.round(Rn),Br=Math.round(Br)),Et===1&&(In=Math.round(In),hr=Math.round(hr));var Sr={ready:!0,offsetX:Rn/Tt,offsetY:In/Et,offsetR:Br/Tt,offsetB:hr/Et,arrowX:Pr/Tt,arrowY:Zr/Et,scaleX:Tt,scaleY:Et,align:Nn};B(Sr)}}),Ce=function(){j.current+=1;var Ye=j.current;Promise.resolve().then(function(){j.current===Ye&&Ee()})},Fe=function(){B(function(Ye){return(0,x.Z)((0,x.Z)({},Ye),{},{ready:!1})})};return(0,h.Z)(Fe,[we]),(0,h.Z)(function(){Re||Fe()},[Re]),[M.ready,M.offsetX,M.offsetY,M.offsetR,M.offsetB,M.arrowX,M.arrowY,M.scaleX,M.scaleY,M.align,Ce]}var bt=E(62730);function xe(Re,ye,Z,we,Le){(0,h.Z)(function(){if(Re&&ye&&Z){let j=function(){we(),Le()};var $=ye,P=Z,K=V($),ne=V(P),M=ie(P),B=new Set([M].concat((0,bt.Z)(K),(0,bt.Z)(ne)));return B.forEach(function(me){me.addEventListener("scroll",j,{passive:!0})}),M.addEventListener("resize",j,{passive:!0}),we(),function(){B.forEach(function(me){me.removeEventListener("scroll",j),M.removeEventListener("resize",j)})}}},[Re,ye,Z])}var _t=E(48736);function Qt(Re,ye,Z,we,Le,$,P,K){var ne=_.useRef(Re);ne.current=Re;var M=_.useRef(!1);_.useEffect(function(){if(ye&&we&&(!Le||$)){var j=function(){M.current=!1},me=function(xt){var lt;ne.current&&!P(((lt=xt.composedPath)===null||lt===void 0||(lt=lt.call(xt))===null||lt===void 0?void 0:lt[0])||xt.target)&&!M.current&&K(!1)},de=ie(we);de.addEventListener("pointerdown",j,!0),de.addEventListener("mousedown",me,!0),de.addEventListener("contextmenu",me,!0);var Ae=(0,o.A)(Z);if(Ae&&(Ae.addEventListener("mousedown",me,!0),Ae.addEventListener("contextmenu",me,!0)),0)var Ee,Ce,Fe,Be;return function(){de.removeEventListener("pointerdown",j,!0),de.removeEventListener("mousedown",me,!0),de.removeEventListener("contextmenu",me,!0),Ae&&(Ae.removeEventListener("mousedown",me,!0),Ae.removeEventListener("contextmenu",me,!0))}}},[ye,Z,we,Le,$]);function B(){M.current=!0}return B}var Lt=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];function qt(){var Re=arguments.length>0&&arguments[0]!==void 0?arguments[0]:fe.Z,ye=_.forwardRef(function(Z,we){var Le=Z.prefixCls,$=Le===void 0?"rc-trigger-popup":Le,P=Z.children,K=Z.action,ne=K===void 0?"hover":K,M=Z.showAction,B=Z.hideAction,j=Z.popupVisible,me=Z.defaultPopupVisible,de=Z.onPopupVisibleChange,Ae=Z.afterPopupVisibleChange,Ee=Z.mouseEnterDelay,Ce=Z.mouseLeaveDelay,Fe=Ce===void 0?.1:Ce,Be=Z.focusDelay,Ye=Z.blurDelay,xt=Z.mask,lt=Z.maskClosable,nt=lt===void 0?!0:lt,Ut=Z.getPopupContainer,Vt=Z.forceRender,Ct=Z.autoDestroy,Jt=Z.destroyPopupOnHide,wn=Z.popup,Rt=Z.popupClassName,Yt=Z.popupStyle,Ne=Z.popupPlacement,ke=Z.builtinPlacements,Pe=ke===void 0?{}:ke,z=Z.popupAlign,oe=Z.zIndex,he=Z.stretch,ce=Z.getPopupClassNameFromAlign,be=Z.fresh,ze=Z.alignPoint,Ze=Z.onPopupClick,$e=Z.onPopupAlign,ft=Z.arrow,en=Z.popupMotion,an=Z.maskMotion,yt=Z.popupTransitionName,Gt=Z.popupAnimation,_n=Z.maskTransitionName,Bn=Z.maskAnimation,cn=Z.className,pn=Z.getTriggerDOMNode,Tn=(0,ve.Z)(Z,Lt),mn=Ct||Jt||!1,An=_.useState(!1),Ft=(0,ae.Z)(An,2),Wn=Ft[0],Ue=Ft[1];(0,h.Z)(function(){Ue((0,g.Z)())},[]);var Oe=_.useRef({}),Bt=_.useContext(re),kt=_.useMemo(function(){return{registerSubPopup:function(Gn,yr){Oe.current[Gn]=yr,Bt==null||Bt.registerSubPopup(Gn,yr)}}},[Bt]),St=(0,C.Z)(),fn=_.useState(null),Ve=(0,ae.Z)(fn,2),Qe=Ve[0],Tt=Ve[1],Et=_.useRef(null),Xt=(0,y.Z)(function(Ln){Et.current=Ln,(0,te.Sh)(Ln)&&Qe!==Ln&&Tt(Ln),Bt==null||Bt.registerSubPopup(St,Ln)}),ln=_.useState(null),nn=(0,ae.Z)(ln,2),zt=nn[0],De=nn[1],Se=_.useRef(null),et=(0,y.Z)(function(Ln){(0,te.Sh)(Ln)&&zt!==Ln&&(De(Ln),Se.current=Ln)}),rt=_.Children.only(P),It=(rt==null?void 0:rt.props)||{},Nt={},wt=(0,y.Z)(function(Ln){var Gn,yr,Xn=zt;return(Xn==null?void 0:Xn.contains(Ln))||((Gn=(0,o.A)(Xn))===null||Gn===void 0?void 0:Gn.host)===Ln||Ln===Xn||(Qe==null?void 0:Qe.contains(Ln))||((yr=(0,o.A)(Qe))===null||yr===void 0?void 0:yr.host)===Ln||Ln===Qe||Object.values(Oe.current).some(function(xr){return(xr==null?void 0:xr.contains(Ln))||Ln===xr})}),Zt=q($,en,Gt,yt),$t=q($,an,Bn,_n),jt=_.useState(me||!1),xn=(0,ae.Z)(jt,2),un=xn[0],Cn=xn[1],Un=j!=null?j:un,Nn=(0,y.Z)(function(Ln){j===void 0&&Cn(Ln)});(0,h.Z)(function(){Cn(j||!1)},[j]);var Rn=_.useRef(Un);Rn.current=Un;var In=_.useRef([]);In.current=[];var $n=(0,y.Z)(function(Ln){var Gn;Nn(Ln),((Gn=In.current[In.current.length-1])!==null&&Gn!==void 0?Gn:Un)!==Ln&&(In.current.push(Ln),de==null||de(Ln))}),sn=_.useRef(),gn=function(){clearTimeout(sn.current)},yn=function(Gn){var yr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;gn(),yr===0?$n(Gn):sn.current=setTimeout(function(){$n(Gn)},yr*1e3)};_.useEffect(function(){return gn},[]);var jn=_.useState(!1),kn=(0,ae.Z)(jn,2),Vn=kn[0],or=kn[1];(0,h.Z)(function(Ln){(!Ln||Un)&&or(!0)},[Un]);var ge=_.useState(null),Xe=(0,ae.Z)(ge,2),Ke=Xe[0],We=Xe[1],it=_.useState(null),ht=(0,ae.Z)(it,2),Pt=ht[0],Dt=ht[1],pt=function(Gn){Dt([Gn.clientX,Gn.clientY])},Ge=Ot(Un,Qe,ze&&Pt!==null?Pt:zt,Ne,Pe,z,$e),Je=(0,ae.Z)(Ge,11),at=Je[0],dt=Je[1],gt=Je[2],Wt=Je[3],vn=Je[4],rn=Je[5],Pn=Je[6],Zn=Je[7],Kn=Je[8],er=Je[9],dn=Je[10],dr=Te(Wn,ne,M,B),ir=(0,ae.Z)(dr,2),tr=ir[0],Yn=ir[1],hn=tr.has("click"),mr=Yn.has("click")||Yn.has("contextMenu"),rr=(0,y.Z)(function(){Vn||dn()}),lr=function(){Rn.current&&ze&&mr&&yn(!1)};xe(Un,zt,Qe,rr,lr),(0,h.Z)(function(){rr()},[Pt,Ne]),(0,h.Z)(function(){Un&&!(Pe!=null&&Pe[Ne])&&rr()},[JSON.stringify(z)]);var Hn=_.useMemo(function(){var Ln=Q(Pe,$,er,ze);return f()(Ln,ce==null?void 0:ce(er))},[er,ce,Pe,$,ze]);_.useImperativeHandle(we,function(){return{nativeElement:Se.current,popupElement:Et.current,forceAlign:rr}});var Sn=_.useState(0),On=(0,ae.Z)(Sn,2),Qn=On[0],Fn=On[1],sr=_.useState(0),ar=(0,ae.Z)(sr,2),Pr=ar[0],zr=ar[1],Kr=function(){if(he&&zt){var Gn=zt.getBoundingClientRect();Fn(Gn.width),zr(Gn.height)}},ei=function(){Kr(),rr()},Zr=function(Gn){or(!1),dn(),Ae==null||Ae(Gn)},Br=function(){return new Promise(function(Gn){Kr(),We(function(){return Gn})})};(0,h.Z)(function(){Ke&&(dn(),Ke(),We(null))},[Ke]);function hr(Ln,Gn,yr,Xn){Nt[Ln]=function(xr){var Jr;Xn==null||Xn(xr),yn(Gn,yr);for(var Fr=arguments.length,qr=new Array(Fr>1?Fr-1:0),ri=1;ri<Fr;ri++)qr[ri-1]=arguments[ri];(Jr=It[Ln])===null||Jr===void 0||Jr.call.apply(Jr,[It,xr].concat(qr))}}(hn||mr)&&(Nt.onClick=function(Ln){var Gn;Rn.current&&mr?yn(!1):!Rn.current&&hn&&(pt(Ln),yn(!0));for(var yr=arguments.length,Xn=new Array(yr>1?yr-1:0),xr=1;xr<yr;xr++)Xn[xr-1]=arguments[xr];(Gn=It.onClick)===null||Gn===void 0||Gn.call.apply(Gn,[It,Ln].concat(Xn))});var Sr=Qt(Un,mr,zt,Qe,xt,nt,wt,yn),kr=tr.has("hover"),Dr=Yn.has("hover"),gr,pr;kr&&(hr("onMouseEnter",!0,Ee,function(Ln){pt(Ln)}),hr("onPointerEnter",!0,Ee,function(Ln){pt(Ln)}),gr=function(Gn){(Un||Vn)&&Qe!==null&&Qe!==void 0&&Qe.contains(Gn.target)&&yn(!0,Ee)},ze&&(Nt.onMouseMove=function(Ln){var Gn;(Gn=It.onMouseMove)===null||Gn===void 0||Gn.call(It,Ln)})),Dr&&(hr("onMouseLeave",!1,Fe),hr("onPointerLeave",!1,Fe),pr=function(){yn(!1,Fe)}),tr.has("focus")&&hr("onFocus",!0,Be),Yn.has("focus")&&hr("onBlur",!1,Ye),tr.has("contextMenu")&&(Nt.onContextMenu=function(Ln){var Gn;Rn.current&&Yn.has("contextMenu")?yn(!1):(pt(Ln),yn(!0)),Ln.preventDefault();for(var yr=arguments.length,Xn=new Array(yr>1?yr-1:0),xr=1;xr<yr;xr++)Xn[xr-1]=arguments[xr];(Gn=It.onContextMenu)===null||Gn===void 0||Gn.call.apply(Gn,[It,Ln].concat(Xn))}),cn&&(Nt.className=f()(It.className,cn));var tn=(0,x.Z)((0,x.Z)({},It),Nt),zn={},Jn=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Jn.forEach(function(Ln){Tn[Ln]&&(zn[Ln]=function(){for(var Gn,yr=arguments.length,Xn=new Array(yr),xr=0;xr<yr;xr++)Xn[xr]=arguments[xr];(Gn=tn[Ln])===null||Gn===void 0||Gn.call.apply(Gn,[tn].concat(Xn)),Tn[Ln].apply(Tn,Xn)})});var nr=_.cloneElement(rt,(0,x.Z)((0,x.Z)({},tn),zn)),_r={x:rn,y:Pn},Tr=ft?(0,x.Z)({},ft!==!0?ft:{}):null;return _.createElement(_.Fragment,null,_.createElement(ue.Z,{disabled:!Un,ref:et,onResize:ei},_.createElement(G,{getTriggerDOMNode:pn},nr)),_.createElement(re.Provider,{value:kt},_.createElement(J,{portal:Re,ref:Xt,prefixCls:$,popup:wn,className:f()(Rt,Hn),style:Yt,target:zt,onMouseEnter:gr,onMouseLeave:pr,onPointerEnter:gr,zIndex:oe,open:Un,keepDom:Vn,fresh:be,onClick:Ze,onPointerDownCapture:Sr,mask:xt,motion:Zt,maskMotion:$t,onVisibleChanged:Zr,onPrepare:Br,forceRender:Vt,autoDestroy:mn,getPopupContainer:Ut,align:er,arrow:Tr,arrowPos:_r,ready:at,offsetX:dt,offsetY:gt,offsetR:Wt,offsetB:vn,onAlign:rr,stretch:he,targetWidth:Qn/Zn,targetHeight:Pr/Kn})))});return ye}var tt=qt(fe.Z)},81705:function(on,je,E){"use strict";E.d(je,{t:function(){return h}});var x=E(59301),ae=E(99571),ve={buttonFixed:"buttonFixed___vyq30",button:"button___hxmYv",buttonWrap:"buttonWrap___uK8dl"},fe=E(92310),F=E.n(fe),f=Object.defineProperty,ue=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,y=(g,_,S)=>_ in g?f(g,_,{enumerable:!0,configurable:!0,writable:!0,value:S}):g[_]=S,C=(g,_)=>{for(var S in _||(_={}))te.call(_,S)&&y(g,S,_[S]);if(ue)for(var S of ue(_))o.call(_,S)&&y(g,S,_[S]);return g};const h=({cancelText:g="\u53D6\u6D88",okText:_="\u786E\u5B9A",loading:S=!1,hasOkBtn:L=!0,hasCancelBtn:N=!0,okButtonProps:H={},onCancel:R=()=>{},onOk:k=()=>{},className:T=""})=>x.createElement("div",{className:F()(ve.buttonFixed,T)},x.createElement("div",{className:ve.buttonWrap},N&&x.createElement(ae.ZP,{size:"middle",className:`${ve.button} mr20`,onClick:R},g),L&&x.createElement(ae.ZP,C({size:"middle",type:"primary",className:`${ve.button} mr20`,loading:S,onClick:k},H),_)))},28426:function(on,je,E){"use strict";var x=E(59301),ae=E(93314),ve=E(99571),fe=Object.defineProperty,F=Object.defineProperties,f=Object.getOwnPropertyDescriptors,ue=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,y=(_,S,L)=>S in _?fe(_,S,{enumerable:!0,configurable:!0,writable:!0,value:L}):_[S]=L,C=(_,S)=>{for(var L in S||(S={}))te.call(S,L)&&y(_,L,S[L]);if(ue)for(var L of ue(S))o.call(S,L)&&y(_,L,S[L]);return _},h=(_,S)=>F(_,f(S));const g=({img:_,buttonProps:S={},styles:L={},customText:N,ButtonText:H,ButtonClick:R,Buttonclass:k,ButtonTwo:T,imgStyles:A,loading:J=!1,className:ee=""})=>x.createElement("section",{className:`tc animated fadeIn ${ee}`,style:C({color:"#999",margin:"100px auto",visibility:J?"hidden":"visible"},L)},x.createElement("img",{src:_||ae,style:h(C({},A),{pointerEvents:"none",userSelect:"none"})}),x.createElement("p",{className:"mt20 font14"},N||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),H&&x.createElement(ve.ZP,C({className:k,onClick:R},S),H),T&&T);je.Z=g},45677:function(on,je,E){"use strict";E.d(je,{Z:function(){return k}});var x=E(59301),ae={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},ve=E(99571),fe=E(70557),F=E(75975),f=E(25399),ue=E(51257),te=E(81722),o=E(28426),y=E(346),C=E(44203),h=E(59301),g=Object.defineProperty,_=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,L=Object.prototype.propertyIsEnumerable,N=(T,A,J)=>A in T?g(T,A,{enumerable:!0,configurable:!0,writable:!0,value:J}):T[A]=J,H=(T,A)=>{for(var J in A||(A={}))S.call(A,J)&&N(T,J,A[J]);if(_)for(var J of _(A))L.call(A,J)&&N(T,J,A[J]);return T},R=(T,A,J)=>new Promise((ee,G)=>{var I=Te=>{try{le(J.next(Te))}catch(W){G(W)}},re=Te=>{try{le(J.throw(Te))}catch(W){G(W)}},le=Te=>Te.done?ee(Te.value):Promise.resolve(Te.value).then(I,re);le((J=J.apply(T,A)).next())}),k=({editOffice:T="view",data:A,issaver:J,onSaver:ee,theme:G,type:I,filename:re,monacoEditor:le,className:Te,style:W,close:O,onClose:Q,hasMask:q,disabledDownload:ie,onImgDimensions:V,showNodata:v,recordInfo:m})=>{const[U,se]=(0,x.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[pe,He]=(0,x.useState)(""),[qe,ot]=(0,x.useState)(),Ot=window.ENV==="build"?"/react/build":"",bt=location.host.startsWith("localhost")?y.Z.PROXY_SERVER:y.Z.API_SERVER,_t=10*(1024*1024),Qt=(0,x.useRef)();A!=null&&A.startsWith("/api")&&I!=="txt"&&(A=y.Z.API_SERVER+A);const Lt=Z=>Z.substring(Z.lastIndexOf("/")+1).split(".").pop();re&&le&&(le.filename=re),(0,x.useEffect)(()=>{var Z,we;const Le=(we=(Z=document.cookie)==null?void 0:Z.replace(/\s/g,""))==null?void 0:we.split(";");Le==null||Le.map($=>{let P=$.split("=");P[0]==="_educoder_session"&&He(P[1])})},[]),(0,x.useEffect)(()=>{I==="office"&&(A.indexOf("bigfilescdn.")>-1||A.indexOf("bigfiles1")>-1?ot({url:A,fileType:Lt(A),model:A.indexOf("model=edit")?"edit":"view"}):tt())},[I,A]);function qt(Z){return R(this,null,function*(){Z.data.type==="pdfdata"&&(ee(Z.data.data),window.removeEventListener("message",qt,!1)),console.log("mess---:",Z.data)})}const tt=()=>R(void 0,null,function*(){console.log("data:",A);let Z=A;A.startsWith("http")||(Z=location.origin+Z);let we=new URL(Z).pathname.split("/").pop();const Le=yield(0,te.gJ)({attachment_id:we});Le.url=bt+Le.url,ot(Le)}),Re=()=>{if(A.startsWith("http")||A.startsWith("blob:")){ye();return}(0,ue.Sv)(re||"educoder",A,re)},ye=()=>{m&&(0,C.fc)({id:m==null?void 0:m.id,watch_type:1,course_id:m==null?void 0:m.course_id}),(0,ue.Nd)(re||"educoder",decodeURIComponent(A))};return h.createElement("div",{style:H({},W||{}),className:`${q&&ae.bgBlack} ${I?ae.wrp:"hide"}`},O&&h.createElement("div",{className:ae.close,ref:Qt},!!V&&h.createElement(f.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>Qt.current},h.createElement("span",{onClick:()=>{Q(),V()}},h.createElement("i",{className:"icon-yulanpizhu"}))),!ie&&h.createElement(f.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>Qt.current},h.createElement("span",{onClick:ye},h.createElement("i",{className:"icon-quxiaozhiding"}))),J&&h.createElement(f.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>Qt.current},h.createElement("span",{className:"",onClick:()=>{const Z=document.getElementById("pdfiframe");window.addEventListener("message",qt,!1),setTimeout(()=>{Z.contentWindow.postMessage("getData","*")},300)}},h.createElement("i",{className:"icon-baocun"}))),h.createElement(f.Z,{title:"\u5173\u95ED",getPopupContainer:()=>Qt.current},h.createElement("span",{className:"",onClick:()=>{Q()}},h.createElement("i",{className:"icon-guanbi1"})))),h.createElement("div",{className:`${ae[Te]} ${Te} ${ae.monaco} ${I==="txt"?"show":"hide"}`},I==="txt"&&h.createElement(h.Fragment,null,h.createElement(F.ZP,H({},le)))),I==="audio"&&h.createElement("audio",{src:`${(A==null?void 0:A.indexOf("http://"))>-1||(A==null?void 0:A.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${A}`,autoPlay:!0}),I==="video"&&h.createElement(h.Fragment,null,(A==null?void 0:A.indexOf("http"))>-1?h.createElement("video",{controls:!0,src:`${A}`,autoPlay:!0}):h.createElement("video",{controls:!0,src:`data:video/mp4;base64,${A}`,autoPlay:!0})),I==="office"&&qe&&h.createElement("iframe",{src:`${Ot}/office.html?key=${qe.key}&url=${btoa(qe.url)}&callbackUrl=${bt+(qe.callbackUrl||"")}&fileType=${qe.fileType}&title=${qe.title||""}&model=${T}&officeServer=${y.Z.ONLYOFFICE}&disabledDownload=${!!ie}`}),I==="html"&&h.createElement("iframe",{src:A+"&disposition=inline"}),I==="pdf"&&h.createElement("iframe",{id:"pdfiframe",src:`${Ot}/js/pdfview/index.html?filename=${re||"educoder.pdf"}&url=${encodeURIComponent(A)}&disabledDownload=${!!ie}&model=${T}`}),I==="image"&&h.createElement("img",{src:`${(A==null?void 0:A.indexOf("http://"))>-1||(A==null?void 0:A.indexOf("https://"))>-1?"":"data:image/png;base64,"}${A}`}),(I==="other"||I==="download")&&h.createElement(h.Fragment,null,v?h.createElement(o.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:h.createElement(ve.ZP,{icon:h.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Re,disabled:ie},"\u4E0B\u8F7D")}):h.createElement(ve.ZP,{type:"primary",size:"middle",onClick:Re,disabled:ie},h.createElement(fe.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},76902:function(on,je,E){"use strict";E.d(je,{z:function(){return G},Z:function(){return I}});var x=E(59301),ae=E(8944),ve=E(81428),fe=E(64018),F=E(79710),f=E(346),ue=E(51257),te=E(15342),o=E(1012),y=E(45677),C=E(59301),g=({html:re})=>{const le=(0,x.useRef)(null),Te=(0,x.useRef)(null),W=`.markdown-body p {
|
|
margin: 0 0 16px 0 !important;
|
|
line-height: 28px;
|
|
white-space: pre-wrap;
|
|
}
|
|
|
|
ol,
|
|
ul,
|
|
li {
|
|
list-style-type: none
|
|
}
|
|
|
|
ol,
|
|
ul,
|
|
dl {
|
|
margin-bottom: 0px;
|
|
}
|
|
|
|
.markdown-body {
|
|
-ms-text-size-adjust: 100%;
|
|
-webkit-text-size-adjust: 100%;
|
|
color: #333;
|
|
overflow: hidden;
|
|
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
|
|
word-break: break-word;
|
|
font-size: 16px;
|
|
line-height: 1.6;
|
|
white-space: normal;
|
|
word-wrap: break-word;
|
|
position: relative;
|
|
}
|
|
|
|
.markdown-body ul>li {
|
|
list-style-type: disc;
|
|
}
|
|
|
|
.markdown-body ol>li {
|
|
list-style-type: decimal;
|
|
}
|
|
|
|
.markdown-body a {
|
|
background: transparent;
|
|
}
|
|
|
|
.markdown-body a:active,
|
|
.markdown-body a:hover {
|
|
outline: 0;
|
|
}
|
|
|
|
.markdown-body strong {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
font-size: 2em;
|
|
margin: 0.67em 0;
|
|
}
|
|
|
|
.markdown-body img {
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body hr {
|
|
-moz-box-sizing: content-box;
|
|
box-sizing: content-box;
|
|
height: 0;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
overflow: auto;
|
|
}
|
|
|
|
.markdown-body code,
|
|
.markdown-body kbd,
|
|
.markdown-body pre {
|
|
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
|
|
font-size: 1em;
|
|
}
|
|
|
|
.markdown-body input {
|
|
color: inherit;
|
|
font: inherit;
|
|
margin: 0;
|
|
}
|
|
|
|
.markdown-body html input[disabled] {
|
|
cursor: default;
|
|
}
|
|
|
|
.markdown-body input {
|
|
line-height: normal;
|
|
}
|
|
|
|
.markdown-body input[type="checkbox"] {
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body table {
|
|
border-collapse: collapse;
|
|
border-spacing: 0;
|
|
}
|
|
|
|
.markdown-body td,
|
|
.markdown-body th {
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body * {
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.markdown-body input {
|
|
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
|
|
}
|
|
|
|
.markdown-body a {
|
|
color: #4183c4;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.markdown-body a:hover,
|
|
.markdown-body a:active {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.markdown-body hr {
|
|
height: 0;
|
|
margin: 15px 0;
|
|
overflow: hidden;
|
|
background: transparent;
|
|
border: 0;
|
|
border-bottom: 1px solid #ddd;
|
|
}
|
|
|
|
.markdown-body hr:before {
|
|
display: table;
|
|
content: "";
|
|
}
|
|
|
|
.markdown-body hr:after {
|
|
display: table;
|
|
clear: both;
|
|
content: "";
|
|
}
|
|
|
|
.markdown-body h1,
|
|
.markdown-body h2,
|
|
.markdown-body h3,
|
|
.markdown-body h4,
|
|
.markdown-body h5,
|
|
.markdown-body h6 {
|
|
margin-top: 15px;
|
|
margin-bottom: 15px;
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
font-size: 30px;
|
|
}
|
|
|
|
.markdown-body h2 {
|
|
font-size: 21px;
|
|
}
|
|
|
|
.markdown-body h3 {
|
|
font-size: 16px;
|
|
}
|
|
|
|
.markdown-body h4 {
|
|
font-size: 14px;
|
|
}
|
|
|
|
.markdown-body h5 {
|
|
font-size: 12px;
|
|
}
|
|
|
|
.markdown-body h6 {
|
|
font-size: 11px;
|
|
}
|
|
|
|
.markdown-body blockquote {
|
|
margin: 0;
|
|
}
|
|
|
|
.markdown-body ul,
|
|
.markdown-body ol {
|
|
padding: 0;
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
ul.linenums,
|
|
ol.linenums {
|
|
padding: 16px 0 0 56px !important;
|
|
}
|
|
|
|
.markdown-body ul,
|
|
.markdown-body ol {
|
|
padding-left: 2em;
|
|
}
|
|
|
|
|
|
.markdown-body ol ol,
|
|
.markdown-body ul ol {
|
|
list-style-type: lower-roman;
|
|
}
|
|
|
|
.markdown-body ul ul ol,
|
|
.markdown-body ul ol ol,
|
|
.markdown-body ol ul ol,
|
|
.markdown-body ol ol ol {
|
|
list-style-type: lower-alpha;
|
|
}
|
|
|
|
.markdown-body dd {
|
|
margin-left: 0;
|
|
}
|
|
|
|
.markdown-body code {
|
|
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
font-size: 12px;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
}
|
|
|
|
.markdown-body .octicon {
|
|
font: normal normal 16px octicons-anchor;
|
|
line-height: 1;
|
|
display: inline-block;
|
|
text-decoration: none;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
-webkit-user-select: none;
|
|
-moz-user-select: none;
|
|
-ms-user-select: none;
|
|
user-select: none;
|
|
}
|
|
|
|
.markdown-body .octicon-link:before {
|
|
content: '\f05c';
|
|
}
|
|
|
|
.markdown-body>*:first-child {
|
|
margin-top: 0 !important;
|
|
}
|
|
|
|
.markdown-body>*:last-child {
|
|
margin-bottom: 0 !important;
|
|
}
|
|
|
|
.markdown-body .anchor {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
display: block;
|
|
padding-right: 6px;
|
|
padding-left: 30px;
|
|
margin-left: -30px;
|
|
}
|
|
|
|
.markdown-body .anchor:focus {
|
|
outline: none;
|
|
}
|
|
|
|
.markdown-body h1,
|
|
.markdown-body h2,
|
|
.markdown-body h3,
|
|
.markdown-body h4,
|
|
.markdown-body h5,
|
|
.markdown-body h6 {
|
|
position: relative;
|
|
margin-top: 1em;
|
|
margin-bottom: 16px;
|
|
font-weight: bold;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.markdown-body h1 .octicon-link,
|
|
.markdown-body h2 .octicon-link,
|
|
.markdown-body h3 .octicon-link,
|
|
.markdown-body h4 .octicon-link,
|
|
.markdown-body h5 .octicon-link,
|
|
.markdown-body h6 .octicon-link {
|
|
display: none;
|
|
color: #000;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.markdown-body h1:hover .anchor,
|
|
.markdown-body h2:hover .anchor,
|
|
.markdown-body h3:hover .anchor,
|
|
.markdown-body h4:hover .anchor,
|
|
.markdown-body h5:hover .anchor,
|
|
.markdown-body h6:hover .anchor {
|
|
padding-left: 8px;
|
|
margin-left: -30px;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.markdown-body h1:hover .anchor .octicon-link,
|
|
.markdown-body h2:hover .anchor .octicon-link,
|
|
.markdown-body h3:hover .anchor .octicon-link,
|
|
.markdown-body h4:hover .anchor .octicon-link,
|
|
.markdown-body h5:hover .anchor .octicon-link,
|
|
.markdown-body h6:hover .anchor .octicon-link {
|
|
display: inline-block;
|
|
}
|
|
|
|
.markdown-body h1 {
|
|
padding-bottom: 0.3em;
|
|
font-size: 2.25em;
|
|
line-height: 1.2;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.markdown-body h1 .anchor {
|
|
line-height: 1;
|
|
}
|
|
|
|
.markdown-body h2 {
|
|
padding-bottom: 0.3em;
|
|
font-size: 1.75em;
|
|
line-height: 1.225;
|
|
border-bottom: 1px solid #eee;
|
|
}
|
|
|
|
.markdown-body h2 .anchor {
|
|
line-height: 1;
|
|
}
|
|
|
|
.markdown-body h3 {
|
|
font-size: 1.5em;
|
|
line-height: 1.43;
|
|
}
|
|
|
|
.markdown-body h3 .anchor {
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.markdown-body h4 {
|
|
font-size: 1.25em;
|
|
}
|
|
|
|
.markdown-body h4 .anchor {
|
|
line-height: 1.2;
|
|
}
|
|
|
|
.markdown-body h5 {
|
|
font-size: 1em;
|
|
}
|
|
|
|
.markdown-body h5 .anchor {
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body h6 {
|
|
font-size: 1em;
|
|
color: #777;
|
|
}
|
|
|
|
.markdown-body h6 .anchor {
|
|
line-height: 1.1;
|
|
}
|
|
|
|
.markdown-body p,
|
|
.markdown-body blockquote,
|
|
.markdown-body ul,
|
|
.markdown-body ol,
|
|
.markdown-body dl,
|
|
.markdown-body table,
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body ul ul,
|
|
.markdown-body ul ol,
|
|
.markdown-body ol ol,
|
|
.markdown-body ol ul {
|
|
margin-top: 0;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.markdown-body li>p {
|
|
margin-top: 16px;
|
|
}
|
|
|
|
.markdown-body dl {
|
|
padding: 0;
|
|
}
|
|
|
|
.markdown-body dl dt {
|
|
padding: 0;
|
|
margin-top: 16px;
|
|
font-size: 1em;
|
|
font-style: italic;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body dl dd {
|
|
padding: 0 16px;
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body blockquote {
|
|
padding: 0 15px;
|
|
color: #777;
|
|
border-left: 4px solid #ddd;
|
|
}
|
|
|
|
.markdown-body blockquote> :first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
.markdown-body blockquote> :last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.markdown-body table {
|
|
display: block;
|
|
width: 100%;
|
|
overflow: auto;
|
|
word-break: normal;
|
|
word-break: keep-all;
|
|
}
|
|
|
|
.markdown-body table th {
|
|
font-weight: bold;
|
|
text-align: revert;
|
|
}
|
|
|
|
.markdown-body table th,
|
|
.markdown-body table td {
|
|
padding: 6px 13px;
|
|
border: 1px solid #ddd;
|
|
}
|
|
|
|
.markdown-body table tr {
|
|
background-color: #fff;
|
|
border-top: 1px solid #ccc;
|
|
}
|
|
|
|
.markdown-body table tr:nth-child(2n) {
|
|
background-color: #f8f8f8;
|
|
}
|
|
|
|
.markdown-body img {
|
|
max-width: 100%;
|
|
-moz-box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.markdown-body code {
|
|
padding: 0;
|
|
padding-top: 0.2em;
|
|
padding-bottom: 0.2em;
|
|
margin: 0;
|
|
font-size: 85%;
|
|
background-color: rgba(0, 0, 0, 0.04);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.markdown-body code:has(.katex) {
|
|
background-color: transparent;
|
|
}
|
|
|
|
.markdown-body code:before,
|
|
.markdown-body code:after {
|
|
letter-spacing: -0.2em;
|
|
content: "\\00a0";
|
|
}
|
|
|
|
.markdown-body pre>code {
|
|
padding: 0;
|
|
margin: 0;
|
|
font-size: 100%;
|
|
word-break: normal;
|
|
white-space: pre;
|
|
background: transparent;
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body .highlight {
|
|
margin-bottom: 16px;
|
|
}
|
|
|
|
.markdown-body .highlight pre,
|
|
.markdown-body pre {
|
|
padding: 16px;
|
|
overflow: auto;
|
|
font-size: 85%;
|
|
line-height: 1.45;
|
|
background-color: #f7f7f7;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.markdown-body .highlight pre {
|
|
margin-bottom: 0;
|
|
word-break: normal;
|
|
}
|
|
|
|
.markdown-body pre {
|
|
word-wrap: normal;
|
|
}
|
|
|
|
.markdown-body pre code {
|
|
display: inline;
|
|
max-width: initial;
|
|
padding: 0;
|
|
margin: 0;
|
|
overflow: initial;
|
|
line-height: inherit;
|
|
word-wrap: normal;
|
|
background-color: transparent;
|
|
border: 0;
|
|
}
|
|
|
|
.markdown-body pre code:before,
|
|
.markdown-body pre code:after {
|
|
content: normal;
|
|
}
|
|
|
|
.markdown-body kbd {
|
|
display: inline-block;
|
|
padding: 3px 5px;
|
|
font-size: 11px;
|
|
line-height: 10px;
|
|
color: #555;
|
|
vertical-align: middle;
|
|
background-color: #fcfcfc;
|
|
border: solid 1px #ccc;
|
|
border-bottom-color: #bbb;
|
|
border-radius: 3px;
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
}
|
|
|
|
.markdown-body .pl-c {
|
|
color: #969896;
|
|
}
|
|
|
|
.markdown-body .pl-c1,
|
|
.markdown-body .pl-mdh,
|
|
.markdown-body .pl-mm,
|
|
.markdown-body .pl-mp,
|
|
.markdown-body .pl-mr,
|
|
.markdown-body .pl-s1 .pl-v,
|
|
.markdown-body .pl-s3,
|
|
.markdown-body .pl-sc,
|
|
.markdown-body .pl-sv {
|
|
color: #0086b3;
|
|
}
|
|
|
|
.markdown-body .pl-e,
|
|
.markdown-body .pl-en {
|
|
color: #795da3;
|
|
}
|
|
|
|
.markdown-body .pl-s1 .pl-s2,
|
|
.markdown-body .pl-smi,
|
|
.markdown-body .pl-smp,
|
|
.markdown-body .pl-stj,
|
|
.markdown-body .pl-vo,
|
|
.markdown-body .pl-vpf {
|
|
color: #333;
|
|
}
|
|
|
|
.markdown-body .pl-ent {
|
|
color: #63a35c;
|
|
}
|
|
|
|
.markdown-body .pl-k,
|
|
.markdown-body .pl-s,
|
|
.markdown-body .pl-st {
|
|
color: #a71d5d;
|
|
}
|
|
|
|
.markdown-body .pl-pds,
|
|
.markdown-body .pl-s1,
|
|
.markdown-body .pl-s1 .pl-pse .pl-s2,
|
|
.markdown-body .pl-sr,
|
|
.markdown-body .pl-sr .pl-cce,
|
|
.markdown-body .pl-sr .pl-sra,
|
|
.markdown-body .pl-sr .pl-sre,
|
|
.markdown-body .pl-src {
|
|
color: #df5000;
|
|
}
|
|
|
|
.markdown-body .pl-mo,
|
|
.markdown-body .pl-v {
|
|
color: #1d3e81;
|
|
}
|
|
|
|
.markdown-body .pl-id {
|
|
color: #b52a1d;
|
|
}
|
|
|
|
.markdown-body .pl-ii {
|
|
background-color: #b52a1d;
|
|
color: #f8f8f8;
|
|
}
|
|
|
|
.markdown-body .pl-sr .pl-cce {
|
|
color: #63a35c;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-ml {
|
|
color: #693a17;
|
|
}
|
|
|
|
.markdown-body .pl-mh,
|
|
.markdown-body .pl-mh .pl-en,
|
|
.markdown-body .pl-ms {
|
|
color: #1d3e81;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-mq {
|
|
color: #008080;
|
|
}
|
|
|
|
.markdown-body .pl-mi {
|
|
color: #333;
|
|
font-style: italic;
|
|
}
|
|
|
|
.markdown-body .pl-mb {
|
|
color: #333;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body .pl-md,
|
|
.markdown-body .pl-mdhf {
|
|
background-color: #ffecec;
|
|
color: #bd2c00;
|
|
}
|
|
|
|
.markdown-body .pl-mdht,
|
|
.markdown-body .pl-mi1 {
|
|
background-color: #eaffea;
|
|
color: #55a532;
|
|
}
|
|
|
|
.markdown-body .pl-mdr {
|
|
color: #795da3;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.markdown-body kbd {
|
|
display: inline-block;
|
|
padding: 3px 5px;
|
|
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
line-height: 10px;
|
|
color: #555;
|
|
vertical-align: middle;
|
|
background-color: #fcfcfc;
|
|
border: solid 1px #ccc;
|
|
border-bottom-color: #bbb;
|
|
border-radius: 3px;
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
}
|
|
|
|
.markdown-body .task-list-item {
|
|
list-style-type: none;
|
|
}
|
|
|
|
.markdown-body .task-list-item+.task-list-item {
|
|
margin-top: 3px;
|
|
}
|
|
|
|
.markdown-body .task-list-item input {
|
|
float: left;
|
|
margin: 0.3em 0 0.25em -1.6em;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.markdown-body :checked+.radio-label {
|
|
z-index: 1;
|
|
position: relative;
|
|
border-color: #4183c4;
|
|
}
|
|
|
|
|
|
/*! Pretty printing styles. Used with prettify.js. */
|
|
/* SPAN elements with the classes below are added by prettyprint. */
|
|
.pln {
|
|
color: #000
|
|
}
|
|
|
|
/* plain text */
|
|
|
|
@media screen {
|
|
.str {
|
|
color: #080
|
|
}
|
|
|
|
/* string content */
|
|
.kwd {
|
|
color: #008
|
|
}
|
|
|
|
/* a keyword */
|
|
.com {
|
|
color: #800
|
|
}
|
|
|
|
/* a comment */
|
|
.typ {
|
|
color: #606
|
|
}
|
|
|
|
/* a type name */
|
|
.lit {
|
|
color: #066
|
|
}
|
|
|
|
/* a literal value */
|
|
/* punctuation, lisp open bracket, lisp close bracket */
|
|
.pun,
|
|
.opn,
|
|
.clo {
|
|
color: #660
|
|
}
|
|
|
|
.tag {
|
|
color: #008
|
|
}
|
|
|
|
/* a markup tag name */
|
|
.atn {
|
|
color: #606
|
|
}
|
|
|
|
/* a markup attribute name */
|
|
.atv {
|
|
color: #080
|
|
}
|
|
|
|
/* a markup attribute value */
|
|
.dec,
|
|
.var {
|
|
color: #606
|
|
}
|
|
|
|
/* a declaration; a variable name */
|
|
.fun {
|
|
color: red
|
|
}
|
|
|
|
/* a function name */
|
|
}
|
|
|
|
/* Use higher contrast and text-weight for printable form. */
|
|
@media print,
|
|
projection {
|
|
.str {
|
|
color: #060
|
|
}
|
|
|
|
.kwd {
|
|
color: #006;
|
|
font-weight: bold
|
|
}
|
|
|
|
.com {
|
|
color: #600;
|
|
font-style: italic
|
|
}
|
|
|
|
.typ {
|
|
color: #404;
|
|
font-weight: bold
|
|
}
|
|
|
|
.lit {
|
|
color: #044
|
|
}
|
|
|
|
.pun,
|
|
.opn,
|
|
.clo {
|
|
color: #440
|
|
}
|
|
|
|
.tag {
|
|
color: #006;
|
|
font-weight: bold
|
|
}
|
|
|
|
.atn {
|
|
color: #404
|
|
}
|
|
|
|
.atv {
|
|
color: #060
|
|
}
|
|
}
|
|
|
|
/* Put a border around prettyprinted code snippets. */
|
|
pre.prettyprint {
|
|
padding: 2px;
|
|
/* border: 1px solid #888 */
|
|
}
|
|
|
|
/* Specify class=linenums on a pre to get line numbering */
|
|
ol.linenums {
|
|
margin-top: 0;
|
|
margin-bottom: 0
|
|
}
|
|
|
|
/* IE indents via margin-left */
|
|
li.L0,
|
|
li.L1,
|
|
li.L2,
|
|
li.L3,
|
|
li.L5,
|
|
li.L6,
|
|
li.L7,
|
|
li.L8 {
|
|
list-style-type: none
|
|
}
|
|
|
|
/* Alternate shading for lines */
|
|
li.L1,
|
|
li.L3,
|
|
li.L5,
|
|
li.L7,
|
|
li.L9 {
|
|
background: #eee
|
|
}
|
|
|
|
.markdown-body p,
|
|
.markdown-body blockquote,
|
|
.markdown-body ul,
|
|
.markdown-body ol,
|
|
.markdown-body dl,
|
|
.markdown-body table,
|
|
.markdown-body pre {
|
|
margin-top: 0;
|
|
margin-bottom: 16px;
|
|
}`;return(0,x.useEffect)(()=>{const O=le.current.attachShadow({mode:"open"});Te.current=document.createElement("div"),Te.current.className="markdown-body",Te.current.innerHTML=re,O.appendChild(Te.current);const Q=document.createElement("style");return Q.textContent=W,O.appendChild(Q),()=>{O.innerHTML=""}},[]),(0,x.useEffect)(()=>{Te.current&&(Te.current.innerHTML=re)},[re]),C.createElement("div",{ref:le})};function _(re){const le=["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"],Te=new RegExp(`\\b(${le.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return re.replace(Te,"").trim()}var S=Object.defineProperty,L=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable,R=(re,le,Te)=>le in re?S(re,le,{enumerable:!0,configurable:!0,writable:!0,value:Te}):re[le]=Te,k=(re,le)=>{for(var Te in le||(le={}))N.call(le,Te)&&R(re,Te,le[Te]);if(L)for(var Te of L(le))H.call(le,Te)&&R(re,Te,le[Te]);return re};const T="@\u2581\u2581@",A="@\u2581@",J=/<pre[^>]*>/g;function ee(re){let le=document.createElement("div");return le.innerHTML=re,le.childNodes.length===0?"":le.childNodes[0].nodeValue}const G=(re,le)=>{re=re||"";const Te=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,W=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,O=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Q=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return le?re.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Te,(q,ie,V,v,m,U,se)=>{const pe=ie||v||U,He=V||m||se||"?";return f.Z.API_SERVER+"/api/attachments/"+pe+He+"&t="+(0,ue.Jn)(pe,Date.now())+(q.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(re=re.replace(Q,(q,ie,V,v,m,U,se)=>{const pe=ie||v||U,He=V||m||se||"?";return f.Z.API_SERVER+"/attachments/download/"+pe+He+"&t="+(0,ue.Jn)(pe,Date.now())+(q.indexOf(")")>-1?")":"&")}).replace(Te,(q,ie,V,v,m,U,se)=>{const pe=ie||v||U,He=V||m||se||"?";return f.Z.API_SERVER+"/api/attachments/"+pe+He+"&t="+(0,ue.Jn)(pe,Date.now())+(q.indexOf(")")>-1?")":"&")}).replace(W,(q,ie,V,v,m)=>{const U=ie||v,se=V||m||"";return'"'+f.Z.API_SERVER+"/api/attachments/"+U+se+U+se+"&t="+(0,ue.Jn)(U,Date.now())}).replace(O,(q,ie,V,v,m)=>{const U=ie||v,se=V||m||"";return"("+f.Z.API_SERVER+"/files/uploads/"+U+se+U+se+"&t="+(0,ue.Jn)(U,Date.now())}).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
`),re)};var I=({value:re="",className:le,showTextOnly:Te,showLines:W,style:O={},stylesPrev:Q={},highlightKeywords:q,showProgramFill:ie,isProgramFill:V,disabledFill:v=!1,programFillValue:m,onFillChange:U=He=>{},onFillBlur:se=()=>{},onFillFocus:pe=()=>{}})=>{let He=_(String(re||""));const[qe,ot]=(0,x.useState)(""),[Ot,bt]=(0,x.useState)("office"),[xe,_t]=(0,x.useState)([]),Qt=(0,x.useRef)("a"+(0,o.Z)()),Lt={},qt=B=>/<style[\s\S]*?>/i.test(B||""),tt=(B,j,me)=>{const de=document.createElement(B===A?"input":"textarea");de.style.width="100%",de.style.height=B===A?"40px":"151px",de.rows=5,de.spellcheck=!1,de.name="edu-program-fill",de.placeholder="\u8BF7\u8F93\u5165",de.dataset.id=j;const Ae=Object.keys(Lt).length;return Lt[Ae]=de,`<span class="edu-program-fill-wrap ${B===A?"":"show"}" style="width:${B===A?"400px":"100%"}" title=${me||""}><span>${de.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Re(B){return B=B.replace(/!\[.*?\]\(.*?\)/g,""),B=B.replace(/\[.*?\]\(.*?\)/g,""),B=B.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),B=B.replace(/<embed.*?>/g,""),B=B.replace(/<img.*?>/g,""),B=B.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),B=B.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),B=B.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),B=B.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),B}const ye=B=>!Te&&qt(He)?B:B.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(j,me){let de=me.replace(/(\n|\r)/g,"").split("}"),Ae=[];return de.map(Ee=>{Ee!=""&&Ae.push(`.${Qt.current} ${Ee}`)}),`<style>${Ae.join("}")}</style>`}),Z=(0,x.useMemo)(()=>{try{const de=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Ae=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ee=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Ce=/\(\/attachments\/download\//g;He=He.replace(Ce,"("+f.Z.API_SERVER+"/attachments/download/").replace(de,"("+f.Z.API_SERVER+"/api/attachments/").replace(Ae,'"'+f.Z.API_SERVER+"/api/attachments/").replace(Ee,'"'+f.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,`
|
|
`)}catch(de){}if(ie){let de=-1;return He=He.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(Ae,Ee,Ce){var Fe;return++de,tt(Ae,de,(Fe=m==null?void 0:m[de])==null?void 0:Fe.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${ye(He||"")}</pre>`}let B=ye(He);B=(0,ve.ZP)(B);const j=(0,ve.ez)();He.match(/\[TOC\]/)&&(B=B.replace("<p>[TOC]</p>",(0,ve.Qv)()),(0,ve.Iy)()),B=B.replace(/(__special_katext_id_\d+__)/g,(de,Ae)=>{const{type:Ee,expression:Ce}=j[Ae];return(0,te.renderToString)(ee(Ce)||"",{displayMode:Ee==="block",throwOnError:!1,output:"html"})}),B=B.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,ve.AL)();const me=document.createElement("div");if(me.innerHTML=B,Te)return me.innerText;if(q){const de=q.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return P(me,de),me.innerHTML}return setTimeout(()=>M(),500),me.innerHTML},[He,q]);(0,x.useEffect)(()=>{K.current&&K.current.querySelectorAll(["input","textarea"]).forEach(j=>{j.oninput=we,j.onblur=Le,j.onfocus=$})},[xe]),(0,x.useEffect)(()=>{var B,j,me,de,Ae;if(m!=null&&m.length)try{const Ee=K.current.querySelectorAll(".edu-program-fill-score"),Ce=K.current.querySelectorAll('[name="edu-program-fill"]');for(const[Fe,Be]of Ce.entries())Be.value=((B=m==null?void 0:m[Fe])==null?void 0:B.value)||"",((j=m==null?void 0:m[Fe])==null?void 0:j.type)==="warning"?Be.className="program-fill-warning":((me=m==null?void 0:m[Fe])==null?void 0:me.type)==="success"?Be.className="program-fill-success":Be.className="";for(const[Fe,Be]of Ee.entries())Be.innerHTML=(de=m==null?void 0:m[Fe])!=null&&de.score?`${(Ae=m==null?void 0:m[Fe])==null?void 0:Ae.score}\u5206`:"";_t(m)}catch(Ee){console.log(Ee,"error")}},[m]);const we=B=>{xe[B.target.dataset.id]=xe[B.target.dataset.id]||{},xe[B.target.dataset.id].value=B.target.value,_t([...xe]),U(xe,B.target.dataset.id)},Le=B=>{xe[B.target.dataset.id]=xe[B.target.dataset.id]||{},xe[B.target.dataset.id].value=B.target.value,_t([...xe]),se(xe,B.target.dataset.id)},$=B=>{xe[B.target.dataset.id]=xe[B.target.dataset.id]||{},xe[B.target.dataset.id].value=B.target.value,_t([...xe]),pe(xe,B.target.dataset.id)};function P(B,j){return B.childNodes.forEach(me=>{var de;if(me.childNodes.length>0)P(me,j);else if(me.nodeName!=="IMG")if(me.innerHTML)me.innerHTML=(de=me.innerHTML)==null?void 0:de.replace(new RegExp(j,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Ae=document.createElement("span");Ae.innerHTML=me.textContent.replace(new RegExp(j,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),me.replaceWith(Ae)}})}const K=(0,x.useRef)();ve.jb.WebkitLineClamp=W,W&&(O=k(k({},O),ve.jb));function ne(B){let j=B.target;if(j.tagName.toUpperCase()==="A"){let me=j.getAttribute("href");if(me.indexOf("office")>-1)B.preventDefault(),ot(me),bt("office");else if(me.indexOf("application/pdf")>-1)B.preventDefault(),ot(me),bt("pdf");else if(me.indexOf("text/html")>-1)B.preventDefault(),ot(me),bt("html");else if(me.startsWith("#")){B.preventDefault();let de=document.getElementById(me.replace("#",""));de&&de.scrollIntoView(!0)}}}const M=()=>{var B;const j=(B=K.current)==null?void 0:B.querySelectorAll("video");j==null||j.forEach(me=>{if(me.oncontextmenu=()=>!1,me.src.indexOf(".m3u8")>-1&&!me.canPlayType("application/vnd.apple.mpegurl")){if(F.ZP.isSupported()){var de=new F.ZP;de.loadSource(me.src),de.attachMedia(me)}}})};return(0,x.useEffect)(()=>{if(K.current&&Z&&Z.match(J)&&window.PR.prettyPrint(),K.current)return K.current.addEventListener("click",ne),()=>{var B;(B=K.current)==null||B.removeEventListener("click",ne),(0,ve.AL)(),(0,ve.Iy)()}},[Z,K.current,ne]),(0,x.useEffect)(()=>{var B;const j=me=>{me.preventDefault(),me.clipboardData.setData("text",window.getSelection().toString())};return(B=K.current)==null||B.addEventListener("copy",j),()=>{var me;(me=K.current)==null||me.removeEventListener("copy",j)}},[K.current]),x.createElement(x.Fragment,null,Te&&x.createElement("div",{ref:K},Z),!Te&&!qt(Z)&&x.createElement("div",{ref:K,style:k({},O),className:`${le||""} ${v?"disabled-fill":""} markdown-body ${Qt.current}`,dangerouslySetInnerHTML:{__html:Z}}),!Te&&qt(Z)&&x.createElement(g,{html:Z}),x.createElement(y.Z,{close:!0,data:qe,type:qe!=null&&qe.length?Ot:"",style:k({},Q),onClose:()=>ot("")}))}},75975:function(on,je,E){"use strict";E.d(je,{SV:function(){return P},ZP:function(){return $}});var x=E(59301),ae=E(76374);const ve={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},fe={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},F={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
`)}]},f={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join(`
|
|
`)}]},ue={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join(`
|
|
`)}]};var te=E(53184),o=E.n(te),y=Object.defineProperty,C=Object.defineProperties,h=Object.getOwnPropertyDescriptors,g=Object.getOwnPropertySymbols,_=Object.prototype.hasOwnProperty,S=Object.prototype.propertyIsEnumerable,L=(K,ne,M)=>ne in K?y(K,ne,{enumerable:!0,configurable:!0,writable:!0,value:M}):K[ne]=M,N=(K,ne)=>{for(var M in ne||(ne={}))_.call(ne,M)&&L(K,M,ne[M]);if(g)for(var M of g(ne))S.call(ne,M)&&L(K,M,ne[M]);return K},H=(K,ne)=>C(K,h(ne)),R=(K,ne,M)=>new Promise((B,j)=>{var me=Ee=>{try{Ae(M.next(Ee))}catch(Ce){j(Ce)}},de=Ee=>{try{Ae(M.throw(Ee))}catch(Ce){j(Ce)}},Ae=Ee=>Ee.done?B(Ee.value):Promise.resolve(Ee.value).then(me,de);Ae((M=M.apply(K,ne)).next())});const k={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},T=(K,ne)=>ne.map(M=>({label:M,kind:K.languages.CompletionItemKind.Keyword,insertText:M})),A=K=>Object.keys(k.tables).map(ne=>({label:ne,kind:K.languages.CompletionItemKind.Variable,insertText:ne})),J=(K,ne)=>{const M=k.tables[K];return M?M.map(B=>({label:B,kind:ne.languages.CompletionItemKind.Field,insertText:B})):[]};function ee(K,ne,M,B,j){let me=ne.getWordUntilPosition(M),de={startLineNumber:M.lineNumber,endLineNumber:M.lineNumber,startColumn:me.startColumn,endColumn:me.endColumn},Ae=B.map(Ee=>({label:Ee,kind:K.languages.CompletionItemKind.Keyword,insertText:Ee,insertTextRules:K.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:de}));return j.map(Ee=>{Ae.push(H(N({},Ee),{range:de}))}),Ae}var G=K=>{k.languages.map(j=>(K.languages.registerDocumentFormattingEditProvider(j,{provideDocumentFormattingEdits(me,de,Ae){return R(this,null,function*(){const Ee=o()(me.getValue(),{indent_size:"2",indent_char:" ",max_preserve_newlines:"2",preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:"0",indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1});return[{range:me.getFullModelRange(),text:Ee}]})}}),j));const ne=F.quickKey.map(j=>({label:j.label,kind:K.languages.CompletionItemKind.Method,insertText:j.content,insertTextRules:K.languages.CompletionItemInsertTextRule.InsertAsSnippet})),M=f.quickKey.map(j=>({label:j.label,kind:K.languages.CompletionItemKind.Method,insertText:j.content,insertTextRules:K.languages.CompletionItemInsertTextRule.InsertAsSnippet})),B=fe.quickKey.map(j=>({label:j.label,kind:K.languages.CompletionItemKind.Method,insertText:j.content,insertTextRules:K.languages.CompletionItemInsertTextRule.InsertAsSnippet}));K.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(j,me){var de=j.getWordUntilPosition(me),Ae={startLineNumber:me.lineNumber,endLineNumber:me.lineNumber,startColumn:de.startColumn,endColumn:de.endColumn},Ee=j.getLineContent(me.lineNumber).substring(de.startColumn-2,de.endColumn);return{suggestions:[...F.keywords.map(Ce=>({label:Ce,kind:K.languages.CompletionItemKind.Function,documentation:Ce,insertText:Ce,insertTextRules:K.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ae})),...F.quickKey.map(Ce=>({label:Ce.label,kind:K.languages.CompletionItemKind.Function,documentation:Ce.content,insertText:Ee.startsWith("#")?Ce.content.replace(/#/,""):Ce.content,insertTextRules:K.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ae}))]}}}),K.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(j,me){var de=j.getWordUntilPosition(me),Ae={startLineNumber:me.lineNumber,endLineNumber:me.lineNumber,startColumn:de.startColumn,endColumn:de.endColumn};return{suggestions:[...ve.keywords.map(Ee=>({label:Ee,kind:K.languages.CompletionItemKind.Function,documentation:Ee,insertText:Ee,insertTextRules:K.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ae}))]}}}),K.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(j,me){var de=j.getWordUntilPosition(me),Ae={startLineNumber:me.lineNumber,endLineNumber:me.lineNumber,startColumn:de.startColumn,endColumn:de.endColumn},Ee=j.getLineContent(me.lineNumber).substring(de.startColumn-2,de.endColumn);return{suggestions:[...fe.keywords.map(Ce=>({label:Ce,kind:K.languages.CompletionItemKind.Function,documentation:Ce,insertText:Ce,insertTextRules:K.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ae})),...fe.quickKey.map(Ce=>({label:Ce.label,kind:K.languages.CompletionItemKind.Function,documentation:Ce.content,insertText:Ee.startsWith("#")?Ce.content.replace(/#/,""):Ce.content,insertTextRules:K.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ae}))]}}}),K.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(j,me){var de=j.getWordUntilPosition(me),Ae={startLineNumber:me.lineNumber,endLineNumber:me.lineNumber,startColumn:de.startColumn,endColumn:de.endColumn},Ee=j.getLineContent(me.lineNumber).substring(de.startColumn-2,de.endColumn);return{suggestions:[...ue.keywords.map(Ce=>({label:Ce,kind:K.languages.CompletionItemKind.Function,documentation:Ce,insertText:Ce,insertTextRules:K.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ae})),...ue.quickKey.map(Ce=>({label:Ce.label,kind:K.languages.CompletionItemKind.Function,documentation:Ce.content,insertText:Ee.startsWith("#")?Ce.content.replace(/#/,""):Ce.content,insertTextRules:K.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ae}))]}}}),K.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(j,me){var de=j.getWordUntilPosition(me),Ae={startLineNumber:me.lineNumber,endLineNumber:me.lineNumber,startColumn:de.startColumn,endColumn:de.endColumn},Ee=j.getLineContent(me.lineNumber).substring(de.startColumn-2,de.endColumn);return{suggestions:[...f.keywords.map(Ce=>({label:Ce,kind:K.languages.CompletionItemKind.Function,documentation:Ce,insertText:Ce,insertTextRules:K.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ae})),...f.quickKey.map(Ce=>({label:Ce.label,kind:K.languages.CompletionItemKind.Function,documentation:Ce.content,insertText:Ee.startsWith("#")?Ce.content.replace(/#/,""):Ce.content,insertTextRules:K.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ae}))]}}})};const I="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var re=Object.defineProperty,le=(K,ne,M)=>ne in K?re(K,ne,{enumerable:!0,configurable:!0,writable:!0,value:M}):K[ne]=M,Te=(K,ne,M)=>le(K,typeof ne!="symbol"?ne+"":ne,M);const W=class pl{constructor(ne,M,B){this.placeholder=ne,this.editor=M,this.monaco=B,M.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return pl.ID}getDomNode(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};Te(W,"ID","editor.widget.placeholderHint");var Q=W,q=E(96236),ie=E(6767),V=E(25399),v=E(89392),m=E(49535),U=E(56102),se=Object.defineProperty,pe=Object.defineProperties,He=Object.getOwnPropertyDescriptors,qe=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,Ot=Object.prototype.propertyIsEnumerable,bt=(K,ne,M)=>ne in K?se(K,ne,{enumerable:!0,configurable:!0,writable:!0,value:M}):K[ne]=M,xe=(K,ne)=>{for(var M in ne||(ne={}))ot.call(ne,M)&&bt(K,M,ne[M]);if(qe)for(var M of qe(ne))Ot.call(ne,M)&&bt(K,M,ne[M]);return K},_t=(K,ne)=>pe(K,He(ne)),Qt=(K,ne)=>{var M={};for(var B in K)ot.call(K,B)&&ne.indexOf(B)<0&&(M[B]=K[B]);if(K!=null&&qe)for(var B of qe(K))ne.indexOf(B)<0&&Ot.call(K,B)&&(M[B]=K[B]);return M},Lt=(K,ne,M)=>new Promise((B,j)=>{var me=Ee=>{try{Ae(M.next(Ee))}catch(Ce){j(Ce)}},de=Ee=>{try{Ae(M.throw(Ee))}catch(Ce){j(Ce)}},Ae=Ee=>Ee.done?B(Ee.value):Promise.resolve(Ee.value).then(me,de);Ae((M=M.apply(K,ne)).next())});function qt(K){return/^\d+$/.test(K)?`${K}px`:K}function tt(){}let Re=!1;const ye={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function Z(K=[]){let ne=K;if(Array.isArray(K)){for(let M=0;M<K.length;M++){let B=ye[K[M]];if(B)return B}return ne[0]}return ye[ne]||ne}let we=null;const Le=()=>Lt(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(K){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",K)}});var $=K=>{var ne=K,{width:M="100%",height:B="100%",value:j,language:me="javascript",style:de={},options:Ae={},overrideServices:Ee={},theme:Ce="vs-dark",onEditBlur:Fe,isCopy:Be=!1,onSave:Ye,autoHeight:xt=!1,forbidCopy:lt=!1,onChange:nt=tt,editorDidMount:Ut=tt,onFocus:Vt=tt,onBreakPoint:Ct=tt,breakPointValue:Jt=[],filename:wn="educoder.txt",errorLine:Rt,errorContent:Yt="",highlightLine:Ne,openBreakPoint:ke=!1,placeholder:Pe="",showMiniMap:z=!0}=ne,oe=Qt(ne,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const he=(0,x.useRef)(),ce=(0,x.useRef)({}),be=(0,x.useRef)(),ze=(0,x.useRef)(),Ze=(0,x.useRef)([]),$e=(0,x.useRef)(!1),ft=(0,x.useRef)(),en=(0,x.useRef)(),an=(0,x.useRef)(!1),[yt,Gt]=(0,x.useState)(!1);function _n(){let Ve;return he.current&&(Ve=new ae.Z(Qe=>{for(let Tt of Qe)(Tt.target.offsetHeight>0||Tt.target.offsetWidth>0)&&ce.current.instance.layout()}),Ve.observe(he.current)),Ve}function Bn(){ie.ZP.warning({content:decodeURIComponent(I),key:"monaco-editor-tip"})}const cn=()=>{let Ve=ce.current.instance;if(j!=null&&Ve&&yt){const Qe=Ve.getModel();Qe&&j!==Qe.getValue()&&(Re=!0,Qe.setValue(j),Ve.layout(),Re=!1)}};(0,x.useEffect)(()=>{const Ve=m.Z.subscribe("formatDocument",Qe=>{var Tt;let Et=ce.current.instance;(Tt=Et==null?void 0:Et.getAction)==null||Tt.call(Et,"editor.action.formatDocument").run()});return window.updateMonacoValue=Qe=>{nt(Qe)},Ve},[]),(0,x.useEffect)(()=>{var Ve;let Qe=ce.current.instance;ze.current&&clearTimeout(ze.current),ze.current=setTimeout(()=>{cn()},500),j&&(j!=null&&j.length)&&((Ve=Qe==null?void 0:Qe.updateOptions)==null||Ve.call(Qe,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(j.split(/\r\n|\r|\n/g).length))+3,5)}))},[j,yt,ce.current]),(0,x.useEffect)(()=>{if(Rt&&ce.current&&ce.current.instance){let Qe=ce.current.instance;Qe.changeViewZones(function(Tt){var Et=document.createElement("div");Et.style.padding="10px 20px",Et.style.width="calc(100% - 20px)",Et.className="my-error-line-wrp",Et.innerHTML=Yt,Tt.addZone({afterLineNumber:Rt||11,heightInLines:3,domNode:Et})});var Ve={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};Qe.addOverlayWidget(Ve),Qe.revealPositionInCenter({lineNumber:20,column:1})}},[Rt,ce.current,yt]);const pn=(Ve="",Qe)=>{if(!Ve||Ve.trim()==="")return!0;const Et=ce.current.instance.getModel().getLineTokens(Qe);let Xt=!1;for(let ln=0;ln<2;ln++)Et.getStandardTokenType(ln)===1&&(Xt=!0);return Xt};(0,x.useEffect)(()=>{var Ve;const Qe=(Ve=ce.current)==null?void 0:Ve.instance;if(Qe&&yt&<){const Tt=Qe.onDidBlurEditorWidget(()=>{an.current=!1}),Et=Qe.onDidFocusEditorText(()=>{an.current=!0});return()=>{Tt.dispose(),Et.dispose()}}},[ce.current,yt,lt]),(0,x.useEffect)(()=>{var Ve;if((Ve=ce.current)!=null&&Ve.instance&&yt&&ke){let Qe=ce.current.instance,Tt=Qe.getModel();if(!Tt)return;(()=>{var wt;let Zt=[],$t=[];const jt=Tt.getAllDecorations();for(let un of jt)un.options.className==="highlighted-line"&&(Zt.push((wt=un==null?void 0:un.range)==null?void 0:wt.startLineNumber),$t.push(un==null?void 0:un.id));if(Ne===Zt[0])return;Tt.deltaDecorations($t,[]);const xn=Tt.getLineCount();Ne&&Ne<=xn&&(Qe.deltaDecorations([],[{range:new we.Range(Ne,1,Ne,Tt.getLineMaxColumn(Ne)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Qe.revealLineInCenter(Ne))})();const Xt=(wt=!1)=>{var Zt;let $t=[],jt=[];const xn=Tt.getAllDecorations();for(let un of xn)un.options.linesDecorationsClassName==="breakpoints-select"&&($t.push((Zt=un==null?void 0:un.range)==null?void 0:Zt.startLineNumber),jt.push(un==null?void 0:un.id));if(wt)return{lines:$t,ids:jt};Ct($t)},ln=wt=>Lt(void 0,null,function*(){let Zt={range:new we.Range(wt,1,wt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Tt.deltaDecorations([],[Zt]),Xt()}),nn=wt=>Lt(void 0,null,function*(){let Zt=[];const $t=Qe.getLineDecorations(wt);for(let jt of $t)jt.options.linesDecorationsClassName==="breakpoints-select"&&Zt.push(jt.id);yield Tt.deltaDecorations(Zt,[]),Xt()}),zt=wt=>{let Zt=Qe.getLineDecorations(wt);for(let $t of Zt)if($t.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,v.isEqual)(Jt,Xt(!0).lines)){Tt.deltaDecorations(Xt(!0).ids,[]);const wt=Jt.map(Zt=>({range:new we.Range(Zt,1,Zt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Tt.deltaDecorations([],wt)}const De=Qe.onDidChangeModelContent(wt=>{let Zt=Qe.getPosition();if(Zt){let $t=Zt.lineNumber;clearTimeout(en.current),en.current=setTimeout(()=>{pn(Tt.getLineContent($t),$t)?nn($t):zt($t)?(nn($t),ln($t)):Xt()},100)}}),Se=Qe.onMouseDown(wt=>{var Zt,$t,jt;if(wt.target.detail&&((jt=($t=(Zt=wt.target)==null?void 0:Zt.element)==null?void 0:$t.className)!=null&&jt.includes("line-numbers"))){let xn=wt.target.position.lineNumber;if(pn(Tt.getLineContent(xn),xn))return;zt(xn)?nn(xn):ln(xn)}}),et=wt=>{let Zt={range:new we.Range(wt,1,wt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Ze.current=Qe.deltaDecorations(Ze.current,[Zt])},rt=()=>{Ze.current=Qe.deltaDecorations(Ze.current,[])},It=Qe.onMouseMove(wt=>{var Zt,$t,jt;if(rt(),wt.target.detail&&((jt=($t=(Zt=wt.target)==null?void 0:Zt.element)==null?void 0:$t.className)!=null&&jt.includes("line-numbers"))){let xn=wt.target.position.lineNumber;if(pn(Tt.getLineContent(xn),xn))return;et(xn)}}),Nt=Qe.onMouseLeave(()=>{rt()});return()=>{De.dispose(),Se.dispose(),It.dispose(),Nt.dispose()}}},[ce.current,yt,Jt,Ne,ke,me]),(0,x.useEffect)(()=>{var Ve;(Ve=ce.current)!=null&&Ve.instance&&ke&&ce.current.instance.setPosition({lineNumber:0,column:0})},[Ne]);function Tn(){let Ve=ce.current.instance;if(Ve){const Qe=Ve.getSelection(),Tt=ce.current.pastePos||{},Et=new we.Range(Tt.startLineNumber||Qe.endLineNumber,Tt.startColumn||Qe.endColumn,Tt.endLineNumber||Qe.endLineNumber,Tt.endColumn||Qe.endColumn);setTimeout(()=>{Ve.executeEdits("",[{range:Et,text:""}])},300)}}function mn(Ve){(window.navigator.platform.match("Mac")?Ve.metaKey:Ve.ctrlKey)&&Ve.keyCode==83&&(Ve.preventDefault(),Ye())}const An=()=>{if(xt&&ce.current.instance){const Ve=ce.current.instance.getContentHeight();St(Ve<B?B:Ve)}else St(B)};function Ft(Ve){var Qe=document.createEvent("MouseEvents");Qe.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Ve.dispatchEvent(Qe)}const Wn=Ve=>{if(!an.current)return;const{keyCode:Qe,ctrlKey:Tt,metaKey:Et,target:Xt,type:ln}=Ve;return(ln==="paste"||(Qe===67||Qe===86)&&(Et||Tt))&&Xt.nodeName==="TEXTAREA"&&(Bn(),Ve.preventDefault()),!1};function Ue(Ve,Qe){var Tt=window.URL||window.webkitURL||window,Et=new Blob([Qe]),Xt=document.createElementNS("http://www.w3.org/1999/xhtml","a");Xt.href=Tt.createObjectURL(Et),Xt.download=Ve,Ft(Xt)}(0,x.useEffect)(()=>{An()},[An]),(0,x.useEffect)(()=>{he.current&&!yt&&Promise.all([E.e(8909),E.e(6656)]).then(E.bind(E,71448)).then(Ve=>{try{we=Ve,ce.current.instance=we.editor.create(he.current,{value:j,language:Z(me),theme:Ce,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:z||!1}},Ee);const Qe=ce.current.instance;let Xt=[...q.BH._menuItems].find(De=>De[0]._debugName=="EditorContext")[1],ln=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],nn=(De,Se)=>{var et,rt;let It=De._first;do Se.includes((rt=(et=It.element)==null?void 0:et.command)==null?void 0:rt.id)&&De._remove(It);while(It=It.next)};if(Ut(Qe,we),setTimeout(()=>{An(),ce.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Ue(wn||"educoder.txt",Qe.getValue())}})},500),ce.current.subscription=Qe.onDidChangeModelContent(De=>{$e.current?clearTimeout(ft.current):(An(),nt(Qe.getValue(),De)),ft.current=setTimeout(()=>{$e.current=!1},500)}),window.Monaco||G(we,Z(me)),lt&&(nn(Xt,ln),he.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Wn),window.removeEventListener("paste",Wn),window.addEventListener("keydown",Wn),window.addEventListener("paste",Wn)),window.Monaco=we,Fe&&Qe.onDidBlurEditorWidget(()=>{Fe(Qe.getValue())}),Vt&&Qe.onDidFocusEditorText(()=>{lt&&Le(),Vt(Qe.getValue())}),lt){Le();try{Qe.onDidPaste(De=>{const Se=Qe.getSelection(),et=ce.current.pastePos||{},rt=new we.Range(et.startLineNumber||Se.endLineNumber,et.startColumn||Se.endColumn,et.endLineNumber||Se.endLineNumber,et.endColumn||Se.endColumn);Qe.executeEdits("",[{range:De.range,text:""}])})}catch(De){}}let zt=_n();return Pe&&typeof Pe=="string"&&new Q(Pe,Qe,we),Gt(!0),()=>{const De=ce.current.instance;De.dispose();const Se=De.getModel();Se&&Se.dispose(),ce.current.subscription&&ce.current.subscription.dispose(),zt.unobserve(he.current)}}catch(Qe){}})},[]),(0,x.useEffect)(()=>{if(ce.current.instance&&yt)return document.addEventListener("keydown",mn,!1),()=>{document.removeEventListener("keydown",mn)}},[Ye,yt]),(0,x.useEffect)(()=>{let Ve=ce.current.instance;if(Ve&&yt){let Qe=Z(me);we.editor.setModelLanguage(Ve.getModel(),Qe)}},[me,yt]),(0,x.useEffect)(()=>{ce.current.instance&&yt&&we.editor.setTheme(Ce)},[Ce,yt]),(0,x.useEffect)(()=>{let Ve=ce.current.instance;be.current=Ae,Ve&&yt&&(Ve.updateOptions(xe({},Ae)),setTimeout(()=>{Ve.getModel().updateOptions(xe({},Ae))},200))},[JSON.stringify(Ae),yt]),(0,x.useEffect)(()=>{let Ve=ce.current.instance;Ve&&yt&&Ve.layout()},[M,B,yt]);const[Oe,Bt]=(0,x.useState)(qt(M)),[kt,St]=(0,x.useState)(qt(B)),fn=_t(xe({},de),{width:Oe,height:kt,position:"relative"});return x.createElement("div",{className:"my-monaco-editor",ref:he,style:fn},Be&&x.createElement(U.CopyToClipboard,{text:j,onCopy:()=>ie.ZP.success("\u590D\u5236\u6210\u529F")},x.createElement(V.Z,{title:"\u590D\u5236\u4EE3\u7801"},x.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},x.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function P({width:K="100%",height:ne="100%",original:M,modified:B,language:j,options:me={}}){const de=(0,x.useRef)(),[Ae,Ee]=(0,x.useState)(null);function Ce(xt){let lt;return de.current&&(lt=new ae.Z(nt=>{for(let Ut of nt)(Ut.target.offsetHeight>0||Ut.target.offsetWidth>0)&&xt.layout()}),lt.observe(de.current)),lt}(0,x.useEffect)(()=>(de.current&&Promise.all([E.e(8909),E.e(9404)]).then(E.bind(E,2550)).then(xt=>{we=xt;const lt=we.editor.createDiffEditor(de.current,_t(xe({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},me),{wordWrap:!0}));Ee(lt);let nt=Ce(lt);return()=>{lt.dispose();const Ut=lt.getModel();Ut&&Ut.dispose(),nt.unobserve(de.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,x.useEffect)(()=>{Ae&&Ae.setModel({original:we.editor.createModel(M,j),modified:we.editor.createModel(B,j)})},[M,B,j,Ae]);const Fe=qt(K),Be=qt(ne),Ye={width:Fe,height:Be};return x.createElement("div",{className:"my-diff-editor",ref:de,style:Ye})}},10661:function(on,je,E){"use strict";E.d(je,{Z:function(){return C}});var x={flex_box_center:"flex_box_center___AQ53o",flex_space_between:"flex_space_between___i2aIa",flex_box_vertical_center:"flex_box_vertical_center___sPEKB",flex_box_center_end:"flex_box_center_end___GhSSH",flex_box_column:"flex_box_column___R9_Hb",list:"list___jb2Ay",wrap:"wrap___VsQDr",lockWrap:"lockWrap___g1k1T",li:"li___IxCLC",cover:"cover___Mu8wr",img:"img___IpFLA",movebq:"movebq___mF7wt",bq:"bq___Bil0T",sign:"sign___DXJ4d",name:"name___l7FoJ",e:"e___pXQUG",unit:"unit___wCIFR",tags:"tags___w_Mil",tag1:"tag1___dxm7r",tag2:"tag2___llZkf"},ae=E(29787),ve=E(25399),fe=E(92310),F=E.n(fe),f=E(51257),ue=E(28426),te=E(48790),o=E(59301),C=({className:h,dataSource:g=[],col:_=4,right:S,bottom:L=23,precision:N=0,wrapWidth:H=1200,trackEventItems:R,loading:k,onRemove:T=()=>{},isCurrent:A=!0,showAlias:J=!1})=>{const ee=Math.floor((H-(_-1)*S)/_),G=[{name:"\u63A8\u8350\u81EA\u5B66",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png"},{name:"101\u8BA1\u5212",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png"},{name:"\u56FD\u5BB6\u4E00\u6D41",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png"},{name:"\u7701\u7EA7\u4E00\u6D41",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png"},{name:"\u7CBE\u54C1\u8BFE\u7A0B",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png"},{name:"\u519B\u961F\u4E00\u6D41",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png"},{name:"\u65B0\u578B\u6559\u6750",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png"}];return o.createElement(ae.Z,{spinning:k},o.createElement("div",{className:F()(x.list,h)},!!(g!=null&&g.length)&&(g==null?void 0:g.map((I,re)=>{var le;const{name:Te,id:W,identifier:O,featured:Q,school_name:q,image_url:ie,excellent:V,is_plan:v}=I;return o.createElement("div",{key:W,className:x.wrap,style:{width:ee,marginRight:(1+re)%_===0?0:S+N,marginBottom:L}},o.createElement("a",{className:x.li,onClick:m=>{m.preventDefault(),m.stopPropagation(),R&&(0,f.L9)([R]),(0,f.xg)(`/paths/${O}`)}},o.createElement("div",{className:x.img},o.createElement("img",{className:x.cover,src:`${ie}`}),A&&(0,te.bg)()&&(I==null?void 0:I.studying)&&o.createElement("div",{className:`${x.movebq} user-path-items`,onClick:m=>{m.stopPropagation(),T(I)}},o.createElement("i",{className:"iconfont icon-yichu1 mr5 c-red"}),o.createElement("span",{className:"c-red"},"\u79FB\u9664")),(le=I==null?void 0:I.subject_tags)==null?void 0:le.map((m,U)=>{var se,pe;if(U===0){const qe=(se=G.find(ot=>ot.name==m))==null?void 0:se.swimg;return o.createElement("img",{className:x.sign,src:qe,style:{left:"-4px"}})}const He=(pe=G.find(qe=>qe.name==m))==null?void 0:pe.ptimg;return o.createElement("img",{className:x.sign,src:He,style:{left:`${48+52*(U-1)+2*U}px`}})}),o.createElement("div",{style:{position:"absolute",top:"150px",left:"4px"}},(I==null?void 0:I.excellent)&&o.createElement("div",{className:x.bq},"\u5F00\u653E\u8BFE\u7A0B"))),o.createElement("div",{className:x.name},o.createElement(ve.Z,{title:J&&(I!=null&&I.excellent_alias_name)?o.createElement("span",null,`\u8BFE\u7A0B\u539F\u540D\uFF1A${Te}`,o.createElement("br",null),o.createElement("span",null,`\u8BFE\u7A0B\u522B\u540D\uFF1A${I==null?void 0:I.excellent_alias_name}`)):Te},o.createElement("span",{className:x.e},J&&(I==null?void 0:I.excellent_alias_name)||Te))),o.createElement(ve.Z,{title:`\u53D1\u5E03\u5355\u4F4D\uFF1A${q}`},o.createElement("div",{className:x.unit},o.createElement("i",{className:"iconfont icon-danwei1 font14 mr3"}),q)),o.createElement("div",{className:x.tags},o.createElement("div",null,o.createElement(ve.Z,{placement:"bottom",title:"\u7AE0\u8282\u6570"},o.createElement("span",null,o.createElement("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),o.createElement("span",null,I.stages_count))),o.createElement(ve.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},o.createElement("span",null,o.createElement("i",{className:"iconfont icon-chengyuan font14 mr3"}),o.createElement("span",null,I.members_count)))))))})),!g.length&&o.createElement(ue.Z,null)))}},9148:function(on,je,E){"use strict";E.d(je,{jL:function(){return F},w9:function(){return se},QD:function(){return Fe},cQ:function(){return ie.Z},op:function(){return j},O5:function(){return be},_b:function(){return Ut},t7:function(){return H},Gi:function(){return bt},YG:function(){return ot},qp:function(){return C},vr:function(){return xt},qE:function(){return Ae},Je:function(){return T},wb:function(){return q},cq:function(){return tt},tp:function(){return _}});var x=E(59301),ae={flex_box_center:"flex_box_center___NeSU8",flex_space_between:"flex_space_between___ImTGl",flex_box_vertical_center:"flex_box_vertical_center___BtRd9",flex_box_center_end:"flex_box_center_end___qcLe3",flex_box_column:"flex_box_column___Ze_3q",banner:"banner___PoUBO",content:"content___XoDjy",btns:"btns___Pb35j"},ve="data:image/png;base64,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",F=({dataSource:ze=[],img:Ze,imgWidth:$e=346,title:ft,sunTitle:en,bannerExtraContent:an})=>x.createElement("div",{className:ae.banner},x.createElement("div",{className:ae.content},x.createElement("aside",null,x.createElement("p",null,x.createElement("b",null,ft),x.createElement("span",null,en)),ze.length>0&&x.createElement("div",{className:ae.btns},ze.map((yt,Gt)=>x.createElement("div",{key:Gt,onClick:yt.click},yt.name,yt.sign?x.createElement("img",{src:ve,width:39}):null))),an),Ze&&x.createElement("img",{style:{marginTop:33,marginRight:38},src:Ze,width:$e}))),f={flex_box_center:"flex_box_center___hG6RI",flex_space_between:"flex_space_between___ss3Fh",flex_box_vertical_center:"flex_box_vertical_center___K80p9",flex_box_center_end:"flex_box_center_end___qmXX3",flex_box_column:"flex_box_column___GFV8F",row:"row___aXJjm",title:"title___HUKL0",tagsWrap:"tagsWrap___XB2W3",action:"action___VdHb1",bar:"bar___t1kKC",tag:"tag___V7Eft",name:"name___Hk1Ip",num:"num___xQpcH",active:"active___XryTX",tagsBorderWrap:"tagsBorderWrap___OMxjs"},ue=E(92310),te=E.n(ue),o=E(89392),C=({dataSource:ze=[],value:Ze,onChange:$e,onTitleChange:ft,className:en,title:an,titleWidth:yt=41,style:Gt={},fontColor:_n="#6A7283",showCount:Bn})=>{const[cn,pn]=(0,x.useState)(0),[Tn,mn]=(0,x.useState)(!1),An=(0,x.useRef)(null),Ft=(0,x.useRef)(null);return(0,x.useEffect)(()=>{var Wn;ze.length!==0&&(((Wn=An==null?void 0:An.current)==null?void 0:Wn.clientHeight)>97?pn(1):pn(0)),ze.length===0&&pn(0),mn(!1)},[ze]),x.createElement("div",{className:te()(f.row,en),style:Gt},x.createElement("div",{onClick:(0,o.throttle)(()=>ft==null?void 0:ft(),2e3),style:{width:yt,marginTop:Tn?12:4},className:`${f.title} ${ft?"current":""}`},an),x.createElement("div",{className:Tn?`${f.tagsWrap} ${f.tagsBorderWrap}`:f.tagsWrap},x.createElement("div",{className:f.bar,ref:Ft,style:cn>0?{height:cn===1?97:"auto",overflow:cn===1?"hidden":"auto",paddingRight:55}:{paddingRight:0}},x.createElement("div",{className:f.tag,ref:An},ze==null?void 0:ze.map(Wn=>x.createElement("span",{onClick:()=>$e(Wn.id),key:Wn.id,style:{color:_n},className:Ze===Wn.id?f.active:""},x.createElement("span",{title:Wn.name,className:f.name},Wn.name),!!Bn&&x.createElement("span",{className:f.num},Wn.count))))),!!cn&&x.createElement(x.Fragment,null,cn===1?x.createElement("div",{onClick:()=>{var Wn;pn(2),((Wn=An==null?void 0:An.current)==null?void 0:Wn.clientHeight)>245?mn(!0):mn(!1)},className:f.action},"\u5C55\u5F00",x.createElement("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})):x.createElement("div",{onClick:()=>{Ft.current.scrollTop=0,pn(1),mn(!1)},className:f.action},"\u6536\u8D77",x.createElement("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})))))},h={flex_box_center:"flex_box_center___aK2n3",flex_space_between:"flex_space_between___HX0Oh",flex_box_vertical_center:"flex_box_vertical_center___LJOJr",flex_box_center_end:"flex_box_center_end___SCakF",flex_box_column:"flex_box_column___AYv4m",tabs:"tabs___GTqPV",active:"active___F26E8"},_=({dataSource:ze=[],value:Ze,onChange:$e,className:ft,style:en={}})=>x.createElement("div",{style:en,className:te()(h.tabs,ft)},ze.map(an=>x.createElement("span",{onClick:()=>$e(an.id),className:Ze===an.id?h.active:"",key:an.id},an.name))),S={flex_box_center:"flex_box_center___yX6Oa",flex_space_between:"flex_space_between___t7oqF",flex_box_vertical_center:"flex_box_vertical_center___dEIHy",flex_box_center_end:"flex_box_center_end___taQDF",flex_box_column:"flex_box_column___xY_Lr",input:"input___PW2zI",dropdown:"dropdown___vSy8B",menu:"menu___NiyBu",text:"text___Grueu",b1:"b1___ZKryM",b2:"b2___aKyGa"},L=E(37568),H=({dataSource:ze=[],value:Ze="",onChange:$e,onInputChange:ft=()=>{},className:en,style:an={},placeholder:yt,allowClear:Gt=!1})=>{var _n;const[Bn,cn]=(0,x.useState)(""),[pn,Tn]=(0,x.useState)("");(0,x.useEffect)(()=>{var Ft;let Wn=Ze;(Ft=JSON.stringify(Ze))!=null&&Ft.includes("{")&&(cn(Ze.id),Wn=Ze.value||"");try{Tn(decodeURIComponent(Wn||""))}catch(Ue){Tn(decodeURIComponent(Wn||""))}},[Ze]);const mn=()=>{$e(encodeURIComponent(pn),Bn||null)},An=Ft=>{Ft!==Bn&&(cn(Ft),$e(encodeURIComponent(pn),Ft))};return x.createElement("div",{className:te()(S.input,en),style:an},!!ze.length&&x.createElement("div",{className:S.dropdown},x.createElement("div",{className:S.text},(_n=ze.find(Ft=>Ft.id===Bn))==null?void 0:_n.name,x.createElement("i",{className:"iconfont icon-zhankai4"}),x.createElement("b",{className:S.b1}),x.createElement("b",{className:S.b2})),x.createElement("div",{className:S.menu},ze.map((Ft,Wn)=>x.createElement("div",{key:Wn,onClick:()=>An(Ft.id)},Ft.name)))),x.createElement(L.default,{onPressEnter:mn,value:pn,onChange:Ft=>{Tn(Ft.target.value),ft(encodeURIComponent(Ft.target.value),Bn||null)},bordered:!1,placeholder:yt}),x.createElement("i",{onClick:mn,className:"iconfont icon-sousuo9 font14 pl10 current"}))},R={flex_box_center:"flex_box_center___tol8o",flex_space_between:"flex_space_between___Z235C",flex_box_vertical_center:"flex_box_vertical_center___Wq1sZ",flex_box_center_end:"flex_box_center_end___LLxom",flex_box_column:"flex_box_column___DbMSN",quickPager:"quickPager___GM30J",disabled:"disabled___Ozc8I"},T=({value:ze,onChange:Ze,className:$e,total:ft,pageSize:en,style:an={}})=>{const yt=ze<2,Gt=ze>=Math.ceil(ft/en);return ft<=en?x.createElement(x.Fragment,null):x.createElement("div",{className:te()(R.quickPager,$e),style:an},x.createElement("div",{onClick:()=>{yt||Ze(ze-1,"prev")},className:yt?R.disabled:""},"\u4E0A\u4E00\u9875"),x.createElement("div",{onClick:()=>{Gt||Ze(ze+1,"next")},className:Gt?R.disabled:""},"\u4E0B\u4E00\u9875"))},A={flex_box_center:"flex_box_center___FO7TP",flex_space_between:"flex_space_between___LotYx",flex_box_vertical_center:"flex_box_vertical_center___bWdaw",flex_box_center_end:"flex_box_center_end___mVJ1o",flex_box_column:"flex_box_column___M83Mm",list:"list___oOsiS",wrap:"wrap___G6T7F",lockWrap:"lockWrap___Rl79E",li:"li___oZZ7l",cover:"cover___b2bYW",img:"img___IQX7w",sign:"sign___HkT6C",name:"name___SsJx8",e:"e___TMqq0",tags:"tags___bcjyo",rate:"rate___YACg7"},J=E(29787),ee=E(25399),G=E(58018),I=E(346),re=E(51257),le=E(96908),Te=E(57177),W=E(81378),O=E(28426),q=({className:ze,dataSource:Ze=[],col:$e=4,right:ft,bottom:en=23,precision:an=0,wrapWidth:yt=1200,trackEventItems:Gt,loading:_n})=>{const Bn=Math.floor((yt-($e-1)*ft)/$e);return x.createElement(J.Z,{spinning:_n},x.createElement("div",{className:te()(A.list,ze)},!!Ze.length&&Ze.map((cn,pn)=>{const{name:Tn,id:mn,identifier:An,power:Ft,cover_image_id:Wn,pic:Ue}=cn;return x.createElement("div",{className:A.wrap,key:mn,style:{width:Bn,marginRight:(1+pn)%$e===0?0:ft+an,marginBottom:en}},x.createElement("a",{target:"_blank",href:`/shixuns/${An}/challenges`,className:A.li,onClick:Oe=>{Oe.preventDefault(),Gt&&(0,re.L9)([Gt]),Ft&&(0,re.xg)(`/shixuns/${An}/challenges`)}},x.createElement("div",{className:A.img},x.createElement("img",{className:A.cover,src:`${Ue}`}),cn.is_jupyter&&x.createElement("img",{className:A.sign,src:le}),cn.is_jupyter_lab&&x.createElement("img",{className:A.sign,src:Te}),cn.is_unity_3d&&x.createElement("img",{className:A.sign,src:W})),x.createElement("div",{className:A.name},x.createElement(ee.Z,{title:Tn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"},x.createElement("span",{className:A.e},Tn||"\u5B9E\u8DF5\u9879\u76EE\u540D\u79F0-\u672A\u586B\u5199"))),x.createElement("div",{className:A.tags},x.createElement(ee.Z,{placement:"bottom",title:"\u5173\u5361\u6570"},x.createElement("span",null,x.createElement("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),x.createElement("span",null,cn.challenges_count))),!!cn.myshixuns_count&&x.createElement(ee.Z,{placement:"bottom",title:"\u5B66\u4E60\u4EBA\u6570"},x.createElement("span",null,x.createElement("i",{className:"iconfont icon-chengyuan font14 mr2"}),x.createElement("span",null,cn.myshixuns_count))),x.createElement(ee.Z,{placement:"bottom",title:"\u96BE\u5EA6\u7B49\u7EA7"},x.createElement("span",null,x.createElement("span",null,cn.level))),x.createElement("div",{className:A.rate},x.createElement(G.Z,{allowHalf:!0,disabled:!0,defaultValue:cn.score_info}),x.createElement("span",null,"\xA0",cn.score_info?`${cn.score_info}\u5206`:"5\u5206")))),!Ft&&x.createElement("div",{className:A.lockWrap},x.createElement("img",{src:`${I.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),x.createElement("span",{className:"mt15 font16 c-white"},"\u5B9A\u5411\u5F00\u653E\u5185\u5BB9\uFF0C\u9700\u8981\u6388\u6743")))}),!Ze.length&&x.createElement(O.Z,null)))},ie=E(10661),V={flex_box_center:"flex_box_center___eMcr7",flex_space_between:"flex_space_between___HcNca",flex_box_vertical_center:"flex_box_vertical_center___ZnvVN",flex_box_center_end:"flex_box_center_end___fdgDf",flex_box_column:"flex_box_column___SEKvd",list:"list___L1hmU",wrap:"wrap___pKgcW",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},v="data:image/png;base64,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",m=E(59301),se=({className:ze,dataSource:Ze=[],col:$e=4,right:ft,bottom:en=23,precision:an=0,wrapWidth:yt=1200,trackEventItems:Gt,loading:_n,handleVery:Bn=()=>!0})=>{const cn=Math.floor((yt-($e-1)*ft)/$e);return m.createElement(J.Z,{spinning:_n},m.createElement("div",{className:te()(V.list,ze)},!!Ze.length&&Ze.map((pn,Tn)=>{const{subject_identifier:mn,id:An,identifier:Ft,power:Wn}=pn,Ue=pn.is_public!=0&&pn.is_public;return m.createElement("div",{className:V.wrap,key:An,style:{width:cn,marginRight:(1+Tn)%$e===0?0:ft+an,marginBottom:en}},m.createElement("a",{className:V.li,onClick:Oe=>{Oe.preventDefault(),Bn(pn==null?void 0:pn.first_category_url)&&(Gt&&(0,re.L9)([Gt]),(0,re.xg)(pn.first_category_url))}},m.createElement("div",{className:V.top},m.createElement(ee.Z,{title:pn.name},m.createElement("div",{className:V.name},pn.name)),m.createElement("img",{className:V.img,src:I.Z.IMG_SERVER+"/images/"+pn.avatar_url}),m.createElement("div",{className:V.text,title:pn.creator},pn.creator),mn&&m.createElement("div",{className:V.btns},m.createElement("div",null,"\u5F00\u653E\u8BFE\u7A0B"),m.createElement("aside",null,"\u5F00\u653E\u8BFE\u5802")),Ue&&m.createElement("div",{className:V.sign},"\u516C\u5F00")),m.createElement("div",{className:V.bottom},pn.visits>0&&m.createElement(ee.Z,{title:"\u8BBF\u95EE\u91CF",placement:"bottom"},m.createElement("span",null,m.createElement("i",{className:"iconfont icon-liulanyan"}),m.createElement("span",null,pn.visits))),pn.course_members_count>0&&m.createElement(ee.Z,{title:"\u6210\u5458",placement:"bottom"},m.createElement("span",null,m.createElement("i",{className:"iconfont icon-chengyuan"}),pn.course_members_count)),pn.tasks_count>0&&m.createElement(ee.Z,{title:"\u4F5C\u4E1A",placement:"bottom"},m.createElement("span",null,m.createElement("i",{className:"iconfont icon-zuoye"}),pn.tasks_count)),pn.is_end?m.createElement("div",{style:{color:"#6B758B"}},"\u5DF2\u7ED3\u675F"):m.createElement("div",{style:{color:"#00B187"}},"\u8FDB\u884C\u4E2D"))),!pn.is_accessible&&m.createElement("div",{className:V.lockWrap},m.createElement("img",{src:`${I.Z.IMG_SERVER}/images/educoder/icon/lockclose.svg`}),m.createElement("span",{className:"mt15 font16 c-white"},"\u975E\u8BFE\u5802\u6210\u5458\u4E0D\u53EF\u8FDB\u5165")))}),!Ze.length&&m.createElement(O.Z,null)))},pe={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},He=E(25690),ot=({dataSource:ze=[],value:Ze,onChange:$e,className:ft,style:en={},tabBarExtraContent:an})=>x.createElement("div",{className:te()(pe.tabs,ft),style:en},x.createElement("div",{className:pe.tabsWrap},ze.map((yt,Gt)=>!(yt!=null&&yt.hide)&&x.createElement("aside",{className:pe.tab,onClick:()=>{$e(yt.id),yt.link&&He.history.push(yt.link)},key:Gt},x.createElement("div",{className:Ze===yt.id?pe.active:""},yt.name),(yt==null?void 0:yt.resetCount)==null&&(yt==null?void 0:yt.total)!==void 0&&x.createElement("span",null,"\uFF08",yt==null?void 0:yt.total,"\uFF09"),(yt==null?void 0:yt.resetCount)!==void 0&&(yt==null?void 0:yt.total)!==void 0&&x.createElement(ee.Z,{title:(yt==null?void 0:yt.tip)!=null?yt==null?void 0:yt.tip:""},x.createElement("span",{style:{color:"#9096A3"}},"\uFF08",x.createElement("span",{style:{color:"#000"}},yt==null?void 0:yt.resetCount),"/",x.createElement("span",null,yt==null?void 0:yt.total),"\uFF09"))))),x.createElement("div",{className:pe.tabBar},an)),bt=({className:ze,style:Ze={},children:$e})=>x.createElement("div",{className:te()(ze),style:Ze},$e),xe={flex_box_center:"flex_box_center___e6HxQ",flex_space_between:"flex_space_between___RnXYe",flex_box_vertical_center:"flex_box_vertical_center___lVxPk",flex_box_center_end:"flex_box_center_end___bu8yv",flex_box_column:"flex_box_column___JczGj",orderWrap:"orderWrap___ZfyGX",orderIconWrap:"orderIconWrap___XTB_O",orderAsc:"orderAsc___KWHmA",orderDesc:"orderDesc___rHdbB",active:"active___a7eSP",cursorPointer:"cursorPointer___gs9kL",orderTextWrap:"orderTextWrap___teAKn"},_t=E(75727),Qt=E(93041);const Lt=[{id:"updated_at",name:"\u6700\u65B0\u52A8\u6001"},{id:"created_at",name:"\u6700\u65B0\u521B\u5EFA"},{id:"name",name:"\u540D\u79F0\u6392\u5E8F"}];var tt=({sortValue:ze,dropValue:Ze,className:$e,onSort:ft,onDrop:en,dataSource:an=Lt})=>{var yt;return x.createElement("div",{className:te()(xe.orderWrap,$e)},x.createElement(_t.Z,{dropdownRender:()=>x.createElement(Qt.default,null,an.map((Gt,_n)=>x.createElement(Qt.default.Item,{key:_n,onClick:()=>en(Gt.id)},Gt.name)))},x.createElement("span",{className:xe.orderTextWrap},(yt=an.find(Gt=>Ze===Gt.id))==null?void 0:yt.name)),x.createElement("span",{className:xe.orderIconWrap},x.createElement("span",{className:xe.orderAsc},x.createElement("i",{className:ze==="asc"?`iconfont icon-sanjiaoxing-up font12 ${xe.cursorPointer} ${xe.active}`:`iconfont icon-sanjiaoxing-up font12 ${xe.cursorPointer}`,onClick:()=>ft(ze==="asc"?"desc":"asc")})),x.createElement("span",{className:xe.orderDesc},x.createElement("i",{className:ze==="desc"?`iconfont icon-sanjiaoxing-down font12 ${xe.cursorPointer} ${xe.active}`:`iconfont icon-sanjiaoxing-down font12 ${xe.cursorPointer}`,onClick:()=>ft(ze==="asc"?"desc":"asc")}))))},Re={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},ye=E(99571),Z=Object.defineProperty,we=Object.getOwnPropertySymbols,Le=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable,P=(ze,Ze,$e)=>Ze in ze?Z(ze,Ze,{enumerable:!0,configurable:!0,writable:!0,value:$e}):ze[Ze]=$e,K=(ze,Ze)=>{for(var $e in Ze||(Ze={}))Le.call(Ze,$e)&&P(ze,$e,Ze[$e]);if(we)for(var $e of we(Ze))$.call(Ze,$e)&&P(ze,$e,Ze[$e]);return ze},ne=(ze,Ze)=>{var $e={};for(var ft in ze)Le.call(ze,ft)&&Ze.indexOf(ft)<0&&($e[ft]=ze[ft]);if(ze!=null&&we)for(var ft of we(ze))Ze.indexOf(ft)<0&&$.call(ze,ft)&&($e[ft]=ze[ft]);return $e},M=(ze,Ze,$e)=>new Promise((ft,en)=>{var an=_n=>{try{Gt($e.next(_n))}catch(Bn){en(Bn)}},yt=_n=>{try{Gt($e.throw(_n))}catch(Bn){en(Bn)}},Gt=_n=>_n.done?ft(_n.value):Promise.resolve(_n.value).then(an,yt);Gt(($e=$e.apply(ze,Ze)).next())}),j=ze=>{var Ze=ze,{className:$e,style:ft,children:en,loading:an=!1,openLoading:yt,onClick:Gt=()=>{},size:_n="middle",shape:Bn="round"}=Ze,cn=ne(Ze,["className","style","children","loading","openLoading","onClick","size","shape"]);const[pn,Tn]=(0,x.useState)(!1);return x.createElement(ye.ZP,K({onClick:(0,o.throttle)(mn=>M(void 0,null,function*(){yt&&Tn(!0);try{yield Gt(mn)}catch(An){console.log("error",An)}yt&&Tn(!1)}),2e3,{leading:!0,trailing:!1}),className:te()(Re.btn,Re[`${_n}-${Bn}`],$e),style:ft,size:_n,shape:Bn,loading:pn||an},cn),en)},me={flex_box_center:"flex_box_center___TB7bQ",flex_space_between:"flex_space_between___oBlTb",flex_box_vertical_center:"flex_box_vertical_center___b5XbB",flex_box_center_end:"flex_box_center_end___CNhe7",flex_box_column:"flex_box_column___yHXKW",head:"head___ghH72",node:"node___mjPEy"},Ae=({className:ze,style:Ze,children:$e=null,onClick:ft,title:en})=>x.createElement("div",{className:te()(me.head,ze),style:Ze},x.createElement("span",{className:"primary-hover",onClick:ft},x.createElement("i",{className:"iconfont icon-fanhui2 font12"}),"\u8FD4\u56DE"),x.createElement("b",{title:en},en),x.createElement("div",{className:me.node},$e)),Ee={flex_box_center:"flex_box_center___AlHuF",flex_space_between:"flex_space_between___vN2LW",flex_box_vertical_center:"flex_box_vertical_center___Ac7D2",flex_box_center_end:"flex_box_center_end___y38I7",flex_box_column:"flex_box_column___iQE6P",btns:"btns___sNgTb",confirm:"confirm___Ozirl",cancel:"cancel___aiq1I"},Fe=({confirmShow:ze=!0,confirmTitle:Ze,confirmClick:$e,cancelShow:ft=!0,cancelTitle:en,cancelClick:an,className:yt,style:Gt,confirmLoading:_n=!1})=>x.createElement("div",{className:te()(Ee.btns,yt),style:Gt},ze&&x.createElement(ye.ZP,{loading:_n,onClick:$e,type:"primary",className:Ee.confirm},Ze),ft&&x.createElement(ye.ZP,{onClick:an,className:Ee.cancel},en)),Be={flex_box_center:"flex_box_center___jkpdr",flex_space_between:"flex_space_between___OtsL8",flex_box_vertical_center:"flex_box_vertical_center___rbcb_",flex_box_center_end:"flex_box_center_end___zBR21",flex_box_column:"flex_box_column___nS_eP",fixedBottom:"fixedBottom___oJl7m",wrap:"wrap___A3Oq1",center:"center____VL1y"},xt=({className:ze,style:Ze={},LeftContent:$e,children:ft,RightContent:en})=>x.createElement("div",{className:te()(Be.fixedBottom,ze),style:Ze},x.createElement("div",{className:Be.wrap},x.createElement("div",{className:Be.left},$e),x.createElement("div",{className:Be.center},ft),x.createElement("div",{className:Be.right},en))),lt={flex_box_center:"flex_box_center___tY8Yn",flex_space_between:"flex_space_between___vHdYA",flex_box_vertical_center:"flex_box_vertical_center___pa61F",flex_box_center_end:"flex_box_center_end___HyDXt",flex_box_column:"flex_box_column___UjZek",crumbs:"crumbs___V41Oe",hover:"hover___bEIVd"},Ut=({className:ze,style:Ze={},dataSource:$e=[]})=>x.createElement("div",{className:te()(lt.crumbs,ze),style:Ze},$e.map((ft,en)=>en<$e.length-1?x.createElement(x.Fragment,{key:en},ft.path||ft.onClick?x.createElement("span",{className:lt.hover,onClick:ft!=null&&ft.onClick?ft.onClick:()=>He.history.push(ft.path)},ft.name):x.createElement("span",null,ft.name),x.createElement("span",null,"\xA0",">","\xA0")):x.createElement("span",{key:en,style:{color:"#5F6368"}},ft.name))),Vt=E(11938),Ct=Object.defineProperty,Jt=Object.defineProperties,wn=Object.getOwnPropertyDescriptors,Rt=Object.getOwnPropertySymbols,Yt=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable,ke=(ze,Ze,$e)=>Ze in ze?Ct(ze,Ze,{enumerable:!0,configurable:!0,writable:!0,value:$e}):ze[Ze]=$e,Pe=(ze,Ze)=>{for(var $e in Ze||(Ze={}))Yt.call(Ze,$e)&&ke(ze,$e,Ze[$e]);if(Rt)for(var $e of Rt(Ze))Ne.call(Ze,$e)&&ke(ze,$e,Ze[$e]);return ze},z=(ze,Ze)=>Jt(ze,wn(Ze)),oe=(ze,Ze)=>{var $e={};for(var ft in ze)Yt.call(ze,ft)&&Ze.indexOf(ft)<0&&($e[ft]=ze[ft]);if(ze!=null&&Rt)for(var ft of Rt(ze))Ze.indexOf(ft)<0&&Ne.call(ze,ft)&&($e[ft]=ze[ft]);return $e};const{Countdown:he}=Vt.default;var be=ze=>{var Ze=ze,{onChange:$e}=Ze,ft=oe(Ze,["onChange"]);const[en,an]=(0,x.useState)(null);(0,x.useEffect)(()=>{typeof en=="number"&&en>=0&&$e(en)},[en]);const yt=Gt=>{const _n=Math.floor(Gt/1e3);an(_n)};return x.createElement(he,z(Pe({},ft),{onChange:yt}))}},31533:function(on,je,E){"use strict";E.r(je),E.d(je,{default:function(){return K}});var x=E(25690),ae=E(59301),ve=E(91882),fe=E(27812),F=E(51257),f=E(28284),ue=E(62957),te=E(6767),o=E(60840),y=E(37568),C=E(77019),h=E(5269),g=E(47889),_=E(54172),S=E(9148),L=E(42441),N=E(80119),H=E(61186),R=E.n(H),k=E(33656),T=E.n(k),A=E(32162),J=E(81705),ee=E(45937),G=E(81722),I=E(59301),re=Object.defineProperty,le=Object.defineProperties,Te=Object.getOwnPropertyDescriptors,W=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,Q=Object.prototype.propertyIsEnumerable,q=(ne,M,B)=>M in ne?re(ne,M,{enumerable:!0,configurable:!0,writable:!0,value:B}):ne[M]=B,ie=(ne,M)=>{for(var B in M||(M={}))O.call(M,B)&&q(ne,B,M[B]);if(W)for(var B of W(M))Q.call(M,B)&&q(ne,B,M[B]);return ne},V=(ne,M)=>le(ne,Te(M)),v=(ne,M,B)=>new Promise((j,me)=>{var de=Ce=>{try{Ee(B.next(Ce))}catch(Fe){me(Fe)}},Ae=Ce=>{try{Ee(B.throw(Ce))}catch(Fe){me(Fe)}},Ee=Ce=>Ce.done?j(Ce.value):Promise.resolve(Ce.value).then(de,Ae);Ee((B=B.apply(ne,M)).next())});R().extend(T());const m=({exercise:ne,dispatch:M})=>{var B,j,me,de,Ae,Ee,Ce,Fe,Be,Ye,xt,lt,nt,Ut,Vt,Ct,Jt,wn,Rt,Yt,Ne,ke,Pe,z,oe,he,ce,be,ze,Ze,$e,ft,en,an,yt,Gt,_n,Bn;const cn=(0,x.useParams)(),[pn]=(0,x.useSearchParams)(),Tn=Number(pn.get("template")),mn=pn.get("exam_summary_id")&&Number(pn.get("exam_summary_id")),[An]=f.default.useForm(),{SumupDetail:Ft={}}=ne,[Wn,Ue]=ue.default.useModal(),[,,Oe]=(0,ee.U)(G.p7,{}),[,Bt,kt]=(0,ee.U)(G.zP,{}),St=(...Ve)=>v(void 0,[...Ve],function*(Qe={},Tt){const Et=Wn.confirm({title:"\u63D0\u793A",centered:!0,icon:null,content:"\u5927\u6A21\u578B\u751F\u6210\u7684\u5206\u6790\u5185\u5BB9\u4E0D\u4E00\u5B9A\u5B8C\u5168\u7B26\u5408\u60A8\u7684\u5206\u6790\u9884\u671F\uFF0C\u60A8\u53EF\u4EE5\u5728\u5927\u6A21\u578B\u751F\u6210\u7684\u5185\u5BB9\u57FA\u7840\u4E0A\u8FDB\u884C\u8C03\u6574\u3002\u786E\u5B9A\u4F7F\u7528\u5927\u6A21\u578B\u751F\u6210\u5206\u6790\u5417\uFF1F",onOk:()=>v(void 0,null,function*(){var Xt;const ln=yield Oe(Qe);(ln==null?void 0:ln.status)===0&&(te.ZP.success("\u5206\u6790\u6210\u529F"),An.setFieldValue(Tt,(Xt=ln==null?void 0:ln.data)==null?void 0:Xt.text),Et.destroy())})})}),fn=()=>{x.history.push(`/classrooms/${cn==null?void 0:cn.coursesId}/exercise/${cn==null?void 0:cn.exerciseId}/sumup?${pn.toString()}`)};return(0,ae.useEffect)(()=>{Ft&&An.setFieldsValue(ie({},Ft))},[]),I.createElement("section",{className:"bg-white pt40 pb-64px pr30 pl30 flex flex-col item-center"},Ue,I.createElement("div",{className:"font30 mb40 ",style:{fontWeight:600}},Ft==null?void 0:Ft.big_title),I.createElement(o.ZP,{theme:{components:{Form:{labelColor:"#666666"},Table:{headerBg:" rgba(48,97,208,0.1)",borderColor:"transparent"}}}},I.createElement(f.default,{className:"w-full",form:An,colon:!1,onFinish:Ve=>v(void 0,null,function*(){(yield kt(V(ie({},Ve),{id:(cn==null?void 0:cn.categoryId)||(cn==null?void 0:cn.exerciseId),exam_summary_template_id:Tn,exam_summary_id:mn}))).status===0&&(te.ZP.success("\u4FDD\u5B58\u6210\u529F"),fn())})},I.createElement(f.default.Item,{label:"\u8BFE\u7A0B\u540D\u79F0",name:"course_list_name"},I.createElement(y.default,{placeholder:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u540D\u79F0"})),I.createElement(f.default.Item,{label:"\u8BFE\u7A0B\u7F16\u53F7",name:"course_number"},I.createElement(y.default,{placeholder:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u7F16\u53F7",maxLength:60,showCount:!0})),I.createElement(f.default.Item,{label:"\u5F00\u8BFE\u5355\u4F4D",name:"school_name"},I.createElement(y.default,{placeholder:"\u8BF7\u8F93\u5165\u5F00\u8BFE\u5355\u4F4D"})),I.createElement(f.default.Item,{label:"\u8003\u6838\u5BF9\u8C61",name:"course_group_names"}," ",Ft==null?void 0:Ft.course_group_names),I.createElement(f.default.Item,{label:"\u8003\u8BD5\u65E5\u671F",name:"exercise_start_time"}," ",R()(Ft==null?void 0:Ft.exercise_start_time).format("YYYY\u5E74MM\u6708DD\u65E5")),I.createElement(f.default.Item,{label:"\u8003\u8BD5\u5F00\u59CB-\u7ED3\u675F\u65F6\u95F4"}," ",Ft==null?void 0:Ft.exercise_time_slot),I.createElement(C.Z,{align:"middle",gutter:40},I.createElement(h.Z,null,I.createElement(f.default.Item,{label:"\u5E94\u8003\u8BD5\u4EBA\u6570",name:"candidate_num"}," ",Ft==null?void 0:Ft.candidate_num)),I.createElement(h.Z,null,I.createElement(f.default.Item,{label:"\u5B9E\u8003\u4EBA\u6570",name:"exam_num"}," ",Ft==null?void 0:Ft.exam_num))),I.createElement(f.default.Item,{label:"\u662F\u5426\u8003\u6559\u5206\u79BB",name:"is_split_exam_teaching"},I.createElement(g.ZP.Group,{options:[{value:!0,label:"\u662F"},{value:!1,label:"\u5426"}]})),I.createElement(f.default.Item,{label:"\u547D\u9898\u5F62\u5F0F",name:"set_problem_mode"},I.createElement(g.ZP.Group,{options:[{value:A.gW.PROBLEM,label:"\u8BD5\u9898\u5E93"},{value:A.gW.PAPER,label:"\u8BD5\u5377\u5E93"},{value:A.gW.OTHER,label:"\u5176\u4ED6"}]})),I.createElement(f.default.Item,{label:"\u9605\u5377\u5F62\u5F0F",name:"review_paper_mode"},I.createElement(g.ZP.Group,{options:[{value:A.a2.SINGLE,label:"\u5355\u4EBA\u9605\u5377"},{value:A.a2.MULTIPLEFLOW,label:"\u591A\u4EBA\u6D41\u6C34\u4F5C\u4E1A\u9605\u5377"},{value:A.a2.MULTIPLEFIXED,label:"\u591A\u4EBA\u72EC\u7ACB\u9605\u5377"},{value:A.a2.OTHER,label:"\u5176\u4ED6"}]})),I.createElement("div",{className:"w-full pt20",style:{borderTop:"1px solid #EBEBEB"}},I.createElement("div",{className:"text-500 c-black mb10"},"\u8BD5\u9898\u7C7B\u578B\u53CA\u5176\u5206\u6570\u6BD4\u5217\uFF1A"),I.createElement("div",{className:"flex flex-col gap-10px font14 mt10 p20",style:{background:"#f9f9f9"}},I.createElement(f.default.Item,{className:"mb0",name:["exercise_questions_info","content"]},I.createElement(y.default,null)),I.createElement(f.default.Item,{hidden:!0,name:["exercise_questions_info","exercise_questions"]}),(j=(B=Ft==null?void 0:Ft.exercise_questions_info)==null?void 0:B.exercise_questions)==null?void 0:j.map((Ve,Qe)=>I.createElement("div",{key:Qe},Qe+1,"\u3001",Ve==null?void 0:Ve.name,Ve==null?void 0:Ve.count,"\u9053\uFF0C\u5171",Ve==null?void 0:Ve.score,"\u5206\uFF0C\u5360",Math.round((Ve==null?void 0:Ve.rate)*1e4)/100,"%")))),I.createElement("div",{className:"w-full pt20 mt20",style:{borderTop:"1px solid #EBEBEB"}},I.createElement("div",{className:"text-500 c-black"},"\u8BD5\u5377\u5185\u5BB9\u5206\u6790\uFF1A"),I.createElement("div",{className:"mt10 p20",style:{paddingBottom:1,background:"#f6f7f9"}},I.createElement(f.default.Item,{name:["content_analysis","coverage"],label:I.createElement("div",{className:"w-56px",style:{textAlignLast:"justify"}},"\u8986\u76D6\u9762")},I.createElement(g.ZP.Group,{options:[{value:"wide",label:"\u5BBD"},{value:"medium",label:"\u4E2D"},{value:"narrow",label:"\u7A84"}]})),I.createElement(f.default.Item,{name:["content_analysis","difficulty"],label:I.createElement("div",{className:"w-56px",style:{textAlignLast:"justify"}},"\u96BE\u5EA6")},I.createElement(g.ZP.Group,{options:[{value:1,label:"\u96BE"},{value:2,label:"\u8F83\u96BE"},{value:3,label:"\u4E2D"},{value:4,label:"\u8F83\u6613"},{value:5,label:"\u8F83\u6613"}]})),I.createElement(f.default.Item,{name:["content_analysis","question_quantity"],label:I.createElement("div",{className:"w-56px",style:{textAlignLast:"justify"}},"\u9898\u91CF")},I.createElement(g.ZP.Group,{options:[{value:1,label:">100"},{value:2,label:"70-100"},{value:3,label:"50-70"},{value:4,label:"<50"}]})),I.createElement(f.default.Item,{name:["content_analysis","is_wrong"],label:I.createElement("div",{className:"w-56px",style:{textAlignLast:"justify"}},I.createElement("span",null,"\u6709\u65E0\u9519\u8BEF"))},I.createElement(g.ZP.Group,{options:[{value:!0,label:"\u6709"},{value:!1,label:"\u65E0"}]})))),I.createElement("div",{className:"w-full pt20 mt20",style:{borderTop:"1px solid #EBEBEB"}},I.createElement("div",{className:"text-500 c-black"},"\u8003\u8BD5\u7EC4\u7EC7\u60C5\u51B5\uFF1A"),I.createElement("div",{className:"mt10 p20",style:{paddingBottom:1,background:"#f6f7f9"}},I.createElement(f.default.Item,{label:"\u7EC4\u7EC7\u5F62\u5F0F",name:["organization_condition","organization_mode"]},I.createElement(y.default,{placeholder:"\u8BF7\u8F93\u5165\u7EC4\u7EC7\u5F62\u5F0F"})),I.createElement(f.default.Item,{label:"\u8003\u8BD5\u6279\u6B21",name:["organization_condition","exam_count"]},I.createElement(y.default,{placeholder:"\u8BF7\u8F93\u5165\u8003\u8BD5\u6279\u6B21"})),I.createElement(f.default.Item,{label:"\u8003\u8BD5\u5F62\u5F0F",name:["organization_condition","exam_mode"]},I.createElement(y.default,{placeholder:"\u8BF7\u8F93\u5165\u8003\u8BD5\u5F62\u5F0F"})),I.createElement(f.default.Item,{label:"\u8003\u8BD5\u7CFB\u7EDF",name:["organization_condition","exam_system"]},I.createElement(y.default,{placeholder:"\u8BF7\u8F93\u5165\u8003\u8BD5\u7CFB\u7EDF"})),I.createElement(f.default.Item,{label:"\u662F\u5426\u5F00\u5377",name:["organization_condition","is_open_exercise"]},I.createElement(g.ZP.Group,{options:[{value:!1,label:"\u95ED\u5377\uFF0C\u4E0D\u5141\u8BB8\u643A\u5E26\u7EB8\u8D28\u6750\u6599\u548C\u4EFB\u4F55\u7535\u5B50\u8BBE\u5907"},{value:!0,label:"\u5F00\u5377\uFF0C\u5141\u8BB8\u643A\u5E26\u7EB8\u8D28\u8D44\u6599\uFF0C\u4F46\u4E0D\u5141\u8BB8\u643A\u5E26\u4EFB\u4F55\u7535\u5B50\u8BBE\u5907"}]})),I.createElement(f.default.Item,{label:"\u662F\u5426\u4E3A\u5355\u4E00\u8BD5\u5377",name:["organization_condition","is_single_exercise"]},I.createElement(y.default,{placeholder:"\u8BF7\u8F93\u5165\u662F\u5426\u4E3A\u5355\u4E00\u8BD5\u5377"})),I.createElement(f.default.Item,{name:["organization_condition","end_examine"]},I.createElement(y.default.TextArea,{rows:4})))),I.createElement("div",{className:"w-full pt20 mt20",style:{borderTop:"1px solid #EBEBEB"}},I.createElement("div",{className:"text-500 c-black"},"\u8003\u6838\u6210\u7EE9\u5206\u5E03\uFF1A"),I.createElement("div",{className:"mt10",style:{background:"#F6F7F9"}},I.createElement("div",{className:"p20",style:{background:"rgba(48,97,208,0.1)"}},I.createElement("table",{className:"w-full"},I.createElement("tr",null,[{label:"\u6700\u9AD8",children:`${((me=Ft==null?void 0:Ft.score_distribution)==null?void 0:me.max_score)||0}\u5206`},{label:"\u6700\u4F4E",children:`${((de=Ft==null?void 0:Ft.score_distribution)==null?void 0:de.min_score)||0}\u5206`},{label:"\u5E73\u5747",children:`${((Ae=Ft==null?void 0:Ft.score_distribution)==null?void 0:Ae.average_score)||0}\u5206`},{label:"\u53CA\u683C\u7387",children:`${Math.round((((Ee=Ft==null?void 0:Ft.score_distribution)==null?void 0:Ee.rate)||0)*1e4)/100}%`}].map((Ve,Qe)=>I.createElement("td",{key:Qe,width:Qe!==3&&250},I.createElement("span",{className:"c-grey-666"},Ve.label),I.createElement("span",{className:"ml10"},Ve==null?void 0:Ve.children)))))),I.createElement("div",{className:"flex flex-col p20"},I.createElement("table",null,[{lv:"\u7B49\u7EA7",num:"\u4EBA\u6570",scale:"\u6BD4\u4F8B"},{lv:`\u4F18\u79C0\uFF08${(Fe=(Ce=Ft==null?void 0:Ft.score_distribution)==null?void 0:Ce.best)==null?void 0:Fe.score_area}\u5206\uFF09`,num:(Ye=(Be=Ft==null?void 0:Ft.score_distribution)==null?void 0:Be.best)==null?void 0:Ye.people_count,scale:`${Math.round(((lt=(xt=Ft==null?void 0:Ft.score_distribution)==null?void 0:xt.best)==null?void 0:lt.rate)*1e4)/100}%`},{lv:`\u826F\u597D\uFF08${(Ut=(nt=Ft==null?void 0:Ft.score_distribution)==null?void 0:nt.good)==null?void 0:Ut.score_area}\u5206\uFF09`,num:(Ct=(Vt=Ft==null?void 0:Ft.score_distribution)==null?void 0:Vt.good)==null?void 0:Ct.people_count,scale:`${Math.round(((wn=(Jt=Ft==null?void 0:Ft.score_distribution)==null?void 0:Jt.good)==null?void 0:wn.rate)*1e4)/100}%`},{lv:`\u4E2D\u7B49\uFF08${(Yt=(Rt=Ft==null?void 0:Ft.score_distribution)==null?void 0:Rt.middle)==null?void 0:Yt.score_area}\u5206\uFF09`,num:(ke=(Ne=Ft==null?void 0:Ft.score_distribution)==null?void 0:Ne.middle)==null?void 0:ke.people_count,scale:`${Math.round(((z=(Pe=Ft==null?void 0:Ft.score_distribution)==null?void 0:Pe.middle)==null?void 0:z.rate)*1e4)/100}%`},{lv:`\u53CA\u683C\uFF08${(he=(oe=Ft==null?void 0:Ft.score_distribution)==null?void 0:oe.pass)==null?void 0:he.score_area}\u5206\uFF09`,num:(be=(ce=Ft==null?void 0:Ft.score_distribution)==null?void 0:ce.pass)==null?void 0:be.people_count,scale:`${Math.round(((Ze=(ze=Ft==null?void 0:Ft.score_distribution)==null?void 0:ze.pass)==null?void 0:Ze.rate)*1e4)/100}%`},{lv:`\u4E0D\u53CA\u683C\uFF08${(ft=($e=Ft==null?void 0:Ft.score_distribution)==null?void 0:$e.fails)==null?void 0:ft.score_area}\u5206\uFF09`,num:(an=(en=Ft==null?void 0:Ft.score_distribution)==null?void 0:en.fails)==null?void 0:an.people_count,scale:`${Math.round(((Gt=(yt=Ft==null?void 0:Ft.score_distribution)==null?void 0:yt.fails)==null?void 0:Gt.rate)*1e4)/100}%`}].map((Ve,Qe)=>I.createElement("tr",{key:Qe,className:`${Qe===0?"c-grey-666":""}`},I.createElement("td",{width:250},Ve.lv),I.createElement("td",{width:250},Ve.num),I.createElement("td",null,Ve.scale))))))),I.createElement("div",{className:"w-full pt20",style:{borderTop:"1px solid #EBEBEB"}},I.createElement("div",{className:"text-500 c-black"},"\u5404\u7C7B\u9898\u578B\u5B66\u751F\u7B54\u9898\u60C5\u51B5\u5206\u6790\uFF1A"),I.createElement("div",{className:"mt10 p20",style:{background:"#f6f7f9"}},I.createElement(f.default.List,{name:["answer_analysis","exercise_questions"]},(Ve,{add:Qe,remove:Tt})=>I.createElement("div",{className:"flex flex-col gap-20px"},Ve.map((Et,Xt)=>I.createElement("div",{key:Et.key},I.createElement(N.Z,{form:An,index:Xt+1,field:Et,ParentName:["answer_analysis","exercise_questions"]}))))),I.createElement("div",{className:"flex item-center justify-between mt10 mb10"},I.createElement("div",null,"\u7B54\u9898\u60C5\u51B5\u603B\u7ED3"),I.createElement(S.op,{style:{borderRadius:"4px"},onClick:()=>{var Ve;St({exam_summary_type:1,content:(Ve=Ft==null?void 0:Ft.answer_analysis)==null?void 0:Ve.content_params},["answer_analysis","question_analysis"])}},"\u5927\u6A21\u578B\u751F\u6210\u5206\u6790")),I.createElement(f.default.Item,{name:["answer_analysis","question_analysis"]},I.createElement(y.default.TextArea,{rows:6})))),I.createElement("div",{className:"w-full pt20",style:{borderTop:"1px solid #EBEBEB"}},I.createElement("div",{className:"text-500 c-black"},"\u5B66\u751F\u8003\u8BD5\u6210\u7EE9\u53CA\u5B66\u4E60\u60C5\u51B5\u5206\u6790\uFF1A"),I.createElement("div",{className:"mt10 p10",style:{background:"#f6f7f9"}},I.createElement("div",{className:"p10 ",style:{background:"rgba(48,97,208,0.1)"}},(_n=Ft==null?void 0:Ft.condition_analysis)==null?void 0:_n.content),I.createElement("div",{className:"mt20 pl10 pr10"},I.createElement("div",{className:"mb10"},"\u7EC8\u7ED3\u6027\u8003\u6838\u6210\u7EE9\u5206\u5E03\u56FE"),I.createElement(L.Z,{className:"bg-white",option:(()=>{var Ve,Qe;const Tt=[],Et=[];return(Qe=(Ve=Ft==null?void 0:Ft.condition_analysis)==null?void 0:Ve.chart_1)==null||Qe.forEach(Xt=>{Tt.push(Xt==null?void 0:Xt.x_axis),Et.push(Math.round((Xt==null?void 0:Xt.y_axis)*1e4)/100)}),{tooltip:{},grid:{left:"7%",right:"5%",bottom:"15%",top:"15%"},xAxis:{type:"category",data:[...Tt||[],"\u5F97\u5206"],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},yAxis:{name:"\u6BD4\u4F8B",nameTextStyle:{color:"#666"},type:"value",splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},series:[{data:Et,barWidth:"40px",itemStyle:{color:"#A2BEFF",borderColor:"#165DFF"},type:"bar"}]}})()})),I.createElement("div",{className:"mt20 pl10 pr10"},I.createElement("div",null,"\u5404\u4E2A\u4E13\u4E1A\u73ED\u7EA7\u7684\u60C5\u51B5\u5BF9\u6BD4\u8868"),I.createElement("div",{className:"bg-white mt10 p20",style:{border:"1px solid #EBEBEB"}},I.createElement(_.default,{dataSource:((Bn=Ft==null?void 0:Ft.condition_analysis)==null?void 0:Bn.chart_2)||[],columns:[{title:"\u4E13\u4E1A",dataIndex:"exercise_group_name",align:"center"},{title:"\u4EBA\u6570",dataIndex:"exercise_group_students",align:"center"},{title:"\u5E73\u5747\u5206",dataIndex:"average_score",align:"center"},{title:"\u6700\u9AD8\u5206",dataIndex:"max_score",align:"center"},{title:"\u6700\u4F4E\u5206",dataIndex:"min_score",align:"center"}],pagination:!1,bordered:!0}))),I.createElement("div",{className:"mt20 flex item-center justify-between pl10 pr10 pb10"},I.createElement("div",null,"\u5B66\u4E60\u60C5\u51B5\u603B\u7ED3"),I.createElement(S.op,{style:{borderRadius:"4px"},onClick:()=>{var Ve;St({exam_summary_type:2,content:(Ve=Ft==null?void 0:Ft.condition_analysis)==null?void 0:Ve.content_params},["condition_analysis","student_condition_analysis"])}},"\u5927\u6A21\u578B\u751F\u6210\u5206\u6790")),I.createElement(f.default.Item,{className:"pl10 pr10",name:["condition_analysis","student_condition_analysis"]},I.createElement(y.default.TextArea,{rows:6})))),I.createElement("div",{className:"w-full pt20",style:{borderTop:"1px solid #EBEBEB"}},I.createElement("div",{className:"flex item-center justify-between mb10"},I.createElement("div",{className:"c-black text-500"},"\u5B58\u5728\u7684\u95EE\u9898\u53CA\u6539\u8FDB\u610F\u89C1\uFF1A"),I.createElement(S.op,{style:{borderRadius:"4px"},onClick:()=>{var Ve;St({exam_summary_type:3,content:(Ve=Ft==null?void 0:Ft.suggestion)==null?void 0:Ve.content_params},["suggestion","suggestion_content"])}},"\u5927\u6A21\u578B\u751F\u6210\u5206\u6790")),I.createElement("div",{className:"mt10 p20",style:{background:"#f6f7f9"}},I.createElement(f.default.Item,{name:["suggestion","suggestion_content"]},I.createElement(y.default.TextArea,{rows:6})))))),I.createElement(J.t,{okText:"\u4FDD\u5B58",okButtonProps:{loading:Bt},onCancel:()=>{fn()},onOk:()=>{An.submit()}}))};var U=(0,x.connect)(({exercise:ne})=>({exercise:ne}))(m),se=E(76902),pe=E(59301),He=Object.defineProperty,qe=Object.defineProperties,ot=Object.getOwnPropertyDescriptors,Ot=Object.getOwnPropertySymbols,bt=Object.prototype.hasOwnProperty,xe=Object.prototype.propertyIsEnumerable,_t=(ne,M,B)=>M in ne?He(ne,M,{enumerable:!0,configurable:!0,writable:!0,value:B}):ne[M]=B,Qt=(ne,M)=>{for(var B in M||(M={}))bt.call(M,B)&&_t(ne,B,M[B]);if(Ot)for(var B of Ot(M))xe.call(M,B)&&_t(ne,B,M[B]);return ne},Lt=(ne,M)=>qe(ne,ot(M)),qt=(ne,M,B)=>new Promise((j,me)=>{var de=Ce=>{try{Ee(B.next(Ce))}catch(Fe){me(Fe)}},Ae=Ce=>{try{Ee(B.throw(Ce))}catch(Fe){me(Fe)}},Ee=Ce=>Ce.done?j(Ce.value):Promise.resolve(Ce.value).then(de,Ae);Ee((B=B.apply(ne,M)).next())});const tt=({items:ne,labelClassName:M,labelStyle:B})=>pe.createElement("div",{className:"flex flex-col text-start gap-8px"},ne==null?void 0:ne.map((j,me)=>pe.createElement("div",{key:me,className:"flex gap-20px"},j.label&&pe.createElement("div",{className:`w-56px c-grey-666 ${M||""} ${(j==null?void 0:j.labelClassName)||""}`,style:Qt(Qt({textAlignLast:"justify",lineHeight:"28px"},B||{}),(j==null?void 0:j.labelStyle)||{})},j.label),(j==null?void 0:j.children)&&pe.createElement("div",null,j==null?void 0:j.children)))),Re=({data:ne=[],ylabel:M="",xlabel:B="",className:j="",itemStyle:me={},formatter:de="{c}%"})=>{const Ae=(0,ae.useMemo)(()=>{const Ee=[],Ce=[];return ne==null||ne.forEach(Fe=>{Ee.push(Fe==null?void 0:Fe.x_axis),Ce.push(Fe==null?void 0:Fe.y_axis)}),{tooltip:{},grid:{left:"5%",right:"5%",bottom:"7%",top:"20%",containLabel:!0},xAxis:{type:"category",data:[...Ee||[],B],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666",interval:0}},yAxis:{name:M,nameTextStyle:{color:"#666",padding:[0,0,10,0]},type:"value",splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},series:[{data:Ce,barMaxWidth:"40px",itemStyle:Qt({color:"#A2BEFF",borderColor:"#165DFF"},me),type:"bar",label:{color:"#666",show:!0,position:"top",valueAnimation:!0,formatter:de}}]}},[ne]);return pe.createElement(L.Z,{className:j,option:Ae})},ye=({form:ne,index:M=1,field:B,ParentName:j=[],handleModules:me})=>{var de,Ae,Ee;(typeof j=="string"||typeof j=="number")&&(j=[j]);const Ce=f.default.useWatch([...j,B.name],{form:ne,preserve:!0});return pe.createElement(pe.Fragment,null,pe.createElement("div",{className:"text-500 c-black mb10 "},M,"\u3001",Ce==null?void 0:Ce.name),pe.createElement(tt,{items:(de=Ce==null?void 0:Ce.items)==null?void 0:de.map((Fe,Be)=>{var Ye,xt;return{label:`\u7B2C${Be+1}\u9898`,labelClassName:"w-auto",children:pe.createElement(pe.Fragment,null,pe.createElement(se.Z,{className:"font14 c-grey-333 text-start",value:(Fe==null?void 0:Fe.question_title)||""}),((Ye=Fe==null?void 0:Fe.tag_discipline_names)==null?void 0:Ye.length)>0&&pe.createElement("div",null,"\u8003\u70B9\uFF1A",(xt=Fe==null?void 0:Fe.tag_discipline_names)==null?void 0:xt.join("\u3001")))}})}),pe.createElement("div",{className:"text-500 c-black mb10 mt20"},"\u7EC8\u7ED3\u6027\u8003\u6838\u6210\u7EE9\u5206\u5E03\u56FE"),pe.createElement(Re,{className:"bg-white",data:(Ae=Ce==null?void 0:Ce.chart_1)==null?void 0:Ae.map((Fe={},Be)=>Lt(Qt({},Fe),{x_axis:Be+1,y_axis:Math.round(Fe.y_axis*1e4)/100})),ylabel:"\u6B63\u786E\u7387",xlabel:"\u9898\u76EE"}),pe.createElement(Re,{className:"mt10 bg-white",data:(Ee=Ce==null?void 0:Ce.chart_2)==null?void 0:Ee.map((Fe={},Be)=>Lt(Qt({},Fe),{x_axis:Be+1,y_axis:Math.round(Fe.y_axis*1e4)/100})),ylabel:"\u5F97\u5206\u7387",xlabel:"\u9898\u76EE",itemStyle:{color:"#2EC25B",borderColor:"#2EC25B"}}),pe.createElement("div",{className:"text-500 c-black mb10 mt20"},"\u5177\u4F53\u5F97\u5206\u660E\u7EC6\u5982\u4E0B\u8868\u6240\u793A"),pe.createElement("div",{className:"bg-white p20 mb20"},pe.createElement(_.default,{pagination:!1,dataSource:(Ce==null?void 0:Ce.chart_3)||[],bordered:!0,columns:[{title:"\u5E8F\u53F7",dataIndex:"question_number",align:"center"},{title:"\u7B54\u9898\u4EBA\u6570",dataIndex:"answer_users_count",align:"center"},{title:"0\u5206",dataIndex:"zero_score_number",align:"center"},{title:"\u90E8\u5206\u6B63\u786E\u4EBA\u6570",dataIndex:"part_score_number",align:"center"},{title:"\u6EE1\u5206\u4EBA\u6570",children:[{title:"\u4EBA\u6570",dataIndex:"full_score_number",align:"center"},{title:"\u5360\u6BD4",dataIndex:"full_score_rate",align:"center",render:Fe=>`${Math.round(Fe*1e4)/100}%`}]},{title:"\u5E73\u5747\u5206",dataIndex:"average_score",align:"center"}]})),pe.createElement("div",{className:"flex item-center justify-between mt10 mb10"},pe.createElement("div",null,"\u5C0F\u9898\u603B\u7ED3\u5206\u6790"),pe.createElement(S.op,{style:{borderRadius:"4px"},onClick:()=>{me({exam_summary_type:1,content:Ce==null?void 0:Ce.content_params},[...j,B.name,"question_type_conent"])}},"\u5927\u6A21\u578B\u751F\u6210\u5206\u6790")),pe.createElement(f.default.Item,{className:"mb0",name:[B.name,"question_type_conent"]},pe.createElement(y.default.TextArea,{rows:6})))},Z=({exercise:ne,dispatch:M})=>{var B,j,me,de,Ae,Ee,Ce,Fe,Be,Ye,xt,lt,nt,Ut,Vt,Ct,Jt,wn,Rt,Yt,Ne,ke,Pe,z,oe,he,ce,be,ze,Ze,$e,ft,en,an,yt,Gt,_n,Bn,cn,pn,Tn,mn,An,Ft,Wn,Ue,Oe,Bt,kt,St,fn,Ve,Qe,Tt,Et;const Xt=(0,x.useParams)(),[ln]=(0,x.useSearchParams)(),nn=Number(ln.get("template")),zt=ln.get("exam_summary_id")&&Number(ln.get("exam_summary_id")),[De]=f.default.useForm(),{SumupDetail:Se={}}=ne,[et,rt]=ue.default.useModal(),[,,It]=(0,ee.U)(G.p7,{}),[,Nt,wt]=(0,ee.U)(G.zP,{}),Zt=(...jt)=>qt(void 0,[...jt],function*(xn={},un){const Cn=et.confirm({title:"\u63D0\u793A",centered:!0,icon:null,content:"\u5927\u6A21\u578B\u751F\u6210\u7684\u5206\u6790\u5185\u5BB9\u4E0D\u4E00\u5B9A\u5B8C\u5168\u7B26\u5408\u60A8\u7684\u5206\u6790\u9884\u671F\uFF0C\u60A8\u53EF\u4EE5\u5728\u5927\u6A21\u578B\u751F\u6210\u7684\u5185\u5BB9\u57FA\u7840\u4E0A\u8FDB\u884C\u8C03\u6574\u3002\u786E\u5B9A\u4F7F\u7528\u5927\u6A21\u578B\u751F\u6210\u5206\u6790\u5417\uFF1F",onOk:()=>qt(void 0,null,function*(){var Un;const Nn=yield It(xn);(Nn==null?void 0:Nn.status)===0&&(te.ZP.success("\u5206\u6790\u6210\u529F"),De.setFieldValue(un,(Un=Nn==null?void 0:Nn.data)==null?void 0:Un.text),Cn.destroy())})})}),$t=()=>{x.history.push(`/classrooms/${Xt==null?void 0:Xt.coursesId}/exercise/${Xt==null?void 0:Xt.exerciseId}/sumup?${ln.toString()}`)};return(0,ae.useEffect)(()=>{Se&&De.setFieldsValue(Qt({},Se))},[]),pe.createElement("section",{className:"bg-white pt40 pb40 pr30 pl30 flex flex-col item-center"},rt,pe.createElement("div",{className:"font30 mb40 ",style:{fontWeight:600}},Se==null?void 0:Se.big_title),pe.createElement(o.ZP,{theme:{components:{Form:{labelColor:"#666666"},Table:{borderColor:"transparent"}}}},pe.createElement(f.default,{className:"w-full",size:"large",form:De,colon:!1,onFinish:jt=>qt(void 0,null,function*(){(yield wt(Lt(Qt({},jt),{id:(Xt==null?void 0:Xt.categoryId)||(Xt==null?void 0:Xt.exerciseId),exam_summary_template_id:nn,exam_summary_id:zt}))).status===0&&(te.ZP.success("\u4FDD\u5B58\u6210\u529F"),$t())})},pe.createElement(f.default.Item,{label:"\u6559\u5B66\u5B66\u671F",name:"teaching_semester"},pe.createElement(y.default,{placeholder:"\u8BF7\u8F93\u6559\u5B66\u5B66\u671F"})),pe.createElement(f.default.Item,{label:"\u8BFE\u7A0B\u540D\u79F0",name:"course_list_name"},pe.createElement(y.default,{placeholder:"\u8BF7\u8F93\u5165\u8BFE\u7A0B\u540D\u79F0"})),pe.createElement(f.default.Item,{label:"\u6559\u5B66\u73ED\u7EA7",name:"course_group_names"}," ",Se==null?void 0:Se.course_group_names),pe.createElement(f.default.Item,{label:"\u4EFB\u8BFE\u6559\u5E08",name:"exercise_creator"},pe.createElement(y.default,{placeholder:"\u8BF7\u8F93\u5165\u4EFB\u8BFE\u6559\u5E08"})),pe.createElement(f.default.Item,{label:"\u8003\u8BD5\u65B9\u5F0F",name:"exercise_type_number"},pe.createElement(g.ZP.Group,{options:[{value:A.k.BISHI,label:"\u7B14\u8BD5"},{value:A.k.JISHI,label:"\u673A\u8BD5"},{value:A.k.KOUSHI,label:"\u53E3\u8BD5"},{value:A.k.OTHER,label:"\u5176\u4ED6"}]})),pe.createElement("div",{className:"w-full pt20 mt20",style:{borderTop:"1px solid #EBEBEB"}},pe.createElement("div",{className:"text-500 c-black"},"\u8003\u6838\u6210\u7EE9\u5206\u5E03\uFF1A"),pe.createElement("div",{className:"mt10",style:{background:"#F6F7F9"}},pe.createElement("div",{className:"p20",style:{background:"rgba(48,97,208,0.1)"}},pe.createElement("table",{className:"w-full"},pe.createElement("tr",null,[{label:"\u6700\u9AD8",children:`${((B=Se==null?void 0:Se.score_distribution)==null?void 0:B.max_score)||0}\u5206`},{label:"\u6700\u4F4E",children:`${((j=Se==null?void 0:Se.score_distribution)==null?void 0:j.min_score)||0}\u5206`},{label:"\u5E73\u5747",children:`${((me=Se==null?void 0:Se.score_distribution)==null?void 0:me.average_score)||0}\u5206`},{label:"\u53CA\u683C\u7387",children:`${Math.round((((de=Se==null?void 0:Se.score_distribution)==null?void 0:de.rate)||0)*1e4)/100}%`}].map((jt,xn)=>pe.createElement("td",{key:xn,width:xn!==3&&250},pe.createElement("span",{className:"c-grey-666"},jt.label),pe.createElement("span",{className:"ml10"},jt==null?void 0:jt.children)))))),pe.createElement("div",{className:"flex flex-col p20"},pe.createElement("table",null,[{lv:"\u7B49\u7EA7",num:"\u4EBA\u6570",scale:"\u6BD4\u4F8B"},{lv:`\u4F18\u79C0\uFF08${(Ee=(Ae=Se==null?void 0:Se.score_distribution)==null?void 0:Ae.best)==null?void 0:Ee.score_area}\u5206\uFF09`,num:(Fe=(Ce=Se==null?void 0:Se.score_distribution)==null?void 0:Ce.best)==null?void 0:Fe.people_count,scale:`${Math.round(((Ye=(Be=Se==null?void 0:Se.score_distribution)==null?void 0:Be.best)==null?void 0:Ye.rate)*1e4)/100}%`},{lv:`\u826F\u597D\uFF08${(lt=(xt=Se==null?void 0:Se.score_distribution)==null?void 0:xt.good)==null?void 0:lt.score_area}\u5206\uFF09`,num:(Ut=(nt=Se==null?void 0:Se.score_distribution)==null?void 0:nt.good)==null?void 0:Ut.people_count,scale:`${Math.round(((Ct=(Vt=Se==null?void 0:Se.score_distribution)==null?void 0:Vt.good)==null?void 0:Ct.rate)*1e4)/100}%`},{lv:`\u4E2D\u7B49\uFF08${(wn=(Jt=Se==null?void 0:Se.score_distribution)==null?void 0:Jt.middle)==null?void 0:wn.score_area}\u5206\uFF09`,num:(Yt=(Rt=Se==null?void 0:Se.score_distribution)==null?void 0:Rt.middle)==null?void 0:Yt.people_count,scale:`${Math.round(((ke=(Ne=Se==null?void 0:Se.score_distribution)==null?void 0:Ne.middle)==null?void 0:ke.rate)*1e4)/100}%`},{lv:`\u53CA\u683C\uFF08${(z=(Pe=Se==null?void 0:Se.score_distribution)==null?void 0:Pe.pass)==null?void 0:z.score_area}\u5206\uFF09`,num:(he=(oe=Se==null?void 0:Se.score_distribution)==null?void 0:oe.pass)==null?void 0:he.people_count,scale:`${Math.round(((be=(ce=Se==null?void 0:Se.score_distribution)==null?void 0:ce.pass)==null?void 0:be.rate)*1e4)/100}%`},{lv:`\u4E0D\u53CA\u683C\uFF08${(Ze=(ze=Se==null?void 0:Se.score_distribution)==null?void 0:ze.fails)==null?void 0:Ze.score_area}\u5206\uFF09`,num:(ft=($e=Se==null?void 0:Se.score_distribution)==null?void 0:$e.fails)==null?void 0:ft.people_count,scale:`${Math.round(((an=(en=Se==null?void 0:Se.score_distribution)==null?void 0:en.fails)==null?void 0:an.rate)*1e4)/100}%`}].map((jt,xn)=>pe.createElement("tr",{key:xn,className:`${xn===0?"c-grey-666":""}`},pe.createElement("td",{width:250},jt.lv),pe.createElement("td",{width:250},jt.num),pe.createElement("td",null,jt.scale))))),pe.createElement("div",{className:"p20",style:{paddingTop:0}},pe.createElement(Re,{className:"bg-white",data:[{x_axis:`<=${(Gt=(yt=Se==null?void 0:Se.score_distribution)==null?void 0:yt.fails)==null?void 0:Gt.score_area}`,y_axis:((Bn=(_n=Se==null?void 0:Se.score_distribution)==null?void 0:_n.fails)==null?void 0:Bn.people_count)||0},{x_axis:`${(pn=(cn=Se==null?void 0:Se.score_distribution)==null?void 0:cn.pass)==null?void 0:pn.score_area}`,y_axis:((mn=(Tn=Se==null?void 0:Se.score_distribution)==null?void 0:Tn.pass)==null?void 0:mn.people_count)||0},{x_axis:`${(Ft=(An=Se==null?void 0:Se.score_distribution)==null?void 0:An.middle)==null?void 0:Ft.score_area}`,y_axis:((Ue=(Wn=Se==null?void 0:Se.score_distribution)==null?void 0:Wn.middle)==null?void 0:Ue.people_count)||0},{x_axis:`${(Bt=(Oe=Se==null?void 0:Se.score_distribution)==null?void 0:Oe.good)==null?void 0:Bt.score_area}`,y_axis:((St=(kt=Se==null?void 0:Se.score_distribution)==null?void 0:kt.good)==null?void 0:St.people_count)||0},{x_axis:`${(Ve=(fn=Se==null?void 0:Se.score_distribution)==null?void 0:fn.best)==null?void 0:Ve.score_area}`,y_axis:((Tt=(Qe=Se==null?void 0:Se.score_distribution)==null?void 0:Qe.best)==null?void 0:Tt.people_count)||0}],ylabel:"\u4EBA\u6570\uFF08\u5355\u4F4D\uFF1A\u4EBA\uFF09",xlabel:"\u5206\u6570\u533A\u95F4",formatter:"{c}"})))),pe.createElement("div",{className:"w-full pt20 mt20",style:{borderTop:"1px solid #EBEBEB"}},pe.createElement("div",{className:"text-500 c-black"},"\u8BD5\u5377\uFF08\u6216\u8003\u6838\uFF09\u60C5\u51B5\u5206\u6790\uFF1A"),pe.createElement("div",{className:"mt10 p20",style:{background:"#f6f7f9"}},pe.createElement("div",{className:"mb10"},((Et=Se==null?void 0:Se.exercise_questions_info)==null?void 0:Et.exercise_questions_str)||""),pe.createElement(f.default.Item,{name:["exercise_questions_info","exercise_content"]},pe.createElement(y.default.TextArea,{rows:4})),pe.createElement(f.default.List,{name:["exercise_questions_info","exercise_questions"]},(jt,{add:xn,remove:un})=>pe.createElement("div",{className:"flex flex-col gap-20px"},jt.map((Cn,Un)=>pe.createElement("div",{key:Cn.key},pe.createElement(ye,{form:De,index:Un+1,field:Cn,ParentName:["exercise_questions_info","exercise_questions"],handleModules:Zt}))))),pe.createElement("div",{className:"flex item-center mt10 mb10 justify-between"},pe.createElement("div",null,"\u8003\u6838\u60C5\u51B5\u603B\u7ED3"),pe.createElement(S.op,{style:{borderRadius:"4px"},onClick:()=>{var jt;Zt({exam_summary_type:1,content:(jt=Se==null?void 0:Se.condition_analysis)==null?void 0:jt.content_params},["condition_analysis","student_condition_analysis"])}},"\u5927\u6A21\u578B\u751F\u6210\u5206\u6790")),pe.createElement(f.default.Item,{name:["condition_analysis","student_condition_analysis"]},pe.createElement(y.default.TextArea,{rows:6})))),pe.createElement("div",{className:"w-full pt20 mt20",style:{borderTop:"1px solid #EBEBEB"}},pe.createElement("div",{className:"flex item-center justify-between mb10"},pe.createElement("div",{className:"c-black text-500"},"\u5B58\u5728\u7684\u95EE\u9898\u53CA\u6539\u8FDB\u610F\u89C1\uFF1A"),pe.createElement(S.op,{style:{borderRadius:"4px"},onClick:()=>{var jt;Zt({exam_summary_type:3,content:(jt=Se==null?void 0:Se.suggestion)==null?void 0:jt.content_params},["suggestion","suggestion_content"])}},"\u5927\u6A21\u578B\u751F\u6210\u5206\u6790")),pe.createElement("div",{className:"mt10 p20",style:{background:"#f6f7f9"}},pe.createElement(f.default.Item,{name:["suggestion","suggestion_content"]},pe.createElement(y.default.TextArea,{rows:6})))))),pe.createElement(J.t,{okText:"\u4FDD\u5B58",onCancel:()=>{$t()},okButtonProps:{loading:Nt},onOk:()=>{De.submit()}}))};var we=(0,x.connect)(({exercise:ne})=>({exercise:ne}))(Z),Le=E(59301),$=(ne,M,B)=>new Promise((j,me)=>{var de=Ce=>{try{Ee(B.next(Ce))}catch(Fe){me(Fe)}},Ae=Ce=>{try{Ee(B.throw(Ce))}catch(Fe){me(Fe)}},Ee=Ce=>Ce.done?j(Ce.value):Promise.resolve(Ce.value).then(de,Ae);Ee((B=B.apply(ne,M)).next())});const P=({user:ne,loading:M,globalSetting:B,classroomList:j,exercise:me,dispatch:de})=>{var Ae;const Ee=(0,x.useParams)(),[Ce]=(0,x.useSearchParams)(),Fe=Number(Ce.get("template")),{userInfo:Be}=ne,{commonHeader:Ye}=me,[xt,lt]=(0,ae.useState)(1),nt=()=>$(void 0,null,function*(){de({type:"exercise/getCommonHeader",payload:{categoryId:Ee==null?void 0:Ee.exerciseId}})});return(0,ae.useEffect)(()=>{Fe&<(Fe||1),nt()},[Ce]),(0,ae.useEffect)(()=>(de({type:"globalSetting/footerToggle",payload:!1}),()=>{de({type:"globalSetting/footerToggle",payload:!0})}),[]),Le.createElement("section",{className:"edu-container"},Le.createElement(ve.Z,{className:"mt10",separator:">",items:[{title:(Ae=Be==null?void 0:Be.course)==null?void 0:Ae.course_name,href:`/classrooms/${Ee.coursesId}/exercise`},{title:"\u5728\u7EBF\u8003\u8BD5",href:`/classrooms/${Ee.coursesId}/exercise`},{title:"\u8BD5\u5377\u8BE6\u60C5",href:`/classrooms/${Ee.coursesId}/exercise/${Ee==null?void 0:Ee.exerciseId}/detail`},{title:Ye==null?void 0:Ye.exercise_name}]}),Le.createElement("div",{className:"flex mt20 justify-between"},Le.createElement("div",{className:"flex item-center"},Le.createElement("a",{href:`/classrooms/${Ee.coursesId}/exercise/${Ee==null?void 0:Ee.exerciseId}/detail`},Le.createElement(fe.Z,{className:"font16 c-black",rev:void 0})),(0,F.vB)(Ye==null?void 0:Ye.exercise_status,Ye==null?void 0:Ye.appraise_label),Le.createElement("strong",{className:"font20 ml5"},Ye==null?void 0:Ye.exercise_name))),Le.createElement("div",{className:"mt20"},xt===1&&Le.createElement(U,null),xt===2&&Le.createElement(we,null)))};var K=(0,x.connect)(({loading:ne,user:M,globalSetting:B,classroomList:j,exercise:me})=>({classroomList:j,globalSetting:B,user:M,loading:ne.effects,exercise:me}))(P)},80119:function(on,je,E){"use strict";E.d(je,{H:function(){return ue}});var x=E(59301),ae=E(28284),ve=E(37568),fe=E(42441),F=E(76902);const f=({form:te,index:o=1,field:y,ParentName:C=[]})=>{(typeof C=="string"||typeof C=="number")&&(C=[C]);const h=ae.default.useWatch([...C,y.name,"chart_1"],{form:te}),g=ae.default.useWatch([...C,y.name,"chart_2"],{form:te}),_=ae.default.useWatch([...C,y.name,"name"],{form:te}),S=ae.default.useWatch([...C,y.name,"question_type"],{form:te}),L=(0,x.useMemo)(()=>{const H=[],R=[];return h==null||h.forEach(k=>{H.push(k==null?void 0:k.x_axis),R.push(k==null?void 0:k.y_axis)}),{tooltip:{},grid:{left:"7%",right:"5%",bottom:"15%",top:"15%",containLabel:!0},xAxis:{type:"category",data:[...H||[],[4,5,6,7,8].includes(S)?"\u5206\u6570\u533A\u95F4":"\u7B54\u5BF9\u9898\u6570\uFF08\u5355\u4F4D\uFF1A\u9898\uFF09"],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666",interval:0}},yAxis:{name:"\u4EBA\u6570\uFF08\u5355\u4F4D\uFF1A\u4EBA\uFF09",nameTextStyle:{color:"#666",padding:[0,0,10,0]},type:"value",splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},series:[{data:R,barMaxWidth:"40px",itemStyle:{color:"#A2BEFF",borderColor:"#165DFF"},type:"bar"}]}},[h]),N=(0,x.useMemo)(()=>{const H=[],R=[];return g==null||g.forEach(k=>{H.push(k==null?void 0:k.x_axis),R.push(Math.round((k==null?void 0:k.y_axis)*1e4)/100)}),{tooltip:{},grid:{left:"5%",right:"5%",bottom:"7%",containLabel:!0},xAxis:{type:"category",data:[...H||[],"\u9898\u76EE"],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666",interval:0,formatter:(k,T)=>k!=="\u9898\u76EE"?`${T+1}
|
|
|
|
{subtext|${(k.length>6?k==null?void 0:k.slice(0,6):k).split("").join(`
|
|
`)}}`:k,rich:{subtext:{align:"center",color:"#666",lineHeight:15}}}},yAxis:{name:"\u5E73\u5747\u5F97\u5206",nameTextStyle:{color:"#666",padding:[0,0,10,0]},type:"value",splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},series:[{data:R,barMaxWidth:"40px",itemStyle:{color:"#2EC25B"},type:"bar",label:{color:"#666",show:!0,position:"top",valueAnimation:!0,formatter:"{c}%"}}]}},[g]);return x.createElement(x.Fragment,null,x.createElement("div",{className:"text-500 font14 mb10"},o,".",_),x.createElement(ae.default.Item,{name:[y.name,"content"]},x.createElement(ve.default.TextArea,{rows:3})),x.createElement("div",{className:"mt20"},x.createElement("div",{className:"font14 mb10"},"\u5B66\u5458\u7B54\u9898\u60C5\u51B5"),x.createElement(fe.Z,{className:"bg-white",style:{border:"1px solid #EBEBEB"},option:L})),x.createElement("div",{className:"mt20"},x.createElement("div",{className:"font14 mb10"},"\u5404\u5C0F\u9898\u7B54\u9898\u60C5\u51B5"),x.createElement(fe.Z,{className:"bg-white",style:{border:"1px solid #EBEBEB",height:331},option:N})))};je.Z=x.memo(f);const ue=x.memo(({form:te,index:o=1,data:y})=>{const C=(0,x.useMemo)(()=>{var g;const _=[],S=[];return(g=y==null?void 0:y.chart_1)==null||g.forEach(L=>{_.push(L==null?void 0:L.x_axis),S.push(L==null?void 0:L.y_axis)}),{tooltip:{},grid:{left:"5%",right:"5%",bottom:"15%",top:"20%",containLabel:!0},xAxis:{type:"category",data:[..._||[],[4,5,6,7,8].includes(y==null?void 0:y.question_type)?"\u5206\u6570\u533A\u95F4":"\u7B54\u5BF9\u9898\u6570\uFF08\u5355\u4F4D\uFF1A\u9898\uFF09"],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666",interval:0}},yAxis:{name:"\u4EBA\u6570\uFF08\u5355\u4F4D\uFF1A\u4EBA\uFF09",nameTextStyle:{color:"#666",padding:[0,0,10,0]},type:"value",splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},series:[{data:S,barMaxWidth:"40px",itemStyle:{color:"#A2BEFF",borderColor:"#165DFF"},type:"bar"}]}},[y==null?void 0:y.chart_1]),h=(0,x.useMemo)(()=>{var g;const _=[],S=[];return(g=y==null?void 0:y.chart_2)==null||g.forEach(L=>{_.push(L==null?void 0:L.x_axis),S.push(Math.round((L==null?void 0:L.y_axis)*1e4)/100)}),{tooltip:{},grid:{left:"5%",right:"5%",bottom:"7%",containLabel:!0},xAxis:{type:"category",data:[..._||[],"\u9898\u76EE"],axisTick:{show:!1},axisLine:{lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666",interval:0,formatter:(L,N)=>L!=="\u9898\u76EE"?`${N+1}
|
|
|
|
{subtext|${(L.length>6?L==null?void 0:L.slice(0,6):L).split("").join(`
|
|
`)}}`:L,rich:{subtext:{align:"center",color:"#666",lineHeight:15}}}},yAxis:{name:"\u5E73\u5747\u5F97\u5206",nameTextStyle:{color:"#666",padding:[0,0,10,0]},type:"value",splitLine:{show:!1},axisLine:{show:!0,lineStyle:{color:"#EBEBEB"}},axisLabel:{color:"#666666"}},series:[{data:S,barMaxWidth:"40px",itemStyle:{color:"#2EC25B"},type:"bar",label:{color:"#666",show:!0,position:"top",valueAnimation:!0,formatter:"{c}%"}}]}},[y==null?void 0:y.chart_2]);return x.createElement("div",{className:"text-start pl10 pr10"},x.createElement("div",{className:"text-500 font14 mb10 c-black"},o,".",y==null?void 0:y.name),x.createElement("div",null,x.createElement(F.Z,{className:"font14 c-grey-333",value:y==null?void 0:y.content})),x.createElement("div",{className:"mt20"},x.createElement(fe.Z,{className:"bg-white",style:{background:"#F6F7F9"},option:C}),x.createElement("div",{className:"font14 mt10 text-center"},"\u56FE",o*2-1,"\xA0\xA0",y==null?void 0:y.name,"\u7B54\u9898\u5F97\u5206\u60C5\u51B5\u5206\u5E03")),x.createElement("div",{className:"mt20"},x.createElement(fe.Z,{className:"bg-white",style:{background:"#F6F7F9",height:331},option:h}),x.createElement("div",{className:"font14 mt10 text-center"},"\u56FE",o*2,"\xA0\xA0",y==null?void 0:y.name,"\u5404\u5C0F\u9898\u5F97\u5206\u7387")))})},45937:function(on,je,E){"use strict";E.d(je,{U:function(){return o}});var x=E(59301),ae=Object.defineProperty,ve=Object.getOwnPropertySymbols,fe=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable,f=(y,C,h)=>C in y?ae(y,C,{enumerable:!0,configurable:!0,writable:!0,value:h}):y[C]=h,ue=(y,C)=>{for(var h in C||(C={}))fe.call(C,h)&&f(y,h,C[h]);if(ve)for(var h of ve(C))F.call(C,h)&&f(y,h,C[h]);return y},te=(y,C,h)=>new Promise((g,_)=>{var S=H=>{try{N(h.next(H))}catch(R){_(R)}},L=H=>{try{N(h.throw(H))}catch(R){_(R)}},N=H=>H.done?g(H.value):Promise.resolve(H.value).then(S,L);N((h=h.apply(y,C)).next())});function o(y,C){const[h,g]=(0,x.useState)(C),[_,S]=(0,x.useState)(!1),[L,N]=(0,x.useState)();return[h,_,(R,k=!1)=>te(this,null,function*(){const T=k?C:ue(ue({},h),R);S(!0),g(T);const A=yield y(T);return S(!1),N(A),A}),L,N]}},81428:function(on,je,E){"use strict";E.d(je,{AL:function(){return T},Iy:function(){return C},Qv:function(){return _},ez:function(){return k},jb:function(){return h}});var x=E(32834),ae=E.n(x),ve=E(11690),fe=E.n(ve);let F=1;function f(I,re){const le=I.match(/^(\s+)(?:```)/);if(le===null)return re;const Te=le[1];return re.split(`
|
|
`).map(W=>{const O=W.match(/^\s+/);if(O===null)return W;const[Q]=O;return Q.length>=Te.length?W.slice(Te.length):W}).join(`
|
|
`)}let ue=[],te=["<ul>"];const o=new(ae()).Renderer,y=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function C(){ue.length=0,te=["<ul>"]}const h={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function g(I,re,le,Te){if(re>=I.length||I[re].level<=le)return re;var W=I[re];Te.push("<li><a href='#"+F+W.anchor+"'>"+W.text+"</a>"),re++;var O=[];return re=g(I,re,W.level,O),O.length>0&&(Te.push("<ul>"),O.forEach(function(Q){Te.push(Q)}),Te.push("</ul>")),Te.push("</li>"),re=g(I,re,le,Te),re}function _(){return g(ue,0,0,te),te.push("</ul>"),te.join("")}const S={heading(I){const re=y.exec(I);if(F+=1,re)return{type:"heading",raw:re[0],depth:re[1].length,text:re[2]}},fences(I){const re=this.rules.block.fences.exec(I);if(re){const le=re[0];let Te=f(le,re[3]||"");const W=re[2]?re[2].trim():re[2];if(["latex","katex","math"].indexOf(W)>=0){const O=H(),Q=Te;Te=O,R[O]={type:"block",expression:Q}}return{type:"code",raw:le,lang:W,text:Te}}}},L=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let N=0;const H=()=>`__special_katext_id_${N++}__`;let R={};function k(){return R}function T(){N=0,R={}}function A(I){return I=I.replace(L,(re,le)=>{const Te=H();return R[Te]={type:"inline",expression:le},Te}),I}const J=o.listitem;o.listitem=function(I){return J(A(I))};const ee=o.paragraph;o.paragraph=function(I){return ee(A(I))};const G=o.tablecell;o.tablecell=function(I,re){return G(A(I),re)},o.code=function(I,re,le){const Te=(re||"").match(/\S*/)[0];return Te?["latex","katex","math"].indexOf(Te)>=0?`<p class='editormd-tex'>${I}</p>`:`<pre class="prettyprint linenums"><code class="language-${re}">${le?I:(0,ve.escape)(I,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(le?I:(0,ve.escape)(I,!0))+"</code></pre>"},o.heading=function(I,re,le){let Te=this.options.headerPrefix+le.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return ue.push({anchor:Te,level:re,text:I}),"<h"+re+' id="'+F+Te+'">'+I+"</h"+re+">"},ae().setOptions({silent:!0,gfm:!0,pedantic:!1}),ae().use({tokenizer:S,renderer:o}),je.ZP=ae()},64018:function(){var on,je,E,x=!1,ae,ve;window.PR_SHOULD_USE_CONTINUATION=!0;var fe,F;(function(){var f=window,ue=["break,continue,do,else,for,if,return,while"],te=[ue,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],o=[te,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],y=[o,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],C=[o,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],h=[o,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],g="all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes",_=[o,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],S="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",L=[ue,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],N=[ue,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],H=[ue,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=[y,h,C,_,S,L,N,H],k=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,T="str",A="kwd",J="com",ee="typ",G="lit",I="pun",re="pln",le="tag",Te="dec",W="src",O="atn",Q="atv",q="nocode",ie="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function V(ye){for(var Z=0,we=!1,Le=!1,$=0,P=ye.length;$<P;++$){var K=ye[$];if(K.ignoreCase)Le=!0;else if(/[a-z]/i.test(K.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){we=!0,Le=!1;break}}var ne={b:8,t:9,n:10,v:11,f:12,r:13};function M(Ae){var Ee=Ae.charCodeAt(0);if(Ee!==92)return Ee;var Ce=Ae.charAt(1);return Ee=ne[Ce],Ee||("0"<=Ce&&Ce<="7"?parseInt(Ae.substring(1),8):Ce==="u"||Ce==="x"?parseInt(Ae.substring(2),16):Ae.charCodeAt(1))}function B(Ae){if(Ae<32)return(Ae<16?"\\x0":"\\x")+Ae.toString(16);var Ee=String.fromCharCode(Ae);return Ee==="\\"||Ee==="-"||Ee==="]"||Ee==="^"?"\\"+Ee:Ee}function j(Ae){var Ee=Ae.substring(1,Ae.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),Ce=[],Fe=Ee[0]==="^",Be=["["];Fe&&Be.push("^");for(var Ye=Fe?1:0,xt=Ee.length;Ye<xt;++Ye){var lt=Ee[Ye];if(/\\[bdsw]/i.test(lt))Be.push(lt);else{var nt=M(lt),Ut;Ye+2<xt&&Ee[Ye+1]==="-"?(Ut=M(Ee[Ye+2]),Ye+=2):Ut=nt,Ce.push([nt,Ut]),Ut<65||nt>122||(Ut<65||nt>90||Ce.push([Math.max(65,nt)|32,Math.min(Ut,90)|32]),Ut<97||nt>122||Ce.push([Math.max(97,nt)&-33,Math.min(Ut,122)&-33]))}}Ce.sort(function(wn,Rt){return wn[0]-Rt[0]||Rt[1]-wn[1]});for(var Vt=[],Ct=[],Ye=0;Ye<Ce.length;++Ye){var Jt=Ce[Ye];Jt[0]<=Ct[1]+1?Ct[1]=Math.max(Ct[1],Jt[1]):Vt.push(Ct=Jt)}for(var Ye=0;Ye<Vt.length;++Ye){var Jt=Vt[Ye];Be.push(B(Jt[0])),Jt[1]>Jt[0]&&(Jt[1]+1>Jt[0]&&Be.push("-"),Be.push(B(Jt[1])))}return Be.push("]"),Be.join("")}function me(Ae){for(var Ee=Ae.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),Ce=Ee.length,Fe=[],Be=0,Ye=0;Be<Ce;++Be){var xt=Ee[Be];if(xt==="(")++Ye;else if(xt.charAt(0)==="\\"){var lt=+xt.substring(1);lt&&(lt<=Ye?Fe[lt]=-1:Ee[Be]=B(lt))}}for(var Be=1;Be<Fe.length;++Be)Fe[Be]===-1&&(Fe[Be]=++Z);for(var Be=0,Ye=0;Be<Ce;++Be){var xt=Ee[Be];if(xt==="(")++Ye,Fe[Ye]||(Ee[Be]="(?:");else if(xt.charAt(0)==="\\"){var lt=+xt.substring(1);lt&<<=Ye&&(Ee[Be]="\\"+Fe[lt])}}for(var Be=0;Be<Ce;++Be)Ee[Be]==="^"&&Ee[Be+1]!=="^"&&(Ee[Be]="");if(Ae.ignoreCase&&we)for(var Be=0;Be<Ce;++Be){var xt=Ee[Be],nt=xt.charAt(0);xt.length>=2&&nt==="["?Ee[Be]=j(xt):nt!=="\\"&&(Ee[Be]=xt.replace(/[a-zA-Z]/g,function(Ct){var Jt=Ct.charCodeAt(0);return"["+String.fromCharCode(Jt&-33,Jt|32)+"]"}))}return Ee.join("")}for(var de=[],$=0,P=ye.length;$<P;++$){var K=ye[$];if(K.global||K.multiline)throw new Error(""+K);de.push("(?:"+me(K)+")")}return new RegExp(de.join("|"),Le?"gi":"g")}function v(ye,Z){var we=/(?:^|\s)nocode(?:\s|$)/,Le=[],$=0,P=[],K=0;function ne(M){var B=M.nodeType;if(B==1){if(we.test(M.className))return;for(var j=M.firstChild;j;j=j.nextSibling)ne(j);var me=M.nodeName.toLowerCase();(me==="br"||me==="li")&&(Le[K]=`
|
|
`,P[K<<1]=$++,P[K++<<1|1]=M)}else if(B==3||B==4){var de=M.nodeValue;de.length&&(Z?de=de.replace(/\r\n?/g,`
|
|
`):de=de.replace(/[ \t\r\n]+/g," "),Le[K]=de,P[K<<1]=$,$+=de.length,P[K++<<1|1]=M)}}return ne(ye),{sourceCode:Le.join("").replace(/\n$/,""),spans:P}}function m(ye,Z,we,Le,$){if(we){var P={sourceNode:ye,pre:1,langExtension:null,numberLines:null,sourceCode:we,spans:null,basePos:Z,decorations:null};Le(P),$.push.apply($,P.decorations)}}var U=/\S/;function se(ye){for(var Z=void 0,we=ye.firstChild;we;we=we.nextSibling){var Le=we.nodeType;Z=Le===1?Z?ye:we:Le===3&&U.test(we.nodeValue)?ye:Z}return Z===ye?void 0:Z}function pe(ye,Z){var we={},Le;(function(){for(var K=ye.concat(Z),ne=[],M={},B=0,j=K.length;B<j;++B){var me=K[B],de=me[3];if(de)for(var Ae=de.length;--Ae>=0;)we[de.charAt(Ae)]=me;var Ee=me[1],Ce=""+Ee;M.hasOwnProperty(Ce)||(ne.push(Ee),M[Ce]=null)}ne.push(/[\0-\uffff]/),Le=V(ne)})();var $=Z.length,P=function(K){for(var ne=K.sourceCode,M=K.basePos,B=K.sourceNode,j=[M,re],me=0,de=ne.match(Le)||[],Ae={},Ee=0,Ce=de.length;Ee<Ce;++Ee){var Fe=de[Ee],Be=Ae[Fe],Ye=void 0,xt;if(typeof Be=="string")xt=!1;else{var lt=we[Fe.charAt(0)];if(lt)Ye=Fe.match(lt[1]),Be=lt[0];else{for(var nt=0;nt<$;++nt)if(lt=Z[nt],Ye=Fe.match(lt[1]),Ye){Be=lt[0];break}Ye||(Be=re)}xt=Be.length>=5&&Be.substring(0,5)==="lang-",xt&&!(Ye&&typeof Ye[1]=="string")&&(xt=!1,Be=W),xt||(Ae[Fe]=Be)}var Ut=me;if(me+=Fe.length,!xt)j.push(M+Ut,Be);else{var Vt=Ye[1],Ct=Fe.indexOf(Vt),Jt=Ct+Vt.length;Ye[2]&&(Jt=Fe.length-Ye[2].length,Ct=Jt-Vt.length);var wn=Be.substring(5);m(B,M+Ut,Fe.substring(0,Ct),P,j),m(B,M+Ut+Ct,Vt,_t(wn,Vt),j),m(B,M+Ut+Jt,Fe.substring(Jt),P,j)}}K.decorations=j};return P}function He(ye){var Z=[],we=[];ye.tripleQuotedStrings?Z.push([T,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ye.multiLineStrings?Z.push([T,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Z.push([T,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ye.verbatimStrings&&we.push([T,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Le=ye.hashComments;Le&&(ye.cStyleComments?(Le>1?Z.push([J,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Z.push([J,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),we.push([T,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Z.push([J,/^#[^\r\n]*/,null,"#"])),ye.cStyleComments&&(we.push([J,/^\/\/[^\r\n]*/,null]),we.push([J,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var $=ye.regexLiterals;if($){var P=$>1?"":`
|
|
\r`,K=P?".":"[\\S\\s]",ne="/(?=[^/*"+P+"])(?:[^/\\x5B\\x5C"+P+"]|\\x5C"+K+"|\\x5B(?:[^\\x5C\\x5D"+P+"]|\\x5C"+K+")*(?:\\x5D|$))+/";we.push(["lang-regex",RegExp("^"+ie+"("+ne+")")])}var M=ye.types;M&&we.push([ee,M]);var B=(""+ye.keywords).replace(/^ | $/g,"");B.length&&we.push([A,new RegExp("^(?:"+B.replace(/[\s,]+/g,"|")+")\\b"),null]),Z.push([re,/^\s+/,null,` \r
|
|
\xA0`]);var j="^.[^\\s\\w.$@'\"`/\\\\]*";return ye.regexLiterals&&(j+="(?!s*/)"),we.push([G,/^@[a-z_$][a-z_$@0-9]*/i,null],[ee,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[re,/^[a-z_$][a-z_$@0-9]*/i,null],[G,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[re,/^\\[\s\S]?/,null],[I,new RegExp(j),null]),pe(Z,we)}var qe=He({keywords:R,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ot(ye,Z,we){for(var Le=/(?:^|\s)nocode(?:\s|$)/,$=/\r\n?|\n/,P=ye.ownerDocument,K=P.createElement("li");ye.firstChild;)K.appendChild(ye.firstChild);var ne=[K];function M(Ee){var Ce=Ee.nodeType;if(Ce==1&&!Le.test(Ee.className))if(Ee.nodeName==="br")B(Ee),Ee.parentNode&&Ee.parentNode.removeChild(Ee);else for(var Fe=Ee.firstChild;Fe;Fe=Fe.nextSibling)M(Fe);else if((Ce==3||Ce==4)&&we){var Be=Ee.nodeValue,Ye=Be.match($);if(Ye){var xt=Be.substring(0,Ye.index);Ee.nodeValue=xt;var lt=Be.substring(Ye.index+Ye[0].length);if(lt){var nt=Ee.parentNode;nt.insertBefore(P.createTextNode(lt),Ee.nextSibling)}B(Ee),xt||Ee.parentNode.removeChild(Ee)}}}function B(Ee){for(;!Ee.nextSibling;)if(Ee=Ee.parentNode,!Ee)return;function Ce(Ye,xt){var lt=xt?Ye.cloneNode(!1):Ye,nt=Ye.parentNode;if(nt){var Ut=Ce(nt,1),Vt=Ye.nextSibling;Ut.appendChild(lt);for(var Ct=Vt;Ct;Ct=Vt)Vt=Ct.nextSibling,Ut.appendChild(Ct)}return lt}for(var Fe=Ce(Ee.nextSibling,0),Be;(Be=Fe.parentNode)&&Be.nodeType===1;)Fe=Be;ne.push(Fe)}for(var j=0;j<ne.length;++j)M(ne[j]);Z===(Z|0)&&ne[0].setAttribute("value",Z);var me=P.createElement("ol");me.className="linenums";for(var de=Math.max(0,Z-1|0)||0,j=0,Ae=ne.length;j<Ae;++j)K=ne[j],K.className="L"+(j+de)%10,K.firstChild||K.appendChild(P.createTextNode("\xA0")),me.appendChild(K);ye.appendChild(me)}function Ot(ye){var Z=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Z=Z&&+Z[1]<=8;var we=/\n/g,Le=ye.sourceCode,$=Le.length,P=0,K=ye.spans,ne=K.length,M=0,B=ye.decorations,j=B.length,me=0;B[j]=$;var de,Ae;for(Ae=de=0;Ae<j;)B[Ae]!==B[Ae+2]?(B[de++]=B[Ae++],B[de++]=B[Ae++]):Ae+=2;for(j=de,Ae=de=0;Ae<j;){for(var Ee=B[Ae],Ce=B[Ae+1],Fe=Ae+2;Fe+2<=j&&B[Fe+1]===Ce;)Fe+=2;B[de++]=Ee,B[de++]=Ce,Ae=Fe}j=B.length=de;var Be=ye.sourceNode,Ye="";Be&&(Ye=Be.style.display,Be.style.display="none");try{for(var xt=null;M<ne;){var lt=K[M],nt=K[M+2]||$,Ut=B[me+2]||$,Fe=Math.min(nt,Ut),Vt=K[M+1],Ct;if(Vt.nodeType!==1&&(Ct=Le.substring(P,Fe))){Z&&(Ct=Ct.replace(we,"\r")),Vt.nodeValue=Ct;var Jt=Vt.ownerDocument,wn=Jt.createElement("span");wn.className=B[me+1];var Rt=Vt.parentNode;Rt.replaceChild(wn,Vt),wn.appendChild(Vt),P<nt&&(K[M+1]=Vt=Jt.createTextNode(Le.substring(Fe,nt)),Rt.insertBefore(Vt,wn.nextSibling))}P=Fe,P>=nt&&(M+=2),P>=Ut&&(me+=2)}}finally{Be&&(Be.style.display=Ye)}}var bt={};function xe(ye,Z){for(var we=Z.length;--we>=0;){var Le=Z[we];bt.hasOwnProperty(Le)?f.console&&console.warn("cannot override language handler %s",Le):bt[Le]=ye}}function _t(ye,Z){return ye&&bt.hasOwnProperty(ye)||(ye=/^\s*</.test(Z)?"default-markup":"default-code"),bt[ye]}xe(qe,["default-code"]),xe(pe([],[[re,/^[^<?]+/],[Te,/^<!\w[^>]*(?:>|$)/],[J,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[I,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),xe(pe([[re,/^[\s]+/,null,` \r
|
|
`],[Q,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[le,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[O,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[I,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),xe(pe([],[[Q,/^[\s\S]+/]]),["uq.val"]),xe(He({keywords:y,hashComments:!0,cStyleComments:!0,types:k}),["c","cc","cpp","cxx","cyc","m"]),xe(He({keywords:"null,true,false"}),["json"]),xe(He({keywords:h,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:k}),["cs"]),xe(He({keywords:C,cStyleComments:!0}),["java"]),xe(He({keywords:H,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),xe(He({keywords:L,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),xe(He({keywords:S,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),xe(He({keywords:N,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),xe(He({keywords:_,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),xe(He({keywords:g,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),xe(pe([],[[T,/^[\s\S]+/]]),["regex"]);function Qt(ye){var Z=ye.langExtension;try{var we=v(ye.sourceNode,ye.pre),Le=we.sourceCode;ye.sourceCode=Le,ye.spans=we.spans,ye.basePos=0,_t(Z,Le)(ye),Ot(ye)}catch($){f.console&&console.log($&&$.stack||$)}}function Lt(ye,Z,we){var Le=we||!1,$=Z||null,P=document.createElement("div");P.innerHTML="<pre>"+ye+"</pre>",P=P.firstChild,Le&&ot(P,Le,!0);var K={langExtension:$,numberLines:Le,sourceNode:P,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Qt(K),P.innerHTML}function qt(ye,Z){var we=Z||document.body,Le=we.ownerDocument||document;function $(lt){return we.getElementsByTagName(lt)}for(var P=[$("pre"),$("code"),$("xmp")],K=[],ne=0;ne<P.length;++ne)for(var M=0,B=P[ne].length;M<B;++M)K.push(P[ne][M]);P=null;var j=Date;j.now||(j={now:function(){return+new Date}});var me=0,de=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ae=/\bprettyprint\b/,Ee=/\bprettyprinted\b/,Ce=/pre|xmp/i,Fe=/^code$/i,Be=/^(?:pre|code|xmp)$/i,Ye={};function xt(){for(var lt=f.PR_SHOULD_USE_CONTINUATION?j.now()+250:1/0;me<K.length&&j.now()<lt;me++){for(var nt=K[me],Ut=Ye,Vt=nt;Vt=Vt.previousSibling;){var Ct=Vt.nodeType,Jt=(Ct===7||Ct===8)&&Vt.nodeValue;if(Jt?!/^\??prettify\b/.test(Jt):Ct!==3||/\S/.test(Vt.nodeValue))break;if(Jt){Ut={},Jt.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Ze,$e,ft){Ut[$e]=ft});break}}var wn=nt.className;if((Ut!==Ye||Ae.test(wn))&&!Ee.test(wn)){for(var Rt=!1,Yt=nt.parentNode;Yt;Yt=Yt.parentNode){var Ne=Yt.tagName;if(Be.test(Ne)&&Yt.className&&Ae.test(Yt.className)){Rt=!0;break}}if(!Rt){nt.className+=" prettyprinted";var ke=Ut.lang;if(!ke){ke=wn.match(de);var Pe;!ke&&(Pe=se(nt))&&Fe.test(Pe.tagName)&&(ke=Pe.className.match(de)),ke&&(ke=ke[1])}var z;if(Ce.test(nt.tagName))z=1;else{var oe=nt.currentStyle,he=Le.defaultView,ce=oe?oe.whiteSpace:he&&he.getComputedStyle?he.getComputedStyle(nt,null).getPropertyValue("white-space"):0;z=ce&&ce.substring(0,3)==="pre"}var be=Ut.linenums;(be=be==="true"||+be)||(be=wn.match(/\blinenums\b(?::(\d+))?/),be=be?be[1]&&be[1].length?+be[1]:!0:!1),be&&ot(nt,be,z);var ze={langExtension:ke,sourceNode:nt,numberLines:be,pre:z,sourceCode:null,basePos:null,spans:null,decorations:null};Qt(ze)}}}me<K.length?f.setTimeout(xt,250):typeof ye=="function"&&ye()}xt()}var tt=f.PR={createSimpleLexer:pe,registerLangHandler:xe,sourceDecorator:He,PR_ATTRIB_NAME:O,PR_ATTRIB_VALUE:Q,PR_COMMENT:J,PR_DECLARATION:Te,PR_KEYWORD:A,PR_LITERAL:G,PR_NOCODE:q,PR_PLAIN:re,PR_PUNCTUATION:I,PR_SOURCE:W,PR_STRING:T,PR_TAG:le,PR_TYPE:ee,prettyPrintOne:x?f.prettyPrintOne=Lt:fe=Lt,prettyPrint:F=x?f.prettyPrint=qt:F=qt},Re=f.define;typeof Re=="function"&&Re.amd&&Re("google-code-prettify",[],function(){return tt})})()},25769:function(on,je,E){"use strict";var x=E(98040),ae={"text/plain":"Text","text/html":"Url",default:"Text"},ve="Copy to clipboard: #{key}, Enter";function fe(f){var ue=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return f.replace(/#{\s*key\s*}/g,ue)}function F(f,ue){var te,o,y,C,h,g,_=!1;ue||(ue={}),te=ue.debug||!1;try{y=x(),C=document.createRange(),h=document.getSelection(),g=document.createElement("span"),g.textContent=f,g.ariaHidden="true",g.style.all="unset",g.style.position="fixed",g.style.top=0,g.style.clip="rect(0, 0, 0, 0)",g.style.whiteSpace="pre",g.style.webkitUserSelect="text",g.style.MozUserSelect="text",g.style.msUserSelect="text",g.style.userSelect="text",g.addEventListener("copy",function(L){if(L.stopPropagation(),ue.format)if(L.preventDefault(),typeof L.clipboardData=="undefined"){te&&console.warn("unable to use e.clipboardData"),te&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var N=ae[ue.format]||ae.default;window.clipboardData.setData(N,f)}else L.clipboardData.clearData(),L.clipboardData.setData(ue.format,f);ue.onCopy&&(L.preventDefault(),ue.onCopy(L.clipboardData))}),document.body.appendChild(g),C.selectNodeContents(g),h.addRange(C);var S=document.execCommand("copy");if(!S)throw new Error("copy command was unsuccessful");_=!0}catch(L){te&&console.error("unable to copy using execCommand: ",L),te&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(ue.format||"text",f),ue.onCopy&&ue.onCopy(window.clipboardData),_=!0}catch(N){te&&console.error("unable to copy using clipboardData: ",N),te&&console.error("falling back to prompt"),o=fe("message"in ue?ue.message:ve),window.prompt(o,f)}}finally{h&&(typeof h.removeRange=="function"?h.removeRange(C):h.removeAllRanges()),g&&document.body.removeChild(g),y()}return _}on.exports=F},97774:function(on,je,E){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.default=void 0;var x=Object.assign||function(L){for(var N=1;N<arguments.length;N++){var H=arguments[N];for(var R in H)Object.prototype.hasOwnProperty.call(H,R)&&(L[R]=H[R])}return L},ae=function(){function L(N,H){for(var R=0;R<H.length;R++){var k=H[R];k.enumerable=k.enumerable||!1,k.configurable=!0,"value"in k&&(k.writable=!0),Object.defineProperty(N,k.key,k)}}return function(N,H,R){return H&&L(N.prototype,H),R&&L(N,R),N}}(),ve=E(59301),fe=C(ve),F=E(12708),f=C(F),ue=E(53291),te=C(ue),o=E(47242),y=E(65429);function C(L){return L&&L.__esModule?L:{default:L}}function h(L,N){if(!(L instanceof N))throw new TypeError("Cannot call a class as a function")}function g(L,N){if(!L)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return N&&(typeof N=="object"||typeof N=="function")?N:L}function _(L,N){if(typeof N!="function"&&N!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof N);L.prototype=Object.create(N&&N.prototype,{constructor:{value:L,enumerable:!1,writable:!0,configurable:!0}}),N&&(Object.setPrototypeOf?Object.setPrototypeOf(L,N):L.__proto__=N)}var S=function(L){_(N,L);function N(H){h(this,N);var R=g(this,(N.__proto__||Object.getPrototypeOf(N)).call(this,H));return R.getEchartsInstance=function(){return R.echartsLib.getInstanceByDom(R.echartsElement)||R.echartsLib.init(R.echartsElement,R.props.theme,R.props.opts)},R.dispose=function(){if(R.echartsElement){try{(0,o.clear)(R.echartsElement)}catch(k){console.warn(k)}R.echartsLib.dispose(R.echartsElement)}},R.rerender=function(){var k=R.props,T=k.onEvents,A=k.onChartReady,J=R.renderEchartDom();R.bindEvents(J,T||{}),typeof A=="function"&&R.props.onChartReady(J),R.echartsElement&&(0,o.bind)(R.echartsElement,function(){try{J.resize()}catch(ee){console.warn(ee)}})},R.bindEvents=function(k,T){var A=function(G,I){typeof G=="string"&&typeof I=="function"&&k.on(G,function(re){I(re,k)})};for(var J in T)Object.prototype.hasOwnProperty.call(T,J)&&A(J,T[J])},R.renderEchartDom=function(){var k=R.getEchartsInstance();return k.setOption(R.props.option,R.props.notMerge||!1,R.props.lazyUpdate||!1),R.props.showLoading?k.showLoading(R.props.loadingOption||null):k.hideLoading(),k},R.echartsLib=H.echarts,R.echartsElement=null,R}return ae(N,[{key:"componentDidMount",value:function(){this.rerender()}},{key:"componentDidUpdate",value:function(R){if(!(typeof this.props.shouldSetOption=="function"&&!this.props.shouldSetOption(R,this.props))){if(!(0,te.default)(R.theme,this.props.theme)||!(0,te.default)(R.opts,this.props.opts)||!(0,te.default)(R.onEvents,this.props.onEvents)){this.dispose(),this.rerender();return}var k=["option","notMerge","lazyUpdate","showLoading","loadingOption"];if(!(0,te.default)((0,y.pick)(this.props,k),(0,y.pick)(R,k))){var T=this.renderEchartDom();if(!(0,te.default)(R.style,this.props.style)||!(0,te.default)(R.className,this.props.className))try{T.resize()}catch(A){console.warn(A)}}}}},{key:"componentWillUnmount",value:function(){this.dispose()}},{key:"render",value:function(){var R=this,k=this.props,T=k.style,A=k.className,J=x({height:300},T);return fe.default.createElement("div",{ref:function(G){R.echartsElement=G},style:J,className:"echarts-for-react "+A})}}]),N}(ve.Component);je.default=S,S.propTypes={option:f.default.object.isRequired,echarts:f.default.object,notMerge:f.default.bool,lazyUpdate:f.default.bool,style:f.default.object,className:f.default.string,theme:f.default.oneOfType([f.default.string,f.default.object]),onChartReady:f.default.func,showLoading:f.default.bool,loadingOption:f.default.object,onEvents:f.default.object,opts:f.default.shape({devicePixelRatio:f.default.number,renderer:f.default.oneOf(["canvas","svg"]),width:f.default.oneOfType([f.default.number,f.default.oneOf([null,void 0,"auto"])]),height:f.default.oneOfType([f.default.number,f.default.oneOf([null,void 0,"auto"])])}),shouldSetOption:f.default.func},S.defaultProps={echarts:{},notMerge:!1,lazyUpdate:!1,style:{},className:"",theme:null,onChartReady:function(){},showLoading:!1,loadingOption:null,onEvents:{},opts:{},shouldSetOption:function(){return!0}}},42441:function(on,je,E){"use strict";var x;x={value:!0},je.Z=void 0;var ae=E(76411),ve=f(ae),fe=E(97774),F=f(fe);function f(C){return C&&C.__esModule?C:{default:C}}function ue(C,h){if(!(C instanceof h))throw new TypeError("Cannot call a class as a function")}function te(C,h){if(!C)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h&&(typeof h=="object"||typeof h=="function")?h:C}function o(C,h){if(typeof h!="function"&&h!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof h);C.prototype=Object.create(h&&h.prototype,{constructor:{value:C,enumerable:!1,writable:!0,configurable:!0}}),h&&(Object.setPrototypeOf?Object.setPrototypeOf(C,h):C.__proto__=h)}var y=function(C){o(h,C);function h(g){ue(this,h);var _=te(this,(h.__proto__||Object.getPrototypeOf(h)).call(this,g));return _.echartsLib=ve.default,_}return h}(F.default);je.Z=y},65429:function(on,je){"use strict";Object.defineProperty(je,"__esModule",{value:!0});var E=je.pick=function(ae,ve){var fe={};return ve.forEach(function(F){fe[F]=ae[F]}),fe}},53291:function(on){"use strict";var je=Array.isArray,E=Object.keys,x=Object.prototype.hasOwnProperty;on.exports=function ae(ve,fe){if(ve===fe)return!0;if(ve&&fe&&typeof ve=="object"&&typeof fe=="object"){var F=je(ve),f=je(fe),ue,te,o;if(F&&f){if(te=ve.length,te!=fe.length)return!1;for(ue=te;ue--!==0;)if(!ae(ve[ue],fe[ue]))return!1;return!0}if(F!=f)return!1;var y=ve instanceof Date,C=fe instanceof Date;if(y!=C)return!1;if(y&&C)return ve.getTime()==fe.getTime();var h=ve instanceof RegExp,g=fe instanceof RegExp;if(h!=g)return!1;if(h&&g)return ve.toString()==fe.toString();var _=E(ve);if(te=_.length,te!==E(fe).length)return!1;for(ue=te;ue--!==0;)if(!x.call(fe,_[ue]))return!1;for(ue=te;ue--!==0;)if(o=_[ue],!ae(ve[o],fe[o]))return!1;return!0}return ve!==ve&&fe!==fe}},53184:function(on,je,E){"use strict";var x,ae;function ve(fe,F,f){var ue=function(te,o){return fe.js_beautify(te,o)};return ue.js=fe.js_beautify,ue.css=F.css_beautify,ue.html=f.html_beautify,ue.js_beautify=fe.js_beautify,ue.css_beautify=F.css_beautify,ue.html_beautify=f.html_beautify,ue}x=[E(58553),E(87804),E(40998)],ae=function(fe,F,f){return ve(fe,F,f)}.apply(je,x),ae!==void 0&&(on.exports=ae)},87804:function(on,je){var E,x;(function(){var ae;(function(){"use strict";var fe=[,,function(te){function o(h){this.__parent=h,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}o.prototype.clone_empty=function(){var h=new o(this.__parent);return h.set_indent(this.__indent_count,this.__alignment_count),h},o.prototype.item=function(h){return h<0?this.__items[this.__items.length+h]:this.__items[h]},o.prototype.has_match=function(h){for(var g=this.__items.length-1;g>=0;g--)if(this.__items[g].match(h))return!0;return!1},o.prototype.set_indent=function(h,g){this.is_empty()&&(this.__indent_count=h||0,this.__alignment_count=g||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},o.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},o.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},o.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var h=this.__parent.current_line;return h.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),h.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),h.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,h.__items[0]===" "&&(h.__items.splice(0,1),h.__character_count-=1),!0}return!1},o.prototype.is_empty=function(){return this.__items.length===0},o.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},o.prototype.push=function(h){this.__items.push(h);var g=h.lastIndexOf(`
|
|
`);g!==-1?this.__character_count=h.length-g:this.__character_count+=h.length},o.prototype.pop=function(){var h=null;return this.is_empty()||(h=this.__items.pop(),this.__character_count-=h.length),h},o.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},o.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},o.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},o.prototype.toString=function(){var h="";return this.is_empty()?this.__parent.indent_empty_lines&&(h=this.__parent.get_indent_string(this.__indent_count)):(h=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),h+=this.__items.join("")),h};function y(h,g){this.__cache=[""],this.__indent_size=h.indent_size,this.__indent_string=h.indent_char,h.indent_with_tabs||(this.__indent_string=new Array(h.indent_size+1).join(h.indent_char)),g=g||"",h.indent_level>0&&(g=new Array(h.indent_level+1).join(this.__indent_string)),this.__base_string=g,this.__base_string_length=g.length}y.prototype.get_indent_size=function(h,g){var _=this.__base_string_length;return g=g||0,h<0&&(_=0),_+=h*this.__indent_size,_+=g,_},y.prototype.get_indent_string=function(h,g){var _=this.__base_string;return g=g||0,h<0&&(h=0,_=""),g+=h*this.__indent_size,this.__ensure_cache(g),_+=this.__cache[g],_},y.prototype.__ensure_cache=function(h){for(;h>=this.__cache.length;)this.__add_column()},y.prototype.__add_column=function(){var h=this.__cache.length,g=0,_="";this.__indent_size&&h>=this.__indent_size&&(g=Math.floor(h/this.__indent_size),h-=g*this.__indent_size,_=new Array(g+1).join(this.__indent_string)),h&&(_+=new Array(h+1).join(" ")),this.__cache.push(_)};function C(h,g){this.__indent_cache=new y(h,g),this.raw=!1,this._end_with_newline=h.end_with_newline,this.indent_size=h.indent_size,this.wrap_line_length=h.wrap_line_length,this.indent_empty_lines=h.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}C.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},C.prototype.get_line_number=function(){return this.__lines.length},C.prototype.get_indent_string=function(h,g){return this.__indent_cache.get_indent_string(h,g)},C.prototype.get_indent_size=function(h,g){return this.__indent_cache.get_indent_size(h,g)},C.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},C.prototype.add_new_line=function(h){return this.is_empty()||!h&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},C.prototype.get_code=function(h){this.trim(!0);var g=this.current_line.pop();g&&(g[g.length-1]===`
|
|
`&&(g=g.replace(/\n+$/g,"")),this.current_line.push(g)),this._end_with_newline&&this.__add_outputline();var _=this.__lines.join(`
|
|
`);return h!==`
|
|
`&&(_=_.replace(/[\n]/g,h)),_},C.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},C.prototype.set_indent=function(h,g){return h=h||0,g=g||0,this.next_line.set_indent(h,g),this.__lines.length>1?(this.current_line.set_indent(h,g),!0):(this.current_line.set_indent(),!1)},C.prototype.add_raw_token=function(h){for(var g=0;g<h.newlines;g++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(h.whitespace_before),this.current_line.push(h.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},C.prototype.add_token=function(h){this.__add_space_before_token(),this.current_line.push(h),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},C.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},C.prototype.remove_indent=function(h){for(var g=this.__lines.length;h<g;)this.__lines[h]._remove_indent(),h++;this.current_line._remove_wrap_indent()},C.prototype.trim=function(h){for(h=h===void 0?!1:h,this.current_line.trim();h&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},C.prototype.just_added_newline=function(){return this.current_line.is_empty()},C.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},C.prototype.ensure_empty_line_above=function(h,g){for(var _=this.__lines.length-2;_>=0;){var S=this.__lines[_];if(S.is_empty())break;if(S.item(0).indexOf(h)!==0&&S.item(-1)!==g){this.__lines.splice(_+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}_--}},te.exports.Output=C},,,,function(te){function o(h,g){this.raw_options=y(h,g),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}o.prototype._get_array=function(h,g){var _=this.raw_options[h],S=g||[];return typeof _=="object"?_!==null&&typeof _.concat=="function"&&(S=_.concat()):typeof _=="string"&&(S=_.split(/[^a-zA-Z0-9_\/\-]+/)),S},o.prototype._get_boolean=function(h,g){var _=this.raw_options[h],S=_===void 0?!!g:!!_;return S},o.prototype._get_characters=function(h,g){var _=this.raw_options[h],S=g||"";return typeof _=="string"&&(S=_.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),S},o.prototype._get_number=function(h,g){var _=this.raw_options[h];g=parseInt(g,10),isNaN(g)&&(g=0);var S=parseInt(_,10);return isNaN(S)&&(S=g),S},o.prototype._get_selection=function(h,g,_){var S=this._get_selection_list(h,g,_);if(S.length!==1)throw new Error("Invalid Option Value: The option '"+h+`' can only be one of the following values:
|
|
`+g+`
|
|
You passed in: '`+this.raw_options[h]+"'");return S[0]},o.prototype._get_selection_list=function(h,g,_){if(!g||g.length===0)throw new Error("Selection list cannot be empty.");if(_=_||[g[0]],!this._is_valid_selection(_,g))throw new Error("Invalid Default Value!");var S=this._get_array(h,_);if(!this._is_valid_selection(S,g))throw new Error("Invalid Option Value: The option '"+h+`' can contain only the following values:
|
|
`+g+`
|
|
You passed in: '`+this.raw_options[h]+"'");return S},o.prototype._is_valid_selection=function(h,g){return h.length&&g.length&&!h.some(function(_){return g.indexOf(_)===-1})};function y(h,g){var _={};h=C(h);var S;for(S in h)S!==g&&(_[S]=h[S]);if(g&&h[g])for(S in h[g])_[S]=h[g][S];return _}function C(h){var g={},_;for(_ in h){var S=_.replace(/-/g,"_");g[S]=h[_]}return g}te.exports.Options=o,te.exports.normalizeOpts=C,te.exports.mergeOpts=y},,function(te){var o=RegExp.prototype.hasOwnProperty("sticky");function y(C){this.__input=C||"",this.__input_length=this.__input.length,this.__position=0}y.prototype.restart=function(){this.__position=0},y.prototype.back=function(){this.__position>0&&(this.__position-=1)},y.prototype.hasNext=function(){return this.__position<this.__input_length},y.prototype.next=function(){var C=null;return this.hasNext()&&(C=this.__input.charAt(this.__position),this.__position+=1),C},y.prototype.peek=function(C){var h=null;return C=C||0,C+=this.__position,C>=0&&C<this.__input_length&&(h=this.__input.charAt(C)),h},y.prototype.__match=function(C,h){C.lastIndex=h;var g=C.exec(this.__input);return g&&!(o&&C.sticky)&&g.index!==h&&(g=null),g},y.prototype.test=function(C,h){return h=h||0,h+=this.__position,h>=0&&h<this.__input_length?!!this.__match(C,h):!1},y.prototype.testChar=function(C,h){var g=this.peek(h);return C.lastIndex=0,g!==null&&C.test(g)},y.prototype.match=function(C){var h=this.__match(C,this.__position);return h?this.__position+=h[0].length:h=null,h},y.prototype.read=function(C,h,g){var _="",S;return C&&(S=this.match(C),S&&(_+=S[0])),h&&(S||!C)&&(_+=this.readUntil(h,g)),_},y.prototype.readUntil=function(C,h){var g="",_=this.__position;C.lastIndex=this.__position;var S=C.exec(this.__input);return S?(_=S.index,h&&(_+=S[0].length)):_=this.__input_length,g=this.__input.substring(this.__position,_),this.__position=_,g},y.prototype.readUntilAfter=function(C){return this.readUntil(C,!0)},y.prototype.get_regexp=function(C,h){var g=null,_="g";return h&&o&&(_="y"),typeof C=="string"&&C!==""?g=new RegExp(C,_):C&&(g=new RegExp(C.source,_)),g},y.prototype.get_literal_regexp=function(C){return RegExp(C.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},y.prototype.peekUntilAfter=function(C){var h=this.__position,g=this.readUntilAfter(C);return this.__position=h,g},y.prototype.lookBack=function(C){var h=this.__position-1;return h>=C.length&&this.__input.substring(h-C.length,h).toLowerCase()===C},te.exports.InputScanner=y},,,,,function(te){function o(y,C){y=typeof y=="string"?y:y.source,C=typeof C=="string"?C:C.source,this.__directives_block_pattern=new RegExp(y+/ beautify( \w+[:]\w+)+ /.source+C,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(y+/\sbeautify\signore:end\s/.source+C,"g")}o.prototype.get_directives=function(y){if(!y.match(this.__directives_block_pattern))return null;var C={};this.__directive_pattern.lastIndex=0;for(var h=this.__directive_pattern.exec(y);h;)C[h[1]]=h[2],h=this.__directive_pattern.exec(y);return C},o.prototype.readIgnored=function(y){return y.readUntilAfter(this.__directives_end_ignore_pattern)},te.exports.Directives=o},,function(te,o,y){var C=y(16).Beautifier,h=y(17).Options;function g(_,S){var L=new C(_,S);return L.beautify()}te.exports=g,te.exports.defaultOptions=function(){return new h}},function(te,o,y){var C=y(17).Options,h=y(2).Output,g=y(8).InputScanner,_=y(13).Directives,S=new _(/\/\*/,/\*\//),L=/\r\n|[\r\n]/,N=/\r\n|[\r\n]/g,H=/\s/,R=/(?:\s|\n)+/g,k=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,T=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function A(J,ee){this._source_text=J||"",this._options=new C(ee),this._ch=null,this._input=null,this.NESTED_AT_RULE={page:!0,"font-face":!0,keyframes:!0,media:!0,supports:!0,document:!0},this.CONDITIONAL_GROUP_RULE={media:!0,supports:!0,document:!0},this.NON_SEMICOLON_NEWLINE_PROPERTY=["grid-template-areas","grid-template"]}A.prototype.eatString=function(J){var ee="";for(this._ch=this._input.next();this._ch;){if(ee+=this._ch,this._ch==="\\")ee+=this._input.next();else if(J.indexOf(this._ch)!==-1||this._ch===`
|
|
`)break;this._ch=this._input.next()}return ee},A.prototype.eatWhitespace=function(J){for(var ee=H.test(this._input.peek()),G=0;H.test(this._input.peek());)this._ch=this._input.next(),J&&this._ch===`
|
|
`&&(G===0||G<this._options.max_preserve_newlines)&&(G++,this._output.add_new_line(!0));return ee},A.prototype.foundNestedPseudoClass=function(){for(var J=0,ee=1,G=this._input.peek(ee);G;){if(G==="{")return!0;if(G==="(")J+=1;else if(G===")"){if(J===0)return!1;J-=1}else if(G===";"||G==="}")return!1;ee++,G=this._input.peek(ee)}return!1},A.prototype.print_string=function(J){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(J)},A.prototype.preserveSingleSpace=function(J){J&&(this._output.space_before_token=!0)},A.prototype.indent=function(){this._indentLevel++},A.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},A.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var J=this._source_text,ee=this._options.eol;ee==="auto"&&(ee=`
|
|
`,J&&L.test(J||"")&&(ee=J.match(L)[0])),J=J.replace(N,`
|
|
`);var G=J.match(/^[\t ]*/)[0];this._output=new h(this._options,G),this._input=new g(J),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var I=0,re=!1,le=!1,Te=!1,W=!1,O=!1,Q=this._ch,q=!1,ie,V,v;ie=this._input.read(R),V=ie!=="",v=Q,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),Q=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var m=this._input.read(k),U=S.get_directives(m);U&&U.ignore==="start"&&(m+=S.readIgnored(this._input)),this.print_string(m),this.eatWhitespace(!0),this._output.add_new_line()}else if(this._ch==="/"&&this._input.peek()==="/")this._output.space_before_token=!0,this._input.back(),this.print_string(this._input.read(T)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(V),this.print_string(this._ch);var se=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);se.match(/[ :]$/)&&(se=this.eatString(": ").replace(/\s+$/,""),this.print_string(se),this._output.space_before_token=!0),I===0&&se.indexOf(":")!==-1&&(le=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(V),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var pe=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);pe.match(/[ :]$/)&&(pe=this.eatString(": ").replace(/\s+$/,""),this.print_string(pe),this._output.space_before_token=!0),I===0&&pe.indexOf(":")!==-1?(le=!0,this.indent()):pe in this.NESTED_AT_RULE?(this._nestedLevel+=1,pe in this.CONDITIONAL_GROUP_RULE&&(Te=!0)):I===0&&!le&&(W=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(V),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")le&&(le=!1,this.outdent()),W=!1,Te?(Te=!1,re=this._indentLevel>=this._nestedLevel):re=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&re&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(v==="("?this._output.space_before_token=!1:v!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),v==="{"&&this._output.trim(!0),le&&(this.outdent(),le=!1),this.print_string(this._ch),re=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var He=0;He<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;He++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[He])){q=!0;break}(re||Te)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!W&&I===0?(this.print_string(":"),le||(le=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var qe=v==='"'||v==="'";this.preserveSingleSpace(qe||V),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")q=!1,I===0?(le&&(this.outdent(),le=!1),W=!1,this.print_string(this._ch),this.eatWhitespace(!0),this._input.peek()!=="/"&&this._output.add_new_line()):(this.print_string(this._ch),this.eatWhitespace(!0),this._output.space_before_token=!0);else if(this._ch==="(")if(this._input.lookBack("url"))this.print_string(this._ch),this.eatWhitespace(),I++,this.indent(),this._ch=this._input.next(),this._ch===")"||this._ch==='"'||this._ch==="'"?this._input.back():this._ch&&(this.print_string(this._ch+this.eatString(")")),I&&(I--,this.outdent()));else{var ot=!1;this._input.lookBack("with")&&(ot=!0),this.preserveSingleSpace(V||ot),this.print_string(this._ch),le&&v==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),O=!0):(this.eatWhitespace(),I++,this.indent())}else if(this._ch===")")I&&(I--,this.outdent()),O&&this._input.peek()===";"&&this._options.selector_separator_newline&&(O=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!le||O)&&I===0&&!W?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!le&&I===0)this._options.space_around_combinator?(this._output.space_before_token=!0,this.print_string(this._ch),this._output.space_before_token=!0):(this.print_string(this._ch),this.eatWhitespace(),this._ch&&H.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(V),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),H.test(this._ch)&&(this._ch="");else if(this._ch==="!"&&!this._input.lookBack("\\"))this._output.space_before_token=!0,this.print_string(this._ch);else{var Ot=v==='"'||v==="'";this.preserveSingleSpace(Ot||V),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
`&&q&&this._output.add_new_line()}var bt=this._output.get_code(ee);return bt},te.exports.Beautifier=A},function(te,o,y){var C=y(6).Options;function h(g){C.call(this,g,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var _=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||_;var S=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var L=0;L<S.length;L++)S[L]!=="expand"?this.brace_style="collapse":this.brace_style=S[L]}h.prototype=new C,te.exports.Options=h}],F={};function f(te){var o=F[te];if(o!==void 0)return o.exports;var y=F[te]={exports:{}};return fe[te](y,y.exports,f),y.exports}var ue=f(15);ae=ue})();var ve=ae;E=[],x=function(){return{css_beautify:ve}}.apply(je,E),x!==void 0&&(on.exports=x)})()},40998:function(on,je,E){var x,ae;(function(){var ve;(function(){"use strict";var ue=[,,function(C){function h(S){this.__parent=S,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}h.prototype.clone_empty=function(){var S=new h(this.__parent);return S.set_indent(this.__indent_count,this.__alignment_count),S},h.prototype.item=function(S){return S<0?this.__items[this.__items.length+S]:this.__items[S]},h.prototype.has_match=function(S){for(var L=this.__items.length-1;L>=0;L--)if(this.__items[L].match(S))return!0;return!1},h.prototype.set_indent=function(S,L){this.is_empty()&&(this.__indent_count=S||0,this.__alignment_count=L||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},h.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},h.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},h.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var S=this.__parent.current_line;return S.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),S.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),S.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,S.__items[0]===" "&&(S.__items.splice(0,1),S.__character_count-=1),!0}return!1},h.prototype.is_empty=function(){return this.__items.length===0},h.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},h.prototype.push=function(S){this.__items.push(S);var L=S.lastIndexOf(`
|
|
`);L!==-1?this.__character_count=S.length-L:this.__character_count+=S.length},h.prototype.pop=function(){var S=null;return this.is_empty()||(S=this.__items.pop(),this.__character_count-=S.length),S},h.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},h.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},h.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},h.prototype.toString=function(){var S="";return this.is_empty()?this.__parent.indent_empty_lines&&(S=this.__parent.get_indent_string(this.__indent_count)):(S=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),S+=this.__items.join("")),S};function g(S,L){this.__cache=[""],this.__indent_size=S.indent_size,this.__indent_string=S.indent_char,S.indent_with_tabs||(this.__indent_string=new Array(S.indent_size+1).join(S.indent_char)),L=L||"",S.indent_level>0&&(L=new Array(S.indent_level+1).join(this.__indent_string)),this.__base_string=L,this.__base_string_length=L.length}g.prototype.get_indent_size=function(S,L){var N=this.__base_string_length;return L=L||0,S<0&&(N=0),N+=S*this.__indent_size,N+=L,N},g.prototype.get_indent_string=function(S,L){var N=this.__base_string;return L=L||0,S<0&&(S=0,N=""),L+=S*this.__indent_size,this.__ensure_cache(L),N+=this.__cache[L],N},g.prototype.__ensure_cache=function(S){for(;S>=this.__cache.length;)this.__add_column()},g.prototype.__add_column=function(){var S=this.__cache.length,L=0,N="";this.__indent_size&&S>=this.__indent_size&&(L=Math.floor(S/this.__indent_size),S-=L*this.__indent_size,N=new Array(L+1).join(this.__indent_string)),S&&(N+=new Array(S+1).join(" ")),this.__cache.push(N)};function _(S,L){this.__indent_cache=new g(S,L),this.raw=!1,this._end_with_newline=S.end_with_newline,this.indent_size=S.indent_size,this.wrap_line_length=S.wrap_line_length,this.indent_empty_lines=S.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new h(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}_.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},_.prototype.get_line_number=function(){return this.__lines.length},_.prototype.get_indent_string=function(S,L){return this.__indent_cache.get_indent_string(S,L)},_.prototype.get_indent_size=function(S,L){return this.__indent_cache.get_indent_size(S,L)},_.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},_.prototype.add_new_line=function(S){return this.is_empty()||!S&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},_.prototype.get_code=function(S){this.trim(!0);var L=this.current_line.pop();L&&(L[L.length-1]===`
|
|
`&&(L=L.replace(/\n+$/g,"")),this.current_line.push(L)),this._end_with_newline&&this.__add_outputline();var N=this.__lines.join(`
|
|
`);return S!==`
|
|
`&&(N=N.replace(/[\n]/g,S)),N},_.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},_.prototype.set_indent=function(S,L){return S=S||0,L=L||0,this.next_line.set_indent(S,L),this.__lines.length>1?(this.current_line.set_indent(S,L),!0):(this.current_line.set_indent(),!1)},_.prototype.add_raw_token=function(S){for(var L=0;L<S.newlines;L++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(S.whitespace_before),this.current_line.push(S.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},_.prototype.add_token=function(S){this.__add_space_before_token(),this.current_line.push(S),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},_.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},_.prototype.remove_indent=function(S){for(var L=this.__lines.length;S<L;)this.__lines[S]._remove_indent(),S++;this.current_line._remove_wrap_indent()},_.prototype.trim=function(S){for(S=S===void 0?!1:S,this.current_line.trim();S&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},_.prototype.just_added_newline=function(){return this.current_line.is_empty()},_.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},_.prototype.ensure_empty_line_above=function(S,L){for(var N=this.__lines.length-2;N>=0;){var H=this.__lines[N];if(H.is_empty())break;if(H.item(0).indexOf(S)!==0&&H.item(-1)!==L){this.__lines.splice(N+1,0,new h(this)),this.previous_line=this.__lines[this.__lines.length-2];break}N--}},C.exports.Output=_},function(C){function h(g,_,S,L){this.type=g,this.text=_,this.comments_before=null,this.newlines=S||0,this.whitespace_before=L||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}C.exports.Token=h},,,function(C){function h(S,L){this.raw_options=g(S,L),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}h.prototype._get_array=function(S,L){var N=this.raw_options[S],H=L||[];return typeof N=="object"?N!==null&&typeof N.concat=="function"&&(H=N.concat()):typeof N=="string"&&(H=N.split(/[^a-zA-Z0-9_\/\-]+/)),H},h.prototype._get_boolean=function(S,L){var N=this.raw_options[S],H=N===void 0?!!L:!!N;return H},h.prototype._get_characters=function(S,L){var N=this.raw_options[S],H=L||"";return typeof N=="string"&&(H=N.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),H},h.prototype._get_number=function(S,L){var N=this.raw_options[S];L=parseInt(L,10),isNaN(L)&&(L=0);var H=parseInt(N,10);return isNaN(H)&&(H=L),H},h.prototype._get_selection=function(S,L,N){var H=this._get_selection_list(S,L,N);if(H.length!==1)throw new Error("Invalid Option Value: The option '"+S+`' can only be one of the following values:
|
|
`+L+`
|
|
You passed in: '`+this.raw_options[S]+"'");return H[0]},h.prototype._get_selection_list=function(S,L,N){if(!L||L.length===0)throw new Error("Selection list cannot be empty.");if(N=N||[L[0]],!this._is_valid_selection(N,L))throw new Error("Invalid Default Value!");var H=this._get_array(S,N);if(!this._is_valid_selection(H,L))throw new Error("Invalid Option Value: The option '"+S+`' can contain only the following values:
|
|
`+L+`
|
|
You passed in: '`+this.raw_options[S]+"'");return H},h.prototype._is_valid_selection=function(S,L){return S.length&&L.length&&!S.some(function(N){return L.indexOf(N)===-1})};function g(S,L){var N={};S=_(S);var H;for(H in S)H!==L&&(N[H]=S[H]);if(L&&S[L])for(H in S[L])N[H]=S[L][H];return N}function _(S){var L={},N;for(N in S){var H=N.replace(/-/g,"_");L[H]=S[N]}return L}C.exports.Options=h,C.exports.normalizeOpts=_,C.exports.mergeOpts=g},,function(C){var h=RegExp.prototype.hasOwnProperty("sticky");function g(_){this.__input=_||"",this.__input_length=this.__input.length,this.__position=0}g.prototype.restart=function(){this.__position=0},g.prototype.back=function(){this.__position>0&&(this.__position-=1)},g.prototype.hasNext=function(){return this.__position<this.__input_length},g.prototype.next=function(){var _=null;return this.hasNext()&&(_=this.__input.charAt(this.__position),this.__position+=1),_},g.prototype.peek=function(_){var S=null;return _=_||0,_+=this.__position,_>=0&&_<this.__input_length&&(S=this.__input.charAt(_)),S},g.prototype.__match=function(_,S){_.lastIndex=S;var L=_.exec(this.__input);return L&&!(h&&_.sticky)&&L.index!==S&&(L=null),L},g.prototype.test=function(_,S){return S=S||0,S+=this.__position,S>=0&&S<this.__input_length?!!this.__match(_,S):!1},g.prototype.testChar=function(_,S){var L=this.peek(S);return _.lastIndex=0,L!==null&&_.test(L)},g.prototype.match=function(_){var S=this.__match(_,this.__position);return S?this.__position+=S[0].length:S=null,S},g.prototype.read=function(_,S,L){var N="",H;return _&&(H=this.match(_),H&&(N+=H[0])),S&&(H||!_)&&(N+=this.readUntil(S,L)),N},g.prototype.readUntil=function(_,S){var L="",N=this.__position;_.lastIndex=this.__position;var H=_.exec(this.__input);return H?(N=H.index,S&&(N+=H[0].length)):N=this.__input_length,L=this.__input.substring(this.__position,N),this.__position=N,L},g.prototype.readUntilAfter=function(_){return this.readUntil(_,!0)},g.prototype.get_regexp=function(_,S){var L=null,N="g";return S&&h&&(N="y"),typeof _=="string"&&_!==""?L=new RegExp(_,N):_&&(L=new RegExp(_.source,N)),L},g.prototype.get_literal_regexp=function(_){return RegExp(_.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},g.prototype.peekUntilAfter=function(_){var S=this.__position,L=this.readUntilAfter(_);return this.__position=S,L},g.prototype.lookBack=function(_){var S=this.__position-1;return S>=_.length&&this.__input.substring(S-_.length,S).toLowerCase()===_},C.exports.InputScanner=g},function(C,h,g){var _=g(8).InputScanner,S=g(3).Token,L=g(10).TokenStream,N=g(11).WhitespacePattern,H={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},R=function(k,T){this._input=new _(k),this._options=T||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new N(this._input)};R.prototype.tokenize=function(){this._input.restart(),this.__tokens=new L,this._reset();for(var k,T=new S(H.START,""),A=null,J=[],ee=new L;T.type!==H.EOF;){for(k=this._get_next_token(T,A);this._is_comment(k);)ee.add(k),k=this._get_next_token(T,A);ee.isEmpty()||(k.comments_before=ee,ee=new L),k.parent=A,this._is_opening(k)?(J.push(A),A=k):A&&this._is_closing(k,A)&&(k.opened=A,A.closed=k,A=J.pop(),k.parent=A),k.previous=T,T.next=k,this.__tokens.add(k),T=k}return this.__tokens},R.prototype._is_first_token=function(){return this.__tokens.isEmpty()},R.prototype._reset=function(){},R.prototype._get_next_token=function(k,T){this._readWhitespace();var A=this._input.read(/.+/g);return A?this._create_token(H.RAW,A):this._create_token(H.EOF,"")},R.prototype._is_comment=function(k){return!1},R.prototype._is_opening=function(k){return!1},R.prototype._is_closing=function(k,T){return!1},R.prototype._create_token=function(k,T){var A=new S(k,T,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return A},R.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},C.exports.Tokenizer=R,C.exports.TOKEN=H},function(C){function h(g){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=g}h.prototype.restart=function(){this.__position=0},h.prototype.isEmpty=function(){return this.__tokens_length===0},h.prototype.hasNext=function(){return this.__position<this.__tokens_length},h.prototype.next=function(){var g=null;return this.hasNext()&&(g=this.__tokens[this.__position],this.__position+=1),g},h.prototype.peek=function(g){var _=null;return g=g||0,g+=this.__position,g>=0&&g<this.__tokens_length&&(_=this.__tokens[g]),_},h.prototype.add=function(g){this.__parent_token&&(g.parent=this.__parent_token),this.__tokens.push(g),this.__tokens_length+=1},C.exports.TokenStream=h},function(C,h,g){var _=g(12).Pattern;function S(L,N){_.call(this,L,N),N?this._line_regexp=this._input.get_regexp(N._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}S.prototype=new _,S.prototype.__set_whitespace_patterns=function(L,N){L+="\\t ",N+="\\n\\r",this._match_pattern=this._input.get_regexp("["+L+N+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+N+"]")},S.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var L=this._input.read(this._match_pattern);if(L===" ")this.whitespace_before_token=" ";else if(L){var N=this.__split(this._newline_regexp,L);this.newline_count=N.length-1,this.whitespace_before_token=N[this.newline_count]}return L},S.prototype.matching=function(L,N){var H=this._create();return H.__set_whitespace_patterns(L,N),H._update(),H},S.prototype._create=function(){return new S(this._input,this)},S.prototype.__split=function(L,N){L.lastIndex=0;for(var H=0,R=[],k=L.exec(N);k;)R.push(N.substring(H,k.index)),H=k.index+k[0].length,k=L.exec(N);return H<N.length?R.push(N.substring(H,N.length)):R.push(""),R},C.exports.WhitespacePattern=S},function(C){function h(g,_){this._input=g,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,_&&(this._starting_pattern=this._input.get_regexp(_._starting_pattern,!0),this._match_pattern=this._input.get_regexp(_._match_pattern,!0),this._until_pattern=this._input.get_regexp(_._until_pattern),this._until_after=_._until_after)}h.prototype.read=function(){var g=this._input.read(this._starting_pattern);return(!this._starting_pattern||g)&&(g+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),g},h.prototype.read_match=function(){return this._input.match(this._match_pattern)},h.prototype.until_after=function(g){var _=this._create();return _._until_after=!0,_._until_pattern=this._input.get_regexp(g),_._update(),_},h.prototype.until=function(g){var _=this._create();return _._until_after=!1,_._until_pattern=this._input.get_regexp(g),_._update(),_},h.prototype.starting_with=function(g){var _=this._create();return _._starting_pattern=this._input.get_regexp(g,!0),_._update(),_},h.prototype.matching=function(g){var _=this._create();return _._match_pattern=this._input.get_regexp(g,!0),_._update(),_},h.prototype._create=function(){return new h(this._input,this)},h.prototype._update=function(){},C.exports.Pattern=h},function(C){function h(g,_){g=typeof g=="string"?g:g.source,_=typeof _=="string"?_:_.source,this.__directives_block_pattern=new RegExp(g+/ beautify( \w+[:]\w+)+ /.source+_,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(g+/\sbeautify\signore:end\s/.source+_,"g")}h.prototype.get_directives=function(g){if(!g.match(this.__directives_block_pattern))return null;var _={};this.__directive_pattern.lastIndex=0;for(var S=this.__directive_pattern.exec(g);S;)_[S[1]]=S[2],S=this.__directive_pattern.exec(g);return _},h.prototype.readIgnored=function(g){return g.readUntilAfter(this.__directives_end_ignore_pattern)},C.exports.Directives=h},function(C,h,g){var _=g(12).Pattern,S={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function L(N,H){_.call(this,N,H),this.__template_pattern=null,this._disabled=Object.assign({},S),this._excluded=Object.assign({},S),H&&(this.__template_pattern=this._input.get_regexp(H.__template_pattern),this._excluded=Object.assign(this._excluded,H._excluded),this._disabled=Object.assign(this._disabled,H._disabled));var R=new _(N);this.__patterns={handlebars_comment:R.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:R.starting_with(/{{{/).until_after(/}}}/),handlebars:R.starting_with(/{{/).until_after(/}}/),php:R.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:R.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:R.starting_with(/{%/).until_after(/%}/),django_value:R.starting_with(/{{/).until_after(/}}/),django_comment:R.starting_with(/{#/).until_after(/#}/),smarty:R.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:R.starting_with(/{\*/).until_after(/\*}/),smarty_literal:R.starting_with(/{literal}/).until_after(/{\/literal}/)}}L.prototype=new _,L.prototype._create=function(){return new L(this._input,this)},L.prototype._update=function(){this.__set_templated_pattern()},L.prototype.disable=function(N){var H=this._create();return H._disabled[N]=!0,H._update(),H},L.prototype.read_options=function(N){var H=this._create();for(var R in S)H._disabled[R]=N.templating.indexOf(R)===-1;return H._update(),H},L.prototype.exclude=function(N){var H=this._create();return H._excluded[N]=!0,H._update(),H},L.prototype.read=function(){var N="";this._match_pattern?N=this._input.read(this._starting_pattern):N=this._input.read(this._starting_pattern,this.__template_pattern);for(var H=this._read_template();H;)this._match_pattern?H+=this._input.read(this._match_pattern):H+=this._input.readUntil(this.__template_pattern),N+=H,H=this._read_template();return this._until_after&&(N+=this._input.readUntilAfter(this._until_pattern)),N},L.prototype.__set_templated_pattern=function(){var N=[];this._disabled.php||N.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||N.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||N.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||N.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(N.push(this.__patterns.django._starting_pattern.source),N.push(this.__patterns.django_value._starting_pattern.source),N.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||N.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&N.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+N.join("|")+")")},L.prototype._read_template=function(){var N="",H=this._input.peek();if(H==="<"){var R=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&R==="?"&&(N=N||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&R==="%"&&(N=N||this.__patterns.erb.read())}else H==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(N=N||this.__patterns.handlebars_comment.read(),N=N||this.__patterns.handlebars_unescaped.read(),N=N||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(N=N||this.__patterns.django_value.read()),this._excluded.django||(N=N||this.__patterns.django_comment.read(),N=N||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(N=N||this.__patterns.smarty_comment.read(),N=N||this.__patterns.smarty_literal.read(),N=N||this.__patterns.smarty.read()));return N},C.exports.TemplatablePattern=L},,,,function(C,h,g){var _=g(19).Beautifier,S=g(20).Options;function L(N,H,R,k){var T=new _(N,H,R,k);return T.beautify()}C.exports=L,C.exports.defaultOptions=function(){return new S}},function(C,h,g){var _=g(20).Options,S=g(2).Output,L=g(21).Tokenizer,N=g(21).TOKEN,H=/\r\n|[\r\n]/,R=/\r\n|[\r\n]/g,k=function(W,O){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=W.max_preserve_newlines,this.preserve_newlines=W.preserve_newlines,this._output=new S(W,O)};k.prototype.current_line_has_match=function(W){return this._output.current_line.has_match(W)},k.prototype.set_space_before_token=function(W,O){this._output.space_before_token=W,this._output.non_breaking_space=O},k.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},k.prototype.add_raw_token=function(W){this._output.add_raw_token(W)},k.prototype.print_preserved_newlines=function(W){var O=0;W.type!==N.TEXT&&W.previous.type!==N.TEXT&&(O=W.newlines?1:0),this.preserve_newlines&&(O=W.newlines<this.max_preserve_newlines+1?W.newlines:this.max_preserve_newlines+1);for(var Q=0;Q<O;Q++)this.print_newline(Q>0);return O!==0},k.prototype.traverse_whitespace=function(W){return W.whitespace_before||W.newlines?(this.print_preserved_newlines(W)||(this._output.space_before_token=!0),!0):!1},k.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},k.prototype.print_newline=function(W){this._output.add_new_line(W)},k.prototype.print_token=function(W){W.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(W.text))},k.prototype.indent=function(){this.indent_level++},k.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},k.prototype.get_full_indent=function(W){return W=this.indent_level+(W||0),W<1?"":this._output.get_indent_string(W)};var T=function(W){for(var O=null,Q=W.next;Q.type!==N.EOF&&W.closed!==Q;){if(Q.type===N.ATTRIBUTE&&Q.text==="type"){Q.next&&Q.next.type===N.EQUALS&&Q.next.next&&Q.next.next.type===N.VALUE&&(O=Q.next.next.text);break}Q=Q.next}return O},A=function(W,O){var Q=null,q=null;return O.closed?(W==="script"?Q="text/javascript":W==="style"&&(Q="text/css"),Q=T(O)||Q,Q.search("text/css")>-1?q="css":Q.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?q="javascript":Q.search(/(text|application|dojo)\/(x-)?(html)/)>-1?q="html":Q.search(/test\/null/)>-1&&(q="null"),q):null};function J(W,O){return O.indexOf(W)!==-1}function ee(W,O,Q){this.parent=W||null,this.tag=O?O.tag_name:"",this.indent_level=Q||0,this.parser_token=O||null}function G(W){this._printer=W,this._current_frame=null}G.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},G.prototype.record_tag=function(W){var O=new ee(this._current_frame,W,this._printer.indent_level);this._current_frame=O},G.prototype._try_pop_frame=function(W){var O=null;return W&&(O=W.parser_token,this._printer.indent_level=W.indent_level,this._current_frame=W.parent),O},G.prototype._get_frame=function(W,O){for(var Q=this._current_frame;Q&&W.indexOf(Q.tag)===-1;){if(O&&O.indexOf(Q.tag)!==-1){Q=null;break}Q=Q.parent}return Q},G.prototype.try_pop=function(W,O){var Q=this._get_frame([W],O);return this._try_pop_frame(Q)},G.prototype.indent_to_tag=function(W){var O=this._get_frame(W);O&&(this._printer.indent_level=O.indent_level)};function I(W,O,Q,q){this._source_text=W||"",O=O||{},this._js_beautify=Q,this._css_beautify=q,this._tag_stack=null;var ie=new _(O,"html");this._options=ie,this._is_wrap_attributes_force=this._options.wrap_attributes.substr(0,5)==="force",this._is_wrap_attributes_force_expand_multiline=this._options.wrap_attributes==="force-expand-multiline",this._is_wrap_attributes_force_aligned=this._options.wrap_attributes==="force-aligned",this._is_wrap_attributes_aligned_multiple=this._options.wrap_attributes==="aligned-multiple",this._is_wrap_attributes_preserve=this._options.wrap_attributes.substr(0,8)==="preserve",this._is_wrap_attributes_preserve_aligned=this._options.wrap_attributes==="preserve-aligned"}I.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var W=this._source_text,O=this._options.eol;this._options.eol==="auto"&&(O=`
|
|
`,W&&H.test(W)&&(O=W.match(H)[0])),W=W.replace(R,`
|
|
`);var Q=W.match(/^[\t ]*/)[0],q={text:"",type:""},ie=new re(this._options),V=new k(this._options,Q),v=new L(W,this._options).tokenize();this._tag_stack=new G(V);for(var m=null,U=v.next();U.type!==N.EOF;)U.type===N.TAG_OPEN||U.type===N.COMMENT?(m=this._handle_tag_open(V,U,ie,q,v),ie=m):U.type===N.ATTRIBUTE||U.type===N.EQUALS||U.type===N.VALUE||U.type===N.TEXT&&!ie.tag_complete?m=this._handle_inside_tag(V,U,ie,q):U.type===N.TAG_CLOSE?m=this._handle_tag_close(V,U,ie):U.type===N.TEXT?m=this._handle_text(V,U,ie):U.type===N.CONTROL_FLOW_OPEN?m=this._handle_control_flow_open(V,U):U.type===N.CONTROL_FLOW_CLOSE?m=this._handle_control_flow_close(V,U):V.add_raw_token(U),q=m,U=v.next();var se=V._output.get_code(O);return se},I.prototype._handle_control_flow_open=function(W,O){var Q={text:O.text,type:O.type};return W.set_space_before_token(O.newlines||O.whitespace_before!=="",!0),O.newlines?W.print_preserved_newlines(O):W.set_space_before_token(O.newlines||O.whitespace_before!=="",!0),W.print_token(O),W.indent(),Q},I.prototype._handle_control_flow_close=function(W,O){var Q={text:O.text,type:O.type};return W.deindent(),O.newlines?W.print_preserved_newlines(O):W.set_space_before_token(O.newlines||O.whitespace_before!=="",!0),W.print_token(O),Q},I.prototype._handle_tag_close=function(W,O,Q){var q={text:O.text,type:O.type};return W.alignment_size=0,Q.tag_complete=!0,W.set_space_before_token(O.newlines||O.whitespace_before!=="",!0),Q.is_unformatted?W.add_raw_token(O):(Q.tag_start_char==="<"&&(W.set_space_before_token(O.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&Q.has_wrapped_attrs&&W.print_newline(!1)),W.print_token(O)),Q.indent_content&&!(Q.is_unformatted||Q.is_content_unformatted)&&(W.indent(),Q.indent_content=!1),!Q.is_inline_element&&!(Q.is_unformatted||Q.is_content_unformatted)&&W.set_wrap_point(),q},I.prototype._handle_inside_tag=function(W,O,Q,q){var ie=Q.has_wrapped_attrs,V={text:O.text,type:O.type};return W.set_space_before_token(O.newlines||O.whitespace_before!=="",!0),Q.is_unformatted?W.add_raw_token(O):Q.tag_start_char==="{"&&O.type===N.TEXT?W.print_preserved_newlines(O)?(O.newlines=0,W.add_raw_token(O)):W.print_token(O):(O.type===N.ATTRIBUTE?W.set_space_before_token(!0):(O.type===N.EQUALS||O.type===N.VALUE&&O.previous.type===N.EQUALS)&&W.set_space_before_token(!1),O.type===N.ATTRIBUTE&&Q.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(W.traverse_whitespace(O),ie=ie||O.newlines!==0),this._is_wrap_attributes_force&&Q.attr_count>=this._options.wrap_attributes_min_attrs&&(q.type!==N.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(W.print_newline(!1),ie=!0)),W.print_token(O),ie=ie||W.previous_token_wrapped(),Q.has_wrapped_attrs=ie),V},I.prototype._handle_text=function(W,O,Q){var q={text:O.text,type:"TK_CONTENT"};return Q.custom_beautifier_name?this._print_custom_beatifier_text(W,O,Q):Q.is_unformatted||Q.is_content_unformatted?W.add_raw_token(O):(W.traverse_whitespace(O),W.print_token(O)),q},I.prototype._print_custom_beatifier_text=function(W,O,Q){var q=this;if(O.text!==""){var ie=O.text,V,v=1,m="",U="";Q.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?V=this._js_beautify:Q.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?V=this._css_beautify:Q.custom_beautifier_name==="html"&&(V=function(Ot,bt){var xe=new I(Ot,bt,q._js_beautify,q._css_beautify);return xe.beautify()}),this._options.indent_scripts==="keep"?v=0:this._options.indent_scripts==="separate"&&(v=-W.indent_level);var se=W.get_full_indent(v);if(ie=ie.replace(/\n[ \t]*$/,""),Q.custom_beautifier_name!=="html"&&ie[0]==="<"&&ie.match(/^(<!--|<!\[CDATA\[)/)){var pe=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(ie);if(!pe){W.add_raw_token(O);return}m=se+pe[1]+`
|
|
`,ie=pe[4],pe[5]&&(U=se+pe[5]),ie=ie.replace(/\n[ \t]*$/,""),(pe[2]||pe[3].indexOf(`
|
|
`)!==-1)&&(pe=pe[3].match(/[ \t]+$/),pe&&(O.whitespace_before=pe[0]))}if(ie)if(V){var He=function(){this.eol=`
|
|
`};He.prototype=this._options.raw_options;var qe=new He;ie=V(se+ie,qe)}else{var ot=O.whitespace_before;ot&&(ie=ie.replace(new RegExp(`
|
|
(`+ot+")?","g"),`
|
|
`)),ie=se+ie.replace(/\n/g,`
|
|
`+se)}m&&(ie?ie=m+ie+`
|
|
`+U:ie=m+U),W.print_newline(!1),ie&&(O.text=ie,O.whitespace_before="",O.newlines=0,W.add_raw_token(O),W.print_newline(!0))}},I.prototype._handle_tag_open=function(W,O,Q,q,ie){var V=this._get_tag_open_token(O);if((Q.is_unformatted||Q.is_content_unformatted)&&!Q.is_empty_element&&O.type===N.TAG_OPEN&&!V.is_start_tag?(W.add_raw_token(O),V.start_tag_token=this._tag_stack.try_pop(V.tag_name)):(W.traverse_whitespace(O),this._set_tag_position(W,O,V,Q,q),V.is_inline_element||W.set_wrap_point(),W.print_token(O)),V.is_start_tag&&this._is_wrap_attributes_force){var v=0,m;do m=ie.peek(v),m.type===N.ATTRIBUTE&&(V.attr_count+=1),v+=1;while(m.type!==N.EOF&&m.type!==N.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(V.alignment_size=O.text.length+1),!V.tag_complete&&!V.is_unformatted&&(W.alignment_size=V.alignment_size),V};var re=function(W,O,Q){if(this.parent=O||null,this.text="",this.type="TK_TAG_OPEN",this.tag_name="",this.is_inline_element=!1,this.is_unformatted=!1,this.is_content_unformatted=!1,this.is_empty_element=!1,this.is_start_tag=!1,this.is_end_tag=!1,this.indent_content=!1,this.multiline_content=!1,this.custom_beautifier_name=null,this.start_tag_token=null,this.attr_count=0,this.has_wrapped_attrs=!1,this.alignment_size=0,this.tag_complete=!1,this.tag_start_char="",this.tag_check="",!Q)this.tag_complete=!0;else{var q;this.tag_start_char=Q.text[0],this.text=Q.text,this.tag_start_char==="<"?(q=Q.text.match(/^<([^\s>]*)/),this.tag_check=q?q[1]:""):(q=Q.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=q?q[1]:"",(Q.text.startsWith("{{#>")||Q.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&Q.next!==null?this.tag_check=Q.next.text.split(" ")[0]:this.tag_check=Q.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),Q.type===N.COMMENT&&(this.tag_complete=!0),this.is_start_tag=this.tag_check.charAt(0)!=="/",this.tag_name=this.is_start_tag?this.tag_check:this.tag_check.substr(1),this.is_end_tag=!this.is_start_tag||Q.closed&&Q.closed.text==="/>";var ie=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(ie=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!W.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(ie)))}};I.prototype._get_tag_open_token=function(W){var O=new re(this._options,this._tag_stack.get_parser_token(),W);return O.alignment_size=this._options.wrap_attributes_indent_size,O.is_end_tag=O.is_end_tag||J(O.tag_check,this._options.void_elements),O.is_empty_element=O.tag_complete||O.is_start_tag&&O.is_end_tag,O.is_unformatted=!O.tag_complete&&J(O.tag_check,this._options.unformatted),O.is_content_unformatted=!O.is_empty_element&&J(O.tag_check,this._options.content_unformatted),O.is_inline_element=J(O.tag_name,this._options.inline)||this._options.inline_custom_elements&&O.tag_name.includes("-")||O.tag_start_char==="{",O},I.prototype._set_tag_position=function(W,O,Q,q,ie){if(Q.is_empty_element||(Q.is_end_tag?Q.start_tag_token=this._tag_stack.try_pop(Q.tag_name):(this._do_optional_end_element(Q)&&(Q.is_inline_element||W.print_newline(!1)),this._tag_stack.record_tag(Q),(Q.tag_name==="script"||Q.tag_name==="style")&&!(Q.is_unformatted||Q.is_content_unformatted)&&(Q.custom_beautifier_name=A(Q.tag_check,O)))),J(Q.tag_check,this._options.extra_liners)&&(W.print_newline(!1),W._output.just_added_blankline()||W.print_newline(!0)),Q.is_empty_element){if(Q.tag_start_char==="{"&&Q.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),Q.indent_content=!0;var V=W.current_line_has_match(/{{#if/);V||W.print_newline(!1)}Q.tag_name==="!--"&&ie.type===N.TAG_CLOSE&&q.is_end_tag&&Q.text.indexOf(`
|
|
`)===-1||(Q.is_inline_element||Q.is_unformatted||W.print_newline(!1),this._calcluate_parent_multiline(W,Q))}else if(Q.is_end_tag){var v=!1;v=Q.start_tag_token&&Q.start_tag_token.multiline_content,v=v||!Q.is_inline_element&&!(q.is_inline_element||q.is_unformatted)&&!(ie.type===N.TAG_CLOSE&&Q.start_tag_token===q)&&ie.type!=="TK_CONTENT",(Q.is_content_unformatted||Q.is_unformatted)&&(v=!1),v&&W.print_newline(!1)}else Q.indent_content=!Q.custom_beautifier_name,Q.tag_start_char==="<"&&(Q.tag_name==="html"?Q.indent_content=this._options.indent_inner_html:Q.tag_name==="head"?Q.indent_content=this._options.indent_head_inner_html:Q.tag_name==="body"&&(Q.indent_content=this._options.indent_body_inner_html)),!(Q.is_inline_element||Q.is_unformatted)&&(ie.type!=="TK_CONTENT"||Q.is_content_unformatted)&&W.print_newline(!1),this._calcluate_parent_multiline(W,Q)},I.prototype._calcluate_parent_multiline=function(W,O){O.parent&&W._output.just_added_newline()&&!((O.is_inline_element||O.is_unformatted)&&O.parent.is_inline_element)&&(O.parent.multiline_content=!0)};var le=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],Te=["a","audio","del","ins","map","noscript","video"];I.prototype._do_optional_end_element=function(W){var O=null;if(!(W.is_empty_element||!W.is_start_tag||!W.parent)){if(W.tag_name==="body")O=O||this._tag_stack.try_pop("head");else if(W.tag_name==="li")O=O||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(W.tag_name==="dd"||W.tag_name==="dt")O=O||this._tag_stack.try_pop("dt",["dl"]),O=O||this._tag_stack.try_pop("dd",["dl"]);else if(W.parent.tag_name==="p"&&le.indexOf(W.tag_name)!==-1){var Q=W.parent.parent;(!Q||Te.indexOf(Q.tag_name)===-1)&&(O=O||this._tag_stack.try_pop("p"))}else W.tag_name==="rp"||W.tag_name==="rt"?(O=O||this._tag_stack.try_pop("rt",["ruby","rtc"]),O=O||this._tag_stack.try_pop("rp",["ruby","rtc"])):W.tag_name==="optgroup"?O=O||this._tag_stack.try_pop("optgroup",["select"]):W.tag_name==="option"?O=O||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):W.tag_name==="colgroup"?O=O||this._tag_stack.try_pop("caption",["table"]):W.tag_name==="thead"?(O=O||this._tag_stack.try_pop("caption",["table"]),O=O||this._tag_stack.try_pop("colgroup",["table"])):W.tag_name==="tbody"||W.tag_name==="tfoot"?(O=O||this._tag_stack.try_pop("caption",["table"]),O=O||this._tag_stack.try_pop("colgroup",["table"]),O=O||this._tag_stack.try_pop("thead",["table"]),O=O||this._tag_stack.try_pop("tbody",["table"])):W.tag_name==="tr"?(O=O||this._tag_stack.try_pop("caption",["table"]),O=O||this._tag_stack.try_pop("colgroup",["table"]),O=O||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(W.tag_name==="th"||W.tag_name==="td")&&(O=O||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),O=O||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return W.parent=this._tag_stack.get_parser_token(),O}},C.exports.Beautifier=I},function(C,h,g){var _=g(6).Options;function S(L){_.call(this,L,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}S.prototype=new _,C.exports.Options=S},function(C,h,g){var _=g(9).Tokenizer,S=g(9).TOKEN,L=g(13).Directives,N=g(14).TemplatablePattern,H=g(12).Pattern,R={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",CONTROL_FLOW_OPEN:"TK_CONTROL_FLOW_OPEN",CONTROL_FLOW_CLOSE:"TK_CONTROL_FLOW_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:S.START,RAW:S.RAW,EOF:S.EOF},k=new L(/<\!--/,/-->/),T=function(A,J){_.call(this,A,J),this._current_tag_name="";var ee=new N(this._input).read_options(this._options),G=new H(this._input);if(this.__patterns={word:ee.until(/[\n\r\t <]/),word_control_flow_close_excluded:ee.until(/[\n\r\t <}]/),single_quote:ee.until_after(/'/),double_quote:ee.until_after(/"/),attribute:ee.until(/[\n\r\t =>]|\/>/),element_name:ee.until(/[\n\r\t >\/]/),angular_control_flow_start:G.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:G.starting_with(/{{!--/).until_after(/--}}/),handlebars:G.starting_with(/{{/).until_after(/}}/),handlebars_open:G.until(/[\n\r\t }]/),handlebars_raw_close:G.until(/}}/),comment:G.starting_with(/<!--/).until_after(/-->/),cdata:G.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:G.starting_with(/<!\[/).until_after(/]>/),processing:G.starting_with(/<\?/).until_after(/\?>/)},this._options.indent_handlebars&&(this.__patterns.word=this.__patterns.word.exclude("handlebars"),this.__patterns.word_control_flow_close_excluded=this.__patterns.word_control_flow_close_excluded.exclude("handlebars")),this._unformatted_content_delimiter=null,this._options.unformatted_content_delimiter){var I=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=G.matching(I).until_after(I)}};T.prototype=new _,T.prototype._is_comment=function(A){return!1},T.prototype._is_opening=function(A){return A.type===R.TAG_OPEN||A.type===R.CONTROL_FLOW_OPEN},T.prototype._is_closing=function(A,J){return A.type===R.TAG_CLOSE&&J&&((A.text===">"||A.text==="/>")&&J.text[0]==="<"||A.text==="}}"&&J.text[0]==="{"&&J.text[1]==="{")||A.type===R.CONTROL_FLOW_CLOSE&&A.text==="}"&&J.text.endsWith("{")},T.prototype._reset=function(){this._current_tag_name=""},T.prototype._get_next_token=function(A,J){var ee=null;this._readWhitespace();var G=this._input.peek();return G===null?this._create_token(R.EOF,""):(ee=ee||this._read_open_handlebars(G,J),ee=ee||this._read_attribute(G,A,J),ee=ee||this._read_close(G,J),ee=ee||this._read_script_and_style(G,A),ee=ee||this._read_control_flows(G,J),ee=ee||this._read_raw_content(G,A,J),ee=ee||this._read_content_word(G,J),ee=ee||this._read_comment_or_cdata(G),ee=ee||this._read_processing(G),ee=ee||this._read_open(G,J),ee=ee||this._create_token(R.UNKNOWN,this._input.next()),ee)},T.prototype._read_comment_or_cdata=function(A){var J=null,ee=null,G=null;if(A==="<"){var I=this._input.peek(1);I==="!"&&(ee=this.__patterns.comment.read(),ee?(G=k.get_directives(ee),G&&G.ignore==="start"&&(ee+=k.readIgnored(this._input))):ee=this.__patterns.cdata.read()),ee&&(J=this._create_token(R.COMMENT,ee),J.directives=G)}return J},T.prototype._read_processing=function(A){var J=null,ee=null,G=null;if(A==="<"){var I=this._input.peek(1);(I==="!"||I==="?")&&(ee=this.__patterns.conditional_comment.read(),ee=ee||this.__patterns.processing.read()),ee&&(J=this._create_token(R.COMMENT,ee),J.directives=G)}return J},T.prototype._read_open=function(A,J){var ee=null,G=null;return(!J||J.type===R.CONTROL_FLOW_OPEN)&&A==="<"&&(ee=this._input.next(),this._input.peek()==="/"&&(ee+=this._input.next()),ee+=this.__patterns.element_name.read(),G=this._create_token(R.TAG_OPEN,ee)),G},T.prototype._read_open_handlebars=function(A,J){var ee=null,G=null;return(!J||J.type===R.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&A==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(ee=this.__patterns.handlebars_comment.read(),ee=ee||this.__patterns.handlebars.read(),G=this._create_token(R.COMMENT,ee)):(ee=this.__patterns.handlebars_open.read(),G=this._create_token(R.TAG_OPEN,ee))),G},T.prototype._read_control_flows=function(A,J){var ee="",G=null;if(!this._options.templating.includes("angular"))return G;if(A==="@"){if(ee=this.__patterns.angular_control_flow_start.read(),ee==="")return G;for(var I=ee.endsWith("(")?1:0,re=0;!(ee.endsWith("{")&&I===re);){var le=this._input.next();if(le===null)break;le==="("?I++:le===")"&&re++,ee+=le}G=this._create_token(R.CONTROL_FLOW_OPEN,ee)}else A==="}"&&J&&J.type===R.CONTROL_FLOW_OPEN&&(ee=this._input.next(),G=this._create_token(R.CONTROL_FLOW_CLOSE,ee));return G},T.prototype._read_close=function(A,J){var ee=null,G=null;return J&&J.type===R.TAG_OPEN&&(J.text[0]==="<"&&(A===">"||A==="/"&&this._input.peek(1)===">")?(ee=this._input.next(),A==="/"&&(ee+=this._input.next()),G=this._create_token(R.TAG_CLOSE,ee)):J.text[0]==="{"&&A==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),G=this._create_token(R.TAG_CLOSE,"}}"))),G},T.prototype._read_attribute=function(A,J,ee){var G=null,I="";if(ee&&ee.text[0]==="<")if(A==="=")G=this._create_token(R.EQUALS,this._input.next());else if(A==='"'||A==="'"){var re=this._input.next();A==='"'?re+=this.__patterns.double_quote.read():re+=this.__patterns.single_quote.read(),G=this._create_token(R.VALUE,re)}else I=this.__patterns.attribute.read(),I&&(J.type===R.EQUALS?G=this._create_token(R.VALUE,I):G=this._create_token(R.ATTRIBUTE,I));return G},T.prototype._is_content_unformatted=function(A){return this._options.void_elements.indexOf(A)===-1&&(this._options.content_unformatted.indexOf(A)!==-1||this._options.unformatted.indexOf(A)!==-1)},T.prototype._read_raw_content=function(A,J,ee){var G="";if(ee&&ee.text[0]==="{")G=this.__patterns.handlebars_raw_close.read();else if(J.type===R.TAG_CLOSE&&J.opened.text[0]==="<"&&J.text[0]!=="/"){var I=J.opened.text.substr(1).toLowerCase();this._is_content_unformatted(I)&&(G=this._input.readUntil(new RegExp("</"+I+"[\\n\\r\\t ]*?>","ig")))}return G?this._create_token(R.TEXT,G):null},T.prototype._read_script_and_style=function(A,J){if(J.type===R.TAG_CLOSE&&J.opened.text[0]==="<"&&J.text[0]!=="/"){var ee=J.opened.text.substr(1).toLowerCase();if(ee==="script"||ee==="style"){var G=this._read_comment_or_cdata(A);if(G)return G.type=R.TEXT,G;var I=this._input.readUntil(new RegExp("</"+ee+"[\\n\\r\\t ]*?>","ig"));if(I)return this._create_token(R.TEXT,I)}}return null},T.prototype._read_content_word=function(A,J){var ee="";return this._options.unformatted_content_delimiter&&A===this._options.unformatted_content_delimiter[0]&&(ee=this.__patterns.unformatted_content_delimiter.read()),ee||(ee=J&&J.type===R.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),ee?this._create_token(R.TEXT,ee):null},C.exports.Tokenizer=T,C.exports.TOKEN=R}],te={};function o(C){var h=te[C];if(h!==void 0)return h.exports;var g=te[C]={exports:{}};return ue[C](g,g.exports,o),g.exports}var y=o(18);ve=y})();var fe=ve;if(1)x=[E,E(58553),E(87804)],ae=function(ue){var te=E(58553),o=E(87804);return{html_beautify:function(y,C){return fe(y,C,te.js_beautify,o.css_beautify)}}}.apply(je,x),ae!==void 0&&(on.exports=ae);else var F,f})()},58553:function(on,je){var E,x;(function(){var ae;(function(){"use strict";var fe=[function(te,o,y){var C=y(1).Beautifier,h=y(5).Options;function g(_,S){var L=new C(_,S);return L.beautify()}te.exports=g,te.exports.defaultOptions=function(){return new h}},function(te,o,y){var C=y(2).Output,h=y(3).Token,g=y(4),_=y(5).Options,S=y(7).Tokenizer,L=y(7).line_starters,N=y(7).positionable_operators,H=y(7).TOKEN;function R(m,U){return U.indexOf(m)!==-1}function k(m){return m.replace(/^\s+/g,"")}function T(m){for(var U={},se=0;se<m.length;se++)U[m[se].replace(/-/g,"_")]=m[se];return U}function A(m,U){return m&&m.type===H.RESERVED&&m.text===U}function J(m,U){return m&&m.type===H.RESERVED&&R(m.text,U)}var ee=["case","return","do","if","throw","else","await","break","continue","async"],G=["before-newline","after-newline","preserve-newline"],I=T(G),re=[I.before_newline,I.preserve_newline],le={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function Te(m,U){U.multiline_frame||U.mode===le.ForInitializer||U.mode===le.Conditional||m.remove_indent(U.start_line_index)}function W(m){m=m.replace(g.allLineBreaks,`
|
|
`);for(var U=[],se=m.indexOf(`
|
|
`);se!==-1;)U.push(m.substring(0,se)),m=m.substring(se+1),se=m.indexOf(`
|
|
`);return m.length&&U.push(m),U}function O(m){return m===le.ArrayLiteral}function Q(m){return R(m,[le.Expression,le.ForInitializer,le.Conditional])}function q(m,U){for(var se=0;se<m.length;se++){var pe=m[se].trim();if(pe.charAt(0)!==U)return!1}return!0}function ie(m,U){for(var se=0,pe=m.length,He;se<pe;se++)if(He=m[se],He&&He.indexOf(U)!==0)return!1;return!0}function V(m,U){U=U||{},this._source_text=m||"",this._output=null,this._tokens=null,this._last_last_text=null,this._flags=null,this._previous_flags=null,this._flag_store=null,this._options=new _(U)}V.prototype.create_flags=function(m,U){var se=0;m&&(se=m.indentation_level,!this._output.just_added_newline()&&m.line_indent_level>se&&(se=m.line_indent_level));var pe={mode:U,parent:m,last_token:m?m.last_token:new h(H.START_BLOCK,""),last_word:m?m.last_word:"",declaration_statement:!1,declaration_assignment:!1,multiline_frame:!1,inline_frame:!1,if_block:!1,else_block:!1,class_start_block:!1,do_block:!1,do_while:!1,import_block:!1,in_case_statement:!1,in_case:!1,case_body:!1,case_block:!1,indentation_level:se,alignment:0,line_indent_level:m?m.line_indent_level:se,start_line_index:this._output.get_line_number(),ternary_depth:0};return pe},V.prototype._reset=function(m){var U=m.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new C(this._options,U),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(le.BlockStatement);var se=new S(m,this._options);return this._tokens=se.tokenize(),m},V.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var m,U=this._reset(this._source_text),se=this._options.eol;this._options.eol==="auto"&&(se=`
|
|
`,U&&g.lineBreak.test(U||"")&&(se=U.match(g.lineBreak)[0]));for(var pe=this._tokens.next();pe;)this.handle_token(pe),this._last_last_text=this._flags.last_token.text,this._flags.last_token=pe,pe=this._tokens.next();return m=this._output.get_code(se),m},V.prototype.handle_token=function(m,U){m.type===H.START_EXPR?this.handle_start_expr(m):m.type===H.END_EXPR?this.handle_end_expr(m):m.type===H.START_BLOCK?this.handle_start_block(m):m.type===H.END_BLOCK?this.handle_end_block(m):m.type===H.WORD?this.handle_word(m):m.type===H.RESERVED?this.handle_word(m):m.type===H.SEMICOLON?this.handle_semicolon(m):m.type===H.STRING?this.handle_string(m):m.type===H.EQUALS?this.handle_equals(m):m.type===H.OPERATOR?this.handle_operator(m):m.type===H.COMMA?this.handle_comma(m):m.type===H.BLOCK_COMMENT?this.handle_block_comment(m,U):m.type===H.COMMENT?this.handle_comment(m,U):m.type===H.DOT?this.handle_dot(m):m.type===H.EOF?this.handle_eof(m):m.type===H.UNKNOWN?this.handle_unknown(m,U):this.handle_unknown(m,U)},V.prototype.handle_whitespace_and_comments=function(m,U){var se=m.newlines,pe=this._options.keep_array_indentation&&O(this._flags.mode);if(m.comments_before)for(var He=m.comments_before.next();He;)this.handle_whitespace_and_comments(He,U),this.handle_token(He,U),He=m.comments_before.next();if(pe)for(var qe=0;qe<se;qe+=1)this.print_newline(qe>0,U);else if(this._options.max_preserve_newlines&&se>this._options.max_preserve_newlines&&(se=this._options.max_preserve_newlines),this._options.preserve_newlines&&se>1){this.print_newline(!1,U);for(var ot=1;ot<se;ot+=1)this.print_newline(!0,U)}};var v=["async","break","continue","return","throw","yield"];V.prototype.allow_wrap_or_preserved_newline=function(m,U){if(U=U===void 0?!1:U,!this._output.just_added_newline()){var se=this._options.preserve_newlines&&m.newlines||U,pe=R(this._flags.last_token.text,N)||R(m.text,N);if(pe){var He=R(this._flags.last_token.text,N)&&R(this._options.operator_position,re)||R(m.text,N);se=se&&He}if(se)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(J(this._flags.last_token,v))return;this._output.set_wrap_point()}}},V.prototype.print_newline=function(m,U){if(!U&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==H.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var se=this._tokens.peek();this._flags.mode===le.Statement&&!(this._flags.if_block&&A(se,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(m)&&(this._flags.multiline_frame=!0)},V.prototype.print_token_line_indentation=function(m){this._output.just_added_newline()&&(this._options.keep_array_indentation&&m.newlines&&(m.text==="["||O(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(m.whitespace_before),this._output.space_before_token=!1):this._output.set_indent(this._flags.indentation_level,this._flags.alignment)&&(this._flags.line_indent_level=this._flags.indentation_level))},V.prototype.print_token=function(m){if(this._output.raw){this._output.add_raw_token(m);return}if(this._options.comma_first&&m.previous&&m.previous.type===H.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var U=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(U),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(m),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(m),this._output.non_breaking_space=!0,this._output.add_token(m.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},V.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},V.prototype.deindent=function(){this._flags.indentation_level>0&&(!this._flags.parent||this._flags.indentation_level>this._flags.parent.indentation_level)&&(this._flags.indentation_level-=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},V.prototype.set_mode=function(m){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,m),this._flags=this.create_flags(this._previous_flags,m),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},V.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===le.Statement&&Te(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},V.prototype.start_of_object_property=function(){return this._flags.parent.mode===le.ObjectLiteral&&this._flags.mode===le.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||J(this._flags.last_token,["get","set"]))},V.prototype.start_of_statement=function(m){var U=!1;return U=U||J(this._flags.last_token,["var","let","const"])&&m.type===H.WORD,U=U||A(this._flags.last_token,"do"),U=U||!(this._flags.parent.mode===le.ObjectLiteral&&this._flags.mode===le.Statement)&&J(this._flags.last_token,v)&&!m.newlines,U=U||A(this._flags.last_token,"else")&&!(A(m,"if")&&!m.comments_before),U=U||this._flags.last_token.type===H.END_EXPR&&(this._previous_flags.mode===le.ForInitializer||this._previous_flags.mode===le.Conditional),U=U||this._flags.last_token.type===H.WORD&&this._flags.mode===le.BlockStatement&&!this._flags.in_case&&!(m.text==="--"||m.text==="++")&&this._last_last_text!=="function"&&m.type!==H.WORD&&m.type!==H.RESERVED,U=U||this._flags.mode===le.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||J(this._flags.last_token,["get","set"])),U?(this.set_mode(le.Statement),this.indent(),this.handle_whitespace_and_comments(m,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(m,J(m,["do","for","if","while"])),!0):!1},V.prototype.handle_start_expr=function(m){this.start_of_statement(m)||this.handle_whitespace_and_comments(m);var U=le.Expression;if(m.text==="["){if(this._flags.last_token.type===H.WORD||this._flags.last_token.text===")"){J(this._flags.last_token,L)&&(this._output.space_before_token=!0),this.print_token(m),this.set_mode(U),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}U=le.ArrayLiteral,O(this._flags.mode)&&(this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline()),R(this._flags.last_token.type,[H.START_EXPR,H.END_EXPR,H.WORD,H.OPERATOR,H.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===H.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,U=le.ForInitializer):R(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,U=le.Conditional):R(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&m.whitespace_before===""?this._output.space_before_token=!1:(R(this._flags.last_token.text,L)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===H.EQUALS||this._flags.last_token.type===H.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(m);else if(this._flags.last_token.type===H.WORD){this._output.space_before_token=!1;var se=this._tokens.peek(-3);if(this._options.space_after_named_function&&se){var pe=this._tokens.peek(-4);J(se,["async","function"])||se.text==="*"&&J(pe,["async","function"])?this._output.space_before_token=!0:this._flags.mode===le.ObjectLiteral?(se.text==="{"||se.text===","||se.text==="*"&&(pe.text==="{"||pe.text===","))&&(this._output.space_before_token=!0):this._flags.parent&&this._flags.parent.class_start_block&&(this._output.space_before_token=!0)}}else this.allow_wrap_or_preserved_newline(m);(this._flags.last_token.type===H.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(R(this._last_last_text,["function","yield"])||this._flags.mode===le.ObjectLiteral&&R(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===H.START_BLOCK?this.print_newline():(this._flags.last_token.type===H.END_EXPR||this._flags.last_token.type===H.START_EXPR||this._flags.last_token.type===H.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===H.COMMA)&&this.allow_wrap_or_preserved_newline(m,m.newlines),this.print_token(m),this.set_mode(U),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},V.prototype.handle_end_expr=function(m){for(;this._flags.mode===le.Statement;)this.restore_mode();this.handle_whitespace_and_comments(m),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(m,m.text==="]"&&O(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===H.START_EXPR&&!this._options.space_in_empty_paren?(this._output.trim(),this._output.space_before_token=!1):this._output.space_before_token=!0),this.deindent(),this.print_token(m),this.restore_mode(),Te(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===le.Conditional&&(this._previous_flags.mode=le.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},V.prototype.handle_start_block=function(m){this.handle_whitespace_and_comments(m);var U=this._tokens.peek(),se=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===H.END_EXPR?(this.set_mode(le.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(le.BlockStatement):se&&(R(se.text,[":",","])&&R(U.type,[H.STRING,H.WORD,H.RESERVED])||R(U.text,["get","set","..."])&&R(se.type,[H.WORD,H.RESERVED]))?R(this._last_last_text,["class","interface"])&&!R(se.text,[":",","])?this.set_mode(le.BlockStatement):this.set_mode(le.ObjectLiteral):this._flags.last_token.type===H.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(le.BlockStatement):R(this._flags.last_token.type,[H.EQUALS,H.START_EXPR,H.COMMA,H.OPERATOR])||J(this._flags.last_token,["return","throw","import","default"])?this.set_mode(le.ObjectLiteral):this.set_mode(le.BlockStatement),this._flags.last_token&&J(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var pe=!U.comments_before&&U.text==="}",He=pe&&this._flags.last_word==="function"&&this._flags.last_token.type===H.END_EXPR;if(this._options.brace_preserve_inline){var qe=0,ot=null;this._flags.inline_frame=!0;do if(qe+=1,ot=this._tokens.peek(qe-1),ot.newlines){this._flags.inline_frame=!1;break}while(ot.type!==H.EOF&&!(ot.type===H.END_BLOCK&&ot.opened===m))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&m.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==H.OPERATOR&&(He||this._flags.last_token.type===H.EQUALS||J(this._flags.last_token,ee)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(O(this._previous_flags.mode)&&(this._flags.last_token.type===H.START_EXPR||this._flags.last_token.type===H.COMMA)&&((this._flags.last_token.type===H.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===H.COMMA||this._flags.last_token.type===H.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(m),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==H.OPERATOR&&this._flags.last_token.type!==H.START_EXPR&&(R(this._flags.last_token.type,[H.START_BLOCK,H.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(m),this.indent(),!pe&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},V.prototype.handle_end_block=function(m){for(this.handle_whitespace_and_comments(m);this._flags.mode===le.Statement;)this.restore_mode();var U=this._flags.last_token.type===H.START_BLOCK;this._flags.inline_frame&&!U?this._output.space_before_token=!0:this._options.brace_style==="expand"?U||this.print_newline():U||(O(this._flags.mode)&&this._options.keep_array_indentation?(this._options.keep_array_indentation=!1,this.print_newline(),this._options.keep_array_indentation=!0):this.print_newline()),this.restore_mode(),this.print_token(m)},V.prototype.handle_word=function(m){if(m.type===H.RESERVED){if(R(m.text,["set","get"])&&this._flags.mode!==le.ObjectLiteral)m.type=H.WORD;else if(m.text==="import"&&R(this._tokens.peek().text,["(","."]))m.type=H.WORD;else if(R(m.text,["as","from"])&&!this._flags.import_block)m.type=H.WORD;else if(this._flags.mode===le.ObjectLiteral){var U=this._tokens.peek();U.text===":"&&(m.type=H.WORD)}}if(this.start_of_statement(m)?J(this._flags.last_token,["var","let","const"])&&m.type===H.WORD&&(this._flags.declaration_statement=!0):m.newlines&&!Q(this._flags.mode)&&(this._flags.last_token.type!==H.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==H.EQUALS&&(this._options.preserve_newlines||!J(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(m),this.print_newline()):this.handle_whitespace_and_comments(m),this._flags.do_block&&!this._flags.do_while)if(A(m,"while")){this._output.space_before_token=!0,this.print_token(m),this._output.space_before_token=!0,this._flags.do_while=!0;return}else this.print_newline(),this._flags.do_block=!1;if(this._flags.if_block)if(!this._flags.else_block&&A(m,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===le.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&J(m,["case","default"])){this.print_newline(),!this._flags.case_block&&(this._flags.case_body||this._options.jslint_happy)&&this.deindent(),this._flags.case_body=!1,this.print_token(m),this._flags.in_case=!0;return}if((this._flags.last_token.type===H.COMMA||this._flags.last_token.type===H.START_EXPR||this._flags.last_token.type===H.EQUALS||this._flags.last_token.type===H.OPERATOR)&&!this.start_of_object_property()&&!(R(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===le.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(m),A(m,"function")){(R(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(R(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===H.OPERATOR))&&!this._output.just_added_blankline()&&!m.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===H.RESERVED||this._flags.last_token.type===H.WORD?J(this._flags.last_token,["get","set","new","export"])||J(this._flags.last_token,v)?this._output.space_before_token=!0:A(this._flags.last_token,"default")&&this._last_last_text==="export"?this._output.space_before_token=!0:this._flags.last_token.text==="declare"?this._output.space_before_token=!0:this.print_newline():this._flags.last_token.type===H.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(Q(this._flags.mode)||O(this._flags.mode))||this.print_newline(),this.print_token(m),this._flags.last_word=m.text;return}var se="NONE";if(this._flags.last_token.type===H.END_BLOCK?this._previous_flags.inline_frame?se="SPACE":J(m,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&m.newlines?se="NEWLINE":(se="SPACE",this._output.space_before_token=!0):se="NEWLINE":this._flags.last_token.type===H.SEMICOLON&&this._flags.mode===le.BlockStatement?se="NEWLINE":this._flags.last_token.type===H.SEMICOLON&&Q(this._flags.mode)?se="SPACE":this._flags.last_token.type===H.STRING?se="NEWLINE":this._flags.last_token.type===H.RESERVED||this._flags.last_token.type===H.WORD||this._flags.last_token.text==="*"&&(R(this._last_last_text,["function","yield"])||this._flags.mode===le.ObjectLiteral&&R(this._last_last_text,["{",","]))?se="SPACE":this._flags.last_token.type===H.START_BLOCK?this._flags.inline_frame?se="SPACE":se="NEWLINE":this._flags.last_token.type===H.END_EXPR&&(this._output.space_before_token=!0,se="NEWLINE"),J(m,L)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?se="SPACE":se="NEWLINE"),J(m,["else","catch","finally"]))if((!(this._flags.last_token.type===H.END_BLOCK&&this._previous_flags.mode===le.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&m.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var pe=this._output.current_line;pe.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else se==="NEWLINE"?J(this._flags.last_token,ee)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&J(m,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==H.END_EXPR?(this._flags.last_token.type!==H.START_EXPR||!J(m,["var","let","const"]))&&this._flags.last_token.text!==":"&&(A(m,"if")&&A(m.previous,"else")?this._output.space_before_token=!0:this.print_newline()):J(m,L)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&O(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():se==="SPACE"&&(this._output.space_before_token=!0);m.previous&&(m.previous.type===H.WORD||m.previous.type===H.RESERVED)&&(this._output.space_before_token=!0),this.print_token(m),this._flags.last_word=m.text,m.type===H.RESERVED&&(m.text==="do"?this._flags.do_block=!0:m.text==="if"?this._flags.if_block=!0:m.text==="import"?this._flags.import_block=!0:this._flags.import_block&&A(m,"from")&&(this._flags.import_block=!1))},V.prototype.handle_semicolon=function(m){this.start_of_statement(m)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(m);for(var U=this._tokens.peek();this._flags.mode===le.Statement&&!(this._flags.if_block&&A(U,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(m)},V.prototype.handle_string=function(m){m.text.startsWith("`")&&m.newlines===0&&m.whitespace_before===""&&(m.previous.text===")"||this._flags.last_token.type===H.WORD)||(this.start_of_statement(m)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(m),this._flags.last_token.type===H.RESERVED||this._flags.last_token.type===H.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===H.COMMA||this._flags.last_token.type===H.START_EXPR||this._flags.last_token.type===H.EQUALS||this._flags.last_token.type===H.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(m):m.text.startsWith("`")&&this._flags.last_token.type===H.END_EXPR&&(m.previous.text==="]"||m.previous.text===")")&&m.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(m)},V.prototype.handle_equals=function(m){this.start_of_statement(m)||this.handle_whitespace_and_comments(m),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(m),this._output.space_before_token=!0},V.prototype.handle_comma=function(m){this.handle_whitespace_and_comments(m,!0),this.print_token(m),this._output.space_before_token=!0,this._flags.declaration_statement?(Q(this._flags.parent.mode)&&(this._flags.declaration_assignment=!1),this._flags.declaration_assignment?(this._flags.declaration_assignment=!1,this.print_newline(!1,!0)):this._options.comma_first&&this.allow_wrap_or_preserved_newline(m)):this._flags.mode===le.ObjectLiteral||this._flags.mode===le.Statement&&this._flags.parent.mode===le.ObjectLiteral?(this._flags.mode===le.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(m)},V.prototype.handle_operator=function(m){var U=m.text==="*"&&(J(this._flags.last_token,["function","yield"])||R(this._flags.last_token.type,[H.START_BLOCK,H.COMMA,H.END_BLOCK,H.SEMICOLON])),se=R(m.text,["-","+"])&&(R(this._flags.last_token.type,[H.START_BLOCK,H.START_EXPR,H.EQUALS,H.OPERATOR])||R(this._flags.last_token.text,L)||this._flags.last_token.text===",");if(!this.start_of_statement(m)){var pe=!U;this.handle_whitespace_and_comments(m,pe)}if(m.text==="*"&&this._flags.last_token.type===H.DOT){this.print_token(m);return}if(m.text==="::"){this.print_token(m);return}if(R(m.text,["-","+"])&&this.start_of_object_property()){this.print_token(m);return}if(this._flags.last_token.type===H.OPERATOR&&R(this._options.operator_position,re)&&this.allow_wrap_or_preserved_newline(m),m.text===":"&&this._flags.in_case){this.print_token(m),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==H.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var He=!0,qe=!0,ot=!1;if(m.text===":"?this._flags.ternary_depth===0?He=!1:(this._flags.ternary_depth-=1,ot=!0):m.text==="?"&&(this._flags.ternary_depth+=1),!se&&!U&&this._options.preserve_newlines&&R(m.text,N)){var Ot=m.text===":",bt=Ot&&ot,xe=Ot&&!ot;switch(this._options.operator_position){case I.before_newline:this._output.space_before_token=!xe,this.print_token(m),(!Ot||bt)&&this.allow_wrap_or_preserved_newline(m),this._output.space_before_token=!0;return;case I.after_newline:this._output.space_before_token=!0,!Ot||bt?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(m):this._output.space_before_token=!1,this.print_token(m),this._output.space_before_token=!0;return;case I.preserve_newline:xe||this.allow_wrap_or_preserved_newline(m),He=!(this._output.just_added_newline()||xe),this._output.space_before_token=He,this.print_token(m),this._output.space_before_token=!0;return}}if(U){this.allow_wrap_or_preserved_newline(m),He=!1;var _t=this._tokens.peek();qe=_t&&R(_t.type,[H.WORD,H.RESERVED])}else if(m.text==="...")this.allow_wrap_or_preserved_newline(m),He=this._flags.last_token.type===H.START_BLOCK,qe=!1;else if(R(m.text,["--","++","!","~"])||se){if((this._flags.last_token.type===H.COMMA||this._flags.last_token.type===H.START_EXPR)&&this.allow_wrap_or_preserved_newline(m),He=!1,qe=!1,m.newlines&&(m.text==="--"||m.text==="++"||m.text==="~")){var Qt=J(this._flags.last_token,ee)&&m.newlines;Qt&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(Qt,!0)}this._flags.last_token.text===";"&&Q(this._flags.mode)&&(He=!0),this._flags.last_token.type===H.RESERVED?He=!0:this._flags.last_token.type===H.END_EXPR?He=!(this._flags.last_token.text==="]"&&(m.text==="--"||m.text==="++")):this._flags.last_token.type===H.OPERATOR&&(He=R(m.text,["--","-","++","+"])&&R(this._flags.last_token.text,["--","-","++","+"]),R(m.text,["+","-"])&&R(this._flags.last_token.text,["--","++"])&&(qe=!0)),(this._flags.mode===le.BlockStatement&&!this._flags.inline_frame||this._flags.mode===le.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||He,this.print_token(m),this._output.space_before_token=qe},V.prototype.handle_block_comment=function(m,U){if(this._output.raw){this._output.add_raw_token(m),m.directives&&m.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(m.directives){this.print_newline(!1,U),this.print_token(m),m.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!g.newline.test(m.text)&&!m.newlines){this._output.space_before_token=!0,this.print_token(m),this._output.space_before_token=!0;return}else this.print_block_commment(m,U)},V.prototype.print_block_commment=function(m,U){var se=W(m.text),pe,He=!1,qe=!1,ot=m.whitespace_before,Ot=ot.length;if(this.print_newline(!1,U),this.print_token_line_indentation(m),this._output.add_token(se[0]),this.print_newline(!1,U),se.length>1){for(se=se.slice(1),He=q(se,"*"),qe=ie(se,ot),He&&(this._flags.alignment=1),pe=0;pe<se.length;pe++)He?(this.print_token_line_indentation(m),this._output.add_token(k(se[pe]))):qe&&se[pe]?(this.print_token_line_indentation(m),this._output.add_token(se[pe].substring(Ot))):(this._output.current_line.set_indent(-1),this._output.add_token(se[pe])),this.print_newline(!1,U);this._flags.alignment=0}},V.prototype.handle_comment=function(m,U){m.newlines?this.print_newline(!1,U):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(m),this.print_newline(!1,U)},V.prototype.handle_dot=function(m){this.start_of_statement(m)||this.handle_whitespace_and_comments(m,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),J(this._flags.last_token,ee)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(m,this._flags.last_token.text===")"&&this._options.break_chained_methods),this._options.unindent_chained_methods&&this._output.just_added_newline()&&this.deindent(),this.print_token(m)},V.prototype.handle_unknown=function(m,U){this.print_token(m),m.text[m.text.length-1]===`
|
|
`&&this.print_newline(!1,U)},V.prototype.handle_eof=function(m){for(;this._flags.mode===le.Statement;)this.restore_mode();this.handle_whitespace_and_comments(m)},te.exports.Beautifier=V},function(te){function o(h){this.__parent=h,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}o.prototype.clone_empty=function(){var h=new o(this.__parent);return h.set_indent(this.__indent_count,this.__alignment_count),h},o.prototype.item=function(h){return h<0?this.__items[this.__items.length+h]:this.__items[h]},o.prototype.has_match=function(h){for(var g=this.__items.length-1;g>=0;g--)if(this.__items[g].match(h))return!0;return!1},o.prototype.set_indent=function(h,g){this.is_empty()&&(this.__indent_count=h||0,this.__alignment_count=g||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},o.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},o.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},o.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var h=this.__parent.current_line;return h.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),h.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),h.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,h.__items[0]===" "&&(h.__items.splice(0,1),h.__character_count-=1),!0}return!1},o.prototype.is_empty=function(){return this.__items.length===0},o.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},o.prototype.push=function(h){this.__items.push(h);var g=h.lastIndexOf(`
|
|
`);g!==-1?this.__character_count=h.length-g:this.__character_count+=h.length},o.prototype.pop=function(){var h=null;return this.is_empty()||(h=this.__items.pop(),this.__character_count-=h.length),h},o.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},o.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},o.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},o.prototype.toString=function(){var h="";return this.is_empty()?this.__parent.indent_empty_lines&&(h=this.__parent.get_indent_string(this.__indent_count)):(h=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),h+=this.__items.join("")),h};function y(h,g){this.__cache=[""],this.__indent_size=h.indent_size,this.__indent_string=h.indent_char,h.indent_with_tabs||(this.__indent_string=new Array(h.indent_size+1).join(h.indent_char)),g=g||"",h.indent_level>0&&(g=new Array(h.indent_level+1).join(this.__indent_string)),this.__base_string=g,this.__base_string_length=g.length}y.prototype.get_indent_size=function(h,g){var _=this.__base_string_length;return g=g||0,h<0&&(_=0),_+=h*this.__indent_size,_+=g,_},y.prototype.get_indent_string=function(h,g){var _=this.__base_string;return g=g||0,h<0&&(h=0,_=""),g+=h*this.__indent_size,this.__ensure_cache(g),_+=this.__cache[g],_},y.prototype.__ensure_cache=function(h){for(;h>=this.__cache.length;)this.__add_column()},y.prototype.__add_column=function(){var h=this.__cache.length,g=0,_="";this.__indent_size&&h>=this.__indent_size&&(g=Math.floor(h/this.__indent_size),h-=g*this.__indent_size,_=new Array(g+1).join(this.__indent_string)),h&&(_+=new Array(h+1).join(" ")),this.__cache.push(_)};function C(h,g){this.__indent_cache=new y(h,g),this.raw=!1,this._end_with_newline=h.end_with_newline,this.indent_size=h.indent_size,this.wrap_line_length=h.wrap_line_length,this.indent_empty_lines=h.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}C.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},C.prototype.get_line_number=function(){return this.__lines.length},C.prototype.get_indent_string=function(h,g){return this.__indent_cache.get_indent_string(h,g)},C.prototype.get_indent_size=function(h,g){return this.__indent_cache.get_indent_size(h,g)},C.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},C.prototype.add_new_line=function(h){return this.is_empty()||!h&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},C.prototype.get_code=function(h){this.trim(!0);var g=this.current_line.pop();g&&(g[g.length-1]===`
|
|
`&&(g=g.replace(/\n+$/g,"")),this.current_line.push(g)),this._end_with_newline&&this.__add_outputline();var _=this.__lines.join(`
|
|
`);return h!==`
|
|
`&&(_=_.replace(/[\n]/g,h)),_},C.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},C.prototype.set_indent=function(h,g){return h=h||0,g=g||0,this.next_line.set_indent(h,g),this.__lines.length>1?(this.current_line.set_indent(h,g),!0):(this.current_line.set_indent(),!1)},C.prototype.add_raw_token=function(h){for(var g=0;g<h.newlines;g++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(h.whitespace_before),this.current_line.push(h.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},C.prototype.add_token=function(h){this.__add_space_before_token(),this.current_line.push(h),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},C.prototype.__add_space_before_token=function(){this.space_before_token&&!this.just_added_newline()&&(this.non_breaking_space||this.set_wrap_point(),this.current_line.push(" "))},C.prototype.remove_indent=function(h){for(var g=this.__lines.length;h<g;)this.__lines[h]._remove_indent(),h++;this.current_line._remove_wrap_indent()},C.prototype.trim=function(h){for(h=h===void 0?!1:h,this.current_line.trim();h&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},C.prototype.just_added_newline=function(){return this.current_line.is_empty()},C.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},C.prototype.ensure_empty_line_above=function(h,g){for(var _=this.__lines.length-2;_>=0;){var S=this.__lines[_];if(S.is_empty())break;if(S.item(0).indexOf(h)!==0&&S.item(-1)!==g){this.__lines.splice(_+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}_--}},te.exports.Output=C},function(te){function o(y,C,h,g){this.type=y,this.text=C,this.comments_before=null,this.newlines=h||0,this.whitespace_before=g||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}te.exports.Token=o},function(te,o){var y="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",C="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",h="\\xaa\\xb5\\xba\\xc0-\\xd6\\xd8-\\xf6\\xf8-\\u02c1\\u02c6-\\u02d1\\u02e0-\\u02e4\\u02ec\\u02ee\\u0370-\\u0374\\u0376\\u0377\\u037a-\\u037d\\u0386\\u0388-\\u038a\\u038c\\u038e-\\u03a1\\u03a3-\\u03f5\\u03f7-\\u0481\\u048a-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05d0-\\u05ea\\u05f0-\\u05f2\\u0620-\\u064a\\u066e\\u066f\\u0671-\\u06d3\\u06d5\\u06e5\\u06e6\\u06ee\\u06ef\\u06fa-\\u06fc\\u06ff\\u0710\\u0712-\\u072f\\u074d-\\u07a5\\u07b1\\u07ca-\\u07ea\\u07f4\\u07f5\\u07fa\\u0800-\\u0815\\u081a\\u0824\\u0828\\u0840-\\u0858\\u08a0\\u08a2-\\u08ac\\u0904-\\u0939\\u093d\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097f\\u0985-\\u098c\\u098f\\u0990\\u0993-\\u09a8\\u09aa-\\u09b0\\u09b2\\u09b6-\\u09b9\\u09bd\\u09ce\\u09dc\\u09dd\\u09df-\\u09e1\\u09f0\\u09f1\\u0a05-\\u0a0a\\u0a0f\\u0a10\\u0a13-\\u0a28\\u0a2a-\\u0a30\\u0a32\\u0a33\\u0a35\\u0a36\\u0a38\\u0a39\\u0a59-\\u0a5c\\u0a5e\\u0a72-\\u0a74\\u0a85-\\u0a8d\\u0a8f-\\u0a91\\u0a93-\\u0aa8\\u0aaa-\\u0ab0\\u0ab2\\u0ab3\\u0ab5-\\u0ab9\\u0abd\\u0ad0\\u0ae0\\u0ae1\\u0b05-\\u0b0c\\u0b0f\\u0b10\\u0b13-\\u0b28\\u0b2a-\\u0b30\\u0b32\\u0b33\\u0b35-\\u0b39\\u0b3d\\u0b5c\\u0b5d\\u0b5f-\\u0b61\\u0b71\\u0b83\\u0b85-\\u0b8a\\u0b8e-\\u0b90\\u0b92-\\u0b95\\u0b99\\u0b9a\\u0b9c\\u0b9e\\u0b9f\\u0ba3\\u0ba4\\u0ba8-\\u0baa\\u0bae-\\u0bb9\\u0bd0\\u0c05-\\u0c0c\\u0c0e-\\u0c10\\u0c12-\\u0c28\\u0c2a-\\u0c33\\u0c35-\\u0c39\\u0c3d\\u0c58\\u0c59\\u0c60\\u0c61\\u0c85-\\u0c8c\\u0c8e-\\u0c90\\u0c92-\\u0ca8\\u0caa-\\u0cb3\\u0cb5-\\u0cb9\\u0cbd\\u0cde\\u0ce0\\u0ce1\\u0cf1\\u0cf2\\u0d05-\\u0d0c\\u0d0e-\\u0d10\\u0d12-\\u0d3a\\u0d3d\\u0d4e\\u0d60\\u0d61\\u0d7a-\\u0d7f\\u0d85-\\u0d96\\u0d9a-\\u0db1\\u0db3-\\u0dbb\\u0dbd\\u0dc0-\\u0dc6\\u0e01-\\u0e30\\u0e32\\u0e33\\u0e40-\\u0e46\\u0e81\\u0e82\\u0e84\\u0e87\\u0e88\\u0e8a\\u0e8d\\u0e94-\\u0e97\\u0e99-\\u0e9f\\u0ea1-\\u0ea3\\u0ea5\\u0ea7\\u0eaa\\u0eab\\u0ead-\\u0eb0\\u0eb2\\u0eb3\\u0ebd\\u0ec0-\\u0ec4\\u0ec6\\u0edc-\\u0edf\\u0f00\\u0f40-\\u0f47\\u0f49-\\u0f6c\\u0f88-\\u0f8c\\u1000-\\u102a\\u103f\\u1050-\\u1055\\u105a-\\u105d\\u1061\\u1065\\u1066\\u106e-\\u1070\\u1075-\\u1081\\u108e\\u10a0-\\u10c5\\u10c7\\u10cd\\u10d0-\\u10fa\\u10fc-\\u1248\\u124a-\\u124d\\u1250-\\u1256\\u1258\\u125a-\\u125d\\u1260-\\u1288\\u128a-\\u128d\\u1290-\\u12b0\\u12b2-\\u12b5\\u12b8-\\u12be\\u12c0\\u12c2-\\u12c5\\u12c8-\\u12d6\\u12d8-\\u1310\\u1312-\\u1315\\u1318-\\u135a\\u1380-\\u138f\\u13a0-\\u13f4\\u1401-\\u166c\\u166f-\\u167f\\u1681-\\u169a\\u16a0-\\u16ea\\u16ee-\\u16f0\\u1700-\\u170c\\u170e-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176c\\u176e-\\u1770\\u1780-\\u17b3\\u17d7\\u17dc\\u1820-\\u1877\\u1880-\\u18a8\\u18aa\\u18b0-\\u18f5\\u1900-\\u191c\\u1950-\\u196d\\u1970-\\u1974\\u1980-\\u19ab\\u19c1-\\u19c7\\u1a00-\\u1a16\\u1a20-\\u1a54\\u1aa7\\u1b05-\\u1b33\\u1b45-\\u1b4b\\u1b83-\\u1ba0\\u1bae\\u1baf\\u1bba-\\u1be5\\u1c00-\\u1c23\\u1c4d-\\u1c4f\\u1c5a-\\u1c7d\\u1ce9-\\u1cec\\u1cee-\\u1cf1\\u1cf5\\u1cf6\\u1d00-\\u1dbf\\u1e00-\\u1f15\\u1f18-\\u1f1d\\u1f20-\\u1f45\\u1f48-\\u1f4d\\u1f50-\\u1f57\\u1f59\\u1f5b\\u1f5d\\u1f5f-\\u1f7d\\u1f80-\\u1fb4\\u1fb6-\\u1fbc\\u1fbe\\u1fc2-\\u1fc4\\u1fc6-\\u1fcc\\u1fd0-\\u1fd3\\u1fd6-\\u1fdb\\u1fe0-\\u1fec\\u1ff2-\\u1ff4\\u1ff6-\\u1ffc\\u2071\\u207f\\u2090-\\u209c\\u2102\\u2107\\u210a-\\u2113\\u2115\\u2119-\\u211d\\u2124\\u2126\\u2128\\u212a-\\u212d\\u212f-\\u2139\\u213c-\\u213f\\u2145-\\u2149\\u214e\\u2160-\\u2188\\u2c00-\\u2c2e\\u2c30-\\u2c5e\\u2c60-\\u2ce4\\u2ceb-\\u2cee\\u2cf2\\u2cf3\\u2d00-\\u2d25\\u2d27\\u2d2d\\u2d30-\\u2d67\\u2d6f\\u2d80-\\u2d96\\u2da0-\\u2da6\\u2da8-\\u2dae\\u2db0-\\u2db6\\u2db8-\\u2dbe\\u2dc0-\\u2dc6\\u2dc8-\\u2dce\\u2dd0-\\u2dd6\\u2dd8-\\u2dde\\u2e2f\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303c\\u3041-\\u3096\\u309d-\\u309f\\u30a1-\\u30fa\\u30fc-\\u30ff\\u3105-\\u312d\\u3131-\\u318e\\u31a0-\\u31ba\\u31f0-\\u31ff\\u3400-\\u4db5\\u4e00-\\u9fcc\\ua000-\\ua48c\\ua4d0-\\ua4fd\\ua500-\\ua60c\\ua610-\\ua61f\\ua62a\\ua62b\\ua640-\\ua66e\\ua67f-\\ua697\\ua6a0-\\ua6ef\\ua717-\\ua71f\\ua722-\\ua788\\ua78b-\\ua78e\\ua790-\\ua793\\ua7a0-\\ua7aa\\ua7f8-\\ua801\\ua803-\\ua805\\ua807-\\ua80a\\ua80c-\\ua822\\ua840-\\ua873\\ua882-\\ua8b3\\ua8f2-\\ua8f7\\ua8fb\\ua90a-\\ua925\\ua930-\\ua946\\ua960-\\ua97c\\ua984-\\ua9b2\\ua9cf\\uaa00-\\uaa28\\uaa40-\\uaa42\\uaa44-\\uaa4b\\uaa60-\\uaa76\\uaa7a\\uaa80-\\uaaaf\\uaab1\\uaab5\\uaab6\\uaab9-\\uaabd\\uaac0\\uaac2\\uaadb-\\uaadd\\uaae0-\\uaaea\\uaaf2-\\uaaf4\\uab01-\\uab06\\uab09-\\uab0e\\uab11-\\uab16\\uab20-\\uab26\\uab28-\\uab2e\\uabc0-\\uabe2\\uac00-\\ud7a3\\ud7b0-\\ud7c6\\ud7cb-\\ud7fb\\uf900-\\ufa6d\\ufa70-\\ufad9\\ufb00-\\ufb06\\ufb13-\\ufb17\\ufb1d\\ufb1f-\\ufb28\\ufb2a-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40\\ufb41\\ufb43\\ufb44\\ufb46-\\ufbb1\\ufbd3-\\ufd3d\\ufd50-\\ufd8f\\ufd92-\\ufdc7\\ufdf0-\\ufdfb\\ufe70-\\ufe74\\ufe76-\\ufefc\\uff21-\\uff3a\\uff41-\\uff5a\\uff66-\\uffbe\\uffc2-\\uffc7\\uffca-\\uffcf\\uffd2-\\uffd7\\uffda-\\uffdc",g="\\u0300-\\u036f\\u0483-\\u0487\\u0591-\\u05bd\\u05bf\\u05c1\\u05c2\\u05c4\\u05c5\\u05c7\\u0610-\\u061a\\u0620-\\u0649\\u0672-\\u06d3\\u06e7-\\u06e8\\u06fb-\\u06fc\\u0730-\\u074a\\u0800-\\u0814\\u081b-\\u0823\\u0825-\\u0827\\u0829-\\u082d\\u0840-\\u0857\\u08e4-\\u08fe\\u0900-\\u0903\\u093a-\\u093c\\u093e-\\u094f\\u0951-\\u0957\\u0962-\\u0963\\u0966-\\u096f\\u0981-\\u0983\\u09bc\\u09be-\\u09c4\\u09c7\\u09c8\\u09d7\\u09df-\\u09e0\\u0a01-\\u0a03\\u0a3c\\u0a3e-\\u0a42\\u0a47\\u0a48\\u0a4b-\\u0a4d\\u0a51\\u0a66-\\u0a71\\u0a75\\u0a81-\\u0a83\\u0abc\\u0abe-\\u0ac5\\u0ac7-\\u0ac9\\u0acb-\\u0acd\\u0ae2-\\u0ae3\\u0ae6-\\u0aef\\u0b01-\\u0b03\\u0b3c\\u0b3e-\\u0b44\\u0b47\\u0b48\\u0b4b-\\u0b4d\\u0b56\\u0b57\\u0b5f-\\u0b60\\u0b66-\\u0b6f\\u0b82\\u0bbe-\\u0bc2\\u0bc6-\\u0bc8\\u0bca-\\u0bcd\\u0bd7\\u0be6-\\u0bef\\u0c01-\\u0c03\\u0c46-\\u0c48\\u0c4a-\\u0c4d\\u0c55\\u0c56\\u0c62-\\u0c63\\u0c66-\\u0c6f\\u0c82\\u0c83\\u0cbc\\u0cbe-\\u0cc4\\u0cc6-\\u0cc8\\u0cca-\\u0ccd\\u0cd5\\u0cd6\\u0ce2-\\u0ce3\\u0ce6-\\u0cef\\u0d02\\u0d03\\u0d46-\\u0d48\\u0d57\\u0d62-\\u0d63\\u0d66-\\u0d6f\\u0d82\\u0d83\\u0dca\\u0dcf-\\u0dd4\\u0dd6\\u0dd8-\\u0ddf\\u0df2\\u0df3\\u0e34-\\u0e3a\\u0e40-\\u0e45\\u0e50-\\u0e59\\u0eb4-\\u0eb9\\u0ec8-\\u0ecd\\u0ed0-\\u0ed9\\u0f18\\u0f19\\u0f20-\\u0f29\\u0f35\\u0f37\\u0f39\\u0f41-\\u0f47\\u0f71-\\u0f84\\u0f86-\\u0f87\\u0f8d-\\u0f97\\u0f99-\\u0fbc\\u0fc6\\u1000-\\u1029\\u1040-\\u1049\\u1067-\\u106d\\u1071-\\u1074\\u1082-\\u108d\\u108f-\\u109d\\u135d-\\u135f\\u170e-\\u1710\\u1720-\\u1730\\u1740-\\u1750\\u1772\\u1773\\u1780-\\u17b2\\u17dd\\u17e0-\\u17e9\\u180b-\\u180d\\u1810-\\u1819\\u1920-\\u192b\\u1930-\\u193b\\u1951-\\u196d\\u19b0-\\u19c0\\u19c8-\\u19c9\\u19d0-\\u19d9\\u1a00-\\u1a15\\u1a20-\\u1a53\\u1a60-\\u1a7c\\u1a7f-\\u1a89\\u1a90-\\u1a99\\u1b46-\\u1b4b\\u1b50-\\u1b59\\u1b6b-\\u1b73\\u1bb0-\\u1bb9\\u1be6-\\u1bf3\\u1c00-\\u1c22\\u1c40-\\u1c49\\u1c5b-\\u1c7d\\u1cd0-\\u1cd2\\u1d00-\\u1dbe\\u1e01-\\u1f15\\u200c\\u200d\\u203f\\u2040\\u2054\\u20d0-\\u20dc\\u20e1\\u20e5-\\u20f0\\u2d81-\\u2d96\\u2de0-\\u2dff\\u3021-\\u3028\\u3099\\u309a\\ua640-\\ua66d\\ua674-\\ua67d\\ua69f\\ua6f0-\\ua6f1\\ua7f8-\\ua800\\ua806\\ua80b\\ua823-\\ua827\\ua880-\\ua881\\ua8b4-\\ua8c4\\ua8d0-\\ua8d9\\ua8f3-\\ua8f7\\ua900-\\ua909\\ua926-\\ua92d\\ua930-\\ua945\\ua980-\\ua983\\ua9b3-\\ua9c0\\uaa00-\\uaa27\\uaa40-\\uaa41\\uaa4c-\\uaa4d\\uaa50-\\uaa59\\uaa7b\\uaae0-\\uaae9\\uaaf2-\\uaaf3\\uabc0-\\uabe1\\uabec\\uabed\\uabf0-\\uabf9\\ufb20-\\ufb28\\ufe00-\\ufe0f\\ufe20-\\ufe26\\ufe33\\ufe34\\ufe4d-\\ufe4f\\uff10-\\uff19\\uff3f",_="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",S="(?:"+_+"|["+y+h+"])",L="(?:"+_+"|["+C+h+g+"])*";o.identifier=new RegExp(S+L,"g"),o.identifierStart=new RegExp(S),o.identifierMatch=new RegExp("(?:"+_+"|["+C+h+g+"])+");var N=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;o.newline=/[\n\r\u2028\u2029]/,o.lineBreak=new RegExp(`\r
|
|
|`+o.newline.source),o.allLineBreaks=new RegExp(o.lineBreak.source,"g")},function(te,o,y){var C=y(6).Options,h=["before-newline","after-newline","preserve-newline"];function g(_){C.call(this,_,"js");var S=this.raw_options.brace_style||null;S==="expand-strict"?this.raw_options.brace_style="expand":S==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var L=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var N=0;N<L.length;N++)L[N]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=L[N];this.unindent_chained_methods=this._get_boolean("unindent_chained_methods"),this.break_chained_methods=this._get_boolean("break_chained_methods"),this.space_in_paren=this._get_boolean("space_in_paren"),this.space_in_empty_paren=this._get_boolean("space_in_empty_paren"),this.jslint_happy=this._get_boolean("jslint_happy"),this.space_after_anon_function=this._get_boolean("space_after_anon_function"),this.space_after_named_function=this._get_boolean("space_after_named_function"),this.keep_array_indentation=this._get_boolean("keep_array_indentation"),this.space_before_conditional=this._get_boolean("space_before_conditional",!0),this.unescape_strings=this._get_boolean("unescape_strings"),this.e4x=this._get_boolean("e4x"),this.comma_first=this._get_boolean("comma_first"),this.operator_position=this._get_selection("operator_position",h),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}g.prototype=new C,te.exports.Options=g},function(te){function o(h,g){this.raw_options=y(h,g),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}o.prototype._get_array=function(h,g){var _=this.raw_options[h],S=g||[];return typeof _=="object"?_!==null&&typeof _.concat=="function"&&(S=_.concat()):typeof _=="string"&&(S=_.split(/[^a-zA-Z0-9_\/\-]+/)),S},o.prototype._get_boolean=function(h,g){var _=this.raw_options[h],S=_===void 0?!!g:!!_;return S},o.prototype._get_characters=function(h,g){var _=this.raw_options[h],S=g||"";return typeof _=="string"&&(S=_.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),S},o.prototype._get_number=function(h,g){var _=this.raw_options[h];g=parseInt(g,10),isNaN(g)&&(g=0);var S=parseInt(_,10);return isNaN(S)&&(S=g),S},o.prototype._get_selection=function(h,g,_){var S=this._get_selection_list(h,g,_);if(S.length!==1)throw new Error("Invalid Option Value: The option '"+h+`' can only be one of the following values:
|
|
`+g+`
|
|
You passed in: '`+this.raw_options[h]+"'");return S[0]},o.prototype._get_selection_list=function(h,g,_){if(!g||g.length===0)throw new Error("Selection list cannot be empty.");if(_=_||[g[0]],!this._is_valid_selection(_,g))throw new Error("Invalid Default Value!");var S=this._get_array(h,_);if(!this._is_valid_selection(S,g))throw new Error("Invalid Option Value: The option '"+h+`' can contain only the following values:
|
|
`+g+`
|
|
You passed in: '`+this.raw_options[h]+"'");return S},o.prototype._is_valid_selection=function(h,g){return h.length&&g.length&&!h.some(function(_){return g.indexOf(_)===-1})};function y(h,g){var _={};h=C(h);var S;for(S in h)S!==g&&(_[S]=h[S]);if(g&&h[g])for(S in h[g])_[S]=h[g][S];return _}function C(h){var g={},_;for(_ in h){var S=_.replace(/-/g,"_");g[S]=h[_]}return g}te.exports.Options=o,te.exports.normalizeOpts=C,te.exports.mergeOpts=y},function(te,o,y){var C=y(8).InputScanner,h=y(9).Tokenizer,g=y(9).TOKEN,_=y(13).Directives,S=y(4),L=y(12).Pattern,N=y(14).TemplatablePattern;function H(q,ie){return ie.indexOf(q)!==-1}var R={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:g.START,RAW:g.RAW,EOF:g.EOF},k=new _(/\/\*/,/\*\//),T=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,A=/[0-9]/,J=/[^\d\.]/,ee=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),G=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";G=G.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),G="\\?\\.(?!\\d) "+G,G=G.replace(/ /g,"|");var I=new RegExp(G),re="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),le=re.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),Te=new RegExp("^(?:"+le.join("|")+")$"),W,O=function(q,ie){h.call(this,q,ie),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var V=new L(this._input),v=new N(this._input).read_options(this._options);this.__patterns={template:v,identifier:v.starting_with(S.identifier).matching(S.identifierMatch),number:V.matching(T),punct:V.matching(I),comment:V.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:V.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:V.matching(/<!--/),html_comment_end:V.matching(/-->/),include:V.starting_with(/#include/).until_after(S.lineBreak),shebang:V.starting_with(/#!/).until_after(S.lineBreak),xml:V.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:v.until(/['\\\n\r\u2028\u2029]/),double_quote:v.until(/["\\\n\r\u2028\u2029]/),template_text:v.until(/[`\\$]/),template_expression:v.until(/[`}\\]/)}};O.prototype=new h,O.prototype._is_comment=function(q){return q.type===R.COMMENT||q.type===R.BLOCK_COMMENT||q.type===R.UNKNOWN},O.prototype._is_opening=function(q){return q.type===R.START_BLOCK||q.type===R.START_EXPR},O.prototype._is_closing=function(q,ie){return(q.type===R.END_BLOCK||q.type===R.END_EXPR)&&ie&&(q.text==="]"&&ie.text==="["||q.text===")"&&ie.text==="("||q.text==="}"&&ie.text==="{")},O.prototype._reset=function(){W=!1},O.prototype._get_next_token=function(q,ie){var V=null;this._readWhitespace();var v=this._input.peek();return v===null?this._create_token(R.EOF,""):(V=V||this._read_non_javascript(v),V=V||this._read_string(v),V=V||this._read_pair(v,this._input.peek(1)),V=V||this._read_word(q),V=V||this._read_singles(v),V=V||this._read_comment(v),V=V||this._read_regexp(v,q),V=V||this._read_xml(v,q),V=V||this._read_punctuation(),V=V||this._create_token(R.UNKNOWN,this._input.next()),V)},O.prototype._read_word=function(q){var ie;if(ie=this.__patterns.identifier.read(),ie!=="")return ie=ie.replace(S.allLineBreaks,`
|
|
`),!(q.type===R.DOT||q.type===R.RESERVED&&(q.text==="set"||q.text==="get"))&&Te.test(ie)?(ie==="in"||ie==="of")&&(q.type===R.WORD||q.type===R.STRING)?this._create_token(R.OPERATOR,ie):this._create_token(R.RESERVED,ie):this._create_token(R.WORD,ie);if(ie=this.__patterns.number.read(),ie!=="")return this._create_token(R.WORD,ie)},O.prototype._read_singles=function(q){var ie=null;return q==="("||q==="["?ie=this._create_token(R.START_EXPR,q):q===")"||q==="]"?ie=this._create_token(R.END_EXPR,q):q==="{"?ie=this._create_token(R.START_BLOCK,q):q==="}"?ie=this._create_token(R.END_BLOCK,q):q===";"?ie=this._create_token(R.SEMICOLON,q):q==="."&&J.test(this._input.peek(1))?ie=this._create_token(R.DOT,q):q===","&&(ie=this._create_token(R.COMMA,q)),ie&&this._input.next(),ie},O.prototype._read_pair=function(q,ie){var V=null;return q==="#"&&ie==="{"&&(V=this._create_token(R.START_BLOCK,q+ie)),V&&(this._input.next(),this._input.next()),V},O.prototype._read_punctuation=function(){var q=this.__patterns.punct.read();if(q!=="")return q==="="?this._create_token(R.EQUALS,q):q==="?."?this._create_token(R.DOT,q):this._create_token(R.OPERATOR,q)},O.prototype._read_non_javascript=function(q){var ie="";if(q==="#"){if(this._is_first_token()&&(ie=this.__patterns.shebang.read(),ie))return this._create_token(R.UNKNOWN,ie.trim()+`
|
|
`);if(ie=this.__patterns.include.read(),ie)return this._create_token(R.UNKNOWN,ie.trim()+`
|
|
`);q=this._input.next();var V="#";if(this._input.hasNext()&&this._input.testChar(A)){do q=this._input.next(),V+=q;while(this._input.hasNext()&&q!=="#"&&q!=="=");return q==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(V+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(V+="{}",this._input.next(),this._input.next())),this._create_token(R.WORD,V)}this._input.back()}else if(q==="<"&&this._is_first_token()){if(ie=this.__patterns.html_comment_start.read(),ie){for(;this._input.hasNext()&&!this._input.testChar(S.newline);)ie+=this._input.next();return W=!0,this._create_token(R.COMMENT,ie)}}else if(W&&q==="-"&&(ie=this.__patterns.html_comment_end.read(),ie))return W=!1,this._create_token(R.COMMENT,ie);return null},O.prototype._read_comment=function(q){var ie=null;if(q==="/"){var V="";if(this._input.peek(1)==="*"){V=this.__patterns.block_comment.read();var v=k.get_directives(V);v&&v.ignore==="start"&&(V+=k.readIgnored(this._input)),V=V.replace(S.allLineBreaks,`
|
|
`),ie=this._create_token(R.BLOCK_COMMENT,V),ie.directives=v}else this._input.peek(1)==="/"&&(V=this.__patterns.comment.read(),ie=this._create_token(R.COMMENT,V))}return ie},O.prototype._read_string=function(q){if(q==="`"||q==="'"||q==='"'){var ie=this._input.next();return this.has_char_escapes=!1,q==="`"?ie+=this._read_string_recursive("`",!0,"${"):ie+=this._read_string_recursive(q),this.has_char_escapes&&this._options.unescape_strings&&(ie=Q(ie)),this._input.peek()===q&&(ie+=this._input.next()),ie=ie.replace(S.allLineBreaks,`
|
|
`),this._create_token(R.STRING,ie)}return null},O.prototype._allow_regexp_or_xml=function(q){return q.type===R.RESERVED&&H(q.text,["return","case","throw","else","do","typeof","yield"])||q.type===R.END_EXPR&&q.text===")"&&q.opened.previous.type===R.RESERVED&&H(q.opened.previous.text,["if","while","for"])||H(q.type,[R.COMMENT,R.START_EXPR,R.START_BLOCK,R.START,R.END_BLOCK,R.OPERATOR,R.EQUALS,R.EOF,R.SEMICOLON,R.COMMA])},O.prototype._read_regexp=function(q,ie){if(q==="/"&&this._allow_regexp_or_xml(ie)){for(var V=this._input.next(),v=!1,m=!1;this._input.hasNext()&&(v||m||this._input.peek()!==q)&&!this._input.testChar(S.newline);)V+=this._input.peek(),v?v=!1:(v=this._input.peek()==="\\",this._input.peek()==="["?m=!0:this._input.peek()==="]"&&(m=!1)),this._input.next();return this._input.peek()===q&&(V+=this._input.next(),V+=this._input.read(S.identifier)),this._create_token(R.STRING,V)}return null},O.prototype._read_xml=function(q,ie){if(this._options.e4x&&q==="<"&&this._allow_regexp_or_xml(ie)){var V="",v=this.__patterns.xml.read_match();if(v){for(var m=v[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),U=m.indexOf("{")===0,se=0;v;){var pe=!!v[1],He=v[2],qe=!!v[v.length-1]||He.slice(0,8)==="![CDATA[";if(!qe&&(He===m||U&&He.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(pe?--se:++se),V+=v[0],se<=0)break;v=this.__patterns.xml.read_match()}return v||(V+=this._input.match(/[\s\S]*/g)[0]),V=V.replace(S.allLineBreaks,`
|
|
`),this._create_token(R.STRING,V)}}return null};function Q(q){for(var ie="",V=0,v=new C(q),m=null;v.hasNext();)if(m=v.match(/([\s]|[^\\]|\\\\)+/g),m&&(ie+=m[0]),v.peek()==="\\"){if(v.next(),v.peek()==="x")m=v.match(/x([0-9A-Fa-f]{2})/g);else if(v.peek()==="u")m=v.match(/u([0-9A-Fa-f]{4})/g),m||(m=v.match(/u\{([0-9A-Fa-f]+)\}/g));else{ie+="\\",v.hasNext()&&(ie+=v.next());continue}if(!m||(V=parseInt(m[1],16),V>126&&V<=255&&m[0].indexOf("x")===0))return q;V>=0&&V<32||V>1114111?ie+="\\"+m[0]:V===34||V===39||V===92?ie+="\\"+String.fromCharCode(V):ie+=String.fromCharCode(V)}return ie}O.prototype._read_string_recursive=function(q,ie,V){var v,m;q==="'"?m=this.__patterns.single_quote:q==='"'?m=this.__patterns.double_quote:q==="`"?m=this.__patterns.template_text:q==="}"&&(m=this.__patterns.template_expression);for(var U=m.read(),se="";this._input.hasNext();){if(se=this._input.next(),se===q||!ie&&S.newline.test(se)){this._input.back();break}else se==="\\"&&this._input.hasNext()?(v=this._input.peek(),v==="x"||v==="u"?this.has_char_escapes=!0:v==="\r"&&this._input.peek(1)===`
|
|
`&&this._input.next(),se+=this._input.next()):V&&(V==="${"&&se==="$"&&this._input.peek()==="{"&&(se+=this._input.next()),V===se&&(q==="`"?se+=this._read_string_recursive("}",ie,"`"):se+=this._read_string_recursive("`",ie,"${"),this._input.hasNext()&&(se+=this._input.next())));se+=m.read(),U+=se}return U},te.exports.Tokenizer=O,te.exports.TOKEN=R,te.exports.positionable_operators=ee.slice(),te.exports.line_starters=re.slice()},function(te){var o=RegExp.prototype.hasOwnProperty("sticky");function y(C){this.__input=C||"",this.__input_length=this.__input.length,this.__position=0}y.prototype.restart=function(){this.__position=0},y.prototype.back=function(){this.__position>0&&(this.__position-=1)},y.prototype.hasNext=function(){return this.__position<this.__input_length},y.prototype.next=function(){var C=null;return this.hasNext()&&(C=this.__input.charAt(this.__position),this.__position+=1),C},y.prototype.peek=function(C){var h=null;return C=C||0,C+=this.__position,C>=0&&C<this.__input_length&&(h=this.__input.charAt(C)),h},y.prototype.__match=function(C,h){C.lastIndex=h;var g=C.exec(this.__input);return g&&!(o&&C.sticky)&&g.index!==h&&(g=null),g},y.prototype.test=function(C,h){return h=h||0,h+=this.__position,h>=0&&h<this.__input_length?!!this.__match(C,h):!1},y.prototype.testChar=function(C,h){var g=this.peek(h);return C.lastIndex=0,g!==null&&C.test(g)},y.prototype.match=function(C){var h=this.__match(C,this.__position);return h?this.__position+=h[0].length:h=null,h},y.prototype.read=function(C,h,g){var _="",S;return C&&(S=this.match(C),S&&(_+=S[0])),h&&(S||!C)&&(_+=this.readUntil(h,g)),_},y.prototype.readUntil=function(C,h){var g="",_=this.__position;C.lastIndex=this.__position;var S=C.exec(this.__input);return S?(_=S.index,h&&(_+=S[0].length)):_=this.__input_length,g=this.__input.substring(this.__position,_),this.__position=_,g},y.prototype.readUntilAfter=function(C){return this.readUntil(C,!0)},y.prototype.get_regexp=function(C,h){var g=null,_="g";return h&&o&&(_="y"),typeof C=="string"&&C!==""?g=new RegExp(C,_):C&&(g=new RegExp(C.source,_)),g},y.prototype.get_literal_regexp=function(C){return RegExp(C.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},y.prototype.peekUntilAfter=function(C){var h=this.__position,g=this.readUntilAfter(C);return this.__position=h,g},y.prototype.lookBack=function(C){var h=this.__position-1;return h>=C.length&&this.__input.substring(h-C.length,h).toLowerCase()===C},te.exports.InputScanner=y},function(te,o,y){var C=y(8).InputScanner,h=y(3).Token,g=y(10).TokenStream,_=y(11).WhitespacePattern,S={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},L=function(N,H){this._input=new C(N),this._options=H||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new _(this._input)};L.prototype.tokenize=function(){this._input.restart(),this.__tokens=new g,this._reset();for(var N,H=new h(S.START,""),R=null,k=[],T=new g;H.type!==S.EOF;){for(N=this._get_next_token(H,R);this._is_comment(N);)T.add(N),N=this._get_next_token(H,R);T.isEmpty()||(N.comments_before=T,T=new g),N.parent=R,this._is_opening(N)?(k.push(R),R=N):R&&this._is_closing(N,R)&&(N.opened=R,R.closed=N,R=k.pop(),N.parent=R),N.previous=H,H.next=N,this.__tokens.add(N),H=N}return this.__tokens},L.prototype._is_first_token=function(){return this.__tokens.isEmpty()},L.prototype._reset=function(){},L.prototype._get_next_token=function(N,H){this._readWhitespace();var R=this._input.read(/.+/g);return R?this._create_token(S.RAW,R):this._create_token(S.EOF,"")},L.prototype._is_comment=function(N){return!1},L.prototype._is_opening=function(N){return!1},L.prototype._is_closing=function(N,H){return!1},L.prototype._create_token=function(N,H){var R=new h(N,H,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return R},L.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},te.exports.Tokenizer=L,te.exports.TOKEN=S},function(te){function o(y){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=y}o.prototype.restart=function(){this.__position=0},o.prototype.isEmpty=function(){return this.__tokens_length===0},o.prototype.hasNext=function(){return this.__position<this.__tokens_length},o.prototype.next=function(){var y=null;return this.hasNext()&&(y=this.__tokens[this.__position],this.__position+=1),y},o.prototype.peek=function(y){var C=null;return y=y||0,y+=this.__position,y>=0&&y<this.__tokens_length&&(C=this.__tokens[y]),C},o.prototype.add=function(y){this.__parent_token&&(y.parent=this.__parent_token),this.__tokens.push(y),this.__tokens_length+=1},te.exports.TokenStream=o},function(te,o,y){var C=y(12).Pattern;function h(g,_){C.call(this,g,_),_?this._line_regexp=this._input.get_regexp(_._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}h.prototype=new C,h.prototype.__set_whitespace_patterns=function(g,_){g+="\\t ",_+="\\n\\r",this._match_pattern=this._input.get_regexp("["+g+_+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+_+"]")},h.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var g=this._input.read(this._match_pattern);if(g===" ")this.whitespace_before_token=" ";else if(g){var _=this.__split(this._newline_regexp,g);this.newline_count=_.length-1,this.whitespace_before_token=_[this.newline_count]}return g},h.prototype.matching=function(g,_){var S=this._create();return S.__set_whitespace_patterns(g,_),S._update(),S},h.prototype._create=function(){return new h(this._input,this)},h.prototype.__split=function(g,_){g.lastIndex=0;for(var S=0,L=[],N=g.exec(_);N;)L.push(_.substring(S,N.index)),S=N.index+N[0].length,N=g.exec(_);return S<_.length?L.push(_.substring(S,_.length)):L.push(""),L},te.exports.WhitespacePattern=h},function(te){function o(y,C){this._input=y,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,C&&(this._starting_pattern=this._input.get_regexp(C._starting_pattern,!0),this._match_pattern=this._input.get_regexp(C._match_pattern,!0),this._until_pattern=this._input.get_regexp(C._until_pattern),this._until_after=C._until_after)}o.prototype.read=function(){var y=this._input.read(this._starting_pattern);return(!this._starting_pattern||y)&&(y+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),y},o.prototype.read_match=function(){return this._input.match(this._match_pattern)},o.prototype.until_after=function(y){var C=this._create();return C._until_after=!0,C._until_pattern=this._input.get_regexp(y),C._update(),C},o.prototype.until=function(y){var C=this._create();return C._until_after=!1,C._until_pattern=this._input.get_regexp(y),C._update(),C},o.prototype.starting_with=function(y){var C=this._create();return C._starting_pattern=this._input.get_regexp(y,!0),C._update(),C},o.prototype.matching=function(y){var C=this._create();return C._match_pattern=this._input.get_regexp(y,!0),C._update(),C},o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){},te.exports.Pattern=o},function(te){function o(y,C){y=typeof y=="string"?y:y.source,C=typeof C=="string"?C:C.source,this.__directives_block_pattern=new RegExp(y+/ beautify( \w+[:]\w+)+ /.source+C,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(y+/\sbeautify\signore:end\s/.source+C,"g")}o.prototype.get_directives=function(y){if(!y.match(this.__directives_block_pattern))return null;var C={};this.__directive_pattern.lastIndex=0;for(var h=this.__directive_pattern.exec(y);h;)C[h[1]]=h[2],h=this.__directive_pattern.exec(y);return C},o.prototype.readIgnored=function(y){return y.readUntilAfter(this.__directives_end_ignore_pattern)},te.exports.Directives=o},function(te,o,y){var C=y(12).Pattern,h={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function g(_,S){C.call(this,_,S),this.__template_pattern=null,this._disabled=Object.assign({},h),this._excluded=Object.assign({},h),S&&(this.__template_pattern=this._input.get_regexp(S.__template_pattern),this._excluded=Object.assign(this._excluded,S._excluded),this._disabled=Object.assign(this._disabled,S._disabled));var L=new C(_);this.__patterns={handlebars_comment:L.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:L.starting_with(/{{{/).until_after(/}}}/),handlebars:L.starting_with(/{{/).until_after(/}}/),php:L.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:L.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:L.starting_with(/{%/).until_after(/%}/),django_value:L.starting_with(/{{/).until_after(/}}/),django_comment:L.starting_with(/{#/).until_after(/#}/),smarty:L.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:L.starting_with(/{\*/).until_after(/\*}/),smarty_literal:L.starting_with(/{literal}/).until_after(/{\/literal}/)}}g.prototype=new C,g.prototype._create=function(){return new g(this._input,this)},g.prototype._update=function(){this.__set_templated_pattern()},g.prototype.disable=function(_){var S=this._create();return S._disabled[_]=!0,S._update(),S},g.prototype.read_options=function(_){var S=this._create();for(var L in h)S._disabled[L]=_.templating.indexOf(L)===-1;return S._update(),S},g.prototype.exclude=function(_){var S=this._create();return S._excluded[_]=!0,S._update(),S},g.prototype.read=function(){var _="";this._match_pattern?_=this._input.read(this._starting_pattern):_=this._input.read(this._starting_pattern,this.__template_pattern);for(var S=this._read_template();S;)this._match_pattern?S+=this._input.read(this._match_pattern):S+=this._input.readUntil(this.__template_pattern),_+=S,S=this._read_template();return this._until_after&&(_+=this._input.readUntilAfter(this._until_pattern)),_},g.prototype.__set_templated_pattern=function(){var _=[];this._disabled.php||_.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||_.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||_.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||_.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(_.push(this.__patterns.django._starting_pattern.source),_.push(this.__patterns.django_value._starting_pattern.source),_.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||_.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&_.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+_.join("|")+")")},g.prototype._read_template=function(){var _="",S=this._input.peek();if(S==="<"){var L=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&L==="?"&&(_=_||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&L==="%"&&(_=_||this.__patterns.erb.read())}else S==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(_=_||this.__patterns.handlebars_comment.read(),_=_||this.__patterns.handlebars_unescaped.read(),_=_||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(_=_||this.__patterns.django_value.read()),this._excluded.django||(_=_||this.__patterns.django_comment.read(),_=_||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(_=_||this.__patterns.smarty_comment.read(),_=_||this.__patterns.smarty_literal.read(),_=_||this.__patterns.smarty.read()));return _},te.exports.TemplatablePattern=g}],F={};function f(te){var o=F[te];if(o!==void 0)return o.exports;var y=F[te]={exports:{}};return fe[te](y,y.exports,f),y.exports}var ue=f(0);ae=ue})();var ve=ae;E=[],x=function(){return{js_beautify:ve}}.apply(je,E),x!==void 0&&(on.exports=x)})()},32834:function(on){(function(je,E){on.exports=E()})(this,function(){"use strict";function je(Ne,ke){for(var Pe=0;Pe<ke.length;Pe++){var z=ke[Pe];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(Ne,z.key,z)}}function E(Ne,ke,Pe){return ke&&je(Ne.prototype,ke),Pe&&je(Ne,Pe),Ne}function x(Ne,ke){if(Ne){if(typeof Ne=="string")return ae(Ne,ke);var Pe=Object.prototype.toString.call(Ne).slice(8,-1);if(Pe==="Object"&&Ne.constructor&&(Pe=Ne.constructor.name),Pe==="Map"||Pe==="Set")return Array.from(Ne);if(Pe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Pe))return ae(Ne,ke)}}function ae(Ne,ke){(ke==null||ke>Ne.length)&&(ke=Ne.length);for(var Pe=0,z=new Array(ke);Pe<ke;Pe++)z[Pe]=Ne[Pe];return z}function ve(Ne,ke){var Pe=typeof Symbol!="undefined"&&Ne[Symbol.iterator]||Ne["@@iterator"];if(Pe)return(Pe=Pe.call(Ne)).next.bind(Pe);if(Array.isArray(Ne)||(Pe=x(Ne))||ke&&Ne&&typeof Ne.length=="number"){Pe&&(Ne=Pe);var z=0;return function(){return z>=Ne.length?{done:!0}:{done:!1,value:Ne[z++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var fe={exports:{}};function F(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}function f(Ne){fe.exports.defaults=Ne}fe.exports={defaults:F(),getDefaults:F,changeDefaults:f};var ue=/[&<>"']/,te=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,y=/[<>"']|&(?!#?\w+;)/g,C={"&":"&","<":"<",">":">",'"':""","'":"'"},h=function(ke){return C[ke]};function g(Ne,ke){if(ke){if(ue.test(Ne))return Ne.replace(te,h)}else if(o.test(Ne))return Ne.replace(y,h);return Ne}var _=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function S(Ne){return Ne.replace(_,function(ke,Pe){return Pe=Pe.toLowerCase(),Pe==="colon"?":":Pe.charAt(0)==="#"?Pe.charAt(1)==="x"?String.fromCharCode(parseInt(Pe.substring(2),16)):String.fromCharCode(+Pe.substring(1)):""})}var L=/(^|[^\[])\^/g;function N(Ne,ke){Ne=Ne.source||Ne,ke=ke||"";var Pe={replace:function(oe,he){return he=he.source||he,he=he.replace(L,"$1"),Ne=Ne.replace(oe,he),Pe},getRegex:function(){return new RegExp(Ne,ke)}};return Pe}var H=/[^\w:]/g,R=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function k(Ne,ke,Pe){if(Ne){var z;try{z=decodeURIComponent(S(Pe)).replace(H,"").toLowerCase()}catch(oe){return null}if(z.indexOf("javascript:")===0||z.indexOf("vbscript:")===0||z.indexOf("data:")===0)return null}ke&&!R.test(Pe)&&(Pe=G(ke,Pe));try{Pe=encodeURI(Pe).replace(/%25/g,"%")}catch(oe){return null}return Pe}var T={},A=/^[^:]+:\/*[^/]*$/,J=/^([^:]+:)[\s\S]*$/,ee=/^([^:]+:\/*[^/]*)[\s\S]*$/;function G(Ne,ke){T[" "+Ne]||(A.test(Ne)?T[" "+Ne]=Ne+"/":T[" "+Ne]=Te(Ne,"/",!0)),Ne=T[" "+Ne];var Pe=Ne.indexOf(":")===-1;return ke.substring(0,2)==="//"?Pe?ke:Ne.replace(J,"$1")+ke:ke.charAt(0)==="/"?Pe?ke:Ne.replace(ee,"$1")+ke:Ne+ke}var I={exec:function(){}};function re(Ne){for(var ke=1,Pe,z;ke<arguments.length;ke++){Pe=arguments[ke];for(z in Pe)Object.prototype.hasOwnProperty.call(Pe,z)&&(Ne[z]=Pe[z])}return Ne}function le(Ne,ke){var Pe=Ne.replace(/\|/g,function(he,ce,be){for(var ze=!1,Ze=ce;--Ze>=0&&be[Ze]==="\\";)ze=!ze;return ze?"|":" |"}),z=Pe.split(/ \|/),oe=0;if(z.length>ke)z.splice(ke);else for(;z.length<ke;)z.push("");for(;oe<z.length;oe++)z[oe]=z[oe].trim().replace(/\\\|/g,"|");return z}function Te(Ne,ke,Pe){var z=Ne.length;if(z===0)return"";for(var oe=0;oe<z;){var he=Ne.charAt(z-oe-1);if(he===ke&&!Pe)oe++;else if(he!==ke&&Pe)oe++;else break}return Ne.substr(0,z-oe)}function W(Ne,ke){if(Ne.indexOf(ke[1])===-1)return-1;for(var Pe=Ne.length,z=0,oe=0;oe<Pe;oe++)if(Ne[oe]==="\\")oe++;else if(Ne[oe]===ke[0])z++;else if(Ne[oe]===ke[1]&&(z--,z<0))return oe;return-1}function O(Ne){Ne&&Ne.sanitize&&!Ne.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function Q(Ne,ke){if(ke<1)return"";for(var Pe="";ke>1;)ke&1&&(Pe+=Ne),ke>>=1,Ne+=Ne;return Pe+Ne}var q={escape:g,unescape:S,edit:N,cleanUrl:k,resolveUrl:G,noopTest:I,merge:re,splitCells:le,rtrim:Te,findClosingBracket:W,checkSanitizeDeprecation:O,repeatString:Q},ie=fe.exports.defaults,V=q.rtrim,v=q.splitCells,m=q.escape,U=q.findClosingBracket;function se(Ne,ke,Pe){var z=ke.href,oe=ke.title?m(ke.title):null,he=Ne[1].replace(/\\([\[\]])/g,"$1");return Ne[0].charAt(0)!=="!"?{type:"link",raw:Pe,href:z,title:oe,text:he}:{type:"image",raw:Pe,href:z,title:oe,text:m(he)}}function pe(Ne,ke){var Pe=Ne.match(/^(\s+)(?:```)/);if(Pe===null)return ke;var z=Pe[1];return ke.split(`
|
|
`).map(function(oe){var he=oe.match(/^\s+/);if(he===null)return oe;var ce=he[0];return ce.length>=z.length?oe.slice(z.length):oe}).join(`
|
|
`)}var He=function(){function Ne(Pe){this.options=Pe||ie}var ke=Ne.prototype;return ke.space=function(z){var oe=this.rules.block.newline.exec(z);if(oe)return oe[0].length>1?{type:"space",raw:oe[0]}:{raw:`
|
|
`}},ke.code=function(z){var oe=this.rules.block.code.exec(z);if(oe){var he=oe[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:oe[0],codeBlockStyle:"indented",text:this.options.pedantic?he:V(he,`
|
|
`)}}},ke.fences=function(z){var oe=this.rules.block.fences.exec(z);if(oe){var he=oe[0],ce=pe(he,oe[3]||"");return{type:"code",raw:he,lang:oe[2]?oe[2].trim():oe[2],text:ce}}},ke.heading=function(z){var oe=this.rules.block.heading.exec(z);if(oe){var he=oe[2].trim();if(/#$/.test(he)){var ce=V(he,"#");(this.options.pedantic||!ce||/ $/.test(ce))&&(he=ce.trim())}return{type:"heading",raw:oe[0],depth:oe[1].length,text:he}}},ke.nptable=function(z){var oe=this.rules.block.nptable.exec(z);if(oe){var he={type:"table",header:v(oe[1].replace(/^ *| *\| *$/g,"")),align:oe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:oe[3]?oe[3].replace(/\n$/,"").split(`
|
|
`):[],raw:oe[0]};if(he.header.length===he.align.length){var ce=he.align.length,be;for(be=0;be<ce;be++)/^ *-+: *$/.test(he.align[be])?he.align[be]="right":/^ *:-+: *$/.test(he.align[be])?he.align[be]="center":/^ *:-+ *$/.test(he.align[be])?he.align[be]="left":he.align[be]=null;for(ce=he.cells.length,be=0;be<ce;be++)he.cells[be]=v(he.cells[be],he.header.length);return he}}},ke.hr=function(z){var oe=this.rules.block.hr.exec(z);if(oe)return{type:"hr",raw:oe[0]}},ke.blockquote=function(z){var oe=this.rules.block.blockquote.exec(z);if(oe){var he=oe[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:oe[0],text:he}}},ke.list=function(z){var oe=this.rules.block.list.exec(z);if(oe){var he=oe[0],ce=oe[2],be=ce.length>1,ze={type:"list",raw:he,ordered:be,start:be?+ce.slice(0,-1):"",loose:!1,items:[]},Ze=oe[0].match(this.rules.block.item),$e=!1,ft,en,an,yt,Gt,_n,Bn,cn,pn,Tn=Ze.length;an=this.rules.block.listItemStart.exec(Ze[0]);for(var mn=0;mn<Tn;mn++){if(ft=Ze[mn],he=ft,this.options.pedantic||(pn=ft.match(new RegExp("\\n\\s*\\n {0,"+(an[0].length-1)+"}\\S")),pn&&(Gt=ft.length-pn.index+Ze.slice(mn+1).join(`
|
|
`).length,ze.raw=ze.raw.substring(0,ze.raw.length-Gt),ft=ft.substring(0,pn.index),he=ft,Tn=mn+1)),mn!==Tn-1){if(yt=this.rules.block.listItemStart.exec(Ze[mn+1]),this.options.pedantic?yt[1].length>an[1].length:yt[1].length>=an[0].length||yt[1].length>3){Ze.splice(mn,2,Ze[mn]+(!this.options.pedantic&&yt[1].length<an[0].length&&!Ze[mn].match(/\n$/)?"":`
|
|
`)+Ze[mn+1]),mn--,Tn--;continue}else(!this.options.pedantic||this.options.smartLists?yt[2][yt[2].length-1]!==ce[ce.length-1]:be===(yt[2].length===1))&&(Gt=Ze.slice(mn+1).join(`
|
|
`).length,ze.raw=ze.raw.substring(0,ze.raw.length-Gt),mn=Tn-1);an=yt}en=ft.length,ft=ft.replace(/^ *([*+-]|\d+[.)]) ?/,""),~ft.indexOf(`
|
|
`)&&(en-=ft.length,ft=this.options.pedantic?ft.replace(/^ {1,4}/gm,""):ft.replace(new RegExp("^ {1,"+en+"}","gm"),"")),ft=V(ft,`
|
|
`),mn!==Tn-1&&(he=he+`
|
|
`),_n=$e||/\n\n(?!\s*$)/.test(he),mn!==Tn-1&&($e=he.slice(-2)===`
|
|
|
|
`,_n||(_n=$e)),_n&&(ze.loose=!0),this.options.gfm&&(Bn=/^\[[ xX]\] /.test(ft),cn=void 0,Bn&&(cn=ft[1]!==" ",ft=ft.replace(/^\[[ xX]\] +/,""))),ze.items.push({type:"list_item",raw:he,task:Bn,checked:cn,loose:_n,text:ft})}return ze}},ke.html=function(z){var oe=this.rules.block.html.exec(z);if(oe)return{type:this.options.sanitize?"paragraph":"html",raw:oe[0],pre:!this.options.sanitizer&&(oe[1]==="pre"||oe[1]==="script"||oe[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(oe[0]):m(oe[0]):oe[0]}},ke.def=function(z){var oe=this.rules.block.def.exec(z);if(oe){oe[3]&&(oe[3]=oe[3].substring(1,oe[3].length-1));var he=oe[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:he,raw:oe[0],href:oe[2],title:oe[3]}}},ke.table=function(z){var oe=this.rules.block.table.exec(z);if(oe){var he={type:"table",header:v(oe[1].replace(/^ *| *\| *$/g,"")),align:oe[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:oe[3]?oe[3].replace(/\n$/,"").split(`
|
|
`):[]};if(he.header.length===he.align.length){he.raw=oe[0];var ce=he.align.length,be;for(be=0;be<ce;be++)/^ *-+: *$/.test(he.align[be])?he.align[be]="right":/^ *:-+: *$/.test(he.align[be])?he.align[be]="center":/^ *:-+ *$/.test(he.align[be])?he.align[be]="left":he.align[be]=null;for(ce=he.cells.length,be=0;be<ce;be++)he.cells[be]=v(he.cells[be].replace(/^ *\| *| *\| *$/g,""),he.header.length);return he}}},ke.lheading=function(z){var oe=this.rules.block.lheading.exec(z);if(oe)return{type:"heading",raw:oe[0],depth:oe[2].charAt(0)==="="?1:2,text:oe[1]}},ke.paragraph=function(z){var oe=this.rules.block.paragraph.exec(z);if(oe)return{type:"paragraph",raw:oe[0],text:oe[1].charAt(oe[1].length-1)===`
|
|
`?oe[1].slice(0,-1):oe[1]}},ke.text=function(z){var oe=this.rules.block.text.exec(z);if(oe)return{type:"text",raw:oe[0],text:oe[0]}},ke.escape=function(z){var oe=this.rules.inline.escape.exec(z);if(oe)return{type:"escape",raw:oe[0],text:m(oe[1])}},ke.tag=function(z,oe,he){var ce=this.rules.inline.tag.exec(z);if(ce)return!oe&&/^<a /i.test(ce[0])?oe=!0:oe&&/^<\/a>/i.test(ce[0])&&(oe=!1),!he&&/^<(pre|code|kbd|script)(\s|>)/i.test(ce[0])?he=!0:he&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ce[0])&&(he=!1),{type:this.options.sanitize?"text":"html",raw:ce[0],inLink:oe,inRawBlock:he,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ce[0]):m(ce[0]):ce[0]}},ke.link=function(z){var oe=this.rules.inline.link.exec(z);if(oe){var he=oe[2].trim();if(!this.options.pedantic&&/^</.test(he)){if(!/>$/.test(he))return;var ce=V(he.slice(0,-1),"\\");if((he.length-ce.length)%2===0)return}else{var be=U(oe[2],"()");if(be>-1){var ze=oe[0].indexOf("!")===0?5:4,Ze=ze+oe[1].length+be;oe[2]=oe[2].substring(0,be),oe[0]=oe[0].substring(0,Ze).trim(),oe[3]=""}}var $e=oe[2],ft="";if(this.options.pedantic){var en=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec($e);en&&($e=en[1],ft=en[3])}else ft=oe[3]?oe[3].slice(1,-1):"";return $e=$e.trim(),/^</.test($e)&&(this.options.pedantic&&!/>$/.test(he)?$e=$e.slice(1):$e=$e.slice(1,-1)),se(oe,{href:$e&&$e.replace(this.rules.inline._escapes,"$1"),title:ft&&ft.replace(this.rules.inline._escapes,"$1")},oe[0])}},ke.reflink=function(z,oe){var he;if((he=this.rules.inline.reflink.exec(z))||(he=this.rules.inline.nolink.exec(z))){var ce=(he[2]||he[1]).replace(/\s+/g," ");if(ce=oe[ce.toLowerCase()],!ce||!ce.href){var be=he[0].charAt(0);return{type:"text",raw:be,text:be}}return se(he,ce,he[0])}},ke.emStrong=function(z,oe,he){he===void 0&&(he="");var ce=this.rules.inline.emStrong.lDelim.exec(z);if(ce&&!(ce[3]&&he.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var be=ce[1]||ce[2]||"";if(!be||be&&(he===""||this.rules.inline.punctuation.exec(he))){var ze=ce[0].length-1,Ze,$e,ft=ze,en=0,an=ce[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(an.lastIndex=0,oe=oe.slice(-1*z.length+ze);(ce=an.exec(oe))!=null;)if(Ze=ce[1]||ce[2]||ce[3]||ce[4]||ce[5]||ce[6],!!Ze){if($e=Ze.length,ce[3]||ce[4]){ft+=$e;continue}else if((ce[5]||ce[6])&&ze%3&&!((ze+$e)%3)){en+=$e;continue}if(ft-=$e,!(ft>0))return $e=Math.min($e,$e+ft+en),Math.min(ze,$e)%2?{type:"em",raw:z.slice(0,ze+ce.index+$e+1),text:z.slice(1,ze+ce.index+$e)}:{type:"strong",raw:z.slice(0,ze+ce.index+$e+1),text:z.slice(2,ze+ce.index+$e-1)}}}}},ke.codespan=function(z){var oe=this.rules.inline.code.exec(z);if(oe){var he=oe[2].replace(/\n/g," "),ce=/[^ ]/.test(he),be=/^ /.test(he)&&/ $/.test(he);return ce&&be&&(he=he.substring(1,he.length-1)),he=m(he,!0),{type:"codespan",raw:oe[0],text:he}}},ke.br=function(z){var oe=this.rules.inline.br.exec(z);if(oe)return{type:"br",raw:oe[0]}},ke.del=function(z){var oe=this.rules.inline.del.exec(z);if(oe)return{type:"del",raw:oe[0],text:oe[2]}},ke.autolink=function(z,oe){var he=this.rules.inline.autolink.exec(z);if(he){var ce,be;return he[2]==="@"?(ce=m(this.options.mangle?oe(he[1]):he[1]),be="mailto:"+ce):(ce=m(he[1]),be=ce),{type:"link",raw:he[0],text:ce,href:be,tokens:[{type:"text",raw:ce,text:ce}]}}},ke.url=function(z,oe){var he;if(he=this.rules.inline.url.exec(z)){var ce,be;if(he[2]==="@")ce=m(this.options.mangle?oe(he[0]):he[0]),be="mailto:"+ce;else{var ze;do ze=he[0],he[0]=this.rules.inline._backpedal.exec(he[0])[0];while(ze!==he[0]);ce=m(he[0]),he[1]==="www."?be="http://"+ce:be=ce}return{type:"link",raw:he[0],text:ce,href:be,tokens:[{type:"text",raw:ce,text:ce}]}}},ke.inlineText=function(z,oe,he){var ce=this.rules.inline.text.exec(z);if(ce){var be;return oe?be=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ce[0]):m(ce[0]):ce[0]:be=m(this.options.smartypants?he(ce[0]):ce[0]),{type:"text",raw:ce[0],text:be}}},Ne}(),qe=q.noopTest,ot=q.edit,Ot=q.merge,bt={newline:/^(?: *(?:\n|$))+/,code:/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?! {0,3}bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n *)+\\n|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$)|</(?!script|pre|style)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n *)+\\n|$))",def:/^ {0,3}\[(label)\]: *\n? *<?([^\s>]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:qe,table:qe,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};bt._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,bt._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,bt.def=ot(bt.def).replace("label",bt._label).replace("title",bt._title).getRegex(),bt.bullet=/(?:[*+-]|\d{1,9}[.)])/,bt.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,bt.item=ot(bt.item,"gm").replace(/bull/g,bt.bullet).getRegex(),bt.listItemStart=ot(/^( *)(bull) */).replace("bull",bt.bullet).getRegex(),bt.list=ot(bt.list).replace(/bull/g,bt.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+bt.def.source+")").getRegex(),bt._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",bt._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,bt.html=ot(bt.html,"i").replace("comment",bt._comment).replace("tag",bt._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),bt.paragraph=ot(bt._paragraph).replace("hr",bt.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",bt._tag).getRegex(),bt.blockquote=ot(bt.blockquote).replace("paragraph",bt.paragraph).getRegex(),bt.normal=Ot({},bt),bt.gfm=Ot({},bt.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n {0,3}([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n {0,3}\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),bt.gfm.nptable=ot(bt.gfm.nptable).replace("hr",bt.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",bt._tag).getRegex(),bt.gfm.table=ot(bt.gfm.table).replace("hr",bt.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|!--)").replace("tag",bt._tag).getRegex(),bt.pedantic=Ot({},bt.normal,{html:ot(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",bt._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:qe,paragraph:ot(bt.normal._paragraph).replace("hr",bt.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",bt.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var xe={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:qe,tag:"^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",emStrong:{lDelim:/^(?:\*+(?:([punct_])|[^\s*]))|^_+(?:([punct*])|([^\s_]))/,rDelimAst:/\_\_[^_*]*?\*[^_*]*?\_\_|[punct_](\*+)(?=[\s]|$)|[^punct*_\s](\*+)(?=[punct_\s]|$)|[punct_\s](\*+)(?=[^punct*_\s])|[\s](\*+)(?=[punct_])|[punct_](\*+)(?=[punct_])|[^punct*_\s](\*+)(?=[^punct*_\s])/,rDelimUnd:/\*\*[^_*]*?\_[^_*]*?\*\*|[punct*](\_+)(?=[\s]|$)|[^punct*_\s](\_+)(?=[punct*\s]|$)|[punct*\s](\_+)(?=[^punct*_\s])|[\s](\_+)(?=[punct*])|[punct*](\_+)(?=[punct*])/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:qe,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};xe._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",xe.punctuation=ot(xe.punctuation).replace(/punctuation/g,xe._punctuation).getRegex(),xe.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,xe.escapedEmSt=/\\\*|\\_/g,xe._comment=ot(bt._comment).replace("(?:-->|$)","-->").getRegex(),xe.emStrong.lDelim=ot(xe.emStrong.lDelim).replace(/punct/g,xe._punctuation).getRegex(),xe.emStrong.rDelimAst=ot(xe.emStrong.rDelimAst,"g").replace(/punct/g,xe._punctuation).getRegex(),xe.emStrong.rDelimUnd=ot(xe.emStrong.rDelimUnd,"g").replace(/punct/g,xe._punctuation).getRegex(),xe._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,xe._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,xe._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,xe.autolink=ot(xe.autolink).replace("scheme",xe._scheme).replace("email",xe._email).getRegex(),xe._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,xe.tag=ot(xe.tag).replace("comment",xe._comment).replace("attribute",xe._attribute).getRegex(),xe._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,xe._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,xe._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,xe.link=ot(xe.link).replace("label",xe._label).replace("href",xe._href).replace("title",xe._title).getRegex(),xe.reflink=ot(xe.reflink).replace("label",xe._label).getRegex(),xe.reflinkSearch=ot(xe.reflinkSearch,"g").replace("reflink",xe.reflink).replace("nolink",xe.nolink).getRegex(),xe.normal=Ot({},xe),xe.pedantic=Ot({},xe.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:ot(/^!?\[(label)\]\((.*?)\)/).replace("label",xe._label).getRegex(),reflink:ot(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",xe._label).getRegex()}),xe.gfm=Ot({},xe.normal,{escape:ot(xe.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])([\s\S]*?[^\s~])\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/}),xe.gfm.url=ot(xe.gfm.url,"i").replace("email",xe.gfm._extended_email).getRegex(),xe.breaks=Ot({},xe.gfm,{br:ot(xe.br).replace("{2,}","*").getRegex(),text:ot(xe.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var _t={block:bt,inline:xe},Qt=He,Lt=fe.exports.defaults,qt=_t.block,tt=_t.inline,Re=q.repeatString;function ye(Ne){return Ne.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function Z(Ne){var ke="",Pe,z,oe=Ne.length;for(Pe=0;Pe<oe;Pe++)z=Ne.charCodeAt(Pe),Math.random()>.5&&(z="x"+z.toString(16)),ke+="&#"+z+";";return ke}var we=function(){function Ne(Pe){this.tokens=[],this.tokens.links=Object.create(null),this.options=Pe||Lt,this.options.tokenizer=this.options.tokenizer||new Qt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var z={block:qt.normal,inline:tt.normal};this.options.pedantic?(z.block=qt.pedantic,z.inline=tt.pedantic):this.options.gfm&&(z.block=qt.gfm,this.options.breaks?z.inline=tt.breaks:z.inline=tt.gfm),this.tokenizer.rules=z}Ne.lex=function(z,oe){var he=new Ne(oe);return he.lex(z)},Ne.lexInline=function(z,oe){var he=new Ne(oe);return he.inlineTokens(z)};var ke=Ne.prototype;return ke.lex=function(z){return z=z.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(z,this.tokens,!0),this.inline(this.tokens),this.tokens},ke.blockTokens=function(z,oe,he){oe===void 0&&(oe=[]),he===void 0&&(he=!0),this.options.pedantic&&(z=z.replace(/^ +$/gm,""));for(var ce,be,ze,Ze;z;){if(ce=this.tokenizer.space(z)){z=z.substring(ce.raw.length),ce.type&&oe.push(ce);continue}if(ce=this.tokenizer.code(z)){z=z.substring(ce.raw.length),Ze=oe[oe.length-1],Ze&&Ze.type==="paragraph"?(Ze.raw+=`
|
|
`+ce.raw,Ze.text+=`
|
|
`+ce.text):oe.push(ce);continue}if(ce=this.tokenizer.fences(z)){z=z.substring(ce.raw.length),oe.push(ce);continue}if(ce=this.tokenizer.heading(z)){z=z.substring(ce.raw.length),oe.push(ce);continue}if(ce=this.tokenizer.nptable(z)){z=z.substring(ce.raw.length),oe.push(ce);continue}if(ce=this.tokenizer.hr(z)){z=z.substring(ce.raw.length),oe.push(ce);continue}if(ce=this.tokenizer.blockquote(z)){z=z.substring(ce.raw.length),ce.tokens=this.blockTokens(ce.text,[],he),oe.push(ce);continue}if(ce=this.tokenizer.list(z)){for(z=z.substring(ce.raw.length),ze=ce.items.length,be=0;be<ze;be++)ce.items[be].tokens=this.blockTokens(ce.items[be].text,[],!1);oe.push(ce);continue}if(ce=this.tokenizer.html(z)){z=z.substring(ce.raw.length),oe.push(ce);continue}if(he&&(ce=this.tokenizer.def(z))){z=z.substring(ce.raw.length),this.tokens.links[ce.tag]||(this.tokens.links[ce.tag]={href:ce.href,title:ce.title});continue}if(ce=this.tokenizer.table(z)){z=z.substring(ce.raw.length),oe.push(ce);continue}if(ce=this.tokenizer.lheading(z)){z=z.substring(ce.raw.length),oe.push(ce);continue}if(he&&(ce=this.tokenizer.paragraph(z))){z=z.substring(ce.raw.length),oe.push(ce);continue}if(ce=this.tokenizer.text(z)){z=z.substring(ce.raw.length),Ze=oe[oe.length-1],Ze&&Ze.type==="text"?(Ze.raw+=`
|
|
`+ce.raw,Ze.text+=`
|
|
`+ce.text):oe.push(ce);continue}if(z){var $e="Infinite loop on byte: "+z.charCodeAt(0);if(this.options.silent){console.error($e);break}else throw new Error($e)}}return oe},ke.inline=function(z){var oe,he,ce,be,ze,Ze,$e=z.length;for(oe=0;oe<$e;oe++)switch(Ze=z[oe],Ze.type){case"paragraph":case"text":case"heading":{Ze.tokens=[],this.inlineTokens(Ze.text,Ze.tokens);break}case"table":{for(Ze.tokens={header:[],cells:[]},be=Ze.header.length,he=0;he<be;he++)Ze.tokens.header[he]=[],this.inlineTokens(Ze.header[he],Ze.tokens.header[he]);for(be=Ze.cells.length,he=0;he<be;he++)for(ze=Ze.cells[he],Ze.tokens.cells[he]=[],ce=0;ce<ze.length;ce++)Ze.tokens.cells[he][ce]=[],this.inlineTokens(ze[ce],Ze.tokens.cells[he][ce]);break}case"blockquote":{this.inline(Ze.tokens);break}case"list":{for(be=Ze.items.length,he=0;he<be;he++)this.inline(Ze.items[he].tokens);break}}return z},ke.inlineTokens=function(z,oe,he,ce){oe===void 0&&(oe=[]),he===void 0&&(he=!1),ce===void 0&&(ce=!1);var be,ze,Ze=z,$e,ft,en;if(this.tokens.links){var an=Object.keys(this.tokens.links);if(an.length>0)for(;($e=this.tokenizer.rules.inline.reflinkSearch.exec(Ze))!=null;)an.includes($e[0].slice($e[0].lastIndexOf("[")+1,-1))&&(Ze=Ze.slice(0,$e.index)+"["+Re("a",$e[0].length-2)+"]"+Ze.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;($e=this.tokenizer.rules.inline.blockSkip.exec(Ze))!=null;)Ze=Ze.slice(0,$e.index)+"["+Re("a",$e[0].length-2)+"]"+Ze.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;($e=this.tokenizer.rules.inline.escapedEmSt.exec(Ze))!=null;)Ze=Ze.slice(0,$e.index)+"++"+Ze.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;z;){if(ft||(en=""),ft=!1,be=this.tokenizer.escape(z)){z=z.substring(be.raw.length),oe.push(be);continue}if(be=this.tokenizer.tag(z,he,ce)){z=z.substring(be.raw.length),he=be.inLink,ce=be.inRawBlock;var yt=oe[oe.length-1];yt&&be.type==="text"&&yt.type==="text"?(yt.raw+=be.raw,yt.text+=be.text):oe.push(be);continue}if(be=this.tokenizer.link(z)){z=z.substring(be.raw.length),be.type==="link"&&(be.tokens=this.inlineTokens(be.text,[],!0,ce)),oe.push(be);continue}if(be=this.tokenizer.reflink(z,this.tokens.links)){z=z.substring(be.raw.length);var Gt=oe[oe.length-1];be.type==="link"?(be.tokens=this.inlineTokens(be.text,[],!0,ce),oe.push(be)):Gt&&be.type==="text"&&Gt.type==="text"?(Gt.raw+=be.raw,Gt.text+=be.text):oe.push(be);continue}if(be=this.tokenizer.emStrong(z,Ze,en)){z=z.substring(be.raw.length),be.tokens=this.inlineTokens(be.text,[],he,ce),oe.push(be);continue}if(be=this.tokenizer.codespan(z)){z=z.substring(be.raw.length),oe.push(be);continue}if(be=this.tokenizer.br(z)){z=z.substring(be.raw.length),oe.push(be);continue}if(be=this.tokenizer.del(z)){z=z.substring(be.raw.length),be.tokens=this.inlineTokens(be.text,[],he,ce),oe.push(be);continue}if(be=this.tokenizer.autolink(z,Z)){z=z.substring(be.raw.length),oe.push(be);continue}if(!he&&(be=this.tokenizer.url(z,Z))){z=z.substring(be.raw.length),oe.push(be);continue}if(be=this.tokenizer.inlineText(z,ce,ye)){z=z.substring(be.raw.length),be.raw.slice(-1)!=="_"&&(en=be.raw.slice(-1)),ft=!0,ze=oe[oe.length-1],ze&&ze.type==="text"?(ze.raw+=be.raw,ze.text+=be.text):oe.push(be);continue}if(z){var _n="Infinite loop on byte: "+z.charCodeAt(0);if(this.options.silent){console.error(_n);break}else throw new Error(_n)}}return oe},E(Ne,null,[{key:"rules",get:function(){return{block:qt,inline:tt}}}]),Ne}(),Le=fe.exports.defaults,$=q.cleanUrl,P=q.escape,K=function(){function Ne(Pe){this.options=Pe||Le}var ke=Ne.prototype;return ke.code=function(z,oe,he){var ce=(oe||"").match(/\S*/)[0];if(this.options.highlight){var be=this.options.highlight(z,ce);be!=null&&be!==z&&(he=!0,z=be)}return z=z.replace(/\n$/,"")+`
|
|
`,ce?'<pre><code class="'+this.options.langPrefix+P(ce,!0)+'">'+(he?z:P(z,!0))+`</code></pre>
|
|
`:"<pre><code>"+(he?z:P(z,!0))+`</code></pre>
|
|
`},ke.blockquote=function(z){return`<blockquote>
|
|
`+z+`</blockquote>
|
|
`},ke.html=function(z){return z},ke.heading=function(z,oe,he,ce){return this.options.headerIds?"<h"+oe+' id="'+this.options.headerPrefix+ce.slug(he)+'">'+z+"</h"+oe+`>
|
|
`:"<h"+oe+">"+z+"</h"+oe+`>
|
|
`},ke.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},ke.list=function(z,oe,he){var ce=oe?"ol":"ul",be=oe&&he!==1?' start="'+he+'"':"";return"<"+ce+be+`>
|
|
`+z+"</"+ce+`>
|
|
`},ke.listitem=function(z){return"<li>"+z+`</li>
|
|
`},ke.checkbox=function(z){return"<input "+(z?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},ke.paragraph=function(z){return"<p>"+z+`</p>
|
|
`},ke.table=function(z,oe){return oe&&(oe="<tbody>"+oe+"</tbody>"),`<table>
|
|
<thead>
|
|
`+z+`</thead>
|
|
`+oe+`</table>
|
|
`},ke.tablerow=function(z){return`<tr>
|
|
`+z+`</tr>
|
|
`},ke.tablecell=function(z,oe){var he=oe.header?"th":"td",ce=oe.align?"<"+he+' align="'+oe.align+'">':"<"+he+">";return ce+z+"</"+he+`>
|
|
`},ke.strong=function(z){return"<strong>"+z+"</strong>"},ke.em=function(z){return"<em>"+z+"</em>"},ke.codespan=function(z){return"<code>"+z+"</code>"},ke.br=function(){return this.options.xhtml?"<br/>":"<br>"},ke.del=function(z){return"<del>"+z+"</del>"},ke.link=function(z,oe,he){if(z=$(this.options.sanitize,this.options.baseUrl,z),z===null)return he;var ce='<a href="'+P(z)+'"';return oe&&(ce+=' title="'+oe+'"'),ce+=">"+he+"</a>",ce},ke.image=function(z,oe,he){if(z=$(this.options.sanitize,this.options.baseUrl,z),z===null)return he;var ce='<img src="'+z+'" alt="'+he+'"';return oe&&(ce+=' title="'+oe+'"'),ce+=this.options.xhtml?"/>":">",ce},ke.text=function(z){return z},Ne}(),ne=function(){function Ne(){}var ke=Ne.prototype;return ke.strong=function(z){return z},ke.em=function(z){return z},ke.codespan=function(z){return z},ke.del=function(z){return z},ke.html=function(z){return z},ke.text=function(z){return z},ke.link=function(z,oe,he){return""+he},ke.image=function(z,oe,he){return""+he},ke.br=function(){return""},Ne}(),M=function(){function Ne(){this.seen={}}var ke=Ne.prototype;return ke.serialize=function(z){return z.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},ke.getNextSafeSlug=function(z,oe){var he=z,ce=0;if(this.seen.hasOwnProperty(he)){ce=this.seen[z];do ce++,he=z+"-"+ce;while(this.seen.hasOwnProperty(he))}return oe||(this.seen[z]=ce,this.seen[he]=0),he},ke.slug=function(z,oe){oe===void 0&&(oe={});var he=this.serialize(z);return this.getNextSafeSlug(he,oe.dryrun)},Ne}(),B=K,j=ne,me=M,de=fe.exports.defaults,Ae=q.unescape,Ee=function(){function Ne(Pe){this.options=Pe||de,this.options.renderer=this.options.renderer||new B,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new j,this.slugger=new me}Ne.parse=function(z,oe){var he=new Ne(oe);return he.parse(z)},Ne.parseInline=function(z,oe){var he=new Ne(oe);return he.parseInline(z)};var ke=Ne.prototype;return ke.parse=function(z,oe){oe===void 0&&(oe=!0);var he="",ce,be,ze,Ze,$e,ft,en,an,yt,Gt,_n,Bn,cn,pn,Tn,mn,An,Ft,Wn=z.length;for(ce=0;ce<Wn;ce++)switch(Gt=z[ce],Gt.type){case"space":continue;case"hr":{he+=this.renderer.hr();continue}case"heading":{he+=this.renderer.heading(this.parseInline(Gt.tokens),Gt.depth,Ae(this.parseInline(Gt.tokens,this.textRenderer)),this.slugger);continue}case"code":{he+=this.renderer.code(Gt.text,Gt.lang,Gt.escaped);continue}case"table":{for(an="",en="",Ze=Gt.header.length,be=0;be<Ze;be++)en+=this.renderer.tablecell(this.parseInline(Gt.tokens.header[be]),{header:!0,align:Gt.align[be]});for(an+=this.renderer.tablerow(en),yt="",Ze=Gt.cells.length,be=0;be<Ze;be++){for(ft=Gt.tokens.cells[be],en="",$e=ft.length,ze=0;ze<$e;ze++)en+=this.renderer.tablecell(this.parseInline(ft[ze]),{header:!1,align:Gt.align[ze]});yt+=this.renderer.tablerow(en)}he+=this.renderer.table(an,yt);continue}case"blockquote":{yt=this.parse(Gt.tokens),he+=this.renderer.blockquote(yt);continue}case"list":{for(_n=Gt.ordered,Bn=Gt.start,cn=Gt.loose,Ze=Gt.items.length,yt="",be=0;be<Ze;be++)Tn=Gt.items[be],mn=Tn.checked,An=Tn.task,pn="",Tn.task&&(Ft=this.renderer.checkbox(mn),cn?Tn.tokens.length>0&&Tn.tokens[0].type==="text"?(Tn.tokens[0].text=Ft+" "+Tn.tokens[0].text,Tn.tokens[0].tokens&&Tn.tokens[0].tokens.length>0&&Tn.tokens[0].tokens[0].type==="text"&&(Tn.tokens[0].tokens[0].text=Ft+" "+Tn.tokens[0].tokens[0].text)):Tn.tokens.unshift({type:"text",text:Ft}):pn+=Ft),pn+=this.parse(Tn.tokens,cn),yt+=this.renderer.listitem(pn,An,mn);he+=this.renderer.list(yt,_n,Bn);continue}case"html":{he+=this.renderer.html(Gt.text);continue}case"paragraph":{he+=this.renderer.paragraph(this.parseInline(Gt.tokens));continue}case"text":{for(yt=Gt.tokens?this.parseInline(Gt.tokens):Gt.text;ce+1<Wn&&z[ce+1].type==="text";)Gt=z[++ce],yt+=`
|
|
`+(Gt.tokens?this.parseInline(Gt.tokens):Gt.text);he+=oe?this.renderer.paragraph(yt):yt;continue}default:{var Ue='Token with "'+Gt.type+'" type was not found.';if(this.options.silent){console.error(Ue);return}else throw new Error(Ue)}}return he},ke.parseInline=function(z,oe){oe=oe||this.renderer;var he="",ce,be,ze=z.length;for(ce=0;ce<ze;ce++)switch(be=z[ce],be.type){case"escape":{he+=oe.text(be.text);break}case"html":{he+=oe.html(be.text);break}case"link":{he+=oe.link(be.href,be.title,this.parseInline(be.tokens,oe));break}case"image":{he+=oe.image(be.href,be.title,be.text);break}case"strong":{he+=oe.strong(this.parseInline(be.tokens,oe));break}case"em":{he+=oe.em(this.parseInline(be.tokens,oe));break}case"codespan":{he+=oe.codespan(be.text);break}case"br":{he+=oe.br();break}case"del":{he+=oe.del(this.parseInline(be.tokens,oe));break}case"text":{he+=oe.text(be.text);break}default:{var Ze='Token with "'+be.type+'" type was not found.';if(this.options.silent){console.error(Ze);return}else throw new Error(Ze)}}return he},Ne}(),Ce=we,Fe=Ee,Be=He,Ye=K,xt=ne,lt=M,nt=q.merge,Ut=q.checkSanitizeDeprecation,Vt=q.escape,Ct=fe.exports.getDefaults,Jt=fe.exports.changeDefaults,wn=fe.exports.defaults;function Rt(Ne,ke,Pe){if(typeof Ne=="undefined"||Ne===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Ne!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Ne)+", string expected");if(typeof ke=="function"&&(Pe=ke,ke=null),ke=nt({},Rt.defaults,ke||{}),Ut(ke),Pe){var z=ke.highlight,oe;try{oe=Ce.lex(Ne,ke)}catch(ze){return Pe(ze)}var he=function(Ze){var $e;if(!Ze)try{ke.walkTokens&&Rt.walkTokens(oe,ke.walkTokens),$e=Fe.parse(oe,ke)}catch(ft){Ze=ft}return ke.highlight=z,Ze?Pe(Ze):Pe(null,$e)};if(!z||z.length<3||(delete ke.highlight,!oe.length))return he();var ce=0;Rt.walkTokens(oe,function(ze){ze.type==="code"&&(ce++,setTimeout(function(){z(ze.text,ze.lang,function(Ze,$e){if(Ze)return he(Ze);$e!=null&&$e!==ze.text&&(ze.text=$e,ze.escaped=!0),ce--,ce===0&&he()})},0))}),ce===0&&he();return}try{var be=Ce.lex(Ne,ke);return ke.walkTokens&&Rt.walkTokens(be,ke.walkTokens),Fe.parse(be,ke)}catch(ze){if(ze.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,ke.silent)return"<p>An error occurred:</p><pre>"+Vt(ze.message+"",!0)+"</pre>";throw ze}}Rt.options=Rt.setOptions=function(Ne){return nt(Rt.defaults,Ne),Jt(Rt.defaults),Rt},Rt.getDefaults=Ct,Rt.defaults=wn,Rt.use=function(Ne){var ke=nt({},Ne);if(Ne.renderer&&function(){var z=Rt.defaults.renderer||new Ye,oe=function(be){var ze=z[be];z[be]=function(){for(var Ze=arguments.length,$e=new Array(Ze),ft=0;ft<Ze;ft++)$e[ft]=arguments[ft];var en=Ne.renderer[be].apply(z,$e);return en===!1&&(en=ze.apply(z,$e)),en}};for(var he in Ne.renderer)oe(he);ke.renderer=z}(),Ne.tokenizer&&function(){var z=Rt.defaults.tokenizer||new Be,oe=function(be){var ze=z[be];z[be]=function(){for(var Ze=arguments.length,$e=new Array(Ze),ft=0;ft<Ze;ft++)$e[ft]=arguments[ft];var en=Ne.tokenizer[be].apply(z,$e);return en===!1&&(en=ze.apply(z,$e)),en}};for(var he in Ne.tokenizer)oe(he);ke.tokenizer=z}(),Ne.walkTokens){var Pe=Rt.defaults.walkTokens;ke.walkTokens=function(z){Ne.walkTokens(z),Pe&&Pe(z)}}Rt.setOptions(ke)},Rt.walkTokens=function(Ne,ke){for(var Pe=ve(Ne),z;!(z=Pe()).done;){var oe=z.value;switch(ke(oe),oe.type){case"table":{for(var he=ve(oe.tokens.header),ce;!(ce=he()).done;){var be=ce.value;Rt.walkTokens(be,ke)}for(var ze=ve(oe.tokens.cells),Ze;!(Ze=ze()).done;)for(var $e=Ze.value,ft=ve($e),en;!(en=ft()).done;){var an=en.value;Rt.walkTokens(an,ke)}break}case"list":{Rt.walkTokens(oe.items,ke);break}default:oe.tokens&&Rt.walkTokens(oe.tokens,ke)}}},Rt.parseInline=function(Ne,ke){if(typeof Ne=="undefined"||Ne===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof Ne!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(Ne)+", string expected");ke=nt({},Rt.defaults,ke||{}),Ut(ke);try{var Pe=Ce.lexInline(Ne,ke);return ke.walkTokens&&Rt.walkTokens(Pe,ke.walkTokens),Fe.parseInline(Pe,ke)}catch(z){if(z.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,ke.silent)return"<p>An error occurred:</p><pre>"+Vt(z.message+"",!0)+"</pre>";throw z}},Rt.Parser=Fe,Rt.parser=Fe.parse,Rt.Renderer=Ye,Rt.TextRenderer=xt,Rt.Lexer=Ce,Rt.lexer=Ce.lex,Rt.Tokenizer=Be,Rt.Slugger=lt,Rt.parse=Rt;var Yt=Rt;return Yt})},11690:function(on){const je=/[&<>"']/,E=/[&<>"']/g,x=/[<>"']|&(?!#?\w+;)/,ae=/[<>"']|&(?!#?\w+;)/g,ve={"&":"&","<":"<",">":">",'"':""","'":"'"},fe=G=>ve[G];function F(G,I){if(I){if(je.test(G))return G.replace(E,fe)}else if(x.test(G))return G.replace(ae,fe);return G}const f=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function ue(G){return G.replace(f,(I,re)=>(re=re.toLowerCase(),re==="colon"?":":re.charAt(0)==="#"?re.charAt(1)==="x"?String.fromCharCode(parseInt(re.substring(2),16)):String.fromCharCode(+re.substring(1)):""))}const te=/(^|[^\[])\^/g;function o(G,I){G=G.source||G,I=I||"";const re={replace:(le,Te)=>(Te=Te.source||Te,Te=Te.replace(te,"$1"),G=G.replace(le,Te),re),getRegex:()=>new RegExp(G,I)};return re}const y=/[^\w:]/g,C=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function h(G,I,re){if(G){let le;try{le=decodeURIComponent(ue(re)).replace(y,"").toLowerCase()}catch(Te){return null}if(le.indexOf("javascript:")===0||le.indexOf("vbscript:")===0||le.indexOf("data:")===0)return null}I&&!C.test(re)&&(re=N(I,re));try{re=encodeURI(re).replace(/%25/g,"%")}catch(le){return null}return re}const g={},_=/^[^:]+:\/*[^/]*$/,S=/^([^:]+:)[\s\S]*$/,L=/^([^:]+:\/*[^/]*)[\s\S]*$/;function N(G,I){g[" "+G]||(_.test(G)?g[" "+G]=G+"/":g[" "+G]=T(G,"/",!0)),G=g[" "+G];const re=G.indexOf(":")===-1;return I.substring(0,2)==="//"?re?I:G.replace(S,"$1")+I:I.charAt(0)==="/"?re?I:G.replace(L,"$1")+I:G+I}const H={exec:function(){}};function R(G){let I=1,re,le;for(;I<arguments.length;I++){re=arguments[I];for(le in re)Object.prototype.hasOwnProperty.call(re,le)&&(G[le]=re[le])}return G}function k(G,I){const re=G.replace(/\|/g,(W,O,Q)=>{let q=!1,ie=O;for(;--ie>=0&&Q[ie]==="\\";)q=!q;return q?"|":" |"}),le=re.split(/ \|/);let Te=0;if(le.length>I)le.splice(I);else for(;le.length<I;)le.push("");for(;Te<le.length;Te++)le[Te]=le[Te].trim().replace(/\\\|/g,"|");return le}function T(G,I,re){const le=G.length;if(le===0)return"";let Te=0;for(;Te<le;){const W=G.charAt(le-Te-1);if(W===I&&!re)Te++;else if(W!==I&&re)Te++;else break}return G.substr(0,le-Te)}function A(G,I){if(G.indexOf(I[1])===-1)return-1;const re=G.length;let le=0,Te=0;for(;Te<re;Te++)if(G[Te]==="\\")Te++;else if(G[Te]===I[0])le++;else if(G[Te]===I[1]&&(le--,le<0))return Te;return-1}function J(G){G&&G.sanitize&&!G.silent&&console.warn("marked(): sanitize and sanitizer parameters are deprecated since version 0.7.0, should not be used and will be removed in the future. Read more here: https://marked.js.org/#/USING_ADVANCED.md#options")}function ee(G,I){if(I<1)return"";let re="";for(;I>1;)I&1&&(re+=G),I>>=1,G+=G;return re+G}on.exports={escape:F,unescape:ue,edit:o,cleanUrl:h,resolveUrl:N,noopTest:H,merge:R,splitCells:k,rtrim:T,findClosingBracket:A,checkSanitizeDeprecation:J,repeatString:ee}},75918:function(on,je,E){"use strict";E.d(je,{Wi:function(){return f},Z0:function(){return ue},aU:function(){return F},eZ:function(){return o},wY:function(){return te}});var x=E(4348),ae=E(69323),ve=E(13268),fe=function(y,C,h,g){function _(S){return S instanceof h?S:new h(function(L){L(S)})}return new(h||(h=Promise))(function(S,L){function N(k){try{R(g.next(k))}catch(T){L(T)}}function H(k){try{R(g.throw(k))}catch(T){L(T)}}function R(k){k.done?S(k.value):_(k.value).then(N,H)}R((g=g.apply(y,C||[])).next())})};class F extends ae.JT{constructor(C,h="",g="",_=!0,S){super(),this._onDidChange=this._register(new x.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=C,this._label=h,this._cssClass=g,this._enabled=_,this._actionCallback=S}get id(){return this._id}get label(){return this._label}set label(C){this._setLabel(C)}_setLabel(C){this._label!==C&&(this._label=C,this._onDidChange.fire({label:C}))}get tooltip(){return this._tooltip||""}set tooltip(C){this._setTooltip(C)}_setTooltip(C){this._tooltip!==C&&(this._tooltip=C,this._onDidChange.fire({tooltip:C}))}get class(){return this._cssClass}set class(C){this._setClass(C)}_setClass(C){this._cssClass!==C&&(this._cssClass=C,this._onDidChange.fire({class:C}))}get enabled(){return this._enabled}set enabled(C){this._setEnabled(C)}_setEnabled(C){this._enabled!==C&&(this._enabled=C,this._onDidChange.fire({enabled:C}))}get checked(){return this._checked}set checked(C){this._setChecked(C)}_setChecked(C){this._checked!==C&&(this._checked=C,this._onDidChange.fire({checked:C}))}run(C,h){return fe(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(C))})}}class f extends ae.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new x.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new x.Q5),this.onDidRun=this._onDidRun.event}run(C,h){return fe(this,void 0,void 0,function*(){if(!C.enabled)return;this._onBeforeRun.fire({action:C});let g;try{yield this.runAction(C,h)}catch(_){g=_}this._onDidRun.fire({action:C,error:g})})}runAction(C,h){return fe(this,void 0,void 0,function*(){yield C.run(h)})}}class ue extends F{constructor(C){super(ue.ID,C,C?"separator text":"separator"),this.checked=!1,this.enabled=!1}}ue.ID="vs.actions.separator";class te{constructor(C,h,g,_){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=C,this.label=h,this.class=_,this._actions=g}get actions(){return this._actions}dispose(){}run(){return fe(this,void 0,void 0,function*(){})}}class o extends F{constructor(){super(o.ID,ve.N("submenu.empty","(empty)"),void 0,!1)}}o.ID="vs.actions.empty"},76068:function(on,je,E){"use strict";E.d(je,{ok:function(){return x}});function x(ae,ve){if(!ae)throw new Error(ve?`Assertion failed (${ve})`:"Assertion Failed")}},52615:function(on,je,E){"use strict";E.d(je,{CM:function(){return F},JL:function(){return f},dT:function(){return te},fK:function(){return fe},lA:function(){return ue}});var x=E(4348);class ae{constructor(){this._icons=new Map,this._onDidRegister=new x.Q5}add(y){const C=this._icons.get(y.id);C?y.description?C.description=y.description:console.error(`Duplicate registration of codicon ${y.id}`):(this._icons.set(y.id,y),this._onDidRegister.fire(y))}get(y){return this._icons.get(y)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const ve=new ae,fe=ve;function F(o,y){return new ue(o,y)}function f(o){return o?o.replace(/\$\((.*?)\)/g,(y,C)=>` ${C} `).trim():""}class ue{constructor(y,C,h){this.id=y,this.definition=C,this.description=h,ve.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var te;(function(o){o.iconNameSegment="[A-Za-z0-9]+",o.iconNameExpression="[A-Za-z0-9\\-]+",o.iconModifierExpression="~[A-Za-z]+";const y=new RegExp(`^(${o.iconNameExpression})(${o.iconModifierExpression})?$`);function C(_){if(_ instanceof ue)return["codicon","codicon-"+_.id];const S=y.exec(_.id);if(!S)return C(ue.error);let[,L,N]=S;const H=["codicon","codicon-"+L];return N&&H.push("codicon-modifier-"+N.substr(1)),H}o.asClassNameArray=C;function h(_){return C(_).join(" ")}o.asClassName=h;function g(_){return"."+C(_).join(".")}o.asCSSSelector=g})(te||(te={})),function(o){o.add=new o("add",{fontCharacter:"\\ea60"}),o.plus=new o("plus",o.add.definition),o.gistNew=new o("gist-new",o.add.definition),o.repoCreate=new o("repo-create",o.add.definition),o.lightbulb=new o("lightbulb",{fontCharacter:"\\ea61"}),o.lightBulb=new o("light-bulb",{fontCharacter:"\\ea61"}),o.repo=new o("repo",{fontCharacter:"\\ea62"}),o.repoDelete=new o("repo-delete",{fontCharacter:"\\ea62"}),o.gistFork=new o("gist-fork",{fontCharacter:"\\ea63"}),o.repoForked=new o("repo-forked",{fontCharacter:"\\ea63"}),o.gitPullRequest=new o("git-pull-request",{fontCharacter:"\\ea64"}),o.gitPullRequestAbandoned=new o("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),o.recordKeys=new o("record-keys",{fontCharacter:"\\ea65"}),o.keyboard=new o("keyboard",{fontCharacter:"\\ea65"}),o.tag=new o("tag",{fontCharacter:"\\ea66"}),o.tagAdd=new o("tag-add",{fontCharacter:"\\ea66"}),o.tagRemove=new o("tag-remove",{fontCharacter:"\\ea66"}),o.person=new o("person",{fontCharacter:"\\ea67"}),o.personFollow=new o("person-follow",{fontCharacter:"\\ea67"}),o.personOutline=new o("person-outline",{fontCharacter:"\\ea67"}),o.personFilled=new o("person-filled",{fontCharacter:"\\ea67"}),o.gitBranch=new o("git-branch",{fontCharacter:"\\ea68"}),o.gitBranchCreate=new o("git-branch-create",{fontCharacter:"\\ea68"}),o.gitBranchDelete=new o("git-branch-delete",{fontCharacter:"\\ea68"}),o.sourceControl=new o("source-control",{fontCharacter:"\\ea68"}),o.mirror=new o("mirror",{fontCharacter:"\\ea69"}),o.mirrorPublic=new o("mirror-public",{fontCharacter:"\\ea69"}),o.star=new o("star",{fontCharacter:"\\ea6a"}),o.starAdd=new o("star-add",{fontCharacter:"\\ea6a"}),o.starDelete=new o("star-delete",{fontCharacter:"\\ea6a"}),o.starEmpty=new o("star-empty",{fontCharacter:"\\ea6a"}),o.comment=new o("comment",{fontCharacter:"\\ea6b"}),o.commentAdd=new o("comment-add",{fontCharacter:"\\ea6b"}),o.alert=new o("alert",{fontCharacter:"\\ea6c"}),o.warning=new o("warning",{fontCharacter:"\\ea6c"}),o.search=new o("search",{fontCharacter:"\\ea6d"}),o.searchSave=new o("search-save",{fontCharacter:"\\ea6d"}),o.logOut=new o("log-out",{fontCharacter:"\\ea6e"}),o.signOut=new o("sign-out",{fontCharacter:"\\ea6e"}),o.logIn=new o("log-in",{fontCharacter:"\\ea6f"}),o.signIn=new o("sign-in",{fontCharacter:"\\ea6f"}),o.eye=new o("eye",{fontCharacter:"\\ea70"}),o.eyeUnwatch=new o("eye-unwatch",{fontCharacter:"\\ea70"}),o.eyeWatch=new o("eye-watch",{fontCharacter:"\\ea70"}),o.circleFilled=new o("circle-filled",{fontCharacter:"\\ea71"}),o.primitiveDot=new o("primitive-dot",{fontCharacter:"\\ea71"}),o.closeDirty=new o("close-dirty",{fontCharacter:"\\ea71"}),o.debugBreakpoint=new o("debug-breakpoint",{fontCharacter:"\\ea71"}),o.debugBreakpointDisabled=new o("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),o.debugHint=new o("debug-hint",{fontCharacter:"\\ea71"}),o.primitiveSquare=new o("primitive-square",{fontCharacter:"\\ea72"}),o.edit=new o("edit",{fontCharacter:"\\ea73"}),o.pencil=new o("pencil",{fontCharacter:"\\ea73"}),o.info=new o("info",{fontCharacter:"\\ea74"}),o.issueOpened=new o("issue-opened",{fontCharacter:"\\ea74"}),o.gistPrivate=new o("gist-private",{fontCharacter:"\\ea75"}),o.gitForkPrivate=new o("git-fork-private",{fontCharacter:"\\ea75"}),o.lock=new o("lock",{fontCharacter:"\\ea75"}),o.mirrorPrivate=new o("mirror-private",{fontCharacter:"\\ea75"}),o.close=new o("close",{fontCharacter:"\\ea76"}),o.removeClose=new o("remove-close",{fontCharacter:"\\ea76"}),o.x=new o("x",{fontCharacter:"\\ea76"}),o.repoSync=new o("repo-sync",{fontCharacter:"\\ea77"}),o.sync=new o("sync",{fontCharacter:"\\ea77"}),o.clone=new o("clone",{fontCharacter:"\\ea78"}),o.desktopDownload=new o("desktop-download",{fontCharacter:"\\ea78"}),o.beaker=new o("beaker",{fontCharacter:"\\ea79"}),o.microscope=new o("microscope",{fontCharacter:"\\ea79"}),o.vm=new o("vm",{fontCharacter:"\\ea7a"}),o.deviceDesktop=new o("device-desktop",{fontCharacter:"\\ea7a"}),o.file=new o("file",{fontCharacter:"\\ea7b"}),o.fileText=new o("file-text",{fontCharacter:"\\ea7b"}),o.more=new o("more",{fontCharacter:"\\ea7c"}),o.ellipsis=new o("ellipsis",{fontCharacter:"\\ea7c"}),o.kebabHorizontal=new o("kebab-horizontal",{fontCharacter:"\\ea7c"}),o.mailReply=new o("mail-reply",{fontCharacter:"\\ea7d"}),o.reply=new o("reply",{fontCharacter:"\\ea7d"}),o.organization=new o("organization",{fontCharacter:"\\ea7e"}),o.organizationFilled=new o("organization-filled",{fontCharacter:"\\ea7e"}),o.organizationOutline=new o("organization-outline",{fontCharacter:"\\ea7e"}),o.newFile=new o("new-file",{fontCharacter:"\\ea7f"}),o.fileAdd=new o("file-add",{fontCharacter:"\\ea7f"}),o.newFolder=new o("new-folder",{fontCharacter:"\\ea80"}),o.fileDirectoryCreate=new o("file-directory-create",{fontCharacter:"\\ea80"}),o.trash=new o("trash",{fontCharacter:"\\ea81"}),o.trashcan=new o("trashcan",{fontCharacter:"\\ea81"}),o.history=new o("history",{fontCharacter:"\\ea82"}),o.clock=new o("clock",{fontCharacter:"\\ea82"}),o.folder=new o("folder",{fontCharacter:"\\ea83"}),o.fileDirectory=new o("file-directory",{fontCharacter:"\\ea83"}),o.symbolFolder=new o("symbol-folder",{fontCharacter:"\\ea83"}),o.logoGithub=new o("logo-github",{fontCharacter:"\\ea84"}),o.markGithub=new o("mark-github",{fontCharacter:"\\ea84"}),o.github=new o("github",{fontCharacter:"\\ea84"}),o.terminal=new o("terminal",{fontCharacter:"\\ea85"}),o.console=new o("console",{fontCharacter:"\\ea85"}),o.repl=new o("repl",{fontCharacter:"\\ea85"}),o.zap=new o("zap",{fontCharacter:"\\ea86"}),o.symbolEvent=new o("symbol-event",{fontCharacter:"\\ea86"}),o.error=new o("error",{fontCharacter:"\\ea87"}),o.stop=new o("stop",{fontCharacter:"\\ea87"}),o.variable=new o("variable",{fontCharacter:"\\ea88"}),o.symbolVariable=new o("symbol-variable",{fontCharacter:"\\ea88"}),o.array=new o("array",{fontCharacter:"\\ea8a"}),o.symbolArray=new o("symbol-array",{fontCharacter:"\\ea8a"}),o.symbolModule=new o("symbol-module",{fontCharacter:"\\ea8b"}),o.symbolPackage=new o("symbol-package",{fontCharacter:"\\ea8b"}),o.symbolNamespace=new o("symbol-namespace",{fontCharacter:"\\ea8b"}),o.symbolObject=new o("symbol-object",{fontCharacter:"\\ea8b"}),o.symbolMethod=new o("symbol-method",{fontCharacter:"\\ea8c"}),o.symbolFunction=new o("symbol-function",{fontCharacter:"\\ea8c"}),o.symbolConstructor=new o("symbol-constructor",{fontCharacter:"\\ea8c"}),o.symbolBoolean=new o("symbol-boolean",{fontCharacter:"\\ea8f"}),o.symbolNull=new o("symbol-null",{fontCharacter:"\\ea8f"}),o.symbolNumeric=new o("symbol-numeric",{fontCharacter:"\\ea90"}),o.symbolNumber=new o("symbol-number",{fontCharacter:"\\ea90"}),o.symbolStructure=new o("symbol-structure",{fontCharacter:"\\ea91"}),o.symbolStruct=new o("symbol-struct",{fontCharacter:"\\ea91"}),o.symbolParameter=new o("symbol-parameter",{fontCharacter:"\\ea92"}),o.symbolTypeParameter=new o("symbol-type-parameter",{fontCharacter:"\\ea92"}),o.symbolKey=new o("symbol-key",{fontCharacter:"\\ea93"}),o.symbolText=new o("symbol-text",{fontCharacter:"\\ea93"}),o.symbolReference=new o("symbol-reference",{fontCharacter:"\\ea94"}),o.goToFile=new o("go-to-file",{fontCharacter:"\\ea94"}),o.symbolEnum=new o("symbol-enum",{fontCharacter:"\\ea95"}),o.symbolValue=new o("symbol-value",{fontCharacter:"\\ea95"}),o.symbolRuler=new o("symbol-ruler",{fontCharacter:"\\ea96"}),o.symbolUnit=new o("symbol-unit",{fontCharacter:"\\ea96"}),o.activateBreakpoints=new o("activate-breakpoints",{fontCharacter:"\\ea97"}),o.archive=new o("archive",{fontCharacter:"\\ea98"}),o.arrowBoth=new o("arrow-both",{fontCharacter:"\\ea99"}),o.arrowDown=new o("arrow-down",{fontCharacter:"\\ea9a"}),o.arrowLeft=new o("arrow-left",{fontCharacter:"\\ea9b"}),o.arrowRight=new o("arrow-right",{fontCharacter:"\\ea9c"}),o.arrowSmallDown=new o("arrow-small-down",{fontCharacter:"\\ea9d"}),o.arrowSmallLeft=new o("arrow-small-left",{fontCharacter:"\\ea9e"}),o.arrowSmallRight=new o("arrow-small-right",{fontCharacter:"\\ea9f"}),o.arrowSmallUp=new o("arrow-small-up",{fontCharacter:"\\eaa0"}),o.arrowUp=new o("arrow-up",{fontCharacter:"\\eaa1"}),o.bell=new o("bell",{fontCharacter:"\\eaa2"}),o.bold=new o("bold",{fontCharacter:"\\eaa3"}),o.book=new o("book",{fontCharacter:"\\eaa4"}),o.bookmark=new o("bookmark",{fontCharacter:"\\eaa5"}),o.debugBreakpointConditionalUnverified=new o("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),o.debugBreakpointConditional=new o("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),o.debugBreakpointConditionalDisabled=new o("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),o.debugBreakpointDataUnverified=new o("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),o.debugBreakpointData=new o("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),o.debugBreakpointDataDisabled=new o("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),o.debugBreakpointLogUnverified=new o("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),o.debugBreakpointLog=new o("debug-breakpoint-log",{fontCharacter:"\\eaab"}),o.debugBreakpointLogDisabled=new o("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),o.briefcase=new o("briefcase",{fontCharacter:"\\eaac"}),o.broadcast=new o("broadcast",{fontCharacter:"\\eaad"}),o.browser=new o("browser",{fontCharacter:"\\eaae"}),o.bug=new o("bug",{fontCharacter:"\\eaaf"}),o.calendar=new o("calendar",{fontCharacter:"\\eab0"}),o.caseSensitive=new o("case-sensitive",{fontCharacter:"\\eab1"}),o.check=new o("check",{fontCharacter:"\\eab2"}),o.checklist=new o("checklist",{fontCharacter:"\\eab3"}),o.chevronDown=new o("chevron-down",{fontCharacter:"\\eab4"}),o.dropDownButton=new o("drop-down-button",o.chevronDown.definition),o.chevronLeft=new o("chevron-left",{fontCharacter:"\\eab5"}),o.chevronRight=new o("chevron-right",{fontCharacter:"\\eab6"}),o.chevronUp=new o("chevron-up",{fontCharacter:"\\eab7"}),o.chromeClose=new o("chrome-close",{fontCharacter:"\\eab8"}),o.chromeMaximize=new o("chrome-maximize",{fontCharacter:"\\eab9"}),o.chromeMinimize=new o("chrome-minimize",{fontCharacter:"\\eaba"}),o.chromeRestore=new o("chrome-restore",{fontCharacter:"\\eabb"}),o.circleOutline=new o("circle-outline",{fontCharacter:"\\eabc"}),o.debugBreakpointUnverified=new o("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),o.circleSlash=new o("circle-slash",{fontCharacter:"\\eabd"}),o.circuitBoard=new o("circuit-board",{fontCharacter:"\\eabe"}),o.clearAll=new o("clear-all",{fontCharacter:"\\eabf"}),o.clippy=new o("clippy",{fontCharacter:"\\eac0"}),o.closeAll=new o("close-all",{fontCharacter:"\\eac1"}),o.cloudDownload=new o("cloud-download",{fontCharacter:"\\eac2"}),o.cloudUpload=new o("cloud-upload",{fontCharacter:"\\eac3"}),o.code=new o("code",{fontCharacter:"\\eac4"}),o.collapseAll=new o("collapse-all",{fontCharacter:"\\eac5"}),o.colorMode=new o("color-mode",{fontCharacter:"\\eac6"}),o.commentDiscussion=new o("comment-discussion",{fontCharacter:"\\eac7"}),o.compareChanges=new o("compare-changes",{fontCharacter:"\\eafd"}),o.creditCard=new o("credit-card",{fontCharacter:"\\eac9"}),o.dash=new o("dash",{fontCharacter:"\\eacc"}),o.dashboard=new o("dashboard",{fontCharacter:"\\eacd"}),o.database=new o("database",{fontCharacter:"\\eace"}),o.debugContinue=new o("debug-continue",{fontCharacter:"\\eacf"}),o.debugDisconnect=new o("debug-disconnect",{fontCharacter:"\\ead0"}),o.debugPause=new o("debug-pause",{fontCharacter:"\\ead1"}),o.debugRestart=new o("debug-restart",{fontCharacter:"\\ead2"}),o.debugStart=new o("debug-start",{fontCharacter:"\\ead3"}),o.debugStepInto=new o("debug-step-into",{fontCharacter:"\\ead4"}),o.debugStepOut=new o("debug-step-out",{fontCharacter:"\\ead5"}),o.debugStepOver=new o("debug-step-over",{fontCharacter:"\\ead6"}),o.debugStop=new o("debug-stop",{fontCharacter:"\\ead7"}),o.debug=new o("debug",{fontCharacter:"\\ead8"}),o.deviceCameraVideo=new o("device-camera-video",{fontCharacter:"\\ead9"}),o.deviceCamera=new o("device-camera",{fontCharacter:"\\eada"}),o.deviceMobile=new o("device-mobile",{fontCharacter:"\\eadb"}),o.diffAdded=new o("diff-added",{fontCharacter:"\\eadc"}),o.diffIgnored=new o("diff-ignored",{fontCharacter:"\\eadd"}),o.diffModified=new o("diff-modified",{fontCharacter:"\\eade"}),o.diffRemoved=new o("diff-removed",{fontCharacter:"\\eadf"}),o.diffRenamed=new o("diff-renamed",{fontCharacter:"\\eae0"}),o.diff=new o("diff",{fontCharacter:"\\eae1"}),o.discard=new o("discard",{fontCharacter:"\\eae2"}),o.editorLayout=new o("editor-layout",{fontCharacter:"\\eae3"}),o.emptyWindow=new o("empty-window",{fontCharacter:"\\eae4"}),o.exclude=new o("exclude",{fontCharacter:"\\eae5"}),o.extensions=new o("extensions",{fontCharacter:"\\eae6"}),o.eyeClosed=new o("eye-closed",{fontCharacter:"\\eae7"}),o.fileBinary=new o("file-binary",{fontCharacter:"\\eae8"}),o.fileCode=new o("file-code",{fontCharacter:"\\eae9"}),o.fileMedia=new o("file-media",{fontCharacter:"\\eaea"}),o.filePdf=new o("file-pdf",{fontCharacter:"\\eaeb"}),o.fileSubmodule=new o("file-submodule",{fontCharacter:"\\eaec"}),o.fileSymlinkDirectory=new o("file-symlink-directory",{fontCharacter:"\\eaed"}),o.fileSymlinkFile=new o("file-symlink-file",{fontCharacter:"\\eaee"}),o.fileZip=new o("file-zip",{fontCharacter:"\\eaef"}),o.files=new o("files",{fontCharacter:"\\eaf0"}),o.filter=new o("filter",{fontCharacter:"\\eaf1"}),o.flame=new o("flame",{fontCharacter:"\\eaf2"}),o.foldDown=new o("fold-down",{fontCharacter:"\\eaf3"}),o.foldUp=new o("fold-up",{fontCharacter:"\\eaf4"}),o.fold=new o("fold",{fontCharacter:"\\eaf5"}),o.folderActive=new o("folder-active",{fontCharacter:"\\eaf6"}),o.folderOpened=new o("folder-opened",{fontCharacter:"\\eaf7"}),o.gear=new o("gear",{fontCharacter:"\\eaf8"}),o.gift=new o("gift",{fontCharacter:"\\eaf9"}),o.gistSecret=new o("gist-secret",{fontCharacter:"\\eafa"}),o.gist=new o("gist",{fontCharacter:"\\eafb"}),o.gitCommit=new o("git-commit",{fontCharacter:"\\eafc"}),o.gitCompare=new o("git-compare",{fontCharacter:"\\eafd"}),o.gitMerge=new o("git-merge",{fontCharacter:"\\eafe"}),o.githubAction=new o("github-action",{fontCharacter:"\\eaff"}),o.githubAlt=new o("github-alt",{fontCharacter:"\\eb00"}),o.globe=new o("globe",{fontCharacter:"\\eb01"}),o.grabber=new o("grabber",{fontCharacter:"\\eb02"}),o.graph=new o("graph",{fontCharacter:"\\eb03"}),o.gripper=new o("gripper",{fontCharacter:"\\eb04"}),o.heart=new o("heart",{fontCharacter:"\\eb05"}),o.home=new o("home",{fontCharacter:"\\eb06"}),o.horizontalRule=new o("horizontal-rule",{fontCharacter:"\\eb07"}),o.hubot=new o("hubot",{fontCharacter:"\\eb08"}),o.inbox=new o("inbox",{fontCharacter:"\\eb09"}),o.issueClosed=new o("issue-closed",{fontCharacter:"\\eba4"}),o.issueReopened=new o("issue-reopened",{fontCharacter:"\\eb0b"}),o.issues=new o("issues",{fontCharacter:"\\eb0c"}),o.italic=new o("italic",{fontCharacter:"\\eb0d"}),o.jersey=new o("jersey",{fontCharacter:"\\eb0e"}),o.json=new o("json",{fontCharacter:"\\eb0f"}),o.kebabVertical=new o("kebab-vertical",{fontCharacter:"\\eb10"}),o.key=new o("key",{fontCharacter:"\\eb11"}),o.law=new o("law",{fontCharacter:"\\eb12"}),o.lightbulbAutofix=new o("lightbulb-autofix",{fontCharacter:"\\eb13"}),o.linkExternal=new o("link-external",{fontCharacter:"\\eb14"}),o.link=new o("link",{fontCharacter:"\\eb15"}),o.listOrdered=new o("list-ordered",{fontCharacter:"\\eb16"}),o.listUnordered=new o("list-unordered",{fontCharacter:"\\eb17"}),o.liveShare=new o("live-share",{fontCharacter:"\\eb18"}),o.loading=new o("loading",{fontCharacter:"\\eb19"}),o.location=new o("location",{fontCharacter:"\\eb1a"}),o.mailRead=new o("mail-read",{fontCharacter:"\\eb1b"}),o.mail=new o("mail",{fontCharacter:"\\eb1c"}),o.markdown=new o("markdown",{fontCharacter:"\\eb1d"}),o.megaphone=new o("megaphone",{fontCharacter:"\\eb1e"}),o.mention=new o("mention",{fontCharacter:"\\eb1f"}),o.milestone=new o("milestone",{fontCharacter:"\\eb20"}),o.mortarBoard=new o("mortar-board",{fontCharacter:"\\eb21"}),o.move=new o("move",{fontCharacter:"\\eb22"}),o.multipleWindows=new o("multiple-windows",{fontCharacter:"\\eb23"}),o.mute=new o("mute",{fontCharacter:"\\eb24"}),o.noNewline=new o("no-newline",{fontCharacter:"\\eb25"}),o.note=new o("note",{fontCharacter:"\\eb26"}),o.octoface=new o("octoface",{fontCharacter:"\\eb27"}),o.openPreview=new o("open-preview",{fontCharacter:"\\eb28"}),o.package_=new o("package",{fontCharacter:"\\eb29"}),o.paintcan=new o("paintcan",{fontCharacter:"\\eb2a"}),o.pin=new o("pin",{fontCharacter:"\\eb2b"}),o.play=new o("play",{fontCharacter:"\\eb2c"}),o.run=new o("run",{fontCharacter:"\\eb2c"}),o.plug=new o("plug",{fontCharacter:"\\eb2d"}),o.preserveCase=new o("preserve-case",{fontCharacter:"\\eb2e"}),o.preview=new o("preview",{fontCharacter:"\\eb2f"}),o.project=new o("project",{fontCharacter:"\\eb30"}),o.pulse=new o("pulse",{fontCharacter:"\\eb31"}),o.question=new o("question",{fontCharacter:"\\eb32"}),o.quote=new o("quote",{fontCharacter:"\\eb33"}),o.radioTower=new o("radio-tower",{fontCharacter:"\\eb34"}),o.reactions=new o("reactions",{fontCharacter:"\\eb35"}),o.references=new o("references",{fontCharacter:"\\eb36"}),o.refresh=new o("refresh",{fontCharacter:"\\eb37"}),o.regex=new o("regex",{fontCharacter:"\\eb38"}),o.remoteExplorer=new o("remote-explorer",{fontCharacter:"\\eb39"}),o.remote=new o("remote",{fontCharacter:"\\eb3a"}),o.remove=new o("remove",{fontCharacter:"\\eb3b"}),o.replaceAll=new o("replace-all",{fontCharacter:"\\eb3c"}),o.replace=new o("replace",{fontCharacter:"\\eb3d"}),o.repoClone=new o("repo-clone",{fontCharacter:"\\eb3e"}),o.repoForcePush=new o("repo-force-push",{fontCharacter:"\\eb3f"}),o.repoPull=new o("repo-pull",{fontCharacter:"\\eb40"}),o.repoPush=new o("repo-push",{fontCharacter:"\\eb41"}),o.report=new o("report",{fontCharacter:"\\eb42"}),o.requestChanges=new o("request-changes",{fontCharacter:"\\eb43"}),o.rocket=new o("rocket",{fontCharacter:"\\eb44"}),o.rootFolderOpened=new o("root-folder-opened",{fontCharacter:"\\eb45"}),o.rootFolder=new o("root-folder",{fontCharacter:"\\eb46"}),o.rss=new o("rss",{fontCharacter:"\\eb47"}),o.ruby=new o("ruby",{fontCharacter:"\\eb48"}),o.saveAll=new o("save-all",{fontCharacter:"\\eb49"}),o.saveAs=new o("save-as",{fontCharacter:"\\eb4a"}),o.save=new o("save",{fontCharacter:"\\eb4b"}),o.screenFull=new o("screen-full",{fontCharacter:"\\eb4c"}),o.screenNormal=new o("screen-normal",{fontCharacter:"\\eb4d"}),o.searchStop=new o("search-stop",{fontCharacter:"\\eb4e"}),o.server=new o("server",{fontCharacter:"\\eb50"}),o.settingsGear=new o("settings-gear",{fontCharacter:"\\eb51"}),o.settings=new o("settings",{fontCharacter:"\\eb52"}),o.shield=new o("shield",{fontCharacter:"\\eb53"}),o.smiley=new o("smiley",{fontCharacter:"\\eb54"}),o.sortPrecedence=new o("sort-precedence",{fontCharacter:"\\eb55"}),o.splitHorizontal=new o("split-horizontal",{fontCharacter:"\\eb56"}),o.splitVertical=new o("split-vertical",{fontCharacter:"\\eb57"}),o.squirrel=new o("squirrel",{fontCharacter:"\\eb58"}),o.starFull=new o("star-full",{fontCharacter:"\\eb59"}),o.starHalf=new o("star-half",{fontCharacter:"\\eb5a"}),o.symbolClass=new o("symbol-class",{fontCharacter:"\\eb5b"}),o.symbolColor=new o("symbol-color",{fontCharacter:"\\eb5c"}),o.symbolConstant=new o("symbol-constant",{fontCharacter:"\\eb5d"}),o.symbolEnumMember=new o("symbol-enum-member",{fontCharacter:"\\eb5e"}),o.symbolField=new o("symbol-field",{fontCharacter:"\\eb5f"}),o.symbolFile=new o("symbol-file",{fontCharacter:"\\eb60"}),o.symbolInterface=new o("symbol-interface",{fontCharacter:"\\eb61"}),o.symbolKeyword=new o("symbol-keyword",{fontCharacter:"\\eb62"}),o.symbolMisc=new o("symbol-misc",{fontCharacter:"\\eb63"}),o.symbolOperator=new o("symbol-operator",{fontCharacter:"\\eb64"}),o.symbolProperty=new o("symbol-property",{fontCharacter:"\\eb65"}),o.wrench=new o("wrench",{fontCharacter:"\\eb65"}),o.wrenchSubaction=new o("wrench-subaction",{fontCharacter:"\\eb65"}),o.symbolSnippet=new o("symbol-snippet",{fontCharacter:"\\eb66"}),o.tasklist=new o("tasklist",{fontCharacter:"\\eb67"}),o.telescope=new o("telescope",{fontCharacter:"\\eb68"}),o.textSize=new o("text-size",{fontCharacter:"\\eb69"}),o.threeBars=new o("three-bars",{fontCharacter:"\\eb6a"}),o.thumbsdown=new o("thumbsdown",{fontCharacter:"\\eb6b"}),o.thumbsup=new o("thumbsup",{fontCharacter:"\\eb6c"}),o.tools=new o("tools",{fontCharacter:"\\eb6d"}),o.triangleDown=new o("triangle-down",{fontCharacter:"\\eb6e"}),o.triangleLeft=new o("triangle-left",{fontCharacter:"\\eb6f"}),o.triangleRight=new o("triangle-right",{fontCharacter:"\\eb70"}),o.triangleUp=new o("triangle-up",{fontCharacter:"\\eb71"}),o.twitter=new o("twitter",{fontCharacter:"\\eb72"}),o.unfold=new o("unfold",{fontCharacter:"\\eb73"}),o.unlock=new o("unlock",{fontCharacter:"\\eb74"}),o.unmute=new o("unmute",{fontCharacter:"\\eb75"}),o.unverified=new o("unverified",{fontCharacter:"\\eb76"}),o.verified=new o("verified",{fontCharacter:"\\eb77"}),o.versions=new o("versions",{fontCharacter:"\\eb78"}),o.vmActive=new o("vm-active",{fontCharacter:"\\eb79"}),o.vmOutline=new o("vm-outline",{fontCharacter:"\\eb7a"}),o.vmRunning=new o("vm-running",{fontCharacter:"\\eb7b"}),o.watch=new o("watch",{fontCharacter:"\\eb7c"}),o.whitespace=new o("whitespace",{fontCharacter:"\\eb7d"}),o.wholeWord=new o("whole-word",{fontCharacter:"\\eb7e"}),o.window=new o("window",{fontCharacter:"\\eb7f"}),o.wordWrap=new o("word-wrap",{fontCharacter:"\\eb80"}),o.zoomIn=new o("zoom-in",{fontCharacter:"\\eb81"}),o.zoomOut=new o("zoom-out",{fontCharacter:"\\eb82"}),o.listFilter=new o("list-filter",{fontCharacter:"\\eb83"}),o.listFlat=new o("list-flat",{fontCharacter:"\\eb84"}),o.listSelection=new o("list-selection",{fontCharacter:"\\eb85"}),o.selection=new o("selection",{fontCharacter:"\\eb85"}),o.listTree=new o("list-tree",{fontCharacter:"\\eb86"}),o.debugBreakpointFunctionUnverified=new o("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),o.debugBreakpointFunction=new o("debug-breakpoint-function",{fontCharacter:"\\eb88"}),o.debugBreakpointFunctionDisabled=new o("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),o.debugStackframeActive=new o("debug-stackframe-active",{fontCharacter:"\\eb89"}),o.debugStackframeDot=new o("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),o.debugStackframe=new o("debug-stackframe",{fontCharacter:"\\eb8b"}),o.debugStackframeFocused=new o("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),o.debugBreakpointUnsupported=new o("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),o.symbolString=new o("symbol-string",{fontCharacter:"\\eb8d"}),o.debugReverseContinue=new o("debug-reverse-continue",{fontCharacter:"\\eb8e"}),o.debugStepBack=new o("debug-step-back",{fontCharacter:"\\eb8f"}),o.debugRestartFrame=new o("debug-restart-frame",{fontCharacter:"\\eb90"}),o.callIncoming=new o("call-incoming",{fontCharacter:"\\eb92"}),o.callOutgoing=new o("call-outgoing",{fontCharacter:"\\eb93"}),o.menu=new o("menu",{fontCharacter:"\\eb94"}),o.expandAll=new o("expand-all",{fontCharacter:"\\eb95"}),o.feedback=new o("feedback",{fontCharacter:"\\eb96"}),o.groupByRefType=new o("group-by-ref-type",{fontCharacter:"\\eb97"}),o.ungroupByRefType=new o("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),o.account=new o("account",{fontCharacter:"\\eb99"}),o.bellDot=new o("bell-dot",{fontCharacter:"\\eb9a"}),o.debugConsole=new o("debug-console",{fontCharacter:"\\eb9b"}),o.library=new o("library",{fontCharacter:"\\eb9c"}),o.output=new o("output",{fontCharacter:"\\eb9d"}),o.runAll=new o("run-all",{fontCharacter:"\\eb9e"}),o.syncIgnored=new o("sync-ignored",{fontCharacter:"\\eb9f"}),o.pinned=new o("pinned",{fontCharacter:"\\eba0"}),o.githubInverted=new o("github-inverted",{fontCharacter:"\\eba1"}),o.debugAlt=new o("debug-alt",{fontCharacter:"\\eb91"}),o.serverProcess=new o("server-process",{fontCharacter:"\\eba2"}),o.serverEnvironment=new o("server-environment",{fontCharacter:"\\eba3"}),o.pass=new o("pass",{fontCharacter:"\\eba4"}),o.stopCircle=new o("stop-circle",{fontCharacter:"\\eba5"}),o.playCircle=new o("play-circle",{fontCharacter:"\\eba6"}),o.record=new o("record",{fontCharacter:"\\eba7"}),o.debugAltSmall=new o("debug-alt-small",{fontCharacter:"\\eba8"}),o.vmConnect=new o("vm-connect",{fontCharacter:"\\eba9"}),o.cloud=new o("cloud",{fontCharacter:"\\ebaa"}),o.merge=new o("merge",{fontCharacter:"\\ebab"}),o.exportIcon=new o("export",{fontCharacter:"\\ebac"}),o.graphLeft=new o("graph-left",{fontCharacter:"\\ebad"}),o.magnet=new o("magnet",{fontCharacter:"\\ebae"}),o.notebook=new o("notebook",{fontCharacter:"\\ebaf"}),o.redo=new o("redo",{fontCharacter:"\\ebb0"}),o.checkAll=new o("check-all",{fontCharacter:"\\ebb1"}),o.pinnedDirty=new o("pinned-dirty",{fontCharacter:"\\ebb2"}),o.passFilled=new o("pass-filled",{fontCharacter:"\\ebb3"}),o.circleLargeFilled=new o("circle-large-filled",{fontCharacter:"\\ebb4"}),o.circleLargeOutline=new o("circle-large-outline",{fontCharacter:"\\ebb5"}),o.combine=new o("combine",{fontCharacter:"\\ebb6"}),o.gather=new o("gather",{fontCharacter:"\\ebb6"}),o.table=new o("table",{fontCharacter:"\\ebb7"}),o.variableGroup=new o("variable-group",{fontCharacter:"\\ebb8"}),o.typeHierarchy=new o("type-hierarchy",{fontCharacter:"\\ebb9"}),o.typeHierarchySub=new o("type-hierarchy-sub",{fontCharacter:"\\ebba"}),o.typeHierarchySuper=new o("type-hierarchy-super",{fontCharacter:"\\ebbb"}),o.gitPullRequestCreate=new o("git-pull-request-create",{fontCharacter:"\\ebbc"}),o.runAbove=new o("run-above",{fontCharacter:"\\ebbd"}),o.runBelow=new o("run-below",{fontCharacter:"\\ebbe"}),o.notebookTemplate=new o("notebook-template",{fontCharacter:"\\ebbf"}),o.debugRerun=new o("debug-rerun",{fontCharacter:"\\ebc0"}),o.workspaceTrusted=new o("workspace-trusted",{fontCharacter:"\\ebc1"}),o.workspaceUntrusted=new o("workspace-untrusted",{fontCharacter:"\\ebc2"}),o.workspaceUnspecified=new o("workspace-unspecified",{fontCharacter:"\\ebc3"}),o.terminalCmd=new o("terminal-cmd",{fontCharacter:"\\ebc4"}),o.terminalDebian=new o("terminal-debian",{fontCharacter:"\\ebc5"}),o.terminalLinux=new o("terminal-linux",{fontCharacter:"\\ebc6"}),o.terminalPowershell=new o("terminal-powershell",{fontCharacter:"\\ebc7"}),o.terminalTmux=new o("terminal-tmux",{fontCharacter:"\\ebc8"}),o.terminalUbuntu=new o("terminal-ubuntu",{fontCharacter:"\\ebc9"}),o.terminalBash=new o("terminal-bash",{fontCharacter:"\\ebca"}),o.arrowSwap=new o("arrow-swap",{fontCharacter:"\\ebcb"}),o.copy=new o("copy",{fontCharacter:"\\ebcc"}),o.personAdd=new o("person-add",{fontCharacter:"\\ebcd"}),o.filterFilled=new o("filter-filled",{fontCharacter:"\\ebce"}),o.wand=new o("wand",{fontCharacter:"\\ebcf"}),o.debugLineByLine=new o("debug-line-by-line",{fontCharacter:"\\ebd0"}),o.inspect=new o("inspect",{fontCharacter:"\\ebd1"}),o.layers=new o("layers",{fontCharacter:"\\ebd2"}),o.layersDot=new o("layers-dot",{fontCharacter:"\\ebd3"}),o.layersActive=new o("layers-active",{fontCharacter:"\\ebd4"}),o.compass=new o("compass",{fontCharacter:"\\ebd5"}),o.compassDot=new o("compass-dot",{fontCharacter:"\\ebd6"}),o.compassActive=new o("compass-active",{fontCharacter:"\\ebd7"}),o.azure=new o("azure",{fontCharacter:"\\ebd8"}),o.issueDraft=new o("issue-draft",{fontCharacter:"\\ebd9"}),o.gitPullRequestClosed=new o("git-pull-request-closed",{fontCharacter:"\\ebda"}),o.gitPullRequestDraft=new o("git-pull-request-draft",{fontCharacter:"\\ebdb"}),o.debugAll=new o("debug-all",{fontCharacter:"\\ebdc"}),o.debugCoverage=new o("debug-coverage",{fontCharacter:"\\ebdd"}),o.runErrors=new o("run-errors",{fontCharacter:"\\ebde"}),o.folderLibrary=new o("folder-library",{fontCharacter:"\\ebdf"}),o.debugContinueSmall=new o("debug-continue-small",{fontCharacter:"\\ebe0"}),o.beakerStop=new o("beaker-stop",{fontCharacter:"\\ebe1"}),o.graphLine=new o("graph-line",{fontCharacter:"\\ebe2"}),o.graphScatter=new o("graph-scatter",{fontCharacter:"\\ebe3"}),o.pieChart=new o("pie-chart",{fontCharacter:"\\ebe4"}),o.bracket=new o("bracket",o.json.definition),o.bracketDot=new o("bracket-dot",{fontCharacter:"\\ebe5"}),o.bracketError=new o("bracket-error",{fontCharacter:"\\ebe6"}),o.lockSmall=new o("lock-small",{fontCharacter:"\\ebe7"}),o.azureDevops=new o("azure-devops",{fontCharacter:"\\ebe8"}),o.verifiedFilled=new o("verified-filled",{fontCharacter:"\\ebe9"})}(ue||(ue={}))},79881:function(on,je,E){"use strict";E.d(je,{B8:function(){return C},Cp:function(){return fe},F0:function(){return te},L6:function(){return y},VV:function(){return ue},b1:function(){return o},dL:function(){return ve},ri:function(){return F}});class x{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(g){setTimeout(()=>{throw g.stack?new Error(g.message+`
|
|
|
|
`+g.stack):g},0)}}emit(g){this.listeners.forEach(_=>{_(g)})}onUnexpectedError(g){this.unexpectedErrorHandler(g),this.emit(g)}onUnexpectedExternalError(g){this.unexpectedErrorHandler(g)}}const ae=new x;function ve(h){ue(h)||ae.onUnexpectedError(h)}function fe(h){ue(h)||ae.onUnexpectedExternalError(h)}function F(h){if(h instanceof Error){let{name:g,message:_}=h;const S=h.stacktrace||h.stack;return{$isError:!0,name:g,message:_,stack:S}}return h}const f="Canceled";function ue(h){return h instanceof Error&&h.name===f&&h.message===f}function te(){const h=new Error(f);return h.name=h.message,h}function o(h){return h?new Error(`Illegal argument: ${h}`):new Error("Illegal argument")}function y(h){return h?new Error(`Illegal state: ${h}`):new Error("Illegal state")}class C extends Error{constructor(g){super("NotSupported"),g&&(this.message=g)}}},4348:function(on,je,E){"use strict";E.d(je,{D0:function(){return C},E7:function(){return h},K3:function(){return y},Q5:function(){return o},ZD:function(){return g},ju:function(){return F}});var x=E(79881),ae=E(69323),ve=E(34502),fe=E(95830),F;(function(_){_.None=()=>ae.JT.None;function S(Q){return(q,ie=null,V)=>{let v=!1,m;return m=Q(U=>{if(!v)return m?m.dispose():v=!0,q.call(ie,U)},null,V),v&&m.dispose(),m}}_.once=S;function L(Q,q){return A((ie,V=null,v)=>Q(m=>ie.call(V,q(m)),null,v))}_.map=L;function N(Q,q){return A((ie,V=null,v)=>Q(m=>{q(m),ie.call(V,m)},null,v))}_.forEach=N;function H(Q,q){return A((ie,V=null,v)=>Q(m=>q(m)&&ie.call(V,m),null,v))}_.filter=H;function R(Q){return Q}_.signal=R;function k(...Q){return(q,ie=null,V)=>(0,ae.F8)(...Q.map(v=>v(m=>q.call(ie,m),null,V)))}_.any=k;function T(Q,q,ie){let V=ie;return L(Q,v=>(V=q(V,v),V))}_.reduce=T;function A(Q){let q;const ie=new o({onFirstListenerAdd(){q=Q(ie.fire,ie)},onLastListenerRemove(){q.dispose()}});return ie.event}function J(Q,q,ie=100,V=!1,v){let m,U,se,pe=0;const He=new o({leakWarningThreshold:v,onFirstListenerAdd(){m=Q(qe=>{pe++,U=q(U,qe),V&&!se&&(He.fire(U),U=void 0),clearTimeout(se),se=setTimeout(()=>{const ot=U;U=void 0,se=void 0,(!V||pe>1)&&He.fire(ot),pe=0},ie)})},onLastListenerRemove(){m.dispose()}});return He.event}_.debounce=J;function ee(Q,q=(ie,V)=>ie===V){let ie=!0,V;return H(Q,v=>{const m=ie||!q(v,V);return ie=!1,V=v,m})}_.latch=ee;function G(Q,q){return[_.filter(Q,q),_.filter(Q,ie=>!q(ie))]}_.split=G;function I(Q,q=!1,ie=[]){let V=ie.slice(),v=Q(se=>{V?V.push(se):U.fire(se)});const m=()=>{V&&V.forEach(se=>U.fire(se)),V=null},U=new o({onFirstListenerAdd(){v||(v=Q(se=>U.fire(se)))},onFirstListenerDidAdd(){V&&(q?setTimeout(m):m())},onLastListenerRemove(){v&&v.dispose(),v=null}});return U.event}_.buffer=I;class re{constructor(q){this.event=q}map(q){return new re(L(this.event,q))}forEach(q){return new re(N(this.event,q))}filter(q){return new re(H(this.event,q))}reduce(q,ie){return new re(T(this.event,q,ie))}latch(){return new re(ee(this.event))}debounce(q,ie=100,V=!1,v){return new re(J(this.event,q,ie,V,v))}on(q,ie,V){return this.event(q,ie,V)}once(q,ie,V){return S(this.event)(q,ie,V)}}function le(Q){return new re(Q)}_.chain=le;function Te(Q,q,ie=V=>V){const V=(...se)=>U.fire(ie(...se)),v=()=>Q.on(q,V),m=()=>Q.removeListener(q,V),U=new o({onFirstListenerAdd:v,onLastListenerRemove:m});return U.event}_.fromNodeEventEmitter=Te;function W(Q,q,ie=V=>V){const V=(...se)=>U.fire(ie(...se)),v=()=>Q.addEventListener(q,V),m=()=>Q.removeEventListener(q,V),U=new o({onFirstListenerAdd:v,onLastListenerRemove:m});return U.event}_.fromDOMEventEmitter=W;function O(Q){return new Promise(q=>S(Q)(q))}_.toPromise=O})(F||(F={}));class f{constructor(S){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${S}_${f._idPool++}`}start(S){this._stopWatch=new fe.G(!0),this._listenerCount=S}stop(){if(this._stopWatch){const S=this._stopWatch.elapsed();this._elapsedOverall+=S,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${S.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}f._idPool=0;let ue=-1;class te{constructor(S,L=Math.random().toString(18).slice(2,5)){this.customThreshold=S,this.name=L,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(S){let L=ue;if(typeof this.customThreshold=="number"&&(L=this.customThreshold),L<=0||S<L)return;this._stacks||(this._stacks=new Map);const N=new Error().stack.split(`
|
|
`).slice(3).join(`
|
|
`),H=this._stacks.get(N)||0;if(this._stacks.set(N,H+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=L*.5;let R,k=0;for(const[T,A]of this._stacks)(!R||k<A)&&(R=T,k=A);console.warn(`[${this.name}] potential listener LEAK detected, having ${S} listeners already. MOST frequent listener (${k}):`),console.warn(R)}return()=>{const R=this._stacks.get(N)||0;this._stacks.set(N,R-1)}}}class o{constructor(S){var L;this._disposed=!1,this._options=S,this._leakageMon=ue>0?new te(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((L=this._options)===null||L===void 0)&&L._profName?new f(this._options._profName):void 0}get event(){return this._event||(this._event=(S,L,N)=>{var H;this._listeners||(this._listeners=new ve.S);const R=this._listeners.isEmpty();R&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const k=this._listeners.push(L?[S,L]:S);R&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,S,L);const T=(H=this._leakageMon)===null||H===void 0?void 0:H.check(this._listeners.size),A=(0,ae.OF)(()=>{T&&T(),this._disposed||(k(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return N instanceof ae.SL?N.add(A):Array.isArray(N)&&N.push(A),A}),this._event}fire(S){var L,N;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new ve.S);for(let H of this._listeners)this._deliveryQueue.push([H,S]);for((L=this._perfMon)===null||L===void 0||L.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[H,R]=this._deliveryQueue.shift();try{typeof H=="function"?H.call(void 0,R):H[0].call(H[1],R)}catch(k){(0,x.dL)(k)}}(N=this._perfMon)===null||N===void 0||N.stop()}}dispose(){var S,L,N,H,R;this._disposed||(this._disposed=!0,(S=this._listeners)===null||S===void 0||S.clear(),(L=this._deliveryQueue)===null||L===void 0||L.clear(),(H=(N=this._options)===null||N===void 0?void 0:N.onLastListenerRemove)===null||H===void 0||H.call(N),(R=this._leakageMon)===null||R===void 0||R.dispose())}}class y extends o{constructor(S){super(S),this._isPaused=0,this._eventQueue=new ve.S,this._mergeFn=S==null?void 0:S.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const S=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(S))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(S){this._listeners&&(this._isPaused!==0?this._eventQueue.push(S):super.fire(S))}}class C extends y{constructor(S){var L;super(S),this._delay=(L=S.delay)!==null&&L!==void 0?L:100}fire(S){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(S)}}class h{constructor(){this.buffers=[]}wrapEvent(S){return(L,N,H)=>S(R=>{const k=this.buffers[this.buffers.length-1];k?k.push(()=>L.call(N,R)):L.call(N,R)},void 0,H)}bufferEvents(S){const L=[];this.buffers.push(L);const N=S();return this.buffers.pop(),L.forEach(H=>H()),N}}class g{constructor(){this.listening=!1,this.inputEvent=F.None,this.inputEventListener=ae.JT.None,this.emitter=new o({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(S){this.inputEvent=S,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=S(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},17845:function(on,je,E){"use strict";E.d(je,{I:function(){return x}});function x(ae){const ve=this;let fe=!1,F;return function(){return fe||(fe=!0,F=ae.apply(ve,arguments)),F}}},88226:function(on,je,E){"use strict";E.d(je,{$:function(){return x}});var x;(function(ae){function ve(k){return k&&typeof k=="object"&&typeof k[Symbol.iterator]=="function"}ae.is=ve;const fe=Object.freeze([]);function F(){return fe}ae.empty=F;function*f(k){yield k}ae.single=f;function ue(k){return k||fe}ae.from=ue;function te(k){return!k||k[Symbol.iterator]().next().done===!0}ae.isEmpty=te;function o(k){return k[Symbol.iterator]().next().value}ae.first=o;function y(k,T){for(const A of k)if(T(A))return!0;return!1}ae.some=y;function C(k,T){for(const A of k)if(T(A))return A}ae.find=C;function*h(k,T){for(const A of k)T(A)&&(yield A)}ae.filter=h;function*g(k,T){let A=0;for(const J of k)yield T(J,A++)}ae.map=g;function*_(...k){for(const T of k)for(const A of T)yield A}ae.concat=_;function*S(k){for(const T of k)for(const A of T)yield A}ae.concatNested=S;function L(k,T,A){let J=A;for(const ee of k)J=T(J,ee);return J}ae.reduce=L;function*N(k,T,A=k.length){for(T<0&&(T+=k.length),A<0?A+=k.length:A>k.length&&(A=k.length);T<A;T++)yield k[T]}ae.slice=N;function H(k,T=Number.POSITIVE_INFINITY){const A=[];if(T===0)return[A,k];const J=k[Symbol.iterator]();for(let ee=0;ee<T;ee++){const G=J.next();if(G.done)return[A,ae.empty()];A.push(G.value)}return[A,{[Symbol.iterator](){return J}}]}ae.consume=H;function R(k,T,A=(J,ee)=>J===ee){const J=k[Symbol.iterator](),ee=T[Symbol.iterator]();for(;;){const G=J.next(),I=ee.next();if(G.done!==I.done)return!1;if(G.done)return!0;if(!A(G.value,I.value))return!1}}ae.equals=R})(x||(x={}))},69323:function(on,je,E){"use strict";E.d(je,{B9:function(){return g},F8:function(){return _},JT:function(){return N},Jz:function(){return R},OF:function(){return S},SL:function(){return L},Wf:function(){return h},XK:function(){return H},dk:function(){return y}});var x=E(17845),ae=E(88226);const ve=!1;let fe=null;function F(k){fe=k}if(ve){const k="__is_disposable_tracked__";F(new class{trackDisposable(T){const A=new Error("Potentially leaked disposable").stack;setTimeout(()=>{T[k]||console.log(A)},3e3)}setParent(T,A){if(T&&T!==N.None)try{T[k]=!0}catch(J){}}markAsDisposed(T){if(T&&T!==N.None)try{T[k]=!0}catch(A){}}markAsSingleton(T){}})}function f(k){return fe==null||fe.trackDisposable(k),k}function ue(k){fe==null||fe.markAsDisposed(k)}function te(k,T){fe==null||fe.setParent(k,T)}function o(k,T){if(fe)for(const A of k)fe.setParent(A,T)}function y(k){return fe==null||fe.markAsSingleton(k),k}class C extends Error{constructor(T){super(`Encountered errors while disposing of store. Errors: [${T.join(", ")}]`),this.errors=T}}function h(k){return typeof k.dispose=="function"&&k.dispose.length===0}function g(k){if(ae.$.is(k)){let T=[];for(const A of k)if(A)try{A.dispose()}catch(J){T.push(J)}if(T.length===1)throw T[0];if(T.length>1)throw new C(T);return Array.isArray(k)?[]:k}else if(k)return k.dispose(),k}function _(...k){const T=S(()=>g(k));return o(k,T),T}function S(k){const T=f({dispose:(0,x.I)(()=>{ue(T),k()})});return T}class L{constructor(){this._toDispose=new Set,this._isDisposed=!1,f(this)}dispose(){this._isDisposed||(ue(this),this._isDisposed=!0,this.clear())}clear(){try{g(this._toDispose.values())}finally{this._toDispose.clear()}}add(T){if(!T)return T;if(T===this)throw new Error("Cannot register a disposable on itself!");return te(T,this),this._isDisposed?L.DISABLE_DISPOSED_WARNING||console.warn(new Error("Trying to add a disposable to a DisposableStore that has already been disposed of. The added object will be leaked!").stack):this._toDispose.add(T),T}}L.DISABLE_DISPOSED_WARNING=!1;class N{constructor(){this._store=new L,f(this),te(this._store,this)}dispose(){ue(this),this._store.dispose()}_register(T){if(T===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(T)}}N.None=Object.freeze({dispose(){}});class H{constructor(){this._isDisposed=!1,f(this)}get value(){return this._isDisposed?void 0:this._value}set value(T){var A;this._isDisposed||T===this._value||((A=this._value)===null||A===void 0||A.dispose(),T&&te(T,this),this._value=T)}clear(){this.value=void 0}dispose(){var T;this._isDisposed=!0,ue(this),(T=this._value)===null||T===void 0||T.dispose(),this._value=void 0}clearAndLeak(){const T=this._value;return this._value=void 0,T&&te(T,null),T}}class R{constructor(T){this.object=T}dispose(){}}},34502:function(on,je,E){"use strict";E.d(je,{S:function(){return ae}});class x{constructor(fe){this.element=fe,this.next=x.Undefined,this.prev=x.Undefined}}x.Undefined=new x(void 0);class ae{constructor(){this._first=x.Undefined,this._last=x.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===x.Undefined}clear(){let fe=this._first;for(;fe!==x.Undefined;){const F=fe.next;fe.prev=x.Undefined,fe.next=x.Undefined,fe=F}this._first=x.Undefined,this._last=x.Undefined,this._size=0}unshift(fe){return this._insert(fe,!1)}push(fe){return this._insert(fe,!0)}_insert(fe,F){const f=new x(fe);if(this._first===x.Undefined)this._first=f,this._last=f;else if(F){const te=this._last;this._last=f,f.prev=te,te.next=f}else{const te=this._first;this._first=f,f.next=te,te.prev=f}this._size+=1;let ue=!1;return()=>{ue||(ue=!0,this._remove(f))}}shift(){if(this._first!==x.Undefined){const fe=this._first.element;return this._remove(this._first),fe}}pop(){if(this._last!==x.Undefined){const fe=this._last.element;return this._remove(this._last),fe}}_remove(fe){if(fe.prev!==x.Undefined&&fe.next!==x.Undefined){const F=fe.prev;F.next=fe.next,fe.next.prev=F}else fe.prev===x.Undefined&&fe.next===x.Undefined?(this._first=x.Undefined,this._last=x.Undefined):fe.next===x.Undefined?(this._last=this._last.prev,this._last.next=x.Undefined):fe.prev===x.Undefined&&(this._first=this._first.next,this._first.prev=x.Undefined);this._size-=1}*[Symbol.iterator](){let fe=this._first;for(;fe!==x.Undefined;)yield fe.element,fe=fe.next}}},23345:function(on,je,E){"use strict";E.d(je,{$L:function(){return J},ED:function(){return R},IJ:function(){return T},OS:function(){return re},WE:function(){return G},dz:function(){return k},gn:function(){return ee},li:function(){return S},r:function(){return W},tY:function(){return A},xS:function(){return I}});var x=E(97671),ae;const ve="en";let fe=!1,F=!1,f=!1,ue=!1,te=!1,o=!1,y=!1,C,h=null,g=null,_;const S=typeof self=="object"?self:typeof E.g=="object"?E.g:{};let L;typeof S.vscode!="undefined"&&typeof S.vscode.process!="undefined"?L=S.vscode.process:typeof x!="undefined"&&(L=x);const N=typeof((ae=L==null?void 0:L.versions)===null||ae===void 0?void 0:ae.electron)=="string"&&L.type==="renderer";if(typeof navigator=="object"&&!N)_=navigator.userAgent,fe=_.indexOf("Windows")>=0,F=_.indexOf("Macintosh")>=0,y=(_.indexOf("Macintosh")>=0||_.indexOf("iPad")>=0||_.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,f=_.indexOf("Linux")>=0,o=!0,C=navigator.language,h=C;else if(typeof L=="object"){fe=L.platform==="win32",F=L.platform==="darwin",f=L.platform==="linux",ue=f&&!!L.env.SNAP&&!!L.env.SNAP_REVISION,C=ve,h=ve;const O=L.env.VSCODE_NLS_CONFIG;if(O)try{const Q=JSON.parse(O),q=Q.availableLanguages["*"];C=Q.locale,h=q||ve,g=Q._translationsConfigFile}catch(Q){}te=!0}else console.error("Unable to resolve platform.");let H=0;F?H=1:fe?H=3:f&&(H=2);const R=fe,k=F,T=f,A=te,J=o,ee=y,G=_,I=function(){if(S.setImmediate)return S.setImmediate.bind(S);if(typeof S.postMessage=="function"&&!S.importScripts){let q=[];S.addEventListener("message",V=>{if(V.data&&V.data.vscodeSetImmediateId)for(let v=0,m=q.length;v<m;v++){const U=q[v];if(U.id===V.data.vscodeSetImmediateId){q.splice(v,1),U.callback();return}}});let ie=0;return V=>{const v=++ie;q.push({id:v,callback:V}),S.postMessage({vscodeSetImmediateId:v},"*")}}if(typeof(L==null?void 0:L.nextTick)=="function")return L.nextTick.bind(L);const Q=Promise.resolve();return q=>Q.then(q)}(),re=F||y?2:fe?1:3;let le=!0,Te=!1;function W(){if(!Te){Te=!0;const O=new Uint8Array(2);O[0]=1,O[1]=2,le=new Uint16Array(O.buffer)[0]===513}return le}},95830:function(on,je,E){"use strict";E.d(je,{G:function(){return ve}});var x=E(23345);const ae=x.li.performance&&typeof x.li.performance.now=="function";class ve{constructor(F){this._highResolution=ae&&F,this._startTime=this._now(),this._stopTime=-1}static create(F=!0){return new ve(F)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?x.li.performance.now():Date.now()}}},82983:function(on,je,E){"use strict";E.d(je,{$i:function(){return pe},C8:function(){return bt},GF:function(){return C},HO:function(){return ie},IO:function(){return h},K7:function(){return Ot},Kw:function(){return Qt},LC:function(){return S},Mh:function(){return I},P1:function(){return re},PJ:function(){return Lt},Qe:function(){return He},R1:function(){return y},RP:function(){return U},S6:function(){return qt},TT:function(){return R},Ut:function(){return v},V8:function(){return L},WU:function(){return ve},YK:function(){return Te},YU:function(){return fe},ZG:function(){return le},ZH:function(){return O},ab:function(){return qe},c1:function(){return xe},df:function(){return J},ec:function(){return F},fi:function(){return tt},fy:function(){return f},j3:function(){return ue},j_:function(){return T},m5:function(){return x},mK:function(){return A},mr:function(){return g},oH:function(){return Z},oL:function(){return te},ok:function(){return G},ow:function(){return N},qq:function(){return ee},qu:function(){return H},rL:function(){return W},uS:function(){return _t},un:function(){return o},uq:function(){return _},vH:function(){return q},xe:function(){return ot},zY:function(){return k}});function x(P){return!P||typeof P!="string"?!0:P.trim().length===0}const ae=/{(\d+)}/g;function ve(P,...K){return K.length===0?P:P.replace(ae,function(ne,M){const B=parseInt(M,10);return isNaN(B)||B<0||B>=K.length?ne:K[B]})}function fe(P){return P.replace(/[<>&]/g,function(K){switch(K){case"<":return"<";case">":return">";case"&":return"&";default:return K}})}function F(P){return P.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function f(P,K=" "){const ne=ue(P,K);return te(ne,K)}function ue(P,K){if(!P||!K)return P;const ne=K.length;if(ne===0||P.length===0)return P;let M=0;for(;P.indexOf(K,M)===M;)M=M+ne;return P.substring(M)}function te(P,K){if(!P||!K)return P;const ne=K.length,M=P.length;if(ne===0||M===0)return P;let B=M,j=-1;for(;j=P.lastIndexOf(K,B-1),!(j===-1||j+ne!==B);){if(j===0)return"";B=j}return P.substring(0,B)}function o(P){return P.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function y(P){return P.replace(/\*/g,"")}function C(P,K,ne={}){if(!P)throw new Error("Cannot create regex from empty string");K||(P=F(P)),ne.wholeWord&&(/\B/.test(P.charAt(0))||(P="\\b"+P),/\B/.test(P.charAt(P.length-1))||(P=P+"\\b"));let M="";return ne.global&&(M+="g"),ne.matchCase||(M+="i"),ne.multiline&&(M+="m"),ne.unicode&&(M+="u"),new RegExp(P,M)}function h(P){return P.source==="^"||P.source==="^$"||P.source==="$"||P.source==="^\\s*$"?!1:!!(P.exec("")&&P.lastIndex===0)}function g(P){return(P.global?"g":"")+(P.ignoreCase?"i":"")+(P.multiline?"m":"")+(P.unicode?"u":"")}function _(P){return P.split(/\r\n|\r|\n/)}function S(P){for(let K=0,ne=P.length;K<ne;K++){const M=P.charCodeAt(K);if(M!==32&&M!==9)return K}return-1}function L(P,K=0,ne=P.length){for(let M=K;M<ne;M++){const B=P.charCodeAt(M);if(B!==32&&B!==9)return P.substring(K,M)}return P.substring(K,ne)}function N(P,K=P.length-1){for(let ne=K;ne>=0;ne--){const M=P.charCodeAt(ne);if(M!==32&&M!==9)return ne}return-1}function H(P,K){return P<K?-1:P>K?1:0}function R(P,K,ne=0,M=P.length,B=0,j=K.length){for(;ne<M&&B<j;ne++,B++){let Ae=P.charCodeAt(ne),Ee=K.charCodeAt(B);if(Ae<Ee)return-1;if(Ae>Ee)return 1}const me=M-ne,de=j-B;return me<de?-1:me>de?1:0}function k(P,K){return T(P,K,0,P.length,0,K.length)}function T(P,K,ne=0,M=P.length,B=0,j=K.length){for(;ne<M&&B<j;ne++,B++){let Ae=P.charCodeAt(ne),Ee=K.charCodeAt(B);if(Ae===Ee)continue;if(Ae>=128||Ee>=128)return R(P.toLowerCase(),K.toLowerCase(),ne,M,B,j);A(Ae)&&(Ae-=32),A(Ee)&&(Ee-=32);const Ce=Ae-Ee;if(Ce!==0)return Ce}const me=M-ne,de=j-B;return me<de?-1:me>de?1:0}function A(P){return P>=97&&P<=122}function J(P){return P>=65&&P<=90}function ee(P,K){return P.length===K.length&&T(P,K)===0}function G(P,K){const ne=K.length;return K.length>P.length?!1:T(P,K,0,ne)===0}function I(P,K){let ne,M=Math.min(P.length,K.length);for(ne=0;ne<M;ne++)if(P.charCodeAt(ne)!==K.charCodeAt(ne))return ne;return M}function re(P,K){let ne,M=Math.min(P.length,K.length);const B=P.length-1,j=K.length-1;for(ne=0;ne<M;ne++)if(P.charCodeAt(B-ne)!==K.charCodeAt(j-ne))return ne;return M}function le(P){return 55296<=P&&P<=56319}function Te(P){return 56320<=P&&P<=57343}function W(P,K){return(P-55296<<10)+(K-56320)+65536}function O(P,K,ne){const M=P.charCodeAt(ne);if(le(M)&&ne+1<K){const B=P.charCodeAt(ne+1);if(Te(B))return W(M,B)}return M}function Q(P,K){const ne=P.charCodeAt(K-1);if(Te(ne)&&K>1){const M=P.charCodeAt(K-2);if(le(M))return W(M,ne)}return ne}function q(P,K){const ne=Re.getInstance(),M=K,B=P.length,j=O(P,B,K);K+=j>=65536?2:1;let me=ne.getGraphemeBreakType(j);for(;K<B;){const de=O(P,B,K),Ae=ne.getGraphemeBreakType(de);if(tt(me,Ae))break;K+=de>=65536?2:1,me=Ae}return K-M}function ie(P,K){const ne=Re.getInstance(),M=K,B=Q(P,K);K-=B>=65536?2:1;let j=ne.getGraphemeBreakType(B);for(;K>0;){const me=Q(P,K),de=ne.getGraphemeBreakType(me);if(tt(de,j))break;K-=me>=65536?2:1,j=de}return M-K}const V=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function v(P){return V.test(P)}const m=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function U(P){return m.test(P)}const se=/^[\t\n\r\x20-\x7E]*$/;function pe(P){return se.test(P)}const He=/[\u2028\u2029]/;function qe(P){return He.test(P)}function ot(P){for(let K=0,ne=P.length;K<ne;K++)if(Ot(P.charCodeAt(K)))return!0;return!1}function Ot(P){return P=+P,P>=11904&&P<=55215||P>=63744&&P<=64255||P>=65281&&P<=65374}function bt(P){return P>=127462&&P<=127487||P===8986||P===8987||P===9200||P===9203||P>=9728&&P<=10175||P===11088||P===11093||P>=127744&&P<=128591||P>=128640&&P<=128764||P>=128992&&P<=129003||P>=129280&&P<=129535||P>=129648&&P<=129750}const xe="\uFEFF";function _t(P){return!!(P&&P.length>0&&P.charCodeAt(0)===65279)}function Qt(P,K=!1){return P?(K&&(P=P.replace(/\\./g,"")),P.toLowerCase()!==P):!1}function Lt(P){return P=P%(2*26),P<26?String.fromCharCode(97+P):String.fromCharCode(65+P-26)}function qt(P){return Re.getInstance().getGraphemeBreakType(P)}function tt(P,K){return P===0?K!==5&&K!==7:P===2&&K===3?!1:P===4||P===2||P===3||K===4||K===2||K===3?!0:!(P===8&&(K===8||K===9||K===11||K===12)||(P===11||P===9)&&(K===9||K===10)||(P===12||P===10)&&K===10||K===5||K===13||K===7||P===1||P===13&&K===14||P===6&&K===6)}class Re{constructor(){this._data=ye()}static getInstance(){return Re._INSTANCE||(Re._INSTANCE=new Re),Re._INSTANCE}getGraphemeBreakType(K){if(K<32)return K===10?3:K===13?2:4;if(K<127)return 0;const ne=this._data,M=ne.length/3;let B=1;for(;B<=M;)if(K<ne[3*B])B=2*B;else if(K>ne[3*B+1])B=2*B+1;else return ne[3*B+2];return 0}}Re._INSTANCE=null;function ye(){return JSON.parse("[0,0,0,51592,51592,11,44424,44424,11,72251,72254,5,7150,7150,7,48008,48008,11,55176,55176,11,128420,128420,14,3276,3277,5,9979,9980,14,46216,46216,11,49800,49800,11,53384,53384,11,70726,70726,5,122915,122916,5,129320,129327,14,2558,2558,5,5906,5908,5,9762,9763,14,43360,43388,8,45320,45320,11,47112,47112,11,48904,48904,11,50696,50696,11,52488,52488,11,54280,54280,11,70082,70083,1,71350,71350,7,73111,73111,5,127892,127893,14,128726,128727,14,129473,129474,14,2027,2035,5,2901,2902,5,3784,3789,5,6754,6754,5,8418,8420,5,9877,9877,14,11088,11088,14,44008,44008,5,44872,44872,11,45768,45768,11,46664,46664,11,47560,47560,11,48456,48456,11,49352,49352,11,50248,50248,11,51144,51144,11,52040,52040,11,52936,52936,11,53832,53832,11,54728,54728,11,69811,69814,5,70459,70460,5,71096,71099,7,71998,71998,5,72874,72880,5,119149,119149,7,127374,127374,14,128335,128335,14,128482,128482,14,128765,128767,14,129399,129400,14,129680,129685,14,1476,1477,5,2377,2380,7,2759,2760,5,3137,3140,7,3458,3459,7,4153,4154,5,6432,6434,5,6978,6978,5,7675,7679,5,9723,9726,14,9823,9823,14,9919,9923,14,10035,10036,14,42736,42737,5,43596,43596,5,44200,44200,11,44648,44648,11,45096,45096,11,45544,45544,11,45992,45992,11,46440,46440,11,46888,46888,11,47336,47336,11,47784,47784,11,48232,48232,11,48680,48680,11,49128,49128,11,49576,49576,11,50024,50024,11,50472,50472,11,50920,50920,11,51368,51368,11,51816,51816,11,52264,52264,11,52712,52712,11,53160,53160,11,53608,53608,11,54056,54056,11,54504,54504,11,54952,54952,11,68108,68111,5,69933,69940,5,70197,70197,7,70498,70499,7,70845,70845,5,71229,71229,5,71727,71735,5,72154,72155,5,72344,72345,5,73023,73029,5,94095,94098,5,121403,121452,5,126981,127182,14,127538,127546,14,127990,127990,14,128391,128391,14,128445,128449,14,128500,128505,14,128752,128752,14,129160,129167,14,129356,129356,14,129432,129442,14,129648,129651,14,129751,131069,14,173,173,4,1757,1757,1,2274,2274,1,2494,2494,5,2641,2641,5,2876,2876,5,3014,3016,7,3262,3262,7,3393,3396,5,3570,3571,7,3968,3972,5,4228,4228,7,6086,6086,5,6679,6680,5,6912,6915,5,7080,7081,5,7380,7392,5,8252,8252,14,9096,9096,14,9748,9749,14,9784,9786,14,9833,9850,14,9890,9894,14,9938,9938,14,9999,9999,14,10085,10087,14,12349,12349,14,43136,43137,7,43454,43456,7,43755,43755,7,44088,44088,11,44312,44312,11,44536,44536,11,44760,44760,11,44984,44984,11,45208,45208,11,45432,45432,11,45656,45656,11,45880,45880,11,46104,46104,11,46328,46328,11,46552,46552,11,46776,46776,11,47000,47000,11,47224,47224,11,47448,47448,11,47672,47672,11,47896,47896,11,48120,48120,11,48344,48344,11,48568,48568,11,48792,48792,11,49016,49016,11,49240,49240,11,49464,49464,11,49688,49688,11,49912,49912,11,50136,50136,11,50360,50360,11,50584,50584,11,50808,50808,11,51032,51032,11,51256,51256,11,51480,51480,11,51704,51704,11,51928,51928,11,52152,52152,11,52376,52376,11,52600,52600,11,52824,52824,11,53048,53048,11,53272,53272,11,53496,53496,11,53720,53720,11,53944,53944,11,54168,54168,11,54392,54392,11,54616,54616,11,54840,54840,11,55064,55064,11,65438,65439,5,69633,69633,5,69837,69837,1,70018,70018,7,70188,70190,7,70368,70370,7,70465,70468,7,70712,70719,5,70835,70840,5,70850,70851,5,71132,71133,5,71340,71340,7,71458,71461,5,71985,71989,7,72002,72002,7,72193,72202,5,72281,72283,5,72766,72766,7,72885,72886,5,73104,73105,5,92912,92916,5,113824,113827,4,119173,119179,5,121505,121519,5,125136,125142,5,127279,127279,14,127489,127490,14,127570,127743,14,127900,127901,14,128254,128254,14,128369,128370,14,128400,128400,14,128425,128432,14,128468,128475,14,128489,128494,14,128715,128720,14,128745,128745,14,128759,128760,14,129004,129023,14,129296,129304,14,129340,129342,14,129388,129392,14,129404,129407,14,129454,129455,14,129485,129487,14,129659,129663,14,129719,129727,14,917536,917631,5,13,13,2,1160,1161,5,1564,1564,4,1807,1807,1,2085,2087,5,2363,2363,7,2402,2403,5,2507,2508,7,2622,2624,7,2691,2691,7,2786,2787,5,2881,2884,5,3006,3006,5,3072,3072,5,3170,3171,5,3267,3268,7,3330,3331,7,3406,3406,1,3538,3540,5,3655,3662,5,3897,3897,5,4038,4038,5,4184,4185,5,4352,4447,8,6068,6069,5,6155,6157,5,6448,6449,7,6742,6742,5,6783,6783,5,6966,6970,5,7042,7042,7,7143,7143,7,7212,7219,5,7412,7412,5,8206,8207,4,8294,8303,4,8596,8601,14,9410,9410,14,9742,9742,14,9757,9757,14,9770,9770,14,9794,9794,14,9828,9828,14,9855,9855,14,9882,9882,14,9900,9903,14,9929,9933,14,9963,9967,14,9987,9988,14,10006,10006,14,10062,10062,14,10175,10175,14,11744,11775,5,42607,42607,5,43043,43044,7,43263,43263,5,43444,43445,7,43569,43570,5,43698,43700,5,43766,43766,5,44032,44032,11,44144,44144,11,44256,44256,11,44368,44368,11,44480,44480,11,44592,44592,11,44704,44704,11,44816,44816,11,44928,44928,11,45040,45040,11,45152,45152,11,45264,45264,11,45376,45376,11,45488,45488,11,45600,45600,11,45712,45712,11,45824,45824,11,45936,45936,11,46048,46048,11,46160,46160,11,46272,46272,11,46384,46384,11,46496,46496,11,46608,46608,11,46720,46720,11,46832,46832,11,46944,46944,11,47056,47056,11,47168,47168,11,47280,47280,11,47392,47392,11,47504,47504,11,47616,47616,11,47728,47728,11,47840,47840,11,47952,47952,11,48064,48064,11,48176,48176,11,48288,48288,11,48400,48400,11,48512,48512,11,48624,48624,11,48736,48736,11,48848,48848,11,48960,48960,11,49072,49072,11,49184,49184,11,49296,49296,11,49408,49408,11,49520,49520,11,49632,49632,11,49744,49744,11,49856,49856,11,49968,49968,11,50080,50080,11,50192,50192,11,50304,50304,11,50416,50416,11,50528,50528,11,50640,50640,11,50752,50752,11,50864,50864,11,50976,50976,11,51088,51088,11,51200,51200,11,51312,51312,11,51424,51424,11,51536,51536,11,51648,51648,11,51760,51760,11,51872,51872,11,51984,51984,11,52096,52096,11,52208,52208,11,52320,52320,11,52432,52432,11,52544,52544,11,52656,52656,11,52768,52768,11,52880,52880,11,52992,52992,11,53104,53104,11,53216,53216,11,53328,53328,11,53440,53440,11,53552,53552,11,53664,53664,11,53776,53776,11,53888,53888,11,54000,54000,11,54112,54112,11,54224,54224,11,54336,54336,11,54448,54448,11,54560,54560,11,54672,54672,11,54784,54784,11,54896,54896,11,55008,55008,11,55120,55120,11,64286,64286,5,66272,66272,5,68900,68903,5,69762,69762,7,69817,69818,5,69927,69931,5,70003,70003,5,70070,70078,5,70094,70094,7,70194,70195,7,70206,70206,5,70400,70401,5,70463,70463,7,70475,70477,7,70512,70516,5,70722,70724,5,70832,70832,5,70842,70842,5,70847,70848,5,71088,71089,7,71102,71102,7,71219,71226,5,71231,71232,5,71342,71343,7,71453,71455,5,71463,71467,5,71737,71738,5,71995,71996,5,72000,72000,7,72145,72147,7,72160,72160,5,72249,72249,7,72273,72278,5,72330,72342,5,72752,72758,5,72850,72871,5,72882,72883,5,73018,73018,5,73031,73031,5,73109,73109,5,73461,73462,7,94031,94031,5,94192,94193,7,119142,119142,7,119155,119162,4,119362,119364,5,121476,121476,5,122888,122904,5,123184,123190,5,126976,126979,14,127184,127231,14,127344,127345,14,127405,127461,14,127514,127514,14,127561,127567,14,127778,127779,14,127896,127896,14,127985,127986,14,127995,127999,5,128326,128328,14,128360,128366,14,128378,128378,14,128394,128397,14,128405,128406,14,128422,128423,14,128435,128443,14,128453,128464,14,128479,128480,14,128484,128487,14,128496,128498,14,128640,128709,14,128723,128724,14,128736,128741,14,128747,128748,14,128755,128755,14,128762,128762,14,128981,128991,14,129096,129103,14,129292,129292,14,129311,129311,14,129329,129330,14,129344,129349,14,129360,129374,14,129394,129394,14,129402,129402,14,129413,129425,14,129445,129450,14,129466,129471,14,129483,129483,14,129511,129535,14,129653,129655,14,129667,129670,14,129705,129711,14,129731,129743,14,917505,917505,4,917760,917999,5,10,10,3,127,159,4,768,879,5,1471,1471,5,1536,1541,1,1648,1648,5,1767,1768,5,1840,1866,5,2070,2073,5,2137,2139,5,2307,2307,7,2366,2368,7,2382,2383,7,2434,2435,7,2497,2500,5,2519,2519,5,2563,2563,7,2631,2632,5,2677,2677,5,2750,2752,7,2763,2764,7,2817,2817,5,2879,2879,5,2891,2892,7,2914,2915,5,3008,3008,5,3021,3021,5,3076,3076,5,3146,3149,5,3202,3203,7,3264,3265,7,3271,3272,7,3298,3299,5,3390,3390,5,3402,3404,7,3426,3427,5,3535,3535,5,3544,3550,7,3635,3635,7,3763,3763,7,3893,3893,5,3953,3966,5,3981,3991,5,4145,4145,7,4157,4158,5,4209,4212,5,4237,4237,5,4520,4607,10,5970,5971,5,6071,6077,5,6089,6099,5,6277,6278,5,6439,6440,5,6451,6456,7,6683,6683,5,6744,6750,5,6765,6770,7,6846,6846,5,6964,6964,5,6972,6972,5,7019,7027,5,7074,7077,5,7083,7085,5,7146,7148,7,7154,7155,7,7222,7223,5,7394,7400,5,7416,7417,5,8204,8204,5,8233,8233,4,8288,8292,4,8413,8416,5,8482,8482,14,8986,8987,14,9193,9203,14,9654,9654,14,9733,9733,14,9745,9745,14,9752,9752,14,9760,9760,14,9766,9766,14,9774,9775,14,9792,9792,14,9800,9811,14,9825,9826,14,9831,9831,14,9852,9853,14,9872,9873,14,9880,9880,14,9885,9887,14,9896,9897,14,9906,9916,14,9926,9927,14,9936,9936,14,9941,9960,14,9974,9974,14,9982,9985,14,9992,9997,14,10002,10002,14,10017,10017,14,10055,10055,14,10071,10071,14,10145,10145,14,11013,11015,14,11503,11505,5,12334,12335,5,12951,12951,14,42612,42621,5,43014,43014,5,43047,43047,7,43204,43205,5,43335,43345,5,43395,43395,7,43450,43451,7,43561,43566,5,43573,43574,5,43644,43644,5,43710,43711,5,43758,43759,7,44005,44005,5,44012,44012,7,44060,44060,11,44116,44116,11,44172,44172,11,44228,44228,11,44284,44284,11,44340,44340,11,44396,44396,11,44452,44452,11,44508,44508,11,44564,44564,11,44620,44620,11,44676,44676,11,44732,44732,11,44788,44788,11,44844,44844,11,44900,44900,11,44956,44956,11,45012,45012,11,45068,45068,11,45124,45124,11,45180,45180,11,45236,45236,11,45292,45292,11,45348,45348,11,45404,45404,11,45460,45460,11,45516,45516,11,45572,45572,11,45628,45628,11,45684,45684,11,45740,45740,11,45796,45796,11,45852,45852,11,45908,45908,11,45964,45964,11,46020,46020,11,46076,46076,11,46132,46132,11,46188,46188,11,46244,46244,11,46300,46300,11,46356,46356,11,46412,46412,11,46468,46468,11,46524,46524,11,46580,46580,11,46636,46636,11,46692,46692,11,46748,46748,11,46804,46804,11,46860,46860,11,46916,46916,11,46972,46972,11,47028,47028,11,47084,47084,11,47140,47140,11,47196,47196,11,47252,47252,11,47308,47308,11,47364,47364,11,47420,47420,11,47476,47476,11,47532,47532,11,47588,47588,11,47644,47644,11,47700,47700,11,47756,47756,11,47812,47812,11,47868,47868,11,47924,47924,11,47980,47980,11,48036,48036,11,48092,48092,11,48148,48148,11,48204,48204,11,48260,48260,11,48316,48316,11,48372,48372,11,48428,48428,11,48484,48484,11,48540,48540,11,48596,48596,11,48652,48652,11,48708,48708,11,48764,48764,11,48820,48820,11,48876,48876,11,48932,48932,11,48988,48988,11,49044,49044,11,49100,49100,11,49156,49156,11,49212,49212,11,49268,49268,11,49324,49324,11,49380,49380,11,49436,49436,11,49492,49492,11,49548,49548,11,49604,49604,11,49660,49660,11,49716,49716,11,49772,49772,11,49828,49828,11,49884,49884,11,49940,49940,11,49996,49996,11,50052,50052,11,50108,50108,11,50164,50164,11,50220,50220,11,50276,50276,11,50332,50332,11,50388,50388,11,50444,50444,11,50500,50500,11,50556,50556,11,50612,50612,11,50668,50668,11,50724,50724,11,50780,50780,11,50836,50836,11,50892,50892,11,50948,50948,11,51004,51004,11,51060,51060,11,51116,51116,11,51172,51172,11,51228,51228,11,51284,51284,11,51340,51340,11,51396,51396,11,51452,51452,11,51508,51508,11,51564,51564,11,51620,51620,11,51676,51676,11,51732,51732,11,51788,51788,11,51844,51844,11,51900,51900,11,51956,51956,11,52012,52012,11,52068,52068,11,52124,52124,11,52180,52180,11,52236,52236,11,52292,52292,11,52348,52348,11,52404,52404,11,52460,52460,11,52516,52516,11,52572,52572,11,52628,52628,11,52684,52684,11,52740,52740,11,52796,52796,11,52852,52852,11,52908,52908,11,52964,52964,11,53020,53020,11,53076,53076,11,53132,53132,11,53188,53188,11,53244,53244,11,53300,53300,11,53356,53356,11,53412,53412,11,53468,53468,11,53524,53524,11,53580,53580,11,53636,53636,11,53692,53692,11,53748,53748,11,53804,53804,11,53860,53860,11,53916,53916,11,53972,53972,11,54028,54028,11,54084,54084,11,54140,54140,11,54196,54196,11,54252,54252,11,54308,54308,11,54364,54364,11,54420,54420,11,54476,54476,11,54532,54532,11,54588,54588,11,54644,54644,11,54700,54700,11,54756,54756,11,54812,54812,11,54868,54868,11,54924,54924,11,54980,54980,11,55036,55036,11,55092,55092,11,55148,55148,11,55216,55238,9,65056,65071,5,65529,65531,4,68097,68099,5,68159,68159,5,69446,69456,5,69688,69702,5,69808,69810,7,69815,69816,7,69821,69821,1,69888,69890,5,69932,69932,7,69957,69958,7,70016,70017,5,70067,70069,7,70079,70080,7,70089,70092,5,70095,70095,5,70191,70193,5,70196,70196,5,70198,70199,5,70367,70367,5,70371,70378,5,70402,70403,7,70462,70462,5,70464,70464,5,70471,70472,7,70487,70487,5,70502,70508,5,70709,70711,7,70720,70721,7,70725,70725,7,70750,70750,5,70833,70834,7,70841,70841,7,70843,70844,7,70846,70846,7,70849,70849,7,71087,71087,5,71090,71093,5,71100,71101,5,71103,71104,5,71216,71218,7,71227,71228,7,71230,71230,7,71339,71339,5,71341,71341,5,71344,71349,5,71351,71351,5,71456,71457,7,71462,71462,7,71724,71726,7,71736,71736,7,71984,71984,5,71991,71992,7,71997,71997,7,71999,71999,1,72001,72001,1,72003,72003,5,72148,72151,5,72156,72159,7,72164,72164,7,72243,72248,5,72250,72250,1,72263,72263,5,72279,72280,7,72324,72329,1,72343,72343,7,72751,72751,7,72760,72765,5,72767,72767,5,72873,72873,7,72881,72881,7,72884,72884,7,73009,73014,5,73020,73021,5,73030,73030,1,73098,73102,7,73107,73108,7,73110,73110,7,73459,73460,5,78896,78904,4,92976,92982,5,94033,94087,7,94180,94180,5,113821,113822,5,119141,119141,5,119143,119145,5,119150,119154,5,119163,119170,5,119210,119213,5,121344,121398,5,121461,121461,5,121499,121503,5,122880,122886,5,122907,122913,5,122918,122922,5,123628,123631,5,125252,125258,5,126980,126980,14,127183,127183,14,127245,127247,14,127340,127343,14,127358,127359,14,127377,127386,14,127462,127487,6,127491,127503,14,127535,127535,14,127548,127551,14,127568,127569,14,127744,127777,14,127780,127891,14,127894,127895,14,127897,127899,14,127902,127984,14,127987,127989,14,127991,127994,14,128000,128253,14,128255,128317,14,128329,128334,14,128336,128359,14,128367,128368,14,128371,128377,14,128379,128390,14,128392,128393,14,128398,128399,14,128401,128404,14,128407,128419,14,128421,128421,14,128424,128424,14,128433,128434,14,128444,128444,14,128450,128452,14,128465,128467,14,128476,128478,14,128481,128481,14,128483,128483,14,128488,128488,14,128495,128495,14,128499,128499,14,128506,128591,14,128710,128714,14,128721,128722,14,128725,128725,14,128728,128735,14,128742,128744,14,128746,128746,14,128749,128751,14,128753,128754,14,128756,128758,14,128761,128761,14,128763,128764,14,128884,128895,14,128992,129003,14,129036,129039,14,129114,129119,14,129198,129279,14,129293,129295,14,129305,129310,14,129312,129319,14,129328,129328,14,129331,129338,14,129343,129343,14,129351,129355,14,129357,129359,14,129375,129387,14,129393,129393,14,129395,129398,14,129401,129401,14,129403,129403,14,129408,129412,14,129426,129431,14,129443,129444,14,129451,129453,14,129456,129465,14,129472,129472,14,129475,129482,14,129484,129484,14,129488,129510,14,129536,129647,14,129652,129652,14,129656,129658,14,129664,129666,14,129671,129679,14,129686,129704,14,129712,129718,14,129728,129730,14,129744,129750,14,917504,917504,4,917506,917535,4,917632,917759,4,918000,921599,4,0,9,4,11,12,4,14,31,4,169,169,14,174,174,14,1155,1159,5,1425,1469,5,1473,1474,5,1479,1479,5,1552,1562,5,1611,1631,5,1750,1756,5,1759,1764,5,1770,1773,5,1809,1809,5,1958,1968,5,2045,2045,5,2075,2083,5,2089,2093,5,2259,2273,5,2275,2306,5,2362,2362,5,2364,2364,5,2369,2376,5,2381,2381,5,2385,2391,5,2433,2433,5,2492,2492,5,2495,2496,7,2503,2504,7,2509,2509,5,2530,2531,5,2561,2562,5,2620,2620,5,2625,2626,5,2635,2637,5,2672,2673,5,2689,2690,5,2748,2748,5,2753,2757,5,2761,2761,7,2765,2765,5,2810,2815,5,2818,2819,7,2878,2878,5,2880,2880,7,2887,2888,7,2893,2893,5,2903,2903,5,2946,2946,5,3007,3007,7,3009,3010,7,3018,3020,7,3031,3031,5,3073,3075,7,3134,3136,5,3142,3144,5,3157,3158,5,3201,3201,5,3260,3260,5,3263,3263,5,3266,3266,5,3270,3270,5,3274,3275,7,3285,3286,5,3328,3329,5,3387,3388,5,3391,3392,7,3398,3400,7,3405,3405,5,3415,3415,5,3457,3457,5,3530,3530,5,3536,3537,7,3542,3542,5,3551,3551,5,3633,3633,5,3636,3642,5,3761,3761,5,3764,3772,5,3864,3865,5,3895,3895,5,3902,3903,7,3967,3967,7,3974,3975,5,3993,4028,5,4141,4144,5,4146,4151,5,4155,4156,7,4182,4183,7,4190,4192,5,4226,4226,5,4229,4230,5,4253,4253,5,4448,4519,9,4957,4959,5,5938,5940,5,6002,6003,5,6070,6070,7,6078,6085,7,6087,6088,7,6109,6109,5,6158,6158,4,6313,6313,5,6435,6438,7,6441,6443,7,6450,6450,5,6457,6459,5,6681,6682,7,6741,6741,7,6743,6743,7,6752,6752,5,6757,6764,5,6771,6780,5,6832,6845,5,6847,6848,5,6916,6916,7,6965,6965,5,6971,6971,7,6973,6977,7,6979,6980,7,7040,7041,5,7073,7073,7,7078,7079,7,7082,7082,7,7142,7142,5,7144,7145,5,7149,7149,5,7151,7153,5,7204,7211,7,7220,7221,7,7376,7378,5,7393,7393,7,7405,7405,5,7415,7415,7,7616,7673,5,8203,8203,4,8205,8205,13,8232,8232,4,8234,8238,4,8265,8265,14,8293,8293,4,8400,8412,5,8417,8417,5,8421,8432,5,8505,8505,14,8617,8618,14,9000,9000,14,9167,9167,14,9208,9210,14,9642,9643,14,9664,9664,14,9728,9732,14,9735,9741,14,9743,9744,14,9746,9746,14,9750,9751,14,9753,9756,14,9758,9759,14,9761,9761,14,9764,9765,14,9767,9769,14,9771,9773,14,9776,9783,14,9787,9791,14,9793,9793,14,9795,9799,14,9812,9822,14,9824,9824,14,9827,9827,14,9829,9830,14,9832,9832,14,9851,9851,14,9854,9854,14,9856,9861,14,9874,9876,14,9878,9879,14,9881,9881,14,9883,9884,14,9888,9889,14,9895,9895,14,9898,9899,14,9904,9905,14,9917,9918,14,9924,9925,14,9928,9928,14,9934,9935,14,9937,9937,14,9939,9940,14,9961,9962,14,9968,9973,14,9975,9978,14,9981,9981,14,9986,9986,14,9989,9989,14,9998,9998,14,10000,10001,14,10004,10004,14,10013,10013,14,10024,10024,14,10052,10052,14,10060,10060,14,10067,10069,14,10083,10084,14,10133,10135,14,10160,10160,14,10548,10549,14,11035,11036,14,11093,11093,14,11647,11647,5,12330,12333,5,12336,12336,14,12441,12442,5,12953,12953,14,42608,42610,5,42654,42655,5,43010,43010,5,43019,43019,5,43045,43046,5,43052,43052,5,43188,43203,7,43232,43249,5,43302,43309,5,43346,43347,7,43392,43394,5,43443,43443,5,43446,43449,5,43452,43453,5,43493,43493,5,43567,43568,7,43571,43572,7,43587,43587,5,43597,43597,7,43696,43696,5,43703,43704,5,43713,43713,5,43756,43757,5,43765,43765,7,44003,44004,7,44006,44007,7,44009,44010,7,44013,44013,5,44033,44059,12,44061,44087,12,44089,44115,12,44117,44143,12,44145,44171,12,44173,44199,12,44201,44227,12,44229,44255,12,44257,44283,12,44285,44311,12,44313,44339,12,44341,44367,12,44369,44395,12,44397,44423,12,44425,44451,12,44453,44479,12,44481,44507,12,44509,44535,12,44537,44563,12,44565,44591,12,44593,44619,12,44621,44647,12,44649,44675,12,44677,44703,12,44705,44731,12,44733,44759,12,44761,44787,12,44789,44815,12,44817,44843,12,44845,44871,12,44873,44899,12,44901,44927,12,44929,44955,12,44957,44983,12,44985,45011,12,45013,45039,12,45041,45067,12,45069,45095,12,45097,45123,12,45125,45151,12,45153,45179,12,45181,45207,12,45209,45235,12,45237,45263,12,45265,45291,12,45293,45319,12,45321,45347,12,45349,45375,12,45377,45403,12,45405,45431,12,45433,45459,12,45461,45487,12,45489,45515,12,45517,45543,12,45545,45571,12,45573,45599,12,45601,45627,12,45629,45655,12,45657,45683,12,45685,45711,12,45713,45739,12,45741,45767,12,45769,45795,12,45797,45823,12,45825,45851,12,45853,45879,12,45881,45907,12,45909,45935,12,45937,45963,12,45965,45991,12,45993,46019,12,46021,46047,12,46049,46075,12,46077,46103,12,46105,46131,12,46133,46159,12,46161,46187,12,46189,46215,12,46217,46243,12,46245,46271,12,46273,46299,12,46301,46327,12,46329,46355,12,46357,46383,12,46385,46411,12,46413,46439,12,46441,46467,12,46469,46495,12,46497,46523,12,46525,46551,12,46553,46579,12,46581,46607,12,46609,46635,12,46637,46663,12,46665,46691,12,46693,46719,12,46721,46747,12,46749,46775,12,46777,46803,12,46805,46831,12,46833,46859,12,46861,46887,12,46889,46915,12,46917,46943,12,46945,46971,12,46973,46999,12,47001,47027,12,47029,47055,12,47057,47083,12,47085,47111,12,47113,47139,12,47141,47167,12,47169,47195,12,47197,47223,12,47225,47251,12,47253,47279,12,47281,47307,12,47309,47335,12,47337,47363,12,47365,47391,12,47393,47419,12,47421,47447,12,47449,47475,12,47477,47503,12,47505,47531,12,47533,47559,12,47561,47587,12,47589,47615,12,47617,47643,12,47645,47671,12,47673,47699,12,47701,47727,12,47729,47755,12,47757,47783,12,47785,47811,12,47813,47839,12,47841,47867,12,47869,47895,12,47897,47923,12,47925,47951,12,47953,47979,12,47981,48007,12,48009,48035,12,48037,48063,12,48065,48091,12,48093,48119,12,48121,48147,12,48149,48175,12,48177,48203,12,48205,48231,12,48233,48259,12,48261,48287,12,48289,48315,12,48317,48343,12,48345,48371,12,48373,48399,12,48401,48427,12,48429,48455,12,48457,48483,12,48485,48511,12,48513,48539,12,48541,48567,12,48569,48595,12,48597,48623,12,48625,48651,12,48653,48679,12,48681,48707,12,48709,48735,12,48737,48763,12,48765,48791,12,48793,48819,12,48821,48847,12,48849,48875,12,48877,48903,12,48905,48931,12,48933,48959,12,48961,48987,12,48989,49015,12,49017,49043,12,49045,49071,12,49073,49099,12,49101,49127,12,49129,49155,12,49157,49183,12,49185,49211,12,49213,49239,12,49241,49267,12,49269,49295,12,49297,49323,12,49325,49351,12,49353,49379,12,49381,49407,12,49409,49435,12,49437,49463,12,49465,49491,12,49493,49519,12,49521,49547,12,49549,49575,12,49577,49603,12,49605,49631,12,49633,49659,12,49661,49687,12,49689,49715,12,49717,49743,12,49745,49771,12,49773,49799,12,49801,49827,12,49829,49855,12,49857,49883,12,49885,49911,12,49913,49939,12,49941,49967,12,49969,49995,12,49997,50023,12,50025,50051,12,50053,50079,12,50081,50107,12,50109,50135,12,50137,50163,12,50165,50191,12,50193,50219,12,50221,50247,12,50249,50275,12,50277,50303,12,50305,50331,12,50333,50359,12,50361,50387,12,50389,50415,12,50417,50443,12,50445,50471,12,50473,50499,12,50501,50527,12,50529,50555,12,50557,50583,12,50585,50611,12,50613,50639,12,50641,50667,12,50669,50695,12,50697,50723,12,50725,50751,12,50753,50779,12,50781,50807,12,50809,50835,12,50837,50863,12,50865,50891,12,50893,50919,12,50921,50947,12,50949,50975,12,50977,51003,12,51005,51031,12,51033,51059,12,51061,51087,12,51089,51115,12,51117,51143,12,51145,51171,12,51173,51199,12,51201,51227,12,51229,51255,12,51257,51283,12,51285,51311,12,51313,51339,12,51341,51367,12,51369,51395,12,51397,51423,12,51425,51451,12,51453,51479,12,51481,51507,12,51509,51535,12,51537,51563,12,51565,51591,12,51593,51619,12,51621,51647,12,51649,51675,12,51677,51703,12,51705,51731,12,51733,51759,12,51761,51787,12,51789,51815,12,51817,51843,12,51845,51871,12,51873,51899,12,51901,51927,12,51929,51955,12,51957,51983,12,51985,52011,12,52013,52039,12,52041,52067,12,52069,52095,12,52097,52123,12,52125,52151,12,52153,52179,12,52181,52207,12,52209,52235,12,52237,52263,12,52265,52291,12,52293,52319,12,52321,52347,12,52349,52375,12,52377,52403,12,52405,52431,12,52433,52459,12,52461,52487,12,52489,52515,12,52517,52543,12,52545,52571,12,52573,52599,12,52601,52627,12,52629,52655,12,52657,52683,12,52685,52711,12,52713,52739,12,52741,52767,12,52769,52795,12,52797,52823,12,52825,52851,12,52853,52879,12,52881,52907,12,52909,52935,12,52937,52963,12,52965,52991,12,52993,53019,12,53021,53047,12,53049,53075,12,53077,53103,12,53105,53131,12,53133,53159,12,53161,53187,12,53189,53215,12,53217,53243,12,53245,53271,12,53273,53299,12,53301,53327,12,53329,53355,12,53357,53383,12,53385,53411,12,53413,53439,12,53441,53467,12,53469,53495,12,53497,53523,12,53525,53551,12,53553,53579,12,53581,53607,12,53609,53635,12,53637,53663,12,53665,53691,12,53693,53719,12,53721,53747,12,53749,53775,12,53777,53803,12,53805,53831,12,53833,53859,12,53861,53887,12,53889,53915,12,53917,53943,12,53945,53971,12,53973,53999,12,54001,54027,12,54029,54055,12,54057,54083,12,54085,54111,12,54113,54139,12,54141,54167,12,54169,54195,12,54197,54223,12,54225,54251,12,54253,54279,12,54281,54307,12,54309,54335,12,54337,54363,12,54365,54391,12,54393,54419,12,54421,54447,12,54449,54475,12,54477,54503,12,54505,54531,12,54533,54559,12,54561,54587,12,54589,54615,12,54617,54643,12,54645,54671,12,54673,54699,12,54701,54727,12,54729,54755,12,54757,54783,12,54785,54811,12,54813,54839,12,54841,54867,12,54869,54895,12,54897,54923,12,54925,54951,12,54953,54979,12,54981,55007,12,55009,55035,12,55037,55063,12,55065,55091,12,55093,55119,12,55121,55147,12,55149,55175,12,55177,55203,12,55243,55291,10,65024,65039,5,65279,65279,4,65520,65528,4,66045,66045,5,66422,66426,5,68101,68102,5,68152,68154,5,68325,68326,5,69291,69292,5,69632,69632,7,69634,69634,7,69759,69761,5]")}function Z(P,K){if(P===0)return 0;const ne=we(P,K);if(ne!==void 0)return ne;const M=Q(K,P);return P-=Le(M),P}function we(P,K){let ne=Q(K,P);for(P-=Le(ne);$(ne)||ne===65039||ne===8419;){if(P===0)return;ne=Q(K,P),P-=Le(ne)}if(bt(ne)){if(P>=0){const M=Q(K,P);M===8205&&(P-=Le(M))}return P}}function Le(P){return P>=65536?2:1}function $(P){return 127995<=P&&P<=127999}},72999:function(on,je,E){"use strict";E.d(je,{$E:function(){return S},$K:function(){return ue},D8:function(){return h},HD:function(){return ae},IU:function(){return L},Jp:function(){return te},Kn:function(){return ve},cW:function(){return y},f6:function(){return N},hj:function(){return fe},jn:function(){return F},kJ:function(){return x},mf:function(){return C},o8:function(){return f},p_:function(){return o},vE:function(){return H}});function x(R){return Array.isArray(R)}function ae(R){return typeof R=="string"}function ve(R){return typeof R=="object"&&R!==null&&!Array.isArray(R)&&!(R instanceof RegExp)&&!(R instanceof Date)}function fe(R){return typeof R=="number"&&!isNaN(R)}function F(R){return R===!0||R===!1}function f(R){return typeof R=="undefined"}function ue(R){return!te(R)}function te(R){return f(R)||R===null}function o(R,k){if(!R)throw new Error(k?`Unexpected type, expected '${k}'`:"Unexpected type")}function y(R){if(te(R))throw new Error("Assertion Failed: argument is undefined or null");return R}function C(R){return typeof R=="function"}function h(R,k){const T=Math.min(R.length,k.length);for(let A=0;A<T;A++)g(R[A],k[A])}function g(R,k){if(ae(k)){if(typeof R!==k)throw new Error(`argument does not match constraint: typeof ${k}`)}else if(C(k)){try{if(R instanceof k)return}catch(T){}if(!te(R)&&R.constructor===k||k.length===1&&k.call(void 0,R)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function _(R){let k=[],T=Object.getPrototypeOf(R);for(;Object.prototype!==T;)k=k.concat(Object.getOwnPropertyNames(T)),T=Object.getPrototypeOf(T);return k}function S(R){const k=[];for(const T of _(R))typeof R[T]=="function"&&k.push(T);return k}function L(R,k){const T=J=>function(){const ee=Array.prototype.slice.call(arguments,0);return k(J,ee)};let A={};for(const J of R)A[J]=T(J);return A}function N(R){return R===null?void 0:R}function H(R,k="Unreachable"){throw new Error(k)}},13268:function(on,je,E){"use strict";E.d(je,{N:function(){return ae}});function x(ve,fe){let F;return fe.length===0?F=ve:F=ve.replace(/\{(\d+)\}/g,function(f,ue){const te=ue[0];return typeof fe[te]!="undefined"?fe[te]:f}),F}function ae(ve,fe,...F){return x(fe,F)}},96236:function(on,je,E){"use strict";E.d(je,{BH:function(){return L},NZ:function(){return N},U8:function(){return H},co:function(){return S},eH:function(){return _},vr:function(){return g}});var x=E(75918),ae=E(52615),ve=E(4348),fe=E(88226),F=E(69323),f=E(34502),ue=E(35884),te=E(90689),o=E(16925),y=E(49055),C=function(R,k,T,A){var J=arguments.length,ee=J<3?k:A===null?A=Object.getOwnPropertyDescriptor(k,T):A,G;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ee=Reflect.decorate(R,k,T,A);else for(var I=R.length-1;I>=0;I--)(G=R[I])&&(ee=(J<3?G(ee):J>3?G(k,T,ee):G(k,T))||ee);return J>3&&ee&&Object.defineProperty(k,T,ee),ee},h=function(R,k){return function(T,A){k(T,A,R)}};function g(R){return R.command!==void 0}class _{constructor(k){this.id=_._idPool++,this._debugName=k}}_._idPool=0,_.CommandPalette=new _("CommandPalette"),_.EditorContext=new _("EditorContext"),_.SimpleEditorContext=new _("SimpleEditorContext"),_.EditorContextCopy=new _("EditorContextCopy"),_.EditorContextPeek=new _("EditorContextPeek"),_.MenubarEditMenu=new _("MenubarEditMenu"),_.MenubarCopy=new _("MenubarCopy"),_.MenubarGoMenu=new _("MenubarGoMenu"),_.MenubarSelectionMenu=new _("MenubarSelectionMenu"),_.InlineCompletionsActions=new _("InlineCompletionsActions");const S=(0,o.yh)("menuService"),L=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new ve.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:R=>R===_.CommandPalette}}addCommand(R){return this.addCommands(fe.$.single(R))}addCommands(R){for(const k of R)this._commands.set(k.id,k);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,F.OF)(()=>{let k=!1;for(const T of R)k=this._commands.delete(T.id)||k;k&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(R){return this._commands.get(R)}getCommands(){const R=new Map;return this._commands.forEach((k,T)=>R.set(T,k)),R}appendMenuItem(R,k){return this.appendMenuItems(fe.$.single({id:R,item:k}))}appendMenuItems(R){const k=new Set,T=new f.S;for(const{id:A,item:J}of R){let ee=this._menuItems.get(A);ee||(ee=new f.S,this._menuItems.set(A,ee)),T.push(ee.push(J)),k.add(A)}return this._onDidChangeMenu.fire(k),(0,F.OF)(()=>{if(T.size>0){for(let A of T)A();this._onDidChangeMenu.fire(k),T.clear()}})}getMenuItems(R){let k;return this._menuItems.has(R)?k=[...this._menuItems.get(R)]:k=[],R===_.CommandPalette&&this._appendImplicitItems(k),k}_appendImplicitItems(R){const k=new Set;for(const T of R)g(T)&&(k.add(T.command.id),T.alt&&k.add(T.alt.id));this._commands.forEach((T,A)=>{k.has(A)||R.push({command:T})})}};class N extends x.wY{constructor(k,T,A,J){super(`submenuitem.${k.submenu.id}`,typeof k.title=="string"?k.title:k.title.value,[],"submenu"),this.item=k,this._menuService=T,this._contextKeyService=A,this._options=J}get actions(){const k=[],T=this._menuService.createMenu(this.item.submenu,this._contextKeyService),A=T.getActions(this._options);T.dispose();for(const[,J]of A)J.length>0&&(k.push(...J),k.push(new x.Z0));return k.length&&k.pop(),k}}let H=class ml{constructor(k,T,A,J,ee){var G,I;if(this._commandService=ee,this.id=k.id,this.label=A!=null&&A.renderShortTitle&&k.shortTitle?typeof k.shortTitle=="string"?k.shortTitle:k.shortTitle.value:typeof k.title=="string"?k.title:k.title.value,this.tooltip=(I=typeof k.tooltip=="string"?k.tooltip:(G=k.tooltip)===null||G===void 0?void 0:G.value)!==null&&I!==void 0?I:"",this.enabled=!k.precondition||J.contextMatchesRules(k.precondition),this.checked=void 0,k.toggled){const re=k.toggled.condition?k.toggled:{condition:k.toggled};this.checked=J.contextMatchesRules(re.condition),this.checked&&re.tooltip&&(this.tooltip=typeof re.tooltip=="string"?re.tooltip:re.tooltip.value),re.title&&(this.label=typeof re.title=="string"?re.title:re.title.value)}this.item=k,this.alt=T?new ml(T,void 0,A,J,ee):void 0,this._options=A,y.kS.isThemeIcon(k.icon)&&(this.class=ae.dT.asClassName(k.icon))}dispose(){}run(...k){var T,A;let J=[];return!((T=this._options)===null||T===void 0)&&T.arg&&(J=[...J,this._options.arg]),!((A=this._options)===null||A===void 0)&&A.shouldForwardArgs&&(J=[...J,...k]),this._commandService.executeCommand(this.id,...J)}};H=C([h(3,te.i6),h(4,ue.H)],H)},35884:function(on,je,E){"use strict";E.d(je,{H:function(){return ue},P:function(){return te}});var x=E(4348),ae=E(88226),ve=E(69323),fe=E(34502),F=E(72999),f=E(16925);const ue=(0,f.yh)("commandService"),te=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new x.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(o,y){if(!o)throw new Error("invalid command");if(typeof o=="string"){if(!y)throw new Error("invalid command");return this.registerCommand({id:o,handler:y})}if(o.description){const S=[];for(let N of o.description.args)S.push(N.constraint);const L=o.handler;o.handler=function(N,...H){return(0,F.D8)(H,S),L(N,...H)}}const{id:C}=o;let h=this._commands.get(C);h||(h=new fe.S,this._commands.set(C,h));let g=h.unshift(o),_=(0,ve.OF)(()=>{g();const S=this._commands.get(C);S!=null&&S.isEmpty()&&this._commands.delete(C)});return this._onDidRegisterCommand.fire(C),_}registerCommandAlias(o,y){return te.registerCommand(o,(C,...h)=>C.get(ue).executeCommand(y,...h))}getCommand(o){const y=this._commands.get(o);if(!(!y||y.isEmpty()))return ae.$.first(y)}getCommands(){const o=new Map;for(const y of this._commands.keys()){const C=this.getCommand(y);C&&o.set(y,C)}return o}};te.registerCommand("noop",()=>{})},90689:function(on,je,E){"use strict";E.d(je,{Ao:function(){return ue},Eq:function(){return W},Fb:function(){return te},K8:function(){return q},i6:function(){return Te},uy:function(){return le}});var x=E(23345),ae=E(82983),ve=E(16925);let fe=x.WE||"";const F=new Map;F.set("false",!1),F.set("true",!0),F.set("isMac",x.dz),F.set("isLinux",x.IJ),F.set("isWindows",x.ED),F.set("isWeb",x.$L),F.set("isMacNative",x.dz&&!x.$L),F.set("isEdge",fe.indexOf("Edg/")>=0),F.set("isFirefox",fe.indexOf("Firefox")>=0),F.set("isChrome",fe.indexOf("Chrome")>=0),F.set("isSafari",fe.indexOf("Safari")>=0);const f=Object.prototype.hasOwnProperty;class ue{static has(v){return h.create(v)}static equals(v,m){return g.create(v,m)}static regex(v,m){return J.create(v,m)}static not(v){return N.create(v)}static and(...v){return I.create(v,null)}static or(...v){return re.create(v,null,!0)}static deserialize(v,m=!1){if(v)return this._deserializeOrExpression(v,m)}static _deserializeOrExpression(v,m){let U=v.split("||");return re.create(U.map(se=>this._deserializeAndExpression(se,m)),null,!0)}static _deserializeAndExpression(v,m){let U=v.split("&&");return I.create(U.map(se=>this._deserializeOne(se,m)),null)}static _deserializeOne(v,m){if(v=v.trim(),v.indexOf("!=")>=0){let U=v.split("!=");return L.create(U[0].trim(),this._deserializeValue(U[1],m))}if(v.indexOf("==")>=0){let U=v.split("==");return g.create(U[0].trim(),this._deserializeValue(U[1],m))}if(v.indexOf("=~")>=0){let U=v.split("=~");return J.create(U[0].trim(),this._deserializeRegexValue(U[1],m))}if(v.indexOf(" in ")>=0){let U=v.split(" in ");return _.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(v)){const U=v.split(">=");return k.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(v)){const U=v.split(">");return R.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(v)){const U=v.split("<=");return A.create(U[0].trim(),U[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(v)){const U=v.split("<");return T.create(U[0].trim(),U[1].trim())}return/^\!\s*/.test(v)?N.create(v.substr(1).trim()):h.create(v)}static _deserializeValue(v,m){if(v=v.trim(),v==="true")return!0;if(v==="false")return!1;let U=/^'([^']*)'$/.exec(v);return U?U[1].trim():v}static _deserializeRegexValue(v,m){if((0,ae.m5)(v)){if(m)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let U=v.indexOf("/"),se=v.lastIndexOf("/");if(U===se||U<0){if(m)throw new Error(`bad regexp-value '${v}', missing /-enclosure`);return console.warn(`bad regexp-value '${v}', missing /-enclosure`),null}let pe=v.slice(U+1,se),He=v[se+1]==="i"?"i":"";try{return new RegExp(pe,He)}catch(qe){if(m)throw new Error(`bad regexp-value '${v}', parse error: ${qe}`);return console.warn(`bad regexp-value '${v}', parse error: ${qe}`),null}}}function te(V,v){const m=V?V.substituteConstants():void 0,U=v?v.substituteConstants():void 0;return!m&&!U?!0:!m||!U?!1:m.equals(U)}function o(V,v){return V.cmp(v)}class y{constructor(){this.type=0}cmp(v){return this.type-v.type}equals(v){return v.type===this.type}substituteConstants(){return this}evaluate(v){return!1}serialize(){return"false"}keys(){return[]}negate(){return C.INSTANCE}}y.INSTANCE=new y;class C{constructor(){this.type=1}cmp(v){return this.type-v.type}equals(v){return v.type===this.type}substituteConstants(){return this}evaluate(v){return!0}serialize(){return"true"}keys(){return[]}negate(){return y.INSTANCE}}C.INSTANCE=new C;class h{constructor(v,m){this.key=v,this.negated=m,this.type=2}static create(v,m=null){const U=F.get(v);return typeof U=="boolean"?U?C.INSTANCE:y.INSTANCE:new h(v,m)}cmp(v){return v.type!==this.type?this.type-v.type:O(this.key,v.key)}equals(v){return v.type===this.type?this.key===v.key:!1}substituteConstants(){const v=F.get(this.key);return typeof v=="boolean"?v?C.INSTANCE:y.INSTANCE:this}evaluate(v){return!!v.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=N.create(this.key,this)),this.negated}}class g{constructor(v,m,U){this.key=v,this.value=m,this.negated=U,this.type=4}static create(v,m,U=null){if(typeof m=="boolean")return m?h.create(v,U):N.create(v,U);const se=F.get(v);return typeof se=="boolean"?m===(se?"true":"false")?C.INSTANCE:y.INSTANCE:new g(v,m,U)}cmp(v){return v.type!==this.type?this.type-v.type:Q(this.key,this.value,v.key,v.value)}equals(v){return v.type===this.type?this.key===v.key&&this.value===v.value:!1}substituteConstants(){const v=F.get(this.key);if(typeof v=="boolean"){const m=v?"true":"false";return this.value===m?C.INSTANCE:y.INSTANCE}return this}evaluate(v){return v.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=L.create(this.key,this.value,this)),this.negated}}class _{constructor(v,m){this.key=v,this.valueKey=m,this.type=10,this.negated=null}static create(v,m){return new _(v,m)}cmp(v){return v.type!==this.type?this.type-v.type:Q(this.key,this.valueKey,v.key,v.valueKey)}equals(v){return v.type===this.type?this.key===v.key&&this.valueKey===v.valueKey:!1}substituteConstants(){return this}evaluate(v){const m=v.getValue(this.valueKey),U=v.getValue(this.key);return Array.isArray(m)?m.indexOf(U)>=0:typeof U=="string"&&typeof m=="object"&&m!==null?f.call(m,U):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=S.create(this)),this.negated}}class S{constructor(v){this._actual=v,this.type=11}static create(v){return new S(v)}cmp(v){return v.type!==this.type?this.type-v.type:this._actual.cmp(v._actual)}equals(v){return v.type===this.type?this._actual.equals(v._actual):!1}substituteConstants(){return this}evaluate(v){return!this._actual.evaluate(v)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class L{constructor(v,m,U){this.key=v,this.value=m,this.negated=U,this.type=5}static create(v,m,U=null){if(typeof m=="boolean")return m?N.create(v,U):h.create(v,U);const se=F.get(v);return typeof se=="boolean"?m===(se?"true":"false")?y.INSTANCE:C.INSTANCE:new L(v,m,U)}cmp(v){return v.type!==this.type?this.type-v.type:Q(this.key,this.value,v.key,v.value)}equals(v){return v.type===this.type?this.key===v.key&&this.value===v.value:!1}substituteConstants(){const v=F.get(this.key);if(typeof v=="boolean"){const m=v?"true":"false";return this.value===m?y.INSTANCE:C.INSTANCE}return this}evaluate(v){return v.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=g.create(this.key,this.value,this)),this.negated}}class N{constructor(v,m){this.key=v,this.negated=m,this.type=3}static create(v,m=null){const U=F.get(v);return typeof U=="boolean"?U?y.INSTANCE:C.INSTANCE:new N(v,m)}cmp(v){return v.type!==this.type?this.type-v.type:O(this.key,v.key)}equals(v){return v.type===this.type?this.key===v.key:!1}substituteConstants(){const v=F.get(this.key);return typeof v=="boolean"?v?y.INSTANCE:C.INSTANCE:this}evaluate(v){return!v.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=h.create(this.key,this)),this.negated}}function H(V,v){if(typeof V=="string"){const m=parseFloat(V);isNaN(m)||(V=m)}return typeof V=="string"||typeof V=="number"?v(V):y.INSTANCE}class R{constructor(v,m,U){this.key=v,this.value=m,this.negated=U,this.type=12}static create(v,m,U=null){return H(m,se=>new R(v,se,U))}cmp(v){return v.type!==this.type?this.type-v.type:Q(this.key,this.value,v.key,v.value)}equals(v){return v.type===this.type?this.key===v.key&&this.value===v.value:!1}substituteConstants(){return this}evaluate(v){return typeof this.value=="string"?!1:parseFloat(v.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=A.create(this.key,this.value,this)),this.negated}}class k{constructor(v,m,U){this.key=v,this.value=m,this.negated=U,this.type=13}static create(v,m,U=null){return H(m,se=>new k(v,se,U))}cmp(v){return v.type!==this.type?this.type-v.type:Q(this.key,this.value,v.key,v.value)}equals(v){return v.type===this.type?this.key===v.key&&this.value===v.value:!1}substituteConstants(){return this}evaluate(v){return typeof this.value=="string"?!1:parseFloat(v.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=T.create(this.key,this.value,this)),this.negated}}class T{constructor(v,m,U){this.key=v,this.value=m,this.negated=U,this.type=14}static create(v,m,U=null){return H(m,se=>new T(v,se,U))}cmp(v){return v.type!==this.type?this.type-v.type:Q(this.key,this.value,v.key,v.value)}equals(v){return v.type===this.type?this.key===v.key&&this.value===v.value:!1}substituteConstants(){return this}evaluate(v){return typeof this.value=="string"?!1:parseFloat(v.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=k.create(this.key,this.value,this)),this.negated}}class A{constructor(v,m,U){this.key=v,this.value=m,this.negated=U,this.type=15}static create(v,m,U=null){return H(m,se=>new A(v,se,U))}cmp(v){return v.type!==this.type?this.type-v.type:Q(this.key,this.value,v.key,v.value)}equals(v){return v.type===this.type?this.key===v.key&&this.value===v.value:!1}substituteConstants(){return this}evaluate(v){return typeof this.value=="string"?!1:parseFloat(v.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=R.create(this.key,this.value,this)),this.negated}}class J{constructor(v,m){this.key=v,this.regexp=m,this.type=7,this.negated=null}static create(v,m){return new J(v,m)}cmp(v){if(v.type!==this.type)return this.type-v.type;if(this.key<v.key)return-1;if(this.key>v.key)return 1;const m=this.regexp?this.regexp.source:"",U=v.regexp?v.regexp.source:"";return m<U?-1:m>U?1:0}equals(v){if(v.type===this.type){const m=this.regexp?this.regexp.source:"",U=v.regexp?v.regexp.source:"";return this.key===v.key&&m===U}return!1}substituteConstants(){return this}evaluate(v){let m=v.getValue(this.key);return this.regexp?this.regexp.test(m):!1}serialize(){const v=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${v}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=ee.create(this)),this.negated}}class ee{constructor(v){this._actual=v,this.type=8}static create(v){return new ee(v)}cmp(v){return v.type!==this.type?this.type-v.type:this._actual.cmp(v._actual)}equals(v){return v.type===this.type?this._actual.equals(v._actual):!1}substituteConstants(){return this}evaluate(v){return!this._actual.evaluate(v)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function G(V){let v=null;for(let m=0,U=V.length;m<U;m++){const se=V[m].substituteConstants();if(V[m]!==se&&v===null){v=[];for(let pe=0;pe<m;pe++)v[pe]=V[pe]}v!==null&&(v[m]=se)}return v===null?V:v}class I{constructor(v,m){this.expr=v,this.negated=m,this.type=6}static create(v,m){return I._normalizeArr(v,m)}cmp(v){if(v.type!==this.type)return this.type-v.type;if(this.expr.length<v.expr.length)return-1;if(this.expr.length>v.expr.length)return 1;for(let m=0,U=this.expr.length;m<U;m++){const se=o(this.expr[m],v.expr[m]);if(se!==0)return se}return 0}equals(v){if(v.type===this.type){if(this.expr.length!==v.expr.length)return!1;for(let m=0,U=this.expr.length;m<U;m++)if(!this.expr[m].equals(v.expr[m]))return!1;return!0}return!1}substituteConstants(){const v=G(this.expr);return v===this.expr?this:I.create(v,this.negated)}evaluate(v){for(let m=0,U=this.expr.length;m<U;m++)if(!this.expr[m].evaluate(v))return!1;return!0}static _normalizeArr(v,m){const U=[];let se=!1;for(const pe of v)if(pe){if(pe.type===1){se=!0;continue}if(pe.type===0)return y.INSTANCE;if(pe.type===6){U.push(...pe.expr);continue}U.push(pe)}if(U.length===0&&se)return C.INSTANCE;if(U.length!==0){if(U.length===1)return U[0];U.sort(o);for(let pe=1;pe<U.length;pe++)U[pe-1].equals(U[pe])&&(U.splice(pe,1),pe--);if(U.length===1)return U[0];for(;U.length>1;){const pe=U[U.length-1];if(pe.type!==9)break;U.pop();const He=U.pop(),qe=U.length===0,ot=re.create(pe.expr.map(Ot=>I.create([Ot,He],null)),null,qe);ot&&(U.push(ot),U.sort(o))}return U.length===1?U[0]:new I(U,m)}}serialize(){return this.expr.map(v=>v.serialize()).join(" && ")}keys(){const v=[];for(let m of this.expr)v.push(...m.keys());return v}negate(){if(!this.negated){const v=[];for(let m of this.expr)v.push(m.negate());this.negated=re.create(v,this,!0)}return this.negated}}class re{constructor(v,m){this.expr=v,this.negated=m,this.type=9}static create(v,m,U){return re._normalizeArr(v,m,U)}cmp(v){if(v.type!==this.type)return this.type-v.type;if(this.expr.length<v.expr.length)return-1;if(this.expr.length>v.expr.length)return 1;for(let m=0,U=this.expr.length;m<U;m++){const se=o(this.expr[m],v.expr[m]);if(se!==0)return se}return 0}equals(v){if(v.type===this.type){if(this.expr.length!==v.expr.length)return!1;for(let m=0,U=this.expr.length;m<U;m++)if(!this.expr[m].equals(v.expr[m]))return!1;return!0}return!1}substituteConstants(){const v=G(this.expr);return v===this.expr?this:re.create(v,this.negated,!1)}evaluate(v){for(let m=0,U=this.expr.length;m<U;m++)if(this.expr[m].evaluate(v))return!0;return!1}static _normalizeArr(v,m,U){let se=[],pe=!1;if(v){for(let He=0,qe=v.length;He<qe;He++){const ot=v[He];if(ot){if(ot.type===0){pe=!0;continue}if(ot.type===1)return C.INSTANCE;if(ot.type===9){se=se.concat(ot.expr);continue}se.push(ot)}}if(se.length===0&&pe)return y.INSTANCE;se.sort(o)}if(se.length!==0){if(se.length===1)return se[0];for(let He=1;He<se.length;He++)se[He-1].equals(se[He])&&(se.splice(He,1),He--);if(se.length===1)return se[0];if(U){for(let He=0;He<se.length;He++)for(let qe=He+1;qe<se.length;qe++)q(se[He],se[qe])&&(se.splice(qe,1),qe--);if(se.length===1)return se[0]}return new re(se,m)}}serialize(){return this.expr.map(v=>v.serialize()).join(" || ")}keys(){const v=[];for(let m of this.expr)v.push(...m.keys());return v}negate(){if(!this.negated){let v=[];for(let m of this.expr)v.push(m.negate());for(;v.length>1;){const m=v.shift(),U=v.shift(),se=[];for(const He of ie(m))for(const qe of ie(U))se.push(I.create([He,qe],null));const pe=v.length===0;v.unshift(re.create(se,null,pe))}this.negated=v[0]}return this.negated}}class le extends h{constructor(v,m,U){super(v,null),this._defaultValue=m,typeof U=="object"?le._info.push(Object.assign(Object.assign({},U),{key:v})):U!==!0&&le._info.push({key:v,description:U,type:m!=null?typeof m:void 0})}static all(){return le._info.values()}bindTo(v){return v.createKey(this.key,this._defaultValue)}getValue(v){return v.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(v){return g.create(this.key,v)}}le._info=[];const Te=(0,ve.yh)("contextKeyService"),W="setContext";function O(V,v){return V<v?-1:V>v?1:0}function Q(V,v,m,U){return V<m?-1:V>m?1:v<U?-1:v>U?1:0}function q(V,v){if(v.type===6&&V.type!==9&&V.type!==6){for(const se of v.expr)if(V.equals(se))return!0}const m=V.negate(),U=ie(m).concat(ie(v));U.sort(o);for(let se=0;se<U.length;se++){const He=U[se].negate();for(let qe=se+1;qe<U.length;qe++){const ot=U[qe];if(He.equals(ot))return!0}}return!1}function ie(V){return V.type===9?V.expr:[V]}},16925:function(on,je,E){"use strict";E.d(je,{I8:function(){return x},TG:function(){return ae},jt:function(){return F},yh:function(){return fe}});var x;(function(f){f.serviceIds=new Map,f.DI_TARGET="$di$target",f.DI_DEPENDENCIES="$di$dependencies";function ue(te){return te[f.DI_DEPENDENCIES]||[]}f.getServiceDependencies=ue})(x||(x={}));const ae=fe("instantiationService");function ve(f,ue,te,o){ue[x.DI_TARGET]===ue?ue[x.DI_DEPENDENCIES].push({id:f,index:te,optional:o}):(ue[x.DI_DEPENDENCIES]=[{id:f,index:te,optional:o}],ue[x.DI_TARGET]=ue)}function fe(f){if(x.serviceIds.has(f))return x.serviceIds.get(f);const ue=function(te,o,y){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");ve(ue,te,y,!1)};return ue.toString=()=>f,x.serviceIds.set(f,ue),ue}function F(f){return function(ue,te,o){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");ve(f,ue,o,!0)}}},44650:function(on,je,E){"use strict";E.d(je,{B:function(){return fe}});var x=E(76068),ae=E(72999);class ve{constructor(){this.data=new Map}add(f,ue){x.ok(ae.HD(f)),x.ok(ae.Kn(ue)),x.ok(!this.data.has(f),"There is already an extension with this id"),this.data.set(f,ue)}as(f){return this.data.get(f)||null}}const fe=new ve},66213:function(on,je,E){"use strict";E.d(je,{e:function(){return x}});var x;(function(ae){ae.DARK="dark",ae.LIGHT="light",ae.HIGH_CONTRAST="hc"})(x||(x={}))},49055:function(on,je,E){"use strict";E.d(je,{EN:function(){return o},IP:function(){return h},Ic:function(){return S},XE:function(){return ue},bB:function(){return L},kS:function(){return y},m6:function(){return C}});var x=E(52615),ae=E(4348),ve=E(69323),fe=E(16925),F=E(44650),f=E(66213);const ue=(0,fe.yh)("themeService");var te;(function(N){function H(R){return R&&typeof R=="object"&&typeof R.id=="string"}N.isThemeColor=H})(te||(te={}));function o(N){return{id:N}}var y;(function(N){function H(ee){return ee&&typeof ee=="object"&&typeof ee.id=="string"&&(typeof ee.color=="undefined"||te.isThemeColor(ee.color))}N.isThemeIcon=H;const R=new RegExp(`^\\$\\((${x.dT.iconNameExpression}(?:${x.dT.iconModifierExpression})?)\\)$`);function k(ee){const G=R.exec(ee);if(!G)return;let[,I]=G;return{id:I}}N.fromString=k;function T(ee,G){let I=ee.id;const re=I.lastIndexOf("~");return re!==-1&&(I=I.substring(0,re)),G&&(I=`${I}~${G}`),{id:I}}N.modify=T;function A(ee,G){var I,re;return ee.id===G.id&&((I=ee.color)===null||I===void 0?void 0:I.id)===((re=G.color)===null||re===void 0?void 0:re.id)}N.isEqual=A;function J(ee,G){return{id:ee.id,color:G?o(G):void 0}}N.asThemeIcon=J,N.asClassNameArray=x.dT.asClassNameArray,N.asClassName=x.dT.asClassName,N.asCSSSelector=x.dT.asCSSSelector})(y||(y={}));function C(N){switch(N){case f.e.DARK:return"vs-dark";case f.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const h={ThemingContribution:"base.contributions.theming"};class g{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new ae.Q5}onColorThemeChange(H){return this.themingParticipants.push(H),this.onThemingParticipantAddedEmitter.fire(H),(0,ve.OF)(()=>{const R=this.themingParticipants.indexOf(H);this.themingParticipants.splice(R,1)})}getThemingParticipants(){return this.themingParticipants}}let _=new g;F.B.add(h.ThemingContribution,_);function S(N){return _.onColorThemeChange(N)}class L extends ve.JT{constructor(H){super(),this.themeService=H,this.theme=H.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(R=>this.onThemeChange(R)))}onThemeChange(H){this.theme=H,this.updateStyles()}updateStyles(){}}},16632:function(on,je,E){"use strict";var x=E(71409),ae=E(89490),ve=E(87075),fe=E(11036),F=E(39224),f=E(92310),ue=E.n(f),te=E(18929),o=E(59301),y=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],C=(0,o.forwardRef)(function(h,g){var _=h.prefixCls,S=_===void 0?"rc-checkbox":_,L=h.className,N=h.style,H=h.checked,R=h.disabled,k=h.defaultChecked,T=k===void 0?!1:k,A=h.type,J=A===void 0?"checkbox":A,ee=h.title,G=h.onChange,I=(0,F.Z)(h,y),re=(0,o.useRef)(null),le=(0,o.useRef)(null),Te=(0,te.Z)(T,{value:H}),W=(0,fe.Z)(Te,2),O=W[0],Q=W[1];(0,o.useImperativeHandle)(g,function(){return{focus:function(v){var m;(m=re.current)===null||m===void 0||m.focus(v)},blur:function(){var v;(v=re.current)===null||v===void 0||v.blur()},input:re.current,nativeElement:le.current}});var q=ue()(S,L,(0,ve.Z)((0,ve.Z)({},"".concat(S,"-checked"),O),"".concat(S,"-disabled"),R)),ie=function(v){R||("checked"in h||Q(v.target.checked),G==null||G({target:(0,ae.Z)((0,ae.Z)({},h),{},{type:J,checked:v.target.checked}),stopPropagation:function(){v.stopPropagation()},preventDefault:function(){v.preventDefault()},nativeEvent:v.nativeEvent}))};return o.createElement("span",{className:q,title:ee,style:N,ref:le},o.createElement("input",(0,x.Z)({},I,{className:"".concat(S,"-input"),ref:re,onChange:ie,disabled:R,checked:!!O,type:J})),o.createElement("span",{className:"".concat(S,"-inner")}))});je.Z=C},96478:function(on,je,E){"use strict";E.d(je,{Z:function(){return ee}});var x=E(71409),ae=E(87075),ve=E(11036),fe=E(39224),F=E(65352),f=E(92310),ue=E.n(f),te=E(8654),o=E(59301),y=E(10228),C=E(16089),h=y.Z.ESC,g=y.Z.TAB;function _(G){var I=G.visible,re=G.triggerRef,le=G.onVisibleChange,Te=G.autoFocus,W=G.overlayRef,O=o.useRef(!1),Q=function(){if(I){var v,m;(v=re.current)===null||v===void 0||(m=v.focus)===null||m===void 0||m.call(v),le==null||le(!1)}},q=function(){var v;return(v=W.current)!==null&&v!==void 0&&v.focus?(W.current.focus(),O.current=!0,!0):!1},ie=function(v){switch(v.keyCode){case h:Q();break;case g:{var m=!1;O.current||(m=q()),m?v.preventDefault():Q();break}}};o.useEffect(function(){return I?(window.addEventListener("keydown",ie),Te&&(0,C.Z)(q,3),function(){window.removeEventListener("keydown",ie),O.current=!1}):function(){O.current=!1}},[I])}var S=(0,o.forwardRef)(function(G,I){var re=G.overlay,le=G.arrow,Te=G.prefixCls,W=(0,o.useMemo)(function(){var Q;return typeof re=="function"?Q=re():Q=re,Q},[re]),O=(0,te.sQ)(I,(0,te.C4)(W));return o.createElement(o.Fragment,null,le&&o.createElement("div",{className:"".concat(Te,"-arrow")}),o.cloneElement(W,{ref:(0,te.Yr)(W)?O:void 0}))}),L=S,N={adjustX:1,adjustY:1},H=[0,0],R={topLeft:{points:["bl","tl"],overflow:N,offset:[0,-4],targetOffset:H},top:{points:["bc","tc"],overflow:N,offset:[0,-4],targetOffset:H},topRight:{points:["br","tr"],overflow:N,offset:[0,-4],targetOffset:H},bottomLeft:{points:["tl","bl"],overflow:N,offset:[0,4],targetOffset:H},bottom:{points:["tc","bc"],overflow:N,offset:[0,4],targetOffset:H},bottomRight:{points:["tr","br"],overflow:N,offset:[0,4],targetOffset:H}},k=R,T=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function A(G,I){var re,le=G.arrow,Te=le===void 0?!1:le,W=G.prefixCls,O=W===void 0?"rc-dropdown":W,Q=G.transitionName,q=G.animation,ie=G.align,V=G.placement,v=V===void 0?"bottomLeft":V,m=G.placements,U=m===void 0?k:m,se=G.getPopupContainer,pe=G.showAction,He=G.hideAction,qe=G.overlayClassName,ot=G.overlayStyle,Ot=G.visible,bt=G.trigger,xe=bt===void 0?["hover"]:bt,_t=G.autoFocus,Qt=G.overlay,Lt=G.children,qt=G.onVisibleChange,tt=(0,fe.Z)(G,T),Re=o.useState(),ye=(0,ve.Z)(Re,2),Z=ye[0],we=ye[1],Le="visible"in G?Ot:Z,$=o.useRef(null),P=o.useRef(null),K=o.useRef(null);o.useImperativeHandle(I,function(){return $.current});var ne=function(Fe){we(Fe),qt==null||qt(Fe)};_({visible:Le,triggerRef:K,onVisibleChange:ne,autoFocus:_t,overlayRef:P});var M=function(Fe){var Be=G.onOverlayClick;we(!1),Be&&Be(Fe)},B=function(){return o.createElement(L,{ref:P,overlay:Qt,prefixCls:O,arrow:Te})},j=function(){return typeof Qt=="function"?B:B()},me=function(){var Fe=G.minOverlayWidthMatchTrigger,Be=G.alignPoint;return"minOverlayWidthMatchTrigger"in G?Fe:!Be},de=function(){var Fe=G.openClassName;return Fe!==void 0?Fe:"".concat(O,"-open")},Ae=o.cloneElement(Lt,{className:ue()((re=Lt.props)===null||re===void 0?void 0:re.className,Le&&de()),ref:(0,te.Yr)(Lt)?(0,te.sQ)(K,(0,te.C4)(Lt)):void 0}),Ee=He;return!Ee&&xe.indexOf("contextMenu")!==-1&&(Ee=["click"]),o.createElement(F.Z,(0,x.Z)({builtinPlacements:U},tt,{prefixCls:O,ref:$,popupClassName:ue()(qe,(0,ae.Z)({},"".concat(O,"-show-arrow"),Te)),popupStyle:ot,action:xe,showAction:pe,hideAction:Ee,popupPlacement:v,popupAlign:ie,popupTransitionName:Q,popupAnimation:q,popupVisible:Le,stretch:me()?"minWidth":"",popup:j(),onPopupVisibleChange:ne,onPopupClick:M,getPopupContainer:se}),Ae)}var J=o.forwardRef(A),ee=J},66003:function(on,je,E){"use strict";E.d(je,{Z:function(){return ue}});var x=E(39224),ae=E(89490),ve=E(28788),fe=E(59301),F=["show"];function f(te,o){if(!o.max)return!0;var y=o.strategy(te);return y<=o.max}function ue(te,o){return fe.useMemo(function(){var y={};o&&(y.show=(0,ve.Z)(o)==="object"&&o.formatter?o.formatter:!!o),y=(0,ae.Z)((0,ae.Z)({},y),te);var C=y,h=C.show,g=(0,x.Z)(C,F);return(0,ae.Z)((0,ae.Z)({},g),{},{show:!!h,showFormatter:typeof h=="function"?h:void 0,strategy:g.strategy||function(_){return _.length}})},[te,o])}},36901:function(on,je,E){"use strict";E.r(je),E.d(je,{BaseInput:function(){return y},default:function(){return k}});var x=E(89490),ae=E(71409),ve=E(87075),fe=E(28788),F=E(92310),f=E.n(F),ue=E(59301),te=E(30292),o=ue.forwardRef(function(T,A){var J,ee,G,I=T.inputElement,re=T.children,le=T.prefixCls,Te=T.prefix,W=T.suffix,O=T.addonBefore,Q=T.addonAfter,q=T.className,ie=T.style,V=T.disabled,v=T.readOnly,m=T.focused,U=T.triggerFocus,se=T.allowClear,pe=T.value,He=T.handleReset,qe=T.hidden,ot=T.classes,Ot=T.classNames,bt=T.dataAttrs,xe=T.styles,_t=T.components,Qt=T.onClear,Lt=re!=null?re:I,qt=(_t==null?void 0:_t.affixWrapper)||"span",tt=(_t==null?void 0:_t.groupWrapper)||"span",Re=(_t==null?void 0:_t.wrapper)||"span",ye=(_t==null?void 0:_t.groupAddon)||"span",Z=(0,ue.useRef)(null),we=function(xt){var lt;(lt=Z.current)!==null&<!==void 0&<.contains(xt.target)&&(U==null||U())},Le=(0,te.X3)(T),$=(0,ue.cloneElement)(Lt,{value:pe,className:f()((J=Lt.props)===null||J===void 0?void 0:J.className,!Le&&(Ot==null?void 0:Ot.variant))||null}),P=(0,ue.useRef)(null);if(ue.useImperativeHandle(A,function(){return{nativeElement:P.current||Z.current}}),Le){var K=null;if(se){var ne=!V&&!v&&pe,M="".concat(le,"-clear-icon"),B=(0,fe.Z)(se)==="object"&&se!==null&&se!==void 0&&se.clearIcon?se.clearIcon:"\u2716";K=ue.createElement("button",{type:"button",tabIndex:-1,onClick:function(xt){He==null||He(xt),Qt==null||Qt()},onMouseDown:function(xt){return xt.preventDefault()},className:f()(M,(0,ve.Z)((0,ve.Z)({},"".concat(M,"-hidden"),!ne),"".concat(M,"-has-suffix"),!!W))},B)}var j="".concat(le,"-affix-wrapper"),me=f()(j,(0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)({},"".concat(le,"-disabled"),V),"".concat(j,"-disabled"),V),"".concat(j,"-focused"),m),"".concat(j,"-readonly"),v),"".concat(j,"-input-with-clear-btn"),W&&se&&pe),ot==null?void 0:ot.affixWrapper,Ot==null?void 0:Ot.affixWrapper,Ot==null?void 0:Ot.variant),de=(W||se)&&ue.createElement("span",{className:f()("".concat(le,"-suffix"),Ot==null?void 0:Ot.suffix),style:xe==null?void 0:xe.suffix},K,W);$=ue.createElement(qt,(0,ae.Z)({className:me,style:xe==null?void 0:xe.affixWrapper,onClick:we},bt==null?void 0:bt.affixWrapper,{ref:Z}),Te&&ue.createElement("span",{className:f()("".concat(le,"-prefix"),Ot==null?void 0:Ot.prefix),style:xe==null?void 0:xe.prefix},Te),$,de)}if((0,te.He)(T)){var Ae="".concat(le,"-group"),Ee="".concat(Ae,"-addon"),Ce="".concat(Ae,"-wrapper"),Fe=f()("".concat(le,"-wrapper"),Ae,ot==null?void 0:ot.wrapper,Ot==null?void 0:Ot.wrapper),Be=f()(Ce,(0,ve.Z)({},"".concat(Ce,"-disabled"),V),ot==null?void 0:ot.group,Ot==null?void 0:Ot.groupWrapper);$=ue.createElement(tt,{className:Be,ref:P},ue.createElement(Re,{className:Fe},O&&ue.createElement(ye,{className:Ee},O),$,Q&&ue.createElement(ye,{className:Ee},Q)))}return ue.cloneElement($,{className:f()((ee=$.props)===null||ee===void 0?void 0:ee.className,q)||null,style:(0,x.Z)((0,x.Z)({},(G=$.props)===null||G===void 0?void 0:G.style),ie),hidden:qe})}),y=o,C=E(62730),h=E(11036),g=E(39224),_=E(18929),S=E(2738),L=E(66003),N=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","onKeyUp","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","count","type","classes","classNames","styles","onCompositionStart","onCompositionEnd"],H=(0,ue.forwardRef)(function(T,A){var J=T.autoComplete,ee=T.onChange,G=T.onFocus,I=T.onBlur,re=T.onPressEnter,le=T.onKeyDown,Te=T.onKeyUp,W=T.prefixCls,O=W===void 0?"rc-input":W,Q=T.disabled,q=T.htmlSize,ie=T.className,V=T.maxLength,v=T.suffix,m=T.showCount,U=T.count,se=T.type,pe=se===void 0?"text":se,He=T.classes,qe=T.classNames,ot=T.styles,Ot=T.onCompositionStart,bt=T.onCompositionEnd,xe=(0,g.Z)(T,N),_t=(0,ue.useState)(!1),Qt=(0,h.Z)(_t,2),Lt=Qt[0],qt=Qt[1],tt=(0,ue.useRef)(!1),Re=(0,ue.useRef)(!1),ye=(0,ue.useRef)(null),Z=(0,ue.useRef)(null),we=function(Yt){ye.current&&(0,te.nH)(ye.current,Yt)},Le=(0,_.Z)(T.defaultValue,{value:T.value}),$=(0,h.Z)(Le,2),P=$[0],K=$[1],ne=P==null?"":String(P),M=(0,ue.useState)(null),B=(0,h.Z)(M,2),j=B[0],me=B[1],de=(0,L.Z)(U,m),Ae=de.max||V,Ee=de.strategy(ne),Ce=!!Ae&&Ee>Ae;(0,ue.useImperativeHandle)(A,function(){var Rt;return{focus:we,blur:function(){var Ne;(Ne=ye.current)===null||Ne===void 0||Ne.blur()},setSelectionRange:function(Ne,ke,Pe){var z;(z=ye.current)===null||z===void 0||z.setSelectionRange(Ne,ke,Pe)},select:function(){var Ne;(Ne=ye.current)===null||Ne===void 0||Ne.select()},input:ye.current,nativeElement:((Rt=Z.current)===null||Rt===void 0?void 0:Rt.nativeElement)||ye.current}}),(0,ue.useEffect)(function(){Re.current&&(Re.current=!1),qt(function(Rt){return Rt&&Q?!1:Rt})},[Q]);var Fe=function(Yt,Ne,ke){var Pe=Ne;if(!tt.current&&de.exceedFormatter&&de.max&&de.strategy(Ne)>de.max){if(Pe=de.exceedFormatter(Ne,{max:de.max}),Ne!==Pe){var z,oe;me([((z=ye.current)===null||z===void 0?void 0:z.selectionStart)||0,((oe=ye.current)===null||oe===void 0?void 0:oe.selectionEnd)||0])}}else if(ke.source==="compositionEnd")return;K(Pe),ye.current&&(0,te.rJ)(ye.current,Yt,ee,Pe)};(0,ue.useEffect)(function(){if(j){var Rt;(Rt=ye.current)===null||Rt===void 0||Rt.setSelectionRange.apply(Rt,(0,C.Z)(j))}},[j]);var Be=function(Yt){Fe(Yt,Yt.target.value,{source:"change"})},Ye=function(Yt){tt.current=!1,Fe(Yt,Yt.currentTarget.value,{source:"compositionEnd"}),bt==null||bt(Yt)},xt=function(Yt){re&&Yt.key==="Enter"&&!Re.current&&(Re.current=!0,re(Yt)),le==null||le(Yt)},lt=function(Yt){Yt.key==="Enter"&&(Re.current=!1),Te==null||Te(Yt)},nt=function(Yt){qt(!0),G==null||G(Yt)},Ut=function(Yt){Re.current&&(Re.current=!1),qt(!1),I==null||I(Yt)},Vt=function(Yt){K(""),we(),ye.current&&(0,te.rJ)(ye.current,Yt,ee)},Ct=Ce&&"".concat(O,"-out-of-range"),Jt=function(){var Yt=(0,S.Z)(T,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","count","classes","htmlSize","styles","classNames","onClear"]);return ue.createElement("input",(0,ae.Z)({autoComplete:J},Yt,{onChange:Be,onFocus:nt,onBlur:Ut,onKeyDown:xt,onKeyUp:lt,className:f()(O,(0,ve.Z)({},"".concat(O,"-disabled"),Q),qe==null?void 0:qe.input),style:ot==null?void 0:ot.input,ref:ye,size:q,type:pe,onCompositionStart:function(ke){tt.current=!0,Ot==null||Ot(ke)},onCompositionEnd:Ye}))},wn=function(){var Yt=Number(Ae)>0;if(v||de.show){var Ne=de.showFormatter?de.showFormatter({value:ne,count:Ee,maxLength:Ae}):"".concat(Ee).concat(Yt?" / ".concat(Ae):"");return ue.createElement(ue.Fragment,null,de.show&&ue.createElement("span",{className:f()("".concat(O,"-show-count-suffix"),(0,ve.Z)({},"".concat(O,"-show-count-has-suffix"),!!v),qe==null?void 0:qe.count),style:(0,x.Z)({},ot==null?void 0:ot.count)},Ne),v)}return null};return ue.createElement(y,(0,ae.Z)({},xe,{prefixCls:O,className:f()(ie,Ct),handleReset:Vt,value:ne,focused:Lt,triggerFocus:we,suffix:wn(),disabled:Q,classes:He,classNames:qe,styles:ot}),Jt())}),R=H,k=R},30292:function(on,je,E){"use strict";E.d(je,{He:function(){return x},X3:function(){return ae},nH:function(){return F},rJ:function(){return fe}});function x(f){return!!(f.addonBefore||f.addonAfter)}function ae(f){return!!(f.prefix||f.suffix||f.allowClear)}function ve(f,ue,te){var o=ue.cloneNode(!0),y=Object.create(f,{target:{value:o},currentTarget:{value:o}});return o.value=te,typeof ue.selectionStart=="number"&&typeof ue.selectionEnd=="number"&&(o.selectionStart=ue.selectionStart,o.selectionEnd=ue.selectionEnd),o.setSelectionRange=function(){ue.setSelectionRange.apply(ue,arguments)},y}function fe(f,ue,te,o){if(te){var y=ue;if(ue.type==="click"){y=ve(ue,f,""),te(y);return}if(f.type!=="file"&&o!==void 0){y=ve(ue,f,o),te(y);return}te(y)}}function F(f,ue){if(f){f.focus(ue);var te=ue||{},o=te.cursor;if(o){var y=f.value.length;switch(o){case"start":f.setSelectionRange(0,0);break;case"end":f.setSelectionRange(y,y);break;default:f.setSelectionRange(0,y)}}}}},28321:function(on,je,E){"use strict";E.d(je,{iz:function(){return Ue},ck:function(){return Pe},BW:function(){return St},sN:function(){return Pe},Wd:function(){return Ft},ZP:function(){return zt},Xl:function(){return re}});var x=E(71409),ae=E(87075),ve=E(89490),fe=E(62730),F=E(11036),f=E(39224),ue=E(92310),te=E.n(ue),o=E(11780),y=E(18929),C=E(13697),h=E(48736),g=E(59301),_=E(4676),S=g.createContext(null);function L(De,Se){return De===void 0?null:"".concat(De,"-").concat(Se)}function N(De){var Se=g.useContext(S);return L(Se,De)}var H=E(80547),R=["children","locked"],k=g.createContext(null);function T(De,Se){var et=(0,ve.Z)({},De);return Object.keys(Se).forEach(function(rt){var It=Se[rt];It!==void 0&&(et[rt]=It)}),et}function A(De){var Se=De.children,et=De.locked,rt=(0,f.Z)(De,R),It=g.useContext(k),Nt=(0,H.Z)(function(){return T(It,rt)},[It,rt],function(wt,Zt){return!et&&(wt[0]!==Zt[0]||!(0,C.Z)(wt[1],Zt[1],!0))});return g.createElement(k.Provider,{value:Nt},Se)}var J=[],ee=g.createContext(null);function G(){return g.useContext(ee)}var I=g.createContext(J);function re(De){var Se=g.useContext(I);return g.useMemo(function(){return De!==void 0?[].concat((0,fe.Z)(Se),[De]):Se},[Se,De])}var le=g.createContext(null),Te=g.createContext({}),W=Te,O=E(29194);function Q(De){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,O.Z)(De)){var et=De.nodeName.toLowerCase(),rt=["input","select","textarea","button"].includes(et)||De.isContentEditable||et==="a"&&!!De.getAttribute("href"),It=De.getAttribute("tabindex"),Nt=Number(It),wt=null;return It&&!Number.isNaN(Nt)?wt=Nt:rt&&wt===null&&(wt=0),rt&&De.disabled&&(wt=null),wt!==null&&(wt>=0||Se&&wt<0)}return!1}function q(De){var Se=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,et=(0,fe.Z)(De.querySelectorAll("*")).filter(function(rt){return Q(rt,Se)});return Q(De,Se)&&et.unshift(De),et}var ie=null;function V(){ie=document.activeElement}function v(){ie=null}function m(){if(ie)try{ie.focus()}catch(De){}}function U(De,Se){if(Se.keyCode===9){var et=q(De),rt=et[Se.shiftKey?0:et.length-1],It=rt===document.activeElement||De===document.activeElement;if(It){var Nt=et[Se.shiftKey?et.length-1:0];Nt.focus(),Se.preventDefault()}}}var se=E(10228),pe=E(16089),He=se.Z.LEFT,qe=se.Z.RIGHT,ot=se.Z.UP,Ot=se.Z.DOWN,bt=se.Z.ENTER,xe=se.Z.ESC,_t=se.Z.HOME,Qt=se.Z.END,Lt=[ot,Ot,He,qe];function qt(De,Se,et,rt){var It,Nt="prev",wt="next",Zt="children",$t="parent";if(De==="inline"&&rt===bt)return{inlineTrigger:!0};var jt=(0,ae.Z)((0,ae.Z)({},ot,Nt),Ot,wt),xn=(0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)({},He,et?wt:Nt),qe,et?Nt:wt),Ot,Zt),bt,Zt),un=(0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)({},ot,Nt),Ot,wt),bt,Zt),xe,$t),He,et?Zt:$t),qe,et?$t:Zt),Cn={inline:jt,horizontal:xn,vertical:un,inlineSub:jt,horizontalSub:un,verticalSub:un},Un=(It=Cn["".concat(De).concat(Se?"":"Sub")])===null||It===void 0?void 0:It[rt];switch(Un){case Nt:return{offset:-1,sibling:!0};case wt:return{offset:1,sibling:!0};case $t:return{offset:-1,sibling:!1};case Zt:return{offset:1,sibling:!1};default:return null}}function tt(De){for(var Se=De;Se;){if(Se.getAttribute("data-menu-list"))return Se;Se=Se.parentElement}return null}function Re(De,Se){for(var et=De||document.activeElement;et;){if(Se.has(et))return et;et=et.parentElement}return null}function ye(De,Se){var et=q(De,!0);return et.filter(function(rt){return Se.has(rt)})}function Z(De,Se,et){var rt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!De)return null;var It=ye(De,Se),Nt=It.length,wt=It.findIndex(function(Zt){return et===Zt});return rt<0?wt===-1?wt=Nt-1:wt-=1:rt>0&&(wt+=1),wt=(wt+Nt)%Nt,It[wt]}var we=function(Se,et){var rt=new Set,It=new Map,Nt=new Map;return Se.forEach(function(wt){var Zt=document.querySelector("[data-menu-id='".concat(L(et,wt),"']"));Zt&&(rt.add(Zt),Nt.set(Zt,wt),It.set(wt,Zt))}),{elements:rt,key2element:It,element2key:Nt}};function Le(De,Se,et,rt,It,Nt,wt,Zt,$t,jt){var xn=g.useRef(),un=g.useRef();un.current=Se;var Cn=function(){pe.Z.cancel(xn.current)};return g.useEffect(function(){return function(){Cn()}},[]),function(Un){var Nn=Un.which;if([].concat(Lt,[bt,xe,_t,Qt]).includes(Nn)){var Rn=Nt(),In=we(Rn,rt),$n=In,sn=$n.elements,gn=$n.key2element,yn=$n.element2key,jn=gn.get(Se),kn=Re(jn,sn),Vn=yn.get(kn),or=qt(De,wt(Vn,!0).length===1,et,Nn);if(!or&&Nn!==_t&&Nn!==Qt)return;(Lt.includes(Nn)||[_t,Qt].includes(Nn))&&Un.preventDefault();var ge=function(pt){if(pt){var Ge=pt,Je=pt.querySelector("a");Je!=null&&Je.getAttribute("href")&&(Ge=Je);var at=yn.get(pt);Zt(at),Cn(),xn.current=(0,pe.Z)(function(){un.current===at&&Ge.focus()})}};if([_t,Qt].includes(Nn)||or.sibling||!kn){var Xe;!kn||De==="inline"?Xe=It.current:Xe=tt(kn);var Ke,We=ye(Xe,sn);Nn===_t?Ke=We[0]:Nn===Qt?Ke=We[We.length-1]:Ke=Z(Xe,sn,kn,or.offset),ge(Ke)}else if(or.inlineTrigger)$t(Vn);else if(or.offset>0)$t(Vn,!0),Cn(),xn.current=(0,pe.Z)(function(){In=we(Rn,rt);var Dt=kn.getAttribute("aria-controls"),pt=document.getElementById(Dt),Ge=Z(pt,In.elements);ge(Ge)},5);else if(or.offset<0){var it=wt(Vn,!0),ht=it[it.length-2],Pt=gn.get(ht);$t(ht,!1),ge(Pt)}}jt==null||jt(Un)}}function $(De){Promise.resolve().then(De)}var P="__RC_UTIL_PATH_SPLIT__",K=function(Se){return Se.join(P)},ne=function(Se){return Se.split(P)},M="rc-menu-more";function B(){var De=g.useState({}),Se=(0,F.Z)(De,2),et=Se[1],rt=(0,g.useRef)(new Map),It=(0,g.useRef)(new Map),Nt=g.useState([]),wt=(0,F.Z)(Nt,2),Zt=wt[0],$t=wt[1],jt=(0,g.useRef)(0),xn=(0,g.useRef)(!1),un=function(){xn.current||et({})},Cn=(0,g.useCallback)(function(gn,yn){var jn=K(yn);It.current.set(jn,gn),rt.current.set(gn,jn),jt.current+=1;var kn=jt.current;$(function(){kn===jt.current&&un()})},[]),Un=(0,g.useCallback)(function(gn,yn){var jn=K(yn);It.current.delete(jn),rt.current.delete(gn)},[]),Nn=(0,g.useCallback)(function(gn){$t(gn)},[]),Rn=(0,g.useCallback)(function(gn,yn){var jn=rt.current.get(gn)||"",kn=ne(jn);return yn&&Zt.includes(kn[0])&&kn.unshift(M),kn},[Zt]),In=(0,g.useCallback)(function(gn,yn){return gn.filter(function(jn){return jn!==void 0}).some(function(jn){var kn=Rn(jn,!0);return kn.includes(yn)})},[Rn]),$n=function(){var yn=(0,fe.Z)(rt.current.keys());return Zt.length&&yn.push(M),yn},sn=(0,g.useCallback)(function(gn){var yn="".concat(rt.current.get(gn)).concat(P),jn=new Set;return(0,fe.Z)(It.current.keys()).forEach(function(kn){kn.startsWith(yn)&&jn.add(It.current.get(kn))}),jn},[]);return g.useEffect(function(){return function(){xn.current=!0}},[]),{registerPath:Cn,unregisterPath:Un,refreshOverflowKeys:Nn,isSubPathKey:In,getKeyPath:Rn,getKeys:$n,getSubPathKeys:sn}}function j(De){var Se=g.useRef(De);Se.current=De;var et=g.useCallback(function(){for(var rt,It=arguments.length,Nt=new Array(It),wt=0;wt<It;wt++)Nt[wt]=arguments[wt];return(rt=Se.current)===null||rt===void 0?void 0:rt.call.apply(rt,[Se].concat(Nt))},[]);return De?et:void 0}var me=Math.random().toFixed(5).toString().slice(2),de=0;function Ae(De){var Se=(0,y.Z)(De,{value:De}),et=(0,F.Z)(Se,2),rt=et[0],It=et[1];return g.useEffect(function(){de+=1;var Nt="".concat(me,"-").concat(de);It("rc-menu-uuid-".concat(Nt))},[]),rt}var Ee=E(16552),Ce=E(19210),Fe=E(46654),Be=E(37205),Ye=E(2738),xt=E(8654);function lt(De,Se,et,rt){var It=g.useContext(k),Nt=It.activeKey,wt=It.onActive,Zt=It.onInactive,$t={active:Nt===De};return Se||($t.onMouseEnter=function(jt){et==null||et({key:De,domEvent:jt}),wt(De)},$t.onMouseLeave=function(jt){rt==null||rt({key:De,domEvent:jt}),Zt(De)}),$t}function nt(De){var Se=g.useContext(k),et=Se.mode,rt=Se.rtl,It=Se.inlineIndent;if(et!=="inline")return null;var Nt=De;return rt?{paddingRight:Nt*It}:{paddingLeft:Nt*It}}function Ut(De){var Se=De.icon,et=De.props,rt=De.children,It;return Se===null||Se===!1?null:(typeof Se=="function"?It=g.createElement(Se,(0,ve.Z)({},et)):typeof Se!="boolean"&&(It=Se),It||rt||null)}var Vt=["item"];function Ct(De){var Se=De.item,et=(0,f.Z)(De,Vt);return Object.defineProperty(et,"item",{get:function(){return(0,h.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),Se}}),et}var Jt=["title","attribute","elementRef"],wn=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Rt=["active"],Yt=function(De){(0,Fe.Z)(et,De);var Se=(0,Be.Z)(et);function et(){return(0,Ee.Z)(this,et),Se.apply(this,arguments)}return(0,Ce.Z)(et,[{key:"render",value:function(){var It=this.props,Nt=It.title,wt=It.attribute,Zt=It.elementRef,$t=(0,f.Z)(It,Jt),jt=(0,Ye.Z)($t,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,h.ZP)(!wt,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),g.createElement(o.Z.Item,(0,x.Z)({},wt,{title:typeof Nt=="string"?Nt:void 0},jt,{ref:Zt}))}}]),et}(g.Component),Ne=g.forwardRef(function(De,Se){var et=De.style,rt=De.className,It=De.eventKey,Nt=De.warnKey,wt=De.disabled,Zt=De.itemIcon,$t=De.children,jt=De.role,xn=De.onMouseEnter,un=De.onMouseLeave,Cn=De.onClick,Un=De.onKeyDown,Nn=De.onFocus,Rn=(0,f.Z)(De,wn),In=N(It),$n=g.useContext(k),sn=$n.prefixCls,gn=$n.onItemClick,yn=$n.disabled,jn=$n.overflowDisabled,kn=$n.itemIcon,Vn=$n.selectedKeys,or=$n.onActive,ge=g.useContext(W),Xe=ge._internalRenderMenuItem,Ke="".concat(sn,"-item"),We=g.useRef(),it=g.useRef(),ht=yn||wt,Pt=(0,xt.x1)(Se,it),Dt=re(It),pt=function(dn){return{key:It,keyPath:(0,fe.Z)(Dt).reverse(),item:We.current,domEvent:dn}},Ge=Zt||kn,Je=lt(It,ht,xn,un),at=Je.active,dt=(0,f.Z)(Je,Rt),gt=Vn.includes(It),Wt=nt(Dt.length),vn=function(dn){if(!ht){var dr=pt(dn);Cn==null||Cn(Ct(dr)),gn(dr)}},rn=function(dn){if(Un==null||Un(dn),dn.which===se.Z.ENTER){var dr=pt(dn);Cn==null||Cn(Ct(dr)),gn(dr)}},Pn=function(dn){or(It),Nn==null||Nn(dn)},Zn={};De.role==="option"&&(Zn["aria-selected"]=gt);var Kn=g.createElement(Yt,(0,x.Z)({ref:We,elementRef:Pt,role:jt===null?"none":jt||"menuitem",tabIndex:wt?null:-1,"data-menu-id":jn&&In?null:In},(0,Ye.Z)(Rn,["extra"]),dt,Zn,{component:"li","aria-disabled":wt,style:(0,ve.Z)((0,ve.Z)({},Wt),et),className:te()(Ke,(0,ae.Z)((0,ae.Z)((0,ae.Z)({},"".concat(Ke,"-active"),at),"".concat(Ke,"-selected"),gt),"".concat(Ke,"-disabled"),ht),rt),onClick:vn,onKeyDown:rn,onFocus:Pn}),$t,g.createElement(Ut,{props:(0,ve.Z)((0,ve.Z)({},De),{},{isSelected:gt}),icon:Ge}));return Xe&&(Kn=Xe(Kn,De,{selected:gt})),Kn});function ke(De,Se){var et=De.eventKey,rt=G(),It=re(et);return g.useEffect(function(){if(rt)return rt.registerPath(et,It),function(){rt.unregisterPath(et,It)}},[It]),rt?null:g.createElement(Ne,(0,x.Z)({},De,{ref:Se}))}var Pe=g.forwardRef(ke),z=["className","children"],oe=function(Se,et){var rt=Se.className,It=Se.children,Nt=(0,f.Z)(Se,z),wt=g.useContext(k),Zt=wt.prefixCls,$t=wt.mode,jt=wt.rtl;return g.createElement("ul",(0,x.Z)({className:te()(Zt,jt&&"".concat(Zt,"-rtl"),"".concat(Zt,"-sub"),"".concat(Zt,"-").concat($t==="inline"?"inline":"vertical"),rt),role:"menu"},Nt,{"data-menu-list":!0,ref:et}),It)},he=g.forwardRef(oe);he.displayName="SubMenuList";var ce=he,be=E(11592);function ze(De,Se){return(0,be.Z)(De).map(function(et,rt){if(g.isValidElement(et)){var It,Nt,wt=et.key,Zt=(It=(Nt=et.props)===null||Nt===void 0?void 0:Nt.eventKey)!==null&&It!==void 0?It:wt,$t=Zt==null;$t&&(Zt="tmp_key-".concat([].concat((0,fe.Z)(Se),[rt]).join("-")));var jt={key:Zt,eventKey:Zt};return g.cloneElement(et,jt)}return et})}var Ze=E(65352),$e={adjustX:1,adjustY:1},ft={topLeft:{points:["bl","tl"],overflow:$e},topRight:{points:["br","tr"],overflow:$e},bottomLeft:{points:["tl","bl"],overflow:$e},bottomRight:{points:["tr","br"],overflow:$e},leftTop:{points:["tr","tl"],overflow:$e},leftBottom:{points:["br","bl"],overflow:$e},rightTop:{points:["tl","tr"],overflow:$e},rightBottom:{points:["bl","br"],overflow:$e}},en={topLeft:{points:["bl","tl"],overflow:$e},topRight:{points:["br","tr"],overflow:$e},bottomLeft:{points:["tl","bl"],overflow:$e},bottomRight:{points:["tr","br"],overflow:$e},rightTop:{points:["tr","tl"],overflow:$e},rightBottom:{points:["br","bl"],overflow:$e},leftTop:{points:["tl","tr"],overflow:$e},leftBottom:{points:["bl","br"],overflow:$e}},an=null;function yt(De,Se,et){if(Se)return Se;if(et)return et[De]||et.other}var Gt={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function _n(De){var Se=De.prefixCls,et=De.visible,rt=De.children,It=De.popup,Nt=De.popupStyle,wt=De.popupClassName,Zt=De.popupOffset,$t=De.disabled,jt=De.mode,xn=De.onVisibleChange,un=g.useContext(k),Cn=un.getPopupContainer,Un=un.rtl,Nn=un.subMenuOpenDelay,Rn=un.subMenuCloseDelay,In=un.builtinPlacements,$n=un.triggerSubMenuAction,sn=un.forceSubMenuRender,gn=un.rootClassName,yn=un.motion,jn=un.defaultMotions,kn=g.useState(!1),Vn=(0,F.Z)(kn,2),or=Vn[0],ge=Vn[1],Xe=Un?(0,ve.Z)((0,ve.Z)({},en),In):(0,ve.Z)((0,ve.Z)({},ft),In),Ke=Gt[jt],We=yt(jt,yn,jn),it=g.useRef(We);jt!=="inline"&&(it.current=We);var ht=(0,ve.Z)((0,ve.Z)({},it.current),{},{leavedClassName:"".concat(Se,"-hidden"),removeOnLeave:!1,motionAppear:!0}),Pt=g.useRef();return g.useEffect(function(){return Pt.current=(0,pe.Z)(function(){ge(et)}),function(){pe.Z.cancel(Pt.current)}},[et]),g.createElement(Ze.Z,{prefixCls:Se,popupClassName:te()("".concat(Se,"-popup"),(0,ae.Z)({},"".concat(Se,"-rtl"),Un),wt,gn),stretch:jt==="horizontal"?"minWidth":null,getPopupContainer:Cn,builtinPlacements:Xe,popupPlacement:Ke,popupVisible:or,popup:It,popupStyle:Nt,popupAlign:Zt&&{offset:Zt},action:$t?[]:[$n],mouseEnterDelay:Nn,mouseLeaveDelay:Rn,onPopupVisibleChange:xn,forceRender:sn,popupMotion:ht,fresh:!0},rt)}var Bn=E(77900);function cn(De){var Se=De.id,et=De.open,rt=De.keyPath,It=De.children,Nt="inline",wt=g.useContext(k),Zt=wt.prefixCls,$t=wt.forceSubMenuRender,jt=wt.motion,xn=wt.defaultMotions,un=wt.mode,Cn=g.useRef(!1);Cn.current=un===Nt;var Un=g.useState(!Cn.current),Nn=(0,F.Z)(Un,2),Rn=Nn[0],In=Nn[1],$n=Cn.current?et:!1;g.useEffect(function(){Cn.current&&In(!1)},[un]);var sn=(0,ve.Z)({},yt(Nt,jt,xn));rt.length>1&&(sn.motionAppear=!1);var gn=sn.onVisibleChanged;return sn.onVisibleChanged=function(yn){return!Cn.current&&!yn&&In(!0),gn==null?void 0:gn(yn)},Rn?null:g.createElement(A,{mode:Nt,locked:!Cn.current},g.createElement(Bn.default,(0,x.Z)({visible:$n},sn,{forceRender:$t,removeOnLeave:!1,leavedClassName:"".concat(Zt,"-hidden")}),function(yn){var jn=yn.className,kn=yn.style;return g.createElement(ce,{id:Se,className:jn,style:kn},It)}))}var pn=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Tn=["active"],mn=g.forwardRef(function(De,Se){var et=De.style,rt=De.className,It=De.title,Nt=De.eventKey,wt=De.warnKey,Zt=De.disabled,$t=De.internalPopupClose,jt=De.children,xn=De.itemIcon,un=De.expandIcon,Cn=De.popupClassName,Un=De.popupOffset,Nn=De.popupStyle,Rn=De.onClick,In=De.onMouseEnter,$n=De.onMouseLeave,sn=De.onTitleClick,gn=De.onTitleMouseEnter,yn=De.onTitleMouseLeave,jn=(0,f.Z)(De,pn),kn=N(Nt),Vn=g.useContext(k),or=Vn.prefixCls,ge=Vn.mode,Xe=Vn.openKeys,Ke=Vn.disabled,We=Vn.overflowDisabled,it=Vn.activeKey,ht=Vn.selectedKeys,Pt=Vn.itemIcon,Dt=Vn.expandIcon,pt=Vn.onItemClick,Ge=Vn.onOpenChange,Je=Vn.onActive,at=g.useContext(W),dt=at._internalRenderSubMenuItem,gt=g.useContext(le),Wt=gt.isSubPathKey,vn=re(),rn="".concat(or,"-submenu"),Pn=Ke||Zt,Zn=g.useRef(),Kn=g.useRef(),er=xn!=null?xn:Pt,dn=un!=null?un:Dt,dr=Xe.includes(Nt),ir=!We&&dr,tr=Wt(ht,Nt),Yn=lt(Nt,Pn,gn,yn),hn=Yn.active,mr=(0,f.Z)(Yn,Tn),rr=g.useState(!1),lr=(0,F.Z)(rr,2),Hn=lr[0],Sn=lr[1],On=function(pr){Pn||Sn(pr)},Qn=function(pr){On(!0),In==null||In({key:Nt,domEvent:pr})},Fn=function(pr){On(!1),$n==null||$n({key:Nt,domEvent:pr})},sr=g.useMemo(function(){return hn||(ge!=="inline"?Hn||Wt([it],Nt):!1)},[ge,hn,it,Hn,Nt,Wt]),ar=nt(vn.length),Pr=function(pr){Pn||(sn==null||sn({key:Nt,domEvent:pr}),ge==="inline"&&Ge(Nt,!dr))},zr=j(function(gr){Rn==null||Rn(Ct(gr)),pt(gr)}),Kr=function(pr){ge!=="inline"&&Ge(Nt,pr)},ei=function(){Je(Nt)},Zr=kn&&"".concat(kn,"-popup"),Br=g.useMemo(function(){return g.createElement(Ut,{icon:ge!=="horizontal"?dn:void 0,props:(0,ve.Z)((0,ve.Z)({},De),{},{isOpen:ir,isSubMenu:!0})},g.createElement("i",{className:"".concat(rn,"-arrow")}))},[ge,dn,De,ir,rn]),hr=g.createElement("div",(0,x.Z)({role:"menuitem",style:ar,className:"".concat(rn,"-title"),tabIndex:Pn?null:-1,ref:Zn,title:typeof It=="string"?It:null,"data-menu-id":We&&kn?null:kn,"aria-expanded":ir,"aria-haspopup":!0,"aria-controls":Zr,"aria-disabled":Pn,onClick:Pr,onFocus:ei},mr),It,Br),Sr=g.useRef(ge);if(ge!=="inline"&&vn.length>1?Sr.current="vertical":Sr.current=ge,!We){var kr=Sr.current;hr=g.createElement(_n,{mode:kr,prefixCls:rn,visible:!$t&&ir&&ge!=="inline",popupClassName:Cn,popupOffset:Un,popupStyle:Nn,popup:g.createElement(A,{mode:kr==="horizontal"?"vertical":kr},g.createElement(ce,{id:Zr,ref:Kn},jt)),disabled:Pn,onVisibleChange:Kr},hr)}var Dr=g.createElement(o.Z.Item,(0,x.Z)({ref:Se,role:"none"},jn,{component:"li",style:et,className:te()(rn,"".concat(rn,"-").concat(ge),rt,(0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)({},"".concat(rn,"-open"),ir),"".concat(rn,"-active"),sr),"".concat(rn,"-selected"),tr),"".concat(rn,"-disabled"),Pn)),onMouseEnter:Qn,onMouseLeave:Fn}),hr,!We&&g.createElement(cn,{id:Zr,open:ir,keyPath:vn},jt));return dt&&(Dr=dt(Dr,De,{selected:tr,active:sr,open:ir,disabled:Pn})),g.createElement(A,{onItemClick:zr,mode:ge==="horizontal"?"vertical":ge,itemIcon:er,expandIcon:dn},Dr)}),An=g.forwardRef(function(De,Se){var et=De.eventKey,rt=De.children,It=re(et),Nt=ze(rt,It),wt=G();g.useEffect(function(){if(wt)return wt.registerPath(et,It),function(){wt.unregisterPath(et,It)}},[It]);var Zt;return wt?Zt=Nt:Zt=g.createElement(mn,(0,x.Z)({ref:Se},De),Nt),g.createElement(I.Provider,{value:It},Zt)}),Ft=An,Wn=E(28788);function Ue(De){var Se=De.className,et=De.style,rt=g.useContext(k),It=rt.prefixCls,Nt=G();return Nt?null:g.createElement("li",{role:"separator",className:te()("".concat(It,"-item-divider"),Se),style:et})}var Oe=["className","title","eventKey","children"],Bt=g.forwardRef(function(De,Se){var et=De.className,rt=De.title,It=De.eventKey,Nt=De.children,wt=(0,f.Z)(De,Oe),Zt=g.useContext(k),$t=Zt.prefixCls,jt="".concat($t,"-item-group");return g.createElement("li",(0,x.Z)({ref:Se,role:"presentation"},wt,{onClick:function(un){return un.stopPropagation()},className:te()(jt,et)}),g.createElement("div",{role:"presentation",className:"".concat(jt,"-title"),title:typeof rt=="string"?rt:void 0},rt),g.createElement("ul",{role:"group",className:"".concat(jt,"-list")},Nt))}),kt=g.forwardRef(function(De,Se){var et=De.eventKey,rt=De.children,It=re(et),Nt=ze(rt,It),wt=G();return wt?Nt:g.createElement(Bt,(0,x.Z)({ref:Se},(0,Ye.Z)(De,["warnKey"])),Nt)}),St=kt,fn=["label","children","key","type","extra"];function Ve(De,Se,et){var rt=Se.item,It=Se.group,Nt=Se.submenu,wt=Se.divider;return(De||[]).map(function(Zt,$t){if(Zt&&(0,Wn.Z)(Zt)==="object"){var jt=Zt,xn=jt.label,un=jt.children,Cn=jt.key,Un=jt.type,Nn=jt.extra,Rn=(0,f.Z)(jt,fn),In=Cn!=null?Cn:"tmp-".concat($t);return un||Un==="group"?Un==="group"?g.createElement(It,(0,x.Z)({key:In},Rn,{title:xn}),Ve(un,Se,et)):g.createElement(Nt,(0,x.Z)({key:In},Rn,{title:xn}),Ve(un,Se,et)):Un==="divider"?g.createElement(wt,(0,x.Z)({key:In},Rn)):g.createElement(rt,(0,x.Z)({key:In},Rn,{extra:Nn}),xn,(!!Nn||Nn===0)&&g.createElement("span",{className:"".concat(et,"-item-extra")},Nn))}return null}).filter(function(Zt){return Zt})}function Qe(De,Se,et,rt,It){var Nt=De,wt=(0,ve.Z)({divider:Ue,item:Pe,group:St,submenu:Ft},rt);return Se&&(Nt=Ve(Se,wt,It)),ze(Nt,et)}var Tt=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem","_internalComponents"],Et=[],Xt=g.forwardRef(function(De,Se){var et,rt=De,It=rt.prefixCls,Nt=It===void 0?"rc-menu":It,wt=rt.rootClassName,Zt=rt.style,$t=rt.className,jt=rt.tabIndex,xn=jt===void 0?0:jt,un=rt.items,Cn=rt.children,Un=rt.direction,Nn=rt.id,Rn=rt.mode,In=Rn===void 0?"vertical":Rn,$n=rt.inlineCollapsed,sn=rt.disabled,gn=rt.disabledOverflow,yn=rt.subMenuOpenDelay,jn=yn===void 0?.1:yn,kn=rt.subMenuCloseDelay,Vn=kn===void 0?.1:kn,or=rt.forceSubMenuRender,ge=rt.defaultOpenKeys,Xe=rt.openKeys,Ke=rt.activeKey,We=rt.defaultActiveFirst,it=rt.selectable,ht=it===void 0?!0:it,Pt=rt.multiple,Dt=Pt===void 0?!1:Pt,pt=rt.defaultSelectedKeys,Ge=rt.selectedKeys,Je=rt.onSelect,at=rt.onDeselect,dt=rt.inlineIndent,gt=dt===void 0?24:dt,Wt=rt.motion,vn=rt.defaultMotions,rn=rt.triggerSubMenuAction,Pn=rn===void 0?"hover":rn,Zn=rt.builtinPlacements,Kn=rt.itemIcon,er=rt.expandIcon,dn=rt.overflowedIndicator,dr=dn===void 0?"...":dn,ir=rt.overflowedIndicatorPopupClassName,tr=rt.getPopupContainer,Yn=rt.onClick,hn=rt.onOpenChange,mr=rt.onKeyDown,rr=rt.openAnimation,lr=rt.openTransitionName,Hn=rt._internalRenderMenuItem,Sn=rt._internalRenderSubMenuItem,On=rt._internalComponents,Qn=(0,f.Z)(rt,Tt),Fn=g.useMemo(function(){return[Qe(Cn,un,Et,On,Nt),Qe(Cn,un,Et,{},Nt)]},[Cn,un,On]),sr=(0,F.Z)(Fn,2),ar=sr[0],Pr=sr[1],zr=g.useState(!1),Kr=(0,F.Z)(zr,2),ei=Kr[0],Zr=Kr[1],Br=g.useRef(),hr=Ae(Nn),Sr=Un==="rtl",kr=(0,y.Z)(ge,{value:Xe,postState:function(Or){return Or||Et}}),Dr=(0,F.Z)(kr,2),gr=Dr[0],pr=Dr[1],tn=function(Or){var Vr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Kt(){pr(Or),hn==null||hn(Or)}Vr?(0,_.flushSync)(Kt):Kt()},zn=g.useState(gr),Jn=(0,F.Z)(zn,2),nr=Jn[0],_r=Jn[1],Tr=g.useRef(!1),Ln=g.useMemo(function(){return(In==="inline"||In==="vertical")&&$n?["vertical",$n]:[In,!1]},[In,$n]),Gn=(0,F.Z)(Ln,2),yr=Gn[0],Xn=Gn[1],xr=yr==="inline",Jr=g.useState(yr),Fr=(0,F.Z)(Jr,2),qr=Fr[0],ri=Fr[1],li=g.useState(Xn),Hr=(0,F.Z)(li,2),ts=Hr[0],Fi=Hr[1];g.useEffect(function(){ri(yr),Fi(Xn),Tr.current&&(xr?pr(nr):tn(Et))},[yr,Xn]);var wi=g.useState(0),ui=(0,F.Z)(wi,2),Li=ui[0],Ni=ui[1],Mi=Li>=ar.length-1||qr!=="horizontal"||gn;g.useEffect(function(){xr&&_r(gr)},[gr]),g.useEffect(function(){return Tr.current=!0,function(){Tr.current=!1}},[]);var pi=B(),Bi=pi.registerPath,Ai=pi.unregisterPath,ns=pi.refreshOverflowKeys,Ti=pi.isSubPathKey,rs=pi.getKeyPath,Ui=pi.getKeys,mi=pi.getSubPathKeys,Wi=g.useMemo(function(){return{registerPath:Bi,unregisterPath:Ai}},[Bi,Ai]),Ki=g.useMemo(function(){return{isSubPathKey:Ti}},[Ti]);g.useEffect(function(){ns(Mi?Et:ar.slice(Li+1).map(function($r){return $r.key}))},[Li,Mi]);var ki=(0,y.Z)(Ke||We&&((et=ar[0])===null||et===void 0?void 0:et.key),{value:Ke}),si=(0,F.Z)(ki,2),ti=si[0],wr=si[1],Er=j(function($r){wr($r)}),Yr=j(function(){wr(void 0)});(0,g.useImperativeHandle)(Se,function(){return{list:Br.current,focus:function(Or){var Vr,Kt=Ui(),ni=we(Kt,hr),yi=ni.elements,ss=ni.key2element,xs=ni.element2key,as=ye(Br.current,yi),os=ti!=null?ti:as[0]?xs.get(as[0]):(Vr=ar.find(function(Zi){return!Zi.props.disabled}))===null||Vr===void 0?void 0:Vr.key,Vi=ss.get(os);if(os&&Vi){var ls;Vi==null||(ls=Vi.focus)===null||ls===void 0||ls.call(Vi,Or)}}}});var Gr=(0,y.Z)(pt||[],{value:Ge,postState:function(Or){return Array.isArray(Or)?Or:Or==null?Et:[Or]}}),Wr=(0,F.Z)(Gr,2),Xr=Wr[0],di=Wr[1],fi=function(Or){if(ht){var Vr=Or.key,Kt=Xr.includes(Vr),ni;Dt?Kt?ni=Xr.filter(function(ss){return ss!==Vr}):ni=[].concat((0,fe.Z)(Xr),[Vr]):ni=[Vr],di(ni);var yi=(0,ve.Z)((0,ve.Z)({},Or),{},{selectedKeys:ni});Kt?at==null||at(yi):Je==null||Je(yi)}!Dt&&gr.length&&qr!=="inline"&&tn(Et)},vi=j(function($r){Yn==null||Yn(Ct($r)),fi($r)}),Qr=j(function($r,Or){var Vr=gr.filter(function(ni){return ni!==$r});if(Or)Vr.push($r);else if(qr!=="inline"){var Kt=mi($r);Vr=Vr.filter(function(ni){return!Kt.has(ni)})}(0,C.Z)(gr,Vr,!0)||tn(Vr,!0)}),ii=function(Or,Vr){var Kt=Vr!=null?Vr:!gr.includes(Or);Qr(Or,Kt)},Di=Le(qr,ti,Sr,hr,Br,Ui,rs,wr,ii,mr);g.useEffect(function(){Zr(!0)},[]);var _i=g.useMemo(function(){return{_internalRenderMenuItem:Hn,_internalRenderSubMenuItem:Sn}},[Hn,Sn]),is=qr!=="horizontal"||gn?ar:ar.map(function($r,Or){return g.createElement(A,{key:$r.key,overflowDisabled:Or>Li},$r)}),bs=g.createElement(o.Z,(0,x.Z)({id:Nn,ref:Br,prefixCls:"".concat(Nt,"-overflow"),component:"ul",itemComponent:Pe,className:te()(Nt,"".concat(Nt,"-root"),"".concat(Nt,"-").concat(qr),$t,(0,ae.Z)((0,ae.Z)({},"".concat(Nt,"-inline-collapsed"),ts),"".concat(Nt,"-rtl"),Sr),wt),dir:Un,style:Zt,role:"menu",tabIndex:xn,data:is,renderRawItem:function(Or){return Or},renderRawRest:function(Or){var Vr=Or.length,Kt=Vr?ar.slice(-Vr):null;return g.createElement(Ft,{eventKey:M,title:dr,disabled:Mi,internalPopupClose:Vr===0,popupClassName:ir},Kt)},maxCount:qr!=="horizontal"||gn?o.Z.INVALIDATE:o.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(Or){Ni(Or)},onKeyDown:Di},Qn));return g.createElement(W.Provider,{value:_i},g.createElement(S.Provider,{value:hr},g.createElement(A,{prefixCls:Nt,rootClassName:wt,mode:qr,openKeys:gr,rtl:Sr,disabled:sn,motion:ei?Wt:null,defaultMotions:ei?vn:null,activeKey:ti,onActive:Er,onInactive:Yr,selectedKeys:Xr,inlineIndent:gt,subMenuOpenDelay:jn,subMenuCloseDelay:Vn,forceSubMenuRender:or,builtinPlacements:Zn,triggerSubMenuAction:Pn,getPopupContainer:tr,itemIcon:Kn,expandIcon:er,onItemClick:vi,onOpenChange:Qr},g.createElement(le.Provider,{value:Ki},bs),g.createElement("div",{style:{display:"none"},"aria-hidden":!0},g.createElement(ee.Provider,{value:Wi},Pr)))))}),ln=Xt,nn=ln;nn.Item=Pe,nn.SubMenu=Ft,nn.ItemGroup=St,nn.Divider=Ue;var zt=nn},11780:function(on,je,E){"use strict";E.d(je,{Z:function(){return V}});var x=E(71409),ae=E(89490),ve=E(11036),fe=E(39224),F=E(59301),f=E(92310),ue=E.n(f),te=E(29301),o=E(34280),y=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],C=void 0;function h(v,m){var U=v.prefixCls,se=v.invalidate,pe=v.item,He=v.renderItem,qe=v.responsive,ot=v.responsiveDisabled,Ot=v.registerSize,bt=v.itemKey,xe=v.className,_t=v.style,Qt=v.children,Lt=v.display,qt=v.order,tt=v.component,Re=tt===void 0?"div":tt,ye=(0,fe.Z)(v,y),Z=qe&&!Lt;function we(ne){Ot(bt,ne)}F.useEffect(function(){return function(){we(null)}},[]);var Le=He&&pe!==C?He(pe,{index:qt}):Qt,$;se||($={opacity:Z?0:1,height:Z?0:C,overflowY:Z?"hidden":C,order:qe?qt:C,pointerEvents:Z?"none":C,position:Z?"absolute":C});var P={};Z&&(P["aria-hidden"]=!0);var K=F.createElement(Re,(0,x.Z)({className:ue()(!se&&U,xe),style:(0,ae.Z)((0,ae.Z)({},$),_t)},P,ye,{ref:m}),Le);return qe&&(K=F.createElement(te.Z,{onResize:function(M){var B=M.offsetWidth;we(B)},disabled:ot},K)),K}var g=F.forwardRef(h);g.displayName="Item";var _=g,S=E(6089),L=E(4676),N=E(16089);function H(v){if(typeof MessageChannel=="undefined")(0,N.Z)(v);else{var m=new MessageChannel;m.port1.onmessage=function(){return v()},m.port2.postMessage(void 0)}}function R(){var v=F.useRef(null),m=function(se){v.current||(v.current=[],H(function(){(0,L.unstable_batchedUpdates)(function(){v.current.forEach(function(pe){pe()}),v.current=null})})),v.current.push(se)};return m}function k(v,m){var U=F.useState(m),se=(0,ve.Z)(U,2),pe=se[0],He=se[1],qe=(0,S.Z)(function(ot){v(function(){He(ot)})});return[pe,qe]}var T=F.createContext(null),A=["component"],J=["className"],ee=["className"],G=function(m,U){var se=F.useContext(T);if(!se){var pe=m.component,He=pe===void 0?"div":pe,qe=(0,fe.Z)(m,A);return F.createElement(He,(0,x.Z)({},qe,{ref:U}))}var ot=se.className,Ot=(0,fe.Z)(se,J),bt=m.className,xe=(0,fe.Z)(m,ee);return F.createElement(T.Provider,{value:null},F.createElement(_,(0,x.Z)({ref:U,className:ue()(ot,bt)},Ot,xe)))},I=F.forwardRef(G);I.displayName="RawItem";var re=I,le=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Te="responsive",W="invalidate";function O(v){return"+ ".concat(v.length," ...")}function Q(v,m){var U=v.prefixCls,se=U===void 0?"rc-overflow":U,pe=v.data,He=pe===void 0?[]:pe,qe=v.renderItem,ot=v.renderRawItem,Ot=v.itemKey,bt=v.itemWidth,xe=bt===void 0?10:bt,_t=v.ssr,Qt=v.style,Lt=v.className,qt=v.maxCount,tt=v.renderRest,Re=v.renderRawRest,ye=v.suffix,Z=v.component,we=Z===void 0?"div":Z,Le=v.itemComponent,$=v.onVisibleChange,P=(0,fe.Z)(v,le),K=_t==="full",ne=R(),M=k(ne,null),B=(0,ve.Z)(M,2),j=B[0],me=B[1],de=j||0,Ae=k(ne,new Map),Ee=(0,ve.Z)(Ae,2),Ce=Ee[0],Fe=Ee[1],Be=k(ne,0),Ye=(0,ve.Z)(Be,2),xt=Ye[0],lt=Ye[1],nt=k(ne,0),Ut=(0,ve.Z)(nt,2),Vt=Ut[0],Ct=Ut[1],Jt=k(ne,0),wn=(0,ve.Z)(Jt,2),Rt=wn[0],Yt=wn[1],Ne=(0,F.useState)(null),ke=(0,ve.Z)(Ne,2),Pe=ke[0],z=ke[1],oe=(0,F.useState)(null),he=(0,ve.Z)(oe,2),ce=he[0],be=he[1],ze=F.useMemo(function(){return ce===null&&K?Number.MAX_SAFE_INTEGER:ce||0},[ce,j]),Ze=(0,F.useState)(!1),$e=(0,ve.Z)(Ze,2),ft=$e[0],en=$e[1],an="".concat(se,"-item"),yt=Math.max(xt,Vt),Gt=qt===Te,_n=He.length&&Gt,Bn=qt===W,cn=_n||typeof qt=="number"&&He.length>qt,pn=(0,F.useMemo)(function(){var nn=He;return _n?j===null&&K?nn=He:nn=He.slice(0,Math.min(He.length,de/xe)):typeof qt=="number"&&(nn=He.slice(0,qt)),nn},[He,xe,j,qt,_n]),Tn=(0,F.useMemo)(function(){return _n?He.slice(ze+1):He.slice(pn.length)},[He,pn,_n,ze]),mn=(0,F.useCallback)(function(nn,zt){var De;return typeof Ot=="function"?Ot(nn):(De=Ot&&(nn==null?void 0:nn[Ot]))!==null&&De!==void 0?De:zt},[Ot]),An=(0,F.useCallback)(qe||function(nn){return nn},[qe]);function Ft(nn,zt,De){ce===nn&&(zt===void 0||zt===Pe)||(be(nn),De||(en(nn<He.length-1),$==null||$(nn)),zt!==void 0&&z(zt))}function Wn(nn,zt){me(zt.clientWidth)}function Ue(nn,zt){Fe(function(De){var Se=new Map(De);return zt===null?Se.delete(nn):Se.set(nn,zt),Se})}function Oe(nn,zt){Ct(zt),lt(Vt)}function Bt(nn,zt){Yt(zt)}function kt(nn){return Ce.get(mn(pn[nn],nn))}(0,o.Z)(function(){if(de&&typeof yt=="number"&&pn){var nn=Rt,zt=pn.length,De=zt-1;if(!zt){Ft(0,null);return}for(var Se=0;Se<zt;Se+=1){var et=kt(Se);if(K&&(et=et||0),et===void 0){Ft(Se-1,void 0,!0);break}if(nn+=et,De===0&&nn<=de||Se===De-1&&nn+kt(De)<=de){Ft(De,null);break}else if(nn+yt>de){Ft(Se-1,nn-et-Rt+Vt);break}}ye&&kt(0)+Rt>de&&z(null)}},[de,Ce,Vt,Rt,mn,pn]);var St=ft&&!!Tn.length,fn={};Pe!==null&&_n&&(fn={position:"absolute",left:Pe,top:0});var Ve={prefixCls:an,responsive:_n,component:Le,invalidate:Bn},Qe=ot?function(nn,zt){var De=mn(nn,zt);return F.createElement(T.Provider,{key:De,value:(0,ae.Z)((0,ae.Z)({},Ve),{},{order:zt,item:nn,itemKey:De,registerSize:Ue,display:zt<=ze})},ot(nn,zt))}:function(nn,zt){var De=mn(nn,zt);return F.createElement(_,(0,x.Z)({},Ve,{order:zt,key:De,item:nn,renderItem:An,itemKey:De,registerSize:Ue,display:zt<=ze}))},Tt={order:St?ze:Number.MAX_SAFE_INTEGER,className:"".concat(an,"-rest"),registerSize:Oe,display:St},Et=tt||O,Xt=Re?F.createElement(T.Provider,{value:(0,ae.Z)((0,ae.Z)({},Ve),Tt)},Re(Tn)):F.createElement(_,(0,x.Z)({},Ve,Tt),typeof Et=="function"?Et(Tn):Et),ln=F.createElement(we,(0,x.Z)({className:ue()(!Bn&&se,Lt),style:Qt,ref:m},P),pn.map(Qe),cn?Xt:null,ye&&F.createElement(_,(0,x.Z)({},Ve,{responsive:Gt,responsiveDisabled:!_n,order:ze,className:"".concat(an,"-suffix"),registerSize:Bt,display:!0,style:fn}),ye));return Gt?F.createElement(te.Z,{onResize:Wn,disabled:!_n},ln):ln}var q=F.forwardRef(Q);q.displayName="Overflow",q.Item=re,q.RESPONSIVE=Te,q.INVALIDATE=W;var ie=q,V=ie},23425:function(on,je,E){"use strict";E.d(je,{Z:function(){return ee}});var x=E(87075),ae=E(71409),ve=E(28788),fe=E(89490),F=E(11036),f=E(92310),ue=E.n(f),te=E(18929),o=E(10228),y=E(26112),C=E(48736),h=E(59301),g=E(17119),_=[10,20,50,100],S=function(I){var re=I.pageSizeOptions,le=re===void 0?_:re,Te=I.locale,W=I.changeSize,O=I.pageSize,Q=I.goButton,q=I.quickGo,ie=I.rootPrefixCls,V=I.disabled,v=I.buildOptionText,m=I.showSizeChanger,U=I.sizeChangerRender,se=h.useState(""),pe=(0,F.Z)(se,2),He=pe[0],qe=pe[1],ot=function(){return!He||Number.isNaN(He)?void 0:Number(He)},Ot=typeof v=="function"?v:function(ye){return"".concat(ye," ").concat(Te.items_per_page)},bt=function(Z){qe(Z.target.value)},xe=function(Z){Q||He===""||(qe(""),!(Z.relatedTarget&&(Z.relatedTarget.className.indexOf("".concat(ie,"-item-link"))>=0||Z.relatedTarget.className.indexOf("".concat(ie,"-item"))>=0))&&(q==null||q(ot())))},_t=function(Z){He!==""&&(Z.keyCode===o.Z.ENTER||Z.type==="click")&&(qe(""),q==null||q(ot()))},Qt=function(){return le.some(function(Z){return Z.toString()===O.toString()})?le:le.concat([O]).sort(function(Z,we){var Le=Number.isNaN(Number(Z))?0:Number(Z),$=Number.isNaN(Number(we))?0:Number(we);return Le-$})},Lt="".concat(ie,"-options");if(!m&&!q)return null;var qt=null,tt=null,Re=null;return m&&U&&(qt=U({disabled:V,size:O,onSizeChange:function(Z){W==null||W(Number(Z))},"aria-label":Te.page_size,className:"".concat(Lt,"-size-changer"),options:Qt().map(function(ye){return{label:Ot(ye),value:ye}})})),q&&(Q&&(Re=typeof Q=="boolean"?h.createElement("button",{type:"button",onClick:_t,onKeyUp:_t,disabled:V,className:"".concat(Lt,"-quick-jumper-button")},Te.jump_to_confirm):h.createElement("span",{onClick:_t,onKeyUp:_t},Q)),tt=h.createElement("div",{className:"".concat(Lt,"-quick-jumper")},Te.jump_to,h.createElement("input",{disabled:V,type:"text",value:He,onChange:bt,onKeyUp:_t,onBlur:xe,"aria-label":Te.page}),Te.page,Re)),h.createElement("li",{className:Lt},qt,tt)},L=S,N=function(I){var re=I.rootPrefixCls,le=I.page,Te=I.active,W=I.className,O=I.showTitle,Q=I.onClick,q=I.onKeyPress,ie=I.itemRender,V="".concat(re,"-item"),v=ue()(V,"".concat(V,"-").concat(le),(0,x.Z)((0,x.Z)({},"".concat(V,"-active"),Te),"".concat(V,"-disabled"),!le),W),m=function(){Q(le)},U=function(He){q(He,Q,le)},se=ie(le,"page",h.createElement("a",{rel:"nofollow"},le));return se?h.createElement("li",{title:O?String(le):null,className:v,onClick:m,onKeyDown:U,tabIndex:0},se):null},H=N,R=function(I,re,le){return le};function k(){}function T(G){var I=Number(G);return typeof I=="number"&&!Number.isNaN(I)&&isFinite(I)&&Math.floor(I)===I}function A(G,I,re){var le=typeof G=="undefined"?I:G;return Math.floor((re-1)/le)+1}var J=function(I){var re=I.prefixCls,le=re===void 0?"rc-pagination":re,Te=I.selectPrefixCls,W=Te===void 0?"rc-select":Te,O=I.className,Q=I.current,q=I.defaultCurrent,ie=q===void 0?1:q,V=I.total,v=V===void 0?0:V,m=I.pageSize,U=I.defaultPageSize,se=U===void 0?10:U,pe=I.onChange,He=pe===void 0?k:pe,qe=I.hideOnSinglePage,ot=I.align,Ot=I.showPrevNextJumpers,bt=Ot===void 0?!0:Ot,xe=I.showQuickJumper,_t=I.showLessItems,Qt=I.showTitle,Lt=Qt===void 0?!0:Qt,qt=I.onShowSizeChange,tt=qt===void 0?k:qt,Re=I.locale,ye=Re===void 0?g.Z:Re,Z=I.style,we=I.totalBoundaryShowSizeChanger,Le=we===void 0?50:we,$=I.disabled,P=I.simple,K=I.showTotal,ne=I.showSizeChanger,M=ne===void 0?v>Le:ne,B=I.sizeChangerRender,j=I.pageSizeOptions,me=I.itemRender,de=me===void 0?R:me,Ae=I.jumpPrevIcon,Ee=I.jumpNextIcon,Ce=I.prevIcon,Fe=I.nextIcon,Be=h.useRef(null),Ye=(0,te.Z)(10,{value:m,defaultValue:se}),xt=(0,F.Z)(Ye,2),lt=xt[0],nt=xt[1],Ut=(0,te.Z)(1,{value:Q,defaultValue:ie,postState:function(gn){return Math.max(1,Math.min(gn,A(void 0,lt,v)))}}),Vt=(0,F.Z)(Ut,2),Ct=Vt[0],Jt=Vt[1],wn=h.useState(Ct),Rt=(0,F.Z)(wn,2),Yt=Rt[0],Ne=Rt[1];(0,h.useEffect)(function(){Ne(Ct)},[Ct]);var ke=He!==k,Pe="current"in I,z=Math.max(1,Ct-(_t?3:5)),oe=Math.min(A(void 0,lt,v),Ct+(_t?3:5));function he(sn,gn){var yn=sn||h.createElement("button",{type:"button","aria-label":gn,className:"".concat(le,"-item-link")});return typeof sn=="function"&&(yn=h.createElement(sn,(0,fe.Z)({},I))),yn}function ce(sn){var gn=sn.target.value,yn=A(void 0,lt,v),jn;return gn===""?jn=gn:Number.isNaN(Number(gn))?jn=Yt:gn>=yn?jn=yn:jn=Number(gn),jn}function be(sn){return T(sn)&&sn!==Ct&&T(v)&&v>0}var ze=v>lt?xe:!1;function Ze(sn){(sn.keyCode===o.Z.UP||sn.keyCode===o.Z.DOWN)&&sn.preventDefault()}function $e(sn){var gn=ce(sn);switch(gn!==Yt&&Ne(gn),sn.keyCode){case o.Z.ENTER:an(gn);break;case o.Z.UP:an(gn-1);break;case o.Z.DOWN:an(gn+1);break;default:break}}function ft(sn){an(ce(sn))}function en(sn){var gn=A(sn,lt,v),yn=Ct>gn&&gn!==0?gn:Ct;nt(sn),Ne(yn),tt==null||tt(Ct,sn),Jt(yn),He==null||He(yn,sn)}function an(sn){if(be(sn)&&!$){var gn=A(void 0,lt,v),yn=sn;return sn>gn?yn=gn:sn<1&&(yn=1),yn!==Yt&&Ne(yn),Jt(yn),He==null||He(yn,lt),yn}return Ct}var yt=Ct>1,Gt=Ct<A(void 0,lt,v);function _n(){yt&&an(Ct-1)}function Bn(){Gt&&an(Ct+1)}function cn(){an(z)}function pn(){an(oe)}function Tn(sn,gn){if(sn.key==="Enter"||sn.charCode===o.Z.ENTER||sn.keyCode===o.Z.ENTER){for(var yn=arguments.length,jn=new Array(yn>2?yn-2:0),kn=2;kn<yn;kn++)jn[kn-2]=arguments[kn];gn.apply(void 0,jn)}}function mn(sn){Tn(sn,_n)}function An(sn){Tn(sn,Bn)}function Ft(sn){Tn(sn,cn)}function Wn(sn){Tn(sn,pn)}function Ue(sn){var gn=de(sn,"prev",he(Ce,"prev page"));return h.isValidElement(gn)?h.cloneElement(gn,{disabled:!yt}):gn}function Oe(sn){var gn=de(sn,"next",he(Fe,"next page"));return h.isValidElement(gn)?h.cloneElement(gn,{disabled:!Gt}):gn}function Bt(sn){(sn.type==="click"||sn.keyCode===o.Z.ENTER)&&an(Yt)}var kt=null,St=(0,y.Z)(I,{aria:!0,data:!0}),fn=K&&h.createElement("li",{className:"".concat(le,"-total-text")},K(v,[v===0?0:(Ct-1)*lt+1,Ct*lt>v?v:Ct*lt])),Ve=null,Qe=A(void 0,lt,v);if(qe&&v<=lt)return null;var Tt=[],Et={rootPrefixCls:le,onClick:an,onKeyPress:Tn,showTitle:Lt,itemRender:de,page:-1},Xt=Ct-1>0?Ct-1:0,ln=Ct+1<Qe?Ct+1:Qe,nn=xe&&xe.goButton,zt=(0,ve.Z)(P)==="object"?P.readOnly:!P,De=nn,Se=null;P&&(nn&&(typeof nn=="boolean"?De=h.createElement("button",{type:"button",onClick:Bt,onKeyUp:Bt},ye.jump_to_confirm):De=h.createElement("span",{onClick:Bt,onKeyUp:Bt},nn),De=h.createElement("li",{title:Lt?"".concat(ye.jump_to).concat(Ct,"/").concat(Qe):null,className:"".concat(le,"-simple-pager")},De)),Se=h.createElement("li",{title:Lt?"".concat(Ct,"/").concat(Qe):null,className:"".concat(le,"-simple-pager")},zt?Yt:h.createElement("input",{type:"text","aria-label":ye.jump_to,value:Yt,disabled:$,onKeyDown:Ze,onKeyUp:$e,onChange:$e,onBlur:ft,size:3}),h.createElement("span",{className:"".concat(le,"-slash")},"/"),Qe));var et=_t?1:2;if(Qe<=3+et*2){Qe||Tt.push(h.createElement(H,(0,ae.Z)({},Et,{key:"noPager",page:1,className:"".concat(le,"-item-disabled")})));for(var rt=1;rt<=Qe;rt+=1)Tt.push(h.createElement(H,(0,ae.Z)({},Et,{key:rt,page:rt,active:Ct===rt})))}else{var It=_t?ye.prev_3:ye.prev_5,Nt=_t?ye.next_3:ye.next_5,wt=de(z,"jump-prev",he(Ae,"prev page")),Zt=de(oe,"jump-next",he(Ee,"next page"));bt&&(kt=wt?h.createElement("li",{title:Lt?It:null,key:"prev",onClick:cn,tabIndex:0,onKeyDown:Ft,className:ue()("".concat(le,"-jump-prev"),(0,x.Z)({},"".concat(le,"-jump-prev-custom-icon"),!!Ae))},wt):null,Ve=Zt?h.createElement("li",{title:Lt?Nt:null,key:"next",onClick:pn,tabIndex:0,onKeyDown:Wn,className:ue()("".concat(le,"-jump-next"),(0,x.Z)({},"".concat(le,"-jump-next-custom-icon"),!!Ee))},Zt):null);var $t=Math.max(1,Ct-et),jt=Math.min(Ct+et,Qe);Ct-1<=et&&(jt=1+et*2),Qe-Ct<=et&&($t=Qe-et*2);for(var xn=$t;xn<=jt;xn+=1)Tt.push(h.createElement(H,(0,ae.Z)({},Et,{key:xn,page:xn,active:Ct===xn})));if(Ct-1>=et*2&&Ct!==3&&(Tt[0]=h.cloneElement(Tt[0],{className:ue()("".concat(le,"-item-after-jump-prev"),Tt[0].props.className)}),Tt.unshift(kt)),Qe-Ct>=et*2&&Ct!==Qe-2){var un=Tt[Tt.length-1];Tt[Tt.length-1]=h.cloneElement(un,{className:ue()("".concat(le,"-item-before-jump-next"),un.props.className)}),Tt.push(Ve)}$t!==1&&Tt.unshift(h.createElement(H,(0,ae.Z)({},Et,{key:1,page:1}))),jt!==Qe&&Tt.push(h.createElement(H,(0,ae.Z)({},Et,{key:Qe,page:Qe})))}var Cn=Ue(Xt);if(Cn){var Un=!yt||!Qe;Cn=h.createElement("li",{title:Lt?ye.prev_page:null,onClick:_n,tabIndex:Un?null:0,onKeyDown:mn,className:ue()("".concat(le,"-prev"),(0,x.Z)({},"".concat(le,"-disabled"),Un)),"aria-disabled":Un},Cn)}var Nn=Oe(ln);if(Nn){var Rn,In;P?(Rn=!Gt,In=yt?0:null):(Rn=!Gt||!Qe,In=Rn?null:0),Nn=h.createElement("li",{title:Lt?ye.next_page:null,onClick:Bn,tabIndex:In,onKeyDown:An,className:ue()("".concat(le,"-next"),(0,x.Z)({},"".concat(le,"-disabled"),Rn)),"aria-disabled":Rn},Nn)}var $n=ue()(le,O,(0,x.Z)((0,x.Z)((0,x.Z)((0,x.Z)((0,x.Z)({},"".concat(le,"-start"),ot==="start"),"".concat(le,"-center"),ot==="center"),"".concat(le,"-end"),ot==="end"),"".concat(le,"-simple"),P),"".concat(le,"-disabled"),$));return h.createElement("ul",(0,ae.Z)({className:$n,style:Z,ref:Be},St),fn,Cn,P?Se:Tt,Nn,h.createElement(L,{locale:ye,rootPrefixCls:le,disabled:$,selectPrefixCls:W,changeSize:en,pageSize:lt,pageSizeOptions:j,quickGo:ze?an:null,goButton:De,showSizeChanger:M,sizeChangerRender:B}))},ee=J},738:function(on,je,E){"use strict";E.d(je,{Z:function(){return k}});var x=E(71409),ae=E(87075),ve=E(11036),fe=E(39224),F=E(92310),f=E.n(F),ue=E(18929),te=E(10228),o=E(26112),y=E(59301);function C(T,A){var J=T.disabled,ee=T.prefixCls,G=T.character,I=T.characterRender,re=T.index,le=T.count,Te=T.value,W=T.allowHalf,O=T.focused,Q=T.onHover,q=T.onClick,ie=function(qe){Q(qe,re)},V=function(qe){q(qe,re)},v=function(qe){qe.keyCode===te.Z.ENTER&&q(qe,re)},m=re+1,U=new Set([ee]);Te===0&&re===0&&O?U.add("".concat(ee,"-focused")):W&&Te+.5>=m&&Te<m?(U.add("".concat(ee,"-half")),U.add("".concat(ee,"-active")),O&&U.add("".concat(ee,"-focused"))):(m<=Te?U.add("".concat(ee,"-full")):U.add("".concat(ee,"-zero")),m===Te&&O&&U.add("".concat(ee,"-focused")));var se=typeof G=="function"?G(T):G,pe=y.createElement("li",{className:f()(Array.from(U)),ref:A},y.createElement("div",{onClick:J?null:V,onKeyDown:J?null:v,onMouseMove:J?null:ie,role:"radio","aria-checked":Te>re?"true":"false","aria-posinset":re+1,"aria-setsize":le,tabIndex:J?-1:0},y.createElement("div",{className:"".concat(ee,"-first")},se),y.createElement("div",{className:"".concat(ee,"-second")},se)));return I&&(pe=I(pe,T)),pe}var h=y.forwardRef(C);function g(){var T=y.useRef({});function A(ee){return T.current[ee]}function J(ee){return function(G){T.current[ee]=G}}return[A,J]}function _(T){var A=T.pageXOffset,J="scrollLeft";if(typeof A!="number"){var ee=T.document;A=ee.documentElement[J],typeof A!="number"&&(A=ee.body[J])}return A}function S(T){var A,J,ee=T.ownerDocument,G=ee.body,I=ee&&ee.documentElement,re=T.getBoundingClientRect();return A=re.left,J=re.top,A-=I.clientLeft||G.clientLeft||0,J-=I.clientTop||G.clientTop||0,{left:A,top:J}}function L(T){var A=S(T),J=T.ownerDocument,ee=J.defaultView||J.parentWindow;return A.left+=_(ee),A.left}var N=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function H(T,A){var J=T.prefixCls,ee=J===void 0?"rc-rate":J,G=T.className,I=T.defaultValue,re=T.value,le=T.count,Te=le===void 0?5:le,W=T.allowHalf,O=W===void 0?!1:W,Q=T.allowClear,q=Q===void 0?!0:Q,ie=T.keyboard,V=ie===void 0?!0:ie,v=T.character,m=v===void 0?"\u2605":v,U=T.characterRender,se=T.disabled,pe=T.direction,He=pe===void 0?"ltr":pe,qe=T.tabIndex,ot=qe===void 0?0:qe,Ot=T.autoFocus,bt=T.onHoverChange,xe=T.onChange,_t=T.onFocus,Qt=T.onBlur,Lt=T.onKeyDown,qt=T.onMouseLeave,tt=(0,fe.Z)(T,N),Re=g(),ye=(0,ve.Z)(Re,2),Z=ye[0],we=ye[1],Le=y.useRef(null),$=function(){if(!se){var z;(z=Le.current)===null||z===void 0||z.focus()}};y.useImperativeHandle(A,function(){return{focus:$,blur:function(){if(!se){var z;(z=Le.current)===null||z===void 0||z.blur()}}}});var P=(0,ue.Z)(I||0,{value:re}),K=(0,ve.Z)(P,2),ne=K[0],M=K[1],B=(0,ue.Z)(null),j=(0,ve.Z)(B,2),me=j[0],de=j[1],Ae=function(z,oe){var he=He==="rtl",ce=z+1;if(O){var be=Z(z),ze=L(be),Ze=be.clientWidth;(he&&oe-ze>Ze/2||!he&&oe-ze<Ze/2)&&(ce-=.5)}return ce},Ee=function(z){M(z),xe==null||xe(z)},Ce=y.useState(!1),Fe=(0,ve.Z)(Ce,2),Be=Fe[0],Ye=Fe[1],xt=function(){Ye(!0),_t==null||_t()},lt=function(){Ye(!1),Qt==null||Qt()},nt=y.useState(null),Ut=(0,ve.Z)(nt,2),Vt=Ut[0],Ct=Ut[1],Jt=function(z,oe){var he=Ae(oe,z.pageX);he!==me&&(Ct(he),de(null)),bt==null||bt(he)},wn=function(z){se||(Ct(null),de(null),bt==null||bt(void 0)),z&&(qt==null||qt(z))},Rt=function(z,oe){var he=Ae(oe,z.pageX),ce=!1;q&&(ce=he===ne),wn(),Ee(ce?0:he),de(ce?he:null)},Yt=function(z){var oe=z.keyCode,he=He==="rtl",ce=O?.5:1;V&&(oe===te.Z.RIGHT&&ne<Te&&!he?(Ee(ne+ce),z.preventDefault()):oe===te.Z.LEFT&&ne>0&&!he||oe===te.Z.RIGHT&&ne>0&&he?(Ee(ne-ce),z.preventDefault()):oe===te.Z.LEFT&&ne<Te&&he&&(Ee(ne+ce),z.preventDefault())),Lt==null||Lt(z)};y.useEffect(function(){Ot&&!se&&$()},[]);var Ne=new Array(Te).fill(0).map(function(Pe,z){return y.createElement(h,{ref:we(z),index:z,count:Te,disabled:se,prefixCls:"".concat(ee,"-star"),allowHalf:O,value:Vt===null?ne:Vt,onClick:Rt,onHover:Jt,key:Pe||z,character:m,characterRender:U,focused:Be})}),ke=f()(ee,G,(0,ae.Z)((0,ae.Z)({},"".concat(ee,"-disabled"),se),"".concat(ee,"-rtl"),He==="rtl"));return y.createElement("ul",(0,x.Z)({className:ke,onMouseLeave:wn,tabIndex:se?-1:ot,onFocus:se?null:xt,onBlur:se?null:lt,onKeyDown:se?null:Yt,ref:Le},(0,o.Z)(tt,{aria:!0,data:!0,attr:!0})),Ne)}var R=y.forwardRef(H),k=R},29301:function(on,je,E){"use strict";E.d(je,{Z:function(){return W}});var x=E(71409),ae=E(59301),ve=E(11592),fe=E(48736),F=E(89490),f=E(28788),ue=E(76846),te=E(8654),o=ae.createContext(null);function y(O){var Q=O.children,q=O.onBatchResize,ie=ae.useRef(0),V=ae.useRef([]),v=ae.useContext(o),m=ae.useCallback(function(U,se,pe){ie.current+=1;var He=ie.current;V.current.push({size:U,element:se,data:pe}),Promise.resolve().then(function(){He===ie.current&&(q==null||q(V.current),V.current=[])}),v==null||v(U,se,pe)},[q,v]);return ae.createElement(o.Provider,{value:m},Q)}var C=E(76374),h=new Map;function g(O){O.forEach(function(Q){var q,ie=Q.target;(q=h.get(ie))===null||q===void 0||q.forEach(function(V){return V(ie)})})}var _=new C.Z(g),S=null,L=null;function N(O,Q){h.has(O)||(h.set(O,new Set),_.observe(O)),h.get(O).add(Q)}function H(O,Q){h.has(O)&&(h.get(O).delete(Q),h.get(O).size||(_.unobserve(O),h.delete(O)))}var R=E(16552),k=E(19210),T=E(46654),A=E(37205),J=function(O){(0,T.Z)(q,O);var Q=(0,A.Z)(q);function q(){return(0,R.Z)(this,q),Q.apply(this,arguments)}return(0,k.Z)(q,[{key:"render",value:function(){return this.props.children}}]),q}(ae.Component);function ee(O,Q){var q=O.children,ie=O.disabled,V=ae.useRef(null),v=ae.useRef(null),m=ae.useContext(o),U=typeof q=="function",se=U?q(V):q,pe=ae.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),He=!U&&ae.isValidElement(se)&&(0,te.Yr)(se),qe=He?(0,te.C4)(se):null,ot=(0,te.x1)(qe,V),Ot=function(){var Qt;return(0,ue.ZP)(V.current)||(V.current&&(0,f.Z)(V.current)==="object"?(0,ue.ZP)((Qt=V.current)===null||Qt===void 0?void 0:Qt.nativeElement):null)||(0,ue.ZP)(v.current)};ae.useImperativeHandle(Q,function(){return Ot()});var bt=ae.useRef(O);bt.current=O;var xe=ae.useCallback(function(_t){var Qt=bt.current,Lt=Qt.onResize,qt=Qt.data,tt=_t.getBoundingClientRect(),Re=tt.width,ye=tt.height,Z=_t.offsetWidth,we=_t.offsetHeight,Le=Math.floor(Re),$=Math.floor(ye);if(pe.current.width!==Le||pe.current.height!==$||pe.current.offsetWidth!==Z||pe.current.offsetHeight!==we){var P={width:Le,height:$,offsetWidth:Z,offsetHeight:we};pe.current=P;var K=Z===Math.round(Re)?Re:Z,ne=we===Math.round(ye)?ye:we,M=(0,F.Z)((0,F.Z)({},P),{},{offsetWidth:K,offsetHeight:ne});m==null||m(M,_t,qt),Lt&&Promise.resolve().then(function(){Lt(M,_t)})}},[]);return ae.useEffect(function(){var _t=Ot();return _t&&!ie&&N(_t,xe),function(){return H(_t,xe)}},[V.current,ie]),ae.createElement(J,{ref:v},He?ae.cloneElement(se,{ref:ot}):se)}var G=ae.forwardRef(ee),I=G,re="rc-observer-key";function le(O,Q){var q=O.children,ie=typeof q=="function"?[q]:(0,ve.Z)(q);return ie.map(function(V,v){var m=(V==null?void 0:V.key)||"".concat(re,"-").concat(v);return ae.createElement(I,(0,x.Z)({},O,{key:m,ref:v===0?Q:void 0}),V)})}var Te=ae.forwardRef(le);Te.Collection=y;var W=Te},6551:function(on,je,E){"use strict";E.d(je,{ZP:function(){return ue}});var x=E(11036),ae=E(59301),ve=E(47273),fe=0,F=(0,ve.Z)();function f(){var te;return F?(te=fe,fe+=1):te="TEST_OR_SSR",te}function ue(te){var o=ae.useState(),y=(0,x.Z)(o,2),C=y[0],h=y[1];return ae.useEffect(function(){h("rc_select_".concat(f()))},[]),te||C}},37463:function(on,je,E){"use strict";E.d(je,{Ac:function(){return Ye},Xo:function(){return lt},Wx:function(){return Ut},ZP:function(){return Wn},lk:function(){return k}});var x=E(71409),ae=E(62730),ve=E(87075),fe=E(89490),F=E(11036),f=E(39224),ue=E(28788),te=E(18929),o=E(48736),y=E(59301),C=E(92310),h=E.n(C),g=E(34280),_=E(49658),S=E(8654),L=function(Oe){var Bt=Oe.className,kt=Oe.customizeIcon,St=Oe.customizeIconProps,fn=Oe.children,Ve=Oe.onMouseDown,Qe=Oe.onClick,Tt=typeof kt=="function"?kt(St):kt;return y.createElement("span",{className:Bt,onMouseDown:function(Xt){Xt.preventDefault(),Ve==null||Ve(Xt)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:Qe,"aria-hidden":!0},Tt!==void 0?Tt:y.createElement("span",{className:h()(Bt.split(/\s+/).map(function(Et){return"".concat(Et,"-icon")}))},fn))},N=L,H=function(Oe,Bt,kt,St,fn){var Ve=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,Qe=arguments.length>6?arguments[6]:void 0,Tt=arguments.length>7?arguments[7]:void 0,Et=y.useMemo(function(){if((0,ue.Z)(St)==="object")return St.clearIcon;if(fn)return fn},[St,fn]),Xt=y.useMemo(function(){return!!(!Ve&&St&&(kt.length||Qe)&&!(Tt==="combobox"&&Qe===""))},[St,Ve,kt.length,Qe,Tt]);return{allowClear:Xt,clearIcon:y.createElement(N,{className:"".concat(Oe,"-clear"),onMouseDown:Bt,customizeIcon:Et},"\xD7")}},R=y.createContext(null);function k(){return y.useContext(R)}function T(){var Ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,Oe=y.useState(!1),Bt=(0,F.Z)(Oe,2),kt=Bt[0],St=Bt[1],fn=y.useRef(null),Ve=function(){window.clearTimeout(fn.current)};y.useEffect(function(){return Ve},[]);var Qe=function(Et,Xt){Ve(),fn.current=window.setTimeout(function(){St(Et),Xt&&Xt()},Ue)};return[kt,Qe,Ve]}function A(){var Ue=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,Oe=y.useRef(null),Bt=y.useRef(null);y.useEffect(function(){return function(){window.clearTimeout(Bt.current)}},[]);function kt(St){(St||Oe.current===null)&&(Oe.current=St),window.clearTimeout(Bt.current),Bt.current=window.setTimeout(function(){Oe.current=null},Ue)}return[function(){return Oe.current},kt]}function J(Ue,Oe,Bt,kt){var St=y.useRef(null);St.current={open:Oe,triggerOpen:Bt,customizedTrigger:kt},y.useEffect(function(){function fn(Ve){var Qe;if(!((Qe=St.current)!==null&&Qe!==void 0&&Qe.customizedTrigger)){var Tt=Ve.target;Tt.shadowRoot&&Ve.composed&&(Tt=Ve.composedPath()[0]||Tt),St.current.open&&Ue().filter(function(Et){return Et}).every(function(Et){return!Et.contains(Tt)&&Et!==Tt})&&St.current.triggerOpen(!1)}}return window.addEventListener("mousedown",fn),function(){return window.removeEventListener("mousedown",fn)}},[])}var ee=E(10228);function G(Ue){return Ue&&![ee.Z.ESC,ee.Z.SHIFT,ee.Z.BACKSPACE,ee.Z.TAB,ee.Z.WIN_KEY,ee.Z.ALT,ee.Z.META,ee.Z.WIN_KEY_RIGHT,ee.Z.CTRL,ee.Z.SEMICOLON,ee.Z.EQUALS,ee.Z.CAPS_LOCK,ee.Z.CONTEXT_MENU,ee.Z.F1,ee.Z.F2,ee.Z.F3,ee.Z.F4,ee.Z.F5,ee.Z.F6,ee.Z.F7,ee.Z.F8,ee.Z.F9,ee.Z.F10,ee.Z.F11,ee.Z.F12].includes(Ue)}var I=E(26112),re=E(11780);function le(Ue,Oe,Bt){var kt=(0,fe.Z)((0,fe.Z)({},Ue),Bt?Oe:{});return Object.keys(Oe).forEach(function(St){var fn=Oe[St];typeof fn=="function"&&(kt[St]=function(){for(var Ve,Qe=arguments.length,Tt=new Array(Qe),Et=0;Et<Qe;Et++)Tt[Et]=arguments[Et];return fn.apply(void 0,Tt),(Ve=Ue[St])===null||Ve===void 0?void 0:Ve.call.apply(Ve,[Ue].concat(Tt))})}),kt}var Te=le,W=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],O=function(Oe,Bt){var kt=Oe.prefixCls,St=Oe.id,fn=Oe.inputElement,Ve=Oe.autoFocus,Qe=Oe.autoComplete,Tt=Oe.editable,Et=Oe.activeDescendantId,Xt=Oe.value,ln=Oe.open,nn=Oe.attrs,zt=(0,f.Z)(Oe,W),De=fn||y.createElement("input",null),Se=De,et=Se.ref,rt=Se.props;return(0,o.Kp)(!("maxLength"in De.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),De=y.cloneElement(De,(0,fe.Z)((0,fe.Z)((0,fe.Z)({type:"search"},Te(zt,rt,!0)),{},{id:St,ref:(0,S.sQ)(Bt,et),autoComplete:Qe||"off",autoFocus:Ve,className:h()("".concat(kt,"-selection-search-input"),rt==null?void 0:rt.className),role:"combobox","aria-expanded":ln||!1,"aria-haspopup":"listbox","aria-owns":"".concat(St,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(St,"_list"),"aria-activedescendant":ln?Et:void 0},nn),{},{value:Tt?Xt:"",readOnly:!Tt,unselectable:Tt?null:"on",style:(0,fe.Z)((0,fe.Z)({},rt.style),{},{opacity:Tt?null:0})})),De},Q=y.forwardRef(O),q=Q;function ie(Ue){return Array.isArray(Ue)?Ue:Ue!==void 0?[Ue]:[]}var V=typeof window!="undefined"&&window.document&&window.document.documentElement,v=V;function m(Ue){return Ue!=null}function U(Ue){return!Ue&&Ue!==0}function se(Ue){return["string","number"].includes((0,ue.Z)(Ue))}function pe(Ue){var Oe=void 0;return Ue&&(se(Ue.title)?Oe=Ue.title.toString():se(Ue.label)&&(Oe=Ue.label.toString())),Oe}function He(Ue,Oe){v?y.useLayoutEffect(Ue,Oe):y.useEffect(Ue,Oe)}function qe(Ue){var Oe;return(Oe=Ue.key)!==null&&Oe!==void 0?Oe:Ue.value}var ot=function(Oe){Oe.preventDefault(),Oe.stopPropagation()},Ot=function(Oe){var Bt=Oe.id,kt=Oe.prefixCls,St=Oe.values,fn=Oe.open,Ve=Oe.searchValue,Qe=Oe.autoClearSearchValue,Tt=Oe.inputRef,Et=Oe.placeholder,Xt=Oe.disabled,ln=Oe.mode,nn=Oe.showSearch,zt=Oe.autoFocus,De=Oe.autoComplete,Se=Oe.activeDescendantId,et=Oe.tabIndex,rt=Oe.removeIcon,It=Oe.maxTagCount,Nt=Oe.maxTagTextLength,wt=Oe.maxTagPlaceholder,Zt=wt===void 0?function(at){return"+ ".concat(at.length," ...")}:wt,$t=Oe.tagRender,jt=Oe.onToggleOpen,xn=Oe.onRemove,un=Oe.onInputChange,Cn=Oe.onInputPaste,Un=Oe.onInputKeyDown,Nn=Oe.onInputMouseDown,Rn=Oe.onInputCompositionStart,In=Oe.onInputCompositionEnd,$n=Oe.onInputBlur,sn=y.useRef(null),gn=(0,y.useState)(0),yn=(0,F.Z)(gn,2),jn=yn[0],kn=yn[1],Vn=(0,y.useState)(!1),or=(0,F.Z)(Vn,2),ge=or[0],Xe=or[1],Ke="".concat(kt,"-selection"),We=fn||ln==="multiple"&&Qe===!1||ln==="tags"?Ve:"",it=ln==="tags"||ln==="multiple"&&Qe===!1||nn&&(fn||ge);He(function(){kn(sn.current.scrollWidth)},[We]);var ht=function(dt,gt,Wt,vn,rn){return y.createElement("span",{title:pe(dt),className:h()("".concat(Ke,"-item"),(0,ve.Z)({},"".concat(Ke,"-item-disabled"),Wt))},y.createElement("span",{className:"".concat(Ke,"-item-content")},gt),vn&&y.createElement(N,{className:"".concat(Ke,"-item-remove"),onMouseDown:ot,onClick:rn,customizeIcon:rt},"\xD7"))},Pt=function(dt,gt,Wt,vn,rn,Pn){var Zn=function(er){ot(er),jt(!fn)};return y.createElement("span",{onMouseDown:Zn},$t({label:gt,value:dt,disabled:Wt,closable:vn,onClose:rn,isMaxTag:!!Pn}))},Dt=function(dt){var gt=dt.disabled,Wt=dt.label,vn=dt.value,rn=!Xt&&!gt,Pn=Wt;if(typeof Nt=="number"&&(typeof Wt=="string"||typeof Wt=="number")){var Zn=String(Pn);Zn.length>Nt&&(Pn="".concat(Zn.slice(0,Nt),"..."))}var Kn=function(dn){dn&&dn.stopPropagation(),xn(dt)};return typeof $t=="function"?Pt(vn,Pn,gt,rn,Kn):ht(dt,Pn,gt,rn,Kn)},pt=function(dt){if(!St.length)return null;var gt=typeof Zt=="function"?Zt(dt):Zt;return typeof $t=="function"?Pt(void 0,gt,!1,!1,void 0,!0):ht({title:gt},gt,!1)},Ge=y.createElement("div",{className:"".concat(Ke,"-search"),style:{width:jn},onFocus:function(){Xe(!0)},onBlur:function(){Xe(!1)}},y.createElement(q,{ref:Tt,open:fn,prefixCls:kt,id:Bt,inputElement:null,disabled:Xt,autoFocus:zt,autoComplete:De,editable:it,activeDescendantId:Se,value:We,onKeyDown:Un,onMouseDown:Nn,onChange:un,onPaste:Cn,onCompositionStart:Rn,onCompositionEnd:In,onBlur:$n,tabIndex:et,attrs:(0,I.Z)(Oe,!0)}),y.createElement("span",{ref:sn,className:"".concat(Ke,"-search-mirror"),"aria-hidden":!0},We,"\xA0")),Je=y.createElement(re.Z,{prefixCls:"".concat(Ke,"-overflow"),data:St,renderItem:Dt,renderRest:pt,suffix:Ge,itemKey:qe,maxCount:It});return y.createElement("span",{className:"".concat(Ke,"-wrap")},Je,!St.length&&!We&&y.createElement("span",{className:"".concat(Ke,"-placeholder")},Et))},bt=Ot,xe=function(Oe){var Bt=Oe.inputElement,kt=Oe.prefixCls,St=Oe.id,fn=Oe.inputRef,Ve=Oe.disabled,Qe=Oe.autoFocus,Tt=Oe.autoComplete,Et=Oe.activeDescendantId,Xt=Oe.mode,ln=Oe.open,nn=Oe.values,zt=Oe.placeholder,De=Oe.tabIndex,Se=Oe.showSearch,et=Oe.searchValue,rt=Oe.activeValue,It=Oe.maxLength,Nt=Oe.onInputKeyDown,wt=Oe.onInputMouseDown,Zt=Oe.onInputChange,$t=Oe.onInputPaste,jt=Oe.onInputCompositionStart,xn=Oe.onInputCompositionEnd,un=Oe.onInputBlur,Cn=Oe.title,Un=y.useState(!1),Nn=(0,F.Z)(Un,2),Rn=Nn[0],In=Nn[1],$n=Xt==="combobox",sn=$n||Se,gn=nn[0],yn=et||"";$n&&rt&&!Rn&&(yn=rt),y.useEffect(function(){$n&&In(!1)},[$n,rt]);var jn=Xt!=="combobox"&&!ln&&!Se?!1:!!yn,kn=Cn===void 0?pe(gn):Cn,Vn=y.useMemo(function(){return gn?null:y.createElement("span",{className:"".concat(kt,"-selection-placeholder"),style:jn?{visibility:"hidden"}:void 0},zt)},[gn,jn,zt,kt]);return y.createElement("span",{className:"".concat(kt,"-selection-wrap")},y.createElement("span",{className:"".concat(kt,"-selection-search")},y.createElement(q,{ref:fn,prefixCls:kt,id:St,open:ln,inputElement:Bt,disabled:Ve,autoFocus:Qe,autoComplete:Tt,editable:sn,activeDescendantId:Et,value:yn,onKeyDown:Nt,onMouseDown:wt,onChange:function(ge){In(!0),Zt(ge)},onPaste:$t,onCompositionStart:jt,onCompositionEnd:xn,onBlur:un,tabIndex:De,attrs:(0,I.Z)(Oe,!0),maxLength:$n?It:void 0})),!$n&&gn?y.createElement("span",{className:"".concat(kt,"-selection-item"),title:kn,style:jn?{visibility:"hidden"}:void 0},gn.label):null,Vn)},_t=xe,Qt=function(Oe,Bt){var kt=(0,y.useRef)(null),St=(0,y.useRef)(!1),fn=Oe.prefixCls,Ve=Oe.open,Qe=Oe.mode,Tt=Oe.showSearch,Et=Oe.tokenWithEnter,Xt=Oe.disabled,ln=Oe.prefix,nn=Oe.autoClearSearchValue,zt=Oe.onSearch,De=Oe.onSearchSubmit,Se=Oe.onToggleOpen,et=Oe.onInputKeyDown,rt=Oe.onInputBlur,It=Oe.domRef;y.useImperativeHandle(Bt,function(){return{focus:function(kn){kt.current.focus(kn)},blur:function(){kt.current.blur()}}});var Nt=A(0),wt=(0,F.Z)(Nt,2),Zt=wt[0],$t=wt[1],jt=function(kn){var Vn=kn.which,or=kt.current instanceof HTMLTextAreaElement;!or&&Ve&&(Vn===ee.Z.UP||Vn===ee.Z.DOWN)&&kn.preventDefault(),et&&et(kn),Vn===ee.Z.ENTER&&Qe==="tags"&&!St.current&&!Ve&&(De==null||De(kn.target.value)),!(or&&!Ve&&~[ee.Z.UP,ee.Z.DOWN,ee.Z.LEFT,ee.Z.RIGHT].indexOf(Vn))&&G(Vn)&&Se(!0)},xn=function(){$t(!0)},un=(0,y.useRef)(null),Cn=function(kn){zt(kn,!0,St.current)!==!1&&Se(!0)},Un=function(){St.current=!0},Nn=function(kn){St.current=!1,Qe!=="combobox"&&Cn(kn.target.value)},Rn=function(kn){var Vn=kn.target.value;if(Et&&un.current&&/[\r\n]/.test(un.current)){var or=un.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");Vn=Vn.replace(or,un.current)}un.current=null,Cn(Vn)},In=function(kn){var Vn=kn.clipboardData,or=Vn==null?void 0:Vn.getData("text");un.current=or||""},$n=function(kn){var Vn=kn.target;if(Vn!==kt.current){var or=document.body.style.msTouchAction!==void 0;or?setTimeout(function(){kt.current.focus()}):kt.current.focus()}},sn=function(kn){var Vn=Zt();kn.target!==kt.current&&!Vn&&!(Qe==="combobox"&&Xt)&&kn.preventDefault(),(Qe!=="combobox"&&(!Tt||!Vn)||!Ve)&&(Ve&&nn!==!1&&zt("",!0,!1),Se())},gn={inputRef:kt,onInputKeyDown:jt,onInputMouseDown:xn,onInputChange:Rn,onInputPaste:In,onInputCompositionStart:Un,onInputCompositionEnd:Nn,onInputBlur:rt},yn=Qe==="multiple"||Qe==="tags"?y.createElement(bt,(0,x.Z)({},Oe,gn)):y.createElement(_t,(0,x.Z)({},Oe,gn));return y.createElement("div",{ref:It,className:"".concat(fn,"-selector"),onClick:$n,onMouseDown:sn},ln&&y.createElement("div",{className:"".concat(fn,"-prefix")},ln),yn)},Lt=y.forwardRef(Qt),qt=Lt,tt=E(65352),Re=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],ye=function(Oe){var Bt=Oe===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:Bt,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:Bt,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:Bt,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:Bt,adjustY:1},htmlRegion:"scroll"}}},Z=function(Oe,Bt){var kt=Oe.prefixCls,St=Oe.disabled,fn=Oe.visible,Ve=Oe.children,Qe=Oe.popupElement,Tt=Oe.animation,Et=Oe.transitionName,Xt=Oe.dropdownStyle,ln=Oe.dropdownClassName,nn=Oe.direction,zt=nn===void 0?"ltr":nn,De=Oe.placement,Se=Oe.builtinPlacements,et=Oe.dropdownMatchSelectWidth,rt=Oe.dropdownRender,It=Oe.dropdownAlign,Nt=Oe.getPopupContainer,wt=Oe.empty,Zt=Oe.getTriggerDOMNode,$t=Oe.onPopupVisibleChange,jt=Oe.onPopupMouseEnter,xn=(0,f.Z)(Oe,Re),un="".concat(kt,"-dropdown"),Cn=Qe;rt&&(Cn=rt(Qe));var Un=y.useMemo(function(){return Se||ye(et)},[Se,et]),Nn=Tt?"".concat(un,"-").concat(Tt):Et,Rn=typeof et=="number",In=y.useMemo(function(){return Rn?null:et===!1?"minWidth":"width"},[et,Rn]),$n=Xt;Rn&&($n=(0,fe.Z)((0,fe.Z)({},$n),{},{width:et}));var sn=y.useRef(null);return y.useImperativeHandle(Bt,function(){return{getPopupElement:function(){var yn;return(yn=sn.current)===null||yn===void 0?void 0:yn.popupElement}}}),y.createElement(tt.Z,(0,x.Z)({},xn,{showAction:$t?["click"]:[],hideAction:$t?["click"]:[],popupPlacement:De||(zt==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:Un,prefixCls:un,popupTransitionName:Nn,popup:y.createElement("div",{onMouseEnter:jt},Cn),ref:sn,stretch:In,popupAlign:It,popupVisible:fn,getPopupContainer:Nt,popupClassName:h()(ln,(0,ve.Z)({},"".concat(un,"-empty"),wt)),popupStyle:$n,getTriggerDOMNode:Zt,onPopupVisibleChange:$t}),Ve)},we=y.forwardRef(Z),Le=we,$=E(67900);function P(Ue,Oe){var Bt=Ue.key,kt;return"value"in Ue&&(kt=Ue.value),Bt!=null?Bt:kt!==void 0?kt:"rc-index-key-".concat(Oe)}function K(Ue){return typeof Ue!="undefined"&&!Number.isNaN(Ue)}function ne(Ue,Oe){var Bt=Ue||{},kt=Bt.label,St=Bt.value,fn=Bt.options,Ve=Bt.groupLabel,Qe=kt||(Oe?"children":"label");return{label:Qe,value:St||"value",options:fn||"options",groupLabel:Ve||Qe}}function M(Ue){var Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},Bt=Oe.fieldNames,kt=Oe.childrenAsData,St=[],fn=ne(Bt,!1),Ve=fn.label,Qe=fn.value,Tt=fn.options,Et=fn.groupLabel;function Xt(ln,nn){Array.isArray(ln)&&ln.forEach(function(zt){if(nn||!(Tt in zt)){var De=zt[Qe];St.push({key:P(zt,St.length),groupOption:nn,data:zt,label:zt[Ve],value:De})}else{var Se=zt[Et];Se===void 0&&kt&&(Se=zt.label),St.push({key:P(zt,St.length),group:!0,data:zt,label:Se}),Xt(zt[Tt],!0)}})}return Xt(Ue,!1),St}function B(Ue){var Oe=(0,fe.Z)({},Ue);return"props"in Oe||Object.defineProperty(Oe,"props",{get:function(){return(0,o.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),Oe}}),Oe}var j=function(Oe,Bt,kt){if(!Bt||!Bt.length)return null;var St=!1,fn=function Qe(Tt,Et){var Xt=(0,$.Z)(Et),ln=Xt[0],nn=Xt.slice(1);if(!ln)return[Tt];var zt=Tt.split(ln);return St=St||zt.length>1,zt.reduce(function(De,Se){return[].concat((0,ae.Z)(De),(0,ae.Z)(Qe(Se,nn)))},[]).filter(Boolean)},Ve=fn(Oe,Bt);return St?typeof kt!="undefined"?Ve.slice(0,kt):Ve:null},me=y.createContext(null),de=me;function Ae(Ue){var Oe=Ue.visible,Bt=Ue.values;if(!Oe)return null;var kt=50;return y.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(Bt.slice(0,kt).map(function(St){var fn=St.label,Ve=St.value;return["number","string"].includes((0,ue.Z)(fn))?fn:Ve}).join(", ")),Bt.length>kt?", ...":null)}var Ee=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],Ce=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Fe=function(Oe){return Oe==="tags"||Oe==="multiple"},Be=y.forwardRef(function(Ue,Oe){var Bt,kt=Ue.id,St=Ue.prefixCls,fn=Ue.className,Ve=Ue.showSearch,Qe=Ue.tagRender,Tt=Ue.direction,Et=Ue.omitDomProps,Xt=Ue.displayValues,ln=Ue.onDisplayValuesChange,nn=Ue.emptyOptions,zt=Ue.notFoundContent,De=zt===void 0?"Not Found":zt,Se=Ue.onClear,et=Ue.mode,rt=Ue.disabled,It=Ue.loading,Nt=Ue.getInputElement,wt=Ue.getRawInputElement,Zt=Ue.open,$t=Ue.defaultOpen,jt=Ue.onDropdownVisibleChange,xn=Ue.activeValue,un=Ue.onActiveValueChange,Cn=Ue.activeDescendantId,Un=Ue.searchValue,Nn=Ue.autoClearSearchValue,Rn=Ue.onSearch,In=Ue.onSearchSplit,$n=Ue.tokenSeparators,sn=Ue.allowClear,gn=Ue.prefix,yn=Ue.suffixIcon,jn=Ue.clearIcon,kn=Ue.OptionList,Vn=Ue.animation,or=Ue.transitionName,ge=Ue.dropdownStyle,Xe=Ue.dropdownClassName,Ke=Ue.dropdownMatchSelectWidth,We=Ue.dropdownRender,it=Ue.dropdownAlign,ht=Ue.placement,Pt=Ue.builtinPlacements,Dt=Ue.getPopupContainer,pt=Ue.showAction,Ge=pt===void 0?[]:pt,Je=Ue.onFocus,at=Ue.onBlur,dt=Ue.onKeyUp,gt=Ue.onKeyDown,Wt=Ue.onMouseDown,vn=(0,f.Z)(Ue,Ee),rn=Fe(et),Pn=(Ve!==void 0?Ve:rn)||et==="combobox",Zn=(0,fe.Z)({},vn);Ce.forEach(function(wr){delete Zn[wr]}),Et==null||Et.forEach(function(wr){delete Zn[wr]});var Kn=y.useState(!1),er=(0,F.Z)(Kn,2),dn=er[0],dr=er[1];y.useEffect(function(){dr((0,_.Z)())},[]);var ir=y.useRef(null),tr=y.useRef(null),Yn=y.useRef(null),hn=y.useRef(null),mr=y.useRef(null),rr=y.useRef(!1),lr=T(),Hn=(0,F.Z)(lr,3),Sn=Hn[0],On=Hn[1],Qn=Hn[2];y.useImperativeHandle(Oe,function(){var wr,Er;return{focus:(wr=hn.current)===null||wr===void 0?void 0:wr.focus,blur:(Er=hn.current)===null||Er===void 0?void 0:Er.blur,scrollTo:function(Gr){var Wr;return(Wr=mr.current)===null||Wr===void 0?void 0:Wr.scrollTo(Gr)},nativeElement:ir.current||tr.current}});var Fn=y.useMemo(function(){var wr;if(et!=="combobox")return Un;var Er=(wr=Xt[0])===null||wr===void 0?void 0:wr.value;return typeof Er=="string"||typeof Er=="number"?String(Er):""},[Un,et,Xt]),sr=et==="combobox"&&typeof Nt=="function"&&Nt()||null,ar=typeof wt=="function"&&wt(),Pr=(0,S.x1)(tr,ar==null||(Bt=ar.props)===null||Bt===void 0?void 0:Bt.ref),zr=y.useState(!1),Kr=(0,F.Z)(zr,2),ei=Kr[0],Zr=Kr[1];(0,g.Z)(function(){Zr(!0)},[]);var Br=(0,te.Z)(!1,{defaultValue:$t,value:Zt}),hr=(0,F.Z)(Br,2),Sr=hr[0],kr=hr[1],Dr=ei?Sr:!1,gr=!De&&nn;(rt||gr&&Dr&&et==="combobox")&&(Dr=!1);var pr=gr?!1:Dr,tn=y.useCallback(function(wr){var Er=wr!==void 0?wr:!Dr;rt||(kr(Er),Dr!==Er&&(jt==null||jt(Er)))},[rt,Dr,kr,jt]),zn=y.useMemo(function(){return($n||[]).some(function(wr){return[`
|
|
`,`\r
|
|
`].includes(wr)})},[$n]),Jn=y.useContext(de)||{},nr=Jn.maxCount,_r=Jn.rawValues,Tr=function(Er,Yr,Gr){if(!(rn&&K(nr)&&(_r==null?void 0:_r.size)>=nr)){var Wr=!0,Xr=Er;un==null||un(null);var di=j(Er,$n,K(nr)?nr-_r.size:void 0),fi=Gr?null:di;return et!=="combobox"&&fi&&(Xr="",In==null||In(fi),tn(!1),Wr=!1),Rn&&Fn!==Xr&&Rn(Xr,{source:Yr?"typing":"effect"}),Wr}},Ln=function(Er){!Er||!Er.trim()||Rn(Er,{source:"submit"})};y.useEffect(function(){!Dr&&!rn&&et!=="combobox"&&Tr("",!1,!1)},[Dr]),y.useEffect(function(){Sr&&rt&&kr(!1),rt&&!rr.current&&On(!1)},[rt]);var Gn=A(),yr=(0,F.Z)(Gn,2),Xn=yr[0],xr=yr[1],Jr=y.useRef(!1),Fr=function(Er){var Yr=Xn(),Gr=Er.key,Wr=Gr==="Enter";if(Wr&&(et!=="combobox"&&Er.preventDefault(),Dr||tn(!0)),xr(!!Fn),Gr==="Backspace"&&!Yr&&rn&&!Fn&&Xt.length){for(var Xr=(0,ae.Z)(Xt),di=null,fi=Xr.length-1;fi>=0;fi-=1){var vi=Xr[fi];if(!vi.disabled){Xr.splice(fi,1),di=vi;break}}di&&ln(Xr,{type:"remove",values:[di]})}for(var Qr=arguments.length,ii=new Array(Qr>1?Qr-1:0),Di=1;Di<Qr;Di++)ii[Di-1]=arguments[Di];if(Dr&&(!Wr||!Jr.current)){var _i;Wr&&(Jr.current=!0),(_i=mr.current)===null||_i===void 0||_i.onKeyDown.apply(_i,[Er].concat(ii))}gt==null||gt.apply(void 0,[Er].concat(ii))},qr=function(Er){for(var Yr=arguments.length,Gr=new Array(Yr>1?Yr-1:0),Wr=1;Wr<Yr;Wr++)Gr[Wr-1]=arguments[Wr];if(Dr){var Xr;(Xr=mr.current)===null||Xr===void 0||Xr.onKeyUp.apply(Xr,[Er].concat(Gr))}Er.key==="Enter"&&(Jr.current=!1),dt==null||dt.apply(void 0,[Er].concat(Gr))},ri=function(Er){var Yr=Xt.filter(function(Gr){return Gr!==Er});ln(Yr,{type:"remove",values:[Er]})},li=function(){Jr.current=!1},Hr=y.useRef(!1),ts=function(){On(!0),rt||(Je&&!Hr.current&&Je.apply(void 0,arguments),Ge.includes("focus")&&tn(!0)),Hr.current=!0},Fi=function(){rr.current=!0,On(!1,function(){Hr.current=!1,rr.current=!1,tn(!1)}),!rt&&(Fn&&(et==="tags"?Rn(Fn,{source:"submit"}):et==="multiple"&&Rn("",{source:"blur"})),at&&at.apply(void 0,arguments))},wi=[];y.useEffect(function(){return function(){wi.forEach(function(wr){return clearTimeout(wr)}),wi.splice(0,wi.length)}},[]);var ui=function(Er){var Yr,Gr=Er.target,Wr=(Yr=Yn.current)===null||Yr===void 0?void 0:Yr.getPopupElement();if(Wr&&Wr.contains(Gr)){var Xr=setTimeout(function(){var Qr=wi.indexOf(Xr);if(Qr!==-1&&wi.splice(Qr,1),Qn(),!dn&&!Wr.contains(document.activeElement)){var ii;(ii=hn.current)===null||ii===void 0||ii.focus()}});wi.push(Xr)}for(var di=arguments.length,fi=new Array(di>1?di-1:0),vi=1;vi<di;vi++)fi[vi-1]=arguments[vi];Wt==null||Wt.apply(void 0,[Er].concat(fi))},Li=y.useState({}),Ni=(0,F.Z)(Li,2),Mi=Ni[1];function pi(){Mi({})}var Bi;ar&&(Bi=function(Er){tn(Er)}),J(function(){var wr;return[ir.current,(wr=Yn.current)===null||wr===void 0?void 0:wr.getPopupElement()]},pr,tn,!!ar);var Ai=y.useMemo(function(){return(0,fe.Z)((0,fe.Z)({},Ue),{},{notFoundContent:De,open:Dr,triggerOpen:pr,id:kt,showSearch:Pn,multiple:rn,toggleOpen:tn})},[Ue,De,pr,Dr,kt,Pn,rn,tn]),ns=!!yn||It,Ti;ns&&(Ti=y.createElement(N,{className:h()("".concat(St,"-arrow"),(0,ve.Z)({},"".concat(St,"-arrow-loading"),It)),customizeIcon:yn,customizeIconProps:{loading:It,searchValue:Fn,open:Dr,focused:Sn,showSearch:Pn}}));var rs=function(){var Er;Se==null||Se(),(Er=hn.current)===null||Er===void 0||Er.focus(),ln([],{type:"clear",values:Xt}),Tr("",!1,!1)},Ui=H(St,rs,Xt,sn,jn,rt,Fn,et),mi=Ui.allowClear,Wi=Ui.clearIcon,Ki=y.createElement(kn,{ref:mr}),ki=h()(St,fn,(0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)({},"".concat(St,"-focused"),Sn),"".concat(St,"-multiple"),rn),"".concat(St,"-single"),!rn),"".concat(St,"-allow-clear"),sn),"".concat(St,"-show-arrow"),ns),"".concat(St,"-disabled"),rt),"".concat(St,"-loading"),It),"".concat(St,"-open"),Dr),"".concat(St,"-customize-input"),sr),"".concat(St,"-show-search"),Pn)),si=y.createElement(Le,{ref:Yn,disabled:rt,prefixCls:St,visible:pr,popupElement:Ki,animation:Vn,transitionName:or,dropdownStyle:ge,dropdownClassName:Xe,direction:Tt,dropdownMatchSelectWidth:Ke,dropdownRender:We,dropdownAlign:it,placement:ht,builtinPlacements:Pt,getPopupContainer:Dt,empty:nn,getTriggerDOMNode:function(Er){return tr.current||Er},onPopupVisibleChange:Bi,onPopupMouseEnter:pi},ar?y.cloneElement(ar,{ref:Pr}):y.createElement(qt,(0,x.Z)({},Ue,{domRef:tr,prefixCls:St,inputElement:sr,ref:hn,id:kt,prefix:gn,showSearch:Pn,autoClearSearchValue:Nn,mode:et,activeDescendantId:Cn,tagRender:Qe,values:Xt,open:Dr,onToggleOpen:tn,activeValue:xn,searchValue:Fn,onSearch:Tr,onSearchSubmit:Ln,onRemove:ri,tokenWithEnter:zn,onInputBlur:li}))),ti;return ar?ti=si:ti=y.createElement("div",(0,x.Z)({className:ki},Zn,{ref:ir,onMouseDown:ui,onKeyDown:Fr,onKeyUp:qr,onFocus:ts,onBlur:Fi}),y.createElement(Ae,{visible:Sn&&!Dr,values:Xt}),si,Ti,mi&&Wi),y.createElement(R.Provider,{value:Ai},ti)}),Ye=Be,xt=function(){return null};xt.isSelectOptGroup=!0;var lt=xt,nt=function(){return null};nt.isSelectOption=!0;var Ut=nt,Vt=E(80547),Ct=E(2738),Jt=E(65283);function wn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Rt=["disabled","title","children","style","className"];function Yt(Ue){return typeof Ue=="string"||typeof Ue=="number"}var Ne=function(Oe,Bt){var kt=k(),St=kt.prefixCls,fn=kt.id,Ve=kt.open,Qe=kt.multiple,Tt=kt.mode,Et=kt.searchValue,Xt=kt.toggleOpen,ln=kt.notFoundContent,nn=kt.onPopupScroll,zt=y.useContext(de),De=zt.maxCount,Se=zt.flattenOptions,et=zt.onActiveValue,rt=zt.defaultActiveFirstOption,It=zt.onSelect,Nt=zt.menuItemSelectedIcon,wt=zt.rawValues,Zt=zt.fieldNames,$t=zt.virtual,jt=zt.direction,xn=zt.listHeight,un=zt.listItemHeight,Cn=zt.optionRender,Un="".concat(St,"-item"),Nn=(0,Vt.Z)(function(){return Se},[Ve,Se],function(pt,Ge){return Ge[0]&&pt[1]!==Ge[1]}),Rn=y.useRef(null),In=y.useMemo(function(){return Qe&&K(De)&&(wt==null?void 0:wt.size)>=De},[Qe,De,wt==null?void 0:wt.size]),$n=function(Ge){Ge.preventDefault()},sn=function(Ge){var Je;(Je=Rn.current)===null||Je===void 0||Je.scrollTo(typeof Ge=="number"?{index:Ge}:Ge)},gn=y.useCallback(function(pt){return Tt==="combobox"?!1:wt.has(pt)},[Tt,(0,ae.Z)(wt).toString(),wt.size]),yn=function(Ge){for(var Je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,at=Nn.length,dt=0;dt<at;dt+=1){var gt=(Ge+dt*Je+at)%at,Wt=Nn[gt]||{},vn=Wt.group,rn=Wt.data;if(!vn&&!(rn!=null&&rn.disabled)&&(gn(rn.value)||!In))return gt}return-1},jn=y.useState(function(){return yn(0)}),kn=(0,F.Z)(jn,2),Vn=kn[0],or=kn[1],ge=function(Ge){var Je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;or(Ge);var at={source:Je?"keyboard":"mouse"},dt=Nn[Ge];if(!dt){et(null,-1,at);return}et(dt.value,Ge,at)};(0,y.useEffect)(function(){ge(rt!==!1?yn(0):-1)},[Nn.length,Et]);var Xe=y.useCallback(function(pt){return Tt==="combobox"?String(pt).toLowerCase()===Et.toLowerCase():wt.has(pt)},[Tt,Et,(0,ae.Z)(wt).toString(),wt.size]);(0,y.useEffect)(function(){var pt=setTimeout(function(){if(!Qe&&Ve&&wt.size===1){var Je=Array.from(wt)[0],at=Nn.findIndex(function(dt){var gt=dt.data;return Et?String(gt.value).startsWith(Et):gt.value===Je});at!==-1&&(ge(at),sn(at))}});if(Ve){var Ge;(Ge=Rn.current)===null||Ge===void 0||Ge.scrollTo(void 0)}return function(){return clearTimeout(pt)}},[Ve,Et]);var Ke=function(Ge){Ge!==void 0&&It(Ge,{selected:!wt.has(Ge)}),Qe||Xt(!1)};if(y.useImperativeHandle(Bt,function(){return{onKeyDown:function(Ge){var Je=Ge.which,at=Ge.ctrlKey;switch(Je){case ee.Z.N:case ee.Z.P:case ee.Z.UP:case ee.Z.DOWN:{var dt=0;if(Je===ee.Z.UP?dt=-1:Je===ee.Z.DOWN?dt=1:wn()&&at&&(Je===ee.Z.N?dt=1:Je===ee.Z.P&&(dt=-1)),dt!==0){var gt=yn(Vn+dt,dt);sn(gt),ge(gt,!0)}break}case ee.Z.TAB:case ee.Z.ENTER:{var Wt,vn=Nn[Vn];vn&&!(vn!=null&&(Wt=vn.data)!==null&&Wt!==void 0&&Wt.disabled)&&!In?Ke(vn.value):Ke(void 0),Ve&&Ge.preventDefault();break}case ee.Z.ESC:Xt(!1),Ve&&Ge.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Ge){sn(Ge)}}}),Nn.length===0)return y.createElement("div",{role:"listbox",id:"".concat(fn,"_list"),className:"".concat(Un,"-empty"),onMouseDown:$n},ln);var We=Object.keys(Zt).map(function(pt){return Zt[pt]}),it=function(Ge){return Ge.label};function ht(pt,Ge){var Je=pt.group;return{role:Je?"presentation":"option",id:"".concat(fn,"_list_").concat(Ge)}}var Pt=function(Ge){var Je=Nn[Ge];if(!Je)return null;var at=Je.data||{},dt=at.value,gt=Je.group,Wt=(0,I.Z)(at,!0),vn=it(Je);return Je?y.createElement("div",(0,x.Z)({"aria-label":typeof vn=="string"&&!gt?vn:null},Wt,{key:Ge},ht(Je,Ge),{"aria-selected":Xe(dt)}),dt):null},Dt={role:"listbox",id:"".concat(fn,"_list")};return y.createElement(y.Fragment,null,$t&&y.createElement("div",(0,x.Z)({},Dt,{style:{height:0,width:0,overflow:"hidden"}}),Pt(Vn-1),Pt(Vn),Pt(Vn+1)),y.createElement(Jt.Z,{itemKey:"key",ref:Rn,data:Nn,height:xn,itemHeight:un,fullHeight:!1,onMouseDown:$n,onScroll:nn,virtual:$t,direction:jt,innerProps:$t?null:Dt},function(pt,Ge){var Je=pt.group,at=pt.groupOption,dt=pt.data,gt=pt.label,Wt=pt.value,vn=dt.key;if(Je){var rn,Pn=(rn=dt.title)!==null&&rn!==void 0?rn:Yt(gt)?gt.toString():void 0;return y.createElement("div",{className:h()(Un,"".concat(Un,"-group"),dt.className),title:Pn},gt!==void 0?gt:vn)}var Zn=dt.disabled,Kn=dt.title,er=dt.children,dn=dt.style,dr=dt.className,ir=(0,f.Z)(dt,Rt),tr=(0,Ct.Z)(ir,We),Yn=gn(Wt),hn=Zn||!Yn&&In,mr="".concat(Un,"-option"),rr=h()(Un,mr,dr,(0,ve.Z)((0,ve.Z)((0,ve.Z)((0,ve.Z)({},"".concat(mr,"-grouped"),at),"".concat(mr,"-active"),Vn===Ge&&!hn),"".concat(mr,"-disabled"),hn),"".concat(mr,"-selected"),Yn)),lr=it(pt),Hn=!Nt||typeof Nt=="function"||Yn,Sn=typeof lr=="number"?lr:lr||Wt,On=Yt(Sn)?Sn.toString():void 0;return Kn!==void 0&&(On=Kn),y.createElement("div",(0,x.Z)({},(0,I.Z)(tr),$t?{}:ht(pt,Ge),{"aria-selected":Xe(Wt),className:rr,title:On,onMouseMove:function(){Vn===Ge||hn||ge(Ge)},onClick:function(){hn||Ke(Wt)},style:dn}),y.createElement("div",{className:"".concat(mr,"-content")},typeof Cn=="function"?Cn(pt,{index:Ge}):Sn),y.isValidElement(Nt)||Yn,Hn&&y.createElement(N,{className:"".concat(Un,"-option-state"),customizeIcon:Nt,customizeIconProps:{value:Wt,disabled:hn,isSelected:Yn}},Yn?"\u2713":null))}))},ke=y.forwardRef(Ne),Pe=ke,z=function(Ue,Oe){var Bt=y.useRef({values:new Map,options:new Map}),kt=y.useMemo(function(){var fn=Bt.current,Ve=fn.values,Qe=fn.options,Tt=Ue.map(function(ln){if(ln.label===void 0){var nn;return(0,fe.Z)((0,fe.Z)({},ln),{},{label:(nn=Ve.get(ln.value))===null||nn===void 0?void 0:nn.label})}return ln}),Et=new Map,Xt=new Map;return Tt.forEach(function(ln){Et.set(ln.value,ln),Xt.set(ln.value,Oe.get(ln.value)||Qe.get(ln.value))}),Bt.current.values=Et,Bt.current.options=Xt,Tt},[Ue,Oe]),St=y.useCallback(function(fn){return Oe.get(fn)||Bt.current.options.get(fn)},[Oe]);return[kt,St]};function oe(Ue,Oe){return ie(Ue).join("").toUpperCase().includes(Oe)}var he=function(Ue,Oe,Bt,kt,St){return y.useMemo(function(){if(!Bt||kt===!1)return Ue;var fn=Oe.options,Ve=Oe.label,Qe=Oe.value,Tt=[],Et=typeof kt=="function",Xt=Bt.toUpperCase(),ln=Et?kt:function(zt,De){return St?oe(De[St],Xt):De[fn]?oe(De[Ve!=="children"?Ve:"label"],Xt):oe(De[Qe],Xt)},nn=Et?function(zt){return B(zt)}:function(zt){return zt};return Ue.forEach(function(zt){if(zt[fn]){var De=ln(Bt,nn(zt));if(De)Tt.push(zt);else{var Se=zt[fn].filter(function(et){return ln(Bt,nn(et))});Se.length&&Tt.push((0,fe.Z)((0,fe.Z)({},zt),{},(0,ve.Z)({},fn,Se)))}return}ln(Bt,nn(zt))&&Tt.push(zt)}),Tt},[Ue,kt,St,Bt,Oe])},ce=E(6551),be=E(11592),ze=["children","value"],Ze=["children"];function $e(Ue){var Oe=Ue,Bt=Oe.key,kt=Oe.props,St=kt.children,fn=kt.value,Ve=(0,f.Z)(kt,ze);return(0,fe.Z)({key:Bt,value:fn!==void 0?fn:Bt,children:St},Ve)}function ft(Ue){var Oe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,be.Z)(Ue).map(function(Bt,kt){if(!y.isValidElement(Bt)||!Bt.type)return null;var St=Bt,fn=St.type.isSelectOptGroup,Ve=St.key,Qe=St.props,Tt=Qe.children,Et=(0,f.Z)(Qe,Ze);return Oe||!fn?$e(Bt):(0,fe.Z)((0,fe.Z)({key:"__RC_SELECT_GRP__".concat(Ve===null?kt:Ve,"__"),label:Ve},Et),{},{options:ft(Tt)})}).filter(function(Bt){return Bt})}var en=function(Oe,Bt,kt,St,fn){return y.useMemo(function(){var Ve=Oe,Qe=!Oe;Qe&&(Ve=ft(Bt));var Tt=new Map,Et=new Map,Xt=function(zt,De,Se){Se&&typeof Se=="string"&&zt.set(De[Se],De)},ln=function nn(zt){for(var De=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Se=0;Se<zt.length;Se+=1){var et=zt[Se];!et[kt.options]||De?(Tt.set(et[kt.value],et),Xt(Et,et,kt.label),Xt(Et,et,St),Xt(Et,et,fn)):nn(et[kt.options],!0)}};return ln(Ve),{options:Ve,valueOptions:Tt,labelOptions:Et}},[Oe,Bt,kt,St,fn])},an=en;function yt(Ue){var Oe=y.useRef();Oe.current=Ue;var Bt=y.useCallback(function(){return Oe.current.apply(Oe,arguments)},[]);return Bt}function Gt(Ue){var Oe=Ue.mode,Bt=Ue.options,kt=Ue.children,St=Ue.backfill,fn=Ue.allowClear,Ve=Ue.placeholder,Qe=Ue.getInputElement,Tt=Ue.showSearch,Et=Ue.onSearch,Xt=Ue.defaultOpen,ln=Ue.autoFocus,nn=Ue.labelInValue,zt=Ue.value,De=Ue.inputValue,Se=Ue.optionLabelProp,et=isMultiple(Oe),rt=Tt!==void 0?Tt:et||Oe==="combobox",It=Bt||convertChildrenToData(kt);if(warning(Oe!=="tags"||It.every(function($t){return!$t.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),Oe==="tags"||Oe==="combobox"){var Nt=It.some(function($t){return $t.options?$t.options.some(function(jt){return typeof("value"in jt?jt.value:jt.key)=="number"}):typeof("value"in $t?$t.value:$t.key)=="number"});warning(!Nt,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(Oe!=="combobox"||!Se,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(Oe==="combobox"||!St,"`backfill` only works with `combobox` mode."),warning(Oe==="combobox"||!Qe,"`getInputElement` only work with `combobox` mode."),noteOnce(Oe!=="combobox"||!Qe||!fn||!Ve,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),Et&&!rt&&Oe!=="combobox"&&Oe!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!Xt||ln,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),zt!=null){var wt=toArray(zt);warning(!nn||wt.every(function($t){return _typeof($t)==="object"&&("key"in $t||"value"in $t)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!et||Array.isArray(zt),"`value` should be array when `mode` is `multiple` or `tags`")}if(kt){var Zt=null;toNodeArray(kt).some(function($t){if(!React.isValidElement($t)||!$t.type)return!1;var jt=$t,xn=jt.type;if(xn.isSelectOption)return!1;if(xn.isSelectOptGroup){var un=toNodeArray($t.props.children).every(function(Cn){return!React.isValidElement(Cn)||!$t.type||Cn.type.isSelectOption?!0:(Zt=Cn.type,!1)});return!un}return Zt=xn,!0}),Zt&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Zt.displayName||Zt.name||Zt,"`.")),warning(De===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function _n(Ue,Oe){if(Ue){var Bt=function kt(St){for(var fn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Ve=0;Ve<St.length;Ve++){var Qe=St[Ve];if(Qe[Oe==null?void 0:Oe.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!fn&&Array.isArray(Qe[Oe==null?void 0:Oe.options])&&kt(Qe[Oe==null?void 0:Oe.options],!0))break}};Bt(Ue)}}var Bn=null,cn=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],pn=["inputValue"];function Tn(Ue){return!Ue||(0,ue.Z)(Ue)!=="object"}var mn=y.forwardRef(function(Ue,Oe){var Bt=Ue.id,kt=Ue.mode,St=Ue.prefixCls,fn=St===void 0?"rc-select":St,Ve=Ue.backfill,Qe=Ue.fieldNames,Tt=Ue.inputValue,Et=Ue.searchValue,Xt=Ue.onSearch,ln=Ue.autoClearSearchValue,nn=ln===void 0?!0:ln,zt=Ue.onSelect,De=Ue.onDeselect,Se=Ue.dropdownMatchSelectWidth,et=Se===void 0?!0:Se,rt=Ue.filterOption,It=Ue.filterSort,Nt=Ue.optionFilterProp,wt=Ue.optionLabelProp,Zt=Ue.options,$t=Ue.optionRender,jt=Ue.children,xn=Ue.defaultActiveFirstOption,un=Ue.menuItemSelectedIcon,Cn=Ue.virtual,Un=Ue.direction,Nn=Ue.listHeight,Rn=Nn===void 0?200:Nn,In=Ue.listItemHeight,$n=In===void 0?20:In,sn=Ue.labelRender,gn=Ue.value,yn=Ue.defaultValue,jn=Ue.labelInValue,kn=Ue.onChange,Vn=Ue.maxCount,or=(0,f.Z)(Ue,cn),ge=(0,ce.ZP)(Bt),Xe=Fe(kt),Ke=!!(!Zt&&jt),We=y.useMemo(function(){return rt===void 0&&kt==="combobox"?!1:rt},[rt,kt]),it=y.useMemo(function(){return ne(Qe,Ke)},[JSON.stringify(Qe),Ke]),ht=(0,te.Z)("",{value:Et!==void 0?Et:Tt,postState:function(zn){return zn||""}}),Pt=(0,F.Z)(ht,2),Dt=Pt[0],pt=Pt[1],Ge=an(Zt,jt,it,Nt,wt),Je=Ge.valueOptions,at=Ge.labelOptions,dt=Ge.options,gt=y.useCallback(function(tn){var zn=ie(tn);return zn.map(function(Jn){var nr,_r,Tr,Ln,Gn;if(Tn(Jn))nr=Jn;else{var yr;Tr=Jn.key,_r=Jn.label,nr=(yr=Jn.value)!==null&&yr!==void 0?yr:Tr}var Xn=Je.get(nr);if(Xn){var xr;if(_r===void 0&&(_r=Xn==null?void 0:Xn[wt||it.label]),Tr===void 0&&(Tr=(xr=Xn==null?void 0:Xn.key)!==null&&xr!==void 0?xr:nr),Ln=Xn==null?void 0:Xn.disabled,Gn=Xn==null?void 0:Xn.title,0)var Jr}return{label:_r,value:nr,key:Tr,disabled:Ln,title:Gn}})},[it,wt,Je]),Wt=(0,te.Z)(yn,{value:gn}),vn=(0,F.Z)(Wt,2),rn=vn[0],Pn=vn[1],Zn=y.useMemo(function(){var tn,zn=Xe&&rn===null?[]:rn,Jn=gt(zn);return kt==="combobox"&&U((tn=Jn[0])===null||tn===void 0?void 0:tn.value)?[]:Jn},[rn,gt,kt,Xe]),Kn=z(Zn,Je),er=(0,F.Z)(Kn,2),dn=er[0],dr=er[1],ir=y.useMemo(function(){if(!kt&&dn.length===1){var tn=dn[0];if(tn.value===null&&(tn.label===null||tn.label===void 0))return[]}return dn.map(function(zn){var Jn;return(0,fe.Z)((0,fe.Z)({},zn),{},{label:(Jn=typeof sn=="function"?sn(zn):zn.label)!==null&&Jn!==void 0?Jn:zn.value})})},[kt,dn,sn]),tr=y.useMemo(function(){return new Set(dn.map(function(tn){return tn.value}))},[dn]);y.useEffect(function(){if(kt==="combobox"){var tn,zn=(tn=dn[0])===null||tn===void 0?void 0:tn.value;pt(m(zn)?String(zn):"")}},[dn]);var Yn=yt(function(tn,zn){var Jn=zn!=null?zn:tn;return(0,ve.Z)((0,ve.Z)({},it.value,tn),it.label,Jn)}),hn=y.useMemo(function(){if(kt!=="tags")return dt;var tn=(0,ae.Z)(dt),zn=function(nr){return Je.has(nr)};return(0,ae.Z)(dn).sort(function(Jn,nr){return Jn.value<nr.value?-1:1}).forEach(function(Jn){var nr=Jn.value;zn(nr)||tn.push(Yn(nr,Jn.label))}),tn},[Yn,dt,Je,dn,kt]),mr=he(hn,it,Dt,We,Nt),rr=y.useMemo(function(){return kt!=="tags"||!Dt||mr.some(function(tn){return tn[Nt||"value"]===Dt})||mr.some(function(tn){return tn[it.value]===Dt})?mr:[Yn(Dt)].concat((0,ae.Z)(mr))},[Yn,Nt,kt,mr,Dt,it]),lr=function tn(zn){var Jn=(0,ae.Z)(zn).sort(function(nr,_r){return It(nr,_r,{searchValue:Dt})});return Jn.map(function(nr){return Array.isArray(nr.options)?(0,fe.Z)((0,fe.Z)({},nr),{},{options:nr.options.length>0?tn(nr.options):nr.options}):nr})},Hn=y.useMemo(function(){return It?lr(rr):rr},[rr,It,Dt]),Sn=y.useMemo(function(){return M(Hn,{fieldNames:it,childrenAsData:Ke})},[Hn,it,Ke]),On=function(zn){var Jn=gt(zn);if(Pn(Jn),kn&&(Jn.length!==dn.length||Jn.some(function(Tr,Ln){var Gn;return((Gn=dn[Ln])===null||Gn===void 0?void 0:Gn.value)!==(Tr==null?void 0:Tr.value)}))){var nr=jn?Jn:Jn.map(function(Tr){return Tr.value}),_r=Jn.map(function(Tr){return B(dr(Tr.value))});kn(Xe?nr:nr[0],Xe?_r:_r[0])}},Qn=y.useState(null),Fn=(0,F.Z)(Qn,2),sr=Fn[0],ar=Fn[1],Pr=y.useState(0),zr=(0,F.Z)(Pr,2),Kr=zr[0],ei=zr[1],Zr=xn!==void 0?xn:kt!=="combobox",Br=y.useCallback(function(tn,zn){var Jn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},nr=Jn.source,_r=nr===void 0?"keyboard":nr;ei(zn),Ve&&kt==="combobox"&&tn!==null&&_r==="keyboard"&&ar(String(tn))},[Ve,kt]),hr=function(zn,Jn,nr){var _r=function(){var ri,li=dr(zn);return[jn?{label:li==null?void 0:li[it.label],value:zn,key:(ri=li==null?void 0:li.key)!==null&&ri!==void 0?ri:zn}:zn,B(li)]};if(Jn&&zt){var Tr=_r(),Ln=(0,F.Z)(Tr,2),Gn=Ln[0],yr=Ln[1];zt(Gn,yr)}else if(!Jn&&De&&nr!=="clear"){var Xn=_r(),xr=(0,F.Z)(Xn,2),Jr=xr[0],Fr=xr[1];De(Jr,Fr)}},Sr=yt(function(tn,zn){var Jn,nr=Xe?zn.selected:!0;nr?Jn=Xe?[].concat((0,ae.Z)(dn),[tn]):[tn]:Jn=dn.filter(function(_r){return _r.value!==tn}),On(Jn),hr(tn,nr),kt==="combobox"?ar(""):(!Fe||nn)&&(pt(""),ar(""))}),kr=function(zn,Jn){On(zn);var nr=Jn.type,_r=Jn.values;(nr==="remove"||nr==="clear")&&_r.forEach(function(Tr){hr(Tr.value,!1,nr)})},Dr=function(zn,Jn){if(pt(zn),ar(null),Jn.source==="submit"){var nr=(zn||"").trim();if(nr){var _r=Array.from(new Set([].concat((0,ae.Z)(tr),[nr])));On(_r),hr(nr,!0),pt("")}return}Jn.source!=="blur"&&(kt==="combobox"&&On(zn),Xt==null||Xt(zn))},gr=function(zn){var Jn=zn;kt!=="tags"&&(Jn=zn.map(function(_r){var Tr=at.get(_r);return Tr==null?void 0:Tr.value}).filter(function(_r){return _r!==void 0}));var nr=Array.from(new Set([].concat((0,ae.Z)(tr),(0,ae.Z)(Jn))));On(nr),nr.forEach(function(_r){hr(_r,!0)})},pr=y.useMemo(function(){var tn=Cn!==!1&&et!==!1;return(0,fe.Z)((0,fe.Z)({},Ge),{},{flattenOptions:Sn,onActiveValue:Br,defaultActiveFirstOption:Zr,onSelect:Sr,menuItemSelectedIcon:un,rawValues:tr,fieldNames:it,virtual:tn,direction:Un,listHeight:Rn,listItemHeight:$n,childrenAsData:Ke,maxCount:Vn,optionRender:$t})},[Vn,Ge,Sn,Br,Zr,Sr,un,tr,it,Cn,et,Un,Rn,$n,Ke,$t]);return y.createElement(de.Provider,{value:pr},y.createElement(Ye,(0,x.Z)({},or,{id:ge,prefixCls:fn,ref:Oe,omitDomProps:pn,mode:kt,displayValues:ir,onDisplayValuesChange:kr,direction:Un,searchValue:Dt,onSearch:Dr,autoClearSearchValue:nn,onSearchSplit:gr,dropdownMatchSelectWidth:et,OptionList:Pe,emptyOptions:!Sn.length,activeValue:sr,activeDescendantId:"".concat(ge,"_list_").concat(Kr)})))}),An=mn;An.Option=Ut,An.OptGroup=lt;var Ft=An,Wn=Ft},86351:function(on,je,E){"use strict";E.d(je,{R:function(){return ae},w:function(){return x}});var x={},ae="rc-table-internal-hook"},97347:function(on,je,E){"use strict";E.d(je,{L:function(){return L},Z:function(){return T}});var x=E(11036),ae=E(87075),ve=E(62730),fe=E(28788),F=E(89490),f=E(39224),ue=E(11592),te=E(48736),o=E(59301),y=E(86351),C=E(54451);function h(A){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof J=="number"?J:J.endsWith("%")?A*parseFloat(J)/100:null}function g(A,J,ee){return o.useMemo(function(){if(J&&J>0){var G=0,I=0;A.forEach(function(ie){var V=h(J,ie.width);V?G+=V:I+=1});var re=Math.max(J,ee),le=Math.max(re-G,I),Te=I,W=le/I,O=0,Q=A.map(function(ie){var V=(0,F.Z)({},ie),v=h(J,V.width);if(v)V.width=v;else{var m=Math.floor(W);V.width=Te===1?le:m,le-=m,Te-=1}return O+=V.width,V});if(O<re){var q=re/O;le=re,Q.forEach(function(ie,V){var v=Math.floor(ie.width*q);ie.width=V===Q.length-1?le:v,le-=v})}return[Q,Math.max(O,re)]}return[A,J]},[A,J,ee])}var _=["children"],S=["fixed"];function L(A){return(0,ue.Z)(A).filter(function(J){return o.isValidElement(J)}).map(function(J){var ee=J.key,G=J.props,I=G.children,re=(0,f.Z)(G,_),le=(0,F.Z)({key:ee},re);return I&&(le.children=L(I)),le})}function N(A){return A.filter(function(J){return J&&(0,fe.Z)(J)==="object"&&!J.hidden}).map(function(J){var ee=J.children;return ee&&ee.length>0?(0,F.Z)((0,F.Z)({},J),{},{children:N(ee)}):J})}function H(A){var J=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return A.filter(function(ee){return ee&&(0,fe.Z)(ee)==="object"}).reduce(function(ee,G,I){var re=G.fixed,le=re===!0?"left":re,Te="".concat(J,"-").concat(I),W=G.children;return W&&W.length>0?[].concat((0,ve.Z)(ee),(0,ve.Z)(H(W,Te).map(function(O){return(0,F.Z)({fixed:le},O)}))):[].concat((0,ve.Z)(ee),[(0,F.Z)((0,F.Z)({key:Te},G),{},{fixed:le})])},[])}function R(A){return A.map(function(J){var ee=J.fixed,G=(0,f.Z)(J,S),I=ee;return ee==="left"?I="right":ee==="right"&&(I="left"),(0,F.Z)({fixed:I},G)})}function k(A,J){var ee=A.prefixCls,G=A.columns,I=A.children,re=A.expandable,le=A.expandedKeys,Te=A.columnTitle,W=A.getRowKey,O=A.onTriggerExpand,Q=A.expandIcon,q=A.rowExpandable,ie=A.expandIconColumnIndex,V=A.direction,v=A.expandRowByClick,m=A.columnWidth,U=A.fixed,se=A.scrollWidth,pe=A.clientWidth,He=o.useMemo(function(){var qt=G||L(I)||[];return N(qt.slice())},[G,I]),qe=o.useMemo(function(){if(re){var qt=He.slice();if(!qt.includes(y.w)){var tt=ie||0;tt>=0&&(tt||U==="left"||!U)&&qt.splice(tt,0,y.w),U==="right"&&qt.splice(He.length,0,y.w)}var Re=qt.indexOf(y.w);qt=qt.filter(function(Le,$){return Le!==y.w||$===Re});var ye=He[Re],Z;U?Z=U:Z=ye?ye.fixed:null;var we=(0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)({},C.v,{className:"".concat(ee,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",Te),"fixed",Z),"className","".concat(ee,"-row-expand-icon-cell")),"width",m),"render",function($,P,K){var ne=W(P,K),M=le.has(ne),B=q?q(P):!0,j=Q({prefixCls:ee,expanded:M,expandable:B,record:P,onExpand:O});return v?o.createElement("span",{onClick:function(de){return de.stopPropagation()}},j):j});return qt.map(function(Le){return Le===y.w?we:Le})}return He.filter(function(Le){return Le!==y.w})},[re,He,W,le,Q,V]),ot=o.useMemo(function(){var qt=qe;return J&&(qt=J(qt)),qt.length||(qt=[{render:function(){return null}}]),qt},[J,qe,V]),Ot=o.useMemo(function(){return V==="rtl"?R(H(ot)):H(ot)},[ot,V,se]),bt=o.useMemo(function(){for(var qt=-1,tt=Ot.length-1;tt>=0;tt-=1){var Re=Ot[tt].fixed;if(Re==="left"||Re===!0){qt=tt;break}}if(qt>=0)for(var ye=0;ye<=qt;ye+=1){var Z=Ot[ye].fixed;if(Z!=="left"&&Z!==!0)return!0}var we=Ot.findIndex(function(P){var K=P.fixed;return K==="right"});if(we>=0)for(var Le=we;Le<Ot.length;Le+=1){var $=Ot[Le].fixed;if($!=="right")return!0}return!1},[Ot]),xe=g(Ot,se,pe),_t=(0,x.Z)(xe,2),Qt=_t[0],Lt=_t[1];return[ot,Qt,Lt,bt]}var T=k},4030:function(on,je,E){"use strict";E.d(je,{w2:function(){return x.w},vP:function(){return Yt.v},RQ:function(){return x.R},ER:function(){return ne},Q$:function(){return rt},TN:function(){return kn}});var x=E(86351),ae=E(11036),ve=E(6089),fe=E(34280),F=E(13697),f=E(59301),ue=E(4676);function te(ge){var Xe=f.createContext(void 0),Ke=function(it){var ht=it.value,Pt=it.children,Dt=f.useRef(ht);Dt.current=ht;var pt=f.useState(function(){return{getValue:function(){return Dt.current},listeners:new Set}}),Ge=(0,ae.Z)(pt,1),Je=Ge[0];return(0,fe.Z)(function(){(0,ue.unstable_batchedUpdates)(function(){Je.listeners.forEach(function(at){at(ht)})})},[ht]),f.createElement(Xe.Provider,{value:Je},Pt)};return{Context:Xe,Provider:Ke,defaultValue:ge}}function o(ge,Xe){var Ke=(0,ve.Z)(typeof Xe=="function"?Xe:function(at){if(Xe===void 0)return at;if(!Array.isArray(Xe))return at[Xe];var dt={};return Xe.forEach(function(gt){dt[gt]=at[gt]}),dt}),We=f.useContext(ge==null?void 0:ge.Context),it=We||{},ht=it.listeners,Pt=it.getValue,Dt=f.useRef();Dt.current=Ke(We?Pt():ge==null?void 0:ge.defaultValue);var pt=f.useState({}),Ge=(0,ae.Z)(pt,2),Je=Ge[1];return(0,fe.Z)(function(){if(!We)return;function at(dt){var gt=Ke(dt);(0,F.Z)(Dt.current,gt,!0)||Je({})}return ht.add(at),function(){ht.delete(at)}},[We]),Dt.current}var y=E(71409),C=E(8654);function h(){var ge=f.createContext(null);function Xe(){return f.useContext(ge)}function Ke(it,ht){var Pt=(0,C.Yr)(it),Dt=function(Ge,Je){var at=Pt?{ref:Je}:{},dt=f.useRef(0),gt=f.useRef(Ge),Wt=Xe();return Wt!==null?f.createElement(it,(0,y.Z)({},Ge,at)):((!ht||ht(gt.current,Ge))&&(dt.current+=1),gt.current=Ge,f.createElement(ge.Provider,{value:dt.current},f.createElement(it,(0,y.Z)({},Ge,at))))};return Pt?f.forwardRef(Dt):Dt}function We(it,ht){var Pt=(0,C.Yr)(it),Dt=function(Ge,Je){var at=Pt?{ref:Je}:{};return Xe(),f.createElement(it,(0,y.Z)({},Ge,at))};return Pt?f.memo(f.forwardRef(Dt),ht):f.memo(Dt,ht)}return{makeImmutable:Ke,responseImmutable:We,useImmutableMark:Xe}}var g=h(),_=g.makeImmutable,S=g.responseImmutable,L=g.useImmutableMark,N=h(),H=N.makeImmutable,R=N.responseImmutable,k=N.useImmutableMark,T=te(),A=T;function J(ge,Xe){var Ke=React.useRef(0);Ke.current+=1;var We=React.useRef(ge),it=[];Object.keys(ge||{}).map(function(Pt){var Dt;(ge==null?void 0:ge[Pt])!==((Dt=We.current)===null||Dt===void 0?void 0:Dt[Pt])&&it.push(Pt)}),We.current=ge;var ht=React.useRef([]);return it.length&&(ht.current=it),React.useDebugValue(Ke.current),React.useDebugValue(ht.current.join(", ")),Xe&&console.log("".concat(Xe,":"),Ke.current,ht.current),Ke.current}var ee=null,G=null,I=E(28788),re=E(89490),le=E(87075),Te=E(92310),W=E.n(Te),O=E(80547),Q=E(97938),q=E(48736),ie=f.createContext({renderWithProps:!1}),V=ie,v="RC_TABLE_KEY";function m(ge){return ge==null?[]:Array.isArray(ge)?ge:[ge]}function U(ge){var Xe=[],Ke={};return ge.forEach(function(We){for(var it=We||{},ht=it.key,Pt=it.dataIndex,Dt=ht||m(Pt).join("-")||v;Ke[Dt];)Dt="".concat(Dt,"_next");Ke[Dt]=!0,Xe.push(Dt)}),Xe}function se(ge){return ge!=null}function pe(ge){return typeof ge=="number"&&!Number.isNaN(ge)}function He(ge){return ge&&(0,I.Z)(ge)==="object"&&!Array.isArray(ge)&&!f.isValidElement(ge)}function qe(ge,Xe,Ke,We,it,ht){var Pt=f.useContext(V),Dt=k(),pt=(0,O.Z)(function(){if(se(We))return[We];var Ge=Xe==null||Xe===""?[]:Array.isArray(Xe)?Xe:[Xe],Je=(0,Q.Z)(ge,Ge),at=Je,dt=void 0;if(it){var gt=it(Je,ge,Ke);He(gt)?(at=gt.children,dt=gt.props,Pt.renderWithProps=!0):at=gt}return[at,dt]},[Dt,ge,We,Xe,it,Ke],function(Ge,Je){if(ht){var at=(0,ae.Z)(Ge,2),dt=at[1],gt=(0,ae.Z)(Je,2),Wt=gt[1];return ht(Wt,dt)}return Pt.renderWithProps?!0:!(0,F.Z)(Ge,Je,!0)});return pt}function ot(ge,Xe,Ke,We){var it=ge+Xe-1;return ge<=We&&it>=Ke}function Ot(ge,Xe){return o(A,function(Ke){var We=ot(ge,Xe||1,Ke.hoverStartRow,Ke.hoverEndRow);return[We,Ke.onHover]})}var bt=E(70425),xe=function(Xe){var Ke=Xe.ellipsis,We=Xe.rowType,it=Xe.children,ht,Pt=Ke===!0?{showTitle:!0}:Ke;return Pt&&(Pt.showTitle||We==="header")&&(typeof it=="string"||typeof it=="number"?ht=it.toString():f.isValidElement(it)&&typeof it.props.children=="string"&&(ht=it.props.children)),ht};function _t(ge){var Xe,Ke,We,it,ht,Pt,Dt,pt,Ge=ge.component,Je=ge.children,at=ge.ellipsis,dt=ge.scope,gt=ge.prefixCls,Wt=ge.className,vn=ge.align,rn=ge.record,Pn=ge.render,Zn=ge.dataIndex,Kn=ge.renderIndex,er=ge.shouldCellUpdate,dn=ge.index,dr=ge.rowType,ir=ge.colSpan,tr=ge.rowSpan,Yn=ge.fixLeft,hn=ge.fixRight,mr=ge.firstFixLeft,rr=ge.lastFixLeft,lr=ge.firstFixRight,Hn=ge.lastFixRight,Sn=ge.appendNode,On=ge.additionalProps,Qn=On===void 0?{}:On,Fn=ge.isSticky,sr="".concat(gt,"-cell"),ar=o(A,["supportSticky","allColumnsFixedLeft","rowHoverable"]),Pr=ar.supportSticky,zr=ar.allColumnsFixedLeft,Kr=ar.rowHoverable,ei=qe(rn,Zn,Kn,Je,Pn,er),Zr=(0,ae.Z)(ei,2),Br=Zr[0],hr=Zr[1],Sr={},kr=typeof Yn=="number"&&Pr,Dr=typeof hn=="number"&⪻kr&&(Sr.position="sticky",Sr.left=Yn),Dr&&(Sr.position="sticky",Sr.right=hn);var gr=(Xe=(Ke=(We=hr==null?void 0:hr.colSpan)!==null&&We!==void 0?We:Qn.colSpan)!==null&&Ke!==void 0?Ke:ir)!==null&&Xe!==void 0?Xe:1,pr=(it=(ht=(Pt=hr==null?void 0:hr.rowSpan)!==null&&Pt!==void 0?Pt:Qn.rowSpan)!==null&&ht!==void 0?ht:tr)!==null&&it!==void 0?it:1,tn=Ot(dn,pr),zn=(0,ae.Z)(tn,2),Jn=zn[0],nr=zn[1],_r=(0,bt.zX)(function(Jr){var Fr;rn&&nr(dn,dn+pr-1),Qn==null||(Fr=Qn.onMouseEnter)===null||Fr===void 0||Fr.call(Qn,Jr)}),Tr=(0,bt.zX)(function(Jr){var Fr;rn&&nr(-1,-1),Qn==null||(Fr=Qn.onMouseLeave)===null||Fr===void 0||Fr.call(Qn,Jr)});if(gr===0||pr===0)return null;var Ln=(Dt=Qn.title)!==null&&Dt!==void 0?Dt:xe({rowType:dr,ellipsis:at,children:Br}),Gn=W()(sr,Wt,(pt={},(0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)(pt,"".concat(sr,"-fix-left"),kr&&Pr),"".concat(sr,"-fix-left-first"),mr&&Pr),"".concat(sr,"-fix-left-last"),rr&&Pr),"".concat(sr,"-fix-left-all"),rr&&zr&&Pr),"".concat(sr,"-fix-right"),Dr&&Pr),"".concat(sr,"-fix-right-first"),lr&&Pr),"".concat(sr,"-fix-right-last"),Hn&&Pr),"".concat(sr,"-ellipsis"),at),"".concat(sr,"-with-append"),Sn),"".concat(sr,"-fix-sticky"),(kr||Dr)&&Fn&&Pr),(0,le.Z)(pt,"".concat(sr,"-row-hover"),!hr&&Jn)),Qn.className,hr==null?void 0:hr.className),yr={};vn&&(yr.textAlign=vn);var Xn=(0,re.Z)((0,re.Z)((0,re.Z)((0,re.Z)({},hr==null?void 0:hr.style),Sr),yr),Qn.style),xr=Br;return(0,I.Z)(xr)==="object"&&!Array.isArray(xr)&&!f.isValidElement(xr)&&(xr=null),at&&(rr||lr)&&(xr=f.createElement("span",{className:"".concat(sr,"-content")},xr)),f.createElement(Ge,(0,y.Z)({},hr,Qn,{className:Gn,style:Xn,title:Ln,scope:dt,onMouseEnter:Kr?_r:void 0,onMouseLeave:Kr?Tr:void 0,colSpan:gr!==1?gr:null,rowSpan:pr!==1?pr:null}),Sn,xr)}var Qt=f.memo(_t);function Lt(ge,Xe,Ke,We,it){var ht=Ke[ge]||{},Pt=Ke[Xe]||{},Dt,pt;ht.fixed==="left"?Dt=We.left[it==="rtl"?Xe:ge]:Pt.fixed==="right"&&(pt=We.right[it==="rtl"?ge:Xe]);var Ge=!1,Je=!1,at=!1,dt=!1,gt=Ke[Xe+1],Wt=Ke[ge-1],vn=gt&&!gt.fixed||Wt&&!Wt.fixed||Ke.every(function(er){return er.fixed==="left"});if(it==="rtl"){if(Dt!==void 0){var rn=Wt&&Wt.fixed==="left";dt=!rn&&vn}else if(pt!==void 0){var Pn=gt&>.fixed==="right";at=!Pn&&vn}}else if(Dt!==void 0){var Zn=gt&>.fixed==="left";Ge=!Zn&&vn}else if(pt!==void 0){var Kn=Wt&&Wt.fixed==="right";Je=!Kn&&vn}return{fixLeft:Dt,fixRight:pt,lastFixLeft:Ge,firstFixRight:Je,lastFixRight:at,firstFixLeft:dt,isSticky:We.isSticky}}var qt=f.createContext({}),tt=qt;function Re(ge){var Xe=ge.className,Ke=ge.index,We=ge.children,it=ge.colSpan,ht=it===void 0?1:it,Pt=ge.rowSpan,Dt=ge.align,pt=o(A,["prefixCls","direction"]),Ge=pt.prefixCls,Je=pt.direction,at=f.useContext(tt),dt=at.scrollColumnIndex,gt=at.stickyOffsets,Wt=at.flattenColumns,vn=Ke+ht-1,rn=vn+1===dt?ht+1:ht,Pn=Lt(Ke,Ke+rn-1,Wt,gt,Je);return f.createElement(Qt,(0,y.Z)({className:Xe,index:Ke,component:"td",prefixCls:Ge,record:null,dataIndex:null,align:Dt,colSpan:rn,rowSpan:Pt,render:function(){return We}},Pn))}var ye=E(39224),Z=["children"];function we(ge){var Xe=ge.children,Ke=(0,ye.Z)(ge,Z);return f.createElement("tr",Ke,Xe)}function Le(ge){var Xe=ge.children;return Xe}Le.Row=we,Le.Cell=Re;var $=Le;function P(ge){var Xe=ge.children,Ke=ge.stickyOffsets,We=ge.flattenColumns,it=o(A,"prefixCls"),ht=We.length-1,Pt=We[ht],Dt=f.useMemo(function(){return{stickyOffsets:Ke,flattenColumns:We,scrollColumnIndex:Pt!=null&&Pt.scrollbar?ht:null}},[Pt,We,ht,Ke]);return f.createElement(tt.Provider,{value:Dt},f.createElement("tfoot",{className:"".concat(it,"-summary")},Xe))}var K=R(P),ne=$,M=E(29301),B=E(24514),j=E(75152),me=E(26112);function de(ge,Xe,Ke,We,it,ht,Pt){ge.push({record:Xe,indent:Ke,index:Pt});var Dt=ht(Xe),pt=it==null?void 0:it.has(Dt);if(Xe&&Array.isArray(Xe[We])&&pt)for(var Ge=0;Ge<Xe[We].length;Ge+=1)de(ge,Xe[We][Ge],Ke+1,We,it,ht,Ge)}function Ae(ge,Xe,Ke,We){var it=f.useMemo(function(){if(Ke!=null&&Ke.size){for(var ht=[],Pt=0;Pt<(ge==null?void 0:ge.length);Pt+=1){var Dt=ge[Pt];de(ht,Dt,0,Xe,Ke,We,Pt)}return ht}return ge==null?void 0:ge.map(function(pt,Ge){return{record:pt,indent:0,index:Ge}})},[ge,Xe,Ke,We]);return it}function Ee(ge,Xe,Ke,We){var it=o(A,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),ht=it.flattenColumns,Pt=it.expandableType,Dt=it.expandedKeys,pt=it.childrenColumnName,Ge=it.onTriggerExpand,Je=it.rowExpandable,at=it.onRow,dt=it.expandRowByClick,gt=it.rowClassName,Wt=Pt==="nest",vn=Pt==="row"&&(!Je||Je(ge)),rn=vn||Wt,Pn=Dt&&Dt.has(Xe),Zn=pt&&ge&&ge[pt],Kn=(0,bt.zX)(Ge),er=at==null?void 0:at(ge,Ke),dn=er==null?void 0:er.onClick,dr=function(hn){dt&&rn&&Ge(ge,hn);for(var mr=arguments.length,rr=new Array(mr>1?mr-1:0),lr=1;lr<mr;lr++)rr[lr-1]=arguments[lr];dn==null||dn.apply(void 0,[hn].concat(rr))},ir;typeof gt=="string"?ir=gt:typeof gt=="function"&&(ir=gt(ge,Ke,We));var tr=U(ht);return(0,re.Z)((0,re.Z)({},it),{},{columnsKey:tr,nestExpandable:Wt,expanded:Pn,hasNestChildren:Zn,record:ge,onTriggerExpand:Kn,rowSupportExpand:vn,expandable:rn,rowProps:(0,re.Z)((0,re.Z)({},er),{},{className:W()(ir,er==null?void 0:er.className),onClick:dr})})}function Ce(ge){var Xe=ge.prefixCls,Ke=ge.children,We=ge.component,it=ge.cellComponent,ht=ge.className,Pt=ge.expanded,Dt=ge.colSpan,pt=ge.isEmpty,Ge=o(A,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),Je=Ge.scrollbarSize,at=Ge.fixHeader,dt=Ge.fixColumn,gt=Ge.componentWidth,Wt=Ge.horizonScroll,vn=Ke;return(pt?Wt&>:dt)&&(vn=f.createElement("div",{style:{width:gt-(at&&!pt?Je:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(Xe,"-expanded-row-fixed")},vn)),f.createElement(We,{className:ht,style:{display:Pt?null:"none"}},f.createElement(Qt,{component:it,prefixCls:Xe,colSpan:Dt},vn))}var Fe=Ce;function Be(ge){var Xe=ge.prefixCls,Ke=ge.record,We=ge.onExpand,it=ge.expanded,ht=ge.expandable,Pt="".concat(Xe,"-row-expand-icon");if(!ht)return f.createElement("span",{className:W()(Pt,"".concat(Xe,"-row-spaced"))});var Dt=function(Ge){We(Ke,Ge),Ge.stopPropagation()};return f.createElement("span",{className:W()(Pt,(0,le.Z)((0,le.Z)({},"".concat(Xe,"-row-expanded"),it),"".concat(Xe,"-row-collapsed"),!it)),onClick:Dt})}function Ye(ge,Xe,Ke){var We=[];function it(ht){(ht||[]).forEach(function(Pt,Dt){We.push(Xe(Pt,Dt)),it(Pt[Ke])})}return it(ge),We}function xt(ge,Xe,Ke,We){return typeof ge=="string"?ge:typeof ge=="function"?ge(Xe,Ke,We):""}function lt(ge,Xe,Ke,We,it){var ht=ge.record,Pt=ge.prefixCls,Dt=ge.columnsKey,pt=ge.fixedInfoList,Ge=ge.expandIconColumnIndex,Je=ge.nestExpandable,at=ge.indentSize,dt=ge.expandIcon,gt=ge.expanded,Wt=ge.hasNestChildren,vn=ge.onTriggerExpand,rn=Dt[Ke],Pn=pt[Ke],Zn;Ke===(Ge||0)&&Je&&(Zn=f.createElement(f.Fragment,null,f.createElement("span",{style:{paddingLeft:"".concat(at*We,"px")},className:"".concat(Pt,"-row-indent indent-level-").concat(We)}),dt({prefixCls:Pt,expanded:gt,expandable:Wt,record:ht,onExpand:vn})));var Kn;return Xe.onCell&&(Kn=Xe.onCell(ht,it)),{key:rn,fixedInfo:Pn,appendCellNode:Zn,additionalCellProps:Kn||{}}}function nt(ge){var Xe=ge.className,Ke=ge.style,We=ge.record,it=ge.index,ht=ge.renderIndex,Pt=ge.rowKey,Dt=ge.indent,pt=Dt===void 0?0:Dt,Ge=ge.rowComponent,Je=ge.cellComponent,at=ge.scopeCellComponent,dt=Ee(We,Pt,it,pt),gt=dt.prefixCls,Wt=dt.flattenColumns,vn=dt.expandedRowClassName,rn=dt.expandedRowRender,Pn=dt.rowProps,Zn=dt.expanded,Kn=dt.rowSupportExpand,er=f.useRef(!1);er.current||(er.current=Zn);var dn=xt(vn,We,it,pt),dr=f.createElement(Ge,(0,y.Z)({},Pn,{"data-row-key":Pt,className:W()(Xe,"".concat(gt,"-row"),"".concat(gt,"-row-level-").concat(pt),Pn==null?void 0:Pn.className,(0,le.Z)({},dn,pt>=1)),style:(0,re.Z)((0,re.Z)({},Ke),Pn==null?void 0:Pn.style)}),Wt.map(function(Yn,hn){var mr=Yn.render,rr=Yn.dataIndex,lr=Yn.className,Hn=lt(dt,Yn,hn,pt,it),Sn=Hn.key,On=Hn.fixedInfo,Qn=Hn.appendCellNode,Fn=Hn.additionalCellProps;return f.createElement(Qt,(0,y.Z)({className:lr,ellipsis:Yn.ellipsis,align:Yn.align,scope:Yn.rowScope,component:Yn.rowScope?at:Je,prefixCls:gt,key:Sn,record:We,index:it,renderIndex:ht,dataIndex:rr,render:mr,shouldCellUpdate:Yn.shouldCellUpdate},On,{appendNode:Qn,additionalProps:Fn}))})),ir;if(Kn&&(er.current||Zn)){var tr=rn(We,it,pt+1,Zn);ir=f.createElement(Fe,{expanded:Zn,className:W()("".concat(gt,"-expanded-row"),"".concat(gt,"-expanded-row-level-").concat(pt+1),dn),prefixCls:gt,component:Ge,cellComponent:Je,colSpan:Wt.length,isEmpty:!1},tr)}return f.createElement(f.Fragment,null,dr,ir)}var Ut=R(nt);function Vt(ge){var Xe=ge.columnKey,Ke=ge.onColumnResize,We=f.useRef();return(0,fe.Z)(function(){We.current&&Ke(Xe,We.current.offsetWidth)},[]),f.createElement(M.Z,{data:Xe},f.createElement("td",{ref:We,style:{padding:0,border:0,height:0}},f.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}var Ct=E(29194);function Jt(ge){var Xe=ge.prefixCls,Ke=ge.columnsKey,We=ge.onColumnResize,it=f.useRef(null);return f.createElement("tr",{"aria-hidden":"true",className:"".concat(Xe,"-measure-row"),style:{height:0,fontSize:0},ref:it},f.createElement(M.Z.Collection,{onBatchResize:function(Pt){(0,Ct.Z)(it.current)&&Pt.forEach(function(Dt){var pt=Dt.data,Ge=Dt.size;We(pt,Ge.offsetWidth)})}},Ke.map(function(ht){return f.createElement(Vt,{key:ht,columnKey:ht,onColumnResize:We})})))}function wn(ge){var Xe=ge.data,Ke=ge.measureColumnWidth,We=o(A,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),it=We.prefixCls,ht=We.getComponent,Pt=We.onColumnResize,Dt=We.flattenColumns,pt=We.getRowKey,Ge=We.expandedKeys,Je=We.childrenColumnName,at=We.emptyNode,dt=Ae(Xe,Je,Ge,pt),gt=f.useRef({renderWithProps:!1}),Wt=ht(["body","wrapper"],"tbody"),vn=ht(["body","row"],"tr"),rn=ht(["body","cell"],"td"),Pn=ht(["body","cell"],"th"),Zn;Xe.length?Zn=dt.map(function(er,dn){var dr=er.record,ir=er.indent,tr=er.index,Yn=pt(dr,dn);return f.createElement(Ut,{key:Yn,rowKey:Yn,record:dr,index:dn,renderIndex:tr,rowComponent:vn,cellComponent:rn,scopeCellComponent:Pn,indent:ir})}):Zn=f.createElement(Fe,{expanded:!0,className:"".concat(it,"-placeholder"),prefixCls:it,component:vn,cellComponent:rn,colSpan:Dt.length,isEmpty:!0},at);var Kn=U(Dt);return f.createElement(V.Provider,{value:gt.current},f.createElement(Wt,{className:"".concat(it,"-tbody")},Ke&&f.createElement(Jt,{prefixCls:it,columnsKey:Kn,onColumnResize:Pt}),Zn))}var Rt=R(wn),Yt=E(54451),Ne=["columnType"];function ke(ge){for(var Xe=ge.colWidths,Ke=ge.columns,We=ge.columCount,it=o(A,["tableLayout"]),ht=it.tableLayout,Pt=[],Dt=We||Ke.length,pt=!1,Ge=Dt-1;Ge>=0;Ge-=1){var Je=Xe[Ge],at=Ke&&Ke[Ge],dt=void 0,gt=void 0;if(at&&(dt=at[Yt.v],ht==="auto"&&(gt=at.minWidth)),Je||gt||dt||pt){var Wt=dt||{},vn=Wt.columnType,rn=(0,ye.Z)(Wt,Ne);Pt.unshift(f.createElement("col",(0,y.Z)({key:Ge,style:{width:Je,minWidth:gt}},rn))),pt=!0}}return f.createElement("colgroup",null,Pt)}var Pe=ke,z=E(62730),oe=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function he(ge,Xe){return(0,f.useMemo)(function(){for(var Ke=[],We=0;We<Xe;We+=1){var it=ge[We];if(it!==void 0)Ke[We]=it;else return null}return Ke},[ge.join("_"),Xe])}var ce=f.forwardRef(function(ge,Xe){var Ke=ge.className,We=ge.noData,it=ge.columns,ht=ge.flattenColumns,Pt=ge.colWidths,Dt=ge.columCount,pt=ge.stickyOffsets,Ge=ge.direction,Je=ge.fixHeader,at=ge.stickyTopOffset,dt=ge.stickyBottomOffset,gt=ge.stickyClassName,Wt=ge.onScroll,vn=ge.maxContentScroll,rn=ge.children,Pn=(0,ye.Z)(ge,oe),Zn=o(A,["prefixCls","scrollbarSize","isSticky","getComponent"]),Kn=Zn.prefixCls,er=Zn.scrollbarSize,dn=Zn.isSticky,dr=Zn.getComponent,ir=dr(["header","table"],"table"),tr=dn&&!Je?0:er,Yn=f.useRef(null),hn=f.useCallback(function(Fn){(0,C.mH)(Xe,Fn),(0,C.mH)(Yn,Fn)},[]);f.useEffect(function(){var Fn;function sr(ar){var Pr=ar,zr=Pr.currentTarget,Kr=Pr.deltaX;Kr&&(Wt({currentTarget:zr,scrollLeft:zr.scrollLeft+Kr}),ar.preventDefault())}return(Fn=Yn.current)===null||Fn===void 0||Fn.addEventListener("wheel",sr,{passive:!1}),function(){var ar;(ar=Yn.current)===null||ar===void 0||ar.removeEventListener("wheel",sr)}},[]);var mr=f.useMemo(function(){return ht.every(function(Fn){return Fn.width})},[ht]),rr=ht[ht.length-1],lr={fixed:rr?rr.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Kn,"-cell-scrollbar")}}},Hn=(0,f.useMemo)(function(){return tr?[].concat((0,z.Z)(it),[lr]):it},[tr,it]),Sn=(0,f.useMemo)(function(){return tr?[].concat((0,z.Z)(ht),[lr]):ht},[tr,ht]),On=(0,f.useMemo)(function(){var Fn=pt.right,sr=pt.left;return(0,re.Z)((0,re.Z)({},pt),{},{left:Ge==="rtl"?[].concat((0,z.Z)(sr.map(function(ar){return ar+tr})),[0]):sr,right:Ge==="rtl"?Fn:[].concat((0,z.Z)(Fn.map(function(ar){return ar+tr})),[0]),isSticky:dn})},[tr,pt,dn]),Qn=he(Pt,Dt);return f.createElement("div",{style:(0,re.Z)({overflow:"hidden"},dn?{top:at,bottom:dt}:{}),ref:hn,className:W()(Ke,(0,le.Z)({},gt,!!gt))},f.createElement(ir,{style:{tableLayout:"fixed",visibility:We||Qn?null:"hidden"}},(!We||!vn||mr)&&f.createElement(Pe,{colWidths:Qn?[].concat((0,z.Z)(Qn),[tr]):[],columCount:Dt+1,columns:Sn}),rn((0,re.Z)((0,re.Z)({},Pn),{},{stickyOffsets:On,columns:Hn,flattenColumns:Sn}))))}),be=f.memo(ce),ze=function(Xe){var Ke=Xe.cells,We=Xe.stickyOffsets,it=Xe.flattenColumns,ht=Xe.rowComponent,Pt=Xe.cellComponent,Dt=Xe.onHeaderRow,pt=Xe.index,Ge=o(A,["prefixCls","direction"]),Je=Ge.prefixCls,at=Ge.direction,dt;Dt&&(dt=Dt(Ke.map(function(Wt){return Wt.column}),pt));var gt=U(Ke.map(function(Wt){return Wt.column}));return f.createElement(ht,dt,Ke.map(function(Wt,vn){var rn=Wt.column,Pn=Lt(Wt.colStart,Wt.colEnd,it,We,at),Zn;return rn&&rn.onHeaderCell&&(Zn=Wt.column.onHeaderCell(rn)),f.createElement(Qt,(0,y.Z)({},Wt,{scope:rn.title?Wt.colSpan>1?"colgroup":"col":null,ellipsis:rn.ellipsis,align:rn.align,component:Pt,prefixCls:Je,key:gt[vn]},Pn,{additionalProps:Zn,rowType:"header"}))}))},Ze=ze;function $e(ge){var Xe=[];function Ke(Pt,Dt){var pt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;Xe[pt]=Xe[pt]||[];var Ge=Dt,Je=Pt.filter(Boolean).map(function(at){var dt={key:at.key,className:at.className||"",children:at.title,column:at,colStart:Ge},gt=1,Wt=at.children;return Wt&&Wt.length>0&&(gt=Ke(Wt,Ge,pt+1).reduce(function(vn,rn){return vn+rn},0),dt.hasSubColumns=!0),"colSpan"in at&&(gt=at.colSpan),"rowSpan"in at&&(dt.rowSpan=at.rowSpan),dt.colSpan=gt,dt.colEnd=dt.colStart+gt-1,Xe[pt].push(dt),Ge+=gt,gt});return Je}Ke(ge,0);for(var We=Xe.length,it=function(Dt){Xe[Dt].forEach(function(pt){!("rowSpan"in pt)&&!pt.hasSubColumns&&(pt.rowSpan=We-Dt)})},ht=0;ht<We;ht+=1)it(ht);return Xe}var ft=function(Xe){var Ke=Xe.stickyOffsets,We=Xe.columns,it=Xe.flattenColumns,ht=Xe.onHeaderRow,Pt=o(A,["prefixCls","getComponent"]),Dt=Pt.prefixCls,pt=Pt.getComponent,Ge=f.useMemo(function(){return $e(We)},[We]),Je=pt(["header","wrapper"],"thead"),at=pt(["header","row"],"tr"),dt=pt(["header","cell"],"th");return f.createElement(Je,{className:"".concat(Dt,"-thead")},Ge.map(function(gt,Wt){var vn=f.createElement(Ze,{key:Wt,flattenColumns:it,cells:gt,stickyOffsets:Ke,rowComponent:at,cellComponent:dt,onHeaderRow:ht,index:Wt});return vn}))},en=R(ft),an=E(97347);function yt(ge,Xe,Ke){var We=(0,Yt.g)(ge),it=We.expandIcon,ht=We.expandedRowKeys,Pt=We.defaultExpandedRowKeys,Dt=We.defaultExpandAllRows,pt=We.expandedRowRender,Ge=We.onExpand,Je=We.onExpandedRowsChange,at=We.childrenColumnName,dt=it||Be,gt=at||"children",Wt=f.useMemo(function(){return pt?"row":ge.expandable&&ge.internalHooks===x.R&&ge.expandable.__PARENT_RENDER_ICON__||Xe.some(function(dn){return dn&&(0,I.Z)(dn)==="object"&&dn[gt]})?"nest":!1},[!!pt,Xe]),vn=f.useState(function(){return Pt||(Dt?Ye(Xe,Ke,gt):[])}),rn=(0,ae.Z)(vn,2),Pn=rn[0],Zn=rn[1],Kn=f.useMemo(function(){return new Set(ht||Pn||[])},[ht,Pn]),er=f.useCallback(function(dn){var dr=Ke(dn,Xe.indexOf(dn)),ir,tr=Kn.has(dr);tr?(Kn.delete(dr),ir=(0,z.Z)(Kn)):ir=[].concat((0,z.Z)(Kn),[dr]),Zn(ir),Ge&&Ge(!tr,dn),Je&&Je(ir)},[Ke,Kn,Xe,Ge,Je]);return[We,Wt,Kn,dt,gt,er]}function Gt(ge,Xe,Ke){var We=ge.map(function(it,ht){return Lt(ht,ht,ge,Xe,Ke)});return(0,O.Z)(function(){return We},[We],function(it,ht){return!(0,F.Z)(it,ht)})}function _n(ge){var Xe=(0,f.useRef)(ge),Ke=(0,f.useState)({}),We=(0,ae.Z)(Ke,2),it=We[1],ht=(0,f.useRef)(null),Pt=(0,f.useRef)([]);function Dt(pt){Pt.current.push(pt);var Ge=Promise.resolve();ht.current=Ge,Ge.then(function(){if(ht.current===Ge){var Je=Pt.current,at=Xe.current;Pt.current=[],Je.forEach(function(dt){Xe.current=dt(Xe.current)}),ht.current=null,at!==Xe.current&&it({})}})}return(0,f.useEffect)(function(){return function(){ht.current=null}},[]),[Xe.current,Dt]}function Bn(ge){var Xe=(0,f.useRef)(ge||null),Ke=(0,f.useRef)();function We(){window.clearTimeout(Ke.current)}function it(Pt){Xe.current=Pt,We(),Ke.current=window.setTimeout(function(){Xe.current=null,Ke.current=void 0},100)}function ht(){return Xe.current}return(0,f.useEffect)(function(){return We},[]),[it,ht]}function cn(){var ge=f.useState(-1),Xe=(0,ae.Z)(ge,2),Ke=Xe[0],We=Xe[1],it=f.useState(-1),ht=(0,ae.Z)(it,2),Pt=ht[0],Dt=ht[1],pt=f.useCallback(function(Ge,Je){We(Ge),Dt(Je)},[]);return[Ke,Pt,pt]}var pn=E(47273),Tn=(0,pn.Z)()?window:null;function mn(ge,Xe){var Ke=(0,I.Z)(ge)==="object"?ge:{},We=Ke.offsetHeader,it=We===void 0?0:We,ht=Ke.offsetSummary,Pt=ht===void 0?0:ht,Dt=Ke.offsetScroll,pt=Dt===void 0?0:Dt,Ge=Ke.getContainer,Je=Ge===void 0?function(){return Tn}:Ge,at=Je()||Tn,dt=!!ge;return f.useMemo(function(){return{isSticky:dt,stickyClassName:dt?"".concat(Xe,"-sticky-holder"):"",offsetHeader:it,offsetSummary:Pt,offsetScroll:pt,container:at}},[dt,pt,it,Pt,Xe,at])}function An(ge,Xe,Ke){var We=(0,f.useMemo)(function(){var it=Xe.length,ht=function(Ge,Je,at){for(var dt=[],gt=0,Wt=Ge;Wt!==Je;Wt+=at)dt.push(gt),Xe[Wt].fixed&&(gt+=ge[Wt]||0);return dt},Pt=ht(0,it,1),Dt=ht(it-1,-1,-1).reverse();return Ke==="rtl"?{left:Dt,right:Pt}:{left:Pt,right:Dt}},[ge,Xe,Ke]);return We}var Ft=An;function Wn(ge){var Xe=ge.className,Ke=ge.children;return f.createElement("div",{className:Xe},Ke)}var Ue=Wn,Oe=E(8224),Bt=E(16089),kt=E(76846);function St(ge){var Xe=(0,kt.bn)(ge),Ke=Xe.getBoundingClientRect(),We=document.documentElement;return{left:Ke.left+(window.pageXOffset||We.scrollLeft)-(We.clientLeft||document.body.clientLeft||0),top:Ke.top+(window.pageYOffset||We.scrollTop)-(We.clientTop||document.body.clientTop||0)}}var fn=function(Xe,Ke){var We,it,ht=Xe.scrollBodyRef,Pt=Xe.onScroll,Dt=Xe.offsetScroll,pt=Xe.container,Ge=Xe.direction,Je=o(A,"prefixCls"),at=((We=ht.current)===null||We===void 0?void 0:We.scrollWidth)||0,dt=((it=ht.current)===null||it===void 0?void 0:it.clientWidth)||0,gt=at&&dt*(dt/at),Wt=f.useRef(),vn=_n({scrollLeft:0,isHiddenScrollBar:!0}),rn=(0,ae.Z)(vn,2),Pn=rn[0],Zn=rn[1],Kn=f.useRef({delta:0,x:0}),er=f.useState(!1),dn=(0,ae.Z)(er,2),dr=dn[0],ir=dn[1],tr=f.useRef(null);f.useEffect(function(){return function(){Bt.Z.cancel(tr.current)}},[]);var Yn=function(){ir(!1)},hn=function(Sn){Sn.persist(),Kn.current.delta=Sn.pageX-Pn.scrollLeft,Kn.current.x=0,ir(!0),Sn.preventDefault()},mr=function(Sn){var On,Qn=Sn||((On=window)===null||On===void 0?void 0:On.event),Fn=Qn.buttons;if(!dr||Fn===0){dr&&ir(!1);return}var sr=Kn.current.x+Sn.pageX-Kn.current.x-Kn.current.delta,ar=Ge==="rtl";sr=Math.max(ar?gt-dt:0,Math.min(ar?0:dt-gt,sr));var Pr=!ar||Math.abs(sr)+Math.abs(gt)<dt;Pr&&(Pt({scrollLeft:sr/dt*(at+2)}),Kn.current.x=Sn.pageX)},rr=function(){Bt.Z.cancel(tr.current),tr.current=(0,Bt.Z)(function(){if(ht.current){var Sn=St(ht.current).top,On=Sn+ht.current.offsetHeight,Qn=pt===window?document.documentElement.scrollTop+window.innerHeight:St(pt).top+pt.clientHeight;On-(0,j.Z)()<=Qn||Sn>=Qn-Dt?Zn(function(Fn){return(0,re.Z)((0,re.Z)({},Fn),{},{isHiddenScrollBar:!0})}):Zn(function(Fn){return(0,re.Z)((0,re.Z)({},Fn),{},{isHiddenScrollBar:!1})})}})},lr=function(Sn){Zn(function(On){return(0,re.Z)((0,re.Z)({},On),{},{scrollLeft:Sn/at*dt||0})})};return f.useImperativeHandle(Ke,function(){return{setScrollLeft:lr,checkScrollBarVisible:rr}}),f.useEffect(function(){var Hn=(0,Oe.Z)(document.body,"mouseup",Yn,!1),Sn=(0,Oe.Z)(document.body,"mousemove",mr,!1);return rr(),function(){Hn.remove(),Sn.remove()}},[gt,dr]),f.useEffect(function(){if(ht.current){for(var Hn=[],Sn=(0,kt.bn)(ht.current);Sn;)Hn.push(Sn),Sn=Sn.parentElement;return Hn.forEach(function(On){return On.addEventListener("scroll",rr,!1)}),window.addEventListener("resize",rr,!1),window.addEventListener("scroll",rr,!1),pt.addEventListener("scroll",rr,!1),function(){Hn.forEach(function(On){return On.removeEventListener("scroll",rr)}),window.removeEventListener("resize",rr),window.removeEventListener("scroll",rr),pt.removeEventListener("scroll",rr)}}},[pt]),f.useEffect(function(){Pn.isHiddenScrollBar||Zn(function(Hn){var Sn=ht.current;return Sn?(0,re.Z)((0,re.Z)({},Hn),{},{scrollLeft:Sn.scrollLeft/Sn.scrollWidth*Sn.clientWidth}):Hn})},[Pn.isHiddenScrollBar]),at<=dt||!gt||Pn.isHiddenScrollBar?null:f.createElement("div",{style:{height:(0,j.Z)(),width:dt,bottom:Dt},className:"".concat(Je,"-sticky-scroll")},f.createElement("div",{onMouseDown:hn,ref:Wt,className:W()("".concat(Je,"-sticky-scroll-bar"),(0,le.Z)({},"".concat(Je,"-sticky-scroll-bar-active"),dr)),style:{width:"".concat(gt,"px"),transform:"translate3d(".concat(Pn.scrollLeft,"px, 0, 0)")}}))},Ve=f.forwardRef(fn);function Qe(ge){return null}var Tt=Qe;function Et(ge){return null}var Xt=Et,ln="rc-table",nn=[],zt={};function De(){return"No Data"}function Se(ge,Xe){var Ke=(0,re.Z)({rowKey:"key",prefixCls:ln,emptyText:De},ge),We=Ke.prefixCls,it=Ke.className,ht=Ke.rowClassName,Pt=Ke.style,Dt=Ke.data,pt=Ke.rowKey,Ge=Ke.scroll,Je=Ke.tableLayout,at=Ke.direction,dt=Ke.title,gt=Ke.footer,Wt=Ke.summary,vn=Ke.caption,rn=Ke.id,Pn=Ke.showHeader,Zn=Ke.components,Kn=Ke.emptyText,er=Ke.onRow,dn=Ke.onHeaderRow,dr=Ke.onScroll,ir=Ke.internalHooks,tr=Ke.transformColumns,Yn=Ke.internalRefs,hn=Ke.tailor,mr=Ke.getContainerWidth,rr=Ke.sticky,lr=Ke.rowHoverable,Hn=lr===void 0?!0:lr,Sn=Dt||nn,On=!!Sn.length,Qn=ir===x.R,Fn=f.useCallback(function(Cr,Rr){return(0,Q.Z)(Zn,Cr)||Rr},[Zn]),sr=f.useMemo(function(){return typeof pt=="function"?pt:function(Cr){var Rr=Cr&&Cr[pt];return Rr}},[pt]),ar=Fn(["body"]),Pr=cn(),zr=(0,ae.Z)(Pr,3),Kr=zr[0],ei=zr[1],Zr=zr[2],Br=yt(Ke,Sn,sr),hr=(0,ae.Z)(Br,6),Sr=hr[0],kr=hr[1],Dr=hr[2],gr=hr[3],pr=hr[4],tn=hr[5],zn=Ge==null?void 0:Ge.x,Jn=f.useState(0),nr=(0,ae.Z)(Jn,2),_r=nr[0],Tr=nr[1],Ln=(0,an.Z)((0,re.Z)((0,re.Z)((0,re.Z)({},Ke),Sr),{},{expandable:!!Sr.expandedRowRender,columnTitle:Sr.columnTitle,expandedKeys:Dr,getRowKey:sr,onTriggerExpand:tn,expandIcon:gr,expandIconColumnIndex:Sr.expandIconColumnIndex,direction:at,scrollWidth:Qn&&hn&&typeof zn=="number"?zn:null,clientWidth:_r}),Qn?tr:null),Gn=(0,ae.Z)(Ln,4),yr=Gn[0],Xn=Gn[1],xr=Gn[2],Jr=Gn[3],Fr=xr!=null?xr:zn,qr=f.useMemo(function(){return{columns:yr,flattenColumns:Xn}},[yr,Xn]),ri=f.useRef(),li=f.useRef(),Hr=f.useRef(),ts=f.useRef();f.useImperativeHandle(Xe,function(){return{nativeElement:ri.current,scrollTo:function(Rr){var ai;if(Hr.current instanceof HTMLElement){var Ei=Rr.index,oi=Rr.top,Yi=Rr.key;if(pe(oi)){var Xi;(Xi=Hr.current)===null||Xi===void 0||Xi.scrollTo({top:oi})}else{var Qi,gs=Yi!=null?Yi:sr(Sn[Ei]);(Qi=Hr.current.querySelector('[data-row-key="'.concat(gs,'"]')))===null||Qi===void 0||Qi.scrollIntoView()}}else(ai=Hr.current)!==null&&ai!==void 0&&ai.scrollTo&&Hr.current.scrollTo(Rr)}}});var Fi=f.useRef(),wi=f.useState(!1),ui=(0,ae.Z)(wi,2),Li=ui[0],Ni=ui[1],Mi=f.useState(!1),pi=(0,ae.Z)(Mi,2),Bi=pi[0],Ai=pi[1],ns=f.useState(new Map),Ti=(0,ae.Z)(ns,2),rs=Ti[0],Ui=Ti[1],mi=U(Xn),Wi=mi.map(function(Cr){return rs.get(Cr)}),Ki=f.useMemo(function(){return Wi},[Wi.join("_")]),ki=Ft(Ki,Xn,at),si=Ge&&se(Ge.y),ti=Ge&&se(Fr)||!!Sr.fixed,wr=ti&&Xn.some(function(Cr){var Rr=Cr.fixed;return Rr}),Er=f.useRef(),Yr=mn(rr,We),Gr=Yr.isSticky,Wr=Yr.offsetHeader,Xr=Yr.offsetSummary,di=Yr.offsetScroll,fi=Yr.stickyClassName,vi=Yr.container,Qr=f.useMemo(function(){return Wt==null?void 0:Wt(Sn)},[Wt,Sn]),ii=(si||Gr)&&f.isValidElement(Qr)&&Qr.type===$&&Qr.props.fixed,Di,_i,is;si&&(_i={overflowY:On?"scroll":"auto",maxHeight:Ge.y}),ti&&(Di={overflowX:"auto"},si||(_i={overflowY:"hidden"}),is={width:Fr===!0?"auto":Fr,minWidth:"100%"});var bs=f.useCallback(function(Cr,Rr){Ui(function(ai){if(ai.get(Cr)!==Rr){var Ei=new Map(ai);return Ei.set(Cr,Rr),Ei}return ai})},[]),$r=Bn(null),Or=(0,ae.Z)($r,2),Vr=Or[0],Kt=Or[1];function ni(Cr,Rr){Rr&&(typeof Rr=="function"?Rr(Cr):Rr.scrollLeft!==Cr&&(Rr.scrollLeft=Cr,Rr.scrollLeft!==Cr&&setTimeout(function(){Rr.scrollLeft=Cr},0)))}var yi=(0,ve.Z)(function(Cr){var Rr=Cr.currentTarget,ai=Cr.scrollLeft,Ei=at==="rtl",oi=typeof ai=="number"?ai:Rr.scrollLeft,Yi=Rr||zt;if(!Kt()||Kt()===Yi){var Xi;Vr(Yi),ni(oi,li.current),ni(oi,Hr.current),ni(oi,Fi.current),ni(oi,(Xi=Er.current)===null||Xi===void 0?void 0:Xi.setScrollLeft)}var Qi=Rr||li.current;if(Qi){var gs=Qn&&hn&&typeof Fr=="number"?Fr:Qi.scrollWidth,vs=Qi.clientWidth;if(gs===vs){Ni(!1),Ai(!1);return}Ei?(Ni(-oi<gs-vs),Ai(-oi>0)):(Ni(oi>0),Ai(oi<gs-vs))}}),ss=(0,ve.Z)(function(Cr){yi(Cr),dr==null||dr(Cr)}),xs=function(){if(ti&&Hr.current){var Rr;yi({currentTarget:(0,kt.bn)(Hr.current),scrollLeft:(Rr=Hr.current)===null||Rr===void 0?void 0:Rr.scrollLeft})}else Ni(!1),Ai(!1)},as=function(Rr){var ai,Ei=Rr.width;(ai=Er.current)===null||ai===void 0||ai.checkScrollBarVisible();var oi=ri.current?ri.current.offsetWidth:Ei;Qn&&mr&&ri.current&&(oi=mr(ri.current,oi)||oi),oi!==_r&&(xs(),Tr(oi))},os=f.useRef(!1);f.useEffect(function(){os.current&&xs()},[ti,Dt,yr.length]),f.useEffect(function(){os.current=!0},[]);var Vi=f.useState(0),ls=(0,ae.Z)(Vi,2),Zi=ls[0],us=ls[1],cs=f.useState(!0),$s=(0,ae.Z)(cs,2),js=$s[0],pa=$s[1];(0,fe.Z)(function(){(!hn||!Qn)&&(Hr.current instanceof Element?us((0,j.o)(Hr.current).width):us((0,j.o)(ts.current).width)),pa((0,B.G)("position","sticky"))},[]),f.useEffect(function(){Qn&&Yn&&(Yn.body.current=Hr.current)});var ma=f.useCallback(function(Cr){return f.createElement(f.Fragment,null,f.createElement(en,Cr),ii==="top"&&f.createElement(K,Cr,Qr))},[ii,Qr]),Ys=f.useCallback(function(Cr){return f.createElement(K,Cr,Qr)},[Qr]),Ss=Fn(["table"],"table"),$i=f.useMemo(function(){return Je||(wr?Fr==="max-content"?"auto":"fixed":si||Gr||Xn.some(function(Cr){var Rr=Cr.ellipsis;return Rr})?"fixed":"auto")},[si,wr,Xn,Je,Gr]),ji,Os={colWidths:Ki,columCount:Xn.length,stickyOffsets:ki,onHeaderRow:dn,fixHeader:si,scroll:Ge},Fs=f.useMemo(function(){return On?null:typeof Kn=="function"?Kn():Kn},[On,Kn]),Ns=f.createElement(Rt,{data:Sn,measureColumnWidth:si||ti||Gr}),ws=f.createElement(Pe,{colWidths:Xn.map(function(Cr){var Rr=Cr.width;return Rr}),columns:Xn}),Xs=vn!=null?f.createElement("caption",{className:"".concat(We,"-caption")},vn):void 0,As=(0,me.Z)(Ke,{data:!0}),Qs=(0,me.Z)(Ke,{aria:!0});if(si||Gr){var Ms;typeof ar=="function"?(Ms=ar(Sn,{scrollbarSize:Zi,ref:Hr,onScroll:yi}),Os.colWidths=Xn.map(function(Cr,Rr){var ai=Cr.width,Ei=Rr===Xn.length-1?ai-Zi:ai;return typeof Ei=="number"&&!Number.isNaN(Ei)?Ei:0})):Ms=f.createElement("div",{style:(0,re.Z)((0,re.Z)({},Di),_i),onScroll:ss,ref:Hr,className:W()("".concat(We,"-body"))},f.createElement(Ss,(0,y.Z)({style:(0,re.Z)((0,re.Z)({},is),{},{tableLayout:$i})},Qs),Xs,ws,Ns,!ii&&Qr&&f.createElement(K,{stickyOffsets:ki,flattenColumns:Xn},Qr)));var Bs=(0,re.Z)((0,re.Z)((0,re.Z)({noData:!Sn.length,maxContentScroll:ti&&Fr==="max-content"},Os),qr),{},{direction:at,stickyClassName:fi,onScroll:yi});ji=f.createElement(f.Fragment,null,Pn!==!1&&f.createElement(be,(0,y.Z)({},Bs,{stickyTopOffset:Wr,className:"".concat(We,"-header"),ref:li}),ma),Ms,ii&&ii!=="top"&&f.createElement(be,(0,y.Z)({},Bs,{stickyBottomOffset:Xr,className:"".concat(We,"-summary"),ref:Fi}),Ys),Gr&&Hr.current&&Hr.current instanceof Element&&f.createElement(Ve,{ref:Er,offsetScroll:di,scrollBodyRef:Hr,onScroll:yi,container:vi,direction:at}))}else ji=f.createElement("div",{style:(0,re.Z)((0,re.Z)({},Di),_i),className:W()("".concat(We,"-content")),onScroll:yi,ref:Hr},f.createElement(Ss,(0,y.Z)({style:(0,re.Z)((0,re.Z)({},is),{},{tableLayout:$i})},Qs),Xs,ws,Pn!==!1&&f.createElement(en,(0,y.Z)({},Os,qr)),Ns,Qr&&f.createElement(K,{stickyOffsets:ki,flattenColumns:Xn},Qr)));var Ts=f.createElement("div",(0,y.Z)({className:W()(We,it,(0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)((0,le.Z)({},"".concat(We,"-rtl"),at==="rtl"),"".concat(We,"-ping-left"),Li),"".concat(We,"-ping-right"),Bi),"".concat(We,"-layout-fixed"),Je==="fixed"),"".concat(We,"-fixed-header"),si),"".concat(We,"-fixed-column"),wr),"".concat(We,"-fixed-column-gapped"),wr&&Jr),"".concat(We,"-scroll-horizontal"),ti),"".concat(We,"-has-fix-left"),Xn[0]&&Xn[0].fixed),"".concat(We,"-has-fix-right"),Xn[Xn.length-1]&&Xn[Xn.length-1].fixed==="right")),style:Pt,id:rn,ref:ri},As),dt&&f.createElement(Ue,{className:"".concat(We,"-title")},dt(Sn)),f.createElement("div",{ref:ts,className:"".concat(We,"-container")},ji),gt&&f.createElement(Ue,{className:"".concat(We,"-footer")},gt(Sn)));ti&&(Ts=f.createElement(M.Z,{onResize:as},Ts));var Js=Gt(Xn,ki,at),qs=f.useMemo(function(){return{scrollX:Fr,prefixCls:We,getComponent:Fn,scrollbarSize:Zi,direction:at,fixedInfoList:Js,isSticky:Gr,supportSticky:js,componentWidth:_r,fixHeader:si,fixColumn:wr,horizonScroll:ti,tableLayout:$i,rowClassName:ht,expandedRowClassName:Sr.expandedRowClassName,expandIcon:gr,expandableType:kr,expandRowByClick:Sr.expandRowByClick,expandedRowRender:Sr.expandedRowRender,onTriggerExpand:tn,expandIconColumnIndex:Sr.expandIconColumnIndex,indentSize:Sr.indentSize,allColumnsFixedLeft:Xn.every(function(Cr){return Cr.fixed==="left"}),emptyNode:Fs,columns:yr,flattenColumns:Xn,onColumnResize:bs,hoverStartRow:Kr,hoverEndRow:ei,onHover:Zr,rowExpandable:Sr.rowExpandable,onRow:er,getRowKey:sr,expandedKeys:Dr,childrenColumnName:pr,rowHoverable:Hn}},[Fr,We,Fn,Zi,at,Js,Gr,js,_r,si,wr,ti,$i,ht,Sr.expandedRowClassName,gr,kr,Sr.expandRowByClick,Sr.expandedRowRender,tn,Sr.expandIconColumnIndex,Sr.indentSize,Fs,yr,Xn,bs,Kr,ei,Zr,Sr.rowExpandable,er,sr,Dr,pr,Hn]);return f.createElement(A.Provider,{value:qs},Ts)}var et=f.forwardRef(Se);function rt(ge){return H(et,ge)}var It=rt();It.EXPAND_COLUMN=x.w,It.INTERNAL_HOOKS=x.R,It.Column=Tt,It.ColumnGroup=Xt,It.Summary=ne;var Nt=It,wt=E(65283),Zt=te(null),$t=te(null);function jt(ge,Xe,Ke){var We=Xe||1;return Ke[ge+We]-(Ke[ge]||0)}function xn(ge){var Xe=ge.rowInfo,Ke=ge.column,We=ge.colIndex,it=ge.indent,ht=ge.index,Pt=ge.component,Dt=ge.renderIndex,pt=ge.record,Ge=ge.style,Je=ge.className,at=ge.inverse,dt=ge.getHeight,gt=Ke.render,Wt=Ke.dataIndex,vn=Ke.className,rn=Ke.width,Pn=o($t,["columnsOffset"]),Zn=Pn.columnsOffset,Kn=lt(Xe,Ke,We,it,ht),er=Kn.key,dn=Kn.fixedInfo,dr=Kn.appendCellNode,ir=Kn.additionalCellProps,tr=ir.style,Yn=ir.colSpan,hn=Yn===void 0?1:Yn,mr=ir.rowSpan,rr=mr===void 0?1:mr,lr=We-1,Hn=jt(lr,hn,Zn),Sn=hn>1?rn-Hn:0,On=(0,re.Z)((0,re.Z)((0,re.Z)({},tr),Ge),{},{flex:"0 0 ".concat(Hn,"px"),width:"".concat(Hn,"px"),marginRight:Sn,pointerEvents:"auto"}),Qn=f.useMemo(function(){return at?rr<=1:hn===0||rr===0||rr>1},[rr,hn,at]);Qn?On.visibility="hidden":at&&(On.height=dt==null?void 0:dt(rr));var Fn=Qn?function(){return null}:gt,sr={};return(rr===0||hn===0)&&(sr.rowSpan=1,sr.colSpan=1),f.createElement(Qt,(0,y.Z)({className:W()(vn,Je),ellipsis:Ke.ellipsis,align:Ke.align,scope:Ke.rowScope,component:Pt,prefixCls:Xe.prefixCls,key:er,record:pt,index:ht,renderIndex:Dt,dataIndex:Wt,render:Fn,shouldCellUpdate:Ke.shouldCellUpdate},dn,{appendNode:dr,additionalProps:(0,re.Z)((0,re.Z)({},ir),{},{style:On},sr)}))}var un=xn,Cn=["data","index","className","rowKey","style","extra","getHeight"],Un=f.forwardRef(function(ge,Xe){var Ke=ge.data,We=ge.index,it=ge.className,ht=ge.rowKey,Pt=ge.style,Dt=ge.extra,pt=ge.getHeight,Ge=(0,ye.Z)(ge,Cn),Je=Ke.record,at=Ke.indent,dt=Ke.index,gt=o(A,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Wt=gt.scrollX,vn=gt.flattenColumns,rn=gt.prefixCls,Pn=gt.fixColumn,Zn=gt.componentWidth,Kn=o(Zt,["getComponent"]),er=Kn.getComponent,dn=Ee(Je,ht,We,at),dr=er(["body","row"],"div"),ir=er(["body","cell"],"div"),tr=dn.rowSupportExpand,Yn=dn.expanded,hn=dn.rowProps,mr=dn.expandedRowRender,rr=dn.expandedRowClassName,lr;if(tr&&Yn){var Hn=mr(Je,We,at+1,Yn),Sn=xt(rr,Je,We,at),On={};Pn&&(On={style:(0,le.Z)({},"--virtual-width","".concat(Zn,"px"))});var Qn="".concat(rn,"-expanded-row-cell");lr=f.createElement(dr,{className:W()("".concat(rn,"-expanded-row"),"".concat(rn,"-expanded-row-level-").concat(at+1),Sn)},f.createElement(Qt,{component:ir,prefixCls:rn,className:W()(Qn,(0,le.Z)({},"".concat(Qn,"-fixed"),Pn)),additionalProps:On},Hn))}var Fn=(0,re.Z)((0,re.Z)({},Pt),{},{width:Wt});Dt&&(Fn.position="absolute",Fn.pointerEvents="none");var sr=f.createElement(dr,(0,y.Z)({},hn,Ge,{"data-row-key":ht,ref:tr?null:Xe,className:W()(it,"".concat(rn,"-row"),hn==null?void 0:hn.className,(0,le.Z)({},"".concat(rn,"-row-extra"),Dt)),style:(0,re.Z)((0,re.Z)({},Fn),hn==null?void 0:hn.style)}),vn.map(function(ar,Pr){return f.createElement(un,{key:Pr,component:ir,rowInfo:dn,column:ar,colIndex:Pr,indent:at,index:We,renderIndex:dt,record:Je,inverse:Dt,getHeight:pt})}));return tr?f.createElement("div",{ref:Xe},sr,lr):sr}),Nn=R(Un),Rn=Nn,In=f.forwardRef(function(ge,Xe){var Ke=ge.data,We=ge.onScroll,it=o(A,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),ht=it.flattenColumns,Pt=it.onColumnResize,Dt=it.getRowKey,pt=it.expandedKeys,Ge=it.prefixCls,Je=it.childrenColumnName,at=it.scrollX,dt=it.direction,gt=o(Zt),Wt=gt.sticky,vn=gt.scrollY,rn=gt.listItemHeight,Pn=gt.getComponent,Zn=gt.onScroll,Kn=f.useRef(),er=Ae(Ke,Je,pt,Dt),dn=f.useMemo(function(){var lr=0;return ht.map(function(Hn){var Sn=Hn.width,On=Hn.key;return lr+=Sn,[On,Sn,lr]})},[ht]),dr=f.useMemo(function(){return dn.map(function(lr){return lr[2]})},[dn]);f.useEffect(function(){dn.forEach(function(lr){var Hn=(0,ae.Z)(lr,2),Sn=Hn[0],On=Hn[1];Pt(Sn,On)})},[dn]),f.useImperativeHandle(Xe,function(){var lr,Hn={scrollTo:function(On){var Qn;(Qn=Kn.current)===null||Qn===void 0||Qn.scrollTo(On)},nativeElement:(lr=Kn.current)===null||lr===void 0?void 0:lr.nativeElement};return Object.defineProperty(Hn,"scrollLeft",{get:function(){var On;return((On=Kn.current)===null||On===void 0?void 0:On.getScrollInfo().x)||0},set:function(On){var Qn;(Qn=Kn.current)===null||Qn===void 0||Qn.scrollTo({left:On})}}),Hn});var ir=function(Hn,Sn){var On,Qn=(On=er[Sn])===null||On===void 0?void 0:On.record,Fn=Hn.onCell;if(Fn){var sr,ar=Fn(Qn,Sn);return(sr=ar==null?void 0:ar.rowSpan)!==null&&sr!==void 0?sr:1}return 1},tr=function(Hn){var Sn=Hn.start,On=Hn.end,Qn=Hn.getSize,Fn=Hn.offsetY;if(On<0)return null;for(var sr=ht.filter(function(gr){return ir(gr,Sn)===0}),ar=Sn,Pr=function(pr){if(sr=sr.filter(function(tn){return ir(tn,pr)===0}),!sr.length)return ar=pr,1},zr=Sn;zr>=0&&!Pr(zr);zr-=1);for(var Kr=ht.filter(function(gr){return ir(gr,On)!==1}),ei=On,Zr=function(pr){if(Kr=Kr.filter(function(tn){return ir(tn,pr)!==1}),!Kr.length)return ei=Math.max(pr-1,On),1},Br=On;Br<er.length&&!Zr(Br);Br+=1);for(var hr=[],Sr=function(pr){var tn=er[pr];if(!tn)return 1;ht.some(function(zn){return ir(zn,pr)>1})&&hr.push(pr)},kr=ar;kr<=ei;kr+=1)Sr(kr);var Dr=hr.map(function(gr){var pr=er[gr],tn=Dt(pr.record,gr),zn=function(_r){var Tr=gr+_r-1,Ln=Dt(er[Tr].record,Tr),Gn=Qn(tn,Ln);return Gn.bottom-Gn.top},Jn=Qn(tn);return f.createElement(Rn,{key:gr,data:pr,rowKey:tn,index:gr,style:{top:-Fn+Jn.top},extra:!0,getHeight:zn})});return Dr},Yn=f.useMemo(function(){return{columnsOffset:dr}},[dr]),hn="".concat(Ge,"-tbody"),mr=Pn(["body","wrapper"]),rr={};return Wt&&(rr.position="sticky",rr.bottom=0,(0,I.Z)(Wt)==="object"&&Wt.offsetScroll&&(rr.bottom=Wt.offsetScroll)),f.createElement($t.Provider,{value:Yn},f.createElement(wt.Z,{fullHeight:!1,ref:Kn,prefixCls:"".concat(hn,"-virtual"),styles:{horizontalScrollBar:rr},className:hn,height:vn,itemHeight:rn||24,data:er,itemKey:function(Hn){return Dt(Hn.record)},component:mr,scrollWidth:at,direction:dt,onVirtualScroll:function(Hn){var Sn,On=Hn.x;We({currentTarget:(Sn=Kn.current)===null||Sn===void 0?void 0:Sn.nativeElement,scrollLeft:On})},onScroll:Zn,extraRender:tr},function(lr,Hn,Sn){var On=Dt(lr.record,Hn);return f.createElement(Rn,{data:lr,rowKey:On,index:Hn,style:Sn.style})}))}),$n=R(In),sn=$n,gn=function(Xe,Ke){var We=Ke.ref,it=Ke.onScroll;return f.createElement(sn,{ref:We,data:Xe,onScroll:it})};function yn(ge,Xe){var Ke=ge.data,We=ge.columns,it=ge.scroll,ht=ge.sticky,Pt=ge.prefixCls,Dt=Pt===void 0?ln:Pt,pt=ge.className,Ge=ge.listItemHeight,Je=ge.components,at=ge.onScroll,dt=it||{},gt=dt.x,Wt=dt.y;typeof gt!="number"&&(gt=1),typeof Wt!="number"&&(Wt=500);var vn=(0,bt.zX)(function(Zn,Kn){return(0,Q.Z)(Je,Zn)||Kn}),rn=(0,bt.zX)(at),Pn=f.useMemo(function(){return{sticky:ht,scrollY:Wt,listItemHeight:Ge,getComponent:vn,onScroll:rn}},[ht,Wt,Ge,vn,rn]);return f.createElement(Zt.Provider,{value:Pn},f.createElement(Nt,(0,y.Z)({},ge,{className:W()(pt,"".concat(Dt,"-virtual")),scroll:(0,re.Z)((0,re.Z)({},it),{},{x:gt}),components:(0,re.Z)((0,re.Z)({},Je),{},{body:Ke!=null&&Ke.length?gn:void 0}),columns:We,internalHooks:x.R,tailor:!0,ref:Xe})))}var jn=f.forwardRef(yn);function kn(ge){return H(jn,ge)}var Vn=kn(),or=null},54451:function(on,je,E){"use strict";E.d(je,{g:function(){return f},v:function(){return F}});var x=E(89490),ae=E(39224),ve=E(48736),fe=["expandable"],F="RC_TABLE_INTERNAL_COL_DEFINE";function f(ue){var te=ue.expandable,o=(0,ae.Z)(ue,fe),y;return"expandable"in ue?y=(0,x.Z)((0,x.Z)({},o),te):y=o,y.showExpandColumn===!1&&(y.expandIconColumnIndex=-1),y}},22711:function(on,je,E){"use strict";E.r(je),E.d(je,{ResizableTextArea:function(){return Te},default:function(){return q}});var x=E(71409),ae=E(87075),ve=E(89490),fe=E(62730),F=E(11036),f=E(39224),ue=E(92310),te=E.n(ue),o=E(36901),y=E(66003),C=E(30292),h=E(18929),g=E(59301),_=E(28788),S=E(29301),L=E(34280),N=E(16089),H=`
|
|
min-height:0 !important;
|
|
max-height:none !important;
|
|
height:0 !important;
|
|
visibility:hidden !important;
|
|
overflow:hidden !important;
|
|
position:absolute !important;
|
|
z-index:-1000 !important;
|
|
top:0 !important;
|
|
right:0 !important;
|
|
pointer-events: none !important;
|
|
`,R=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],k={},T;function A(ie){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,v=ie.getAttribute("id")||ie.getAttribute("data-reactid")||ie.getAttribute("name");if(V&&k[v])return k[v];var m=window.getComputedStyle(ie),U=m.getPropertyValue("box-sizing")||m.getPropertyValue("-moz-box-sizing")||m.getPropertyValue("-webkit-box-sizing"),se=parseFloat(m.getPropertyValue("padding-bottom"))+parseFloat(m.getPropertyValue("padding-top")),pe=parseFloat(m.getPropertyValue("border-bottom-width"))+parseFloat(m.getPropertyValue("border-top-width")),He=R.map(function(ot){return"".concat(ot,":").concat(m.getPropertyValue(ot))}).join(";"),qe={sizingStyle:He,paddingSize:se,borderSize:pe,boxSizing:U};return V&&v&&(k[v]=qe),qe}function J(ie){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,m=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;T||(T=document.createElement("textarea"),T.setAttribute("tab-index","-1"),T.setAttribute("aria-hidden","true"),T.setAttribute("name","hiddenTextarea"),document.body.appendChild(T)),ie.getAttribute("wrap")?T.setAttribute("wrap",ie.getAttribute("wrap")):T.removeAttribute("wrap");var U=A(ie,V),se=U.paddingSize,pe=U.borderSize,He=U.boxSizing,qe=U.sizingStyle;T.setAttribute("style","".concat(qe,";").concat(H)),T.value=ie.value||ie.placeholder||"";var ot=void 0,Ot=void 0,bt,xe=T.scrollHeight;if(He==="border-box"?xe+=pe:He==="content-box"&&(xe-=se),v!==null||m!==null){T.value=" ";var _t=T.scrollHeight-se;v!==null&&(ot=_t*v,He==="border-box"&&(ot=ot+se+pe),xe=Math.max(ot,xe)),m!==null&&(Ot=_t*m,He==="border-box"&&(Ot=Ot+se+pe),bt=xe>Ot?"":"hidden",xe=Math.min(Ot,xe))}var Qt={height:xe,overflowY:bt,resize:"none"};return ot&&(Qt.minHeight=ot),Ot&&(Qt.maxHeight=Ot),Qt}var ee=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],G=0,I=1,re=2,le=g.forwardRef(function(ie,V){var v=ie,m=v.prefixCls,U=v.defaultValue,se=v.value,pe=v.autoSize,He=v.onResize,qe=v.className,ot=v.style,Ot=v.disabled,bt=v.onChange,xe=v.onInternalAutoSize,_t=(0,f.Z)(v,ee),Qt=(0,h.Z)(U,{value:se,postState:function(Ut){return Ut!=null?Ut:""}}),Lt=(0,F.Z)(Qt,2),qt=Lt[0],tt=Lt[1],Re=function(Ut){tt(Ut.target.value),bt==null||bt(Ut)},ye=g.useRef();g.useImperativeHandle(V,function(){return{textArea:ye.current}});var Z=g.useMemo(function(){return pe&&(0,_.Z)(pe)==="object"?[pe.minRows,pe.maxRows]:[]},[pe]),we=(0,F.Z)(Z,2),Le=we[0],$=we[1],P=!!pe,K=function(){try{if(document.activeElement===ye.current){var Ut=ye.current,Vt=Ut.selectionStart,Ct=Ut.selectionEnd,Jt=Ut.scrollTop;ye.current.setSelectionRange(Vt,Ct),ye.current.scrollTop=Jt}}catch(wn){}},ne=g.useState(re),M=(0,F.Z)(ne,2),B=M[0],j=M[1],me=g.useState(),de=(0,F.Z)(me,2),Ae=de[0],Ee=de[1],Ce=function(){j(G)};(0,L.Z)(function(){P&&Ce()},[se,Le,$,P]),(0,L.Z)(function(){if(B===G)j(I);else if(B===I){var nt=J(ye.current,!1,Le,$);j(re),Ee(nt)}else K()},[B]);var Fe=g.useRef(),Be=function(){N.Z.cancel(Fe.current)},Ye=function(Ut){B===re&&(He==null||He(Ut),pe&&(Be(),Fe.current=(0,N.Z)(function(){Ce()})))};g.useEffect(function(){return Be},[]);var xt=P?Ae:null,lt=(0,ve.Z)((0,ve.Z)({},ot),xt);return(B===G||B===I)&&(lt.overflowY="hidden",lt.overflowX="hidden"),g.createElement(S.Z,{onResize:Ye,disabled:!(pe||He)},g.createElement("textarea",(0,x.Z)({},_t,{ref:ye,style:lt,className:te()(m,qe,(0,ae.Z)({},"".concat(m,"-disabled"),Ot)),disabled:Ot,value:qt,onChange:Re})))}),Te=le,W=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],O=g.forwardRef(function(ie,V){var v,m=ie.defaultValue,U=ie.value,se=ie.onFocus,pe=ie.onBlur,He=ie.onChange,qe=ie.allowClear,ot=ie.maxLength,Ot=ie.onCompositionStart,bt=ie.onCompositionEnd,xe=ie.suffix,_t=ie.prefixCls,Qt=_t===void 0?"rc-textarea":_t,Lt=ie.showCount,qt=ie.count,tt=ie.className,Re=ie.style,ye=ie.disabled,Z=ie.hidden,we=ie.classNames,Le=ie.styles,$=ie.onResize,P=ie.onClear,K=ie.onPressEnter,ne=ie.readOnly,M=ie.autoSize,B=ie.onKeyDown,j=(0,f.Z)(ie,W),me=(0,h.Z)(m,{value:U,defaultValue:m}),de=(0,F.Z)(me,2),Ae=de[0],Ee=de[1],Ce=Ae==null?"":String(Ae),Fe=g.useState(!1),Be=(0,F.Z)(Fe,2),Ye=Be[0],xt=Be[1],lt=g.useRef(!1),nt=g.useState(null),Ut=(0,F.Z)(nt,2),Vt=Ut[0],Ct=Ut[1],Jt=(0,g.useRef)(null),wn=(0,g.useRef)(null),Rt=function(){var An;return(An=wn.current)===null||An===void 0?void 0:An.textArea},Yt=function(){Rt().focus()};(0,g.useImperativeHandle)(V,function(){var mn;return{resizableTextArea:wn.current,focus:Yt,blur:function(){Rt().blur()},nativeElement:((mn=Jt.current)===null||mn===void 0?void 0:mn.nativeElement)||Rt()}}),(0,g.useEffect)(function(){xt(function(mn){return!ye&&mn})},[ye]);var Ne=g.useState(null),ke=(0,F.Z)(Ne,2),Pe=ke[0],z=ke[1];g.useEffect(function(){if(Pe){var mn;(mn=Rt()).setSelectionRange.apply(mn,(0,fe.Z)(Pe))}},[Pe]);var oe=(0,y.Z)(qt,Lt),he=(v=oe.max)!==null&&v!==void 0?v:ot,ce=Number(he)>0,be=oe.strategy(Ce),ze=!!he&&be>he,Ze=function(An,Ft){var Wn=Ft;!lt.current&&oe.exceedFormatter&&oe.max&&oe.strategy(Ft)>oe.max&&(Wn=oe.exceedFormatter(Ft,{max:oe.max}),Ft!==Wn&&z([Rt().selectionStart||0,Rt().selectionEnd||0])),Ee(Wn),(0,C.rJ)(An.currentTarget,An,He,Wn)},$e=function(An){lt.current=!0,Ot==null||Ot(An)},ft=function(An){lt.current=!1,Ze(An,An.currentTarget.value),bt==null||bt(An)},en=function(An){Ze(An,An.target.value)},an=function(An){An.key==="Enter"&&K&&K(An),B==null||B(An)},yt=function(An){xt(!0),se==null||se(An)},Gt=function(An){xt(!1),pe==null||pe(An)},_n=function(An){Ee(""),Yt(),(0,C.rJ)(Rt(),An,He)},Bn=xe,cn;oe.show&&(oe.showFormatter?cn=oe.showFormatter({value:Ce,count:be,maxLength:he}):cn="".concat(be).concat(ce?" / ".concat(he):""),Bn=g.createElement(g.Fragment,null,Bn,g.createElement("span",{className:te()("".concat(Qt,"-data-count"),we==null?void 0:we.count),style:Le==null?void 0:Le.count},cn)));var pn=function(An){var Ft;$==null||$(An),(Ft=Rt())!==null&&Ft!==void 0&&Ft.style.height&&Ct(!0)},Tn=!M&&!Lt&&!qe;return g.createElement(o.BaseInput,{ref:Jt,value:Ce,allowClear:qe,handleReset:_n,suffix:Bn,prefixCls:Qt,classNames:(0,ve.Z)((0,ve.Z)({},we),{},{affixWrapper:te()(we==null?void 0:we.affixWrapper,(0,ae.Z)((0,ae.Z)({},"".concat(Qt,"-show-count"),Lt),"".concat(Qt,"-textarea-allow-clear"),qe))}),disabled:ye,focused:Ye,className:te()(tt,ze&&"".concat(Qt,"-out-of-range")),style:(0,ve.Z)((0,ve.Z)({},Re),Vt&&!Tn?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof cn=="string"?cn:void 0}},hidden:Z,readOnly:ne,onClear:P},g.createElement(Te,(0,x.Z)({},j,{autoSize:M,maxLength:ot,onKeyDown:an,onChange:en,onFocus:yt,onBlur:Gt,onCompositionStart:$e,onCompositionEnd:ft,className:te()(we==null?void 0:we.textarea),style:(0,ve.Z)((0,ve.Z)({},Le==null?void 0:Le.textarea),{},{resize:Re==null?void 0:Re.resize}),disabled:ye,prefixCls:Qt,onResize:pn,ref:wn,readOnly:ne})))}),Q=O,q=Q},29125:function(on,je,E){"use strict";E.d(je,{G:function(){return fe},Z:function(){return H}});var x=E(92310),ae=E.n(x),ve=E(59301);function fe(R){var k=R.children,T=R.prefixCls,A=R.id,J=R.overlayInnerStyle,ee=R.bodyClassName,G=R.className,I=R.style;return ve.createElement("div",{className:ae()("".concat(T,"-content"),G),style:I},ve.createElement("div",{className:ae()("".concat(T,"-inner"),ee),id:A,role:"tooltip",style:J},typeof k=="function"?k():k))}var F=E(71409),f=E(89490),ue=E(39224),te=E(65352),o={shiftX:64,adjustY:1},y={adjustX:1,shiftY:!0},C=[0,0],h={left:{points:["cr","cl"],overflow:y,offset:[-4,0],targetOffset:C},right:{points:["cl","cr"],overflow:y,offset:[4,0],targetOffset:C},top:{points:["bc","tc"],overflow:o,offset:[0,-4],targetOffset:C},bottom:{points:["tc","bc"],overflow:o,offset:[0,4],targetOffset:C},topLeft:{points:["bl","tl"],overflow:o,offset:[0,-4],targetOffset:C},leftTop:{points:["tr","tl"],overflow:y,offset:[-4,0],targetOffset:C},topRight:{points:["br","tr"],overflow:o,offset:[0,-4],targetOffset:C},rightTop:{points:["tl","tr"],overflow:y,offset:[4,0],targetOffset:C},bottomRight:{points:["tr","br"],overflow:o,offset:[0,4],targetOffset:C},rightBottom:{points:["bl","br"],overflow:y,offset:[4,0],targetOffset:C},bottomLeft:{points:["tl","bl"],overflow:o,offset:[0,4],targetOffset:C},leftBottom:{points:["br","bl"],overflow:y,offset:[-4,0],targetOffset:C}},g=null,_=E(80402),S=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow","classNames","styles"],L=function(k,T){var A=k.overlayClassName,J=k.trigger,ee=J===void 0?["hover"]:J,G=k.mouseEnterDelay,I=G===void 0?0:G,re=k.mouseLeaveDelay,le=re===void 0?.1:re,Te=k.overlayStyle,W=k.prefixCls,O=W===void 0?"rc-tooltip":W,Q=k.children,q=k.onVisibleChange,ie=k.afterVisibleChange,V=k.transitionName,v=k.animation,m=k.motion,U=k.placement,se=U===void 0?"right":U,pe=k.align,He=pe===void 0?{}:pe,qe=k.destroyTooltipOnHide,ot=qe===void 0?!1:qe,Ot=k.defaultVisible,bt=k.getTooltipContainer,xe=k.overlayInnerStyle,_t=k.arrowContent,Qt=k.overlay,Lt=k.id,qt=k.showArrow,tt=qt===void 0?!0:qt,Re=k.classNames,ye=k.styles,Z=(0,ue.Z)(k,S),we=(0,_.Z)(Lt),Le=(0,ve.useRef)(null);(0,ve.useImperativeHandle)(T,function(){return Le.current});var $=(0,f.Z)({},Z);"visible"in k&&($.popupVisible=k.visible);var P=function(){return ve.createElement(fe,{key:"content",prefixCls:O,id:we,bodyClassName:Re==null?void 0:Re.body,overlayInnerStyle:(0,f.Z)((0,f.Z)({},xe),ye==null?void 0:ye.body)},Qt)},K=function(){var M=ve.Children.only(Q),B=(M==null?void 0:M.props)||{},j=(0,f.Z)((0,f.Z)({},B),{},{"aria-describedby":Qt?we:null});return ve.cloneElement(Q,j)};return ve.createElement(te.Z,(0,F.Z)({popupClassName:ae()(A,Re==null?void 0:Re.root),prefixCls:O,popup:P,action:ee,builtinPlacements:h,popupPlacement:se,ref:Le,popupAlign:He,getPopupContainer:bt,onPopupVisibleChange:q,afterPopupVisibleChange:ie,popupTransitionName:V,popupAnimation:v,popupMotion:m,defaultPopupVisible:Ot,autoDestroy:ot,mouseLeaveDelay:le,popupStyle:(0,f.Z)((0,f.Z)({},Te),ye==null?void 0:ye.root),mouseEnterDelay:I,arrow:tt},$),K())},N=(0,ve.forwardRef)(L),H=N},639:function(on,je,E){"use strict";E.d(je,{Z:function(){return k}});var x=E(71409),ae=E(87075),ve=E(89490),fe=E(11036),F=E(39224),f=E(59301),ue=E(92310),te=E.n(ue),o=E(26112),y=E(30699),C=function(A){for(var J=A.prefixCls,ee=A.level,G=A.isStart,I=A.isEnd,re="".concat(J,"-indent-unit"),le=[],Te=0;Te<ee;Te+=1)le.push(f.createElement("span",{key:Te,className:te()(re,(0,ae.Z)((0,ae.Z)({},"".concat(re,"-start"),G[Te]),"".concat(re,"-end"),I[Te]))}));return f.createElement("span",{"aria-hidden":"true",className:"".concat(J,"-indent")},le)},h=f.memo(C),g=E(65065),_=E(34061),S=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],L="open",N="close",H="---",R=function(A){var J,ee,G,I=A.eventKey,re=A.className,le=A.style,Te=A.dragOver,W=A.dragOverGapTop,O=A.dragOverGapBottom,Q=A.isLeaf,q=A.isStart,ie=A.isEnd,V=A.expanded,v=A.selected,m=A.checked,U=A.halfChecked,se=A.loading,pe=A.domRef,He=A.active,qe=A.data,ot=A.onMouseMove,Ot=A.selectable,bt=(0,F.Z)(A,S),xe=f.useContext(y.k),_t=f.useContext(y.y),Qt=f.useRef(null),Lt=f.useState(!1),qt=(0,fe.Z)(Lt,2),tt=qt[0],Re=qt[1],ye=!!(xe.disabled||A.disabled||(J=_t.nodeDisabled)!==null&&J!==void 0&&J.call(_t,qe)),Z=f.useMemo(function(){return!xe.checkable||A.checkable===!1?!1:xe.checkable},[xe.checkable,A.checkable]),we=function(be){ye||xe.onNodeSelect(be,(0,_.F)(A))},Le=function(be){ye||!Z||A.disableCheckbox||xe.onNodeCheck(be,(0,_.F)(A),!m)},$=f.useMemo(function(){return typeof Ot=="boolean"?Ot:xe.selectable},[Ot,xe.selectable]),P=function(be){xe.onNodeClick(be,(0,_.F)(A)),$?we(be):Le(be)},K=function(be){xe.onNodeDoubleClick(be,(0,_.F)(A))},ne=function(be){xe.onNodeMouseEnter(be,(0,_.F)(A))},M=function(be){xe.onNodeMouseLeave(be,(0,_.F)(A))},B=function(be){xe.onNodeContextMenu(be,(0,_.F)(A))},j=f.useMemo(function(){return!!(xe.draggable&&(!xe.draggable.nodeDraggable||xe.draggable.nodeDraggable(qe)))},[xe.draggable,qe]),me=function(be){be.stopPropagation(),Re(!0),xe.onNodeDragStart(be,A);try{be.dataTransfer.setData("text/plain","")}catch(ze){}},de=function(be){be.preventDefault(),be.stopPropagation(),xe.onNodeDragEnter(be,A)},Ae=function(be){be.preventDefault(),be.stopPropagation(),xe.onNodeDragOver(be,A)},Ee=function(be){be.stopPropagation(),xe.onNodeDragLeave(be,A)},Ce=function(be){be.stopPropagation(),Re(!1),xe.onNodeDragEnd(be,A)},Fe=function(be){be.preventDefault(),be.stopPropagation(),Re(!1),xe.onNodeDrop(be,A)},Be=function(be){se||xe.onNodeExpand(be,(0,_.F)(A))},Ye=f.useMemo(function(){var ce=(0,g.Z)(xe.keyEntities,I)||{},be=ce.children;return!!(be||[]).length},[xe.keyEntities,I]),xt=f.useMemo(function(){return Q===!1?!1:Q||!xe.loadData&&!Ye||xe.loadData&&A.loaded&&!Ye},[Q,xe.loadData,Ye,A.loaded]);f.useEffect(function(){se||typeof xe.loadData=="function"&&V&&!xt&&!A.loaded&&xe.onNodeLoad((0,_.F)(A))},[se,xe.loadData,xe.onNodeLoad,V,xt,A]);var lt=f.useMemo(function(){var ce;return(ce=xe.draggable)!==null&&ce!==void 0&&ce.icon?f.createElement("span",{className:"".concat(xe.prefixCls,"-draggable-icon")},xe.draggable.icon):null},[xe.draggable]),nt=function(be){var ze=A.switcherIcon||xe.switcherIcon;return typeof ze=="function"?ze((0,ve.Z)((0,ve.Z)({},A),{},{isLeaf:be})):ze},Ut=function(){if(xt){var be=nt(!0);return be!==!1?f.createElement("span",{className:te()("".concat(xe.prefixCls,"-switcher"),"".concat(xe.prefixCls,"-switcher-noop"))},be):null}var ze=nt(!1);return ze!==!1?f.createElement("span",{onClick:Be,className:te()("".concat(xe.prefixCls,"-switcher"),"".concat(xe.prefixCls,"-switcher_").concat(V?L:N))},ze):null},Vt=f.useMemo(function(){if(!Z)return null;var ce=typeof Z!="boolean"?Z:null;return f.createElement("span",{className:te()("".concat(xe.prefixCls,"-checkbox"),(0,ae.Z)((0,ae.Z)((0,ae.Z)({},"".concat(xe.prefixCls,"-checkbox-checked"),m),"".concat(xe.prefixCls,"-checkbox-indeterminate"),!m&&U),"".concat(xe.prefixCls,"-checkbox-disabled"),ye||A.disableCheckbox)),onClick:Le,role:"checkbox","aria-checked":U?"mixed":m,"aria-disabled":ye||A.disableCheckbox,"aria-label":"Select ".concat(typeof A.title=="string"?A.title:"tree node")},ce)},[Z,m,U,ye,A.disableCheckbox,A.title]),Ct=f.useMemo(function(){return xt?null:V?L:N},[xt,V]),Jt=f.useMemo(function(){return f.createElement("span",{className:te()("".concat(xe.prefixCls,"-iconEle"),"".concat(xe.prefixCls,"-icon__").concat(Ct||"docu"),(0,ae.Z)({},"".concat(xe.prefixCls,"-icon_loading"),se))})},[xe.prefixCls,Ct,se]),wn=f.useMemo(function(){var ce=!!xe.draggable,be=!A.disabled&&ce&&xe.dragOverNodeKey===I;return be?xe.dropIndicatorRender({dropPosition:xe.dropPosition,dropLevelOffset:xe.dropLevelOffset,indent:xe.indent,prefixCls:xe.prefixCls,direction:xe.direction}):null},[xe.dropPosition,xe.dropLevelOffset,xe.indent,xe.prefixCls,xe.direction,xe.draggable,xe.dragOverNodeKey,xe.dropIndicatorRender]),Rt=f.useMemo(function(){var ce=A.title,be=ce===void 0?H:ce,ze="".concat(xe.prefixCls,"-node-content-wrapper"),Ze;if(xe.showIcon){var $e=A.icon||xe.icon;Ze=$e?f.createElement("span",{className:te()("".concat(xe.prefixCls,"-iconEle"),"".concat(xe.prefixCls,"-icon__customize"))},typeof $e=="function"?$e(A):$e):Jt}else xe.loadData&&se&&(Ze=Jt);var ft;return typeof be=="function"?ft=be(qe):xe.titleRender?ft=xe.titleRender(qe):ft=be,f.createElement("span",{ref:Qt,title:typeof be=="string"?be:"",className:te()(ze,"".concat(ze,"-").concat(Ct||"normal"),(0,ae.Z)({},"".concat(xe.prefixCls,"-node-selected"),!ye&&(v||tt))),onMouseEnter:ne,onMouseLeave:M,onContextMenu:B,onClick:P,onDoubleClick:K},Ze,f.createElement("span",{className:"".concat(xe.prefixCls,"-title")},ft),wn)},[xe.prefixCls,xe.showIcon,A,xe.icon,Jt,xe.titleRender,qe,Ct,ne,M,B,P,K]),Yt=(0,o.Z)(bt,{aria:!0,data:!0}),Ne=(0,g.Z)(xe.keyEntities,I)||{},ke=Ne.level,Pe=ie[ie.length-1],z=!ye&&j,oe=xe.draggingNodeKey===I,he=Ot!==void 0?{"aria-selected":!!Ot}:void 0;return f.createElement("div",(0,x.Z)({ref:pe,role:"treeitem","aria-expanded":Q?void 0:V,className:te()(re,"".concat(xe.prefixCls,"-treenode"),(G={},(0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)(G,"".concat(xe.prefixCls,"-treenode-disabled"),ye),"".concat(xe.prefixCls,"-treenode-switcher-").concat(V?"open":"close"),!Q),"".concat(xe.prefixCls,"-treenode-checkbox-checked"),m),"".concat(xe.prefixCls,"-treenode-checkbox-indeterminate"),U),"".concat(xe.prefixCls,"-treenode-selected"),v),"".concat(xe.prefixCls,"-treenode-loading"),se),"".concat(xe.prefixCls,"-treenode-active"),He),"".concat(xe.prefixCls,"-treenode-leaf-last"),Pe),"".concat(xe.prefixCls,"-treenode-draggable"),j),"dragging",oe),(0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)((0,ae.Z)(G,"drop-target",xe.dropTargetKey===I),"drop-container",xe.dropContainerKey===I),"drag-over",!ye&&Te),"drag-over-gap-top",!ye&&W),"drag-over-gap-bottom",!ye&&O),"filter-node",(ee=xe.filterTreeNode)===null||ee===void 0?void 0:ee.call(xe,(0,_.F)(A))),"".concat(xe.prefixCls,"-treenode-leaf"),xt))),style:le,draggable:z,onDragStart:z?me:void 0,onDragEnter:j?de:void 0,onDragOver:j?Ae:void 0,onDragLeave:j?Ee:void 0,onDrop:j?Fe:void 0,onDragEnd:j?Ce:void 0,onMouseMove:ot},he,Yt),f.createElement(h,{prefixCls:xe.prefixCls,level:ke,isStart:q,isEnd:ie}),lt,Ut(),Vt,Rt)};R.isTreeNode=1;var k=R},30699:function(on,je,E){"use strict";E.d(je,{k:function(){return ae},y:function(){return ve}});var x=E(59301),ae=x.createContext(null),ve=x.createContext({})},62379:function(on,je,E){"use strict";E.d(je,{OF:function(){return I.Z},y6:function(){return N.y},ZP:function(){return ye}});var x=E(71409),ae=E(28788),ve=E(89490),fe=E(62730),F=E(16552),f=E(19210),ue=E(90264),te=E(46654),o=E(37205),y=E(87075),C=E(92310),h=E.n(C),g=E(10228),_=E(26112),S=E(48736),L=E(59301),N=E(30699),H=function(we){var Le=we.dropPosition,$=we.dropLevelOffset,P=we.indent,K={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Le){case-1:K.top=0,K.left=-$*P;break;case 1:K.bottom=0,K.left=-$*P;break;case 0:K.bottom=0,K.left=P;break}return L.createElement("div",{style:K})},R=H;function k(Z){if(Z==null)throw new TypeError("Cannot destructure "+Z)}var T=E(11036),A=E(39224),J=E(34280),ee=E(65283),G=E(77900),I=E(639);function re(Z,we){var Le=L.useState(!1),$=(0,T.Z)(Le,2),P=$[0],K=$[1];(0,J.Z)(function(){if(P)return Z(),function(){we()}},[P]),(0,J.Z)(function(){return K(!0),function(){K(!1)}},[])}var le=re,Te=E(34061),W=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],O=L.forwardRef(function(Z,we){var Le=Z.className,$=Z.style,P=Z.motion,K=Z.motionNodes,ne=Z.motionType,M=Z.onMotionStart,B=Z.onMotionEnd,j=Z.active,me=Z.treeNodeRequiredProps,de=(0,A.Z)(Z,W),Ae=L.useState(!0),Ee=(0,T.Z)(Ae,2),Ce=Ee[0],Fe=Ee[1],Be=L.useContext(N.k),Ye=Be.prefixCls,xt=K&&ne!=="hide";(0,J.Z)(function(){K&&xt!==Ce&&Fe(xt)},[K]);var lt=function(){K&&M()},nt=L.useRef(!1),Ut=function(){K&&!nt.current&&(nt.current=!0,B())};le(lt,Ut);var Vt=function(Jt){xt===Jt&&Ut()};return K?L.createElement(G.default,(0,x.Z)({ref:we,visible:Ce},P,{motionAppear:ne==="show",onVisibleChanged:Vt}),function(Ct,Jt){var wn=Ct.className,Rt=Ct.style;return L.createElement("div",{ref:Jt,className:h()("".concat(Ye,"-treenode-motion"),wn),style:Rt},K.map(function(Yt){var Ne=Object.assign({},(k(Yt.data),Yt.data)),ke=Yt.title,Pe=Yt.key,z=Yt.isStart,oe=Yt.isEnd;delete Ne.children;var he=(0,Te.H8)(Pe,me);return L.createElement(I.Z,(0,x.Z)({},Ne,he,{title:ke,active:j,data:Yt.data,key:Pe,isStart:z,isEnd:oe}))}))}):L.createElement(I.Z,(0,x.Z)({domRef:we,className:Le,style:$},de,{active:j}))}),Q=O;function q(){var Z=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],we=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Le=Z.length,$=we.length;if(Math.abs(Le-$)!==1)return{add:!1,key:null};function P(K,ne){var M=new Map;K.forEach(function(j){M.set(j,!0)});var B=ne.filter(function(j){return!M.has(j)});return B.length===1?B[0]:null}return Le<$?{add:!0,key:P(Z,we)}:{add:!1,key:P(we,Z)}}function ie(Z,we,Le){var $=Z.findIndex(function(M){return M.key===Le}),P=Z[$+1],K=we.findIndex(function(M){return M.key===Le});if(P){var ne=we.findIndex(function(M){return M.key===P.key});return we.slice(K+1,ne)}return we.slice(K+1)}var V=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],v={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},m=function(){},U="RC_TREE_MOTION_".concat(Math.random()),se={key:U},pe={key:U,level:0,index:0,pos:"0",node:se,nodes:[se]},He={parent:null,children:[],pos:pe.pos,data:se,title:null,key:U,isStart:[],isEnd:[]};function qe(Z,we,Le,$){return we===!1||!Le?Z:Z.slice(0,Math.ceil(Le/$)+1)}function ot(Z){var we=Z.key,Le=Z.pos;return(0,Te.km)(we,Le)}function Ot(Z){for(var we=String(Z.data.key),Le=Z;Le.parent;)Le=Le.parent,we="".concat(Le.data.key," > ").concat(we);return we}var bt=L.forwardRef(function(Z,we){var Le=Z.prefixCls,$=Z.data,P=Z.selectable,K=Z.checkable,ne=Z.expandedKeys,M=Z.selectedKeys,B=Z.checkedKeys,j=Z.loadedKeys,me=Z.loadingKeys,de=Z.halfCheckedKeys,Ae=Z.keyEntities,Ee=Z.disabled,Ce=Z.dragging,Fe=Z.dragOverNodeKey,Be=Z.dropPosition,Ye=Z.motion,xt=Z.height,lt=Z.itemHeight,nt=Z.virtual,Ut=Z.scrollWidth,Vt=Z.focusable,Ct=Z.activeItem,Jt=Z.focused,wn=Z.tabIndex,Rt=Z.onKeyDown,Yt=Z.onFocus,Ne=Z.onBlur,ke=Z.onActiveChange,Pe=Z.onListChangeStart,z=Z.onListChangeEnd,oe=(0,A.Z)(Z,V),he=L.useRef(null),ce=L.useRef(null);L.useImperativeHandle(we,function(){return{scrollTo:function(Qe){he.current.scrollTo(Qe)},getIndentWidth:function(){return ce.current.offsetWidth}}});var be=L.useState(ne),ze=(0,T.Z)(be,2),Ze=ze[0],$e=ze[1],ft=L.useState($),en=(0,T.Z)(ft,2),an=en[0],yt=en[1],Gt=L.useState($),_n=(0,T.Z)(Gt,2),Bn=_n[0],cn=_n[1],pn=L.useState([]),Tn=(0,T.Z)(pn,2),mn=Tn[0],An=Tn[1],Ft=L.useState(null),Wn=(0,T.Z)(Ft,2),Ue=Wn[0],Oe=Wn[1],Bt=L.useRef($);Bt.current=$;function kt(){var Ve=Bt.current;yt(Ve),cn(Ve),An([]),Oe(null),z()}(0,J.Z)(function(){$e(ne);var Ve=q(Ze,ne);if(Ve.key!==null)if(Ve.add){var Qe=an.findIndex(function(zt){var De=zt.key;return De===Ve.key}),Tt=qe(ie(an,$,Ve.key),nt,xt,lt),Et=an.slice();Et.splice(Qe+1,0,He),cn(Et),An(Tt),Oe("show")}else{var Xt=$.findIndex(function(zt){var De=zt.key;return De===Ve.key}),ln=qe(ie($,an,Ve.key),nt,xt,lt),nn=$.slice();nn.splice(Xt+1,0,He),cn(nn),An(ln),Oe("hide")}else an!==$&&(yt($),cn($))},[ne,$]),L.useEffect(function(){Ce||kt()},[Ce]);var St=Ye?Bn:$,fn={expandedKeys:ne,selectedKeys:M,loadedKeys:j,loadingKeys:me,checkedKeys:B,halfCheckedKeys:de,dragOverNodeKey:Fe,dropPosition:Be,keyEntities:Ae};return L.createElement(L.Fragment,null,Jt&&Ct&&L.createElement("span",{style:v,"aria-live":"assertive"},Ot(Ct)),L.createElement("div",null,L.createElement("input",{style:v,disabled:Vt===!1||Ee,tabIndex:Vt!==!1?wn:null,onKeyDown:Rt,onFocus:Yt,onBlur:Ne,value:"",onChange:m,"aria-label":"for screen reader"})),L.createElement("div",{className:"".concat(Le,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},L.createElement("div",{className:"".concat(Le,"-indent")},L.createElement("div",{ref:ce,className:"".concat(Le,"-indent-unit")}))),L.createElement(ee.Z,(0,x.Z)({},oe,{data:St,itemKey:ot,height:xt,fullHeight:!1,virtual:nt,itemHeight:lt,scrollWidth:Ut,prefixCls:"".concat(Le,"-list"),ref:he,role:"tree",onVisibleChange:function(Qe){Qe.every(function(Tt){return ot(Tt)!==U})&&kt()}}),function(Ve){var Qe=Ve.pos,Tt=Object.assign({},(k(Ve.data),Ve.data)),Et=Ve.title,Xt=Ve.key,ln=Ve.isStart,nn=Ve.isEnd,zt=(0,Te.km)(Xt,Qe);delete Tt.key,delete Tt.children;var De=(0,Te.H8)(zt,fn);return L.createElement(Q,(0,x.Z)({},Tt,De,{title:Et,active:!!Ct&&Xt===Ct.key,pos:Qe,data:Ve.data,isStart:ln,isEnd:nn,motion:Ye,motionNodes:Xt===U?mn:null,motionType:Ue,onMotionStart:Pe,onMotionEnd:kt,treeNodeRequiredProps:fn,onMouseMove:function(){ke(null)}}))}))}),xe=bt,_t=E(82661),Qt=E(34643),Lt=E(65065),qt=10,tt=function(Z){(0,te.Z)(Le,Z);var we=(0,o.Z)(Le);function Le(){var $;(0,F.Z)(this,Le);for(var P=arguments.length,K=new Array(P),ne=0;ne<P;ne++)K[ne]=arguments[ne];return $=we.call.apply(we,[this].concat(K)),(0,y.Z)((0,ue.Z)($),"destroyed",!1),(0,y.Z)((0,ue.Z)($),"delayedDragEnterLogic",void 0),(0,y.Z)((0,ue.Z)($),"loadingRetryTimes",{}),(0,y.Z)((0,ue.Z)($),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,Te.w$)()}),(0,y.Z)((0,ue.Z)($),"dragStartMousePosition",null),(0,y.Z)((0,ue.Z)($),"dragNodeProps",null),(0,y.Z)((0,ue.Z)($),"currentMouseOverDroppableNodeKey",null),(0,y.Z)((0,ue.Z)($),"listRef",L.createRef()),(0,y.Z)((0,ue.Z)($),"onNodeDragStart",function(M,B){var j=$.state,me=j.expandedKeys,de=j.keyEntities,Ae=$.props.onDragStart,Ee=B.eventKey;$.dragNodeProps=B,$.dragStartMousePosition={x:M.clientX,y:M.clientY};var Ce=(0,_t._5)(me,Ee);$.setState({draggingNodeKey:Ee,dragChildrenKeys:(0,_t.wA)(Ee,de),indent:$.listRef.current.getIndentWidth()}),$.setExpandedKeys(Ce),window.addEventListener("dragend",$.onWindowDragEnd),Ae==null||Ae({event:M,node:(0,Te.F)(B)})}),(0,y.Z)((0,ue.Z)($),"onNodeDragEnter",function(M,B){var j=$.state,me=j.expandedKeys,de=j.keyEntities,Ae=j.dragChildrenKeys,Ee=j.flattenNodes,Ce=j.indent,Fe=$.props,Be=Fe.onDragEnter,Ye=Fe.onExpand,xt=Fe.allowDrop,lt=Fe.direction,nt=B.pos,Ut=B.eventKey;if($.currentMouseOverDroppableNodeKey!==Ut&&($.currentMouseOverDroppableNodeKey=Ut),!$.dragNodeProps){$.resetDragState();return}var Vt=(0,_t.OM)(M,$.dragNodeProps,B,Ce,$.dragStartMousePosition,xt,Ee,de,me,lt),Ct=Vt.dropPosition,Jt=Vt.dropLevelOffset,wn=Vt.dropTargetKey,Rt=Vt.dropContainerKey,Yt=Vt.dropTargetPos,Ne=Vt.dropAllowed,ke=Vt.dragOverNodeKey;if(Ae.includes(wn)||!Ne){$.resetDragState();return}if($.delayedDragEnterLogic||($.delayedDragEnterLogic={}),Object.keys($.delayedDragEnterLogic).forEach(function(Pe){clearTimeout($.delayedDragEnterLogic[Pe])}),$.dragNodeProps.eventKey!==B.eventKey&&(M.persist(),$.delayedDragEnterLogic[nt]=window.setTimeout(function(){if($.state.draggingNodeKey!==null){var Pe=(0,fe.Z)(me),z=(0,Lt.Z)(de,B.eventKey);z&&(z.children||[]).length&&(Pe=(0,_t.L0)(me,B.eventKey)),$.props.hasOwnProperty("expandedKeys")||$.setExpandedKeys(Pe),Ye==null||Ye(Pe,{node:(0,Te.F)(B),expanded:!0,nativeEvent:M.nativeEvent})}},800)),$.dragNodeProps.eventKey===wn&&Jt===0){$.resetDragState();return}$.setState({dragOverNodeKey:ke,dropPosition:Ct,dropLevelOffset:Jt,dropTargetKey:wn,dropContainerKey:Rt,dropTargetPos:Yt,dropAllowed:Ne}),Be==null||Be({event:M,node:(0,Te.F)(B),expandedKeys:me})}),(0,y.Z)((0,ue.Z)($),"onNodeDragOver",function(M,B){var j=$.state,me=j.dragChildrenKeys,de=j.flattenNodes,Ae=j.keyEntities,Ee=j.expandedKeys,Ce=j.indent,Fe=$.props,Be=Fe.onDragOver,Ye=Fe.allowDrop,xt=Fe.direction;if($.dragNodeProps){var lt=(0,_t.OM)(M,$.dragNodeProps,B,Ce,$.dragStartMousePosition,Ye,de,Ae,Ee,xt),nt=lt.dropPosition,Ut=lt.dropLevelOffset,Vt=lt.dropTargetKey,Ct=lt.dropContainerKey,Jt=lt.dropTargetPos,wn=lt.dropAllowed,Rt=lt.dragOverNodeKey;me.includes(Vt)||!wn||($.dragNodeProps.eventKey===Vt&&Ut===0?$.state.dropPosition===null&&$.state.dropLevelOffset===null&&$.state.dropTargetKey===null&&$.state.dropContainerKey===null&&$.state.dropTargetPos===null&&$.state.dropAllowed===!1&&$.state.dragOverNodeKey===null||$.resetDragState():nt===$.state.dropPosition&&Ut===$.state.dropLevelOffset&&Vt===$.state.dropTargetKey&&Ct===$.state.dropContainerKey&&Jt===$.state.dropTargetPos&&wn===$.state.dropAllowed&&Rt===$.state.dragOverNodeKey||$.setState({dropPosition:nt,dropLevelOffset:Ut,dropTargetKey:Vt,dropContainerKey:Ct,dropTargetPos:Jt,dropAllowed:wn,dragOverNodeKey:Rt}),Be==null||Be({event:M,node:(0,Te.F)(B)}))}}),(0,y.Z)((0,ue.Z)($),"onNodeDragLeave",function(M,B){$.currentMouseOverDroppableNodeKey===B.eventKey&&!M.currentTarget.contains(M.relatedTarget)&&($.resetDragState(),$.currentMouseOverDroppableNodeKey=null);var j=$.props.onDragLeave;j==null||j({event:M,node:(0,Te.F)(B)})}),(0,y.Z)((0,ue.Z)($),"onWindowDragEnd",function(M){$.onNodeDragEnd(M,null,!0),window.removeEventListener("dragend",$.onWindowDragEnd)}),(0,y.Z)((0,ue.Z)($),"onNodeDragEnd",function(M,B){var j=$.props.onDragEnd;$.setState({dragOverNodeKey:null}),$.cleanDragState(),j==null||j({event:M,node:(0,Te.F)(B)}),$.dragNodeProps=null,window.removeEventListener("dragend",$.onWindowDragEnd)}),(0,y.Z)((0,ue.Z)($),"onNodeDrop",function(M,B){var j,me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,de=$.state,Ae=de.dragChildrenKeys,Ee=de.dropPosition,Ce=de.dropTargetKey,Fe=de.dropTargetPos,Be=de.dropAllowed;if(Be){var Ye=$.props.onDrop;if($.setState({dragOverNodeKey:null}),$.cleanDragState(),Ce!==null){var xt=(0,ve.Z)((0,ve.Z)({},(0,Te.H8)(Ce,$.getTreeNodeRequiredProps())),{},{active:((j=$.getActiveItem())===null||j===void 0?void 0:j.key)===Ce,data:(0,Lt.Z)($.state.keyEntities,Ce).node}),lt=Ae.includes(Ce);(0,S.ZP)(!lt,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var nt=(0,_t.yx)(Fe),Ut={event:M,node:(0,Te.F)(xt),dragNode:$.dragNodeProps?(0,Te.F)($.dragNodeProps):null,dragNodesKeys:[$.dragNodeProps.eventKey].concat(Ae),dropToGap:Ee!==0,dropPosition:Ee+Number(nt[nt.length-1])};me||Ye==null||Ye(Ut),$.dragNodeProps=null}}}),(0,y.Z)((0,ue.Z)($),"cleanDragState",function(){var M=$.state.draggingNodeKey;M!==null&&$.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),$.dragStartMousePosition=null,$.currentMouseOverDroppableNodeKey=null}),(0,y.Z)((0,ue.Z)($),"triggerExpandActionExpand",function(M,B){var j=$.state,me=j.expandedKeys,de=j.flattenNodes,Ae=B.expanded,Ee=B.key,Ce=B.isLeaf;if(!(Ce||M.shiftKey||M.metaKey||M.ctrlKey)){var Fe=de.filter(function(Ye){return Ye.key===Ee})[0],Be=(0,Te.F)((0,ve.Z)((0,ve.Z)({},(0,Te.H8)(Ee,$.getTreeNodeRequiredProps())),{},{data:Fe.data}));$.setExpandedKeys(Ae?(0,_t._5)(me,Ee):(0,_t.L0)(me,Ee)),$.onNodeExpand(M,Be)}}),(0,y.Z)((0,ue.Z)($),"onNodeClick",function(M,B){var j=$.props,me=j.onClick,de=j.expandAction;de==="click"&&$.triggerExpandActionExpand(M,B),me==null||me(M,B)}),(0,y.Z)((0,ue.Z)($),"onNodeDoubleClick",function(M,B){var j=$.props,me=j.onDoubleClick,de=j.expandAction;de==="doubleClick"&&$.triggerExpandActionExpand(M,B),me==null||me(M,B)}),(0,y.Z)((0,ue.Z)($),"onNodeSelect",function(M,B){var j=$.state.selectedKeys,me=$.state,de=me.keyEntities,Ae=me.fieldNames,Ee=$.props,Ce=Ee.onSelect,Fe=Ee.multiple,Be=B.selected,Ye=B[Ae.key],xt=!Be;xt?Fe?j=(0,_t.L0)(j,Ye):j=[Ye]:j=(0,_t._5)(j,Ye);var lt=j.map(function(nt){var Ut=(0,Lt.Z)(de,nt);return Ut?Ut.node:null}).filter(Boolean);$.setUncontrolledState({selectedKeys:j}),Ce==null||Ce(j,{event:"select",selected:xt,node:B,selectedNodes:lt,nativeEvent:M.nativeEvent})}),(0,y.Z)((0,ue.Z)($),"onNodeCheck",function(M,B,j){var me=$.state,de=me.keyEntities,Ae=me.checkedKeys,Ee=me.halfCheckedKeys,Ce=$.props,Fe=Ce.checkStrictly,Be=Ce.onCheck,Ye=B.key,xt,lt={event:"check",node:B,checked:j,nativeEvent:M.nativeEvent};if(Fe){var nt=j?(0,_t.L0)(Ae,Ye):(0,_t._5)(Ae,Ye),Ut=(0,_t._5)(Ee,Ye);xt={checked:nt,halfChecked:Ut},lt.checkedNodes=nt.map(function(Yt){return(0,Lt.Z)(de,Yt)}).filter(Boolean).map(function(Yt){return Yt.node}),$.setUncontrolledState({checkedKeys:nt})}else{var Vt=(0,Qt.S)([].concat((0,fe.Z)(Ae),[Ye]),!0,de),Ct=Vt.checkedKeys,Jt=Vt.halfCheckedKeys;if(!j){var wn=new Set(Ct);wn.delete(Ye);var Rt=(0,Qt.S)(Array.from(wn),{checked:!1,halfCheckedKeys:Jt},de);Ct=Rt.checkedKeys,Jt=Rt.halfCheckedKeys}xt=Ct,lt.checkedNodes=[],lt.checkedNodesPositions=[],lt.halfCheckedKeys=Jt,Ct.forEach(function(Yt){var Ne=(0,Lt.Z)(de,Yt);if(Ne){var ke=Ne.node,Pe=Ne.pos;lt.checkedNodes.push(ke),lt.checkedNodesPositions.push({node:ke,pos:Pe})}}),$.setUncontrolledState({checkedKeys:Ct},!1,{halfCheckedKeys:Jt})}Be==null||Be(xt,lt)}),(0,y.Z)((0,ue.Z)($),"onNodeLoad",function(M){var B,j=M.key,me=$.state.keyEntities,de=(0,Lt.Z)(me,j);if(!(de!=null&&(B=de.children)!==null&&B!==void 0&&B.length)){var Ae=new Promise(function(Ee,Ce){$.setState(function(Fe){var Be=Fe.loadedKeys,Ye=Be===void 0?[]:Be,xt=Fe.loadingKeys,lt=xt===void 0?[]:xt,nt=$.props,Ut=nt.loadData,Vt=nt.onLoad;if(!Ut||Ye.includes(j)||lt.includes(j))return null;var Ct=Ut(M);return Ct.then(function(){var Jt=$.state.loadedKeys,wn=(0,_t.L0)(Jt,j);Vt==null||Vt(wn,{event:"load",node:M}),$.setUncontrolledState({loadedKeys:wn}),$.setState(function(Rt){return{loadingKeys:(0,_t._5)(Rt.loadingKeys,j)}}),Ee()}).catch(function(Jt){if($.setState(function(Rt){return{loadingKeys:(0,_t._5)(Rt.loadingKeys,j)}}),$.loadingRetryTimes[j]=($.loadingRetryTimes[j]||0)+1,$.loadingRetryTimes[j]>=qt){var wn=$.state.loadedKeys;(0,S.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),$.setUncontrolledState({loadedKeys:(0,_t.L0)(wn,j)}),Ee()}Ce(Jt)}),{loadingKeys:(0,_t.L0)(lt,j)}})});return Ae.catch(function(){}),Ae}}),(0,y.Z)((0,ue.Z)($),"onNodeMouseEnter",function(M,B){var j=$.props.onMouseEnter;j==null||j({event:M,node:B})}),(0,y.Z)((0,ue.Z)($),"onNodeMouseLeave",function(M,B){var j=$.props.onMouseLeave;j==null||j({event:M,node:B})}),(0,y.Z)((0,ue.Z)($),"onNodeContextMenu",function(M,B){var j=$.props.onRightClick;j&&(M.preventDefault(),j({event:M,node:B}))}),(0,y.Z)((0,ue.Z)($),"onFocus",function(){var M=$.props.onFocus;$.setState({focused:!0});for(var B=arguments.length,j=new Array(B),me=0;me<B;me++)j[me]=arguments[me];M==null||M.apply(void 0,j)}),(0,y.Z)((0,ue.Z)($),"onBlur",function(){var M=$.props.onBlur;$.setState({focused:!1}),$.onActiveChange(null);for(var B=arguments.length,j=new Array(B),me=0;me<B;me++)j[me]=arguments[me];M==null||M.apply(void 0,j)}),(0,y.Z)((0,ue.Z)($),"getTreeNodeRequiredProps",function(){var M=$.state,B=M.expandedKeys,j=M.selectedKeys,me=M.loadedKeys,de=M.loadingKeys,Ae=M.checkedKeys,Ee=M.halfCheckedKeys,Ce=M.dragOverNodeKey,Fe=M.dropPosition,Be=M.keyEntities;return{expandedKeys:B||[],selectedKeys:j||[],loadedKeys:me||[],loadingKeys:de||[],checkedKeys:Ae||[],halfCheckedKeys:Ee||[],dragOverNodeKey:Ce,dropPosition:Fe,keyEntities:Be}}),(0,y.Z)((0,ue.Z)($),"setExpandedKeys",function(M){var B=$.state,j=B.treeData,me=B.fieldNames,de=(0,Te.oH)(j,M,me);$.setUncontrolledState({expandedKeys:M,flattenNodes:de},!0)}),(0,y.Z)((0,ue.Z)($),"onNodeExpand",function(M,B){var j=$.state.expandedKeys,me=$.state,de=me.listChanging,Ae=me.fieldNames,Ee=$.props,Ce=Ee.onExpand,Fe=Ee.loadData,Be=B.expanded,Ye=B[Ae.key];if(!de){var xt=j.includes(Ye),lt=!Be;if((0,S.ZP)(Be&&xt||!Be&&!xt,"Expand state not sync with index check"),j=lt?(0,_t.L0)(j,Ye):(0,_t._5)(j,Ye),$.setExpandedKeys(j),Ce==null||Ce(j,{node:B,expanded:lt,nativeEvent:M.nativeEvent}),lt&&Fe){var nt=$.onNodeLoad(B);nt&&nt.then(function(){var Ut=(0,Te.oH)($.state.treeData,j,Ae);$.setUncontrolledState({flattenNodes:Ut})}).catch(function(){var Ut=$.state.expandedKeys,Vt=(0,_t._5)(Ut,Ye);$.setExpandedKeys(Vt)})}}}),(0,y.Z)((0,ue.Z)($),"onListChangeStart",function(){$.setUncontrolledState({listChanging:!0})}),(0,y.Z)((0,ue.Z)($),"onListChangeEnd",function(){setTimeout(function(){$.setUncontrolledState({listChanging:!1})})}),(0,y.Z)((0,ue.Z)($),"onActiveChange",function(M){var B=$.state.activeKey,j=$.props,me=j.onActiveChange,de=j.itemScrollOffset,Ae=de===void 0?0:de;B!==M&&($.setState({activeKey:M}),M!==null&&$.scrollTo({key:M,offset:Ae}),me==null||me(M))}),(0,y.Z)((0,ue.Z)($),"getActiveItem",function(){var M=$.state,B=M.activeKey,j=M.flattenNodes;return B===null?null:j.find(function(me){var de=me.key;return de===B})||null}),(0,y.Z)((0,ue.Z)($),"offsetActiveKey",function(M){var B=$.state,j=B.flattenNodes,me=B.activeKey,de=j.findIndex(function(Ce){var Fe=Ce.key;return Fe===me});de===-1&&M<0&&(de=j.length),de=(de+M+j.length)%j.length;var Ae=j[de];if(Ae){var Ee=Ae.key;$.onActiveChange(Ee)}else $.onActiveChange(null)}),(0,y.Z)((0,ue.Z)($),"onKeyDown",function(M){var B=$.state,j=B.activeKey,me=B.expandedKeys,de=B.checkedKeys,Ae=B.fieldNames,Ee=$.props,Ce=Ee.onKeyDown,Fe=Ee.checkable,Be=Ee.selectable;switch(M.which){case g.Z.UP:{$.offsetActiveKey(-1),M.preventDefault();break}case g.Z.DOWN:{$.offsetActiveKey(1),M.preventDefault();break}}var Ye=$.getActiveItem();if(Ye&&Ye.data){var xt=$.getTreeNodeRequiredProps(),lt=Ye.data.isLeaf===!1||!!(Ye.data[Ae.children]||[]).length,nt=(0,Te.F)((0,ve.Z)((0,ve.Z)({},(0,Te.H8)(j,xt)),{},{data:Ye.data,active:!0}));switch(M.which){case g.Z.LEFT:{lt&&me.includes(j)?$.onNodeExpand({},nt):Ye.parent&&$.onActiveChange(Ye.parent.key),M.preventDefault();break}case g.Z.RIGHT:{lt&&!me.includes(j)?$.onNodeExpand({},nt):Ye.children&&Ye.children.length&&$.onActiveChange(Ye.children[0].key),M.preventDefault();break}case g.Z.ENTER:case g.Z.SPACE:{Fe&&!nt.disabled&&nt.checkable!==!1&&!nt.disableCheckbox?$.onNodeCheck({},nt,!de.includes(j)):!Fe&&Be&&!nt.disabled&&nt.selectable!==!1&&$.onNodeSelect({},nt);break}}}Ce==null||Ce(M)}),(0,y.Z)((0,ue.Z)($),"setUncontrolledState",function(M){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,j=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!$.destroyed){var me=!1,de=!0,Ae={};Object.keys(M).forEach(function(Ee){if($.props.hasOwnProperty(Ee)){de=!1;return}me=!0,Ae[Ee]=M[Ee]}),me&&(!B||de)&&$.setState((0,ve.Z)((0,ve.Z)({},Ae),j))}}),(0,y.Z)((0,ue.Z)($),"scrollTo",function(M){$.listRef.current.scrollTo(M)}),$}return(0,f.Z)(Le,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var P=this.props,K=P.activeKey,ne=P.itemScrollOffset,M=ne===void 0?0:ne;K!==void 0&&K!==this.state.activeKey&&(this.setState({activeKey:K}),K!==null&&this.scrollTo({key:K,offset:M}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var P=this.state,K=P.focused,ne=P.flattenNodes,M=P.keyEntities,B=P.draggingNodeKey,j=P.activeKey,me=P.dropLevelOffset,de=P.dropContainerKey,Ae=P.dropTargetKey,Ee=P.dropPosition,Ce=P.dragOverNodeKey,Fe=P.indent,Be=this.props,Ye=Be.prefixCls,xt=Be.className,lt=Be.style,nt=Be.showLine,Ut=Be.focusable,Vt=Be.tabIndex,Ct=Vt===void 0?0:Vt,Jt=Be.selectable,wn=Be.showIcon,Rt=Be.icon,Yt=Be.switcherIcon,Ne=Be.draggable,ke=Be.checkable,Pe=Be.checkStrictly,z=Be.disabled,oe=Be.motion,he=Be.loadData,ce=Be.filterTreeNode,be=Be.height,ze=Be.itemHeight,Ze=Be.scrollWidth,$e=Be.virtual,ft=Be.titleRender,en=Be.dropIndicatorRender,an=Be.onContextMenu,yt=Be.onScroll,Gt=Be.direction,_n=Be.rootClassName,Bn=Be.rootStyle,cn=(0,_.Z)(this.props,{aria:!0,data:!0}),pn;Ne&&((0,ae.Z)(Ne)==="object"?pn=Ne:typeof Ne=="function"?pn={nodeDraggable:Ne}:pn={});var Tn={prefixCls:Ye,selectable:Jt,showIcon:wn,icon:Rt,switcherIcon:Yt,draggable:pn,draggingNodeKey:B,checkable:ke,checkStrictly:Pe,disabled:z,keyEntities:M,dropLevelOffset:me,dropContainerKey:de,dropTargetKey:Ae,dropPosition:Ee,dragOverNodeKey:Ce,indent:Fe,direction:Gt,dropIndicatorRender:en,loadData:he,filterTreeNode:ce,titleRender:ft,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return L.createElement(N.k.Provider,{value:Tn},L.createElement("div",{className:h()(Ye,xt,_n,(0,y.Z)((0,y.Z)((0,y.Z)({},"".concat(Ye,"-show-line"),nt),"".concat(Ye,"-focused"),K),"".concat(Ye,"-active-focused"),j!==null)),style:Bn},L.createElement(xe,(0,x.Z)({ref:this.listRef,prefixCls:Ye,style:lt,data:ne,disabled:z,selectable:Jt,checkable:!!ke,motion:oe,dragging:B!==null,height:be,itemHeight:ze,virtual:$e,focusable:Ut,focused:K,tabIndex:Ct,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:an,onScroll:yt,scrollWidth:Ze},this.getTreeNodeRequiredProps(),cn))))}}],[{key:"getDerivedStateFromProps",value:function(P,K){var ne=K.prevProps,M={prevProps:P};function B(Ct){return!ne&&P.hasOwnProperty(Ct)||ne&&ne[Ct]!==P[Ct]}var j,me=K.fieldNames;if(B("fieldNames")&&(me=(0,Te.w$)(P.fieldNames),M.fieldNames=me),B("treeData")?j=P.treeData:B("children")&&((0,S.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),j=(0,Te.zn)(P.children)),j){M.treeData=j;var de=(0,Te.I8)(j,{fieldNames:me});M.keyEntities=(0,ve.Z)((0,y.Z)({},U,pe),de.keyEntities)}var Ae=M.keyEntities||K.keyEntities;if(B("expandedKeys")||ne&&B("autoExpandParent"))M.expandedKeys=P.autoExpandParent||!ne&&P.defaultExpandParent?(0,_t.r7)(P.expandedKeys,Ae):P.expandedKeys;else if(!ne&&P.defaultExpandAll){var Ee=(0,ve.Z)({},Ae);delete Ee[U];var Ce=[];Object.keys(Ee).forEach(function(Ct){var Jt=Ee[Ct];Jt.children&&Jt.children.length&&Ce.push(Jt.key)}),M.expandedKeys=Ce}else!ne&&P.defaultExpandedKeys&&(M.expandedKeys=P.autoExpandParent||P.defaultExpandParent?(0,_t.r7)(P.defaultExpandedKeys,Ae):P.defaultExpandedKeys);if(M.expandedKeys||delete M.expandedKeys,j||M.expandedKeys){var Fe=(0,Te.oH)(j||K.treeData,M.expandedKeys||K.expandedKeys,me);M.flattenNodes=Fe}if(P.selectable&&(B("selectedKeys")?M.selectedKeys=(0,_t.BT)(P.selectedKeys,P):!ne&&P.defaultSelectedKeys&&(M.selectedKeys=(0,_t.BT)(P.defaultSelectedKeys,P))),P.checkable){var Be;if(B("checkedKeys")?Be=(0,_t.E6)(P.checkedKeys)||{}:!ne&&P.defaultCheckedKeys?Be=(0,_t.E6)(P.defaultCheckedKeys)||{}:j&&(Be=(0,_t.E6)(P.checkedKeys)||{checkedKeys:K.checkedKeys,halfCheckedKeys:K.halfCheckedKeys}),Be){var Ye=Be,xt=Ye.checkedKeys,lt=xt===void 0?[]:xt,nt=Ye.halfCheckedKeys,Ut=nt===void 0?[]:nt;if(!P.checkStrictly){var Vt=(0,Qt.S)(lt,!0,Ae);lt=Vt.checkedKeys,Ut=Vt.halfCheckedKeys}M.checkedKeys=lt,M.halfCheckedKeys=Ut}}return B("loadedKeys")&&(M.loadedKeys=P.loadedKeys),M}}]),Le}(L.Component);(0,y.Z)(tt,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:R,allowDrop:function(){return!0},expandAction:!1}),(0,y.Z)(tt,"TreeNode",I.Z);var Re=tt,ye=Re},82661:function(on,je,E){"use strict";E.d(je,{BT:function(){return L},E6:function(){return R},L0:function(){return y},OM:function(){return S},_5:function(){return o},r7:function(){return k},wA:function(){return h},yx:function(){return C}});var x=E(62730),ae=E(28788),ve=E(48736),fe=E(59301),F=E(639),f=E(65065),ue=E(34061),te=null;function o(T,A){if(!T)return[];var J=T.slice(),ee=J.indexOf(A);return ee>=0&&J.splice(ee,1),J}function y(T,A){var J=(T||[]).slice();return J.indexOf(A)===-1&&J.push(A),J}function C(T){return T.split("-")}function h(T,A){var J=[],ee=(0,f.Z)(A,T);function G(){var I=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];I.forEach(function(re){var le=re.key,Te=re.children;J.push(le),G(Te)})}return G(ee.children),J}function g(T){if(T.parent){var A=C(T.pos);return Number(A[A.length-1])===T.parent.children.length-1}return!1}function _(T){var A=C(T.pos);return Number(A[A.length-1])===0}function S(T,A,J,ee,G,I,re,le,Te,W){var O,Q=T.clientX,q=T.clientY,ie=T.target.getBoundingClientRect(),V=ie.top,v=ie.height,m=(W==="rtl"?-1:1)*(((G==null?void 0:G.x)||0)-Q),U=(m-12)/ee,se=Te.filter(function(ye){var Z;return(Z=le[ye])===null||Z===void 0||(Z=Z.children)===null||Z===void 0?void 0:Z.length}),pe=(0,f.Z)(le,J.eventKey);if(q<V+v/2){var He=re.findIndex(function(ye){return ye.key===pe.key}),qe=He<=0?0:He-1,ot=re[qe].key;pe=(0,f.Z)(le,ot)}var Ot=pe.key,bt=pe,xe=pe.key,_t=0,Qt=0;if(!se.includes(Ot))for(var Lt=0;Lt<U&&g(pe);Lt+=1)pe=pe.parent,Qt+=1;var qt=A.data,tt=pe.node,Re=!0;return _(pe)&&pe.level===0&&q<V+v/2&&I({dragNode:qt,dropNode:tt,dropPosition:-1})&&pe.key===J.eventKey?_t=-1:(bt.children||[]).length&&se.includes(xe)?I({dragNode:qt,dropNode:tt,dropPosition:0})?_t=0:Re=!1:Qt===0?U>-1.5?I({dragNode:qt,dropNode:tt,dropPosition:1})?_t=1:Re=!1:I({dragNode:qt,dropNode:tt,dropPosition:0})?_t=0:I({dragNode:qt,dropNode:tt,dropPosition:1})?_t=1:Re=!1:I({dragNode:qt,dropNode:tt,dropPosition:1})?_t=1:Re=!1,{dropPosition:_t,dropLevelOffset:Qt,dropTargetKey:pe.key,dropTargetPos:pe.pos,dragOverNodeKey:xe,dropContainerKey:_t===0?null:((O=pe.parent)===null||O===void 0?void 0:O.key)||null,dropAllowed:Re}}function L(T,A){if(T){var J=A.multiple;return J?T.slice():T.length?[T[0]]:T}}var N=function(A){return A};function H(T,A){if(!T)return[];var J=A||{},ee=J.processProps,G=ee===void 0?N:ee,I=Array.isArray(T)?T:[T];return I.map(function(re){var le=re.children,Te=_objectWithoutProperties(re,te),W=H(le,A);return React.createElement(TreeNode,_extends({key:Te.key},G(Te)),W)})}function R(T){if(!T)return null;var A;if(Array.isArray(T))A={checkedKeys:T,halfCheckedKeys:void 0};else if((0,ae.Z)(T)==="object")A={checkedKeys:T.checked||void 0,halfCheckedKeys:T.halfChecked||void 0};else return(0,ve.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return A}function k(T,A){var J=new Set;function ee(G){if(!J.has(G)){var I=(0,f.Z)(A,G);if(I){J.add(G);var re=I.parent,le=I.node;le.disabled||re&&ee(re.key)}}}return(T||[]).forEach(function(G){ee(G)}),(0,x.Z)(J)}},34643:function(on,je,E){"use strict";E.d(je,{S:function(){return ue}});var x=E(48736),ae=E(65065);function ve(te,o){var y=new Set;return te.forEach(function(C){o.has(C)||y.add(C)}),y}function fe(te){var o=te||{},y=o.disabled,C=o.disableCheckbox,h=o.checkable;return!!(y||C)||h===!1}function F(te,o,y,C){for(var h=new Set(te),g=new Set,_=0;_<=y;_+=1){var S=o.get(_)||new Set;S.forEach(function(R){var k=R.key,T=R.node,A=R.children,J=A===void 0?[]:A;h.has(k)&&!C(T)&&J.filter(function(ee){return!C(ee.node)}).forEach(function(ee){h.add(ee.key)})})}for(var L=new Set,N=y;N>=0;N-=1){var H=o.get(N)||new Set;H.forEach(function(R){var k=R.parent,T=R.node;if(!(C(T)||!R.parent||L.has(R.parent.key))){if(C(R.parent.node)){L.add(k.key);return}var A=!0,J=!1;(k.children||[]).filter(function(ee){return!C(ee.node)}).forEach(function(ee){var G=ee.key,I=h.has(G);A&&!I&&(A=!1),!J&&(I||g.has(G))&&(J=!0)}),A&&h.add(k.key),J&&g.add(k.key),L.add(k.key)}})}return{checkedKeys:Array.from(h),halfCheckedKeys:Array.from(ve(g,h))}}function f(te,o,y,C,h){for(var g=new Set(te),_=new Set(o),S=0;S<=C;S+=1){var L=y.get(S)||new Set;L.forEach(function(k){var T=k.key,A=k.node,J=k.children,ee=J===void 0?[]:J;!g.has(T)&&!_.has(T)&&!h(A)&&ee.filter(function(G){return!h(G.node)}).forEach(function(G){g.delete(G.key)})})}_=new Set;for(var N=new Set,H=C;H>=0;H-=1){var R=y.get(H)||new Set;R.forEach(function(k){var T=k.parent,A=k.node;if(!(h(A)||!k.parent||N.has(k.parent.key))){if(h(k.parent.node)){N.add(T.key);return}var J=!0,ee=!1;(T.children||[]).filter(function(G){return!h(G.node)}).forEach(function(G){var I=G.key,re=g.has(I);J&&!re&&(J=!1),!ee&&(re||_.has(I))&&(ee=!0)}),J||g.delete(T.key),ee&&_.add(T.key),N.add(T.key)}})}return{checkedKeys:Array.from(g),halfCheckedKeys:Array.from(ve(_,g))}}function ue(te,o,y,C){var h=[],g;C?g=C:g=fe;var _=new Set(te.filter(function(H){var R=!!(0,ae.Z)(y,H);return R||h.push(H),R})),S=new Map,L=0;Object.keys(y).forEach(function(H){var R=y[H],k=R.level,T=S.get(k);T||(T=new Set,S.set(k,T)),T.add(R),L=Math.max(L,k)}),(0,x.ZP)(!h.length,"Tree missing follow keys: ".concat(h.slice(0,100).map(function(H){return"'".concat(H,"'")}).join(", ")));var N;return o===!0?N=F(_,S,L,g):N=f(_,o.halfCheckedKeys,S,L,g),N}},65065:function(on,je,E){"use strict";E.d(je,{Z:function(){return x}});function x(ae,ve){return ae[ve]}},34061:function(on,je,E){"use strict";E.d(je,{F:function(){return k},H8:function(){return R},I8:function(){return H},km:function(){return h},oH:function(){return L},w$:function(){return g},zn:function(){return S}});var x=E(28788),ae=E(62730),ve=E(89490),fe=E(39224),F=E(11592),f=E(2738),ue=E(48736),te=E(65065),o=["children"];function y(T,A){return"".concat(T,"-").concat(A)}function C(T){return T&&T.type&&T.type.isTreeNode}function h(T,A){return T!=null?T:A}function g(T){var A=T||{},J=A.title,ee=A._title,G=A.key,I=A.children,re=J||"title";return{title:re,_title:ee||[re],key:G||"key",children:I||"children"}}function _(T,A){var J=new Map;function ee(G){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(G||[]).forEach(function(re){var le=re[A.key],Te=re[A.children];warning(le!=null,"Tree node must have a certain key: [".concat(I).concat(le,"]"));var W=String(le);warning(!J.has(W)||le===null||le===void 0,"Same 'key' exist in the Tree: ".concat(W)),J.set(W,!0),ee(Te,"".concat(I).concat(W," > "))})}ee(T)}function S(T){function A(J){var ee=(0,F.Z)(J);return ee.map(function(G){if(!C(G))return(0,ue.ZP)(!G,"Tree/TreeNode can only accept TreeNode as children."),null;var I=G.key,re=G.props,le=re.children,Te=(0,fe.Z)(re,o),W=(0,ve.Z)({key:I},Te),O=A(le);return O.length&&(W.children=O),W}).filter(function(G){return G})}return A(T)}function L(T,A,J){var ee=g(J),G=ee._title,I=ee.key,re=ee.children,le=new Set(A===!0?[]:A),Te=[];function W(O){var Q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return O.map(function(q,ie){for(var V=y(Q?Q.pos:"0",ie),v=h(q[I],V),m,U=0;U<G.length;U+=1){var se=G[U];if(q[se]!==void 0){m=q[se];break}}var pe=Object.assign((0,f.Z)(q,[].concat((0,ae.Z)(G),[I,re])),{title:m,key:v,parent:Q,pos:V,children:null,data:q,isStart:[].concat((0,ae.Z)(Q?Q.isStart:[]),[ie===0]),isEnd:[].concat((0,ae.Z)(Q?Q.isEnd:[]),[ie===O.length-1])});return Te.push(pe),A===!0||le.has(v)?pe.children=W(q[re]||[],pe):pe.children=[],pe})}return W(T),Te}function N(T,A,J){var ee={};(0,x.Z)(J)==="object"?ee=J:ee={externalGetKey:J},ee=ee||{};var G=ee,I=G.childrenPropName,re=G.externalGetKey,le=G.fieldNames,Te=g(le),W=Te.key,O=Te.children,Q=I||O,q;re?typeof re=="string"?q=function(v){return v[re]}:typeof re=="function"&&(q=function(v){return re(v)}):q=function(v,m){return h(v[W],m)};function ie(V,v,m,U){var se=V?V[Q]:T,pe=V?y(m.pos,v):"0",He=V?[].concat((0,ae.Z)(U),[V]):[];if(V){var qe=q(V,pe),ot={node:V,index:v,pos:pe,key:qe,parentPos:m.node?m.pos:null,level:m.level+1,nodes:He};A(ot)}se&&se.forEach(function(Ot,bt){ie(Ot,bt,{node:V,pos:pe,level:m?m.level+1:-1},He)})}ie(null)}function H(T){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},J=A.initWrapper,ee=A.processEntity,G=A.onProcessFinished,I=A.externalGetKey,re=A.childrenPropName,le=A.fieldNames,Te=arguments.length>2?arguments[2]:void 0,W=I||Te,O={},Q={},q={posEntities:O,keyEntities:Q};return J&&(q=J(q)||q),N(T,function(ie){var V=ie.node,v=ie.index,m=ie.pos,U=ie.key,se=ie.parentPos,pe=ie.level,He=ie.nodes,qe={node:V,nodes:He,index:v,key:U,pos:m,level:pe},ot=h(U,m);O[m]=qe,Q[ot]=qe,qe.parent=O[se],qe.parent&&(qe.parent.children=qe.parent.children||[],qe.parent.children.push(qe)),ee&&ee(qe,q)},{externalGetKey:W,childrenPropName:re,fieldNames:le}),G&&G(q),q}function R(T,A){var J=A.expandedKeys,ee=A.selectedKeys,G=A.loadedKeys,I=A.loadingKeys,re=A.checkedKeys,le=A.halfCheckedKeys,Te=A.dragOverNodeKey,W=A.dropPosition,O=A.keyEntities,Q=(0,te.Z)(O,T),q={eventKey:T,expanded:J.indexOf(T)!==-1,selected:ee.indexOf(T)!==-1,loaded:G.indexOf(T)!==-1,loading:I.indexOf(T)!==-1,checked:re.indexOf(T)!==-1,halfChecked:le.indexOf(T)!==-1,pos:String(Q?Q.pos:""),dragOver:Te===T&&W===0,dragOverGapTop:Te===T&&W===-1,dragOverGapBottom:Te===T&&W===1};return q}function k(T){var A=T.data,J=T.expanded,ee=T.selected,G=T.checked,I=T.loaded,re=T.loading,le=T.halfChecked,Te=T.dragOver,W=T.dragOverGapTop,O=T.dragOverGapBottom,Q=T.pos,q=T.active,ie=T.eventKey,V=(0,ve.Z)((0,ve.Z)({},A),{},{expanded:J,selected:ee,checked:G,loaded:I,loading:re,halfChecked:le,dragOver:Te,dragOverGapTop:W,dragOverGapBottom:O,pos:Q,active:q,key:ie});return"props"in V||Object.defineProperty(V,"props",{get:function(){return(0,ue.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),T}}),V}},8224:function(on,je,E){"use strict";E.d(je,{Z:function(){return ae}});var x=E(4676);function ae(ve,fe,F,f){var ue=x.unstable_batchedUpdates?function(o){x.unstable_batchedUpdates(F,o)}:F;return ve!=null&&ve.addEventListener&&ve.addEventListener(fe,ue,f),{remove:function(){ve!=null&&ve.removeEventListener&&ve.removeEventListener(fe,ue,f)}}}},24514:function(on,je,E){"use strict";E.d(je,{G:function(){return fe}});var x=E(47273),ae=function(f){if((0,x.Z)()&&window.document.documentElement){var ue=Array.isArray(f)?f:[f],te=window.document.documentElement;return ue.some(function(o){return o in te.style})}return!1},ve=function(f,ue){if(!ae(f))return!1;var te=document.createElement("div"),o=te.style[f];return te.style[f]=ue,te.style[f]!==o};function fe(F,f){return!Array.isArray(F)&&f!==void 0?ve(F,f):ae(F)}},49658:function(on,je){"use strict";je.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var E=navigator.userAgent||navigator.vendor||window.opera;return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino|android|ipad|playbook|silk/i.test(E)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(E==null?void 0:E.substr(0,4))}},65283:function(on,je,E){"use strict";E.d(je,{Z:function(){return qt}});var x=E(71409),ae=E(28788),ve=E(89490),fe=E(87075),F=E(11036),f=E(39224),ue=E(92310),te=E.n(ue),o=E(29301),y=E(70425),C=E(34280),h=E(59301),g=E(4676),_=h.forwardRef(function(tt,Re){var ye=tt.height,Z=tt.offsetY,we=tt.offsetX,Le=tt.children,$=tt.prefixCls,P=tt.onInnerResize,K=tt.innerProps,ne=tt.rtl,M=tt.extra,B={},j={display:"flex",flexDirection:"column"};return Z!==void 0&&(B={height:ye,position:"relative",overflow:"hidden"},j=(0,ve.Z)((0,ve.Z)({},j),{},(0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)((0,fe.Z)({transform:"translateY(".concat(Z,"px)")},ne?"marginRight":"marginLeft",-we),"position","absolute"),"left",0),"right",0),"top",0))),h.createElement("div",{style:B},h.createElement(o.Z,{onResize:function(de){var Ae=de.offsetHeight;Ae&&P&&P()}},h.createElement("div",(0,x.Z)({style:j,className:te()((0,fe.Z)({},"".concat($,"-holder-inner"),$)),ref:Re},K),Le,M)))});_.displayName="Filler";var S=_;function L(tt){var Re=tt.children,ye=tt.setRef,Z=h.useCallback(function(we){ye(we)},[]);return h.cloneElement(Re,{ref:Z})}function N(tt,Re,ye,Z,we,Le,$,P){var K=P.getKey;return tt.slice(Re,ye+1).map(function(ne,M){var B=Re+M,j=$(ne,B,{style:{width:Z},offsetX:we}),me=K(ne);return h.createElement(L,{key:me,setRef:function(Ae){return Le(ne,Ae)}},j)})}function H(tt,Re,ye,Z){var we=ye-tt,Le=Re-ye,$=Math.min(we,Le)*2;if(Z<=$){var P=Math.floor(Z/2);return Z%2?ye+P+1:ye-P}return we>Le?ye-(Z-Le):ye+(Z-we)}function R(tt,Re,ye){var Z=tt.length,we=Re.length,Le,$;if(Z===0&&we===0)return null;Z<we?(Le=tt,$=Re):(Le=Re,$=tt);var P={__EMPTY_ITEM__:!0};function K(de){return de!==void 0?ye(de):P}for(var ne=null,M=Math.abs(Z-we)!==1,B=0;B<$.length;B+=1){var j=K(Le[B]),me=K($[B]);if(j!==me){ne=B,M=M||j!==K($[B+1]);break}}return ne===null?null:{index:ne,multiple:M}}function k(tt,Re,ye){var Z=h.useState(tt),we=(0,F.Z)(Z,2),Le=we[0],$=we[1],P=h.useState(null),K=(0,F.Z)(P,2),ne=K[0],M=K[1];return h.useEffect(function(){var B=R(Le||[],tt||[],Re);(B==null?void 0:B.index)!==void 0&&(ye==null||ye(B.index),M(tt[B.index])),$(tt)},[tt]),[ne]}var T=E(16089),A=(typeof navigator=="undefined"?"undefined":(0,ae.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),J=A,ee=function(tt,Re,ye,Z){var we=(0,h.useRef)(!1),Le=(0,h.useRef)(null);function $(){clearTimeout(Le.current),we.current=!0,Le.current=setTimeout(function(){we.current=!1},50)}var P=(0,h.useRef)({top:tt,bottom:Re,left:ye,right:Z});return P.current.top=tt,P.current.bottom=Re,P.current.left=ye,P.current.right=Z,function(K,ne){var M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,B=K?ne<0&&P.current.left||ne>0&&P.current.right:ne<0&&P.current.top||ne>0&&P.current.bottom;return M&&B?(clearTimeout(Le.current),we.current=!1):(!B||we.current)&&$(),!we.current&&B}};function G(tt,Re,ye,Z,we,Le,$){var P=(0,h.useRef)(0),K=(0,h.useRef)(null),ne=(0,h.useRef)(null),M=(0,h.useRef)(!1),B=ee(Re,ye,Z,we);function j(Fe,Be){if(T.Z.cancel(K.current),!B(!1,Be)){var Ye=Fe;if(!Ye._virtualHandled)Ye._virtualHandled=!0;else return;P.current+=Be,ne.current=Be,J||Ye.preventDefault(),K.current=(0,T.Z)(function(){var xt=M.current?10:1;$(P.current*xt,!1),P.current=0})}}function me(Fe,Be){$(Be,!0),J||Fe.preventDefault()}var de=(0,h.useRef)(null),Ae=(0,h.useRef)(null);function Ee(Fe){if(tt){T.Z.cancel(Ae.current),Ae.current=(0,T.Z)(function(){de.current=null},2);var Be=Fe.deltaX,Ye=Fe.deltaY,xt=Fe.shiftKey,lt=Be,nt=Ye;(de.current==="sx"||!de.current&&xt&&Ye&&!Be)&&(lt=Ye,nt=0,de.current="sx");var Ut=Math.abs(lt),Vt=Math.abs(nt);de.current===null&&(de.current=Le&&Ut>Vt?"x":"y"),de.current==="y"?j(Fe,nt):me(Fe,lt)}}function Ce(Fe){tt&&(M.current=Fe.detail===ne.current)}return[Ee,Ce]}function I(tt,Re,ye,Z){var we=h.useMemo(function(){return[new Map,[]]},[tt,ye.id,Z]),Le=(0,F.Z)(we,2),$=Le[0],P=Le[1],K=function(M){var B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:M,j=$.get(M),me=$.get(B);if(j===void 0||me===void 0)for(var de=tt.length,Ae=P.length;Ae<de;Ae+=1){var Ee,Ce=tt[Ae],Fe=Re(Ce);$.set(Fe,Ae);var Be=(Ee=ye.get(Fe))!==null&&Ee!==void 0?Ee:Z;if(P[Ae]=(P[Ae-1]||0)+Be,Fe===M&&(j=Ae),Fe===B&&(me=Ae),j!==void 0&&me!==void 0)break}return{top:P[j-1]||0,bottom:P[me]}};return K}var re=E(16552),le=E(19210),Te=function(){function tt(){(0,re.Z)(this,tt),(0,fe.Z)(this,"maps",void 0),(0,fe.Z)(this,"id",0),(0,fe.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,le.Z)(tt,[{key:"set",value:function(ye,Z){this.diffRecords.set(ye,this.maps[ye]),this.maps[ye]=Z,this.id+=1}},{key:"get",value:function(ye){return this.maps[ye]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),tt}(),W=Te;function O(tt){var Re=parseFloat(tt);return isNaN(Re)?0:Re}function Q(tt,Re,ye){var Z=h.useState(0),we=(0,F.Z)(Z,2),Le=we[0],$=we[1],P=(0,h.useRef)(new Map),K=(0,h.useRef)(new W),ne=(0,h.useRef)(0);function M(){ne.current+=1}function B(){var me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;M();var de=function(){var Ce=!1;P.current.forEach(function(Fe,Be){if(Fe&&Fe.offsetParent){var Ye=Fe.offsetHeight,xt=getComputedStyle(Fe),lt=xt.marginTop,nt=xt.marginBottom,Ut=O(lt),Vt=O(nt),Ct=Ye+Ut+Vt;K.current.get(Be)!==Ct&&(K.current.set(Be,Ct),Ce=!0)}}),Ce&&$(function(Fe){return Fe+1})};if(me)de();else{ne.current+=1;var Ae=ne.current;Promise.resolve().then(function(){Ae===ne.current&&de()})}}function j(me,de){var Ae=tt(me),Ee=P.current.get(Ae);de?(P.current.set(Ae,de),B()):P.current.delete(Ae),!Ee!=!de&&(de?Re==null||Re(me):ye==null||ye(me))}return(0,h.useEffect)(function(){return M},[]),[j,B,K.current,Le]}var q=14/15;function ie(tt,Re,ye){var Z=(0,h.useRef)(!1),we=(0,h.useRef)(0),Le=(0,h.useRef)(0),$=(0,h.useRef)(null),P=(0,h.useRef)(null),K,ne=function(me){if(Z.current){var de=Math.ceil(me.touches[0].pageX),Ae=Math.ceil(me.touches[0].pageY),Ee=we.current-de,Ce=Le.current-Ae,Fe=Math.abs(Ee)>Math.abs(Ce);Fe?we.current=de:Le.current=Ae;var Be=ye(Fe,Fe?Ee:Ce,!1,me);Be&&me.preventDefault(),clearInterval(P.current),Be&&(P.current=setInterval(function(){Fe?Ee*=q:Ce*=q;var Ye=Math.floor(Fe?Ee:Ce);(!ye(Fe,Ye,!0)||Math.abs(Ye)<=.1)&&clearInterval(P.current)},16))}},M=function(){Z.current=!1,K()},B=function(me){K(),me.touches.length===1&&!Z.current&&(Z.current=!0,we.current=Math.ceil(me.touches[0].pageX),Le.current=Math.ceil(me.touches[0].pageY),$.current=me.target,$.current.addEventListener("touchmove",ne,{passive:!1}),$.current.addEventListener("touchend",M,{passive:!0}))};K=function(){$.current&&($.current.removeEventListener("touchmove",ne),$.current.removeEventListener("touchend",M))},(0,C.Z)(function(){return tt&&Re.current.addEventListener("touchstart",B,{passive:!0}),function(){var j;(j=Re.current)===null||j===void 0||j.removeEventListener("touchstart",B),K(),clearInterval(P.current)}},[tt])}function V(tt){return Math.floor(Math.pow(tt,.5))}function v(tt,Re){var ye="touches"in tt?tt.touches[0]:tt;return ye[Re?"pageX":"pageY"]-window[Re?"scrollX":"scrollY"]}function m(tt,Re,ye){h.useEffect(function(){var Z=Re.current;if(tt&&Z){var we=!1,Le,$,P=function(){T.Z.cancel(Le)},K=function j(){P(),Le=(0,T.Z)(function(){ye($),j()})},ne=function(me){if(!(me.target.draggable||me.button!==0)){var de=me;de._virtualHandled||(de._virtualHandled=!0,we=!0)}},M=function(){we=!1,P()},B=function(me){if(we){var de=v(me,!1),Ae=Z.getBoundingClientRect(),Ee=Ae.top,Ce=Ae.bottom;if(de<=Ee){var Fe=Ee-de;$=-V(Fe),K()}else if(de>=Ce){var Be=de-Ce;$=V(Be),K()}else P()}};return Z.addEventListener("mousedown",ne),Z.ownerDocument.addEventListener("mouseup",M),Z.ownerDocument.addEventListener("mousemove",B),function(){Z.removeEventListener("mousedown",ne),Z.ownerDocument.removeEventListener("mouseup",M),Z.ownerDocument.removeEventListener("mousemove",B),P()}}},[tt])}var U=10;function se(tt,Re,ye,Z,we,Le,$,P){var K=h.useRef(),ne=h.useState(null),M=(0,F.Z)(ne,2),B=M[0],j=M[1];return(0,C.Z)(function(){if(B&&B.times<U){if(!tt.current){j(function(oe){return(0,ve.Z)({},oe)});return}Le();var me=B.targetAlign,de=B.originAlign,Ae=B.index,Ee=B.offset,Ce=tt.current.clientHeight,Fe=!1,Be=me,Ye=null;if(Ce){for(var xt=me||de,lt=0,nt=0,Ut=0,Vt=Math.min(Re.length-1,Ae),Ct=0;Ct<=Vt;Ct+=1){var Jt=we(Re[Ct]);nt=lt;var wn=ye.get(Jt);Ut=nt+(wn===void 0?Z:wn),lt=Ut}for(var Rt=xt==="top"?Ee:Ce-Ee,Yt=Vt;Yt>=0;Yt-=1){var Ne=we(Re[Yt]),ke=ye.get(Ne);if(ke===void 0){Fe=!0;break}if(Rt-=ke,Rt<=0)break}switch(xt){case"top":Ye=nt-Ee;break;case"bottom":Ye=Ut-Ce+Ee;break;default:{var Pe=tt.current.scrollTop,z=Pe+Ce;nt<Pe?Be="top":Ut>z&&(Be="bottom")}}Ye!==null&&$(Ye),Ye!==B.lastTop&&(Fe=!0)}Fe&&j((0,ve.Z)((0,ve.Z)({},B),{},{times:B.times+1,targetAlign:Be,lastTop:Ye}))}},[B,tt.current]),function(me){if(me==null){P();return}if(T.Z.cancel(K.current),typeof me=="number")$(me);else if(me&&(0,ae.Z)(me)==="object"){var de,Ae=me.align;"index"in me?de=me.index:de=Re.findIndex(function(Fe){return we(Fe)===me.key});var Ee=me.offset,Ce=Ee===void 0?0:Ee;j({times:0,index:de,offset:Ce,originAlign:Ae})}}}var pe=h.forwardRef(function(tt,Re){var ye=tt.prefixCls,Z=tt.rtl,we=tt.scrollOffset,Le=tt.scrollRange,$=tt.onStartMove,P=tt.onStopMove,K=tt.onScroll,ne=tt.horizontal,M=tt.spinSize,B=tt.containerSize,j=tt.style,me=tt.thumbStyle,de=tt.showScrollBar,Ae=h.useState(!1),Ee=(0,F.Z)(Ae,2),Ce=Ee[0],Fe=Ee[1],Be=h.useState(null),Ye=(0,F.Z)(Be,2),xt=Ye[0],lt=Ye[1],nt=h.useState(null),Ut=(0,F.Z)(nt,2),Vt=Ut[0],Ct=Ut[1],Jt=!Z,wn=h.useRef(),Rt=h.useRef(),Yt=h.useState(de),Ne=(0,F.Z)(Yt,2),ke=Ne[0],Pe=Ne[1],z=h.useRef(),oe=function(){de===!0||de===!1||(clearTimeout(z.current),Pe(!0),z.current=setTimeout(function(){Pe(!1)},3e3))},he=Le-B||0,ce=B-M||0,be=h.useMemo(function(){if(we===0||he===0)return 0;var _n=we/he;return _n*ce},[we,he,ce]),ze=function(Bn){Bn.stopPropagation(),Bn.preventDefault()},Ze=h.useRef({top:be,dragging:Ce,pageY:xt,startTop:Vt});Ze.current={top:be,dragging:Ce,pageY:xt,startTop:Vt};var $e=function(Bn){Fe(!0),lt(v(Bn,ne)),Ct(Ze.current.top),$(),Bn.stopPropagation(),Bn.preventDefault()};h.useEffect(function(){var _n=function(Tn){Tn.preventDefault()},Bn=wn.current,cn=Rt.current;return Bn.addEventListener("touchstart",_n,{passive:!1}),cn.addEventListener("touchstart",$e,{passive:!1}),function(){Bn.removeEventListener("touchstart",_n),cn.removeEventListener("touchstart",$e)}},[]);var ft=h.useRef();ft.current=he;var en=h.useRef();en.current=ce,h.useEffect(function(){if(Ce){var _n,Bn=function(Tn){var mn=Ze.current,An=mn.dragging,Ft=mn.pageY,Wn=mn.startTop;T.Z.cancel(_n);var Ue=wn.current.getBoundingClientRect(),Oe=B/(ne?Ue.width:Ue.height);if(An){var Bt=(v(Tn,ne)-Ft)*Oe,kt=Wn;!Jt&&ne?kt-=Bt:kt+=Bt;var St=ft.current,fn=en.current,Ve=fn?kt/fn:0,Qe=Math.ceil(Ve*St);Qe=Math.max(Qe,0),Qe=Math.min(Qe,St),_n=(0,T.Z)(function(){K(Qe,ne)})}},cn=function(){Fe(!1),P()};return window.addEventListener("mousemove",Bn,{passive:!0}),window.addEventListener("touchmove",Bn,{passive:!0}),window.addEventListener("mouseup",cn,{passive:!0}),window.addEventListener("touchend",cn,{passive:!0}),function(){window.removeEventListener("mousemove",Bn),window.removeEventListener("touchmove",Bn),window.removeEventListener("mouseup",cn),window.removeEventListener("touchend",cn),T.Z.cancel(_n)}}},[Ce]),h.useEffect(function(){return oe(),function(){clearTimeout(z.current)}},[we]),h.useImperativeHandle(Re,function(){return{delayHidden:oe}});var an="".concat(ye,"-scrollbar"),yt={position:"absolute",visibility:ke?null:"hidden"},Gt={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return ne?(yt.height=8,yt.left=0,yt.right=0,yt.bottom=0,Gt.height="100%",Gt.width=M,Jt?Gt.left=be:Gt.right=be):(yt.width=8,yt.top=0,yt.bottom=0,Jt?yt.right=0:yt.left=0,Gt.width="100%",Gt.height=M,Gt.top=be),h.createElement("div",{ref:wn,className:te()(an,(0,fe.Z)((0,fe.Z)((0,fe.Z)({},"".concat(an,"-horizontal"),ne),"".concat(an,"-vertical"),!ne),"".concat(an,"-visible"),ke)),style:(0,ve.Z)((0,ve.Z)({},yt),j),onMouseDown:ze,onMouseMove:oe},h.createElement("div",{ref:Rt,className:te()("".concat(an,"-thumb"),(0,fe.Z)({},"".concat(an,"-thumb-moving"),Ce)),style:(0,ve.Z)((0,ve.Z)({},Gt),me),onMouseDown:$e}))}),He=pe,qe=20;function ot(){var tt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,ye=tt/Re*tt;return isNaN(ye)&&(ye=0),ye=Math.max(ye,qe),Math.floor(ye)}var Ot=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],bt=[],xe={overflowY:"auto",overflowAnchor:"none"};function _t(tt,Re){var ye=tt.prefixCls,Z=ye===void 0?"rc-virtual-list":ye,we=tt.className,Le=tt.height,$=tt.itemHeight,P=tt.fullHeight,K=P===void 0?!0:P,ne=tt.style,M=tt.data,B=tt.children,j=tt.itemKey,me=tt.virtual,de=tt.direction,Ae=tt.scrollWidth,Ee=tt.component,Ce=Ee===void 0?"div":Ee,Fe=tt.onScroll,Be=tt.onVirtualScroll,Ye=tt.onVisibleChange,xt=tt.innerProps,lt=tt.extraRender,nt=tt.styles,Ut=tt.showScrollBar,Vt=Ut===void 0?"optional":Ut,Ct=(0,f.Z)(tt,Ot),Jt=h.useCallback(function(Ge){return typeof j=="function"?j(Ge):Ge==null?void 0:Ge[j]},[j]),wn=Q(Jt,null,null),Rt=(0,F.Z)(wn,4),Yt=Rt[0],Ne=Rt[1],ke=Rt[2],Pe=Rt[3],z=!!(me!==!1&&Le&&$),oe=h.useMemo(function(){return Object.values(ke.maps).reduce(function(Ge,Je){return Ge+Je},0)},[ke.id,ke.maps]),he=z&&M&&(Math.max($*M.length,oe)>Le||!!Ae),ce=de==="rtl",be=te()(Z,(0,fe.Z)({},"".concat(Z,"-rtl"),ce),we),ze=M||bt,Ze=(0,h.useRef)(),$e=(0,h.useRef)(),ft=(0,h.useRef)(),en=(0,h.useState)(0),an=(0,F.Z)(en,2),yt=an[0],Gt=an[1],_n=(0,h.useState)(0),Bn=(0,F.Z)(_n,2),cn=Bn[0],pn=Bn[1],Tn=(0,h.useState)(!1),mn=(0,F.Z)(Tn,2),An=mn[0],Ft=mn[1],Wn=function(){Ft(!0)},Ue=function(){Ft(!1)},Oe={getKey:Jt};function Bt(Ge){Gt(function(Je){var at;typeof Ge=="function"?at=Ge(Je):at=Ge;var dt=xn(at);return Ze.current.scrollTop=dt,dt})}var kt=(0,h.useRef)({start:0,end:ze.length}),St=(0,h.useRef)(),fn=k(ze,Jt),Ve=(0,F.Z)(fn,1),Qe=Ve[0];St.current=Qe;var Tt=h.useMemo(function(){if(!z)return{scrollHeight:void 0,start:0,end:ze.length-1,offset:void 0};if(!he){var Ge;return{scrollHeight:((Ge=$e.current)===null||Ge===void 0?void 0:Ge.offsetHeight)||0,start:0,end:ze.length-1,offset:void 0}}for(var Je=0,at,dt,gt,Wt=ze.length,vn=0;vn<Wt;vn+=1){var rn=ze[vn],Pn=Jt(rn),Zn=ke.get(Pn),Kn=Je+(Zn===void 0?$:Zn);Kn>=yt&&at===void 0&&(at=vn,dt=Je),Kn>yt+Le&>===void 0&&(gt=vn),Je=Kn}return at===void 0&&(at=0,dt=0,gt=Math.ceil(Le/$)),gt===void 0&&(gt=ze.length-1),gt=Math.min(gt+1,ze.length-1),{scrollHeight:Je,start:at,end:gt,offset:dt}},[he,z,yt,ze,Pe,Le]),Et=Tt.scrollHeight,Xt=Tt.start,ln=Tt.end,nn=Tt.offset;kt.current.start=Xt,kt.current.end=ln,h.useLayoutEffect(function(){var Ge=ke.getRecord();if(Ge.size===1){var Je=Array.from(Ge.keys())[0],at=Ge.get(Je),dt=ze[Xt];if(dt&&at===void 0){var gt=Jt(dt);if(gt===Je){var Wt=ke.get(Je),vn=Wt-$;Bt(function(rn){return rn+vn})}}}ke.resetRecord()},[Et]);var zt=h.useState({width:0,height:Le}),De=(0,F.Z)(zt,2),Se=De[0],et=De[1],rt=function(Je){et({width:Je.offsetWidth,height:Je.offsetHeight})},It=(0,h.useRef)(),Nt=(0,h.useRef)(),wt=h.useMemo(function(){return ot(Se.width,Ae)},[Se.width,Ae]),Zt=h.useMemo(function(){return ot(Se.height,Et)},[Se.height,Et]),$t=Et-Le,jt=(0,h.useRef)($t);jt.current=$t;function xn(Ge){var Je=Ge;return Number.isNaN(jt.current)||(Je=Math.min(Je,jt.current)),Je=Math.max(Je,0),Je}var un=yt<=0,Cn=yt>=$t,Un=cn<=0,Nn=cn>=Ae,Rn=ee(un,Cn,Un,Nn),In=function(){return{x:ce?-cn:cn,y:yt}},$n=(0,h.useRef)(In()),sn=(0,y.zX)(function(Ge){if(Be){var Je=(0,ve.Z)((0,ve.Z)({},In()),Ge);($n.current.x!==Je.x||$n.current.y!==Je.y)&&(Be(Je),$n.current=Je)}});function gn(Ge,Je){var at=Ge;Je?((0,g.flushSync)(function(){pn(at)}),sn()):Bt(at)}function yn(Ge){var Je=Ge.currentTarget.scrollTop;Je!==yt&&Bt(Je),Fe==null||Fe(Ge),sn()}var jn=function(Je){var at=Je,dt=Ae?Ae-Se.width:0;return at=Math.max(at,0),at=Math.min(at,dt),at},kn=(0,y.zX)(function(Ge,Je){Je?((0,g.flushSync)(function(){pn(function(at){var dt=at+(ce?-Ge:Ge);return jn(dt)})}),sn()):Bt(function(at){var dt=at+Ge;return dt})}),Vn=G(z,un,Cn,Un,Nn,!!Ae,kn),or=(0,F.Z)(Vn,2),ge=or[0],Xe=or[1];ie(z,Ze,function(Ge,Je,at,dt){var gt=dt;return Rn(Ge,Je,at)?!1:!gt||!gt._virtualHandled?(gt&&(gt._virtualHandled=!0),ge({preventDefault:function(){},deltaX:Ge?Je:0,deltaY:Ge?0:Je}),!0):!1}),m(he,Ze,function(Ge){Bt(function(Je){return Je+Ge})}),(0,C.Z)(function(){function Ge(at){var dt=un&&at.detail<0,gt=Cn&&at.detail>0;z&&!dt&&!gt&&at.preventDefault()}var Je=Ze.current;return Je.addEventListener("wheel",ge,{passive:!1}),Je.addEventListener("DOMMouseScroll",Xe,{passive:!0}),Je.addEventListener("MozMousePixelScroll",Ge,{passive:!1}),function(){Je.removeEventListener("wheel",ge),Je.removeEventListener("DOMMouseScroll",Xe),Je.removeEventListener("MozMousePixelScroll",Ge)}},[z,un,Cn]),(0,C.Z)(function(){if(Ae){var Ge=jn(cn);pn(Ge),sn({x:Ge})}},[Se.width,Ae]);var Ke=function(){var Je,at;(Je=It.current)===null||Je===void 0||Je.delayHidden(),(at=Nt.current)===null||at===void 0||at.delayHidden()},We=se(Ze,ze,ke,$,Jt,function(){return Ne(!0)},Bt,Ke);h.useImperativeHandle(Re,function(){return{nativeElement:ft.current,getScrollInfo:In,scrollTo:function(Je){function at(dt){return dt&&(0,ae.Z)(dt)==="object"&&("left"in dt||"top"in dt)}at(Je)?(Je.left!==void 0&&pn(jn(Je.left)),We(Je.top)):We(Je)}}}),(0,C.Z)(function(){if(Ye){var Ge=ze.slice(Xt,ln+1);Ye(Ge,ze)}},[Xt,ln,ze]);var it=I(ze,Jt,ke,$),ht=lt==null?void 0:lt({start:Xt,end:ln,virtual:he,offsetX:cn,offsetY:nn,rtl:ce,getSize:it}),Pt=N(ze,Xt,ln,Ae,cn,Yt,B,Oe),Dt=null;Le&&(Dt=(0,ve.Z)((0,fe.Z)({},K?"height":"maxHeight",Le),xe),z&&(Dt.overflowY="hidden",Ae&&(Dt.overflowX="hidden"),An&&(Dt.pointerEvents="none")));var pt={};return ce&&(pt.dir="rtl"),h.createElement("div",(0,x.Z)({ref:ft,style:(0,ve.Z)((0,ve.Z)({},ne),{},{position:"relative"}),className:be},pt,Ct),h.createElement(o.Z,{onResize:rt},h.createElement(Ce,{className:"".concat(Z,"-holder"),style:Dt,ref:Ze,onScroll:yn,onMouseEnter:Ke},h.createElement(S,{prefixCls:Z,height:Et,offsetX:cn,offsetY:nn,scrollWidth:Ae,onInnerResize:Ne,ref:$e,innerProps:xt,rtl:ce,extra:ht},Pt))),he&&Et>Le&&h.createElement(He,{ref:It,prefixCls:Z,scrollOffset:yt,scrollRange:Et,rtl:ce,onScroll:gn,onStartMove:Wn,onStopMove:Ue,spinSize:Zt,containerSize:Se.height,style:nt==null?void 0:nt.verticalScrollBar,thumbStyle:nt==null?void 0:nt.verticalScrollBarThumb,showScrollBar:Vt}),he&&Ae>Se.width&&h.createElement(He,{ref:Nt,prefixCls:Z,scrollOffset:cn,scrollRange:Ae,rtl:ce,onScroll:gn,onStartMove:Wn,onStopMove:Ue,spinSize:wt,containerSize:Se.width,horizontal:!0,style:nt==null?void 0:nt.horizontalScrollBar,thumbStyle:nt==null?void 0:nt.horizontalScrollBarThumb,showScrollBar:Vt}))}var Qt=h.forwardRef(_t);Qt.displayName="List";var Lt=Qt,qt=Lt},83145:function(on,je,E){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.CopyToClipboard=void 0;var x=ve(E(59301)),ae=ve(E(25769));function ve(R){return R&&R.__esModule?R:{default:R}}function fe(R){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?fe=function(T){return typeof T}:fe=function(T){return T&&typeof Symbol=="function"&&T.constructor===Symbol&&T!==Symbol.prototype?"symbol":typeof T},fe(R)}function F(R,k){var T=Object.keys(R);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(R);k&&(A=A.filter(function(J){return Object.getOwnPropertyDescriptor(R,J).enumerable})),T.push.apply(T,A)}return T}function f(R){for(var k=1;k<arguments.length;k++){var T=arguments[k]!=null?arguments[k]:{};k%2?F(T,!0).forEach(function(A){N(R,A,T[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(T)):F(T).forEach(function(A){Object.defineProperty(R,A,Object.getOwnPropertyDescriptor(T,A))})}return R}function ue(R,k){if(R==null)return{};var T=te(R,k),A,J;if(Object.getOwnPropertySymbols){var ee=Object.getOwnPropertySymbols(R);for(J=0;J<ee.length;J++)A=ee[J],!(k.indexOf(A)>=0)&&Object.prototype.propertyIsEnumerable.call(R,A)&&(T[A]=R[A])}return T}function te(R,k){if(R==null)return{};var T={},A=Object.keys(R),J,ee;for(ee=0;ee<A.length;ee++)J=A[ee],!(k.indexOf(J)>=0)&&(T[J]=R[J]);return T}function o(R,k){if(!(R instanceof k))throw new TypeError("Cannot call a class as a function")}function y(R,k){for(var T=0;T<k.length;T++){var A=k[T];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(R,A.key,A)}}function C(R,k,T){return k&&y(R.prototype,k),T&&y(R,T),R}function h(R,k){return k&&(fe(k)==="object"||typeof k=="function")?k:_(R)}function g(R){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(T){return T.__proto__||Object.getPrototypeOf(T)},g(R)}function _(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}function S(R,k){if(typeof k!="function"&&k!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(k&&k.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),k&&L(R,k)}function L(R,k){return L=Object.setPrototypeOf||function(A,J){return A.__proto__=J,A},L(R,k)}function N(R,k,T){return k in R?Object.defineProperty(R,k,{value:T,enumerable:!0,configurable:!0,writable:!0}):R[k]=T,R}var H=function(R){S(k,R);function k(){var T,A;o(this,k);for(var J=arguments.length,ee=new Array(J),G=0;G<J;G++)ee[G]=arguments[G];return A=h(this,(T=g(k)).call.apply(T,[this].concat(ee))),N(_(A),"onClick",function(I){var re=A.props,le=re.text,Te=re.onCopy,W=re.children,O=re.options,Q=x.default.Children.only(W),q=(0,ae.default)(le,O);Te&&Te(le,q),Q&&Q.props&&typeof Q.props.onClick=="function"&&Q.props.onClick(I)}),A}return C(k,[{key:"render",value:function(){var A=this.props,J=A.text,ee=A.onCopy,G=A.options,I=A.children,re=ue(A,["text","onCopy","options","children"]),le=x.default.Children.only(I);return x.default.cloneElement(le,f({},re,{onClick:this.onClick}))}}]),k}(x.default.PureComponent);je.CopyToClipboard=H,N(H,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(on,je,E){"use strict";var x=E(83145),ae=x.CopyToClipboard;ae.CopyToClipboard=ae,on.exports=ae},76374:function(on,je,E){"use strict";var x=function(){if(typeof Map!="undefined")return Map;function W(O,Q){var q=-1;return O.some(function(ie,V){return ie[0]===Q?(q=V,!0):!1}),q}return function(){function O(){this.__entries__=[]}return Object.defineProperty(O.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),O.prototype.get=function(Q){var q=W(this.__entries__,Q),ie=this.__entries__[q];return ie&&ie[1]},O.prototype.set=function(Q,q){var ie=W(this.__entries__,Q);~ie?this.__entries__[ie][1]=q:this.__entries__.push([Q,q])},O.prototype.delete=function(Q){var q=this.__entries__,ie=W(q,Q);~ie&&q.splice(ie,1)},O.prototype.has=function(Q){return!!~W(this.__entries__,Q)},O.prototype.clear=function(){this.__entries__.splice(0)},O.prototype.forEach=function(Q,q){q===void 0&&(q=null);for(var ie=0,V=this.__entries__;ie<V.length;ie++){var v=V[ie];Q.call(q,v[1],v[0])}},O}()}(),ae=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,ve=function(){return typeof E.g!="undefined"&&E.g.Math===Math?E.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),fe=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(ve):function(W){return setTimeout(function(){return W(Date.now())},1e3/60)}}(),F=2;function f(W,O){var Q=!1,q=!1,ie=0;function V(){Q&&(Q=!1,W()),q&&m()}function v(){fe(V)}function m(){var U=Date.now();if(Q){if(U-ie<F)return;q=!0}else Q=!0,q=!1,setTimeout(v,O);ie=U}return m}var ue=20,te=["top","right","bottom","left","width","height","size","weight"],o=typeof MutationObserver!="undefined",y=function(){function W(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=f(this.refresh.bind(this),ue)}return W.prototype.addObserver=function(O){~this.observers_.indexOf(O)||this.observers_.push(O),this.connected_||this.connect_()},W.prototype.removeObserver=function(O){var Q=this.observers_,q=Q.indexOf(O);~q&&Q.splice(q,1),!Q.length&&this.connected_&&this.disconnect_()},W.prototype.refresh=function(){var O=this.updateObservers_();O&&this.refresh()},W.prototype.updateObservers_=function(){var O=this.observers_.filter(function(Q){return Q.gatherActive(),Q.hasActive()});return O.forEach(function(Q){return Q.broadcastActive()}),O.length>0},W.prototype.connect_=function(){!ae||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),o?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},W.prototype.disconnect_=function(){!ae||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},W.prototype.onTransitionEnd_=function(O){var Q=O.propertyName,q=Q===void 0?"":Q,ie=te.some(function(V){return!!~q.indexOf(V)});ie&&this.refresh()},W.getInstance=function(){return this.instance_||(this.instance_=new W),this.instance_},W.instance_=null,W}(),C=function(W,O){for(var Q=0,q=Object.keys(O);Q<q.length;Q++){var ie=q[Q];Object.defineProperty(W,ie,{value:O[ie],enumerable:!1,writable:!1,configurable:!0})}return W},h=function(W){var O=W&&W.ownerDocument&&W.ownerDocument.defaultView;return O||ve},g=J(0,0,0,0);function _(W){return parseFloat(W)||0}function S(W){for(var O=[],Q=1;Q<arguments.length;Q++)O[Q-1]=arguments[Q];return O.reduce(function(q,ie){var V=W["border-"+ie+"-width"];return q+_(V)},0)}function L(W){for(var O=["top","right","bottom","left"],Q={},q=0,ie=O;q<ie.length;q++){var V=ie[q],v=W["padding-"+V];Q[V]=_(v)}return Q}function N(W){var O=W.getBBox();return J(0,0,O.width,O.height)}function H(W){var O=W.clientWidth,Q=W.clientHeight;if(!O&&!Q)return g;var q=h(W).getComputedStyle(W),ie=L(q),V=ie.left+ie.right,v=ie.top+ie.bottom,m=_(q.width),U=_(q.height);if(q.boxSizing==="border-box"&&(Math.round(m+V)!==O&&(m-=S(q,"left","right")+V),Math.round(U+v)!==Q&&(U-=S(q,"top","bottom")+v)),!k(W)){var se=Math.round(m+V)-O,pe=Math.round(U+v)-Q;Math.abs(se)!==1&&(m-=se),Math.abs(pe)!==1&&(U-=pe)}return J(ie.left,ie.top,m,U)}var R=function(){return typeof SVGGraphicsElement!="undefined"?function(W){return W instanceof h(W).SVGGraphicsElement}:function(W){return W instanceof h(W).SVGElement&&typeof W.getBBox=="function"}}();function k(W){return W===h(W).document.documentElement}function T(W){return ae?R(W)?N(W):H(W):g}function A(W){var O=W.x,Q=W.y,q=W.width,ie=W.height,V=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,v=Object.create(V.prototype);return C(v,{x:O,y:Q,width:q,height:ie,top:Q,right:O+q,bottom:ie+Q,left:O}),v}function J(W,O,Q,q){return{x:W,y:O,width:Q,height:q}}var ee=function(){function W(O){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=J(0,0,0,0),this.target=O}return W.prototype.isActive=function(){var O=T(this.target);return this.contentRect_=O,O.width!==this.broadcastWidth||O.height!==this.broadcastHeight},W.prototype.broadcastRect=function(){var O=this.contentRect_;return this.broadcastWidth=O.width,this.broadcastHeight=O.height,O},W}(),G=function(){function W(O,Q){var q=A(Q);C(this,{target:O,contentRect:q})}return W}(),I=function(){function W(O,Q,q){if(this.activeObservations_=[],this.observations_=new x,typeof O!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=O,this.controller_=Q,this.callbackCtx_=q}return W.prototype.observe=function(O){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(O instanceof h(O).Element))throw new TypeError('parameter 1 is not of type "Element".');var Q=this.observations_;Q.has(O)||(Q.set(O,new ee(O)),this.controller_.addObserver(this),this.controller_.refresh())}},W.prototype.unobserve=function(O){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(O instanceof h(O).Element))throw new TypeError('parameter 1 is not of type "Element".');var Q=this.observations_;Q.has(O)&&(Q.delete(O),Q.size||this.controller_.removeObserver(this))}},W.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},W.prototype.gatherActive=function(){var O=this;this.clearActive(),this.observations_.forEach(function(Q){Q.isActive()&&O.activeObservations_.push(Q)})},W.prototype.broadcastActive=function(){if(this.hasActive()){var O=this.callbackCtx_,Q=this.activeObservations_.map(function(q){return new G(q.target,q.broadcastRect())});this.callback_.call(O,Q,O),this.clearActive()}},W.prototype.clearActive=function(){this.activeObservations_.splice(0)},W.prototype.hasActive=function(){return this.activeObservations_.length>0},W}(),re=typeof WeakMap!="undefined"?new WeakMap:new x,le=function(){function W(O){if(!(this instanceof W))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var Q=y.getInstance(),q=new I(O,Q,this);re.set(this,q)}return W}();["observe","unobserve","disconnect"].forEach(function(W){le.prototype[W]=function(){var O;return(O=re.get(this))[W].apply(O,arguments)}});var Te=function(){return typeof ve.ResizeObserver!="undefined"?ve.ResizeObserver:le}();je.Z=Te},27774:function(on,je){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.SizeSensorId=je.SensorTabIndex=je.SensorClassName=void 0;var E="size-sensor-id";je.SizeSensorId=E;var x="size-sensor-object";je.SensorClassName=x;var ae="-1";je.SensorTabIndex=ae},79301:function(on,je){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.default=void 0;var E=function(ae){var ve=arguments.length>1&&arguments[1]!==void 0?arguments[1]:60,fe=null;return function(){for(var F=this,f=arguments.length,ue=new Array(f),te=0;te<f;te++)ue[te]=arguments[te];clearTimeout(fe),fe=setTimeout(function(){ae.apply(F,ue)},ve)}};je.default=E},79789:function(on,je){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.default=void 0;var E=1,x=function(){return"".concat(E++)};je.default=x},47242:function(on,je,E){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.ver=je.clear=je.bind=void 0;var x=E(95270),ae=function(f,ue){var te=(0,x.getSensor)(f);return te.bind(ue),function(){te.unbind(ue)}};je.bind=ae;var ve=function(f){var ue=(0,x.getSensor)(f);(0,x.removeSensor)(ue)};je.clear=ve;var fe="1.0.2";je.ver=fe},95270:function(on,je,E){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.removeSensor=je.getSensor=je.Sensors=void 0;var x=fe(E(79789)),ae=E(57829),ve=E(27774);function fe(o){return o&&o.__esModule?o:{default:o}}var F={};je.Sensors=F;function f(o){o&&F[o]&&delete F[o]}var ue=function(y){var C=y.getAttribute(ve.SizeSensorId);if(C&&F[C])return F[C];var h=(0,x.default)();y.setAttribute(ve.SizeSensorId,h);var g=(0,ae.createSensor)(y,function(){return f(h)});return F[h]=g,g};je.getSensor=ue;var te=function(y){var C=y.element.getAttribute(ve.SizeSensorId);y.destroy(),f(C)};je.removeSensor=te},57829:function(on,je,E){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.createSensor=void 0;var x=E(20953),ae=E(55202),ve=typeof ResizeObserver!="undefined"?ae.createSensor:x.createSensor;je.createSensor=ve},20953:function(on,je,E){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.createSensor=void 0;var x=ve(E(79301)),ae=E(27774);function ve(F){return F&&F.__esModule?F:{default:F}}var fe=function(f,ue){var te=void 0,o=[],y=function(){getComputedStyle(f).position==="static"&&(f.style.position="relative");var L=document.createElement("object");return L.onload=function(){L.contentDocument.defaultView.addEventListener("resize",C),C()},L.style.display="block",L.style.position="absolute",L.style.top="0",L.style.left="0",L.style.height="100%",L.style.width="100%",L.style.overflow="hidden",L.style.pointerEvents="none",L.style.zIndex="-1",L.style.opacity="0",L.setAttribute("class",ae.SensorClassName),L.setAttribute("tabindex",ae.SensorTabIndex),L.type="text/html",f.appendChild(L),L.data="about:blank",L},C=(0,x.default)(function(){o.forEach(function(S){S(f)})}),h=function(L){te||(te=y()),o.indexOf(L)===-1&&o.push(L)},g=function(){te&&te.parentNode&&(te.contentDocument&&te.contentDocument.defaultView.removeEventListener("resize",C),te.parentNode.removeChild(te),f.removeAttribute(ae.SizeSensorId),te=void 0,o=[],ue&&ue())},_=function(L){var N=o.indexOf(L);N!==-1&&o.splice(N,1),o.length===0&&te&&g()};return{element:f,bind:h,destroy:g,unbind:_}};je.createSensor=fe},55202:function(on,je,E){"use strict";Object.defineProperty(je,"__esModule",{value:!0}),je.createSensor=void 0;var x=E(27774),ae=ve(E(79301));function ve(F){return F&&F.__esModule?F:{default:F}}var fe=function(f,ue){var te=void 0,o=[],y=(0,ae.default)(function(){o.forEach(function(S){S(f)})}),C=function(){var L=new ResizeObserver(y);return L.observe(f),y(),L},h=function(L){te||(te=C()),o.indexOf(L)===-1&&o.push(L)},g=function(){te.disconnect(),o=[],te=void 0,f.removeAttribute(x.SizeSensorId),ue&&ue()},_=function(L){var N=o.indexOf(L);N!==-1&&o.splice(N,1),o.length===0&&te&&g()};return{element:f,bind:h,destroy:g,unbind:_}};je.createSensor=fe},98040:function(on){on.exports=function(){var je=document.getSelection();if(!je.rangeCount)return function(){};for(var E=document.activeElement,x=[],ae=0;ae<je.rangeCount;ae++)x.push(je.getRangeAt(ae));switch(E.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":E.blur();break;default:E=null;break}return je.removeAllRanges(),function(){je.type==="Caret"&&je.removeAllRanges(),je.rangeCount||x.forEach(function(ve){je.addRange(ve)}),E&&E.focus()}}},93314:function(on){"use strict";on.exports="data:image/png;base64,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"},96908:function(on){"use strict";on.exports="data:image/png;base64,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"},57177:function(on){"use strict";on.exports="data:image/png;base64,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"},81378:function(on){"use strict";on.exports="data:image/png;base64,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"},79710:function(on,je,E){"use strict";E.d(je,{ZP:function(){return ps}});const x=Number.isFinite||function(a){return typeof a=="number"&&isFinite(a)},ae=Number.isSafeInteger||function(a){return typeof a=="number"&&Math.abs(a)<=ve},ve=Number.MAX_SAFE_INTEGER||9007199254740991;let fe=function(a){return a.NETWORK_ERROR="networkError",a.MEDIA_ERROR="mediaError",a.KEY_SYSTEM_ERROR="keySystemError",a.MUX_ERROR="muxError",a.OTHER_ERROR="otherError",a}({}),F=function(a){return a.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",a.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",a.KEY_SYSTEM_NO_SESSION="keySystemNoSession",a.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",a.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",a.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",a.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",a.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",a.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",a.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",a.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR="keySystemDestroyMediaKeysError",a.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR="keySystemDestroyCloseSessionError",a.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR="keySystemDestroyRemoveSessionError",a.MANIFEST_LOAD_ERROR="manifestLoadError",a.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",a.MANIFEST_PARSING_ERROR="manifestParsingError",a.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",a.LEVEL_EMPTY_ERROR="levelEmptyError",a.LEVEL_LOAD_ERROR="levelLoadError",a.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",a.LEVEL_PARSING_ERROR="levelParsingError",a.LEVEL_SWITCH_ERROR="levelSwitchError",a.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",a.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",a.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",a.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",a.FRAG_LOAD_ERROR="fragLoadError",a.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",a.FRAG_DECRYPT_ERROR="fragDecryptError",a.FRAG_PARSING_ERROR="fragParsingError",a.FRAG_GAP="fragGap",a.REMUX_ALLOC_ERROR="remuxAllocError",a.KEY_LOAD_ERROR="keyLoadError",a.KEY_LOAD_TIMEOUT="keyLoadTimeOut",a.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",a.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",a.BUFFER_APPEND_ERROR="bufferAppendError",a.BUFFER_APPENDING_ERROR="bufferAppendingError",a.BUFFER_STALLED_ERROR="bufferStalledError",a.BUFFER_FULL_ERROR="bufferFullError",a.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",a.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",a.ASSET_LIST_LOAD_ERROR="assetListLoadError",a.ASSET_LIST_LOAD_TIMEOUT="assetListLoadTimeout",a.ASSET_LIST_PARSING_ERROR="assetListParsingError",a.INTERSTITIAL_ASSET_ITEM_ERROR="interstitialAssetItemError",a.INTERNAL_EXCEPTION="internalException",a.INTERNAL_ABORTED="aborted",a.ATTACH_MEDIA_ERROR="attachMediaError",a.UNKNOWN="unknown",a}({}),f=function(a){return a.MEDIA_ATTACHING="hlsMediaAttaching",a.MEDIA_ATTACHED="hlsMediaAttached",a.MEDIA_DETACHING="hlsMediaDetaching",a.MEDIA_DETACHED="hlsMediaDetached",a.MEDIA_ENDED="hlsMediaEnded",a.STALL_RESOLVED="hlsStallResolved",a.BUFFER_RESET="hlsBufferReset",a.BUFFER_CODECS="hlsBufferCodecs",a.BUFFER_CREATED="hlsBufferCreated",a.BUFFER_APPENDING="hlsBufferAppending",a.BUFFER_APPENDED="hlsBufferAppended",a.BUFFER_EOS="hlsBufferEos",a.BUFFERED_TO_END="hlsBufferedToEnd",a.BUFFER_FLUSHING="hlsBufferFlushing",a.BUFFER_FLUSHED="hlsBufferFlushed",a.MANIFEST_LOADING="hlsManifestLoading",a.MANIFEST_LOADED="hlsManifestLoaded",a.MANIFEST_PARSED="hlsManifestParsed",a.LEVEL_SWITCHING="hlsLevelSwitching",a.LEVEL_SWITCHED="hlsLevelSwitched",a.LEVEL_LOADING="hlsLevelLoading",a.LEVEL_LOADED="hlsLevelLoaded",a.LEVEL_UPDATED="hlsLevelUpdated",a.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",a.LEVELS_UPDATED="hlsLevelsUpdated",a.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",a.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",a.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",a.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",a.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",a.AUDIO_TRACK_UPDATED="hlsAudioTrackUpdated",a.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",a.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",a.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",a.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",a.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",a.SUBTITLE_TRACK_UPDATED="hlsSubtitleTrackUpdated",a.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",a.CUES_PARSED="hlsCuesParsed",a.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",a.INIT_PTS_FOUND="hlsInitPtsFound",a.FRAG_LOADING="hlsFragLoading",a.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",a.FRAG_LOADED="hlsFragLoaded",a.FRAG_DECRYPTED="hlsFragDecrypted",a.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",a.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",a.FRAG_PARSING_METADATA="hlsFragParsingMetadata",a.FRAG_PARSED="hlsFragParsed",a.FRAG_BUFFERED="hlsFragBuffered",a.FRAG_CHANGED="hlsFragChanged",a.FPS_DROP="hlsFpsDrop",a.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",a.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",a.ERROR="hlsError",a.DESTROYING="hlsDestroying",a.KEY_LOADING="hlsKeyLoading",a.KEY_LOADED="hlsKeyLoaded",a.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",a.BACK_BUFFER_REACHED="hlsBackBufferReached",a.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",a.ASSET_LIST_LOADING="hlsAssetListLoading",a.ASSET_LIST_LOADED="hlsAssetListLoaded",a.INTERSTITIALS_UPDATED="hlsInterstitialsUpdated",a.INTERSTITIALS_BUFFERED_TO_BOUNDARY="hlsInterstitialsBufferedToBoundary",a.INTERSTITIAL_ASSET_PLAYER_CREATED="hlsInterstitialAssetPlayerCreated",a.INTERSTITIAL_STARTED="hlsInterstitialStarted",a.INTERSTITIAL_ASSET_STARTED="hlsInterstitialAssetStarted",a.INTERSTITIAL_ASSET_ENDED="hlsInterstitialAssetEnded",a.INTERSTITIAL_ASSET_ERROR="hlsInterstitialAssetError",a.INTERSTITIAL_ENDED="hlsInterstitialEnded",a.INTERSTITIALS_PRIMARY_RESUMED="hlsInterstitialsPrimaryResumed",a.PLAYOUT_LIMIT_REACHED="hlsPlayoutLimitReached",a.EVENT_CUE_ENTER="hlsEventCueEnter",a}({});var ue={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},te={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};class o{constructor(e,t=0,n=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=n}sample(e,t){const n=Math.pow(this.alpha_,e);this.estimate_=t*(1-n)+n*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class y{constructor(e,t,n,r=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=n,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new o(e),this.fast_=new o(t),this.defaultTTFB_=r,this.ttfb_=new o(e)}update(e,t){const{slow_:n,fast_:r,ttfb_:i}=this;n.halfLife!==e&&(this.slow_=new o(e,n.getEstimate(),n.getTotalWeight())),r.halfLife!==t&&(this.fast_=new o(t,r.getEstimate(),r.getTotalWeight())),i.halfLife!==e&&(this.ttfb_=new o(e,i.getEstimate(),i.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const n=8*t,r=e/1e3,i=n/r;this.fast_.sample(r,i),this.slow_.sample(r,i)}sampleTTFB(e){const t=e/1e3,n=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(n,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}get defaultEstimate(){return this.defaultEstimate_}destroy(){}}function C(a,e,t){return(e=L(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function h(){return h=Object.assign?Object.assign.bind():function(a){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(a[n]=t[n])}return a},h.apply(null,arguments)}function g(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);e&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(a,r).enumerable})),t.push.apply(t,n)}return t}function _(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?g(Object(t),!0).forEach(function(n){C(a,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):g(Object(t)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(t,n))})}return a}function S(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var n=t.call(a,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function L(a){var e=S(a,"string");return typeof e=="symbol"?e:e+""}class N{constructor(e,t){this.trace=void 0,this.debug=void 0,this.log=void 0,this.warn=void 0,this.info=void 0,this.error=void 0;const n=`[${e}]:`;this.trace=H,this.debug=t.debug.bind(null,n),this.log=t.log.bind(null,n),this.warn=t.warn.bind(null,n),this.info=t.info.bind(null,n),this.error=t.error.bind(null,n)}}const H=function(){},R={trace:H,debug:H,log:H,warn:H,info:H,error:H};function k(){return h({},R)}function T(a,e){const t=self.console[a];return t?t.bind(self.console,`${e?"["+e+"] ":""}[${a}] >`):H}function A(a,e,t){return e[a]?e[a].bind(e):T(a,t)}const J=k();function ee(a,e,t){const n=k();if(typeof console=="object"&&a===!0||typeof a=="object"){const r=["debug","log","info","warn","error"];r.forEach(i=>{n[i]=A(i,a,t)});try{n.log(`Debug logs enabled for "${e}" in hls.js version 1.6.2`)}catch(i){return k()}r.forEach(i=>{J[i]=A(i,a)})}else h(J,n);return n}const G=J;function I(a=!0){return typeof self=="undefined"?void 0:(a||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function re(a){return typeof self!="undefined"&&a===self.ManagedMediaSource}function le(a,e){const t=Object.keys(a),n=Object.keys(e),r=t.length,i=n.length;return!r||!i||r===i&&!t.some(s=>n.indexOf(s)===-1)}function Te(a,e=!1){if(typeof TextDecoder!="undefined"){const u=new TextDecoder("utf-8").decode(a);if(e){const d=u.indexOf("\0");return d!==-1?u.substring(0,d):u}return u.replace(/\0/g,"")}const t=a.length;let n,r,i,s="",l=0;for(;l<t;){if(n=a[l++],n===0&&e)return s;if(n===0||n===3)continue;switch(n>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:s+=String.fromCharCode(n);break;case 12:case 13:r=a[l++],s+=String.fromCharCode((n&31)<<6|r&63);break;case 14:r=a[l++],i=a[l++],s+=String.fromCharCode((n&15)<<12|(r&63)<<6|(i&63)<<0);break}}return s}const W={hexDump:function(a){let e="";for(let t=0;t<a.length;t++){let n=a[t].toString(16);n.length<2&&(n="0"+n),e+=n}return e}};function O(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var Q={exports:{}},q;function ie(){return q||(q=1,function(a,e){(function(t){var n=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,r=/^(?=([^\/?#]*))\1([^]*)$/,i=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,l={buildAbsoluteURL:function(c,u,d){if(d=d||{},c=c.trim(),u=u.trim(),!u){if(!d.alwaysNormalize)return c;var p=l.parseURL(c);if(!p)throw new Error("Error trying to parse base URL.");return p.path=l.normalizePath(p.path),l.buildURLFromParts(p)}var b=l.parseURL(u);if(!b)throw new Error("Error trying to parse relative URL.");if(b.scheme)return d.alwaysNormalize?(b.path=l.normalizePath(b.path),l.buildURLFromParts(b)):u;var w=l.parseURL(c);if(!w)throw new Error("Error trying to parse base URL.");if(!w.netLoc&&w.path&&w.path[0]!=="/"){var D=r.exec(w.path);w.netLoc=D[1],w.path=D[2]}w.netLoc&&!w.path&&(w.path="/");var X={scheme:w.scheme,netLoc:b.netLoc,path:null,params:b.params,query:b.query,fragment:b.fragment};if(!b.netLoc&&(X.netLoc=w.netLoc,b.path[0]!=="/"))if(!b.path)X.path=w.path,b.params||(X.params=w.params,b.query||(X.query=w.query));else{var Y=w.path,_e=Y.substring(0,Y.lastIndexOf("/")+1)+b.path;X.path=l.normalizePath(_e)}return X.path===null&&(X.path=d.alwaysNormalize?l.normalizePath(b.path):b.path),l.buildURLFromParts(X)},parseURL:function(c){var u=n.exec(c);return u?{scheme:u[1]||"",netLoc:u[2]||"",path:u[3]||"",params:u[4]||"",query:u[5]||"",fragment:u[6]||""}:null},normalizePath:function(c){for(c=c.split("").reverse().join("").replace(i,"");c.length!==(c=c.replace(s,"")).length;);return c.split("").reverse().join("")},buildURLFromParts:function(c){return c.scheme+c.netLoc+c.path+c.params+c.query+c.fragment}};a.exports=l})()}(Q)),Q.exports}var V=ie();class v{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var m={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class U{constructor(e){this._byteRange=null,this._url=null,this._stats=null,this._streams=null,this.base=void 0,this.relurl=void 0,typeof e=="string"&&(e={url:e}),this.base=e,ot(this,"stats")}setByteRange(e,t){const n=e.split("@",2);let r;n.length===1?r=(t==null?void 0:t.byteRangeEndOffset)||0:r=parseInt(n[1]),this._byteRange=[r,parseInt(n[0])+r]}get baseurl(){return this.base.url}get byteRange(){return this._byteRange===null?[]:this._byteRange}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get elementaryStreams(){return this._streams===null&&(this._streams={[m.AUDIO]:null,[m.VIDEO]:null,[m.AUDIOVIDEO]:null}),this._streams}set elementaryStreams(e){this._streams=e}get hasStats(){return this._stats!==null}get hasStreams(){return this._streams!==null}get stats(){return this._stats===null&&(this._stats=new v),this._stats}set stats(e){this._stats=e}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=V.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[m.AUDIO]=null,e[m.VIDEO]=null,e[m.AUDIOVIDEO]=null}}function se(a){return a.sn!=="initSegment"}class pe extends U{constructor(e,t){super(t),this._decryptdata=null,this._programDateTime=null,this._ref=null,this._bitrate=void 0,this.rawProgramDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.playlistOffset=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get byteLength(){if(this.hasStats){const e=this.stats.total;if(e)return e}if(this.byteRange){const e=this.byteRange[0],t=this.byteRange[1];if(x(e)&&x(t))return t-e}return null}get bitrate(){return this.byteLength?this.byteLength*8/this.duration:this._bitrate?this._bitrate:null}set bitrate(e){this._bitrate=e}get decryptdata(){const{levelkeys:e}=this;if(!e&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const t=this.levelkeys.identity;if(t)this._decryptdata=t.getDecryptData(this.sn);else{const n=Object.keys(this.levelkeys);if(n.length===1)return this._decryptdata=this.levelkeys[n[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null)return null;const e=x(this.duration)?this.duration:0;return this.programDateTime+e*1e3}get encrypted(){var e;if((e=this._decryptdata)!=null&&e.encrypted)return!0;if(this.levelkeys){const t=Object.keys(this.levelkeys),n=t.length;if(n>1||n===1&&this.levelkeys[t[0]].encrypted)return!0}return!1}get programDateTime(){return this._programDateTime===null&&this.rawProgramDateTime&&(this.programDateTime=Date.parse(this.rawProgramDateTime)),this._programDateTime}set programDateTime(e){if(!x(e)){this._programDateTime=this.rawProgramDateTime=null;return}this._programDateTime=e}get ref(){return se(this)?(this._ref||(this._ref={base:this.base,start:this.start,duration:this.duration,sn:this.sn,programDateTime:this.programDateTime}),this._ref):null}addStart(e){this.setStart(this.start+e)}setStart(e){this.start=e,this._ref&&(this._ref.start=e)}setDuration(e){this.duration=e,this._ref&&(this._ref.duration=e)}setKeyFormat(e){if(this.levelkeys){const t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}}abortRequests(){var e,t;(e=this.loader)==null||e.abort(),(t=this.keyLoader)==null||t.abort()}setElementaryStreamInfo(e,t,n,r,i,s=!1){const{elementaryStreams:l}=this,c=l[e];if(!c){l[e]={startPTS:t,endPTS:n,startDTS:r,endDTS:i,partial:s};return}c.startPTS=Math.min(c.startPTS,t),c.endPTS=Math.max(c.endPTS,n),c.startDTS=Math.min(c.startDTS,r),c.endDTS=Math.max(c.endDTS,i)}}class He extends U{constructor(e,t,n,r,i){super(n),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=r;const s=e.enumeratedString("BYTERANGE");s&&this.setByteRange(s,i),i&&(this.fragOffset=i.fragOffset+i.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}function qe(a,e){const t=Object.getPrototypeOf(a);if(t){const n=Object.getOwnPropertyDescriptor(t,e);return n||qe(t,e)}}function ot(a,e){const t=qe(a,e);t&&(t.enumerable=!0,Object.defineProperty(a,e,t))}const Ot=Math.pow(2,32)-1,bt=[].push,xe={video:1,audio:2,id3:3,text:4};function _t(a){return String.fromCharCode.apply(null,a)}function Qt(a,e){const t=a[e]<<8|a[e+1];return t<0?65536+t:t}function Lt(a,e){const t=tt(a,e);return t<0?4294967296+t:t}function qt(a,e){let t=Lt(a,e);return t*=Math.pow(2,32),t+=Lt(a,e+4),t}function tt(a,e){return a[e]<<24|a[e+1]<<16|a[e+2]<<8|a[e+3]}function Re(a,e,t){a[e]=t>>24,a[e+1]=t>>16&255,a[e+2]=t>>8&255,a[e+3]=t&255}function ye(a){const e=a.byteLength;for(let t=0;t<e;){const n=Lt(a,t);if(n>8&&a[t+4]===109&&a[t+5]===111&&a[t+6]===111&&a[t+7]===102)return!0;t=n>1?t+n:e}return!1}function Z(a,e){const t=[];if(!e.length)return t;const n=a.byteLength;for(let r=0;r<n;){const i=Lt(a,r),s=_t(a.subarray(r+4,r+8)),l=i>1?r+i:n;if(s===e[0])if(e.length===1)t.push(a.subarray(r+8,l));else{const c=Z(a.subarray(r+8,l),e.slice(1));c.length&&bt.apply(t,c)}r=l}return t}function we(a){const e=[],t=a[0];let n=8;const r=Lt(a,n);n+=4;let i=0,s=0;t===0?(i=Lt(a,n),s=Lt(a,n+4),n+=8):(i=qt(a,n),s=qt(a,n+8),n+=16),n+=2;let l=a.length+s;const c=Qt(a,n);n+=2;for(let u=0;u<c;u++){let d=n;const p=Lt(a,d);d+=4;const b=p&2147483647;if((p&2147483648)>>>31===1)return G.warn("SIDX has hierarchical references (not supported)"),null;const D=Lt(a,d);d+=4,e.push({referenceSize:b,subsegmentDuration:D,info:{duration:D/r,start:l,end:l+b-1}}),l+=b,d+=4,n=d}return{earliestPresentationTime:i,timescale:r,version:t,referencesCount:c,references:e}}function Le(a){const e=[],t=Z(a,["moov","trak"]);for(let r=0;r<t.length;r++){const i=t[r],s=Z(i,["tkhd"])[0];if(s){let l=s[0];const c=Lt(s,l===0?12:20),u=Z(i,["mdia","mdhd"])[0];if(u){l=u[0];const d=Lt(u,l===0?12:20),p=Z(i,["mdia","hdlr"])[0];if(p){const b=_t(p.subarray(8,12)),w={soun:m.AUDIO,vide:m.VIDEO}[b],D=Z(i,["mdia","minf","stbl","stsd"])[0],X=$(D);w?(e[c]={timescale:d,type:w,stsd:X},e[w]=_({timescale:d,id:c},X)):e[c]={timescale:d,type:b,stsd:X}}}}}return Z(a,["moov","mvex","trex"]).forEach(r=>{const i=Lt(r,4),s=e[i];s&&(s.default={duration:Lt(r,12),flags:Lt(r,20)})}),e}function $(a){const e=a.subarray(8),t=e.subarray(86),n=_t(e.subarray(4,8));let r=n,i;const s=n==="enca"||n==="encv";if(s){const u=Z(e,[n])[0].subarray(n==="enca"?28:78);Z(u,["sinf"]).forEach(p=>{const b=Z(p,["schm"])[0];if(b){const w=_t(b.subarray(4,8));if(w==="cbcs"||w==="cenc"){const D=Z(p,["frma"])[0];D&&(r=_t(D))}}})}const l=r;switch(r){case"avc1":case"avc2":case"avc3":case"avc4":{const c=Z(t,["avcC"])[0];c&&c.length>3&&(r+="."+ne(c[1])+ne(c[2])+ne(c[3]),i=P(l==="avc1"?"dva1":"dvav",t));break}case"mp4a":{const c=Z(e,[n])[0],u=Z(c.subarray(28),["esds"])[0];if(u&&u.length>7){let d=4;if(u[d++]!==3)break;d=K(u,d),d+=2;const p=u[d++];if(p&128&&(d+=2),p&64&&(d+=u[d++]),u[d++]!==4)break;d=K(u,d);const b=u[d++];if(b===64)r+="."+ne(b);else break;if(d+=12,u[d++]!==5)break;d=K(u,d);const w=u[d++];let D=(w&248)>>3;D===31&&(D+=1+((w&7)<<3)+((u[d]&224)>>5)),r+="."+D}break}case"hvc1":case"hev1":{const c=Z(t,["hvcC"])[0];if(c&&c.length>12){const u=c[1],d=["","A","B","C"][u>>6],p=u&31,b=Lt(c,2),w=(u&32)>>5?"H":"L",D=c[12],X=c.subarray(6,12);r+="."+d+p,r+="."+b.toString(16).toUpperCase(),r+="."+w+D;let Y="";for(let _e=X.length;_e--;){const Me=X[_e];(Me||Y)&&(Y="."+Me.toString(16).toUpperCase()+Y)}r+=Y}i=P(l=="hev1"?"dvhe":"dvh1",t);break}case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":{r=P(r,t)||r;break}case"vp09":{const c=Z(t,["vpcC"])[0];if(c&&c.length>6){const u=c[4],d=c[5],p=c[6]>>4&15;r+="."+M(u)+"."+M(d)+"."+M(p)}break}case"av01":{const c=Z(t,["av1C"])[0];if(c&&c.length>2){const u=c[1]>>>5,d=c[1]&31,p=c[2]>>>7?"H":"M",b=(c[2]&64)>>6,w=(c[2]&32)>>5,D=u===2&&b?w?12:10:b?10:8,X=(c[2]&16)>>4,Y=(c[2]&8)>>3,_e=(c[2]&4)>>2,Me=c[2]&3;r+="."+u+"."+M(d)+p+"."+M(D)+"."+X+"."+Y+_e+Me+"."+M(1)+"."+M(1)+"."+M(1)+"."+0,i=P("dav1",t)}break}}return{codec:r,encrypted:s,supplemental:i}}function P(a,e){const t=Z(e,["dvvC"]),n=t.length?t[0]:Z(e,["dvcC"])[0];if(n){const r=n[2]>>1&127,i=n[2]<<5&32|n[3]>>3&31;return a+"."+M(r)+"."+M(i)}}function K(a,e){const t=e+5;for(;a[e++]&128&&e<t;);return e}function ne(a){return("0"+a.toString(16).toUpperCase()).slice(-2)}function M(a){return(a<10?"0":"")+a}function B(a,e){if(!a||!e)return a;const t=e.keyId;return t&&e.isCommonEncryption&&Z(a,["moov","trak"]).forEach(r=>{const s=Z(r,["mdia","minf","stbl","stsd"])[0].subarray(8);let l=Z(s,["enca"]);const c=l.length>0;c||(l=Z(s,["encv"])),l.forEach(u=>{const d=c?u.subarray(28):u.subarray(78);Z(d,["sinf"]).forEach(b=>{const w=j(b);if(w){const D=w.subarray(8,24);D.some(X=>X!==0)||(G.log(`[eme] Patching keyId in 'enc${c?"a":"v"}>sinf>>tenc' box: ${W.hexDump(D)} -> ${W.hexDump(t)}`),w.set(t,8))}})})}),a}function j(a){const e=Z(a,["schm"])[0];if(e){const t=_t(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return Z(a,["schi","tenc"])[0]}return null}function me(a,e){return Z(e,["moof","traf"]).reduce((t,n)=>{const r=Z(n,["tfdt"])[0],i=r[0],s=Z(n,["tfhd"]).reduce((l,c)=>{const u=Lt(c,4),d=a[u];if(d){let p=Lt(r,4);if(i===1){if(p===Ot)return G.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),l;p*=Ot+1,p+=Lt(r,8)}const b=d.timescale||9e4,w=p/b;if(x(w)&&(l===null||w<l))return w}return l},null);return s!==null&&x(s)&&(t===null||s<t)?s:t},null)}function de(a,e){let t=0,n=0,r=0;const i=Z(a,["moof","traf"]);for(let s=0;s<i.length;s++){const l=i[s],c=Z(l,["tfhd"])[0],u=Lt(c,4),d=e[u];if(!d)continue;const p=d.default,b=Lt(c,0)|(p==null?void 0:p.flags);let w=p==null?void 0:p.duration;b&8&&(b&2?w=Lt(c,12):w=Lt(c,8));const D=d.timescale||9e4,X=Z(l,["trun"]);for(let Y=0;Y<X.length;Y++){if(t=Ae(X[Y]),!t&&w){const _e=Lt(X[Y],4);t=w*_e}d.type===m.VIDEO?n+=t/D:d.type===m.AUDIO&&(r+=t/D)}}if(n===0&&r===0){let s=1/0,l=0,c=0;const u=Z(a,["sidx"]);for(let d=0;d<u.length;d++){const p=we(u[d]);if(p!=null&&p.references){s=Math.min(s,p.earliestPresentationTime/p.timescale);const b=p.references.reduce((w,D)=>w+D.info.duration||0,0);l=Math.max(l,b+p.earliestPresentationTime/p.timescale),c=l-s}}if(c&&x(c))return c}return n||r}function Ae(a){const e=Lt(a,0);let t=8;e&1&&(t+=4),e&4&&(t+=4);let n=0;const r=Lt(a,4);for(let i=0;i<r;i++){if(e&256){const s=Lt(a,t);n+=s,t+=4}e&512&&(t+=4),e&1024&&(t+=4),e&2048&&(t+=4)}return n}function Ee(a,e,t){Z(e,["moof","traf"]).forEach(n=>{Z(n,["tfhd"]).forEach(r=>{const i=Lt(r,4),s=a[i];if(!s)return;const l=s.timescale||9e4;Z(n,["tfdt"]).forEach(c=>{const u=c[0],d=t*l;if(d){let p=Lt(c,4);if(u===0)p-=d,p=Math.max(p,0),Re(c,4,p);else{p*=Math.pow(2,32),p+=Lt(c,8),p-=d,p=Math.max(p,0);const b=Math.floor(p/(Ot+1)),w=Math.floor(p%(Ot+1));Re(c,4,b),Re(c,8,w)}}})})})}function Ce(a){const e={valid:null,remainder:null},t=Z(a,["moof"]);if(t.length<2)return e.remainder=a,e;const n=t[t.length-1];return e.valid=a.slice(0,n.byteOffset-8),e.remainder=a.slice(n.byteOffset-8),e}function Fe(a,e){const t=new Uint8Array(a.length+e.length);return t.set(a),t.set(e,a.length),t}function Be(a,e){const t=[],n=e.samples,r=e.timescale,i=e.id;let s=!1;return Z(n,["moof"]).map(c=>{const u=c.byteOffset-8;Z(c,["traf"]).map(p=>{const b=Z(p,["tfdt"]).map(w=>{const D=w[0];let X=Lt(w,4);return D===1&&(X*=Math.pow(2,32),X+=Lt(w,8)),X/r})[0];return b!==void 0&&(a=b),Z(p,["tfhd"]).map(w=>{const D=Lt(w,4),X=Lt(w,0)&16777215,Y=(X&1)!==0,_e=(X&2)!==0,Me=(X&8)!==0;let Ie=0;const st=(X&16)!==0;let ut=0;const Mt=(X&32)!==0;let ct=8;D===i&&(Y&&(ct+=8),_e&&(ct+=4),Me&&(Ie=Lt(w,ct),ct+=4),st&&(ut=Lt(w,ct),ct+=4),Mt&&(ct+=4),e.type==="video"&&(s=Ye(e.codec)),Z(p,["trun"]).map(At=>{const Ht=At[0],mt=Lt(At,0)&16777215,En=(mt&1)!==0;let Mn=0;const Lr=(mt&4)!==0,vr=(mt&256)!==0;let cr=0;const qn=(mt&512)!==0;let fr=0;const ur=(mt&1024)!==0,bn=(mt&2048)!==0;let Dn=0;const Ar=Lt(At,4);let br=8;En&&(Mn=Lt(At,br),br+=4),Lr&&(br+=4);let Ir=Mn+u;for(let Nr=0;Nr<Ar;Nr++){if(vr?(cr=Lt(At,br),br+=4):cr=Ie,qn?(fr=Lt(At,br),br+=4):fr=ut,ur&&(br+=4),bn&&(Ht===0?Dn=Lt(At,br):Dn=tt(At,br),br+=4),e.type===m.VIDEO){let Ur=0;for(;Ur<fr;){const jr=Lt(n,Ir);if(Ir+=4,xt(s,n[Ir])){const gi=n.subarray(Ir,Ir+jr);lt(gi,s?2:1,a+Dn/r,t)}Ir+=jr,Ur+=jr+4}}a+=cr/r}}))})})}),t}function Ye(a){if(!a)return!1;const e=a.substring(0,4);return e==="hvc1"||e==="hev1"||e==="dvh1"||e==="dvhe"}function xt(a,e){if(a){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function lt(a,e,t,n){const r=nt(a);let i=0;i+=e;let s=0,l=0,c=0;for(;i<r.length;){s=0;do{if(i>=r.length)break;c=r[i++],s+=c}while(c===255);l=0;do{if(i>=r.length)break;c=r[i++],l+=c}while(c===255);const u=r.length-i;let d=i;if(l<u)i+=l;else if(l>u){G.error(`Malformed SEI payload. ${l} is too small, only ${u} bytes left to parse.`);break}if(s===4){if(r[d++]===181){const b=Qt(r,d);if(d+=2,b===49){const w=Lt(r,d);if(d+=4,w===1195456820){const D=r[d++];if(D===3){const X=r[d++],Y=31&X,_e=64&X,Me=_e?2+Y*3:0,Ie=new Uint8Array(Me);if(_e){Ie[0]=X;for(let st=1;st<Me;st++)Ie[st]=r[d++]}n.push({type:D,payloadType:s,pts:t,bytes:Ie})}}}}}else if(s===5&&l>16){const p=[];for(let D=0;D<16;D++){const X=r[d++].toString(16);p.push(X.length==1?"0"+X:X),(D===3||D===5||D===7||D===9)&&p.push("-")}const b=l-16,w=new Uint8Array(b);for(let D=0;D<b;D++)w[D]=r[d++];n.push({payloadType:s,pts:t,uuid:p.join(""),userData:Te(w),userDataBytes:w})}}}function nt(a){const e=a.byteLength,t=[];let n=1;for(;n<e-2;)a[n]===0&&a[n+1]===0&&a[n+2]===3?(t.push(n+2),n+=2):n++;if(t.length===0)return a;const r=e-t.length,i=new Uint8Array(r);let s=0;for(n=0;n<r;s++,n++)s===t[0]&&(s++,t.shift()),i[n]=a[s];return i}function Ut(a){const e=a[0];let t="",n="",r=0,i=0,s=0,l=0,c=0,u=0;if(e===0){for(;_t(a.subarray(u,u+1))!=="\0";)t+=_t(a.subarray(u,u+1)),u+=1;for(t+=_t(a.subarray(u,u+1)),u+=1;_t(a.subarray(u,u+1))!=="\0";)n+=_t(a.subarray(u,u+1)),u+=1;n+=_t(a.subarray(u,u+1)),u+=1,r=Lt(a,12),i=Lt(a,16),l=Lt(a,20),c=Lt(a,24),u=28}else if(e===1){u+=4,r=Lt(a,u),u+=4;const p=Lt(a,u);u+=4;const b=Lt(a,u);for(u+=4,s=hl(2,32)*p+b,ae(s)||(s=Number.MAX_SAFE_INTEGER,G.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),l=Lt(a,u),u+=4,c=Lt(a,u),u+=4;_t(a.subarray(u,u+1))!=="\0";)t+=_t(a.subarray(u,u+1)),u+=1;for(t+=_t(a.subarray(u,u+1)),u+=1;_t(a.subarray(u,u+1))!=="\0";)n+=_t(a.subarray(u,u+1)),u+=1;n+=_t(a.subarray(u,u+1)),u+=1}const d=a.subarray(u,a.byteLength);return{schemeIdUri:t,value:n,timeScale:r,presentationTime:s,presentationTimeDelta:i,eventDuration:l,id:c,payload:d}}function Vt(a,...e){const t=e.length;let n=8,r=t;for(;r--;)n+=e[r].byteLength;const i=new Uint8Array(n);for(i[0]=n>>24&255,i[1]=n>>16&255,i[2]=n>>8&255,i[3]=n&255,i.set(a,4),r=0,n=8;r<t;r++)i.set(e[r],n),n+=e[r].byteLength;return i}function Ct(a,e,t){if(a.byteLength!==16)throw new RangeError("Invalid system id");let n,r;n=0,r=new Uint8Array;let i;n>0?(i=new Uint8Array(4),e.length>0&&new DataView(i.buffer).setUint32(0,e.length,!1)):i=new Uint8Array;const s=new Uint8Array(4);return t&&t.byteLength>0&&new DataView(s.buffer).setUint32(0,t.byteLength,!1),Vt([112,115,115,104],new Uint8Array([n,0,0,0]),a,i,r,s,t||new Uint8Array)}function Jt(a){const e=[];if(a instanceof ArrayBuffer){const t=a.byteLength;let n=0;for(;n+32<t;){const r=new DataView(a,n),i=wn(r);e.push(i),n+=i.size}}return e}function wn(a){const e=a.getUint32(0),t=a.byteOffset,n=a.byteLength;if(n<e)return{offset:t,size:n};if(a.getUint32(4)!==1886614376)return{offset:t,size:e};const i=a.getUint32(8)>>>24;if(i!==0&&i!==1)return{offset:t,size:e};const s=a.buffer,l=W.hexDump(new Uint8Array(s,t+12,16)),c=a.getUint32(28);let u=null,d=null;if(i===0){if(e-32<c||c<22)return{offset:t,size:e};d=new Uint8Array(s,t+32,c)}else if(i===1){if(!c||n<t+32+c*16+16)return{offset:t,size:e};u=[];for(let p=0;p<c;p++)u.push(new Uint8Array(s,t+32+p*16,16))}return{version:i,systemId:l,kids:u,data:d,offset:t,size:e}}const Rt=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),Yt={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,dav1:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function Ne(a,e){const t=Yt[e];return!!t&&!!t[a.slice(0,4)]}function ke(a,e,t=!0){return!a.split(",").some(n=>!Pe(n,e,t))}function Pe(a,e,t=!0){var n;const r=I(t);return(n=r==null?void 0:r.isTypeSupported(z(a,e)))!=null?n:!1}function z(a,e){return`${e}/mp4;codecs=${a}`}function oe(a){if(a){const e=a.substring(0,4);return Yt.video[e]}return 2}function he(a){const e=Rt();return a.split(",").reduce((t,n)=>{const i=e&&Ye(n)?9:Yt.video[n];return i?(i*2+t)/(t?3:2):(Yt.audio[n]+t)/(t?2:1)},0)}const ce={};function be(a,e=!0){if(ce[a])return ce[a];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"],"mp4a.40.34":["mp3"]}[a];for(let r=0;r<t.length;r++){var n;if(Pe(t[r],"audio",e))return ce[a]=t[r],t[r];if(t[r]==="mp3"&&(n=I(e))!=null&&n.isTypeSupported("audio/mpeg"))return""}return a}const ze=/flac|opus|mp4a\.40\.34/i;function Ze(a,e=!0){return a.replace(ze,t=>be(t.toLowerCase(),e))}function $e(a,e){const t=[];if(a){const n=a.split(",");for(let r=0;r<n.length;r++)Ne(n[r],"video")||t.push(n[r])}return e&&t.push(e),t.join(",")}function ft(a,e){if(a&&(a.length>4||["ac-3","ec-3","alac","fLaC","Opus"].indexOf(a)!==-1))return a;if(e){const t=e.split(",");if(t.length>1){if(a){for(let n=t.length;n--;)if(t[n].substring(0,4)===a.substring(0,4))return t[n]}return t[0]}}return e||a}function en(a){const e=a.split(",");for(let t=0;t<e.length;t++){const n=e[t].split(".");if(n.length>2){let r=n.shift()+".";r+=parseInt(n.shift()).toString(16),r+=("000"+parseInt(n.shift()).toString(16)).slice(-4),e[t]=r}}return e.join(",")}function an(a){if(a.startsWith("av01.")){const e=a.split("."),t=["0","111","01","01","01","0"];for(let n=e.length;n>4&&n<10;n++)e[n]=t[n-4];return e.join(".")}return a}function yt(a){const e=I(a)||{isTypeSupported:()=>!1};return{mpeg:e.isTypeSupported("audio/mpeg"),mp3:e.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:e.isTypeSupported('audio/mp4; codecs="ac-3"')}}function Gt(a){return a.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const _n={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]};function Bn(a,e){return{supported:!1,configurations:e,decodingInfoResults:[{supported:!1,smooth:!1,powerEfficient:!1}],error:a}}const cn={};function pn(a,e,t,n,r,i){const s=a.audioCodec?a.audioGroups:null,l=i==null?void 0:i.audioCodec,c=i==null?void 0:i.channels,u=c?parseInt(c):l?1/0:2;let d=null;if(s!=null&&s.length)try{s.length===1&&s[0]?d=e.groups[s[0]].channels:d=s.reduce((p,b)=>{if(b){const w=e.groups[b];if(!w)throw new Error(`Audio track group ${b} not found`);Object.keys(w.channels).forEach(D=>{p[D]=(p[D]||0)+w.channels[D]})}return p},{2:0})}catch(p){return!0}return a.videoCodec!==void 0&&(a.width>1920&&a.height>1088||a.height>1920&&a.width>1088||a.frameRate>Math.max(n,30)||a.videoRange!=="SDR"&&a.videoRange!==t||a.bitrate>Math.max(r,8e6))||!!d&&x(u)&&Object.keys(d).some(p=>parseInt(p)>u)}function Tn(a,e,t){const n=a.videoCodec,r=a.audioCodec;if(!n&&!r||!t)return Promise.resolve(_n);const i=[];if(n){const s={width:a.width,height:a.height,bitrate:Math.ceil(Math.max(a.bitrate*.9,a.averageBitrate)),framerate:a.frameRate||30},l=a.videoRange;l!=="SDR"&&(s.transferFunction=l.toLowerCase());const c=n.split(","),u=navigator.userAgent;if(c.some(d=>Ye(d))&&Rt())return Promise.resolve(Bn(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent sting: (${u})`),i));i.push.apply(i,c.map(d=>({type:"media-source",video:_(_({},s),{},{contentType:z(an(d),"video")})})))}return r&&a.audioGroups&&a.audioGroups.forEach(s=>{var l;s&&((l=e.groups[s])==null||l.tracks.forEach(c=>{if(c.groupId===s){const u=c.channels||"",d=parseFloat(u);x(d)&&d>2&&i.push.apply(i,r.split(",").map(p=>({type:"media-source",audio:{contentType:z(p,"audio"),channels:""+d}})))}}))}),Promise.all(i.map(s=>{const l=mn(s);return cn[l]||(cn[l]=t.decodingInfo(s))})).then(s=>({supported:!s.some(l=>!l.supported),configurations:i,decodingInfoResults:s})).catch(s=>({supported:!1,configurations:i,decodingInfoResults:[],error:s}))}function mn(a){const{audio:e,video:t}=a,n=t||e;if(n){const r=Gt(n.contentType);if(t)return`r${t.height}x${t.width}f${Math.ceil(t.framerate)}${t.transferFunction||"sd"}_${r}_${Math.ceil(t.bitrate/1e5)}`;if(e)return`c${e.channels}${e.spatialRendering?"s":"n"}_${r}`}return""}const An=["NONE","TYPE-0","TYPE-1",null];function Ft(a){return An.indexOf(a)>-1}const Wn=["SDR","PQ","HLG"];function Ue(a){return!!a&&Wn.indexOf(a)>-1}var Oe={No:"",Yes:"YES",v2:"v2"};function Bt(a){const{canSkipUntil:e,canSkipDateRanges:t,age:n}=a,r=n<e/2;return e&&r?t?Oe.v2:Oe.Yes:Oe.No}class kt{constructor(e,t,n){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=n}addDirectives(e){const t=new self.URL(e);return this.msn!==void 0&&t.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}class St{constructor(e){if(this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.supplemental=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter(n=>!!n).map(n=>n.substring(0,4)).join(","),"supplemental"in e){var t;this.supplemental=e.supplemental;const n=(t=e.supplemental)==null?void 0:t.videoCodec;n&&n!==e.videoCodec&&(this.codecSet+=`,${n.substring(0,4)}`)}this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return fn(this._audioGroups,e)}hasSubtitleGroup(e){return fn(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,t){if(t){if(e==="audio"){let n=this._audioGroups;n||(n=this._audioGroups=[]),n.indexOf(t)===-1&&n.push(t)}else if(e==="text"){let n=this._subtitleGroups;n||(n=this._subtitleGroups=[]),n.indexOf(t)===-1&&n.push(t)}}}get urlId(){return 0}set urlId(e){}get audioGroupIds(){return this.audioGroups?[this.audioGroupId]:void 0}get textGroupIds(){return this.subtitleGroups?[this.textGroupId]:void 0}get audioGroupId(){var e;return(e=this.audioGroups)==null?void 0:e[0]}get textGroupId(){var e;return(e=this.subtitleGroups)==null?void 0:e[0]}addFallback(){}}function fn(a,e){return!e||!a?!1:a.indexOf(e)!==-1}function Ve(){if(typeof matchMedia=="function"){const a=matchMedia("(dynamic-range: high)"),e=matchMedia("bad query");if(a.media!==e.media)return a.matches===!0}return!1}function Qe(a,e){let t=!1,n=[];if(a&&(t=a!=="SDR",n=[a]),e){n=e.allowedVideoRanges||Wn.slice(0);const r=n.join("")!=="SDR"&&!e.videoCodec;t=e.preferHDR!==void 0?e.preferHDR:r&&Ve(),t||(n=["SDR"])}return{preferHDR:t,allowedVideoRanges:n}}const Tt=a=>{const e=new WeakSet;return(t,n)=>{if(a&&(n=a(t,n)),typeof n=="object"&&n!==null){if(e.has(n))return;e.add(n)}return n}},Et=(a,e)=>JSON.stringify(a,Tt(e));function Xt(a,e,t,n,r){const i=Object.keys(a),s=n==null?void 0:n.channels,l=n==null?void 0:n.audioCodec,c=r==null?void 0:r.videoCodec,u=s&&parseInt(s)===2;let d=!1,p=!1,b=1/0,w=1/0,D=1/0,X=1/0,Y=0,_e=[];const{preferHDR:Me,allowedVideoRanges:Ie}=Qe(e,r);for(let At=i.length;At--;){const Ht=a[i[At]];d||(d=Ht.channels[2]>0),b=Math.min(b,Ht.minHeight),w=Math.min(w,Ht.minFramerate),D=Math.min(D,Ht.minBitrate),Ie.filter(En=>Ht.videoRanges[En]>0).length>0&&(p=!0)}b=x(b)?b:0,w=x(w)?w:0;const st=Math.max(1080,b),ut=Math.max(30,w);D=x(D)?D:t,t=Math.max(D,t),p||(e=void 0);const Mt=i.length>1;return{codecSet:i.reduce((At,Ht)=>{const mt=a[Ht];if(Ht===At)return At;if(_e=p?Ie.filter(En=>mt.videoRanges[En]>0):[],Mt){if(mt.minBitrate>t)return ln(Ht,`min bitrate of ${mt.minBitrate} > current estimate of ${t}`),At;if(!mt.hasDefaultAudio)return ln(Ht,"no renditions with default or auto-select sound found"),At;if(l&&Ht.indexOf(l.substring(0,4))%5!==0)return ln(Ht,`audio codec preference "${l}" not found`),At;if(s&&!u){if(!mt.channels[s])return ln(Ht,`no renditions with ${s} channel sound found (channels options: ${Object.keys(mt.channels)})`),At}else if((!l||u)&&d&&mt.channels[2]===0)return ln(Ht,"no renditions with stereo sound found"),At;if(mt.minHeight>st)return ln(Ht,`min resolution of ${mt.minHeight} > maximum of ${st}`),At;if(mt.minFramerate>ut)return ln(Ht,`min framerate of ${mt.minFramerate} > maximum of ${ut}`),At;if(!_e.some(En=>mt.videoRanges[En]>0))return ln(Ht,`no variants with VIDEO-RANGE of ${Et(_e)} found`),At;if(c&&Ht.indexOf(c.substring(0,4))%5!==0)return ln(Ht,`video codec preference "${c}" not found`),At;if(mt.maxScore<Y)return ln(Ht,`max score of ${mt.maxScore} < selected max of ${Y}`),At}return At&&(he(Ht)>=he(At)||mt.fragmentError>a[At].fragmentError)?At:(X=mt.minIndex,Y=mt.maxScore,Ht)},void 0),videoRanges:_e,preferHDR:Me,minFramerate:w,minBitrate:D,minIndex:X}}function ln(a,e){G.log(`[abr] start candidates with "${a}" ignored because ${e}`)}function nn(a){return a.reduce((e,t)=>{let n=e.groups[t.groupId];n||(n=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),n.tracks.push(t);const r=t.channels||"2";return n.channels[r]=(n.channels[r]||0)+1,n.hasDefault=n.hasDefault||t.default,n.hasAutoSelect=n.hasAutoSelect||t.autoselect,n.hasDefault&&(e.hasDefaultAudio=!0),n.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function zt(a,e,t,n){return a.slice(t,n+1).reduce((r,i,s)=>{if(!i.codecSet)return r;const l=i.audioGroups;let c=r[i.codecSet];c||(r[i.codecSet]=c={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,minIndex:s,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!l,fragmentError:0}),c.minBitrate=Math.min(c.minBitrate,i.bitrate);const u=Math.min(i.height,i.width);return c.minHeight=Math.min(c.minHeight,u),c.minFramerate=Math.min(c.minFramerate,i.frameRate),c.minIndex=Math.min(c.minIndex,s),c.maxScore=Math.max(c.maxScore,i.score),c.fragmentError+=i.fragmentError,c.videoRanges[i.videoRange]=(c.videoRanges[i.videoRange]||0)+1,l&&l.forEach(d=>{if(!d)return;const p=e.groups[d];p&&(c.hasDefaultAudio=c.hasDefaultAudio||e.hasDefaultAudio?p.hasDefault:p.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(p.channels).forEach(b=>{c.channels[b]=(c.channels[b]||0)+p.channels[b]}))}),r},{})}function De(a){if(!a)return a;const{lang:e,assocLang:t,characteristics:n,channels:r,audioCodec:i}=a;return{lang:e,assocLang:t,characteristics:n,channels:r,audioCodec:i}}function Se(a,e,t){if("attrs"in a){const n=e.indexOf(a);if(n!==-1)return n}for(let n=0;n<e.length;n++){const r=e[n];if(et(a,r,t))return n}return-1}function et(a,e,t){const{groupId:n,name:r,lang:i,assocLang:s,default:l}=a,c=a.forced;return(n===void 0||e.groupId===n)&&(r===void 0||e.name===r)&&(i===void 0||rt(i,e.lang))&&(i===void 0||e.assocLang===s)&&(l===void 0||e.default===l)&&(c===void 0||e.forced===c)&&(!("characteristics"in a)||It(a.characteristics||"",e.characteristics))&&(t===void 0||t(a,e))}function rt(a,e="--"){return a.length===e.length?a===e:a.startsWith(e)||e.startsWith(a)}function It(a,e=""){const t=a.split(","),n=e.split(",");return t.length===n.length&&!t.some(r=>n.indexOf(r)===-1)}function Nt(a,e){const{audioCodec:t,channels:n}=a;return(t===void 0||(e.audioCodec||"").substring(0,4)===t.substring(0,4))&&(n===void 0||n===(e.channels||"2"))}function wt(a,e,t,n,r){const i=e[n],l=e.reduce((b,w,D)=>{const X=w.uri;return(b[X]||(b[X]=[])).push(D),b},{})[i.uri];l.length>1&&(n=Math.max.apply(Math,l));const c=i.videoRange,u=i.frameRate,d=i.codecSet.substring(0,4),p=Zt(e,n,b=>{if(b.videoRange!==c||b.frameRate!==u||b.codecSet.substring(0,4)!==d)return!1;const w=b.audioGroups,D=t.filter(X=>!w||w.indexOf(X.groupId)!==-1);return Se(a,D,r)>-1});return p>-1?p:Zt(e,n,b=>{const w=b.audioGroups,D=t.filter(X=>!w||w.indexOf(X.groupId)!==-1);return Se(a,D,r)>-1})}function Zt(a,e,t){for(let n=e;n>-1;n--)if(t(a[n]))return n;for(let n=e+1;n<a.length;n++)if(t(a[n]))return n;return-1}function $t(a,e){var t;return!!a&&a!==((t=e.loadLevelObj)==null?void 0:t.uri)}class jt extends N{constructor(e){super("abr",e.logger),this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.rebufferNotice=-1,this.bwEstimator=void 0,this._abandonRulesCheck=t=>{var n;const{fragCurrent:r,partCurrent:i,hls:s}=this,{autoLevelEnabled:l,media:c}=s;if(!r||!c)return;const u=performance.now(),d=i?i.stats:r.stats,p=i?i.duration:r.duration,b=u-d.loading.start,w=s.minAutoLevel,D=r.level,X=this._nextAutoLevel;if(d.aborted||d.loaded&&d.loaded===d.total||D<=w){this.clearTimer(),this._nextAutoLevel=-1;return}if(!l)return;const Y=X>-1&&X!==D,_e=!!t||Y;if(!_e&&(c.paused||!c.playbackRate||!c.readyState))return;const Me=s.mainForwardBufferInfo;if(!_e&&Me===null)return;const Ie=this.bwEstimator.getEstimateTTFB(),st=Math.abs(c.playbackRate);if(b<=Math.max(Ie,1e3*(p/(st*2))))return;const ut=Me?Me.len/st:0,Mt=d.loading.first?d.loading.first-d.loading.start:-1,ct=d.loaded&&Mt>-1,At=this.getBwEstimate(),Ht=s.levels,mt=Ht[D],En=Math.max(d.loaded,Math.round(p*(r.bitrate||mt.averageBitrate)/8));let Mn=ct?b-Mt:b;Mn<1&&ct&&(Mn=Math.min(b,d.loaded*8/At));const Lr=ct?d.loaded*1e3/Mn:0,vr=Ie/1e3,cr=Lr?(En-d.loaded)/Lr:En*8/At+vr;if(cr<=ut)return;const qn=Lr?Lr*8:At,fr=((n=(t==null?void 0:t.details)||this.hls.latestLevelDetails)==null?void 0:n.live)===!0,ur=this.hls.config.abrBandWidthUpFactor;let bn=Number.POSITIVE_INFINITY,Dn;for(Dn=D-1;Dn>w;Dn--){const Nr=Ht[Dn].maxBitrate,Ur=!Ht[Dn].details||fr;if(bn=this.getTimeToLoadFrag(vr,qn,p*Nr,Ur),bn<Math.min(ut,p+vr))break}if(bn>=cr||bn>p*10)return;ct?this.bwEstimator.sample(b-Math.min(Ie,Mt),d.loaded):this.bwEstimator.sampleTTFB(b);const Ar=Ht[Dn].maxBitrate;this.getBwEstimate()*ur>Ar&&this.resetEstimator(Ar);const br=this.findBestLevel(Ar,w,Dn,0,ut,1,1);br>-1&&(Dn=br),this.warn(`Fragment ${r.sn}${i?" part "+i.index:""} of level ${D} is loading too slowly;
|
|
Fragment duration: ${r.duration.toFixed(3)}
|
|
Time to underbuffer: ${ut.toFixed(3)} s
|
|
Estimated load time for current fragment: ${cr.toFixed(3)} s
|
|
Estimated load time for down switch fragment: ${bn.toFixed(3)} s
|
|
TTFB estimate: ${Mt|0} ms
|
|
Current BW estimate: ${x(At)?At|0:"Unknown"} bps
|
|
New BW estimate: ${this.getBwEstimate()|0} bps
|
|
Switching to level ${Dn} @ ${Ar|0} bps`),s.nextLoadLevel=s.nextAutoLevel=Dn,this.clearTimer();const Ir=()=>{if(this.clearTimer(),this.fragCurrent===r&&this.hls.loadLevel===Dn&&Dn>0){const Nr=this.getStarvationDelay();if(this.warn(`Aborting inflight request ${Dn>0?"and switching down":""}
|
|
Fragment duration: ${r.duration.toFixed(3)} s
|
|
Time to underbuffer: ${Nr.toFixed(3)} s`),r.abortRequests(),this.fragCurrent=this.partCurrent=null,Dn>w){let Ur=this.findBestLevel(this.hls.levels[w].bitrate,w,Dn,0,Nr,1,1);Ur===-1&&(Ur=w),this.hls.nextLoadLevel=this.hls.nextAutoLevel=Ur,this.resetEstimator(this.hls.levels[Ur].bitrate)}}};Y||cr>bn*2?Ir():this.timer=self.setInterval(Ir,bn*1e3),s.trigger(f.FRAG_LOAD_EMERGENCY_ABORTED,{frag:r,part:i,stats:d})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(this.log(`setting initial bwe to ${e}`),this.hls.config.abrEwmaDefaultEstimate=e),this.firstSelection=-1,this.bwEstimator=this.initEstimator()}initEstimator(){const e=this.hls.config;return new y(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.FRAG_LOADING,this.onFragLoading,this),e.on(f.FRAG_LOADED,this.onFragLoaded,this),e.on(f.FRAG_BUFFERED,this.onFragBuffered,this),e.on(f.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(f.LEVEL_LOADED,this.onLevelLoaded,this),e.on(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(f.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(f.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.FRAG_LOADING,this.onFragLoading,this),e.off(f.FRAG_LOADED,this.onFragLoaded,this),e.off(f.FRAG_BUFFERED,this.onFragBuffered,this),e.off(f.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(f.LEVEL_LOADED,this.onLevelLoaded,this),e.off(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(f.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(f.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()}onLevelsUpdated(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null}onMaxAutoLevelUpdated(){this.firstSelection=-1,this.nextAutoLevelKey=""}onFragLoading(e,t){const n=t.frag;if(!this.ignoreFragment(n)){if(!n.bitrateTest){var r;this.fragCurrent=n,this.partCurrent=(r=t.part)!=null?r:null}this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100)}}onLevelSwitching(e,t){this.clearTimer()}onError(e,t){if(!t.fatal)switch(t.details){case F.BUFFER_ADD_CODEC_ERROR:case F.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case F.FRAG_LOAD_TIMEOUT:{const n=t.frag,{fragCurrent:r,partCurrent:i}=this;if(n&&r&&n.sn===r.sn&&n.level===r.level){const s=performance.now(),l=i?i.stats:n.stats,c=s-l.loading.start,u=l.loading.first?l.loading.first-l.loading.start:-1;if(l.loaded&&u>-1){const p=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(c-Math.min(p,u),l.loaded)}else this.bwEstimator.sampleTTFB(c)}break}}}getTimeToLoadFrag(e,t,n,r){const i=e+n/t,s=r?e+this.lastLevelLoadSec:0;return i+s}onLevelLoaded(e,t){const n=this.hls.config,{loading:r}=t.stats,i=r.end-r.first;x(i)&&(this.lastLevelLoadSec=i/1e3),t.details.live?this.bwEstimator.update(n.abrEwmaSlowLive,n.abrEwmaFastLive):this.bwEstimator.update(n.abrEwmaSlowVoD,n.abrEwmaFastVoD),this.timer>-1&&this._abandonRulesCheck(t.levelInfo)}onFragLoaded(e,{frag:t,part:n}){const r=n?n.stats:t.stats;if(t.type===te.MAIN&&this.bwEstimator.sampleTTFB(r.loading.first-r.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),t.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){const i=n?n.duration:t.duration,s=this.hls.levels[t.level],l=(s.loaded?s.loaded.bytes:0)+r.loaded,c=(s.loaded?s.loaded.duration:0)+i;s.loaded={bytes:l,duration:c},s.realBitrate=Math.round(8*l/c)}if(t.bitrateTest){const i={stats:r,frag:t,part:n,id:t.type};this.onFragBuffered(f.FRAG_BUFFERED,i),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:n,part:r}=t,i=r!=null&&r.stats.loaded?r.stats:n.stats;if(i.aborted||this.ignoreFragment(n))return;const s=i.parsing.end-i.loading.start-Math.min(i.loading.first-i.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(s,i.loaded),i.bwEstimate=this.getBwEstimate(),n.bitrateTest?this.bitrateTestDelay=s/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==te.MAIN||e.sn==="initSegment"}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){const{maxAutoLevel:e,minAutoLevel:t}=this.hls,n=this.getBwEstimate(),r=this.hls.config.maxStarvationDelay,i=this.findBestLevel(n,t,e,0,r,1,1);if(i>-1)return i;const s=this.hls.firstLevel,l=Math.min(Math.max(s,t),e);return this.warn(`Could not find best starting auto level. Defaulting to first in playlist ${s} clamped to ${l}`),l}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const e=this.forcedAutoLevel,n=this.bwEstimator.canEstimate(),r=this.lastLoadedFragLevel>-1;if(e!==-1&&(!n||!r||this.nextAutoLevelKey===this.getAutoLevelKey()))return e;const i=n&&r?this.getNextABRAutoLevel():this.firstAutoLevel;if(e!==-1){const s=this.hls.levels;if(s.length>Math.max(e,i)&&s[e].loadError<=s[i].loadError)return e}return this._nextAutoLevel=i,this.nextAutoLevelKey=this.getAutoLevelKey(),i}getAutoLevelKey(){return`${this.getBwEstimate()}_${this.getStarvationDelay().toFixed(2)}`}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:t,hls:n}=this;if(n.levels.length<=1)return n.loadLevel;const{maxAutoLevel:r,config:i,minAutoLevel:s}=n,l=t?t.duration:e?e.duration:0,c=this.getBwEstimate(),u=this.getStarvationDelay();let d=i.abrBandWidthFactor,p=i.abrBandWidthUpFactor;if(u){const Y=this.findBestLevel(c,s,r,u,0,d,p);if(Y>=0)return this.rebufferNotice=-1,Y}let b=l?Math.min(l,i.maxStarvationDelay):i.maxStarvationDelay;if(!u){const Y=this.bitrateTestDelay;Y&&(b=(l?Math.min(l,i.maxLoadingDelay):i.maxLoadingDelay)-Y,this.info(`bitrate test took ${Math.round(1e3*Y)}ms, set first fragment max fetchDuration to ${Math.round(1e3*b)} ms`),d=p=1)}const w=this.findBestLevel(c,s,r,u,b,d,p);if(this.rebufferNotice!==w&&(this.rebufferNotice=w,this.info(`${u?"rebuffering expected":"buffer is empty"}, optimal quality level ${w}`)),w>-1)return w;const D=n.levels[s],X=n.loadLevelObj;return X&&(D==null?void 0:D.bitrate)<X.bitrate?s:n.loadLevel}getStarvationDelay(){const e=this.hls,t=e.media;if(!t)return 1/0;const n=t&&t.playbackRate!==0?Math.abs(t.playbackRate):1,r=e.mainForwardBufferInfo;return(r?r.len:0)/n}getBwEstimate(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}findBestLevel(e,t,n,r,i,s,l){var c;const u=r+i,d=this.lastLoadedFragLevel,p=d===-1?this.hls.firstLevel:d,{fragCurrent:b,partCurrent:w}=this,{levels:D,allAudioTracks:X,loadLevel:Y,config:_e}=this.hls;if(D.length===1)return 0;const Me=D[p],Ie=!!((c=this.hls.latestLevelDetails)!=null&&c.live),st=Y===-1||d===-1;let ut,Mt="SDR",ct=(Me==null?void 0:Me.frameRate)||0;const{audioPreference:At,videoPreference:Ht}=_e,mt=this.audioTracksByGroup||(this.audioTracksByGroup=nn(X));let En=-1;if(st){if(this.firstSelection!==-1)return this.firstSelection;const qn=this.codecTiers||(this.codecTiers=zt(D,mt,t,n)),fr=Xt(qn,Mt,e,At,Ht),{codecSet:ur,videoRanges:bn,minFramerate:Dn,minBitrate:Ar,minIndex:br,preferHDR:Ir}=fr;En=br,ut=ur,Mt=Ir?bn[bn.length-1]:bn[0],ct=Dn,e=Math.max(e,Ar),this.log(`picked start tier ${Et(fr)}`)}else ut=Me==null?void 0:Me.codecSet,Mt=Me==null?void 0:Me.videoRange;const Mn=w?w.duration:b?b.duration:0,Lr=this.bwEstimator.getEstimateTTFB()/1e3,vr=[];for(let qn=n;qn>=t;qn--){var cr;const fr=D[qn],ur=qn>p;if(!fr)continue;if(_e.useMediaCapabilities&&!fr.supportedResult&&!fr.supportedPromise){const Ur=navigator.mediaCapabilities;typeof(Ur==null?void 0:Ur.decodingInfo)=="function"&&(pn(fr,mt,Mt,ct,e,At)||Ye(fr.videoCodec))?(fr.supportedPromise=Tn(fr,mt,Ur),fr.supportedPromise.then(jr=>{if(!this.hls)return;fr.supportedResult=jr;const gi=this.hls.levels,xi=gi.indexOf(fr);jr.error?this.warn(`MediaCapabilities decodingInfo error: "${jr.error}" for level ${xi} ${Et(jr)}`):jr.supported||(this.warn(`Unsupported MediaCapabilities decodingInfo result for level ${xi} ${Et(jr)}`),xi>-1&&gi.length>1&&(this.log(`Removing unsupported level ${xi}`),this.hls.removeLevel(xi),this.hls.loadLevel===-1&&(this.hls.nextLoadLevel=0)))})):fr.supportedResult=_n}if((ut&&fr.codecSet!==ut||Mt&&fr.videoRange!==Mt||ur&&ct>fr.frameRate||!ur&&ct>0&&ct<fr.frameRate||fr.supportedResult&&!((cr=fr.supportedResult.decodingInfoResults)!=null&&cr[0].smooth))&&(!st||qn!==En)){vr.push(qn);continue}const bn=fr.details,Dn=(w?bn==null?void 0:bn.partTarget:bn==null?void 0:bn.averagetargetduration)||Mn;let Ar;ur?Ar=l*e:Ar=s*e;const br=Mn&&r>=Mn*2&&i===0?fr.averageBitrate:fr.maxBitrate,Ir=this.getTimeToLoadFrag(Lr,Ar,br*Dn,bn===void 0);if(Ar>=br&&(qn===d||fr.loadError===0&&fr.fragmentError===0)&&(Ir<=Lr||!x(Ir)||Ie&&!this.bitrateTestDelay||Ir<u)){const Ur=this.forcedAutoLevel;return qn!==Y&&(Ur===-1||Ur!==Y)&&(vr.length&&this.trace(`Skipped level(s) ${vr.join(",")} of ${n} max with CODECS and VIDEO-RANGE:"${D[vr[0]].codecs}" ${D[vr[0]].videoRange}; not compatible with "${ut}" ${Mt}`),this.info(`switch candidate:${p}->${qn} adjustedbw(${Math.round(Ar)})-bitrate=${Math.round(Ar-br)} ttfb:${Lr.toFixed(1)} avgDuration:${Dn.toFixed(1)} maxFetchDuration:${u.toFixed(1)} fetchDuration:${Ir.toFixed(1)} firstSelection:${st} codecSet:${fr.codecSet} videoRange:${fr.videoRange} hls.loadLevel:${Y}`)),st&&(this.firstSelection=qn),qn}}return-1}set nextAutoLevel(e){const t=this.deriveNextAutoLevel(e);this._nextAutoLevel!==t&&(this.nextAutoLevelKey="",this._nextAutoLevel=t)}deriveNextAutoLevel(e){const{maxAutoLevel:t,minAutoLevel:n}=this.hls;return Math.min(Math.max(e,n),t)}}const xn={search:function(a,e){let t=0,n=a.length-1,r=null,i=null;for(;t<=n;){r=(t+n)/2|0,i=a[r];const s=e(i);if(s>0)t=r+1;else if(s<0)n=r-1;else return i}return null}};function un(a,e,t){if(e===null||!Array.isArray(a)||!a.length||!x(e))return null;const n=a[0].programDateTime;if(e<(n||0))return null;const r=a[a.length-1].endProgramDateTime;if(e>=(r||0))return null;t=t||0;for(let i=0;i<a.length;++i){const s=a[i];if(Rn(e,t,s))return s}return null}function Cn(a,e,t=0,n=0,r=.005){let i=null;if(a){i=e[1+a.sn-e[0].sn]||null;const l=a.endDTS-t;l>0&&l<15e-7&&(t+=15e-7),i&&a.level!==i.level&&i.end<=a.end&&(i=e[2+a.sn-e[0].sn]||null)}else t===0&&e[0].start===0&&(i=e[0]);if(i&&((!a||a.level===i.level)&&Nn(t,n,i)===0||Un(i,a,Math.min(r,n))))return i;const s=xn.search(e,Nn.bind(null,t,n));return s&&(s!==a||!i)?s:i}function Un(a,e,t){if(e&&e.start===0&&e.level<a.level&&(e.endPTS||0)>0){const n=e.tagList.reduce((r,i)=>(i[0]==="INF"&&(r+=parseFloat(i[1])),r),t);return a.start<=n}return!1}function Nn(a=0,e=0,t){if(t.start<=a&&t.start+t.duration>a)return 0;const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-n<=a?1:t.start-n>a&&t.start?-1:0}function Rn(a,e,t){const n=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-n>a}function In(a,e){return xn.search(a,t=>t.cc<e?1:t.cc>e?-1:0)}function $n(a,e,t){if(a&&a.startCC<=e&&a.endCC>=e){const n=t.start,r=t.end;let i=a.fragments;if(!t.relurl){const{fragmentHint:s}=a;s&&(i=i.concat(s))}return xn.search(i,s=>s.cc<e||s.end<=n?1:s.cc>e||s.start>=r?-1:0)}return null}function sn(a){switch(a.details){case F.FRAG_LOAD_TIMEOUT:case F.KEY_LOAD_TIMEOUT:case F.LEVEL_LOAD_TIMEOUT:case F.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function gn(a,e){const t=sn(e);return a.default[`${t?"timeout":"error"}Retry`]}function yn(a,e){const t=a.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*a.retryDelayMs,a.maxRetryDelayMs)}function jn(a){return _(_({},a),{errorRetry:null,timeoutRetry:null})}function kn(a,e,t,n){if(!a)return!1;const r=n==null?void 0:n.code,i=e<a.maxNumRetry&&(Vn(r)||!!t);return a.shouldRetry?a.shouldRetry(a,e,t,n,i):i}function Vn(a){return a===0&&navigator.onLine===!1||!!a&&(a<400||a>499)}var or={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},ge={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,SwitchToSDR:4};class Xe extends N{constructor(e){super("error-controller",e.logger),this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(f.ERROR,this.onError,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(f.ERROR,this.onError,this),e.off(f.ERROR,this.onErrorOut,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(e==null?void 0:e.type)===te.MAIN?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var n;if(t.fatal)return;const r=this.hls,i=t.context;switch(t.details){case F.FRAG_LOAD_ERROR:case F.FRAG_LOAD_TIMEOUT:case F.KEY_LOAD_ERROR:case F.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case F.FRAG_PARSING_ERROR:if((n=t.frag)!=null&&n.gap){t.errorAction=Ke();return}case F.FRAG_GAP:case F.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=or.SendAlternateToPenaltyBox;return}case F.LEVEL_EMPTY_ERROR:case F.LEVEL_PARSING_ERROR:{var s,l;const u=t.parent===te.MAIN?t.level:r.loadLevel;t.details===F.LEVEL_EMPTY_ERROR&&((s=t.context)!=null&&(l=s.levelDetails)!=null&&l.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,u):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,u))}return;case F.LEVEL_LOAD_ERROR:case F.LEVEL_LOAD_TIMEOUT:typeof(i==null?void 0:i.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.level));return;case F.AUDIO_TRACK_LOAD_ERROR:case F.AUDIO_TRACK_LOAD_TIMEOUT:case F.SUBTITLE_LOAD_ERROR:case F.SUBTITLE_TRACK_LOAD_TIMEOUT:if(i){const u=r.loadLevelObj;if(u&&(i.type===ue.AUDIO_TRACK&&u.hasAudioGroup(i.groupId)||i.type===ue.SUBTITLE_TRACK&&u.hasSubtitleGroup(i.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,r.loadLevel),t.errorAction.action=or.SendAlternateToPenaltyBox,t.errorAction.flags=ge.MoveAllAlternatesMatchingHost;return}}return;case F.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const u=r.loadLevelObj,d=u==null?void 0:u.attrs["HDCP-LEVEL"];d?t.errorAction={action:or.SendAlternateToPenaltyBox,flags:ge.MoveAllAlternatesMatchingHDCP,hdcpLevel:d}:this.keySystemError(t)}return;case F.BUFFER_ADD_CODEC_ERROR:case F.REMUX_ALLOC_ERROR:case F.BUFFER_APPEND_ERROR:if(!t.errorAction){var c;t.errorAction=this.getLevelSwitchAction(t,(c=t.level)!=null?c:r.loadLevel)}return;case F.INTERNAL_EXCEPTION:case F.BUFFER_APPENDING_ERROR:case F.BUFFER_FULL_ERROR:case F.LEVEL_SWITCH_ERROR:case F.BUFFER_STALLED_ERROR:case F.BUFFER_SEEK_OVER_HOLE:case F.BUFFER_NUDGE_ON_STALL:t.errorAction=Ke();return}t.type===fe.KEY_SYSTEM_ERROR&&this.keySystemError(t)}keySystemError(e){const t=this.getVariantLevelIndex(e.frag);e.levelRetry=!1,e.errorAction=this.getLevelSwitchAction(e,t)}getPlaylistRetryOrSwitchAction(e,t){const n=this.hls,r=gn(n.config.playlistLoadPolicy,e),i=this.playlistError++;if(kn(r,i,sn(e),e.response))return{action:or.RetryRequest,flags:ge.None,retryConfig:r,retryCount:i};const l=this.getLevelSwitchAction(e,t);return r&&(l.retryConfig=r,l.retryCount=i),l}getFragRetryOrSwitchAction(e){const t=this.hls,n=this.getVariantLevelIndex(e.frag),r=t.levels[n],{fragLoadPolicy:i,keyLoadPolicy:s}=t.config,l=gn(e.details.startsWith("key")?s:i,e),c=t.levels.reduce((d,p)=>d+p.fragmentError,0);if(r&&(e.details!==F.FRAG_GAP&&r.fragmentError++,kn(l,c,sn(e),e.response)))return{action:or.RetryRequest,flags:ge.None,retryConfig:l,retryCount:c};const u=this.getLevelSwitchAction(e,n);return l&&(u.retryConfig=l,u.retryCount=c),u}getLevelSwitchAction(e,t){const n=this.hls;t==null&&(t=n.loadLevel);const r=this.hls.levels[t];if(r){var i,s;const u=e.details;r.loadError++,u===F.BUFFER_APPEND_ERROR&&r.fragmentError++;let d=-1;const{levels:p,loadLevel:b,minAutoLevel:w,maxAutoLevel:D}=n;n.autoLevelEnabled||(n.loadLevel=-1);const X=(i=e.frag)==null?void 0:i.type,_e=(X===te.AUDIO&&u===F.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(u===F.BUFFER_ADD_CODEC_ERROR||u===F.BUFFER_APPEND_ERROR))&&p.some(({audioCodec:Mt})=>r.audioCodec!==Mt),Ie=e.sourceBufferName==="video"&&(u===F.BUFFER_ADD_CODEC_ERROR||u===F.BUFFER_APPEND_ERROR)&&p.some(({codecSet:Mt,audioCodec:ct})=>r.codecSet!==Mt&&r.audioCodec===ct),{type:st,groupId:ut}=(s=e.context)!=null?s:{};for(let Mt=p.length;Mt--;){const ct=(Mt+b)%p.length;if(ct!==b&&ct>=w&&ct<=D&&p[ct].loadError===0){var l,c;const At=p[ct];if(u===F.FRAG_GAP&&X===te.MAIN&&e.frag){const Ht=p[ct].details;if(Ht){const mt=Cn(e.frag,Ht.fragments,e.frag.start);if(mt!=null&&mt.gap)continue}}else{if(st===ue.AUDIO_TRACK&&At.hasAudioGroup(ut)||st===ue.SUBTITLE_TRACK&&At.hasSubtitleGroup(ut))continue;if(X===te.AUDIO&&(l=r.audioGroups)!=null&&l.some(Ht=>At.hasAudioGroup(Ht))||X===te.SUBTITLE&&(c=r.subtitleGroups)!=null&&c.some(Ht=>At.hasSubtitleGroup(Ht))||_e&&r.audioCodec===At.audioCodec||!_e&&r.audioCodec!==At.audioCodec||Ie&&r.codecSet===At.codecSet)continue}d=ct;break}}if(d>-1&&n.loadLevel!==d)return e.levelRetry=!0,this.playlistError=0,{action:or.SendAlternateToPenaltyBox,flags:ge.None,nextAutoLevel:d}}return{action:or.SendAlternateToPenaltyBox,flags:ge.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var n;switch((n=t.errorAction)==null?void 0:n.action){case or.DoNothing:break;case or.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==F.FRAG_GAP?t.fatal=!0:/MediaSource readyState: ended/.test(t.error.message)&&(this.warn(`MediaSource ended after "${t.sourceBufferName}" sourceBuffer append error. Attempting to recover from media error.`),this.hls.recoverMediaError());break;case or.RetryRequest:break}if(t.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(e){const t=this.hls,n=e.errorAction;if(!n)return;const{flags:r,hdcpLevel:i,nextAutoLevel:s}=n;switch(r){case ge.None:this.switchLevel(e,s);break;case ge.MoveAllAlternatesMatchingHDCP:i&&(t.maxHdcpLevel=An[An.indexOf(i)-1],n.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}n.resolved||this.switchLevel(e,s)}switchLevel(e,t){if(t!==void 0&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel,e.details===F.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&e.sourceBufferName!=="audiovideo")){const n=Gt(e.mimeType),r=this.hls.levels;for(let i=r.length;i--;)r[i][`${e.sourceBufferName}Codec`]===n&&this.hls.removeLevel(i)}}}function Ke(a){const e={action:or.DoNothing,flags:ge.None};return a&&(e.resolved=!0),e}var We={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class it{constructor(e){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=e,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.BUFFER_APPENDED,this.onBufferAppended,this),e.on(f.FRAG_BUFFERED,this.onFragBuffered,this),e.on(f.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:e}=this;e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.BUFFER_APPENDED,this.onBufferAppended,this),e.off(f.FRAG_BUFFERED,this.onFragBuffered,this),e.off(f.FRAG_LOADED,this.onFragLoaded,this)}destroy(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,t){const n=this.activePartLists[t];if(n)for(let r=n.length;r--;){const i=n[r];if(!i)break;const s=i.end;if(i.start<=e&&s!==null&&e<=s)return i}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){return this.getFragAtPos(e,t,!0)}getFragAtPos(e,t,n){const{fragments:r}=this,i=Object.keys(r);for(let s=i.length;s--;){const l=r[i[s]];if((l==null?void 0:l.body.type)===t&&(!n||l.buffered)){const c=l.body;if(c.start<=e&&e<=c.end)return c}}return null}detectEvictedFragments(e,t,n,r,i){this.timeRanges&&(this.timeRanges[e]=t);const s=(r==null?void 0:r.fragment.sn)||-1;Object.keys(this.fragments).forEach(l=>{const c=this.fragments[l];if(!c||s>=c.body.sn)return;if(!c.buffered&&(!c.loaded||i)){c.body.type===n&&this.removeFragment(c.body);return}const u=c.range[e];if(u){if(u.time.length===0){this.removeFragment(c.body);return}u.time.some(d=>{const p=!this.isTimeBuffered(d.startPTS,d.endPTS,t);return p&&this.removeFragment(c.body),p})}})}detectPartialFragments(e){const t=this.timeRanges;if(!t||e.frag.sn==="initSegment")return;const n=e.frag,r=Pt(n),i=this.fragments[r];if(!i||i.buffered&&n.gap)return;const s=!n.relurl;Object.keys(t).forEach(l=>{const c=n.elementaryStreams[l];if(!c)return;const u=t[l],d=s||c.partial===!0;i.range[l]=this.getBufferedTimes(n,e.part,d,u)}),i.loaded=null,Object.keys(i.range).length?(i.buffered=!0,(i.body.endList=n.endList||i.body.endList)&&(this.endListFragments[i.body.type]=i),ht(i)||this.removeParts(n.sn-1,n.type)):this.removeFragment(i.body)}removeParts(e,t){const n=this.activePartLists[t];n&&(this.activePartLists[t]=Dt(n,r=>r.fragment.sn>=e))}fragBuffered(e,t){const n=Pt(e);let r=this.fragments[n];!r&&t&&(r=this.fragments[n]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),r&&(r.loaded=null,r.buffered=!0)}getBufferedTimes(e,t,n,r){const i={time:[],partial:n},s=e.start,l=e.end,c=e.minEndPTS||l,u=e.maxStartPTS||s;for(let d=0;d<r.length;d++){const p=r.start(d)-this.bufferPadding,b=r.end(d)+this.bufferPadding;if(u>=p&&c<=b){i.time.push({startPTS:Math.max(s,r.start(d)),endPTS:Math.min(l,r.end(d))});break}else if(s<b&&l>p){const w=Math.max(s,r.start(d)),D=Math.min(l,r.end(d));D>w&&(i.partial=!0,i.time.push({startPTS:w,endPTS:D}))}else if(l<=p)break}return i}getPartialFragment(e){let t=null,n,r,i,s=0;const{bufferPadding:l,fragments:c}=this;return Object.keys(c).forEach(u=>{const d=c[u];d&&ht(d)&&(r=d.body.start-l,i=d.body.end+l,e>=r&&e<=i&&(n=Math.min(e-r,i-e),s<=n&&(t=d.body,s=n)))}),t}isEndListAppended(e){const t=this.endListFragments[e];return t!==void 0&&(t.buffered||ht(t))}getState(e){const t=Pt(e),n=this.fragments[t];return n?n.buffered?ht(n)?We.PARTIAL:We.OK:We.APPENDING:We.NOT_LOADED}isTimeBuffered(e,t,n){let r,i;for(let s=0;s<n.length;s++){if(r=n.start(s)-this.bufferPadding,i=n.end(s)+this.bufferPadding,e>=r&&t<=i)return!0;if(t<=r)return!1}return!1}onManifestLoading(){this.removeAllFragments()}onFragLoaded(e,t){if(t.frag.sn==="initSegment"||t.frag.bitrateTest)return;const n=t.frag,r=t.part?null:t,i=Pt(n);this.fragments[i]={body:n,appendedPTS:null,loaded:r,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:n,part:r,timeRanges:i,type:s}=t;if(n.sn==="initSegment")return;const l=n.type;if(r){let u=this.activePartLists[l];u||(this.activePartLists[l]=u=[]),u.push(r)}this.timeRanges=i;const c=i[s];this.detectEvictedFragments(s,c,l,r)}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=Pt(e);return!!this.fragments[t]}hasFragments(e){const{fragments:t}=this,n=Object.keys(t);if(!e)return n.length>0;for(let r=n.length;r--;){const i=t[n[r]];if((i==null?void 0:i.body.type)===e)return!0}return!1}hasParts(e){var t;return!!((t=this.activePartLists[e])!=null&&t.length)}removeFragmentsInRange(e,t,n,r,i){r&&!this.hasGaps||Object.keys(this.fragments).forEach(s=>{const l=this.fragments[s];if(!l)return;const c=l.body;c.type!==n||r&&!c.gap||c.start<t&&c.end>e&&(l.buffered||i)&&this.removeFragment(c)})}removeFragment(e){const t=Pt(e);e.clearElementaryStreamInfo();const n=this.activePartLists[e.type];if(n){const r=e.sn;this.activePartLists[e.type]=Dt(n,i=>i.fragment.sn!==r)}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){var e,t;this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1;const n=(e=this.hls)==null||(t=e.latestLevelDetails)==null?void 0:t.partList;n&&n.forEach(r=>r.clearElementaryStreamInfo())}}function ht(a){var e,t,n;return a.buffered&&(a.body.gap||((e=a.range.video)==null?void 0:e.partial)||((t=a.range.audio)==null?void 0:t.partial)||((n=a.range.audiovideo)==null?void 0:n.partial))}function Pt(a){return`${a.type}_${a.level}_${a.sn}`}function Dt(a,e){return a.filter(t=>{const n=e(t);return n||t.clearElementaryStreamInfo(),n})}var pt={cbc:0,ctr:1};class Ge{constructor(e,t,n){this.subtle=void 0,this.aesIV=void 0,this.aesMode=void 0,this.subtle=e,this.aesIV=t,this.aesMode=n}decrypt(e,t){switch(this.aesMode){case pt.cbc:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e);case pt.ctr:return this.subtle.decrypt({name:"AES-CTR",counter:this.aesIV,length:64},t,e);default:throw new Error(`[AESCrypto] invalid aes mode ${this.aesMode}`)}}}function Je(a){const e=a.byteLength,t=e&&new DataView(a.buffer).getUint8(e-1);return t?a.slice(0,e-t):a}class at{constructor(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}uint8ArrayToUint32Array_(e){const t=new DataView(e),n=new Uint32Array(4);for(let r=0;r<4;r++)n[r]=t.getUint32(r*4);return n}initTable(){const e=this.sBox,t=this.invSBox,n=this.subMix,r=n[0],i=n[1],s=n[2],l=n[3],c=this.invSubMix,u=c[0],d=c[1],p=c[2],b=c[3],w=new Uint32Array(256);let D=0,X=0,Y=0;for(Y=0;Y<256;Y++)Y<128?w[Y]=Y<<1:w[Y]=Y<<1^283;for(Y=0;Y<256;Y++){let _e=X^X<<1^X<<2^X<<3^X<<4;_e=_e>>>8^_e&255^99,e[D]=_e,t[_e]=D;const Me=w[D],Ie=w[Me],st=w[Ie];let ut=w[_e]*257^_e*16843008;r[D]=ut<<24|ut>>>8,i[D]=ut<<16|ut>>>16,s[D]=ut<<8|ut>>>24,l[D]=ut,ut=st*16843009^Ie*65537^Me*257^D*16843008,u[_e]=ut<<24|ut>>>8,d[_e]=ut<<16|ut>>>16,p[_e]=ut<<8|ut>>>24,b[_e]=ut,D?(D=Me^w[w[w[st^Me]]],X^=w[w[X]]):D=X=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let n=!0,r=0;for(;r<t.length&&n;)n=t[r]===this.key[r],r++;if(n)return;this.key=t;const i=this.keySize=t.length;if(i!==4&&i!==6&&i!==8)throw new Error("Invalid aes key size="+i);const s=this.ksRows=(i+6+1)*4;let l,c;const u=this.keySchedule=new Uint32Array(s),d=this.invKeySchedule=new Uint32Array(s),p=this.sBox,b=this.rcon,w=this.invSubMix,D=w[0],X=w[1],Y=w[2],_e=w[3];let Me,Ie;for(l=0;l<s;l++){if(l<i){Me=u[l]=t[l];continue}Ie=Me,l%i===0?(Ie=Ie<<8|Ie>>>24,Ie=p[Ie>>>24]<<24|p[Ie>>>16&255]<<16|p[Ie>>>8&255]<<8|p[Ie&255],Ie^=b[l/i|0]<<24):i>6&&l%i===4&&(Ie=p[Ie>>>24]<<24|p[Ie>>>16&255]<<16|p[Ie>>>8&255]<<8|p[Ie&255]),u[l]=Me=(u[l-i]^Ie)>>>0}for(c=0;c<s;c++)l=s-c,c&3?Ie=u[l]:Ie=u[l-4],c<4||l<=4?d[c]=Ie:d[c]=D[p[Ie>>>24]]^X[p[Ie>>>16&255]]^Y[p[Ie>>>8&255]]^_e[p[Ie&255]],d[c]=d[c]>>>0}networkToHostOrderSwap(e){return e<<24|(e&65280)<<8|(e&16711680)>>8|e>>>24}decrypt(e,t,n){const r=this.keySize+6,i=this.invKeySchedule,s=this.invSBox,l=this.invSubMix,c=l[0],u=l[1],d=l[2],p=l[3],b=this.uint8ArrayToUint32Array_(n);let w=b[0],D=b[1],X=b[2],Y=b[3];const _e=new Int32Array(e),Me=new Int32Array(_e.length);let Ie,st,ut,Mt,ct,At,Ht,mt,En,Mn,Lr,vr,cr,qn;const fr=this.networkToHostOrderSwap;for(;t<_e.length;){for(En=fr(_e[t]),Mn=fr(_e[t+1]),Lr=fr(_e[t+2]),vr=fr(_e[t+3]),ct=En^i[0],At=vr^i[1],Ht=Lr^i[2],mt=Mn^i[3],cr=4,qn=1;qn<r;qn++)Ie=c[ct>>>24]^u[At>>16&255]^d[Ht>>8&255]^p[mt&255]^i[cr],st=c[At>>>24]^u[Ht>>16&255]^d[mt>>8&255]^p[ct&255]^i[cr+1],ut=c[Ht>>>24]^u[mt>>16&255]^d[ct>>8&255]^p[At&255]^i[cr+2],Mt=c[mt>>>24]^u[ct>>16&255]^d[At>>8&255]^p[Ht&255]^i[cr+3],ct=Ie,At=st,Ht=ut,mt=Mt,cr=cr+4;Ie=s[ct>>>24]<<24^s[At>>16&255]<<16^s[Ht>>8&255]<<8^s[mt&255]^i[cr],st=s[At>>>24]<<24^s[Ht>>16&255]<<16^s[mt>>8&255]<<8^s[ct&255]^i[cr+1],ut=s[Ht>>>24]<<24^s[mt>>16&255]<<16^s[ct>>8&255]<<8^s[At&255]^i[cr+2],Mt=s[mt>>>24]<<24^s[ct>>16&255]<<16^s[At>>8&255]<<8^s[Ht&255]^i[cr+3],Me[t]=fr(Ie^w),Me[t+1]=fr(Mt^D),Me[t+2]=fr(ut^X),Me[t+3]=fr(st^Y),w=En,D=Mn,X=Lr,Y=vr,t=t+4}return Me.buffer}}class dt{constructor(e,t,n){this.subtle=void 0,this.key=void 0,this.aesMode=void 0,this.subtle=e,this.key=t,this.aesMode=n}expandKey(){const e=gt(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}function gt(a){switch(a){case pt.cbc:return"AES-CBC";case pt.ctr:return"AES-CTR";default:throw new Error(`[FastAESKey] invalid aes mode ${a}`)}}const Wt=16;class vn{constructor(e,{removePKCS7Padding:t=!0}={}){if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.enableSoftwareAES=void 0,this.enableSoftwareAES=e.enableSoftwareAES,this.removePKCS7Padding=t,t)try{const n=self.crypto;n&&(this.subtle=n.subtle||n.webkitSubtle)}catch(n){}this.useSoftware=!this.subtle}destroy(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null}isSync(){return this.useSoftware}flush(){const{currentResult:e,remainderData:t}=this;if(!e||t)return this.reset(),null;const n=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?Je(n):n}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,t,n,r){return this.useSoftware?new Promise((i,s)=>{const l=ArrayBuffer.isView(e)?e:new Uint8Array(e);this.softwareDecrypt(l,t,n,r);const c=this.flush();c?i(c.buffer):s(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(e),t,n,r)}softwareDecrypt(e,t,n,r){const{currentIV:i,currentResult:s,remainderData:l}=this;if(r!==pt.cbc||t.byteLength!==16)return G.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),l&&(e=Fe(l,e),this.remainderData=null);const c=this.getValidChunk(e);if(!c.length)return null;i&&(n=i);let u=this.softwareDecrypter;u||(u=this.softwareDecrypter=new at),u.expandKey(t);const d=s;return this.currentResult=u.decrypt(c.buffer,0,n),this.currentIV=c.slice(-16).buffer,d||null}webCryptoDecrypt(e,t,n,r){if(this.key!==t||!this.fastAesKey){if(!this.subtle)return Promise.resolve(this.onWebCryptoError(e,t,n,r));this.key=t,this.fastAesKey=new dt(this.subtle,t,r)}return this.fastAesKey.expandKey().then(i=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new Ge(this.subtle,new Uint8Array(n),r).decrypt(e.buffer,i)):Promise.reject(new Error("web crypto not initialized"))).catch(i=>(G.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${i.name}: ${i.message}`),this.onWebCryptoError(e,t,n,r)))}onWebCryptoError(e,t,n,r){const i=this.enableSoftwareAES;if(i){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,n,r);const s=this.flush();if(s)return s.buffer}throw new Error("WebCrypto"+(i?" and softwareDecrypt":"")+": failed to decrypt data")}getValidChunk(e){let t=e;const n=e.length-e.length%Wt;return n!==e.length&&(t=e.slice(0,n),this.remainderData=e.slice(n)),t}logOnce(e){this.logEnabled&&(G.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const rn=Math.pow(2,17);class Pn{constructor(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}destroy(){this.loader&&(this.loader.destroy(),this.loader=null)}abort(){this.loader&&this.loader.abort()}load(e,t){const n=e.url;if(!n)return Promise.reject(new dn({type:fe.NETWORK_ERROR,details:F.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error(`Fragment does not have a ${n?"part list":"url"}`),networkDetails:null}));this.abort();const r=this.config,i=r.fLoader,s=r.loader;return new Promise((l,c)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(D=>D[0]==="GAP")){c(Kn(e));return}else e.gap=!1;const u=this.loader=i?new i(r):new s(r),d=Zn(e);e.loader=u;const p=jn(r.fragLoadPolicy.default),b={loadPolicy:p,timeout:p.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:rn};e.stats=u.stats;const w={onSuccess:(D,X,Y,_e)=>{this.resetLoader(e,u);let Me=D.data;Y.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(Me.slice(0,16)),Me=Me.slice(16)),l({frag:e,part:null,payload:Me,networkDetails:_e})},onError:(D,X,Y,_e)=>{this.resetLoader(e,u),c(new dn({type:fe.NETWORK_ERROR,details:F.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:_({url:n,data:void 0},D),error:new Error(`HTTP Error ${D.code} ${D.text}`),networkDetails:Y,stats:_e}))},onAbort:(D,X,Y)=>{this.resetLoader(e,u),c(new dn({type:fe.NETWORK_ERROR,details:F.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:Y,stats:D}))},onTimeout:(D,X,Y)=>{this.resetLoader(e,u),c(new dn({type:fe.NETWORK_ERROR,details:F.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${b.timeout}ms`),networkDetails:Y,stats:D}))}};t&&(w.onProgress=(D,X,Y,_e)=>t({frag:e,part:null,payload:Y,networkDetails:_e})),u.load(d,b,w)})}loadPart(e,t,n){this.abort();const r=this.config,i=r.fLoader,s=r.loader;return new Promise((l,c)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap){c(Kn(e,t));return}const u=this.loader=i?new i(r):new s(r),d=Zn(e,t);e.loader=u;const p=jn(r.fragLoadPolicy.default),b={loadPolicy:p,timeout:p.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:rn};t.stats=u.stats,u.load(d,b,{onSuccess:(w,D,X,Y)=>{this.resetLoader(e,u),this.updateStatsFromPart(e,t);const _e={frag:e,part:t,payload:w.data,networkDetails:Y};n(_e),l(_e)},onError:(w,D,X,Y)=>{this.resetLoader(e,u),c(new dn({type:fe.NETWORK_ERROR,details:F.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:_({url:d.url,data:void 0},w),error:new Error(`HTTP Error ${w.code} ${w.text}`),networkDetails:X,stats:Y}))},onAbort:(w,D,X)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,u),c(new dn({type:fe.NETWORK_ERROR,details:F.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:X,stats:w}))},onTimeout:(w,D,X)=>{this.resetLoader(e,u),c(new dn({type:fe.NETWORK_ERROR,details:F.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${b.timeout}ms`),networkDetails:X,stats:w}))}})})}updateStatsFromPart(e,t){const n=e.stats,r=t.stats,i=r.total;if(n.loaded+=r.loaded,i){const c=Math.round(e.duration/t.duration),u=Math.min(Math.round(n.loaded/i),c),p=(c-u)*Math.round(n.loaded/u);n.total=n.loaded+p}else n.total=Math.max(n.loaded,n.total);const s=n.loading,l=r.loading;s.start?s.first+=l.first-l.start:(s.start=l.start,s.first=l.first),s.end=l.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function Zn(a,e=null){const t=e||a,n={frag:a,part:e,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},r=t.byteRangeStartOffset,i=t.byteRangeEndOffset;if(x(r)&&x(i)){var s;let l=r,c=i;if(a.sn==="initSegment"&&er((s=a.decryptdata)==null?void 0:s.method)){const u=i-r;u%16&&(c=i+(16-u%16)),r!==0&&(n.resetIV=!0,l=r-16)}n.rangeStart=l,n.rangeEnd=c}return n}function Kn(a,e){const t=new Error(`GAP ${a.gap?"tag":"attribute"} found`),n={type:fe.MEDIA_ERROR,details:F.FRAG_GAP,fatal:!1,frag:a,error:t,networkDetails:null};return e&&(n.part=e),(e||a).stats.aborted=!0,new dn(n)}function er(a){return a==="AES-128"||a==="AES-256"}class dn extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class dr extends N{constructor(e,t){super(e,t),this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}destroy(){this.onHandlerDestroying(),this.onHandlerDestroyed()}onHandlerDestroying(){this.clearNextTick(),this.clearInterval()}onHandlerDestroyed(){}hasInterval(){return!!this._tickInterval}hasNextTick(){return!!this._tickTimer}setInterval(e){return this._tickInterval?!1:(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)}clearInterval(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1}clearNextTick(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1}tick(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)}tickImmediate(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}doTick(){}}class ir{constructor(e,t,n,r=0,i=-1,s=!1){this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=tr(),this.buffering={audio:tr(),video:tr(),audiovideo:tr()},this.level=e,this.sn=t,this.id=n,this.size=r,this.part=i,this.partial=s}}function tr(){return{start:0,executeStart:0,executeEnd:0,end:0}}const Yn={length:0,start:()=>0,end:()=>0};class hn{static isBuffered(e,t){if(e){const n=hn.getBuffered(e);for(let r=n.length;r--;)if(t>=n.start(r)&&t<=n.end(r))return!0}return!1}static bufferedRanges(e){if(e){const t=hn.getBuffered(e);return hn.timeRangesToArray(t)}return[]}static timeRangesToArray(e){const t=[];for(let n=0;n<e.length;n++)t.push({start:e.start(n),end:e.end(n)});return t}static bufferInfo(e,t,n){if(e){const r=hn.bufferedRanges(e);if(r.length)return hn.bufferedInfo(r,t,n)}return{len:0,start:t,end:t,bufferedIndex:-1}}static bufferedInfo(e,t,n){t=Math.max(0,t),e.length>1&&e.sort((d,p)=>d.start-p.start||p.end-d.end);let r=-1,i=[];if(n)for(let d=0;d<e.length;d++){t>=e[d].start&&t<=e[d].end&&(r=d);const p=i.length;if(p){const b=i[p-1].end;e[d].start-b<n?e[d].end>b&&(i[p-1].end=e[d].end):i.push(e[d])}else i.push(e[d])}else i=e;let s=0,l,c=t,u=t;for(let d=0;d<i.length;d++){const p=i[d].start,b=i[d].end;if(r===-1&&t>=p&&t<=b&&(r=d),t+n>=p&&t<b)c=p,u=b,s=u-t;else if(t+n<p){l=p;break}}return{len:s,start:c||0,end:u||0,nextStart:l,buffered:e,bufferedIndex:r}}static getBuffered(e){try{return e.buffered||Yn}catch(t){return G.log("failed to get media.buffered",t),Yn}}}const mr=/\{\$([a-zA-Z0-9-_]+)\}/g;function rr(a){return mr.test(a)}function lr(a,e){if(a.variableList!==null||a.hasVariableRefs){const t=a.variableList;return e.replace(mr,n=>{const r=n.substring(2,n.length-1),i=t==null?void 0:t[r];return i===void 0?(a.playlistParsingError||(a.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${r}"`)),n):i})}return e}function Hn(a,e,t){let n=a.variableList;n||(a.variableList=n={});let r,i;if("QUERYPARAM"in e){r=e.QUERYPARAM;try{const s=new self.URL(t).searchParams;if(s.has(r))i=s.get(r);else throw new Error(`"${r}" does not match any query parameter in URI: "${t}"`)}catch(s){a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${s.message}`))}}else r=e.NAME,i=e.VALUE;r in n?a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${r}"`)):n[r]=i||""}function Sn(a,e,t){const n=e.IMPORT;if(t&&n in t){let r=a.variableList;r||(a.variableList=r={}),r[n]=t[n]}else a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${n}"`))}const On=/^(\d+)x(\d+)$/,Qn=/(.+?)=(".*?"|.*?)(?:,|$)/g;class Fn{constructor(e,t){typeof e=="string"&&(e=Fn.parseAttrList(e,t)),h(this,e)}get clientAttrs(){return Object.keys(this).filter(e=>e.substring(0,2)==="X-")}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(t.length&1?"0":"")+t;const n=new Uint8Array(t.length/2);for(let r=0;r<t.length/2;r++)n[r]=parseInt(t.slice(r*2,r*2+2),16);return n}return null}hexadecimalIntegerAsNumber(e){const t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,t){const n=this[e];return n?parseFloat(n):t}enumeratedString(e){return this[e]}enumeratedStringList(e,t){const n=this[e];return(n?n.split(/[ ,]+/):[]).reduce((r,i)=>(r[i.toLowerCase()]=!0,r),t)}bool(e){return this[e]==="YES"}decimalResolution(e){const t=On.exec(this[e]);if(t!==null)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e,t){let n;const r={},i='"';for(Qn.lastIndex=0;(n=Qn.exec(e))!==null;){const s=n[1].trim();let l=n[2];const c=l.indexOf(i)===0&&l.lastIndexOf(i)===l.length-1;let u=!1;if(c)l=l.slice(1,-1);else switch(s){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":u=!0}if(t&&(c||u))l=lr(t,l);else if(!u&&!c)switch(s){case"CLOSED-CAPTIONS":if(l==="NONE")break;case"ALLOWED-CPC":case"CLASS":case"ASSOC-LANGUAGE":case"AUDIO":case"BYTERANGE":case"CHANNELS":case"CHARACTERISTICS":case"CODECS":case"DATA-ID":case"END-DATE":case"GROUP-ID":case"ID":case"IMPORT":case"INSTREAM-ID":case"KEYFORMAT":case"KEYFORMATVERSIONS":case"LANGUAGE":case"NAME":case"PATHWAY-ID":case"QUERYPARAM":case"RECENTLY-REMOVED-DATERANGES":case"SERVER-URI":case"STABLE-RENDITION-ID":case"STABLE-VARIANT-ID":case"START-DATE":case"SUBTITLES":case"SUPPLEMENTAL-CODECS":case"URI":case"VALUE":case"VIDEO":case"X-ASSET-LIST":case"X-ASSET-URI":G.warn(`${e}: attribute ${s} is missing quotes`)}r[s]=l}return r}}const sr="com.apple.hls.interstitial";function ar(a){return a!=="ID"&&a!=="CLASS"&&a!=="CUE"&&a!=="START-DATE"&&a!=="DURATION"&&a!=="END-DATE"&&a!=="END-ON-NEXT"}function Pr(a){return a==="SCTE35-OUT"||a==="SCTE35-IN"||a==="SCTE35-CMD"}class zr{constructor(e,t,n=0){var r;if(this.attr=void 0,this.tagAnchor=void 0,this.tagOrder=void 0,this._startDate=void 0,this._endDate=void 0,this._dateAtEnd=void 0,this._cue=void 0,this._badValueForSameId=void 0,this.tagAnchor=(t==null?void 0:t.tagAnchor)||null,this.tagOrder=(r=t==null?void 0:t.tagOrder)!=null?r:n,t){const i=t.attr;for(const s in i)if(Object.prototype.hasOwnProperty.call(e,s)&&e[s]!==i[s]){G.warn(`DATERANGE tag attribute: "${s}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=s;break}e=h(new Fn({}),i,e)}if(this.attr=e,t?(this._startDate=t._startDate,this._cue=t._cue,this._endDate=t._endDate,this._dateAtEnd=t._dateAtEnd):this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const i=(t==null?void 0:t.endDate)||new Date(this.attr["END-DATE"]);x(i.getTime())&&(this._endDate=i)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get cue(){const e=this._cue;return e===void 0?this._cue=this.attr.enumeratedStringList(this.attr.CUE?"CUE":"X-CUE",{pre:!1,post:!1,once:!1}):e}get startTime(){const{tagAnchor:e}=this;return e===null||e.programDateTime===null?(G.warn(`Expected tagAnchor Fragment with PDT set for DateRange "${this.id}": ${e}`),NaN):e.start+(this.startDate.getTime()-e.programDateTime)/1e3}get startDate(){return this._startDate}get endDate(){const e=this._endDate||this._dateAtEnd;if(e)return e;const t=this.duration;return t!==null?this._dateAtEnd=new Date(this._startDate.getTime()+t*1e3):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(x(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isInterstitial(){return this.class===sr}get isValid(){return!!this.id&&!this._badValueForSameId&&x(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)&&(!this.attr.CUE||!this.cue.pre&&!this.cue.post||this.cue.pre!==this.cue.post)&&(!this.isInterstitial||"X-ASSET-URI"in this.attr||"X-ASSET-LIST"in this.attr)}}const Kr=10;class ei{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.dateRangeTagCount=0,this.live=!0,this.requestScheduled=-1,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.appliedTimelineOffset=void 0,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e){this.advanced=!0,this.updated=!0;return}const t=this.lastPartSn-e.lastPartSn,n=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!n||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||t===0&&n>0,this.updated||this.advanced?this.misses=Math.floor(e.misses*.6):this.misses=e.misses+1}get hasProgramDateTime(){return this.fragments.length?x(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||Kr}get drift(){const e=this.driftEndTime-this.driftStartTime;return e>0?(this.driftEnd-this.driftStart)*1e3/e:1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){var e;return(e=this.fragments)!=null&&e.length?this.fragments[this.fragments.length-1].end:0}get fragmentStart(){var e;return(e=this.fragments)!=null&&e.length?this.fragments[0].start:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].index:-1}get maxPartIndex(){const e=this.partList;if(e){const t=this.lastPartIndex;if(t!==-1){for(let n=e.length;n--;)if(e[n].index>t)return e[n].index;return t}}return 0}get lastPartSn(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}get expired(){if(this.live&&this.age&&this.misses<3){const e=this.partEnd-this.fragmentStart;return this.age>Math.max(e,this.totalduration)+this.levelTargetDuration}return!1}}function Zr(a){return a==="AES-128"||a==="AES-256"||a==="AES-256-CTR"}function Br(a){switch(a){case"AES-128":case"AES-256":return pt.cbc;case"AES-256-CTR":return pt.ctr;default:throw new Error(`invalid full segment method ${a}`)}}function hr(a){return Uint8Array.from(atob(a),e=>e.charCodeAt(0))}function Sr(a){return Uint8Array.from(unescape(encodeURIComponent(a)),e=>e.charCodeAt(0))}function kr(a){const e=Sr(a).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function Dr(a){const e=function(n,r,i){const s=n[r];n[r]=n[i],n[i]=s};e(a,0,3),e(a,1,2),e(a,4,5),e(a,6,7)}function gr(a){const e=a.split(":");let t=null;if(e[0]==="data"&&e.length===2){const n=e[1].split(";"),r=n[n.length-1].split(",");if(r.length===2){const i=r[0]==="base64",s=r[1];i?(n.splice(-1,1),t=hr(s)):t=kr(s)}}return t}const pr=typeof self!="undefined"?self:void 0;var tn={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},zn={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function Jn(a){switch(a){case zn.FAIRPLAY:return tn.FAIRPLAY;case zn.PLAYREADY:return tn.PLAYREADY;case zn.WIDEVINE:return tn.WIDEVINE;case zn.CLEARKEY:return tn.CLEARKEY}}var nr={CENC:"1077efecc0b24d02ace33c1e52e2fb4b",CLEARKEY:"e2719d58a985b3c9781ab030af78d30e",PLAYREADY:"9a04f07998404286ab92e65be0885f95",WIDEVINE:"edef8ba979d64acea3c827dcd51d21ed"};function _r(a){if(a===nr.WIDEVINE)return tn.WIDEVINE;if(a===nr.PLAYREADY)return tn.PLAYREADY;if(a===nr.CENC||a===nr.CLEARKEY)return tn.CLEARKEY}function Tr(a){switch(a){case tn.FAIRPLAY:return zn.FAIRPLAY;case tn.PLAYREADY:return zn.PLAYREADY;case tn.WIDEVINE:return zn.WIDEVINE;case tn.CLEARKEY:return zn.CLEARKEY}}function Ln(a){const{drmSystems:e,widevineLicenseUrl:t}=a,n=e?[tn.FAIRPLAY,tn.WIDEVINE,tn.PLAYREADY,tn.CLEARKEY].filter(r=>!!e[r]):[];return!n[tn.WIDEVINE]&&t&&n.push(tn.WIDEVINE),n}const Gn=function(a){return pr!=null&&(a=pr.navigator)!=null&&a.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function yr(a,e,t,n){let r;switch(a){case tn.FAIRPLAY:r=["cenc","sinf"];break;case tn.WIDEVINE:case tn.PLAYREADY:r=["cenc"];break;case tn.CLEARKEY:r=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${a}`)}return Xn(r,e,t,n)}function Xn(a,e,t,n){return[{initDataTypes:a,persistentState:n.persistentState||"optional",distinctiveIdentifier:n.distinctiveIdentifier||"optional",sessionTypes:n.sessionTypes||[n.sessionType||"temporary"],audioCapabilities:e.map(i=>({contentType:`audio/mp4; codecs=${i}`,robustness:n.audioRobustness||"",encryptionScheme:n.audioEncryptionScheme||null})),videoCapabilities:t.map(i=>({contentType:`video/mp4; codecs=${i}`,robustness:n.videoRobustness||"",encryptionScheme:n.videoEncryptionScheme||null}))}]}function xr(a){var e;return a.sessionType==="persistent-license"||!!((e=a.sessionTypes)!=null&&e.some(t=>t==="persistent-license"))}function Jr(a){const e=new Uint16Array(a.buffer,a.byteOffset,a.byteLength/2),t=String.fromCharCode.apply(null,Array.from(e)),n=t.substring(t.indexOf("<"),t.length),s=new DOMParser().parseFromString(n,"text/xml").getElementsByTagName("KID")[0];if(s){const l=s.childNodes[0]?s.childNodes[0].nodeValue:s.getAttribute("VALUE");if(l){const c=hr(l).subarray(0,16);return Dr(c),c}}return null}let Fr={};class qr{static clearKeyUriToKeyIdMap(){Fr={}}constructor(e,t,n,r=[1],i=null){this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=n,this.keyFormatVersions=r,this.iv=i,this.encrypted=e?e!=="NONE":!1,this.isCommonEncryption=this.encrypted&&!Zr(e)}isSupported(){if(this.method){if(Zr(this.method)||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case zn.FAIRPLAY:case zn.WIDEVINE:case zn.PLAYREADY:case zn.CLEARKEY:return["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)!==-1}}return!1}getDecryptData(e){if(!this.encrypted||!this.uri)return null;if(Zr(this.method)&&this.uri&&!this.iv){typeof e!="number"&&(G.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const n=ri(e);return new qr(this.method,this.uri,"identity",this.keyFormatVersions,n)}const t=gr(this.uri);if(t)switch(this.keyFormat){case zn.WIDEVINE:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case zn.PLAYREADY:{const n=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=Ct(n,null,t),this.keyId=Jr(t);break}default:{let n=t.subarray(0,16);if(n.length!==16){const r=new Uint8Array(16);r.set(n,16-n.length),n=r}this.keyId=n;break}}if(!this.keyId||this.keyId.byteLength!==16){let n=Fr[this.uri];if(!n){const r=Object.keys(Fr).length%Number.MAX_SAFE_INTEGER;n=new Uint8Array(16),new DataView(n.buffer,12,4).setUint32(0,r),Fr[this.uri]=n}this.keyId=n}return this}}function ri(a){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=a>>8*(15-t)&255;return e}const li=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,Hr=/#EXT-X-MEDIA:(.*)/g,ts=/^#EXT(?:INF|-X-TARGETDURATION):/m,Fi=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#.*/.source].join("|"),"g"),wi=new RegExp([/#EXT-X-(PROGRAM-DATE-TIME|BYTERANGE|DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP|INDEPENDENT-SEGMENTS)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class ui{static findGroup(e,t){for(let n=0;n<e.length;n++){const r=e[n];if(r.id===t)return r}}static resolve(e,t){return V.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return ts.test(e)}static parseMasterPlaylist(e,t){const n=rr(e),r={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:n},i=[];li.lastIndex=0;let s;for(;(s=li.exec(e))!=null;)if(s[1]){var l;const u=new Fn(s[1],r),d=lr(r,s[2]),p={attrs:u,bitrate:u.decimalInteger("BANDWIDTH")||u.decimalInteger("AVERAGE-BANDWIDTH"),name:u.NAME,url:ui.resolve(d,t)},b=u.decimalResolution("RESOLUTION");b&&(p.width=b.width,p.height=b.height),Bi(u.CODECS,p);const w=u["SUPPLEMENTAL-CODECS"];w&&(p.supplemental={},Bi(w,p.supplemental)),(l=p.unknownCodecs)!=null&&l.length||i.push(p),r.levels.push(p)}else if(s[3]){const u=s[3],d=s[4];switch(u){case"SESSION-DATA":{const p=new Fn(d,r),b=p["DATA-ID"];b&&(r.sessionData===null&&(r.sessionData={}),r.sessionData[b]=p);break}case"SESSION-KEY":{const p=Mi(d,t,r);p.encrypted&&p.isSupported()?(r.sessionKeys===null&&(r.sessionKeys=[]),r.sessionKeys.push(p)):G.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${d}"`);break}case"DEFINE":{{const p=new Fn(d,r);Hn(r,p,t)}break}case"CONTENT-STEERING":{const p=new Fn(d,r);r.contentSteering={uri:ui.resolve(p["SERVER-URI"],t),pathwayId:p["PATHWAY-ID"]||"."};break}case"START":{r.startTimeOffset=pi(d);break}}}const c=i.length>0&&i.length<r.levels.length;return r.levels=c?i:r.levels,r.levels.length===0&&(r.playlistParsingError=new Error("no levels found in manifest")),r}static parseMasterPlaylistMedia(e,t,n){let r;const i={},s=n.levels,l={AUDIO:s.map(u=>({id:u.attrs.AUDIO,audioCodec:u.audioCodec})),SUBTITLES:s.map(u=>({id:u.attrs.SUBTITLES,textCodec:u.textCodec})),"CLOSED-CAPTIONS":[]};let c=0;for(Hr.lastIndex=0;(r=Hr.exec(e))!==null;){const u=new Fn(r[1],n),d=u.TYPE;if(d){const p=l[d],b=i[d]||[];i[d]=b;const w=u.LANGUAGE,D=u["ASSOC-LANGUAGE"],X=u.CHANNELS,Y=u.CHARACTERISTICS,_e=u["INSTREAM-ID"],Me={attrs:u,bitrate:0,id:c++,groupId:u["GROUP-ID"]||"",name:u.NAME||w||"",type:d,default:u.bool("DEFAULT"),autoselect:u.bool("AUTOSELECT"),forced:u.bool("FORCED"),lang:w,url:u.URI?ui.resolve(u.URI,t):""};if(D&&(Me.assocLang=D),X&&(Me.channels=X),Y&&(Me.characteristics=Y),_e&&(Me.instreamId=_e),p!=null&&p.length){const Ie=ui.findGroup(p,Me.groupId)||p[0];Ai(Me,Ie,"audioCodec"),Ai(Me,Ie,"textCodec")}b.push(Me)}}return i}static parseLevelPlaylist(e,t,n,r,i,s){var l;const c={url:t},u=new ei(t),d=u.fragments,p=[];let b=null,w=0,D=0,X=0,Y=0,_e=0,Me=null,Ie=new pe(r,c),st,ut,Mt,ct=-1,At=!1,Ht=null,mt;if(Fi.lastIndex=0,u.m3u8=e,u.hasVariableRefs=rr(e),((l=Fi.exec(e))==null?void 0:l[0])!=="#EXTM3U")return u.playlistParsingError=new Error("Missing format identifier #EXTM3U"),u;for(;(st=Fi.exec(e))!==null;){At&&(At=!1,Ie=new pe(r,c),Ie.playlistOffset=X,Ie.start=X,Ie.sn=w,Ie.cc=Y,_e&&(Ie.bitrate=_e),Ie.level=n,b&&(Ie.initSegment=b,b.rawProgramDateTime&&(Ie.rawProgramDateTime=b.rawProgramDateTime,b.rawProgramDateTime=null),Ht&&(Ie.setByteRange(Ht),Ht=null)));const vr=st[1];if(vr){Ie.duration=parseFloat(vr);const cr=(" "+st[2]).slice(1);Ie.title=cr||null,Ie.tagList.push(cr?["INF",vr,cr]:["INF",vr])}else if(st[3]){if(x(Ie.duration)){Ie.playlistOffset=X,Ie.start=X,Mt&&Ui(Ie,Mt,u),Ie.sn=w,Ie.level=n,Ie.cc=Y,d.push(Ie);const cr=(" "+st[3]).slice(1);Ie.relurl=lr(u,cr),Ti(Ie,Me,p),Me=Ie,X+=Ie.duration,w++,D=0,At=!0}}else{if(st=st[0].match(wi),!st){G.warn("No matches on slow regex match for level playlist!");continue}for(ut=1;ut<st.length&&st[ut]===void 0;ut++);const cr=(" "+st[ut]).slice(1),qn=(" "+st[ut+1]).slice(1),fr=st[ut+2]?(" "+st[ut+2]).slice(1):null;switch(cr){case"BYTERANGE":Me?Ie.setByteRange(qn,Me):Ie.setByteRange(qn);break;case"PROGRAM-DATE-TIME":Ie.rawProgramDateTime=qn,Ie.tagList.push(["PROGRAM-DATE-TIME",qn]),ct===-1&&(ct=d.length);break;case"PLAYLIST-TYPE":u.type&&mi(u,cr,st),u.type=qn.toUpperCase();break;case"MEDIA-SEQUENCE":u.startSN!==0?mi(u,cr,st):d.length>0&&Wi(u,cr,st),w=u.startSN=parseInt(qn);break;case"SKIP":{u.skippedSegments&&mi(u,cr,st);const ur=new Fn(qn,u),bn=ur.decimalInteger("SKIPPED-SEGMENTS");if(x(bn)){u.skippedSegments+=bn;for(let Ar=bn;Ar--;)d.push(null);w+=bn}const Dn=ur.enumeratedString("RECENTLY-REMOVED-DATERANGES");Dn&&(u.recentlyRemovedDateranges=(u.recentlyRemovedDateranges||[]).concat(Dn.split(" ")));break}case"TARGETDURATION":u.targetduration!==0&&mi(u,cr,st),u.targetduration=Math.max(parseInt(qn),1);break;case"VERSION":u.version!==null&&mi(u,cr,st),u.version=parseInt(qn);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":u.live||mi(u,cr,st),u.live=!1;break;case"#":(qn||fr)&&Ie.tagList.push(fr?[qn,fr]:[qn]);break;case"DISCONTINUITY":Y++,Ie.tagList.push(["DIS"]);break;case"GAP":Ie.gap=!0,Ie.tagList.push([cr]);break;case"BITRATE":Ie.tagList.push([cr,qn]),_e=parseInt(qn)*1e3,x(_e)?Ie.bitrate=_e:_e=0;break;case"DATERANGE":{const ur=new Fn(qn,u),bn=new zr(ur,u.dateRanges[ur.ID],u.dateRangeTagCount);u.dateRangeTagCount++,bn.isValid||u.skippedSegments?u.dateRanges[bn.id]=bn:G.warn(`Ignoring invalid DATERANGE tag: "${qn}"`),Ie.tagList.push(["EXT-X-DATERANGE",qn]);break}case"DEFINE":{{const ur=new Fn(qn,u);"IMPORT"in ur?Sn(u,ur,s):Hn(u,ur,t)}break}case"DISCONTINUITY-SEQUENCE":u.startCC!==0?mi(u,cr,st):d.length>0&&Wi(u,cr,st),u.startCC=Y=parseInt(qn);break;case"KEY":{const ur=Mi(qn,t,u);if(ur.isSupported()){if(ur.method==="NONE"){Mt=void 0;break}Mt||(Mt={}),Mt[ur.keyFormat]&&(Mt=h({},Mt)),Mt[ur.keyFormat]=ur}else G.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${qn}"`);break}case"START":u.startTimeOffset=pi(qn);break;case"MAP":{const ur=new Fn(qn,u);if(Ie.duration){const bn=new pe(r,c);rs(bn,ur,n,Mt),b=bn,Ie.initSegment=b,b.rawProgramDateTime&&!Ie.rawProgramDateTime&&(Ie.rawProgramDateTime=b.rawProgramDateTime)}else{const bn=Ie.byteRangeEndOffset;if(bn){const Dn=Ie.byteRangeStartOffset;Ht=`${bn-Dn}@${Dn}`}else Ht=null;rs(Ie,ur,n,Mt),b=Ie,At=!0}b.cc=Y;break}case"SERVER-CONTROL":{mt&&mi(u,cr,st),mt=new Fn(qn),u.canBlockReload=mt.bool("CAN-BLOCK-RELOAD"),u.canSkipUntil=mt.optionalFloat("CAN-SKIP-UNTIL",0),u.canSkipDateRanges=u.canSkipUntil>0&&mt.bool("CAN-SKIP-DATERANGES"),u.partHoldBack=mt.optionalFloat("PART-HOLD-BACK",0),u.holdBack=mt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{u.partTarget&&mi(u,cr,st);const ur=new Fn(qn);u.partTarget=ur.decimalFloatingPoint("PART-TARGET");break}case"PART":{let ur=u.partList;ur||(ur=u.partList=[]);const bn=D>0?ur[ur.length-1]:void 0,Dn=D++,Ar=new Fn(qn,u),br=new He(Ar,Ie,c,Dn,bn);ur.push(br),Ie.duration+=br.duration;break}case"PRELOAD-HINT":{const ur=new Fn(qn,u);u.preloadHint=ur;break}case"RENDITION-REPORT":{const ur=new Fn(qn,u);u.renditionReports=u.renditionReports||[],u.renditionReports.push(ur);break}default:G.warn(`line parsed but not handled: ${st}`);break}}}Me&&!Me.relurl?(d.pop(),X-=Me.duration,u.partList&&(u.fragmentHint=Me)):u.partList&&(Ti(Ie,Me,p),Ie.cc=Y,u.fragmentHint=Ie,Mt&&Ui(Ie,Mt,u)),u.targetduration||(u.playlistParsingError=new Error("#EXT-X-TARGETDURATION is required"));const En=d.length,Mn=d[0],Lr=d[En-1];if(X+=u.skippedSegments*u.targetduration,X>0&&En&&Lr){u.averagetargetduration=X/En;const vr=Lr.sn;u.endSN=vr!=="initSegment"?vr:0,u.live||(Lr.endList=!0),Mn&&u.startCC===void 0&&(u.startCC=Mn.cc),ct>0&&(ns(d,ct),Mn&&p.unshift(Mn))}else u.endSN=0,u.startCC=0;return u.fragmentHint&&(X+=u.fragmentHint.duration),u.totalduration=X,p.length&&u.dateRangeTagCount&&Mn&&Li(p,u),u.endCC=Y,u}}function Li(a,e){const t=a.length,n=a[t-1],r=e.live?1/0:e.totalduration,i=Object.keys(e.dateRanges);for(let s=i.length;s--;){const l=e.dateRanges[i[s]],c=l.startDate.getTime();l.tagAnchor=n.ref;for(let u=t;u--;){const d=Ni(e,c,a,u,r);if(d!==-1){l.tagAnchor=e.fragments[d].ref;break}}}}function Ni(a,e,t,n,r){const i=t[n];if(i){const l=i.programDateTime;if(e>=l||n===0){var s;const c=(((s=t[n+1])==null?void 0:s.start)||r)-i.start;if(e<=l+c*1e3){const u=t[n].sn-a.startSN,d=a.fragments;if(d.length>t.length){const b=(t[n+1]||d[d.length-1]).sn-a.startSN;for(let w=b;w>u;w--){const D=d[w].programDateTime;if(e>=D&&e<D+d[w].duration*1e3)return w}}return u}}}return-1}function Mi(a,e,t){var n,r;const i=new Fn(a,t),s=(n=i.METHOD)!=null?n:"",l=i.URI,c=i.hexadecimalInteger("IV"),u=i.KEYFORMATVERSIONS,d=(r=i.KEYFORMAT)!=null?r:"identity";l&&i.IV&&!c&&G.error(`Invalid IV: ${i.IV}`);const p=l?ui.resolve(l,e):"",b=(u||"1").split("/").map(Number).filter(Number.isFinite);return new qr(s,p,d,b,c)}function pi(a){const t=new Fn(a).decimalFloatingPoint("TIME-OFFSET");return x(t)?t:null}function Bi(a,e){let t=(a||"").split(/[ ,]+/).filter(n=>n);["video","audio","text"].forEach(n=>{const r=t.filter(i=>Ne(i,n));r.length&&(e[`${n}Codec`]=r.map(i=>i.split("/")[0]).join(","),t=t.filter(i=>r.indexOf(i)===-1))}),e.unknownCodecs=t}function Ai(a,e,t){const n=e[t];n&&(a[t]=n)}function ns(a,e){let t=a[e];for(let n=e;n--;){const r=a[n];if(!r)return;r.programDateTime=t.programDateTime-r.duration*1e3,t=r}}function Ti(a,e,t){a.rawProgramDateTime?t.push(a):e!=null&&e.programDateTime&&(a.programDateTime=e.endProgramDateTime)}function rs(a,e,t,n){a.relurl=e.URI,e.BYTERANGE&&a.setByteRange(e.BYTERANGE),a.level=t,a.sn="initSegment",n&&(a.levelkeys=n),a.initSegment=null}function Ui(a,e,t){a.levelkeys=e;const{encryptedFragments:n}=t;(!n.length||n[n.length-1].levelkeys!==e)&&Object.keys(e).some(r=>e[r].isCommonEncryption)&&n.push(a)}function mi(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must not appear more than once (${t[0]})`)}function Wi(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must appear before the first Media Segment (${t[0]})`)}function Ki(a,e){const t=e.startPTS;if(x(t)){let n=0,r;e.sn>a.sn?(n=t-a.start,r=a):(n=a.start-t,r=e),r.duration!==n&&r.setDuration(n)}else e.sn>a.sn?a.cc===e.cc&&a.minEndPTS?e.setStart(a.start+(a.minEndPTS-a.start)):e.setStart(a.start+a.duration):e.setStart(Math.max(a.start-e.duration,0))}function ki(a,e,t,n,r,i){n-t<=0&&(G.warn("Fragment should have a positive duration",e),n=t+e.duration,i=r+e.duration);let l=t,c=n;const u=e.startPTS,d=e.endPTS;if(x(u)){const Y=Math.abs(u-t);x(e.deltaPTS)?e.deltaPTS=Math.max(Y,e.deltaPTS):e.deltaPTS=Y,l=Math.max(t,u),t=Math.min(t,u),r=Math.min(r,e.startDTS),c=Math.min(n,d),n=Math.max(n,d),i=Math.max(i,e.endDTS)}const p=t-e.start;e.start!==0&&e.setStart(t),e.setDuration(n-e.start),e.startPTS=t,e.maxStartPTS=l,e.startDTS=r,e.endPTS=n,e.minEndPTS=c,e.endDTS=i;const b=e.sn;if(!a||b<a.startSN||b>a.endSN)return 0;let w;const D=b-a.startSN,X=a.fragments;for(X[D]=e,w=D;w>0;w--)Ki(X[w],X[w-1]);for(w=D;w<X.length-1;w++)Ki(X[w],X[w+1]);return a.fragmentHint&&Ki(X[X.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,p}function si(a,e){if(a===e)return;let t=null;const n=a.fragments;for(let c=n.length-1;c>=0;c--){const u=n[c].initSegment;if(u){t=u;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;let r;Er(a,e,(c,u,d,p)=>{if(!e.startCC&&u.cc!==c.cc){var b,w;const D=c.cc-u.cc;for(let X=d;X<p.length;X++)p[X].cc+=D;e.startCC=(b=(w=di(a,e.startSN-1))==null?void 0:w.cc)!=null?b:p[0].cc,e.endCC=p[p.length-1].cc}x(c.startPTS)&&x(c.endPTS)&&(u.setStart(u.startPTS=c.startPTS),u.startDTS=c.startDTS,u.maxStartPTS=c.maxStartPTS,u.endPTS=c.endPTS,u.endDTS=c.endDTS,u.minEndPTS=c.minEndPTS,u.setDuration(c.endPTS-c.startPTS),u.duration&&(r=u),e.PTSKnown=e.alignedSliding=!0),c.hasStreams&&(u.elementaryStreams=c.elementaryStreams),u.loader=c.loader,c.hasStats&&(u.stats=c.stats),c.initSegment&&(u.initSegment=c.initSegment,t=c.initSegment)});const i=e.fragments,s=e.fragmentHint?i.concat(e.fragmentHint):i;if(t&&s.forEach(c=>{var u;c&&(!c.initSegment||c.initSegment.relurl===((u=t)==null?void 0:u.relurl))&&(c.initSegment=t)}),e.skippedSegments)if(e.deltaUpdateFailed=i.some(c=>!c),e.deltaUpdateFailed){G.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let c=e.skippedSegments;c--;)i.shift();e.startSN=i[0].sn}else{e.endCC=i[i.length-1].cc,e.canSkipDateRanges&&(e.dateRanges=ti(a.dateRanges,e));const c=a.fragments.filter(u=>u.rawProgramDateTime);if(a.hasProgramDateTime&&!e.hasProgramDateTime)for(let u=1;u<s.length;u++)s[u].programDateTime===null&&Ti(s[u],s[u-1],c);Li(c,e)}wr(a.partList,e.partList,(c,u)=>{u.elementaryStreams=c.elementaryStreams,u.stats=c.stats}),r?ki(e,r,r.startPTS,r.endPTS,r.startDTS,r.endDTS):Gr(a,e),i.length&&(e.totalduration=e.edge-i[0].start),e.driftStartTime=a.driftStartTime,e.driftStart=a.driftStart;const l=e.advancedDateTime;if(e.advanced&&l){const c=e.edge;e.driftStart||(e.driftStartTime=l,e.driftStart=c),e.driftEndTime=l,e.driftEnd=c}else e.driftEndTime=a.driftEndTime,e.driftEnd=a.driftEnd,e.advancedDateTime=a.advancedDateTime;e.requestScheduled===-1&&(e.requestScheduled=a.requestScheduled)}function ti(a,e){const{dateRanges:t,recentlyRemovedDateranges:n}=e,r=h({},a);n&&n.forEach(l=>{delete r[l]});const s=Object.keys(r).length;return s&&Object.keys(t).forEach(l=>{const c=r[l],u=new zr(t[l].attr,c);u.isValid?(r[l]=u,c||(u.tagOrder+=s)):G.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${Et(t[l].attr)}"`)}),r}function wr(a,e,t){if(a&&e){let n=0;for(let r=0,i=a.length;r<=i;r++){const s=a[r],l=e[r+n];s&&l&&s.index===l.index&&s.fragment.sn===l.fragment.sn?t(s,l):n--}}}function Er(a,e,t){const n=e.skippedSegments,r=Math.max(a.startSN,e.startSN)-e.startSN,i=(a.fragmentHint?1:0)+(n?e.endSN:Math.min(a.endSN,e.endSN))-e.startSN,s=e.startSN-a.startSN,l=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,c=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments;for(let u=r;u<=i;u++){const d=c[s+u];let p=l[u];if(n&&!p&&d&&(p=e.fragments[u]=d),d&&p){if(t(d,p,u,l),d.url&&d.url!==p.url){e.playlistParsingError=Yr(`media sequence mismatch ${p.sn}:`,a,e,d,p);return}else if(d.cc!==p.cc){e.playlistParsingError=Yr(`discontinuity sequence mismatch (${d.cc}!=${p.cc})`,a,e,d,p);return}}}}function Yr(a,e,t,n,r){return new Error(`${a} ${r.url}
|
|
Playlist starting @${e.startSN}
|
|
${e.m3u8}
|
|
|
|
Playlist starting @${t.startSN}
|
|
${t.m3u8}`)}function Gr(a,e,t=!0){const n=e.startSN+e.skippedSegments-a.startSN,r=a.fragments,i=n>=0;let s=0;if(i&&n<r.length)s=r[n].start;else if(i&&e.startSN===a.endSN+1)s=a.fragmentEnd;else if(i&&t)s=a.fragmentStart+n*e.levelTargetDuration;else if(!e.skippedSegments&&e.fragmentStart===0)s=a.fragmentStart;else return;Wr(e,s)}function Wr(a,e){if(e){const t=a.fragments;for(let n=a.skippedSegments;n<t.length;n++)t[n].addStart(e);a.fragmentHint&&a.fragmentHint.addStart(e)}}function Xr(a,e=1/0){let t=1e3*a.targetduration;if(a.updated){const n=a.fragments;if(n.length&&t*4>e){const i=n[n.length-1].duration*1e3;i<t&&(t=i)}}else t/=2;return Math.round(t)}function di(a,e,t){if(!a)return null;let n=a.fragments[e-a.startSN];return n||(n=a.fragmentHint,n&&n.sn===e)?n:e<a.startSN&&t&&t.sn===e?t:null}function fi(a,e,t){return a?vi(a.partList,e,t):null}function vi(a,e,t){if(a)for(let n=a.length;n--;){const r=a[n];if(r.index===t&&r.fragment.sn===e)return r}return null}function Qr(a){a.forEach((e,t)=>{var n;(n=e.details)==null||n.fragments.forEach(r=>{r.level=t,r.initSegment&&(r.initSegment.level=t)})})}function ii(a,e){for(let n=0,r=a.length;n<r;n++){var t;if(((t=a[n])==null?void 0:t.cc)===e)return a[n]}return null}function Di(a,e){return!!(a&&e.startCC<a.endCC&&e.endCC>a.startCC)}function _i(a,e){if(a){const t=a.start+e;a.start=a.startPTS=t,a.endPTS=t+a.duration}}function is(a,e){const t=e.fragments;for(let n=0,r=t.length;n<r;n++)_i(t[n],a);e.fragmentHint&&_i(e.fragmentHint,a),e.alignedSliding=!0}function bs(a,e){a&&($r(e,a),!e.alignedSliding&&a&&Or(e,a),!e.alignedSliding&&a&&!e.skippedSegments&&Gr(a,e,!1))}function $r(a,e){if(!Di(e,a))return;const t=Math.min(e.endCC,a.endCC),n=ii(e.fragments,t),r=ii(a.fragments,t);if(!n||!r)return;G.log(`Aligning playlist at start of dicontinuity sequence ${t}`);const i=n.start-r.start;is(i,a)}function Or(a,e){if(!a.hasProgramDateTime||!e.hasProgramDateTime)return;const t=a.fragments,n=e.fragments;if(!t.length||!n.length)return;let r,i;const s=Math.min(e.endCC,a.endCC);e.startCC<s&&a.startCC<s&&(r=ii(n,s),i=ii(t,s)),(!r||!i)&&(r=n[Math.floor(n.length/2)],i=ii(t,r.cc)||t[Math.floor(t.length/2)]);const l=r.programDateTime,c=i.programDateTime;if(!l||!c)return;const u=(c-l)/1e3-(i.start-r.start);is(u,a)}const Vr={toString:function(a){let e="";const t=a.length;for(let n=0;n<t;n++)e+=`[${a.start(n).toFixed(3)}-${a.end(n).toFixed(3)}]`;return e}},Kt={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"};class ni extends dr{constructor(e,t,n,r,i){super(r,e.logger),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=Kt.STOPPED,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.buffering=!0,this.loadingParts=!1,this.loopSn=void 0,this.onMediaSeeking=()=>{const{config:s,fragCurrent:l,media:c,mediaBuffer:u,state:d}=this,p=c?c.currentTime:0,b=hn.bufferInfo(u||c,p,s.maxBufferHole);if(this.log(`media seeking to ${x(p)?p.toFixed(3):p}, state: ${d}`),this.state===Kt.ENDED)this.resetLoadingState();else if(l){const w=s.maxFragLookUpTolerance,D=l.start-w,X=l.start+l.duration+w;if(!b.len||X<b.start||D>b.end){const Y=p>X;(p<D||Y)&&(Y&&l.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),l.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}if(c){this.fragmentTracker.removeFragmentsInRange(p,1/0,this.playlistType,!0);const w=this.lastCurrentTime;if(p>w&&(this.lastCurrentTime=p),!this.loadingParts){const D=Math.max(b.end,p),X=this.shouldLoadParts(this.getLevelDetails(),D);X&&(this.log(`LL-Part loading ON after seeking to ${p.toFixed(2)} with buffer @${D.toFixed(2)}`),this.loadingParts=X)}}!this.hls.hasEnoughToStart&&!b.len&&(this.log(`setting startPosition to ${p} because of seek before start`),this.nextLoadPosition=this.startPosition=p),this.tickImmediate()},this.onMediaEnded=()=>{this.log("setting startPosition to 0 because media ended"),this.startPosition=this.lastCurrentTime=0},this.playlistType=i,this.hls=e,this.fragmentLoader=new Pn(e.config),this.keyLoader=n,this.fragmentTracker=t,this.config=e.config,this.decrypter=new vn(e.config)}registerListeners(){const{hls:e}=this;e.on(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(f.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(f.ERROR,this.onError,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){if(this.state===Kt.STOPPED)return;this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);const e=this.fragCurrent;e!=null&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=Kt.STOPPED}get startPositionValue(){const{nextLoadPosition:e,startPosition:t}=this;return t===-1&&e?e:t}get bufferingEnabled(){return this.buffering}pauseBuffering(){this.buffering=!1}resumeBuffering(){this.buffering=!0}get inFlightFrag(){return{frag:this.fragCurrent,state:this.state}}_streamEnded(e,t){if(t.live||!this.media)return!1;const n=e.end||0,r=this.config.timelineOffset||0;if(n<=r)return!1;const i=e.nextStart;if(i&&i>r&&i<t.edge||this.media.currentTime<e.start)return!1;const l=t.partList;if(l!=null&&l.length){const u=l[l.length-1];return hn.isBuffered(this.media,u.start+u.duration/2)}const c=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(c)}getLevelDetails(){if(this.levels&&this.levelLastLoaded!==null){var e;return(e=this.levelLastLoaded)==null?void 0:e.details}}get timelineOffset(){const e=this.config.timelineOffset;if(e){var t;return((t=this.getLevelDetails())==null?void 0:t.appliedTimelineOffset)||e}return 0}onMediaAttached(e,t){const n=this.media=this.mediaBuffer=t.media;n.removeEventListener("seeking",this.onMediaSeeking),n.removeEventListener("ended",this.onMediaEnded),n.addEventListener("seeking",this.onMediaSeeking),n.addEventListener("ended",this.onMediaEnded);const r=this.config;this.levels&&r.autoStartLoad&&this.state===Kt.STOPPED&&this.startLoad(r.startPosition)}onMediaDetaching(e,t){const n=!!t.transferMedia,r=this.media;if(r!==null){if(r.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),r.removeEventListener("seeking",this.onMediaSeeking),r.removeEventListener("ended",this.onMediaEnded),this.keyLoader&&!n&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loopSn=void 0,n){this.resetLoadingState(),this.resetTransmuxer();return}this.loadingParts=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}}onManifestLoading(){this.initPTS=[],this.levels=this.levelLastLoaded=this.fragCurrent=null,this.lastCurrentTime=this.startPosition=0,this.startFragRequested=!1}onError(e,t){}onManifestLoaded(e,t){this.startTimeOffset=t.startTimeOffset}onHandlerDestroying(){this.stopLoad(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),super.onHandlerDestroying(),this.hls=this.onMediaSeeking=this.onMediaEnded=null}onHandlerDestroyed(){this.state=Kt.STOPPED,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,super.onHandlerDestroyed()}loadFragment(e,t,n){this.startFragRequested=!0,this._loadFragForPlayback(e,t,n)}_loadFragForPlayback(e,t,n){const r=i=>{const s=i.frag;if(this.fragContextChanged(s)){this.warn(`${s.type} sn: ${s.sn}${i.part?" part: "+i.part.index:""} of ${this.fragInfo(s,!1,i.part)}) was dropped during download.`),this.fragmentTracker.removeFragment(s);return}s.stats.chunkCount++,this._handleFragmentLoadProgress(i)};this._doFragLoad(e,t,n,r).then(i=>{if(!i)return;const s=this.state,l=i.frag;if(this.fragContextChanged(l)){(s===Kt.FRAG_LOADING||!this.fragCurrent&&s===Kt.PARSING)&&(this.fragmentTracker.removeFragment(l),this.state=Kt.IDLE);return}"payload"in i&&(this.log(`Loaded ${l.type} sn: ${l.sn} of ${this.playlistLabel()} ${l.level}`),this.hls.trigger(f.FRAG_LOADED,i)),this._handleFragmentLoadComplete(i)}).catch(i=>{this.state===Kt.STOPPED||this.state===Kt.ERROR||(this.warn(`Frag error: ${(i==null?void 0:i.message)||i}`),this.resetFragmentLoading(e))})}clearTrackerIfNeeded(e){var t;const{fragmentTracker:n}=this;if(n.getState(e)===We.APPENDING){const i=e.type,s=this.getFwdBufferInfo(this.mediaBuffer,i),l=Math.max(e.duration,s?s.len:this.config.maxBufferLength),c=this.backtrackFragment;((c?e.sn-c.sn:0)===1||this.reduceMaxBufferLength(l,e.duration))&&n.removeFragment(e)}else((t=this.mediaBuffer)==null?void 0:t.buffered.length)===0?n.removeAllFragments():n.hasParts(e.type)&&(n.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),n.getState(e)===We.PARTIAL&&n.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}waitForLive(e){const t=e.details;return(t==null?void 0:t.live)&&t.type!=="EVENT"&&(this.levelLastLoaded!==e||t.expired)}flushMainBuffer(e,t,n=null){if(!(e-t))return;const r={startOffset:e,endOffset:t,type:n};this.hls.trigger(f.BUFFER_FLUSHING,r)}_loadInitSegment(e,t){this._doFragLoad(e,t).then(n=>{const r=n==null?void 0:n.frag;if(!r||this.fragContextChanged(r)||!this.levels)throw new Error("init load aborted");return n}).then(n=>{const{hls:r}=this,{frag:i,payload:s}=n,l=i.decryptdata;if(s&&s.byteLength>0&&l!=null&&l.key&&l.iv&&Zr(l.method)){const c=self.performance.now();return this.decrypter.decrypt(new Uint8Array(s),l.key.buffer,l.iv.buffer,Br(l.method)).catch(u=>{throw r.trigger(f.ERROR,{type:fe.MEDIA_ERROR,details:F.FRAG_DECRYPT_ERROR,fatal:!1,error:u,reason:u.message,frag:i}),u}).then(u=>{const d=self.performance.now();return r.trigger(f.FRAG_DECRYPTED,{frag:i,payload:u,stats:{tstart:c,tdecrypt:d}}),n.payload=u,this.completeInitSegmentLoad(n)})}return this.completeInitSegmentLoad(n)}).catch(n=>{this.state===Kt.STOPPED||this.state===Kt.ERROR||(this.warn(n),this.resetFragmentLoading(e))})}completeInitSegmentLoad(e){const{levels:t}=this;if(!t)throw new Error("init load aborted, missing levels");const n=e.frag.stats;this.state!==Kt.STOPPED&&(this.state=Kt.IDLE),e.frag.data=new Uint8Array(e.payload),n.parsing.start=n.buffering.start=self.performance.now(),n.parsing.end=n.buffering.end=self.performance.now(),this.tick()}fragContextChanged(e){const{fragCurrent:t}=this;return!e||!t||e.sn!==t.sn||e.level!==t.level}fragBufferedComplete(e,t){const n=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)} > buffer:${n?Vr.toString(hn.getBuffered(n)):"(detached)"})`),se(e)){var r;if(e.type!==te.SUBTITLE){const s=e.elementaryStreams;if(!Object.keys(s).some(l=>!!s[l])){this.state=Kt.IDLE;return}}const i=(r=this.levels)==null?void 0:r[e.level];i!=null&&i.fragmentError&&(this.log(`Resetting level fragment error count of ${i.fragmentError} on frag buffered`),i.fragmentError=0)}this.state=Kt.IDLE}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:n,part:r,partsLoaded:i}=e,s=!i||i.length===0||i.some(c=>!c),l=new ir(n.level,n.sn,n.stats.chunkCount+1,0,r?r.index:-1,!s);t.flush(l)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,n=null,r){var i;this.fragCurrent=e;const s=t==null?void 0:t.details;if(!this.levels||!s)throw new Error(`frag load aborted, missing level${s?"":" detail"}s`);let l=null;e.encrypted&&!((i=e.decryptdata)!=null&&i.key)?(this.log(`Loading key for ${e.sn} of [${s.startSN}-${s.endSN}], ${this.playlistLabel()} ${e.level}`),this.state=Kt.KEY_LOADING,this.fragCurrent=e,l=this.keyLoader.load(e).then(p=>{if(!this.fragContextChanged(p.frag))return this.hls.trigger(f.KEY_LOADED,p),this.state===Kt.KEY_LOADING&&(this.state=Kt.IDLE),p}),this.hls.trigger(f.KEY_LOADING,{frag:e}),this.fragCurrent===null&&(l=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))):!e.encrypted&&s.encryptedFragments.length&&this.keyLoader.loadClear(e,s.encryptedFragments);const c=this.fragPrevious;if(se(e)&&(!c||e.sn!==c.sn)){const p=this.shouldLoadParts(t.details,e.end);p!==this.loadingParts&&(this.log(`LL-Part loading ${p?"ON":"OFF"} loading sn ${c==null?void 0:c.sn}->${e.sn}`),this.loadingParts=p)}if(n=Math.max(e.start,n||0),this.loadingParts&&se(e)){const p=s.partList;if(p&&r){n>e.end&&s.fragmentHint&&(e=s.fragmentHint);const b=this.getNextPart(p,e,n);if(b>-1){const w=p[b];e=this.fragCurrent=w.fragment,this.log(`Loading ${e.type} sn: ${e.sn} part: ${w.index} (${b}/${p.length-1}) of ${this.fragInfo(e,!1,w)}) cc: ${e.cc} [${s.startSN}-${s.endSN}], target: ${parseFloat(n.toFixed(3))}`),this.nextLoadPosition=w.start+w.duration,this.state=Kt.FRAG_LOADING;let D;return l?D=l.then(X=>!X||this.fragContextChanged(X.frag)?null:this.doFragPartsLoad(e,w,t,r)).catch(X=>this.handleFragLoadError(X)):D=this.doFragPartsLoad(e,w,t,r).catch(X=>this.handleFragLoadError(X)),this.hls.trigger(f.FRAG_LOADING,{frag:e,part:w,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):D}else if(!e.url||this.loadedEndOfParts(p,n))return Promise.resolve(null)}}if(se(e)&&this.loadingParts)this.log(`LL-Part loading OFF after next part miss @${n.toFixed(2)}`),this.loadingParts=!1;else if(!e.url)return Promise.resolve(null);this.log(`Loading ${e.type} sn: ${e.sn} of ${this.fragInfo(e,!1)}) cc: ${e.cc} ${s?"["+s.startSN+"-"+s.endSN+"]":""}, target: ${parseFloat(n.toFixed(3))}`),x(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Kt.FRAG_LOADING;const u=this.config.progressive;let d;return u&&l?d=l.then(p=>!p||this.fragContextChanged(p==null?void 0:p.frag)?null:this.fragmentLoader.load(e,r)).catch(p=>this.handleFragLoadError(p)):d=Promise.all([this.fragmentLoader.load(e,u?r:void 0),l]).then(([p])=>(!u&&p&&r&&r(p),p)).catch(p=>this.handleFragLoadError(p)),this.hls.trigger(f.FRAG_LOADING,{frag:e,targetBufferTime:n}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):d}doFragPartsLoad(e,t,n,r){return new Promise((i,s)=>{var l;const c=[],u=(l=n.details)==null?void 0:l.partList,d=p=>{this.fragmentLoader.loadPart(e,p,r).then(b=>{c[p.index]=b;const w=b.part;this.hls.trigger(f.FRAG_LOADED,b);const D=fi(n.details,e.sn,p.index+1)||vi(u,e.sn,p.index+1);if(D)d(D);else return i({frag:e,part:w,partsLoaded:c})}).catch(s)};d(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;e.data&&t.details===F.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(f.ERROR,t)}else this.hls.trigger(f.ERROR,{type:fe.OTHER_ERROR,details:F.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==Kt.PARSING){!this.fragCurrent&&this.state!==Kt.STOPPED&&this.state!==Kt.ERROR&&(this.state=Kt.IDLE);return}const{frag:n,part:r,level:i}=t,s=self.performance.now();n.stats.parsing.end=s,r&&(r.stats.parsing.end=s);const l=this.getLevelDetails(),u=l&&n.sn>l.endSN||this.shouldLoadParts(l,n.end);u!==this.loadingParts&&(this.log(`LL-Part loading ${u?"ON":"OFF"} after parsing segment ending @${n.end.toFixed(2)}`),this.loadingParts=u),this.updateLevelTiming(n,r,i,e.partial)}shouldLoadParts(e,t){if(this.config.lowLatencyMode){if(!e)return this.loadingParts;if(e!=null&&e.partList){var n;const i=e.partList[0],s=i.end+(((n=e.fragmentHint)==null?void 0:n.duration)||0);if(t>=s){var r;if((this.hls.hasEnoughToStart?((r=this.media)==null?void 0:r.currentTime)||this.lastCurrentTime:this.getLoadPosition())>i.start-i.fragment.duration)return!0}}}return!1}getCurrentContext(e){const{levels:t,fragCurrent:n}=this,{level:r,sn:i,part:s}=e;if(!(t!=null&&t[r]))return this.warn(`Levels object was unset while buffering fragment ${i} of ${this.playlistLabel()} ${r}. The current chunk will not be buffered.`),null;const l=t[r],c=l.details,u=s>-1?fi(c,i,s):null,d=u?u.fragment:di(c,i,n);return d?(n&&n!==d&&(d.stats=n.stats),{frag:d,part:u,level:l}):null}bufferFragmentData(e,t,n,r,i){var s;if(!e||this.state!==Kt.PARSING)return;const{data1:l,data2:c}=e;let u=l;if(l&&c&&(u=Fe(l,c)),!((s=u)!=null&&s.length))return;const d={type:e.type,frag:t,part:n,chunkMeta:r,parent:t.type,data:u};if(this.hls.trigger(f.BUFFER_APPENDING,d),e.dropped&&e.independent&&!n){if(i)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!hn.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const n=t.currentTime,r=hn.bufferInfo(t,n,0),i=e.duration,s=Math.min(this.config.maxFragLookUpTolerance*2,i*.25),l=Math.max(Math.min(e.start-s,r.end-s),n+s);e.start-l>s&&this.flushMainBuffer(l,e.start)}getFwdBufferInfo(e,t){var n;const r=this.getLoadPosition();if(!x(r))return null;const s=this.lastCurrentTime>r||(n=this.media)!=null&&n.paused?0:this.config.maxBufferHole;return this.getFwdBufferInfoAtPos(e,r,t,s)}getFwdBufferInfoAtPos(e,t,n,r){const i=hn.bufferInfo(e,t,r);if(i.len===0&&i.nextStart!==void 0){const s=this.fragmentTracker.getBufferedFrag(t,n);if(s&&(i.nextStart<=s.end||s.gap)){const l=Math.max(Math.min(i.nextStart,s.end)-t,r);return hn.bufferInfo(e,t,l)}}return i}getMaxBufferLength(e){const{config:t}=this;let n;return e?n=Math.max(8*t.maxBufferSize/e,t.maxBufferLength):n=t.maxBufferLength,Math.min(n,t.maxMaxBufferLength)}reduceMaxBufferLength(e,t){const n=this.config,r=Math.max(Math.min(e-t,n.maxBufferLength),t),i=Math.max(e-t*3,n.maxMaxBufferLength/2,r);return i>=r?(n.maxMaxBufferLength=i,this.warn(`Reduce max buffer length to ${i}s`),!0):!1}getAppendedFrag(e,t=te.MAIN){var n;const r=(n=this.fragmentTracker)==null?void 0:n.getAppendedFrag(e,t);return r&&"fragment"in r?r.fragment:r}getNextFragment(e,t){const n=t.fragments,r=n.length;if(!r)return null;const{config:i}=this,s=n[0].start,l=i.lowLatencyMode&&!!t.partList;let c=null;if(t.live){const p=i.initialLiveManifestSize;if(r<p)return this.warn(`Not enough fragments to start playback (have: ${r}, need: ${p})`),null;if(!t.PTSKnown&&!this.startFragRequested&&this.startPosition===-1||e<s){var u;l&&!this.loadingParts&&(this.log("LL-Part loading ON for initial live fragment"),this.loadingParts=!0),c=this.getInitialLiveFragment(t,n);const b=this.hls.startPosition,w=this.hls.liveSyncPosition,D=c?(b!==-1&&b>=s?b:w)||c.start:e;this.log(`Setting startPosition to ${D} to match start frag at live edge. mainStart: ${b} liveSyncPosition: ${w} frag.start: ${(u=c)==null?void 0:u.start}`),this.startPosition=this.nextLoadPosition=D}}else e<=s&&(c=n[0]);if(!c){const p=this.loadingParts?t.partEnd:t.fragmentEnd;c=this.getFragmentAtPosition(e,p,t)}let d=this.filterReplacedPrimary(c,t);if(!d&&c){const p=c.sn-t.startSN;d=this.filterReplacedPrimary(n[p+1]||null,t)}return this.mapToInitFragWhenRequired(d)}isLoopLoading(e,t){const n=this.fragmentTracker.getState(e);return(n===We.OK||n===We.PARTIAL&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,n,r,i){let s=null;if(e.gap&&(s=this.getNextFragment(this.nextLoadPosition,t),s&&!s.gap&&n.nextStart)){const l=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,n.nextStart,r,0);if(l!==null&&n.len+l.len>=i){const c=s.sn;return this.loopSn!==c&&(this.log(`buffer full after gaps in "${r}" playlist starting at sn: ${c}`),this.loopSn=c),null}}return this.loopSn=void 0,s}get primaryPrefetch(){if(yi(this.hls.config)){var e,t;if((e=this.hls.interstitialsManager)==null||(t=e.playingItem)==null?void 0:t.event)return!0}return!1}filterReplacedPrimary(e,t){if(!e)return e;if(yi(this.hls.config)&&e.type!==te.SUBTITLE){const n=this.hls.interstitialsManager,r=n==null?void 0:n.bufferingItem;if(r){const s=r.event;if(s){if(s.appendInPlace||Math.abs(e.start-r.start)>1||r.start===0)return null}else if(e.end<=r.start&&(t==null?void 0:t.live)===!1||e.start>r.end&&r.nextEvent&&(r.nextEvent.appendInPlace||e.start-r.end>1))return null}const i=n==null?void 0:n.playerQueue;if(i)for(let s=i.length;s--;){const l=i[s].interstitial;if(l.appendInPlace&&e.start>=l.startTime&&e.end<=l.resumeTime)return null}}return e}mapToInitFragWhenRequired(e){return e!=null&&e.initSegment&&!(e!=null&&e.initSegment.data)&&!this.bitrateTest?e.initSegment:e}getNextPart(e,t,n){let r=-1,i=!1,s=!0;for(let l=0,c=e.length;l<c;l++){const u=e[l];if(s=s&&!u.independent,r>-1&&n<u.start)break;const d=u.loaded;d?r=-1:(i||u.independent||s)&&u.fragment===t&&(r=l),i=d}return r}loadedEndOfParts(e,t){const n=e[e.length-1];return n&&t>n.start&&n.loaded}getInitialLiveFragment(e,t){const n=this.fragPrevious;let r=null;if(n){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${n.programDateTime}`),r=un(t,n.endProgramDateTime,this.config.maxFragLookUpTolerance)),!r){const i=n.sn+1;if(i>=e.startSN&&i<=e.endSN){const s=t[i-e.startSN];n.cc===s.cc&&(r=s,this.log(`Live playlist, switching playlist, load frag with next SN: ${r.sn}`))}r||(r=In(t,n.cc),r&&this.log(`Live playlist, switching playlist, load frag with same CC: ${r.sn}`))}}else{const i=this.hls.liveSyncPosition;i!==null&&(r=this.getFragmentAtPosition(i,this.bitrateTest?e.fragmentEnd:e.edge,e))}return r}getFragmentAtPosition(e,t,n){const{config:r}=this;let{fragPrevious:i}=this,{fragments:s,endSN:l}=n;const{fragmentHint:c}=n,{maxFragLookUpTolerance:u}=r,d=n.partList,p=!!(this.loadingParts&&d!=null&&d.length&&c);p&&c&&!this.bitrateTest&&d[d.length-1].fragment.sn===c.sn&&(s=s.concat(c),l=c.sn);let b;if(e<t){var w;const X=e<this.lastCurrentTime||e>t-u||(w=this.media)!=null&&w.paused||!this.startFragRequested?0:u;b=Cn(i,s,e,X)}else b=s[s.length-1];if(b){const D=b.sn-n.startSN,X=this.fragmentTracker.getState(b);if((X===We.OK||X===We.PARTIAL&&b.gap)&&(i=b),i&&b.sn===i.sn&&(!p||d[0].fragment.sn>b.sn||!n.live&&!p)&&i&&b.level===i.level){const _e=s[D+1];b.sn<l&&this.fragmentTracker.getState(_e)!==We.OK?b=_e:b=null}}return b}alignPlaylists(e,t,n){const r=e.fragments.length;if(!r)return this.warn("No fragments in live playlist"),0;const i=e.fragmentStart,s=!t,l=e.alignedSliding&&x(i);if(s||!l&&!i){bs(n,e);const c=e.fragmentStart;return this.log(`Live playlist sliding: ${c.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} fragments: ${r}`),c}return i}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*3)}setStartPosition(e,t){let n=this.startPosition;n<t&&(n=-1);const r=this.timelineOffset;if(n===-1){const i=this.startTimeOffset!==null,s=i?this.startTimeOffset:e.startTimeOffset;s!==null&&x(s)?(n=t+s,s<0&&(n+=e.edge),n=Math.min(Math.max(t,n),t+e.totalduration),this.log(`Setting startPosition to ${n} for start time offset ${s} found in ${i?"multivariant":"media"} playlist`),this.startPosition=n):e.live?(n=this.hls.liveSyncPosition||t,this.log(`Setting startPosition to -1 to start at live edge ${n}`),this.startPosition=-1):(this.log("setting startPosition to 0 by default"),this.startPosition=n=0),this.lastCurrentTime=n+r}this.nextLoadPosition=n+r}getLoadPosition(){var e;const{media:t}=this;let n=0;return(e=this.hls)!=null&&e.hasEnoughToStart&&t?n=t.currentTime:this.nextLoadPosition>=0&&(n=this.nextLoadPosition),n}handleFragLoadAborted(e,t){this.transmuxer&&e.type===this.playlistType&&se(e)&&e.stats.aborted&&(this.warn(`Fragment ${e.sn}${t?" part "+t.index:""} of ${this.playlistLabel()} ${e.level} was aborted`),this.resetFragmentLoading(e))}resetFragmentLoading(e){(!this.fragCurrent||!this.fragContextChanged(e)&&this.state!==Kt.FRAG_LOADING_WAITING_RETRY)&&(this.state=Kt.IDLE)}onFragmentOrKeyLoadError(e,t){if(t.chunkMeta&&!t.frag){const D=this.getCurrentContext(t.chunkMeta);D&&(t.frag=D.frag)}const n=t.frag;if(!n||n.type!==e||!this.levels)return;if(this.fragContextChanged(n)){var r;this.warn(`Frag load error must match current frag to retry ${n.url} > ${(r=this.fragCurrent)==null?void 0:r.url}`);return}const i=t.details===F.FRAG_GAP;i&&this.fragmentTracker.fragBuffered(n,!0);const s=t.errorAction,{action:l,flags:c,retryCount:u=0,retryConfig:d}=s||{},p=!!s&&!!d,b=p&&l===or.RetryRequest,w=p&&!s.resolved&&c===ge.MoveAllAlternatesMatchingHost;if(!b&&w&&se(n)&&!n.endList)this.resetFragmentErrors(e),this.treatAsGap(n),s.resolved=!0;else if((b||w)&&u<d.maxNumRetry){this.resetStartWhenNotLoaded(this.levelLastLoaded);const D=yn(d,u);this.warn(`Fragment ${n.sn} of ${e} ${n.level} errored with ${t.details}, retrying loading ${u+1}/${d.maxNumRetry} in ${D}ms`),s.resolved=!0,this.retryDate=self.performance.now()+D,this.state=Kt.FRAG_LOADING_WAITING_RETRY}else if(d&&s)if(this.resetFragmentErrors(e),u<d.maxNumRetry)!i&&l!==or.RemoveAlternatePermanently&&(s.resolved=!0);else{this.warn(`${t.details} reached or exceeded max retry (${u})`);return}else l===or.SendAlternateToPenaltyBox?this.state=Kt.WAITING_LEVEL:this.state=Kt.ERROR;this.tickImmediate()}reduceLengthAndFlushBuffer(e){if(this.state===Kt.PARSING||this.state===Kt.PARSED){const t=e.frag,n=e.parent,r=this.getFwdBufferInfo(this.mediaBuffer,n),i=r&&r.len>.5;i&&this.reduceMaxBufferLength(r.len,(t==null?void 0:t.duration)||10);const s=!i;return s&&this.warn(`Buffer full error while media.currentTime is not buffered, flush ${n} buffer`),t&&(this.fragmentTracker.removeFragment(t),this.nextLoadPosition=t.start),this.resetLoadingState(),s}return!1}resetFragmentErrors(e){e===te.AUDIO&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==Kt.STOPPED&&(this.state=Kt.IDLE)}afterBufferFlushed(e,t,n){if(!e)return;const r=hn.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,r,n),this.state===Kt.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==Kt.STOPPED&&(this.state=Kt.IDLE)}resetStartWhenNotLoaded(e){if(!this.hls.hasEnoughToStart){this.startFragRequested=!1;const t=e?e.details:null;t!=null&&t.live?(this.log("resetting startPosition for live start"),this.startPosition=-1,this.setStartPosition(t,t.fragmentStart),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){this.warn(`The loading context changed while buffering fragment ${e.sn} of ${this.playlistLabel()} ${e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,t,n,r){const i=n.details;if(!i){this.warn("level.details undefined");return}if(!Object.keys(e.elementaryStreams).reduce((c,u)=>{const d=e.elementaryStreams[u];if(d){const p=d.endPTS-d.startPTS;if(p<=0)return this.warn(`Could not parse fragment ${e.sn} ${u} duration reliably (${p})`),c||!1;const b=r?0:ki(i,e,d.startPTS,d.endPTS,d.startDTS,d.endDTS);return this.hls.trigger(f.LEVEL_PTS_UPDATED,{details:i,level:n,drift:b,type:u,frag:e,start:d.startPTS,end:d.endPTS}),!0}return c},!1)){var l;if(n.fragmentError===0&&this.treatAsGap(e,n),((l=this.transmuxer)==null?void 0:l.error)===null){const c=new Error(`Found no media in fragment ${e.sn} of ${this.playlistLabel()} ${e.level} resetting transmuxer to fallback to playlist timing`);if(this.warn(c.message),this.hls.trigger(f.ERROR,{type:fe.MEDIA_ERROR,details:F.FRAG_PARSING_ERROR,fatal:!1,error:c,frag:e,reason:`Found no media in msn ${e.sn} of ${this.playlistLabel()} "${n.url}"`}),!this.hls)return;this.resetTransmuxer()}}this.state=Kt.PARSED,this.log(`Parsed ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)})`),this.hls.trigger(f.FRAG_PARSED,{frag:e,part:t})}playlistLabel(){return this.playlistType===te.MAIN?"level":"track"}fragInfo(e,t=!0,n){var r,i;return`${this.playlistLabel()} ${e.level} (${n?"part":"frag"}:[${((r=t&&!n?e.startPTS:(n||e).start)!=null?r:NaN).toFixed(3)}-${((i=t&&!n?e.endPTS:(n||e).end)!=null?i:NaN).toFixed(3)}]${n&&e.type==="main"?"INDEPENDENT="+(n.independent?"YES":"NO"):""}`}treatAsGap(e,t){t&&t.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)}resetTransmuxer(){var e;(e=this.transmuxer)==null||e.reset()}recoverWorkerError(e){e.event==="demuxerWorker"&&(this.fragmentTracker.removeAllFragments(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}function yi(a){return!!a.interstitialsController&&a.enableInterstitialPlayback!==!1}class ss{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:t}=this;let n;if(e.length)e.length===1?n=e[0]:n=xs(e,t);else return new Uint8Array(0);return this.reset(),n}reset(){this.chunks.length=0,this.dataLength=0}}function xs(a,e){const t=new Uint8Array(e);let n=0;for(let r=0;r<a.length;r++){const i=a[r];t.set(i,n),n+=i.length}return t}var as={exports:{}},os;function Vi(){return os||(os=1,function(a){var e=Object.prototype.hasOwnProperty,t="~";function n(){}Object.create&&(n.prototype=Object.create(null),new n().__proto__||(t=!1));function r(c,u,d){this.fn=c,this.context=u,this.once=d||!1}function i(c,u,d,p,b){if(typeof d!="function")throw new TypeError("The listener must be a function");var w=new r(d,p||c,b),D=t?t+u:u;return c._events[D]?c._events[D].fn?c._events[D]=[c._events[D],w]:c._events[D].push(w):(c._events[D]=w,c._eventsCount++),c}function s(c,u){--c._eventsCount===0?c._events=new n:delete c._events[u]}function l(){this._events=new n,this._eventsCount=0}l.prototype.eventNames=function(){var u=[],d,p;if(this._eventsCount===0)return u;for(p in d=this._events)e.call(d,p)&&u.push(t?p.slice(1):p);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(d)):u},l.prototype.listeners=function(u){var d=t?t+u:u,p=this._events[d];if(!p)return[];if(p.fn)return[p.fn];for(var b=0,w=p.length,D=new Array(w);b<w;b++)D[b]=p[b].fn;return D},l.prototype.listenerCount=function(u){var d=t?t+u:u,p=this._events[d];return p?p.fn?1:p.length:0},l.prototype.emit=function(u,d,p,b,w,D){var X=t?t+u:u;if(!this._events[X])return!1;var Y=this._events[X],_e=arguments.length,Me,Ie;if(Y.fn){switch(Y.once&&this.removeListener(u,Y.fn,void 0,!0),_e){case 1:return Y.fn.call(Y.context),!0;case 2:return Y.fn.call(Y.context,d),!0;case 3:return Y.fn.call(Y.context,d,p),!0;case 4:return Y.fn.call(Y.context,d,p,b),!0;case 5:return Y.fn.call(Y.context,d,p,b,w),!0;case 6:return Y.fn.call(Y.context,d,p,b,w,D),!0}for(Ie=1,Me=new Array(_e-1);Ie<_e;Ie++)Me[Ie-1]=arguments[Ie];Y.fn.apply(Y.context,Me)}else{var st=Y.length,ut;for(Ie=0;Ie<st;Ie++)switch(Y[Ie].once&&this.removeListener(u,Y[Ie].fn,void 0,!0),_e){case 1:Y[Ie].fn.call(Y[Ie].context);break;case 2:Y[Ie].fn.call(Y[Ie].context,d);break;case 3:Y[Ie].fn.call(Y[Ie].context,d,p);break;case 4:Y[Ie].fn.call(Y[Ie].context,d,p,b);break;default:if(!Me)for(ut=1,Me=new Array(_e-1);ut<_e;ut++)Me[ut-1]=arguments[ut];Y[Ie].fn.apply(Y[Ie].context,Me)}}return!0},l.prototype.on=function(u,d,p){return i(this,u,d,p,!1)},l.prototype.once=function(u,d,p){return i(this,u,d,p,!0)},l.prototype.removeListener=function(u,d,p,b){var w=t?t+u:u;if(!this._events[w])return this;if(!d)return s(this,w),this;var D=this._events[w];if(D.fn)D.fn===d&&(!b||D.once)&&(!p||D.context===p)&&s(this,w);else{for(var X=0,Y=[],_e=D.length;X<_e;X++)(D[X].fn!==d||b&&!D[X].once||p&&D[X].context!==p)&&Y.push(D[X]);Y.length?this._events[w]=Y.length===1?Y[0]:Y:s(this,w)}return this},l.prototype.removeAllListeners=function(u){var d;return u?(d=t?t+u:u,this._events[d]&&s(this,d)):(this._events=new n,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=t,l.EventEmitter=l,a.exports=l}(as)),as.exports}var ls=Vi(),Zi=O(ls);const us="1.6.2",cs={};function $s(){return typeof __HLS_WORKER_BUNDLE__=="function"}function js(){const a=cs[us];if(a)return a.clientCount++,a;const e=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),t=self.URL.createObjectURL(e),r={worker:new self.Worker(t),objectURL:t,clientCount:1};return cs[us]=r,r}function pa(a){const e=cs[a];if(e)return e.clientCount++,e;const t=new self.URL(a,self.location.href).href,r={worker:new self.Worker(t),scriptURL:t,clientCount:1};return cs[a]=r,r}function ma(a){const e=cs[a||us];if(e&&e.clientCount--===1){const{worker:n,objectURL:r}=e;delete cs[a||us],r&&self.URL.revokeObjectURL(r),n.terminate()}}function Ys(a,e){return e+10<=a.length&&a[e]===51&&a[e+1]===68&&a[e+2]===73&&a[e+3]<255&&a[e+4]<255&&a[e+6]<128&&a[e+7]<128&&a[e+8]<128&&a[e+9]<128}function Ss(a,e){return e+10<=a.length&&a[e]===73&&a[e+1]===68&&a[e+2]===51&&a[e+3]<255&&a[e+4]<255&&a[e+6]<128&&a[e+7]<128&&a[e+8]<128&&a[e+9]<128}function $i(a,e){let t=0;return t=(a[e]&127)<<21,t|=(a[e+1]&127)<<14,t|=(a[e+2]&127)<<7,t|=a[e+3]&127,t}function ji(a,e){const t=e;let n=0;for(;Ss(a,e);){n+=10;const r=$i(a,e+6);n+=r,Ys(a,e+10)&&(n+=10),e+=n}if(n>0)return a.subarray(t,t+n)}function Os(a,e,t,n){const r=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=e[t+2],s=i>>2&15;if(s>12){const w=new Error(`invalid ADTS sampling index:${s}`);a.emit(f.ERROR,f.ERROR,{type:fe.MEDIA_ERROR,details:F.FRAG_PARSING_ERROR,fatal:!0,error:w,reason:w.message});return}const l=(i>>6&3)+1,c=e[t+3]>>6&3|(i&1)<<2,u="mp4a.40."+l,d=r[s];let p=s;(l===5||l===29)&&(p-=3);const b=[l<<3|(p&14)>>1,(p&1)<<7|c<<3];return G.log(`manifest codec:${n}, parsed codec:${u}, channels:${c}, rate:${d} (ADTS object type:${l} sampling index:${s})`),{config:b,samplerate:d,channelCount:c,codec:u,parsedCodec:u,manifestCodec:n}}function Fs(a,e){return a[e]===255&&(a[e+1]&246)===240}function Ns(a,e){return a[e+1]&1?7:9}function ws(a,e){return(a[e+3]&3)<<11|a[e+4]<<3|(a[e+5]&224)>>>5}function Xs(a,e){return e+5<a.length}function As(a,e){return e+1<a.length&&Fs(a,e)}function Qs(a,e){return Xs(a,e)&&Fs(a,e)&&ws(a,e)<=a.length-e}function Ms(a,e){if(As(a,e)){const t=Ns(a,e);if(e+t>=a.length)return!1;const n=ws(a,e);if(n<=t)return!1;const r=e+n;return r===a.length||As(a,r)}return!1}function Bs(a,e,t,n,r){if(!a.samplerate){const i=Os(e,t,n,r);if(!i)return;h(a,i)}}function Ts(a){return 1024*9e4/a}function Js(a,e){const t=Ns(a,e);if(e+t<=a.length){const n=ws(a,e)-t;if(n>0)return{headerLength:t,frameLength:n}}}function qs(a,e,t,n,r){const i=Ts(a.samplerate),s=n+r*i,l=Js(e,t);let c;if(l){const{frameLength:p,headerLength:b}=l,w=b+p,D=Math.max(0,t+w-e.length);D?(c=new Uint8Array(w-b),c.set(e.subarray(t+b,e.length),0)):c=e.subarray(t+b,t+w);const X={unit:c,pts:s};return D||a.samples.push(X),{sample:X,length:w,missing:D}}const u=e.length-t;return c=new Uint8Array(u),c.set(e.subarray(t,e.length),0),{sample:{unit:c,pts:s},length:u,missing:-1}}function Cr(a,e){return Ss(a,e)&&$i(a,e+6)+10<=a.length-e}function Rr(a){if(a.size<2)return;const e=Te(a.data,!0),t=new Uint8Array(a.data.subarray(e.length+1));return{key:a.type,info:e,data:t.buffer}}function ai(a){if(a.size<2)return;if(a.type==="TXXX"){let t=1;const n=Te(a.data.subarray(t),!0);t+=n.length+1;const r=Te(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=Te(a.data.subarray(1));return{key:a.type,info:"",data:e}}function Ei(a){if(a.type==="WXXX"){if(a.size<2)return;let t=1;const n=Te(a.data.subarray(t),!0);t+=n.length+1;const r=Te(a.data.subarray(t));return{key:a.type,info:n,data:r}}const e=Te(a.data);return{key:a.type,info:"",data:e}}function oi(a){return btoa(String.fromCharCode(...a))}function Yi(a,e){if(a<0)return-Yi(-a,e);const t=Math.pow(10,e);if(Math.abs(a*t%1-.5)<Number.EPSILON){const r=Math.floor(a*t);return(r%2===0?r:r+1)/t}else return Math.round(a*t)/t}function Xi(a,e){const t=new URL(a),n=new URL(e);if(t.origin!==n.origin)return a;const r=t.pathname.split("/").slice(1),i=n.pathname.split("/").slice(1,-1);for(;r[0]===i[0];)r.shift(),i.shift();for(;i.length;)i.shift(),r.unshift("..");return r.join("/")}function Qi(){try{return crypto.randomUUID()}catch(a){try{const e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch(e){let t=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,r=>{const i=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(r=="x"?i:i&3|8).toString(16)})}}}function gs(a){return a instanceof ArrayBuffer?a:a.byteOffset==0&&a.byteLength==a.buffer.byteLength?a.buffer:new Uint8Array(a).buffer}function vs(a,e=0,t=1/0){return gl(a,e,t,Uint8Array)}function gl(a,e,t,n){const r=vl(a);let i=1;"BYTES_PER_ELEMENT"in n&&(i=n.BYTES_PER_ELEMENT);const s=_l(a)?a.byteOffset:0,l=(s+a.byteLength)/i,c=(s+e)/i,u=Math.floor(Math.max(0,Math.min(c,l))),d=Math.floor(Math.min(u+Math.max(t,0),l));return new n(r,u,d-u)}function vl(a){return a instanceof ArrayBuffer?a:a.buffer}function _l(a){return a&&a.buffer instanceof ArrayBuffer&&a.byteLength!==void 0&&a.byteOffset!==void 0}function yl(a){const e={key:a.type,description:"",data:"",mimeType:null,pictureType:null},t=3;if(a.size<2)return;if(a.data[0]!==t){console.log("Ignore frame with unrecognized character encoding");return}const n=a.data.subarray(1).indexOf(0);if(n===-1)return;const r=Te(vs(a.data,1,n)),i=a.data[2+n],s=a.data.subarray(3+n).indexOf(0);if(s===-1)return;const l=Te(vs(a.data,3+n,s));let c;return r==="-->"?c=Te(vs(a.data,4+n+s)):c=gs(a.data.subarray(4+n+s)),e.mimeType=r,e.pictureType=i,e.description=l,e.data=c,e}function El(a){return a.type==="PRIV"?Rr(a):a.type[0]==="W"?Ei(a):a.type==="APIC"?yl(a):ai(a)}function bl(a){const e=String.fromCharCode(a[0],a[1],a[2],a[3]),t=$i(a,4),n=10;return{type:e,size:t,data:a.subarray(n,n+t)}}const ea=10,xl=10;function Ya(a){let e=0;const t=[];for(;Ss(a,e);){const n=$i(a,e+6);a[e+5]>>6&1&&(e+=ea),e+=ea;const r=e+n;for(;e+xl<r;){const i=bl(a.subarray(e)),s=El(i);s&&t.push(s),e+=i.size+ea}Ys(a,e)&&(e+=ea)}return t}function Xa(a){return a&&a.key==="PRIV"&&a.info==="com.apple.streaming.transportStreamTimestamp"}function Sl(a){if(a.data.byteLength===8){const e=new Uint8Array(a.data),t=e[3]&1;let n=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return n/=45,t&&(n+=4772185884e-2),Math.round(n)}}function ga(a){const e=Ya(a);for(let t=0;t<e.length;t++){const n=e[t];if(Xa(n))return Sl(n)}}let Si=function(a){return a.audioId3="org.id3",a.dateRange="com.apple.quicktime.HLS",a.emsg="https://aomedia.org/emsg/ID3",a.misbklv="urn:misb:KLV:bin:1910.1",a}({});function zi(a="",e=9e4){return{type:a,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class va{constructor(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}resetInitSegment(e,t,n,r){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(e){this.initPTS=e,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(e,t){return!1}appendFrame(e,t,n){}demux(e,t){this.cachedData&&(e=Fe(this.cachedData,e),this.cachedData=null);let n=ji(e,0),r=n?n.length:0,i;const s=this._audioTrack,l=this._id3Track,c=n?ga(n):void 0,u=e.length;for((this.basePTS===null||this.frameIndex===0&&x(c))&&(this.basePTS=wl(c,t,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),n&&n.length>0&&l.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:Si.audioId3,duration:Number.POSITIVE_INFINITY});r<u;){if(this.canParse(e,r)){const d=this.appendFrame(s,e,r);d?(this.frameIndex++,this.lastPTS=d.sample.pts,r+=d.length,i=r):r=u}else Cr(e,r)?(n=ji(e,r),l.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:n,type:Si.audioId3,duration:Number.POSITIVE_INFINITY}),r+=n.length,i=r):r++;if(r===u&&i!==u){const d=e.slice(i);this.cachedData?this.cachedData=Fe(this.cachedData,d):this.cachedData=d}}return{audioTrack:s,videoTrack:zi(),id3Track:l,textTrack:zi()}}demuxSampleAes(e,t,n){return Promise.reject(new Error(`[${this}] This demuxer does not support Sample-AES decryption`))}flush(e){const t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:zi(),id3Track:this._id3Track,textTrack:zi()}}destroy(){this.cachedData=null,this._audioTrack=this._id3Track=void 0}}const wl=(a,e,t)=>{if(x(a))return a*90;const n=t?t.baseTime*9e4/t.timescale:0;return e*9e4+n};let ta=null;const Al=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],Tl=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Dl=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Cl=[0,1,1,4];function Qa(a,e,t,n,r){if(t+24>e.length)return;const i=Ja(e,t);if(i&&t+i.frameLength<=e.length){const s=i.samplesPerFrame*9e4/i.sampleRate,l=n+r*s,c={unit:e.subarray(t,t+i.frameLength),pts:l,dts:l};return a.config=[],a.channelCount=i.channelCount,a.samplerate=i.sampleRate,a.samples.push(c),{sample:c,length:i.frameLength,missing:0}}}function Ja(a,e){const t=a[e+1]>>3&3,n=a[e+1]>>1&3,r=a[e+2]>>4&15,i=a[e+2]>>2&3;if(t!==1&&r!==0&&r!==15&&i!==3){const s=a[e+2]>>1&1,l=a[e+3]>>6,c=t===3?3-n:n===3?3:4,u=Al[c*14+r-1]*1e3,p=Tl[(t===3?0:t===2?1:2)*3+i],b=l===3?1:2,w=Dl[t][n],D=Cl[n],X=w*8*D,Y=Math.floor(w*u/p+s)*D;if(ta===null){const Ie=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);ta=Ie?parseInt(Ie[1]):0}return!!ta&&ta<=87&&n===2&&u>=224e3&&l===0&&(a[e+3]=a[e+3]|128),{sampleRate:p,channelCount:b,frameLength:Y,samplesPerFrame:X}}}function _a(a,e){return a[e]===255&&(a[e+1]&224)===224&&(a[e+1]&6)!==0}function qa(a,e){return e+1<a.length&&_a(a,e)}function Rl(a,e){return _a(a,e)&&4<=a.length-e}function eo(a,e){if(e+1<a.length&&_a(a,e)){const n=Ja(a,e);let r=4;n!=null&&n.frameLength&&(r=n.frameLength);const i=e+r;return i===a.length||qa(a,i)}return!1}class Il extends va{constructor(e,t){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=t}resetInitSegment(e,t,n,r){super.resetInitSegment(e,t,n,r),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}static probe(e,t){if(!e)return!1;const n=ji(e,0);let r=(n==null?void 0:n.length)||0;if(eo(e,r))return!1;for(let i=e.length;r<i;r++)if(Ms(e,r))return t.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return Qs(e,t)}appendFrame(e,t,n){Bs(e,this.observer,t,n,e.manifestCodec);const r=qs(e,t,n,this.basePTS,this.frameIndex);if(r&&r.missing===0)return r}}const to=(a,e)=>{let t=0,n=5;e+=n;const r=new Uint32Array(1),i=new Uint32Array(1),s=new Uint8Array(1);for(;n>0;){s[0]=a[e];const l=Math.min(n,8),c=8-l;i[0]=4278190080>>>24+c<<c,r[0]=(s[0]&i[0])>>c,t=t?t<<l|r[0]:r[0],e+=1,n-=l}return t};class Ll extends va{constructor(e){super(),this.observer=void 0,this.observer=e}resetInitSegment(e,t,n,r){super.resetInitSegment(e,t,n,r),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}canParse(e,t){return t+64<e.length}appendFrame(e,t,n){const r=no(e,t,n,this.basePTS,this.frameIndex);if(r!==-1)return{sample:e.samples[e.samples.length-1],length:r,missing:0}}static probe(e){if(!e)return!1;const t=ji(e,0);if(!t)return!1;const n=t.length;return e[n]===11&&e[n+1]===119&&ga(t)!==void 0&&to(e,n)<16}}function no(a,e,t,n,r){if(t+8>e.length||e[t]!==11||e[t+1]!==119)return-1;const i=e[t+4]>>6;if(i>=3)return-1;const l=[48e3,44100,32e3][i],c=e[t+4]&63,d=[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][c*3+i]*2;if(t+d>e.length)return-1;const p=e[t+6]>>5;let b=0;p===2?b+=2:(p&1&&p!==1&&(b+=2),p&4&&(b+=2));const w=(e[t+6]<<8|e[t+7])>>12-b&1,X=[2,1,2,3,3,4,4,5][p]+w,Y=e[t+5]>>3,_e=e[t+5]&7,Me=new Uint8Array([i<<6|Y<<1|_e>>2,(_e&3)<<6|p<<3|w<<2|c>>4,c<<4&224]),Ie=1536/l*9e4,st=n+r*Ie,ut=e.subarray(t,t+d);return a.config=Me,a.channelCount=X,a.samplerate=l,a.samples.push({unit:ut,pts:st}),d}class kl extends va{resetInitSegment(e,t,n,r){super.resetInitSegment(e,t,n,r),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:t,duration:r,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=ji(e,0);let n=(t==null?void 0:t.length)||0;if(t&&e[n]===11&&e[n+1]===119&&ga(t)!==void 0&&to(e,n)<=16)return!1;for(let r=e.length;n<r;n++)if(eo(e,n))return G.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return Rl(e,t)}appendFrame(e,t,n){if(this.basePTS!==null)return Qa(e,t,n,this.basePTS,this.frameIndex)}}const Pl=/\/emsg[-/]ID3/i;class Ol{constructor(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}resetTimeStamp(){}resetInitSegment(e,t,n,r){const i=this.videoTrack=zi("video",1),s=this.audioTrack=zi("audio",1),l=this.txtTrack=zi("text",1);if(this.id3Track=zi("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const c=Le(e);if(c.video){const{id:u,timescale:d,codec:p,supplemental:b}=c.video;i.id=u,i.timescale=l.timescale=d,i.codec=p,i.supplemental=b}if(c.audio){const{id:u,timescale:d,codec:p}=c.audio;s.id=u,s.timescale=d,s.codec=p}l.id=xe.text,i.sampleDuration=0,i.duration=s.duration=r}resetContiguity(){this.remainderData=null}static probe(e){return ye(e)}demux(e,t){this.timeOffset=t;let n=e;const r=this.videoTrack,i=this.txtTrack;if(this.config.progressive){this.remainderData&&(n=Fe(this.remainderData,e));const l=Ce(n);this.remainderData=l.remainder,r.samples=l.valid||new Uint8Array}else r.samples=n;const s=this.extractID3Track(r,t);return i.samples=Be(t,r),{videoTrack:r,audioTrack:this.audioTrack,id3Track:s,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,n=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const r=this.extractID3Track(t,this.timeOffset);return n.samples=Be(e,t),{videoTrack:t,audioTrack:zi(),id3Track:r,textTrack:zi()}}extractID3Track(e,t){const n=this.id3Track;if(e.samples.length){const r=Z(e.samples,["emsg"]);r&&r.forEach(i=>{const s=Ut(i);if(Pl.test(s.schemeIdUri)){const l=ro(s,t);let c=s.eventDuration===4294967295?Number.POSITIVE_INFINITY:s.eventDuration/s.timeScale;c<=.001&&(c=Number.POSITIVE_INFINITY);const u=s.payload;n.samples.push({data:u,len:u.byteLength,dts:l,pts:l,type:Si.emsg,duration:c})}else if(this.config.enableEmsgKLVMetadata&&s.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){const l=ro(s,t);n.samples.push({data:s.payload,len:s.payload.byteLength,dts:l,pts:l,type:Si.misbklv,duration:Number.POSITIVE_INFINITY})}})}return n}demuxSampleAes(e,t,n){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){this.config=null,this.remainderData=null,this.videoTrack=this.audioTrack=this.id3Track=this.txtTrack=void 0}}function ro(a,e){return x(a.presentationTime)?a.presentationTime/a.timeScale:e+a.presentationTimeDelta/a.timeScale}class Fl{constructor(e,t,n){this.keyData=void 0,this.decrypter=void 0,this.keyData=n,this.decrypter=new vn(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,pt.cbc)}decryptAacSample(e,t,n){const r=e[t].unit;if(r.length<=16)return;const i=r.subarray(16,r.length-r.length%16),s=i.buffer.slice(i.byteOffset,i.byteOffset+i.length);this.decryptBuffer(s).then(l=>{const c=new Uint8Array(l);r.set(c,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,n)})}decryptAacSamples(e,t,n){for(;;t++){if(t>=e.length){n();return}if(!(e[t].unit.length<32)&&(this.decryptAacSample(e,t,n),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const t=Math.floor((e.length-48)/160)*16+16,n=new Int8Array(t);let r=0;for(let i=32;i<e.length-16;i+=160,r+=16)n.set(e.subarray(i,i+16),r);return n}getAvcDecryptedUnit(e,t){const n=new Uint8Array(t);let r=0;for(let i=32;i<e.length-16;i+=160,r+=16)e.set(n.subarray(r,r+16),i);return e}decryptAvcSample(e,t,n,r,i){const s=nt(i.data),l=this.getAvcEncryptedData(s);this.decryptBuffer(l.buffer).then(c=>{i.data=this.getAvcDecryptedUnit(s,c),this.decrypter.isSync()||this.decryptAvcSamples(e,t,n+1,r)})}decryptAvcSamples(e,t,n,r){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,n=0){if(t>=e.length){r();return}const i=e[t].units;for(;!(n>=i.length);n++){const s=i[n];if(!(s.data.length<=48||s.type!==1&&s.type!==5)&&(this.decryptAvcSample(e,t,n,r,s),!this.decrypter.isSync()))return}}}}class io{constructor(){this.VideoSample=null}createVideoSample(e,t,n){return{key:e,frame:!1,pts:t,dts:n,units:[],length:0}}getLastNalUnit(e){var t;let n=this.VideoSample,r;if((!n||n.units.length===0)&&(n=e[e.length-1]),(t=n)!=null&&t.units){const i=n.units;r=i[i.length-1]}return r}pushAccessUnit(e,t){if(e.units.length&&e.frame){if(e.pts===void 0){const n=t.samples,r=n.length;if(r){const i=n[r-1];e.pts=i.pts,e.dts=i.dts}else{t.dropped++;return}}t.samples.push(e)}}parseNALu(e,t,n){const r=t.byteLength;let i=e.naluState||0;const s=i,l=[];let c=0,u,d,p,b=-1,w=0;for(i===-1&&(b=0,w=this.getNALuType(t,0),i=0,c=1);c<r;){if(u=t[c++],!i){i=u?0:1;continue}if(i===1){i=u?0:2;continue}if(!u)i=3;else if(u===1){if(d=c-i-1,b>=0){const D={data:t.subarray(b,d),type:w};l.push(D)}else{const D=this.getLastNalUnit(e.samples);D&&(s&&c<=4-s&&D.state&&(D.data=D.data.subarray(0,D.data.byteLength-s)),d>0&&(D.data=Fe(D.data,t.subarray(0,d)),D.state=0))}c<r?(p=this.getNALuType(t,c),b=c,w=p,i=0):i=-1}else i=0}if(b>=0&&i>=0){const D={data:t.subarray(b,r),type:w,state:i};l.push(D)}if(l.length===0){const D=this.getLastNalUnit(e.samples);D&&(D.data=Fe(D.data,t))}return e.naluState=i,l}}class Us{constructor(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}loadWord(){const e=this.data,t=this.bytesAvailable,n=e.byteLength-t,r=new Uint8Array(4),i=Math.min(4,t);if(i===0)throw new Error("no bytes available");r.set(e.subarray(n,n+i)),this.word=new DataView(r.buffer).getUint32(0),this.bitsAvailable=i*8,this.bytesAvailable-=i}skipBits(e){let t;e=Math.min(e,this.bytesAvailable*8+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,t=e>>3,e-=t<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}readBits(e){let t=Math.min(this.bitsAvailable,e);const n=this.word>>>32-t;if(e>32&&G.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else if(this.bytesAvailable>0)this.loadWord();else throw new Error("no bits available");return t=e-t,t>0&&this.bitsAvailable?n<<t|this.readBits(t):n}skipLZ(){let e;for(e=0;e<this.bitsAvailable;++e)if(this.word&2147483648>>>e)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return this.readBits(1)===1}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}}class so extends io{parsePES(e,t,n,r){const i=this.parseNALu(e,n.data,r);let s=this.VideoSample,l,c=!1;n.data=null,s&&i.length&&!e.audFound&&(this.pushAccessUnit(s,e),s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),i.forEach(u=>{var d,p;switch(u.type){case 1:{let X=!1;l=!0;const Y=u.data;if(c&&Y.length>4){const _e=this.readSliceType(Y);(_e===2||_e===4||_e===7||_e===9)&&(X=!0)}if(X){var b;(b=s)!=null&&b.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null)}s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.frame=!0,s.key=X;break}case 5:l=!0,(d=s)!=null&&d.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null),s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.key=!0,s.frame=!0;break;case 6:{l=!0,lt(u.data,1,n.pts,t.samples);break}case 7:{var w,D;l=!0,c=!0;const X=u.data,Y=this.readSPS(X);if(!e.sps||e.width!==Y.width||e.height!==Y.height||((w=e.pixelRatio)==null?void 0:w[0])!==Y.pixelRatio[0]||((D=e.pixelRatio)==null?void 0:D[1])!==Y.pixelRatio[1]){e.width=Y.width,e.height=Y.height,e.pixelRatio=Y.pixelRatio,e.sps=[X];const _e=X.subarray(1,4);let Me="avc1.";for(let Ie=0;Ie<3;Ie++){let st=_e[Ie].toString(16);st.length<2&&(st="0"+st),Me+=st}e.codec=Me}break}case 8:l=!0,e.pps=[u.data];break;case 9:l=!0,e.audFound=!0,(p=s)!=null&&p.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts));break;case 12:l=!0;break;default:l=!1;break}s&&l&&s.units.push(u)}),r&&s&&(this.pushAccessUnit(s,e),this.VideoSample=null)}getNALuType(e,t){return e[t]&31}readSliceType(e){const t=new Us(e);return t.readUByte(),t.readUEG(),t.readUEG()}skipScalingList(e,t){let n=8,r=8,i;for(let s=0;s<e;s++)r!==0&&(i=t.readEG(),r=(n+i+256)%256),n=r===0?n:r}readSPS(e){const t=new Us(e);let n=0,r=0,i=0,s=0,l,c,u;const d=t.readUByte.bind(t),p=t.readBits.bind(t),b=t.readUEG.bind(t),w=t.readBoolean.bind(t),D=t.skipBits.bind(t),X=t.skipEG.bind(t),Y=t.skipUEG.bind(t),_e=this.skipScalingList.bind(this);d();const Me=d();if(p(5),D(3),d(),Y(),Me===100||Me===110||Me===122||Me===244||Me===44||Me===83||Me===86||Me===118||Me===128){const At=b();if(At===3&&D(1),Y(),Y(),D(1),w())for(c=At!==3?8:12,u=0;u<c;u++)w()&&(u<6?_e(16,t):_e(64,t))}Y();const Ie=b();if(Ie===0)b();else if(Ie===1)for(D(1),X(),X(),l=b(),u=0;u<l;u++)X();Y(),D(1);const st=b(),ut=b(),Mt=p(1);Mt===0&&D(1),D(1),w()&&(n=b(),r=b(),i=b(),s=b());let ct=[1,1];if(w()&&w())switch(d()){case 1:ct=[1,1];break;case 2:ct=[12,11];break;case 3:ct=[10,11];break;case 4:ct=[16,11];break;case 5:ct=[40,33];break;case 6:ct=[24,11];break;case 7:ct=[20,11];break;case 8:ct=[32,11];break;case 9:ct=[80,33];break;case 10:ct=[18,11];break;case 11:ct=[15,11];break;case 12:ct=[64,33];break;case 13:ct=[160,99];break;case 14:ct=[4,3];break;case 15:ct=[3,2];break;case 16:ct=[2,1];break;case 255:{ct=[d()<<8|d(),d()<<8|d()];break}}return{width:Math.ceil((st+1)*16-n*2-r*2),height:(2-Mt)*(ut+1)*16-(Mt?2:4)*(i+s),pixelRatio:ct}}}class ao extends io{constructor(...e){super(...e),this.initVPS=null}parsePES(e,t,n,r){const i=this.parseNALu(e,n.data,r);let s=this.VideoSample,l,c=!1;n.data=null,s&&i.length&&!e.audFound&&(this.pushAccessUnit(s,e),s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),i.forEach(u=>{var d,p;switch(u.type){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:s||(s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts)),s.frame=!0,l=!0;break;case 16:case 17:case 18:case 21:if(l=!0,c){var b;(b=s)!=null&&b.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null)}s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.key=!0,s.frame=!0;break;case 19:case 20:l=!0,(d=s)!=null&&d.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null),s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.key=!0,s.frame=!0;break;case 39:l=!0,lt(u.data,2,n.pts,t.samples);break;case 32:l=!0,e.vps||(typeof e.params!="object"&&(e.params={}),e.params=h(e.params,this.readVPS(u.data)),this.initVPS=u.data),e.vps=[u.data];break;case 33:if(l=!0,c=!0,e.vps!==void 0&&e.vps[0]!==this.initVPS&&e.sps!==void 0&&!this.matchSPS(e.sps[0],u.data)&&(this.initVPS=e.vps[0],e.sps=e.pps=void 0),!e.sps){const w=this.readSPS(u.data);e.width=w.width,e.height=w.height,e.pixelRatio=w.pixelRatio,e.codec=w.codecString,e.sps=[],typeof e.params!="object"&&(e.params={});for(const D in w.params)e.params[D]=w.params[D]}this.pushParameterSet(e.sps,u.data,e.vps),s||(s=this.VideoSample=this.createVideoSample(!0,n.pts,n.dts)),s.key=!0;break;case 34:if(l=!0,typeof e.params=="object"){if(!e.pps){e.pps=[];const w=this.readPPS(u.data);for(const D in w)e.params[D]=w[D]}this.pushParameterSet(e.pps,u.data,e.vps)}break;case 35:l=!0,e.audFound=!0,(p=s)!=null&&p.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,n.pts,n.dts));break;default:l=!1;break}s&&l&&s.units.push(u)}),r&&s&&(this.pushAccessUnit(s,e),this.VideoSample=null)}pushParameterSet(e,t,n){(n&&n[0]===this.initVPS||!n&&!e.length)&&e.push(t)}getNALuType(e,t){return(e[t]&126)>>>1}ebsp2rbsp(e){const t=new Uint8Array(e.byteLength);let n=0;for(let r=0;r<e.byteLength;r++)r>=2&&e[r]===3&&e[r-1]===0&&e[r-2]===0||(t[n]=e[r],n++);return new Uint8Array(t.buffer,0,n)}pushAccessUnit(e,t){super.pushAccessUnit(e,t),this.initVPS&&(this.initVPS=null)}readVPS(e){const t=new Us(e);t.readUByte(),t.readUByte(),t.readBits(4),t.skipBits(2),t.readBits(6);const n=t.readBits(3),r=t.readBoolean();return{numTemporalLayers:n+1,temporalIdNested:r}}readSPS(e){const t=new Us(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.readBits(4);const n=t.readBits(3);t.readBoolean();const r=t.readBits(2),i=t.readBoolean(),s=t.readBits(5),l=t.readUByte(),c=t.readUByte(),u=t.readUByte(),d=t.readUByte(),p=t.readUByte(),b=t.readUByte(),w=t.readUByte(),D=t.readUByte(),X=t.readUByte(),Y=t.readUByte(),_e=t.readUByte(),Me=[],Ie=[];for(let Mr=0;Mr<n;Mr++)Me.push(t.readBoolean()),Ie.push(t.readBoolean());if(n>0)for(let Mr=n;Mr<8;Mr++)t.readBits(2);for(let Mr=0;Mr<n;Mr++)Me[Mr]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),Ie[Mr]&&t.readUByte();t.readUEG();const st=t.readUEG();st==3&&t.skipBits(1);const ut=t.readUEG(),Mt=t.readUEG(),ct=t.readBoolean();let At=0,Ht=0,mt=0,En=0;ct&&(At+=t.readUEG(),Ht+=t.readUEG(),mt+=t.readUEG(),En+=t.readUEG());const Mn=t.readUEG(),Lr=t.readUEG(),vr=t.readUEG(),cr=t.readBoolean();for(let Mr=cr?0:n;Mr<=n;Mr++)t.skipUEG(),t.skipUEG(),t.skipUEG();if(t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.readBoolean()&&t.readBoolean())for(let hi=0;hi<4;hi++)for(let Ii=0;Ii<(hi===3?2:6);Ii++)if(!t.readBoolean())t.readUEG();else{const Oi=Math.min(64,1<<4+(hi<<1));hi>1&&t.readEG();for(let Ps=0;Ps<Oi;Ps++)t.readEG()}t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.skipUEG(),t.skipUEG(),t.readBoolean());const ur=t.readUEG();let bn=0;for(let Mr=0;Mr<ur;Mr++){let hi=!1;if(Mr!==0&&(hi=t.readBoolean()),hi){Mr===ur&&t.readUEG(),t.readBoolean(),t.readUEG();let Ii=0;for(let ys=0;ys<=bn;ys++){const Oi=t.readBoolean();let Ps=!1;Oi||(Ps=t.readBoolean()),(Oi||Ps)&&Ii++}bn=Ii}else{const Ii=t.readUEG(),ys=t.readUEG();bn=Ii+ys;for(let Oi=0;Oi<Ii;Oi++)t.readUEG(),t.readBoolean();for(let Oi=0;Oi<ys;Oi++)t.readUEG(),t.readBoolean()}}if(t.readBoolean()){const Mr=t.readUEG();for(let hi=0;hi<Mr;hi++){for(let Ii=0;Ii<vr+4;Ii++)t.readBits(1);t.readBits(1)}}let Ar=0,br=1,Ir=1,Nr=!0,Ur=1,jr=0;t.readBoolean(),t.readBoolean();let gi=!1;if(t.readBoolean()){if(t.readBoolean()){const Es=t.readUByte(),ll=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],ha=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];Es>0&&Es<16?(br=ll[Es-1],Ir=ha[Es-1]):Es===255&&(br=t.readBits(16),Ir=t.readBits(16))}if(t.readBoolean()&&t.readBoolean(),t.readBoolean()&&(t.readBits(3),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.readUByte(),t.readUByte())),t.readBoolean()&&(t.readUEG(),t.readUEG()),t.readBoolean(),t.readBoolean(),t.readBoolean(),gi=t.readBoolean(),gi&&(At+=t.readUEG(),Ht+=t.readUEG(),mt+=t.readUEG(),En+=t.readUEG()),t.readBoolean()&&(Ur=t.readBits(32),jr=t.readBits(32),t.readBoolean()&&t.readUEG(),t.readBoolean())){const ha=t.readBoolean(),ul=t.readBoolean();let Ws=!1;(ha||ul)&&(Ws=t.readBoolean(),Ws&&(t.readUByte(),t.readBits(5),t.readBoolean(),t.readBits(5)),t.readBits(4),t.readBits(4),Ws&&t.readBits(4),t.readBits(5),t.readBits(5),t.readBits(5));for(let cl=0;cl<=n;cl++){Nr=t.readBoolean();const nf=Nr||t.readBoolean();let fl=!1;nf?t.readEG():fl=t.readBoolean();const dl=fl?1:t.readUEG()+1;if(ha)for(let Vs=0;Vs<dl;Vs++)t.readUEG(),t.readUEG(),Ws&&(t.readUEG(),t.readUEG()),t.skipBits(1);if(ul)for(let Vs=0;Vs<dl;Vs++)t.readUEG(),t.readUEG(),Ws&&(t.readUEG(),t.readUEG()),t.skipBits(1)}}t.readBoolean()&&(t.readBoolean(),t.readBoolean(),t.readBoolean(),Ar=t.readUEG())}let ms=ut,ol=Mt;if(ct||gi){let Mr=1,hi=1;st===1?Mr=hi=2:st==2&&(Mr=2),ms=ut-Mr*Ht-Mr*At,ol=Mt-hi*En-hi*mt}const ef=r?["A","B","C"][r]:"",tf=l<<24|c<<16|u<<8|d;let $a=0;for(let Mr=0;Mr<32;Mr++)$a=($a|(tf>>Mr&1)<<31-Mr)>>>0;let ja=$a.toString(16);return s===1&&ja==="2"&&(ja="6"),{codecString:`hvc1.${ef}${s}.${ja}.${i?"H":"L"}${_e}.B0`,params:{general_tier_flag:i,general_profile_idc:s,general_profile_space:r,general_profile_compatibility_flags:[l,c,u,d],general_constraint_indicator_flags:[p,b,w,D,X,Y],general_level_idc:_e,bit_depth:Mn+8,bit_depth_luma_minus8:Mn,bit_depth_chroma_minus8:Lr,min_spatial_segmentation_idc:Ar,chroma_format_idc:st,frame_rate:{fixed:Nr,fps:jr/Ur}},width:ms,height:ol,pixelRatio:[br,Ir]}}readPPS(e){const t=new Us(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.skipUEG(),t.skipUEG(),t.skipBits(2),t.skipBits(3),t.skipBits(2),t.skipUEG(),t.skipUEG(),t.skipEG(),t.skipBits(2),t.readBoolean()&&t.skipUEG(),t.skipEG(),t.skipEG(),t.skipBits(4);const r=t.readBoolean(),i=t.readBoolean();let s=1;return i&&r?s=0:i?s=3:r&&(s=2),{parallelismType:s}}matchSPS(e,t){return String.fromCharCode.apply(null,e).substr(3)===String.fromCharCode.apply(null,t).substr(3)}}const ci=188;class fs{constructor(e,t,n,r){this.logger=void 0,this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=e,this.config=t,this.typeSupported=n,this.logger=r,this.videoParser=null}static probe(e,t){const n=fs.syncOffset(e);return n>0&&t.warn(`MPEG2-TS detected but first sync word found @ offset ${n}`),n!==-1}static syncOffset(e){const t=e.length;let n=Math.min(ci*5,t-ci)+1,r=0;for(;r<n;){let i=!1,s=-1,l=0;for(let c=r;c<t;c+=ci)if(e[c]===71&&(t-c===ci||e[c+ci]===71)){if(l++,s===-1&&(s=c,s!==0&&(n=Math.min(s+ci*99,e.length-ci)+1)),i||(i=ya(e,c)===0),i&&l>1&&(s===0&&l>2||c+ci>n))return s}else{if(l)return-1;break}r++}return-1}static createTrack(e,t){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:xe[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:e==="audio"?t:void 0}}resetInitSegment(e,t,n,r){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=fs.createTrack("video"),this._videoTrack.duration=r,this._audioTrack=fs.createTrack("audio",r),this._id3Track=fs.createTrack("id3"),this._txtTrack=fs.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=n}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_videoTrack:t,_id3Track:n}=this;e&&(e.pesData=null),t&&(t.pesData=null),n&&(n.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(e,t,n=!1,r=!1){n||(this.sampleAes=null);let i;const s=this._videoTrack,l=this._audioTrack,c=this._id3Track,u=this._txtTrack;let d=s.pid,p=s.pesData,b=l.pid,w=c.pid,D=l.pesData,X=c.pesData,Y=null,_e=this.pmtParsed,Me=this._pmtId,Ie=e.length;if(this.remainderData&&(e=Fe(this.remainderData,e),Ie=e.length,this.remainderData=null),Ie<ci&&!r)return this.remainderData=e,{audioTrack:l,videoTrack:s,id3Track:c,textTrack:u};const st=Math.max(0,fs.syncOffset(e));Ie-=(Ie-st)%ci,Ie<e.byteLength&&!r&&(this.remainderData=new Uint8Array(e.buffer,Ie,e.buffer.byteLength-Ie));let ut=0;for(let ct=st;ct<Ie;ct+=ci)if(e[ct]===71){const At=!!(e[ct+1]&64),Ht=ya(e,ct),mt=(e[ct+3]&48)>>4;let En;if(mt>1){if(En=ct+5+e[ct+4],En===ct+ci)continue}else En=ct+4;switch(Ht){case d:if(At){if(p&&(i=Ds(p,this.logger))){if(this.videoParser===null)switch(s.segmentCodec){case"avc":this.videoParser=new so;break;case"hevc":this.videoParser=new ao;break}this.videoParser!==null&&this.videoParser.parsePES(s,u,i,!1)}p={data:[],size:0}}p&&(p.data.push(e.subarray(En,ct+ci)),p.size+=ct+ci-En);break;case b:if(At){if(D&&(i=Ds(D,this.logger)))switch(l.segmentCodec){case"aac":this.parseAACPES(l,i);break;case"mp3":this.parseMPEGPES(l,i);break;case"ac3":this.parseAC3PES(l,i);break}D={data:[],size:0}}D&&(D.data.push(e.subarray(En,ct+ci)),D.size+=ct+ci-En);break;case w:At&&(X&&(i=Ds(X,this.logger))&&this.parseID3PES(c,i),X={data:[],size:0}),X&&(X.data.push(e.subarray(En,ct+ci)),X.size+=ct+ci-En);break;case 0:At&&(En+=e[En]+1),Me=this._pmtId=Nl(e,En);break;case Me:{At&&(En+=e[En]+1);const Mn=Ml(e,En,this.typeSupported,n,this.observer,this.logger);d=Mn.videoPid,d>0&&(s.pid=d,s.segmentCodec=Mn.segmentVideoCodec),b=Mn.audioPid,b>0&&(l.pid=b,l.segmentCodec=Mn.segmentAudioCodec),w=Mn.id3Pid,w>0&&(c.pid=w),Y!==null&&!_e&&(this.logger.warn(`MPEG-TS PMT found at ${ct} after unknown PID '${Y}'. Backtracking to sync byte @${st} to parse all TS packets.`),Y=null,ct=st-188),_e=this.pmtParsed=!0;break}case 17:case 8191:break;default:Y=Ht;break}}else ut++;ut>0&&Ea(this.observer,new Error(`Found ${ut} TS packet/s that do not start with 0x47`),void 0,this.logger),s.pesData=p,l.pesData=D,c.pesData=X;const Mt={audioTrack:l,videoTrack:s,id3Track:c,textTrack:u};return r&&this.extractRemainingSamples(Mt),Mt}flush(){const{remainderData:e}=this;this.remainderData=null;let t;return e?t=this.demux(e,-1,!1,!0):t={videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t}extractRemainingSamples(e){const{audioTrack:t,videoTrack:n,id3Track:r,textTrack:i}=e,s=n.pesData,l=t.pesData,c=r.pesData;let u;if(s&&(u=Ds(s,this.logger))){if(this.videoParser===null)switch(n.segmentCodec){case"avc":this.videoParser=new so;break;case"hevc":this.videoParser=new ao;break}this.videoParser!==null&&(this.videoParser.parsePES(n,i,u,!0),n.pesData=null)}else n.pesData=s;if(l&&(u=Ds(l,this.logger))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,u);break;case"mp3":this.parseMPEGPES(t,u);break;case"ac3":this.parseAC3PES(t,u);break}t.pesData=null}else l!=null&&l.size&&this.logger.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=l;c&&(u=Ds(c,this.logger))?(this.parseID3PES(r,u),r.pesData=null):r.pesData=c}demuxSampleAes(e,t,n){const r=this.demux(e,n,!0,!this.config.progressive),i=this.sampleAes=new Fl(this.observer,this.config,t);return this.decrypt(r,i)}decrypt(e,t){return new Promise(n=>{const{audioTrack:r,videoTrack:i}=e;r.samples&&r.segmentCodec==="aac"?t.decryptAacSamples(r.samples,0,()=>{i.samples?t.decryptAvcSamples(i.samples,0,0,()=>{n(e)}):n(e)}):i.samples&&t.decryptAvcSamples(i.samples,0,0,()=>{n(e)})})}destroy(){this.observer&&this.observer.removeAllListeners(),this.config=this.logger=this.observer=null,this.aacOverFlow=this.videoParser=this.remainderData=this.sampleAes=null,this._videoTrack=this._audioTrack=this._id3Track=this._txtTrack=void 0}parseAACPES(e,t){let n=0;const r=this.aacOverFlow;let i=t.data;if(r){this.aacOverFlow=null;const p=r.missing,b=r.sample.unit.byteLength;if(p===-1)i=Fe(r.sample.unit,i);else{const w=b-p;r.sample.unit.set(i.subarray(0,p),w),e.samples.push(r.sample),n=r.missing}}let s,l;for(s=n,l=i.length;s<l-1&&!As(i,s);s++);if(s!==n){let p;const b=s<l-1;if(b?p=`AAC PES did not start with ADTS header,offset:${s}`:p="No ADTS header found in AAC PES",Ea(this.observer,new Error(p),b,this.logger),!b)return}Bs(e,this.observer,i,s,this.audioCodec);let c;if(t.pts!==void 0)c=t.pts;else if(r){const p=Ts(e.samplerate);c=r.sample.pts+p}else{this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}let u=0,d;for(;s<l;)if(d=qs(e,i,s,c,u),s+=d.length,d.missing){this.aacOverFlow=d;break}else for(u++;s<l-1&&!As(i,s);s++);}parseMPEGPES(e,t){const n=t.data,r=n.length;let i=0,s=0;const l=t.pts;if(l===void 0){this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;s<r;)if(qa(n,s)){const c=Qa(e,n,s,l,i);if(c)s+=c.length,i++;else break}else s++}parseAC3PES(e,t){{const n=t.data,r=t.pts;if(r===void 0){this.logger.warn("[tsdemuxer]: AC3 PES unknown PTS");return}const i=n.length;let s=0,l=0,c;for(;l<i&&(c=no(e,n,l,r,s++))>0;)l+=c}}parseID3PES(e,t){if(t.pts===void 0){this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const n=h({},t,{type:this._videoTrack?Si.emsg:Si.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(n)}}function ya(a,e){return((a[e+1]&31)<<8)+a[e+2]}function Nl(a,e){return(a[e+10]&31)<<8|a[e+11]}function Ml(a,e,t,n,r,i){const s={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},l=(a[e+1]&15)<<8|a[e+2],c=e+3+l-4,u=(a[e+10]&15)<<8|a[e+11];for(e+=12+u;e<c;){const d=ya(a,e),p=(a[e+3]&15)<<8|a[e+4];switch(a[e]){case 207:if(!n){ba("ADTS AAC",i);break}case 15:s.audioPid===-1&&(s.audioPid=d);break;case 21:s.id3Pid===-1&&(s.id3Pid=d);break;case 219:if(!n){ba("H.264",i);break}case 27:s.videoPid===-1&&(s.videoPid=d);break;case 3:case 4:!t.mpeg&&!t.mp3?i.log("MPEG audio found, not supported in this browser"):s.audioPid===-1&&(s.audioPid=d,s.segmentAudioCodec="mp3");break;case 193:if(!n){ba("AC-3",i);break}case 129:t.ac3?s.audioPid===-1&&(s.audioPid=d,s.segmentAudioCodec="ac3"):i.log("AC-3 audio found, not supported in this browser");break;case 6:if(s.audioPid===-1&&p>0){let b=e+5,w=p;for(;w>2;){switch(a[b]){case 106:t.ac3!==!0?i.log("AC-3 audio found, not supported in this browser for now"):(s.audioPid=d,s.segmentAudioCodec="ac3");break}const X=a[b+1]+2;b+=X,w-=X}}break;case 194:case 135:return Ea(r,new Error("Unsupported EC-3 in M2TS found"),void 0,i),s;case 36:s.videoPid===-1&&(s.videoPid=d,s.segmentVideoCodec="hevc",i.log("HEVC in M2TS found"));break}e+=p+5}return s}function Ea(a,e,t,n){n.warn(`parsing error: ${e.message}`),a.emit(f.ERROR,f.ERROR,{type:fe.MEDIA_ERROR,details:F.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function ba(a,e){e.log(`${a} with AES-128-CBC encryption found in unencrypted stream`)}function Ds(a,e){let t=0,n,r,i,s,l;const c=a.data;if(!a||a.size===0)return null;for(;c[0].length<19&&c.length>1;)c[0]=Fe(c[0],c[1]),c.splice(1,1);if(n=c[0],(n[0]<<16)+(n[1]<<8)+n[2]===1){if(r=(n[4]<<8)+n[5],r&&r>a.size-6)return null;const d=n[7];d&192&&(s=(n[9]&14)*536870912+(n[10]&255)*4194304+(n[11]&254)*16384+(n[12]&255)*128+(n[13]&254)/2,d&64?(l=(n[14]&14)*536870912+(n[15]&255)*4194304+(n[16]&254)*16384+(n[17]&255)*128+(n[18]&254)/2,s-l>60*9e4&&(e.warn(`${Math.round((s-l)/9e4)}s delta between PTS and DTS, align them`),s=l)):l=s),i=n[8];let p=i+9;if(a.size<=p)return null;a.size-=p;const b=new Uint8Array(a.size);for(let w=0,D=c.length;w<D;w++){n=c[w];let X=n.byteLength;if(p)if(p>X){p-=X;continue}else n=n.subarray(p),X-=p,p=0;b.set(n,t),t+=X}return r&&(r-=i+3),{data:b,pts:s,dts:l,len:r}}return null}class Bl{static getSilentFrame(e,t){switch(e){case"mp4a.40.2":if(t===1)return new Uint8Array([0,200,0,128,35,128]);if(t===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(t===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(t===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(t===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(t===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(t===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(t===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(t===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}}}const ds=Math.pow(2,32)-1;class vt{static init(){vt.types={avc1:[],avcC:[],hvc1:[],hvcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],dac3:[],"ac-3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};let e;for(e in vt.types)vt.types.hasOwnProperty(e)&&(vt.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);const t=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]),n=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]);vt.HDLR_TYPES={video:t,audio:n};const r=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),i=new Uint8Array([0,0,0,0,0,0,0,0]);vt.STTS=vt.STSC=vt.STCO=i,vt.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),vt.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),vt.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),vt.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const s=new Uint8Array([105,115,111,109]),l=new Uint8Array([97,118,99,49]),c=new Uint8Array([0,0,0,1]);vt.FTYP=vt.box(vt.types.ftyp,s,c,s,l),vt.DINF=vt.box(vt.types.dinf,vt.box(vt.types.dref,r))}static box(e,...t){let n=8,r=t.length;const i=r;for(;r--;)n+=t[r].byteLength;const s=new Uint8Array(n);for(s[0]=n>>24&255,s[1]=n>>16&255,s[2]=n>>8&255,s[3]=n&255,s.set(e,4),r=0,n=8;r<i;r++)s.set(t[r],n),n+=t[r].byteLength;return s}static hdlr(e){return vt.box(vt.types.hdlr,vt.HDLR_TYPES[e])}static mdat(e){return vt.box(vt.types.mdat,e)}static mdhd(e,t){t*=e;const n=Math.floor(t/(ds+1)),r=Math.floor(t%(ds+1));return vt.box(vt.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,n>>24,n>>16&255,n>>8&255,n&255,r>>24,r>>16&255,r>>8&255,r&255,85,196,0,0]))}static mdia(e){return vt.box(vt.types.mdia,vt.mdhd(e.timescale||0,e.duration||0),vt.hdlr(e.type),vt.minf(e))}static mfhd(e){return vt.box(vt.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,e&255]))}static minf(e){return e.type==="audio"?vt.box(vt.types.minf,vt.box(vt.types.smhd,vt.SMHD),vt.DINF,vt.stbl(e)):vt.box(vt.types.minf,vt.box(vt.types.vmhd,vt.VMHD),vt.DINF,vt.stbl(e))}static moof(e,t,n){return vt.box(vt.types.moof,vt.mfhd(e),vt.traf(n,t))}static moov(e){let t=e.length;const n=[];for(;t--;)n[t]=vt.trak(e[t]);return vt.box.apply(null,[vt.types.moov,vt.mvhd(e[0].timescale||0,e[0].duration||0)].concat(n).concat(vt.mvex(e)))}static mvex(e){let t=e.length;const n=[];for(;t--;)n[t]=vt.trex(e[t]);return vt.box.apply(null,[vt.types.mvex,...n])}static mvhd(e,t){t*=e;const n=Math.floor(t/(ds+1)),r=Math.floor(t%(ds+1)),i=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,n>>24,n>>16&255,n>>8&255,n&255,r>>24,r>>16&255,r>>8&255,r&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 vt.box(vt.types.mvhd,i)}static sdtp(e){const t=e.samples||[],n=new Uint8Array(4+t.length);let r,i;for(r=0;r<t.length;r++)i=t[r].flags,n[r+4]=i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;return vt.box(vt.types.sdtp,n)}static stbl(e){return vt.box(vt.types.stbl,vt.stsd(e),vt.box(vt.types.stts,vt.STTS),vt.box(vt.types.stsc,vt.STSC),vt.box(vt.types.stsz,vt.STSZ),vt.box(vt.types.stco,vt.STCO))}static avc1(e){let t=[],n=[],r,i,s;for(r=0;r<e.sps.length;r++)i=e.sps[r],s=i.byteLength,t.push(s>>>8&255),t.push(s&255),t=t.concat(Array.prototype.slice.call(i));for(r=0;r<e.pps.length;r++)i=e.pps[r],s=i.byteLength,n.push(s>>>8&255),n.push(s&255),n=n.concat(Array.prototype.slice.call(i));const l=vt.box(vt.types.avcC,new Uint8Array([1,t[3],t[4],t[5],255,224|e.sps.length].concat(t).concat([e.pps.length]).concat(n))),c=e.width,u=e.height,d=e.pixelRatio[0],p=e.pixelRatio[1];return vt.box(vt.types.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,c>>8&255,c&255,u>>8&255,u&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),l,vt.box(vt.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),vt.box(vt.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,d&255,p>>24,p>>16&255,p>>8&255,p&255])))}static esds(e){const t=e.config;return new Uint8Array([0,0,0,0,3,25,0,1,0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,...t,6,1,2])}static audioStsd(e){const t=e.samplerate||0;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount||0,0,16,0,0,0,0,t>>8&255,t&255,0,0])}static mp4a(e){return vt.box(vt.types.mp4a,vt.audioStsd(e),vt.box(vt.types.esds,vt.esds(e)))}static mp3(e){return vt.box(vt.types[".mp3"],vt.audioStsd(e))}static ac3(e){return vt.box(vt.types["ac-3"],vt.audioStsd(e),vt.box(vt.types.dac3,e.config))}static stsd(e){const{segmentCodec:t}=e;if(e.type==="audio"){if(t==="aac")return vt.box(vt.types.stsd,vt.STSD,vt.mp4a(e));if(t==="ac3"&&e.config)return vt.box(vt.types.stsd,vt.STSD,vt.ac3(e));if(t==="mp3"&&e.codec==="mp3")return vt.box(vt.types.stsd,vt.STSD,vt.mp3(e))}else if(e.pps&&e.sps){if(t==="avc")return vt.box(vt.types.stsd,vt.STSD,vt.avc1(e));if(t==="hevc"&&e.vps)return vt.box(vt.types.stsd,vt.STSD,vt.hvc1(e))}else throw new Error("video track missing pps or sps");throw new Error(`unsupported ${e.type} segment codec (${t}/${e.codec})`)}static tkhd(e){const t=e.id,n=(e.duration||0)*(e.timescale||0),r=e.width||0,i=e.height||0,s=Math.floor(n/(ds+1)),l=Math.floor(n%(ds+1));return vt.box(vt.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,t&255,0,0,0,0,s>>24,s>>16&255,s>>8&255,s&255,l>>24,l>>16&255,l>>8&255,l&255,0,0,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,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,r>>8&255,r&255,0,0,i>>8&255,i&255,0,0]))}static traf(e,t){const n=vt.sdtp(e),r=e.id,i=Math.floor(t/(ds+1)),s=Math.floor(t%(ds+1));return vt.box(vt.types.traf,vt.box(vt.types.tfhd,new Uint8Array([0,0,0,0,r>>24,r>>16&255,r>>8&255,r&255])),vt.box(vt.types.tfdt,new Uint8Array([1,0,0,0,i>>24,i>>16&255,i>>8&255,i&255,s>>24,s>>16&255,s>>8&255,s&255])),vt.trun(e,n.length+16+20+8+16+8+8),n)}static trak(e){return e.duration=e.duration||4294967295,vt.box(vt.types.trak,vt.tkhd(e),vt.mdia(e))}static trex(e){const t=e.id;return vt.box(vt.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,t&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,t){const n=e.samples||[],r=n.length,i=12+16*r,s=new Uint8Array(i);let l,c,u,d,p,b;for(t+=8+i,s.set([e.type==="video"?1:0,0,15,1,r>>>24&255,r>>>16&255,r>>>8&255,r&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),l=0;l<r;l++)c=n[l],u=c.duration,d=c.size,p=c.flags,b=c.cts,s.set([u>>>24&255,u>>>16&255,u>>>8&255,u&255,d>>>24&255,d>>>16&255,d>>>8&255,d&255,p.isLeading<<2|p.dependsOn,p.isDependedOn<<6|p.hasRedundancy<<4|p.paddingValue<<1|p.isNonSync,p.degradPrio&61440,p.degradPrio&15,b>>>24&255,b>>>16&255,b>>>8&255,b&255],12+16*l);return vt.box(vt.types.trun,s)}static initSegment(e){vt.types||vt.init();const t=vt.moov(e);return Fe(vt.FTYP,t)}static hvc1(e){const t=e.params,n=[e.vps,e.sps,e.pps],r=4,i=new Uint8Array([1,t.general_profile_space<<6|(t.general_tier_flag?32:0)|t.general_profile_idc,t.general_profile_compatibility_flags[0],t.general_profile_compatibility_flags[1],t.general_profile_compatibility_flags[2],t.general_profile_compatibility_flags[3],t.general_constraint_indicator_flags[0],t.general_constraint_indicator_flags[1],t.general_constraint_indicator_flags[2],t.general_constraint_indicator_flags[3],t.general_constraint_indicator_flags[4],t.general_constraint_indicator_flags[5],t.general_level_idc,240|t.min_spatial_segmentation_idc>>8,255&t.min_spatial_segmentation_idc,252|t.parallelismType,252|t.chroma_format_idc,248|t.bit_depth_luma_minus8,248|t.bit_depth_chroma_minus8,0,parseInt(t.frame_rate.fps),r-1|t.temporal_id_nested<<2|t.num_temporal_layers<<3|(t.frame_rate.fixed?64:0),n.length]);let s=i.length;for(let D=0;D<n.length;D+=1){s+=3;for(let X=0;X<n[D].length;X+=1)s+=2+n[D][X].length}const l=new Uint8Array(s);l.set(i,0),s=i.length;const c=n.length-1;for(let D=0;D<n.length;D+=1){l.set(new Uint8Array([32+D|(D===c?128:0),0,n[D].length]),s),s+=3;for(let X=0;X<n[D].length;X+=1)l.set(new Uint8Array([n[D][X].length>>8,n[D][X].length&255]),s),s+=2,l.set(n[D][X],s),s+=n[D][X].length}const u=vt.box(vt.types.hvcC,l),d=e.width,p=e.height,b=e.pixelRatio[0],w=e.pixelRatio[1];return vt.box(vt.types.hvc1,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,d>>8&255,d&255,p>>8&255,p&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),u,vt.box(vt.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),vt.box(vt.types.pasp,new Uint8Array([b>>24,b>>16&255,b>>8&255,b&255,w>>24,w>>16&255,w>>8&255,w&255])))}}vt.types=void 0,vt.HDLR_TYPES=void 0,vt.STTS=void 0,vt.STSC=void 0,vt.STCO=void 0,vt.STSZ=void 0,vt.VMHD=void 0,vt.SMHD=void 0,vt.STSD=void 0,vt.FTYP=void 0,vt.DINF=void 0;const oo=9e4;function xa(a,e,t=1,n=!1){const r=a*e*t;return n?Math.round(r):r}function Ul(a,e,t=1,n=!1){return xa(a,e,1/t,n)}function Ks(a,e=!1){return xa(a,1e3,1/oo,e)}function Kl(a,e=1){return xa(a,oo,1/e)}const Zl=10*1e3,zl=1024,Hl=1152,Gl=1536;let Cs=null,Sa=null;function lo(a,e,t,n){return{duration:e,size:t,cts:n,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:a?2:1,isNonSync:a?0:1}}}class na{constructor(e,t,n,r){if(this.logger=void 0,this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=e,this.config=t,this.typeSupported=n,this.logger=r,this.ISGenerated=!1,Cs===null){const s=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Cs=s?parseInt(s[1]):0}if(Sa===null){const i=navigator.userAgent.match(/Safari\/(\d+)/i);Sa=i?parseInt(i[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){this.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){this.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){this.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}getVideoStartPts(e){let t=!1;const n=e[0].pts,r=e.reduce((i,s)=>{let l=s.pts,c=l-i;return c<-4294967296&&(t=!0,l=Ci(l,n),c=l-i),c>0?i:l},n);return t&&this.logger.debug("PTS rollover detected"),r}remux(e,t,n,r,i,s,l,c){let u,d,p,b,w,D,X=i,Y=i;const _e=e.pid>-1,Me=t.pid>-1,Ie=t.samples.length,st=e.samples.length>0,ut=l&&Ie>0||Ie>1;if((!_e||st)&&(!Me||ut)||this.ISGenerated||l){if(this.ISGenerated){var ct,At,Ht,mt;const vr=this.videoTrackConfig;(vr&&(t.width!==vr.width||t.height!==vr.height||((ct=t.pixelRatio)==null?void 0:ct[0])!==((At=vr.pixelRatio)==null?void 0:At[0])||((Ht=t.pixelRatio)==null?void 0:Ht[1])!==((mt=vr.pixelRatio)==null?void 0:mt[1]))||!vr&&ut||this.nextAudioPts===null&&st)&&this.resetInitSegment()}this.ISGenerated||(p=this.generateIS(e,t,i,s));const En=this.isVideoContiguous;let Mn=-1,Lr;if(ut&&(Mn=Wl(t.samples),!En&&this.config.forceKeyFrameOnDiscontinuity))if(D=!0,Mn>0){this.logger.warn(`[mp4-remuxer]: Dropped ${Mn} out of ${Ie} video samples due to a missing keyframe`);const vr=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(Mn),t.dropped+=Mn,Y+=(t.samples[0].pts-vr)/t.inputTimeScale,Lr=Y}else Mn===-1&&(this.logger.warn(`[mp4-remuxer]: No keyframe found out of ${Ie} video samples`),D=!1);if(this.ISGenerated){if(st&&ut){const vr=this.getVideoStartPts(t.samples),qn=(Ci(e.samples[0].pts,vr)-vr)/t.inputTimeScale;X+=Math.max(0,qn),Y+=Math.max(0,-qn)}if(st){if(e.samplerate||(this.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),p=this.generateIS(e,t,i,s)),d=this.remuxAudio(e,X,this.isAudioContiguous,s,Me||ut||c===te.AUDIO?Y:void 0),ut){const vr=d?d.endPTS-d.startPTS:0;t.inputTimeScale||(this.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),p=this.generateIS(e,t,i,s)),u=this.remuxVideo(t,Y,En,vr)}}else ut&&(u=this.remuxVideo(t,Y,En,0));u&&(u.firstKeyFrame=Mn,u.independent=Mn!==-1,u.firstKeyFramePTS=Lr)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(n.samples.length&&(w=uo(n,i,this._initPTS,this._initDTS)),r.samples.length&&(b=co(r,i,this._initPTS))),{audio:d,video:u,initSegment:p,independent:D,text:b,id3:w}}generateIS(e,t,n,r){const i=e.samples,s=t.samples,l=this.typeSupported,c={},u=this._initPTS;let d=!u||r,p="audio/mp4",b,w,D;if(d&&(b=w=1/0),e.config&&i.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":l.mpeg?(p="audio/mpeg",e.codec=""):l.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}c.audio={id:"audio",container:p,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&l.mpeg?new Uint8Array(0):vt.initSegment([e]),metadata:{channelCount:e.channelCount}},d&&(D=e.inputTimeScale,!u||D!==u.timescale?b=w=i[0].pts-Math.round(D*n):d=!1)}if(t.sps&&t.pps&&s.length){if(t.timescale=t.inputTimeScale,c.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:vt.initSegment([t]),metadata:{width:t.width,height:t.height}},d)if(D=t.inputTimeScale,!u||D!==u.timescale){const X=this.getVideoStartPts(s),Y=Math.round(D*n);w=Math.min(w,Ci(s[0].dts,X)-Y),b=Math.min(b,X-Y)}else d=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(c).length)return this.ISGenerated=!0,d?(this._initPTS={baseTime:b,timescale:D},this._initDTS={baseTime:w,timescale:D}):b=D=void 0,{tracks:c,initPTS:b,timescale:D}}remuxVideo(e,t,n,r){const i=e.inputTimeScale,s=e.samples,l=[],c=s.length,u=this._initPTS;let d=this.nextAvcDts,p=8,b=this.videoSampleDuration,w,D,X=Number.POSITIVE_INFINITY,Y=Number.NEGATIVE_INFINITY,_e=!1;if(!n||d===null){const bn=t*i,Dn=s[0].pts-Ci(s[0].dts,s[0].pts);Cs&&d!==null&&Math.abs(bn-Dn-d)<15e3?n=!0:d=bn-Dn}const Me=u.baseTime*i/u.timescale;for(let bn=0;bn<c;bn++){const Dn=s[bn];Dn.pts=Ci(Dn.pts-Me,d),Dn.dts=Ci(Dn.dts-Me,d),Dn.dts<s[bn>0?bn-1:bn].dts&&(_e=!0)}_e&&s.sort(function(bn,Dn){const Ar=bn.dts-Dn.dts,br=bn.pts-Dn.pts;return Ar||br}),w=s[0].dts,D=s[s.length-1].dts;const Ie=D-w,st=Ie?Math.round(Ie/(c-1)):b||e.inputTimeScale/30;if(n){const bn=w-d,Dn=bn>st,Ar=bn<-1;if((Dn||Ar)&&(Dn?this.logger.warn(`${(e.segmentCodec||"").toUpperCase()}: ${Ks(bn,!0)} ms (${bn}dts) hole between fragments detected at ${t.toFixed(3)}`):this.logger.warn(`${(e.segmentCodec||"").toUpperCase()}: ${Ks(-bn,!0)} ms (${bn}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!Ar||d>=s[0].pts||Cs)){w=d;const br=s[0].pts-bn;if(Dn)s[0].dts=w,s[0].pts=br;else{let Ir=!0;for(let Nr=0;Nr<s.length&&!(s[Nr].dts>br&&Ir);Nr++){const Ur=s[Nr].pts;if(s[Nr].dts-=bn,s[Nr].pts-=bn,Nr<s.length-1){const jr=s[Nr+1].pts,gi=s[Nr].pts,xi=jr<=gi,ms=jr<=Ur;Ir=xi==ms}}}this.logger.log(`Video: Initial PTS/DTS adjusted: ${Ks(br,!0)}/${Ks(w,!0)}, delta: ${Ks(bn,!0)} ms`)}}w=Math.max(0,w);let ut=0,Mt=0,ct=w;for(let bn=0;bn<c;bn++){const Dn=s[bn],Ar=Dn.units,br=Ar.length;let Ir=0;for(let Nr=0;Nr<br;Nr++)Ir+=Ar[Nr].data.length;Mt+=Ir,ut+=br,Dn.length=Ir,Dn.dts<ct?(Dn.dts=ct,ct+=st/4|0||1):ct=Dn.dts,X=Math.min(Dn.pts,X),Y=Math.max(Dn.pts,Y)}D=s[c-1].dts;const At=Mt+4*ut+8;let Ht;try{Ht=new Uint8Array(At)}catch(bn){this.observer.emit(f.ERROR,f.ERROR,{type:fe.MUX_ERROR,details:F.REMUX_ALLOC_ERROR,fatal:!1,error:bn,bytes:At,reason:`fail allocating video mdat ${At}`});return}const mt=new DataView(Ht.buffer);mt.setUint32(0,At),Ht.set(vt.types.mdat,4);let En=!1,Mn=Number.POSITIVE_INFINITY,Lr=Number.POSITIVE_INFINITY,vr=Number.NEGATIVE_INFINITY,cr=Number.NEGATIVE_INFINITY;for(let bn=0;bn<c;bn++){const Dn=s[bn],Ar=Dn.units;let br=0;for(let Ur=0,jr=Ar.length;Ur<jr;Ur++){const gi=Ar[Ur],xi=gi.data,ms=gi.data.byteLength;mt.setUint32(p,ms),p+=4,Ht.set(xi,p),p+=ms,br+=4+ms}let Ir;if(bn<c-1)b=s[bn+1].dts-Dn.dts,Ir=s[bn+1].pts-Dn.pts;else{const Ur=this.config,jr=bn>0?Dn.dts-s[bn-1].dts:st;if(Ir=bn>0?Dn.pts-s[bn-1].pts:st,Ur.stretchShortVideoTrack&&this.nextAudioPts!==null){const gi=Math.floor(Ur.maxBufferHole*i),xi=(r?X+r*i:this.nextAudioPts)-Dn.pts;xi>gi?(b=xi-jr,b<0?b=jr:En=!0,this.logger.log(`[mp4-remuxer]: It is approximately ${xi/90} ms to the next segment; using duration ${b/90} ms for the last video frame.`)):b=jr}else b=jr}const Nr=Math.round(Dn.pts-Dn.dts);Mn=Math.min(Mn,b),vr=Math.max(vr,b),Lr=Math.min(Lr,Ir),cr=Math.max(cr,Ir),l.push(lo(Dn.key,b,br,Nr))}if(l.length){if(Cs){if(Cs<70){const bn=l[0].flags;bn.dependsOn=2,bn.isNonSync=0}}else if(Sa&&cr-Lr<vr-Mn&&st/vr<.025&&l[0].cts===0){this.logger.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let bn=w;for(let Dn=0,Ar=l.length;Dn<Ar;Dn++){const br=bn+l[Dn].duration,Ir=bn+l[Dn].cts;if(Dn<Ar-1){const Nr=br+l[Dn+1].cts;l[Dn].duration=Nr-Ir}else l[Dn].duration=Dn?l[Dn-1].duration:st;l[Dn].cts=0,bn=br}}}b=En||!b?st:b,this.nextAvcDts=d=D+b,this.videoSampleDuration=b,this.isVideoContiguous=!0;const ur={data1:vt.moof(e.sequenceNumber++,w,h(e,{samples:l})),data2:Ht,startPTS:X/i,endPTS:(Y+b)/i,startDTS:w/i,endDTS:d/i,type:"video",hasAudio:!1,hasVideo:!0,nb:l.length,dropped:e.dropped};return e.samples=[],e.dropped=0,ur}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return Hl;case"ac3":return Gl;default:return zl}}remuxAudio(e,t,n,r,i){const s=e.inputTimeScale,l=e.samplerate?e.samplerate:s,c=s/l,u=this.getSamplesPerFrame(e),d=u*c,p=this._initPTS,b=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,w=[],D=i!==void 0;let X=e.samples,Y=b?0:8,_e=this.nextAudioPts||-1;const Me=t*s,Ie=p.baseTime*s/p.timescale;if(this.isAudioContiguous=n=n||X.length&&_e>0&&(r&&Math.abs(Me-_e)<9e3||Math.abs(Ci(X[0].pts-Ie,Me)-_e)<20*d),X.forEach(function(qn){qn.pts=Ci(qn.pts-Ie,Me)}),!n||_e<0){if(X=X.filter(qn=>qn.pts>=0),!X.length)return;i===0?_e=0:r&&!D?_e=Math.max(0,Me):_e=X[0].pts}if(e.segmentCodec==="aac"){const qn=this.config.maxAudioFramesDrift;for(let fr=0,ur=_e;fr<X.length;fr++){const bn=X[fr],Dn=bn.pts,Ar=Dn-ur,br=Math.abs(1e3*Ar/s);if(Ar<=-qn*d&&D)fr===0&&(this.logger.warn(`Audio frame @ ${(Dn/s).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3*Ar/s)} ms.`),this.nextAudioPts=_e=ur=Dn);else if(Ar>=qn*d&&br<Zl&&D){let Ir=Math.round(Ar/d);ur=Dn-Ir*d,ur<0&&(Ir--,ur+=d),fr===0&&(this.nextAudioPts=_e=ur),this.logger.warn(`[mp4-remuxer]: Injecting ${Ir} audio frame @ ${(ur/s).toFixed(3)}s due to ${Math.round(1e3*Ar/s)} ms gap.`);for(let Nr=0;Nr<Ir;Nr++){const Ur=Math.max(ur,0);let jr=Bl.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);jr||(this.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),jr=bn.unit.subarray()),X.splice(fr,0,{unit:jr,pts:Ur}),ur+=d,fr++}}bn.pts=ur,ur+=d}}let st=null,ut=null,Mt,ct=0,At=X.length;for(;At--;)ct+=X[At].unit.byteLength;for(let qn=0,fr=X.length;qn<fr;qn++){const ur=X[qn],bn=ur.unit;let Dn=ur.pts;if(ut!==null){const br=w[qn-1];br.duration=Math.round((Dn-ut)/c)}else if(n&&e.segmentCodec==="aac"&&(Dn=_e),st=Dn,ct>0){ct+=Y;try{Mt=new Uint8Array(ct)}catch(br){this.observer.emit(f.ERROR,f.ERROR,{type:fe.MUX_ERROR,details:F.REMUX_ALLOC_ERROR,fatal:!1,error:br,bytes:ct,reason:`fail allocating audio mdat ${ct}`});return}b||(new DataView(Mt.buffer).setUint32(0,ct),Mt.set(vt.types.mdat,4))}else return;Mt.set(bn,Y);const Ar=bn.byteLength;Y+=Ar,w.push(lo(!0,u,Ar,0)),ut=Dn}const Ht=w.length;if(!Ht)return;const mt=w[w.length-1];this.nextAudioPts=_e=ut+c*mt.duration;const En=b?new Uint8Array(0):vt.moof(e.sequenceNumber++,st/c,h({},e,{samples:w}));e.samples=[];const Mn=st/s,Lr=_e/s,cr={data1:En,data2:Mt,startPTS:Mn,endPTS:Lr,startDTS:Mn,endDTS:Lr,type:"audio",hasAudio:!0,hasVideo:!1,nb:Ht};return this.isAudioContiguous=!0,cr}}function Ci(a,e){let t;if(e===null)return a;for(e<a?t=-8589934592:t=8589934592;Math.abs(a-e)>4294967296;)a+=t;return a}function Wl(a){for(let e=0;e<a.length;e++)if(a[e].key)return e;return-1}function uo(a,e,t,n){const r=a.samples.length;if(!r)return;const i=a.inputTimeScale;for(let l=0;l<r;l++){const c=a.samples[l];c.pts=Ci(c.pts-t.baseTime*i/t.timescale,e*i)/i,c.dts=Ci(c.dts-n.baseTime*i/n.timescale,e*i)/i}const s=a.samples;return a.samples=[],{samples:s}}function co(a,e,t){const n=a.samples.length;if(!n)return;const r=a.inputTimeScale;for(let s=0;s<n;s++){const l=a.samples[s];l.pts=Ci(l.pts-t.baseTime*r/t.timescale,e*r)/r}a.samples.sort((s,l)=>s.pts-l.pts);const i=a.samples;return a.samples=[],{samples:i}}class Vl{constructor(e,t,n,r){this.logger=void 0,this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null,this.logger=r}destroy(){}resetTimeStamp(e){this.initPTS=e,this.lastEndTime=null}resetNextTimestamp(){this.lastEndTime=null}resetInitSegment(e,t,n,r){this.audioCodec=t,this.videoCodec=n,this.generateInitSegment(B(e,r)),this.emitInitSegment=!0}generateInitSegment(e){let{audioCodec:t,videoCodec:n}=this;if(!(e!=null&&e.byteLength)){this.initTracks=void 0,this.initData=void 0;return}const r=this.initData=Le(e);r.audio&&(t=fo(r.audio,m.AUDIO)),r.video&&(n=fo(r.video,m.VIDEO));const i={};r.audio&&r.video?i.audiovideo={container:"video/mp4",codec:t+","+n,supplemental:r.video.supplemental,initSegment:e,id:"main"}:r.audio?i.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:r.video?i.video={container:"video/mp4",codec:n,supplemental:r.video.supplemental,initSegment:e,id:"main"}:this.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=i}remux(e,t,n,r,i,s){var l,c;let{initPTS:u,lastEndTime:d}=this;const p={audio:void 0,video:void 0,text:r,id3:n,initSegment:void 0};x(d)||(d=this.lastEndTime=i||0);const b=t.samples;if(!(b!=null&&b.length))return p;const w={initPTS:void 0,timescale:1};let D=this.initData;if((l=D)!=null&&l.length||(this.generateInitSegment(b),D=this.initData),!((c=D)!=null&&c.length))return this.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),p;this.emitInitSegment&&(w.tracks=this.initTracks,this.emitInitSegment=!1);const X=de(b,D),Y=me(D,b),_e=Y===null?i:Y;(s||!u)&&($l(u,_e,i,X)||w.timescale!==u.timescale)&&(w.initPTS=_e-i,u&&u.timescale===1&&this.logger.warn(`Adjusting initPTS @${i} from ${u.baseTime/u.timescale} to ${w.initPTS}`),this.initPTS=u={baseTime:w.initPTS,timescale:1});const Me=e?_e-u.baseTime/u.timescale:d,Ie=Me+X;Ee(D,b,u.baseTime/u.timescale),X>0?this.lastEndTime=Ie:(this.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const st=!!D.audio,ut=!!D.video;let Mt="";st&&(Mt+="audio"),ut&&(Mt+="video");const ct={data1:b,startPTS:Me,startDTS:Me,endPTS:Ie,endDTS:Ie,type:Mt,hasAudio:st,hasVideo:ut,nb:1,dropped:0};return p.audio=ct.type==="audio"?ct:void 0,p.video=ct.type!=="audio"?ct:void 0,p.initSegment=w,p.id3=uo(n,i,u,u),r.samples.length&&(p.text=co(r,i,u)),p}}function $l(a,e,t,n){if(a===null)return!0;const r=Math.max(n,1),i=e-a.baseTime/a.timescale;return Math.abs(i-t)>r}function fo(a,e){const t=a==null?void 0:a.codec;return t&&t.length>4?t:e===m.AUDIO?t==="ec-3"||t==="ac-3"||t==="alac"?t:t==="fLaC"||t==="Opus"?Ze(t,!1):(G.warn(`Unhandled audio codec "${t}" in mp4 MAP`),t||"mp4a"):(G.warn(`Unhandled video codec "${t}" in mp4 MAP`),t||"avc1")}let Ji;try{Ji=self.performance.now.bind(self.performance)}catch(a){Ji=Date.now}const ra=[{demux:Ol,remux:Vl},{demux:fs,remux:na},{demux:Il,remux:na},{demux:kl,remux:na}];ra.splice(2,0,{demux:Ll,remux:na});class ho{constructor(e,t,n,r,i,s){this.asyncResult=!1,this.logger=void 0,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=n,this.id=i,this.logger=s}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,n,r){const i=n.transmuxing;i.executeStart=Ji();let s=new Uint8Array(e);const{currentTransmuxState:l,transmuxConfig:c}=this;r&&(this.currentTransmuxState=r);const{contiguous:u,discontinuity:d,trackSwitch:p,accurateTimeOffset:b,timeOffset:w,initSegmentChange:D}=r||l,{audioCodec:X,videoCodec:Y,defaultInitPts:_e,duration:Me,initSegmentData:Ie}=c,st=jl(s,t);if(st&&Zr(st.method)){const At=this.getDecrypter(),Ht=Br(st.method);if(At.isSync()){let mt=At.softwareDecrypt(s,st.key.buffer,st.iv.buffer,Ht);if(n.part>-1){const Mn=At.flush();mt=Mn&&Mn.buffer}if(!mt)return i.executeEnd=Ji(),wa(n);s=new Uint8Array(mt)}else return this.asyncResult=!0,this.decryptionPromise=At.webCryptoDecrypt(s,st.key.buffer,st.iv.buffer,Ht).then(mt=>{const En=this.push(mt,null,n);return this.decryptionPromise=null,En}),this.decryptionPromise}const ut=this.needsProbing(d,p);if(ut){const At=this.configureTransmuxer(s);if(At)return this.logger.warn(`[transmuxer] ${At.message}`),this.observer.emit(f.ERROR,f.ERROR,{type:fe.MEDIA_ERROR,details:F.FRAG_PARSING_ERROR,fatal:!1,error:At,reason:At.message}),i.executeEnd=Ji(),wa(n)}(d||p||D||ut)&&this.resetInitSegment(Ie,X,Y,Me,t),(d||D||ut)&&this.resetInitialTimestamp(_e),u||this.resetContiguity();const Mt=this.transmux(s,st,w,b,n);this.asyncResult=Zs(Mt);const ct=this.currentTransmuxState;return ct.contiguous=!0,ct.discontinuity=!1,ct.trackSwitch=!1,i.executeEnd=Ji(),Mt}flush(e){const t=e.transmuxing;t.executeStart=Ji();const{decrypter:n,currentTransmuxState:r,decryptionPromise:i}=this;if(i)return this.asyncResult=!0,i.then(()=>this.flush(e));const s=[],{timeOffset:l}=r;if(n){const p=n.flush();p&&s.push(this.push(p.buffer,null,e))}const{demuxer:c,remuxer:u}=this;if(!c||!u){t.executeEnd=Ji();const p=[wa(e)];return this.asyncResult?Promise.resolve(p):p}const d=c.flush(l);return Zs(d)?(this.asyncResult=!0,d.then(p=>(this.flushRemux(s,p,e),s))):(this.flushRemux(s,d,e),this.asyncResult?Promise.resolve(s):s)}flushRemux(e,t,n){const{audioTrack:r,videoTrack:i,id3Track:s,textTrack:l}=t,{accurateTimeOffset:c,timeOffset:u}=this.currentTransmuxState;this.logger.log(`[transmuxer.ts]: Flushed ${this.id} sn: ${n.sn}${n.part>-1?" part: "+n.part:""} of ${this.id===te.MAIN?"level":"track"} ${n.level}`);const d=this.remuxer.remux(r,i,s,l,u,c,!0,this.id);e.push({remuxResult:d,chunkMeta:n}),n.transmuxing.executeEnd=Ji()}resetInitialTimestamp(e){const{demuxer:t,remuxer:n}=this;!t||!n||(t.resetTimeStamp(e),n.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;!e||!t||(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,n,r,i){const{demuxer:s,remuxer:l}=this;!s||!l||(s.resetInitSegment(e,t,n,r),l.resetInitSegment(e,t,n,i))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,n,r,i){let s;return t&&t.method==="SAMPLE-AES"?s=this.transmuxSampleAes(e,t,n,r,i):s=this.transmuxUnencrypted(e,n,r,i),s}transmuxUnencrypted(e,t,n,r){const{audioTrack:i,videoTrack:s,id3Track:l,textTrack:c}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(i,s,l,c,t,n,!1,this.id),chunkMeta:r}}transmuxSampleAes(e,t,n,r,i){return this.demuxer.demuxSampleAes(e,t,n).then(s=>({remuxResult:this.remuxer.remux(s.audioTrack,s.videoTrack,s.id3Track,s.textTrack,n,r,!1,this.id),chunkMeta:i}))}configureTransmuxer(e){const{config:t,observer:n,typeSupported:r}=this;let i;for(let p=0,b=ra.length;p<b;p++){var s;if((s=ra[p].demux)!=null&&s.probe(e,this.logger)){i=ra[p];break}}if(!i)return new Error("Failed to find demuxer by probing fragment data");const l=this.demuxer,c=this.remuxer,u=i.remux,d=i.demux;(!c||!(c instanceof u))&&(this.remuxer=new u(n,t,r,this.logger)),(!l||!(l instanceof d))&&(this.demuxer=new d(n,t,r,this.logger),this.probe=d.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new vn(this.config)),e}}function jl(a,e){let t=null;return a.byteLength>0&&(e==null?void 0:e.key)!=null&&e.iv!==null&&e.method!=null&&(t=e),t}const wa=a=>({remuxResult:{},chunkMeta:a});function Zs(a){return"then"in a&&a.then instanceof Function}class Yl{constructor(e,t,n,r,i){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=n,this.duration=r,this.defaultInitPts=i||null}}class Xl{constructor(e,t,n,r,i,s){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=n,this.trackSwitch=r,this.timeOffset=i,this.initSegmentChange=s}}let po=0;class mo{constructor(e,t,n,r){this.error=null,this.hls=void 0,this.id=void 0,this.instanceNo=po++,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.onWorkerMessage=c=>{const u=c.data,d=this.hls;if(!(!d||!(u!=null&&u.event)||u.instanceNo!==this.instanceNo))switch(u.event){case"init":{var p;const b=(p=this.workerContext)==null?void 0:p.objectURL;b&&self.URL.revokeObjectURL(b);break}case"transmuxComplete":{this.handleTransmuxComplete(u.data);break}case"flush":{this.onFlush(u.data);break}case"workerLog":{d.logger[u.data.logType]&&d.logger[u.data.logType](u.data.message);break}default:{u.data=u.data||{},u.data.frag=this.frag,u.data.part=this.part,u.data.id=this.id,d.trigger(u.event,u.data);break}}},this.onWorkerError=c=>{if(!this.hls)return;const u=new Error(`${c.message} (${c.filename}:${c.lineno})`);this.hls.config.enableWorker=!1,this.hls.logger.warn(`Error in "${this.id}" Web Worker, fallback to inline`),this.hls.trigger(f.ERROR,{type:fe.OTHER_ERROR,details:F.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:u})};const i=e.config;this.hls=e,this.id=t,this.useWorker=!!i.enableWorker,this.onTransmuxComplete=n,this.onFlush=r;const s=(c,u)=>{u=u||{},u.frag=this.frag||void 0,c===f.ERROR&&(u=u,u.parent=this.id,u.part=this.part,this.error=u.error),this.hls.trigger(c,u)};this.observer=new Zi,this.observer.on(f.FRAG_DECRYPTED,s),this.observer.on(f.ERROR,s);const l=yt(i.preferManagedMediaSource);if(this.useWorker&&typeof Worker!="undefined"){const c=this.hls.logger;if(i.workerPath||$s()){try{i.workerPath?(c.log(`loading Web Worker ${i.workerPath} for "${t}"`),this.workerContext=pa(i.workerPath)):(c.log(`injecting Web Worker for "${t}"`),this.workerContext=js());const{worker:d}=this.workerContext;d.addEventListener("message",this.onWorkerMessage),d.addEventListener("error",this.onWorkerError),d.postMessage({instanceNo:this.instanceNo,cmd:"init",typeSupported:l,id:t,config:Et(i)})}catch(d){c.warn(`Error setting up "${t}" Web Worker, fallback to inline`,d),this.terminateWorker(),this.error=null,this.transmuxer=new ho(this.observer,l,i,"",t,e.logger)}return}}this.transmuxer=new ho(this.observer,l,i,"",t,e.logger)}reset(){if(this.frag=null,this.part=null,this.workerContext){const e=this.instanceNo;this.instanceNo=po++;const t=this.hls.config,n=yt(t.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:e,typeSupported:n,id:this.id,config:Et(t)})}}terminateWorker(){if(this.workerContext){const{worker:e}=this.workerContext;this.workerContext=null,e.removeEventListener("message",this.onWorkerMessage),e.removeEventListener("error",this.onWorkerError),ma(this.hls.config.workerPath)}}destroy(){if(this.workerContext)this.terminateWorker(),this.onWorkerMessage=this.onWorkerError=null;else{const t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.part=null,this.observer=null,this.hls=null}push(e,t,n,r,i,s,l,c,u,d){var p,b;u.transmuxing.start=self.performance.now();const{instanceNo:w,transmuxer:D}=this,X=s?s.start:i.start,Y=i.decryptdata,_e=this.frag,Me=!(_e&&i.cc===_e.cc),Ie=!(_e&&u.level===_e.level),st=_e?u.sn-_e.sn:-1,ut=this.part?u.part-this.part.index:-1,Mt=st===0&&u.id>1&&u.id===(_e==null?void 0:_e.stats.chunkCount),ct=!Ie&&(st===1||st===0&&(ut===1||Mt&&ut<=0)),At=self.performance.now();(Ie||st||i.stats.parsing.start===0)&&(i.stats.parsing.start=At),s&&(ut||!ct)&&(s.stats.parsing.start=At);const Ht=!(_e&&((p=i.initSegment)==null?void 0:p.url)===((b=_e.initSegment)==null?void 0:b.url)),mt=new Xl(Me,ct,c,Ie,X,Ht);if(!ct||Me||Ht){this.hls.logger.log(`[transmuxer-interface]: Starting new transmux session for ${i.type} sn: ${u.sn}${u.part>-1?" part: "+u.part:""} ${this.id===te.MAIN?"level":"track"}: ${u.level} id: ${u.id}
|
|
discontinuity: ${Me}
|
|
trackSwitch: ${Ie}
|
|
contiguous: ${ct}
|
|
accurateTimeOffset: ${c}
|
|
timeOffset: ${X}
|
|
initSegmentChange: ${Ht}`);const En=new Yl(n,r,t,l,d);this.configureTransmuxer(En)}if(this.frag=i,this.part=s,this.workerContext)this.workerContext.worker.postMessage({instanceNo:w,cmd:"demux",data:e,decryptdata:Y,chunkMeta:u,state:mt},e instanceof ArrayBuffer?[e]:[]);else if(D){const En=D.push(e,Y,u,mt);Zs(En)?En.then(Mn=>{this.handleTransmuxComplete(Mn)}).catch(Mn=>{this.transmuxerError(Mn,u,"transmuxer-interface push error")}):this.handleTransmuxComplete(En)}}flush(e){e.transmuxing.start=self.performance.now();const{instanceNo:t,transmuxer:n}=this;if(this.workerContext)this.workerContext.worker.postMessage({instanceNo:t,cmd:"flush",chunkMeta:e});else if(n){const r=n.flush(e);Zs(r)?r.then(i=>{this.handleFlushResult(i,e)}).catch(i=>{this.transmuxerError(i,e,"transmuxer-interface flush error")}):this.handleFlushResult(r,e)}}transmuxerError(e,t,n){this.hls&&(this.error=e,this.hls.trigger(f.ERROR,{type:fe.MEDIA_ERROR,details:F.FRAG_PARSING_ERROR,chunkMeta:t,frag:this.frag||void 0,part:this.part||void 0,fatal:!1,error:e,err:e,reason:n}))}handleFlushResult(e,t){e.forEach(n=>{this.handleTransmuxComplete(n)}),this.onFlush(t)}configureTransmuxer(e){const{instanceNo:t,transmuxer:n}=this;this.workerContext?this.workerContext.worker.postMessage({instanceNo:t,cmd:"configure",config:e}):n&&n.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}const go=100;class Ql extends ni{constructor(e,t,n){super(e,t,n,"audio-stream-controller",te.AUDIO),this.mainAnchor=null,this.mainFragLoading=null,this.audioOnly=!1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.flushing=!1,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.resetItem()}resetItem(){this.mainDetails=this.mainAnchor=this.mainFragLoading=this.bufferedTrack=this.switchingTrack=this.waitingData=this.cachedTrackLoadedData=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(f.LEVEL_LOADED,this.onLevelLoaded,this),e.on(f.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(f.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(f.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(f.BUFFER_RESET,this.onBufferReset,this),e.on(f.BUFFER_CREATED,this.onBufferCreated,this),e.on(f.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(f.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(f.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(f.FRAG_LOADING,this.onFragLoading,this),e.on(f.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){const{hls:e}=this;e&&(super.unregisterListeners(),e.off(f.LEVEL_LOADED,this.onLevelLoaded,this),e.off(f.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(f.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(f.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(f.BUFFER_RESET,this.onBufferReset,this),e.off(f.BUFFER_CREATED,this.onBufferCreated,this),e.off(f.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(f.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(f.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(f.FRAG_LOADING,this.onFragLoading,this),e.off(f.FRAG_BUFFERED,this.onFragBuffered,this))}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:i}){if(n===te.MAIN){const s=t.cc,l=this.fragCurrent;if(this.initPTS[s]={baseTime:r,timescale:i},this.log(`InitPTS for cc: ${s} found from main: ${r}/${i}`),this.mainAnchor=t,this.state===Kt.WAITING_INIT_PTS){const c=this.waitingData;(!c&&!this.loadingParts||c&&c.frag.cc!==s)&&(this.nextLoadPosition=this.findSyncFrag(t).start),this.tick()}else!this.hls.hasEnoughToStart&&l&&l.cc!==s?(this.startFragRequested=!1,this.nextLoadPosition=this.findSyncFrag(t).start,l.abortRequests(),this.resetLoadingState()):this.state===Kt.IDLE&&this.tick()}}findSyncFrag(e){const t=this.getLevelDetails(),n=e.cc;return $n(t,n,e)||t&&In(t.fragments,n)||e}startLoad(e,t){if(!this.levels){this.startPosition=e,this.state=Kt.STOPPED;return}const n=this.lastCurrentTime;this.stopLoad(),this.setInterval(go),n>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`),e=n,this.state=Kt.IDLE):this.state=Kt.WAITING_TRACK,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}doTick(){switch(this.state){case Kt.IDLE:this.doTickIdle();break;case Kt.WAITING_TRACK:{const{levels:t,trackId:n}=this,r=t==null?void 0:t[n],i=r==null?void 0:r.details;if(i&&!this.waitForLive(r)){if(this.waitForCdnTuneIn(i))break;this.state=Kt.WAITING_INIT_PTS}break}case Kt.FRAG_LOADING_WAITING_RETRY:{var e;const t=performance.now(),n=this.retryDate;if(!n||t>=n||(e=this.media)!=null&&e.seeking){const{levels:r,trackId:i}=this;this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded((r==null?void 0:r[i])||null),this.state=Kt.IDLE}break}case Kt.WAITING_INIT_PTS:{const t=this.waitingData;if(t){const{frag:n,part:r,cache:i,complete:s}=t,l=this.mainAnchor;if(this.initPTS[n.cc]!==void 0){this.waitingData=null,this.state=Kt.FRAG_LOADING;const c=i.flush().buffer,u={frag:n,part:r,payload:c,networkDetails:null};this._handleFragmentLoadProgress(u),s&&super._handleFragmentLoadComplete(u)}else l&&l.cc!==t.frag.cc&&(this.log(`Waiting fragment cc (${n.cc}) cancelled because video is at cc ${l.cc}`),this.nextLoadPosition=this.findSyncFrag(l).start,this.clearWaitingFragment())}else this.state=Kt.IDLE}}this.onTickEnd()}clearWaitingFragment(){const e=this.waitingData;e&&(this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.state!==Kt.STOPPED&&(this.state=Kt.IDLE))}resetLoadingState(){this.clearWaitingFragment(),super.resetLoadingState()}onTickEnd(){const{media:e}=this;e!=null&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){var e;const{hls:t,levels:n,media:r,trackId:i}=this,s=t.config;if(!this.buffering||!r&&!this.primaryPrefetch&&(this.startFragRequested||!s.startFragPrefetch)||!(n!=null&&n[i]))return;const l=n[i],c=l.details;if(!c||this.waitForLive(l)||this.waitForCdnTuneIn(c)){this.state=Kt.WAITING_TRACK,this.startFragRequested=!1;return}const u=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&u&&(this.bufferFlushed=!1,this.afterBufferFlushed(u,m.AUDIO,te.AUDIO));const d=this.getFwdBufferInfo(u,te.AUDIO);if(d===null)return;if(!this.switchingTrack&&this._streamEnded(d,c)){t.trigger(f.BUFFER_EOS,{type:"audio"}),this.state=Kt.ENDED;return}const p=d.len,b=t.maxBufferLength,w=c.fragments,D=w[0].start,X=this.getLoadPosition(),Y=this.flushing?X:d.end;if(this.switchingTrack&&r){const Ie=X;c.PTSKnown&&Ie<D&&(d.end>D||d.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),r.currentTime=D+.05)}if(p>=b&&!this.switchingTrack&&Y<w[w.length-1].start)return;let _e=this.getNextFragment(Y,c);if(_e&&this.isLoopLoading(_e,Y)&&(_e=this.getNextFragmentLoopLoading(_e,c,d,te.MAIN,b)),!_e){this.bufferFlushed=!0;return}let Me=((e=this.mainFragLoading)==null?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&Me&&se(_e)&&!_e.endList&&(!c.live||!this.loadingParts&&Y<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(Me)===We.OK&&(this.mainFragLoading=Me=null),Me&&se(Me))){if(_e.start>Me.end){const st=this.fragmentTracker.getFragAtPos(Y,te.MAIN);st&&st.end>Me.end&&(Me=st,this.mainFragLoading={frag:st,targetBufferTime:null})}if(_e.start>Me.end)return}this.loadFragment(_e,l,Y)}onMediaDetaching(e,t){this.bufferFlushed=this.flushing=!1,super.onMediaDetaching(e,t)}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(n=>new St(n))}onAudioTrackSwitching(e,t){const n=!!t.url;this.trackId=t.id;const{fragCurrent:r}=this;r&&(r.abortRequests(),this.removeUnbufferedFrags(r.start)),this.resetLoadingState(),n?(this.switchingTrack=t,this.flushAudioIfNeeded(t),this.state!==Kt.STOPPED&&(this.setInterval(go),this.state=Kt.IDLE,this.tick())):(this.resetTransmuxer(),this.switchingTrack=null,this.bufferedTrack=t,this.clearInterval())}onManifestLoading(){super.onManifestLoading(),this.bufferFlushed=this.flushing=this.audioOnly=!1,this.resetItem(),this.trackId=-1}onLevelLoaded(e,t){this.mainDetails=t.details;const n=this.cachedTrackLoadedData;n&&(this.cachedTrackLoadedData=null,this.onAudioTrackLoaded(f.AUDIO_TRACK_LOADED,n))}onAudioTrackLoaded(e,t){var n;const{levels:r}=this,{details:i,id:s,groupId:l,track:c}=t;if(!r){this.warn(`Audio tracks reset while loading track ${s} "${c.name}" of "${l}"`);return}const u=this.mainDetails;if(!u||i.endCC>u.endCC||u.expired){this.cachedTrackLoadedData=t,this.state!==Kt.STOPPED&&(this.state=Kt.WAITING_TRACK);return}this.cachedTrackLoadedData=null,this.log(`Audio track ${s} "${c.name}" of "${l}" loaded [${i.startSN},${i.endSN}]${i.lastPartSn?`[part-${i.lastPartSn}-${i.lastPartIndex}]`:""},duration:${i.totalduration}`);const d=r[s];let p=0;if(i.live||(n=d.details)!=null&&n.live){if(this.checkLiveUpdate(i),i.deltaUpdateFailed)return;if(d.details){var b;p=this.alignPlaylists(i,d.details,(b=this.levelLastLoaded)==null?void 0:b.details)}i.alignedSliding||($r(i,u),i.alignedSliding||Or(i,u),p=i.fragmentStart)}d.details=i,this.levelLastLoaded=d,this.startFragRequested||this.setStartPosition(u,p),this.hls.trigger(f.AUDIO_TRACK_UPDATED,{details:i,id:s,groupId:t.groupId}),this.state===Kt.WAITING_TRACK&&!this.waitForCdnTuneIn(i)&&(this.state=Kt.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const n=e.frag,{part:r,payload:i}=e,{config:s,trackId:l,levels:c}=this;if(!c){this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);return}const u=c[l];if(!u){this.warn("Audio track is undefined on fragment load progress");return}const d=u.details;if(!d){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(n.start);return}const p=s.defaultAudioCodec||u.audioCodec||"mp4a.40.2";let b=this.transmuxer;b||(b=this.transmuxer=new mo(this.hls,te.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const w=this.initPTS[n.cc],D=(t=n.initSegment)==null?void 0:t.data;if(w!==void 0){const Y=r?r.index:-1,_e=Y!==-1,Me=new ir(n.level,n.sn,n.stats.chunkCount,i.byteLength,Y,_e);b.push(i,D,p,"",n,r,d.totalduration,!1,Me,w)}else{this.log(`Unknown video PTS for cc ${n.cc}, waiting for video PTS before demuxing audio frag ${n.sn} of [${d.startSN} ,${d.endSN}],track ${l}`);const{cache:X}=this.waitingData=this.waitingData||{frag:n,part:r,cache:new ss,complete:!1};X.push(new Uint8Array(i)),this.state!==Kt.STOPPED&&(this.state=Kt.WAITING_INIT_PTS)}}_handleFragmentLoadComplete(e){if(this.waitingData){this.waitingData.complete=!0;return}super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=null}onBufferCreated(e,t){this.bufferFlushed=this.flushing=!1;const n=t.tracks.audio;n&&(this.mediaBuffer=n.buffer||null)}onFragLoading(e,t){!this.audioOnly&&t.frag.type===te.MAIN&&se(t.frag)&&(this.mainFragLoading=t,this.state===Kt.IDLE&&this.tick())}onFragBuffered(e,t){const{frag:n,part:r}=t;if(n.type!==te.AUDIO){!this.audioOnly&&n.type===te.MAIN&&!n.elementaryStreams.video&&!n.elementaryStreams.audiovideo&&(this.audioOnly=!0,this.mainFragLoading=null);return}if(this.fragContextChanged(n)){this.warn(`Fragment ${n.sn}${r?" p: "+r.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);return}if(se(n)){this.fragPrevious=n;const i=this.switchingTrack;i&&(this.bufferedTrack=i,this.switchingTrack=null,this.hls.trigger(f.AUDIO_TRACK_SWITCHED,_({},i)))}this.fragBufferedComplete(n,r),this.media&&this.tick()}onError(e,t){var n;if(t.fatal){this.state=Kt.ERROR;return}switch(t.details){case F.FRAG_GAP:case F.FRAG_PARSING_ERROR:case F.FRAG_DECRYPT_ERROR:case F.FRAG_LOAD_ERROR:case F.FRAG_LOAD_TIMEOUT:case F.KEY_LOAD_ERROR:case F.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(te.AUDIO,t);break;case F.AUDIO_TRACK_LOAD_ERROR:case F.AUDIO_TRACK_LOAD_TIMEOUT:case F.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Kt.WAITING_TRACK&&((n=t.context)==null?void 0:n.type)===ue.AUDIO_TRACK&&(this.state=Kt.IDLE);break;case F.BUFFER_ADD_CODEC_ERROR:case F.BUFFER_APPEND_ERROR:if(t.parent!=="audio")return;this.resetLoadingState();break;case F.BUFFER_FULL_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case F.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==m.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==m.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===Kt.ENDED&&(this.state=Kt.IDLE);const n=this.mediaBuffer||this.media;n&&(this.afterBufferFlushed(n,t,te.AUDIO),this.tick())}}_handleTransmuxComplete(e){var t;const n="audio",{hls:r}=this,{remuxResult:i,chunkMeta:s}=e,l=this.getCurrentContext(s);if(!l){this.resetWhenMissingContext(s);return}const{frag:c,part:u,level:d}=l,{details:p}=d,{audio:b,text:w,id3:D,initSegment:X}=i;if(this.fragContextChanged(c)||!p){this.fragmentTracker.removeFragment(c);return}if(this.state=Kt.PARSING,this.switchingTrack&&b&&this.completeAudioSwitch(this.switchingTrack),X!=null&&X.tracks){const Y=c.initSegment||c;this._bufferInitSegment(d,X.tracks,Y,s),r.trigger(f.FRAG_PARSING_INIT_SEGMENT,{frag:Y,id:n,tracks:X.tracks})}if(b){const{startPTS:Y,endPTS:_e,startDTS:Me,endDTS:Ie}=b;u&&(u.elementaryStreams[m.AUDIO]={startPTS:Y,endPTS:_e,startDTS:Me,endDTS:Ie}),c.setElementaryStreamInfo(m.AUDIO,Y,_e,Me,Ie),this.bufferFragmentData(b,c,u,s)}if(D!=null&&(t=D.samples)!=null&&t.length){const Y=h({id:n,frag:c,details:p},D);r.trigger(f.FRAG_PARSING_METADATA,Y)}if(w){const Y=h({id:n,frag:c,details:p},w);r.trigger(f.FRAG_PARSING_USERDATA,Y)}}_bufferInitSegment(e,t,n,r){if(this.state!==Kt.PARSING||(t.video&&delete t.video,t.audiovideo&&delete t.audiovideo,!t.audio))return;const i=t.audio;i.id=te.AUDIO;const s=e.audioCodec;this.log(`Init audio buffer, container:${i.container}, codecs[level/parsed]=[${s}/${i.codec}]`),s&&s.split(",").length===1&&(i.levelCodec=s),this.hls.trigger(f.BUFFER_CODECS,t);const l=i.initSegment;if(l!=null&&l.byteLength){const c={type:"audio",frag:n,part:null,chunkMeta:r,parent:n.type,data:l};this.hls.trigger(f.BUFFER_APPENDING,c)}this.tickImmediate()}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);if(this.switchingTrack||r===We.NOT_LOADED||r===We.PARTIAL){var i;if(!se(e))this._loadInitSegment(e,t);else if((i=t.details)!=null&&i.live&&!this.initPTS[e.cc]){this.log(`Waiting for video PTS in continuity counter ${e.cc} of live stream before loading audio fragment ${e.sn} of level ${this.trackId}`),this.state=Kt.WAITING_INIT_PTS;const s=this.mainDetails;s&&s.fragmentStart!==t.details.fragmentStart&&Or(t.details,s)}else super.loadFragment(e,t,n)}else this.clearTrackerIfNeeded(e)}flushAudioIfNeeded(e){if(this.media&&this.bufferedTrack){const{name:t,lang:n,assocLang:r,characteristics:i,audioCodec:s,channels:l}=this.bufferedTrack;et({name:t,lang:n,assocLang:r,characteristics:i,audioCodec:s,channels:l},e,Nt)||($t(e.url,this.hls)?(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null):this.bufferedTrack=e)}}completeAudioSwitch(e){const{hls:t}=this;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(f.AUDIO_TRACK_SWITCHED,_({},e))}}class Aa extends N{constructor(e,t){super(t,e.logger),this.hls=void 0,this.canLoad=!1,this.timer=-1,this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){this.timer!==-1&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t,n){const r=t==null?void 0:t.renditionReports;if(r){let i=-1;for(let s=0;s<r.length;s++){const l=r[s];let c;try{c=new self.URL(l.URI,t.url).href}catch(u){this.warn(`Could not construct new URL for Rendition Report: ${u}`),c=l.URI||""}if(c===e){i=s;break}else c===e.substring(0,c.length)&&(i=s)}if(i!==-1){const s=r[i],l=parseInt(s["LAST-MSN"])||(t==null?void 0:t.lastPartSn);let c=parseInt(s["LAST-PART"])||(t==null?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){const d=Math.min(t.age-t.partTarget,t.targetduration);c>=0&&d>t.partTarget&&(c+=1)}const u=n&&Bt(n);return new kt(l,c>=0?c:void 0,u)}}}loadPlaylist(e){this.clearTimer()}loadingPlaylist(e,t){this.clearTimer()}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}getUrlWithDirectives(e,t){if(t)try{return t.addDirectives(e)}catch(n){this.warn(`Could not construct new URL with HLS Delivery Directives: ${n}`)}return e}playlistLoaded(e,t,n){const{details:r,stats:i}=t,s=self.performance.now(),l=i.loading.first?Math.max(0,s-i.loading.first):0;r.advancedDateTime=Date.now()-l;const c=this.hls.config.timelineOffset;if(c!==r.appliedTimelineOffset){const d=Math.max(c||0,0);r.appliedTimelineOffset=d,r.fragments.forEach(p=>{p.start=p.playlistOffset+d})}if(r.live||n!=null&&n.live){const d="levelInfo"in t?t.levelInfo:t.track;if(r.reloaded(n),n&&r.fragments.length>0){si(n,r);const Me=r.playlistParsingError;if(Me){this.warn(Me);const Ie=this.hls;if(!Ie.config.ignorePlaylistParsingErrors){var u;const{networkDetails:st}=t;Ie.trigger(f.ERROR,{type:fe.NETWORK_ERROR,details:F.LEVEL_PARSING_ERROR,fatal:!1,url:r.url,error:Me,reason:Me.message,level:t.level||void 0,parent:(u=r.fragments[0])==null?void 0:u.type,networkDetails:st,stats:i});return}r.playlistParsingError=null}}r.requestScheduled===-1&&(r.requestScheduled=i.loading.start);const p=this.hls.mainForwardBufferInfo,b=p?p.end-p.len:0,w=(r.edge-b)*1e3,D=Xr(r,w);if(r.requestScheduled+D<s?r.requestScheduled=s:r.requestScheduled+=D,this.log(`live playlist ${e} ${r.advanced?"REFRESHED "+r.lastPartSn+"-"+r.lastPartIndex:r.updated?"UPDATED":"MISSED"}`),!this.canLoad||!r.live)return;let X,Y,_e;if(r.canBlockReload&&r.endSN&&r.advanced){const Me=this.hls.config.lowLatencyMode,Ie=r.lastPartSn,st=r.endSN,ut=r.lastPartIndex,Mt=ut!==-1,ct=Ie===st;Mt?ct?(Y=st+1,_e=Me?0:ut):(Y=Ie,_e=Me?ut+1:r.maxPartIndex):Y=st+1;const At=r.age,Ht=At+r.ageHeader;let mt=Math.min(Ht-r.partTarget,r.targetduration*1.5);if(mt>0){if(Ht>r.targetduration*3)this.log(`Playlist last advanced ${At.toFixed(2)}s ago. Omitting segment and part directives.`),Y=void 0,_e=void 0;else if(n!=null&&n.tuneInGoal&&Ht-r.partTarget>n.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${n.tuneInGoal} to: ${mt} with playlist age: ${r.age}`),mt=0;else{const En=Math.floor(mt/r.targetduration);if(Y+=En,_e!==void 0){const Mn=Math.round(mt%r.targetduration/r.partTarget);_e+=Mn}this.log(`CDN Tune-in age: ${r.ageHeader}s last advanced ${At.toFixed(2)}s goal: ${mt} skip sn ${En} to part ${_e}`)}r.tuneInGoal=mt}if(X=this.getDeliveryDirectives(r,t.deliveryDirectives,Y,_e),Me||!ct){r.requestScheduled=s,this.loadingPlaylist(d,X);return}}else(r.canBlockReload||r.canSkipUntil)&&(X=this.getDeliveryDirectives(r,t.deliveryDirectives,Y,_e));X&&Y!==void 0&&r.canBlockReload&&(r.requestScheduled=i.loading.first+Math.max(D-l*2,D/2)),this.scheduleLoading(d,X,r)}else this.clearTimer()}scheduleLoading(e,t,n){const r=n||e.details;if(!r){this.loadingPlaylist(e,t);return}const i=self.performance.now(),s=r.requestScheduled;if(i>=s){this.loadingPlaylist(e,t);return}const l=s-i;this.log(`reload live playlist ${e.name||e.bitrate+"bps"} in ${Math.round(l)} ms`),this.clearTimer(),this.timer=self.setTimeout(()=>this.loadingPlaylist(e,t),l)}getDeliveryDirectives(e,t,n,r){let i=Bt(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(n=t.msn,r=t.part,i=Oe.No),new kt(n,r,i)}checkRetry(e){const t=e.details,n=sn(e),r=e.errorAction,{action:i,retryCount:s=0,retryConfig:l}=r||{},c=!!r&&!!l&&(i===or.RetryRequest||!r.resolved&&i===or.SendAlternateToPenaltyBox);if(c){var u;if(s>=l.maxNumRetry)return!1;if(n&&(u=e.context)!=null&&u.deliveryDirectives)this.warn(`Retrying playlist loading ${s+1}/${l.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const d=yn(l,s);this.clearTimer(),this.timer=self.setTimeout(()=>this.loadPlaylist(),d),this.warn(`Retrying playlist loading ${s+1}/${l.maxNumRetry} after "${t}" in ${d}ms`)}e.levelRetry=!0,r.resolved=!0}return c}}function vo(a,e){if(a.length!==e.length)return!1;for(let t=0;t<a.length;t++)if(!zs(a[t].attrs,e[t].attrs))return!1;return!0}function zs(a,e,t){const n=a["STABLE-RENDITION-ID"];return n&&!t?n===e["STABLE-RENDITION-ID"]:!(t||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some(r=>a[r]!==e[r])}function Ta(a,e){return e.label.toLowerCase()===a.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(a.lang||"").toLowerCase())}class Jl extends Aa{constructor(e){super(e,"audio-track-controller"),this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.registerListeners()}registerListeners(){const{hls:e}=this;e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_PARSED,this.onManifestParsed,this),e.on(f.LEVEL_LOADING,this.onLevelLoading,this),e.on(f.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(f.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(f.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_PARSED,this.onManifestParsed,this),e.off(f.LEVEL_LOADING,this.onLevelLoading,this),e.off(f.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(f.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(f.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.audioTracks||[]}onAudioTrackLoaded(e,t){const{id:n,groupId:r,details:i}=t,s=this.tracksInGroup[n];if(!s||s.groupId!==r){this.warn(`Audio track with id:${n} and group:${r} not found in active group ${s==null?void 0:s.groupId}`);return}const l=s.details;s.details=t.details,this.log(`Audio track ${n} "${s.name}" lang:${s.lang} group:${r} loaded [${i.startSN}-${i.endSN}]`),n===this.trackId&&this.playlistLoaded(n,t,l)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const n=t.audioGroups||null,r=this.groupIds;let i=this.currentTrack;if(!n||(r==null?void 0:r.length)!==(n==null?void 0:n.length)||n!=null&&n.some(l=>(r==null?void 0:r.indexOf(l))===-1)){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const l=this.tracks.filter(b=>!n||n.indexOf(b.groupId)!==-1);if(l.length)this.selectDefaultTrack&&!l.some(b=>b.default)&&(this.selectDefaultTrack=!1),l.forEach((b,w)=>{b.id=w});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=l;const c=this.hls.config.audioPreference;if(!i&&c){const b=Se(c,l,Nt);if(b>-1)i=l[b];else{const w=Se(c,this.tracks);i=this.tracks[w]}}let u=this.findTrackId(i);u===-1&&i&&(u=this.findTrackId(null));const d={audioTracks:l};this.log(`Updating audio tracks, ${l.length} track(s) found in group(s): ${n==null?void 0:n.join(",")}`),this.hls.trigger(f.AUDIO_TRACKS_UPDATED,d);const p=this.trackId;if(u!==-1&&p===-1)this.setAudioTrack(u);else if(l.length&&p===-1){var s;const b=new Error(`No audio track selected for current audio group-ID(s): ${(s=this.groupIds)==null?void 0:s.join(",")} track count: ${l.length}`);this.warn(b.message),this.hls.trigger(f.ERROR,{type:fe.MEDIA_ERROR,details:F.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:b})}}}onError(e,t){t.fatal||!t.context||t.context.type===ue.AUDIO_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allAudioTracks(){return this.tracks}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioOption(e){const t=this.hls;if(t.config.audioPreference=e,e){const n=this.allAudioTracks;if(this.selectDefaultTrack=!1,n.length){const r=this.currentTrack;if(r&&et(e,r,Nt))return r;const i=Se(e,this.tracksInGroup,Nt);if(i>-1){const s=this.tracksInGroup[i];return this.setAudioTrack(i),s}else if(r){let s=t.loadLevel;s===-1&&(s=t.firstAutoLevel);const l=wt(e,t.levels,n,s,Nt);if(l===-1)return null;t.nextLoadLevel=l}if(e.channels||e.audioCodec){const s=Se(e,n);if(s>-1)return n[s]}}}return null}setAudioTrack(e){const t=this.tracksInGroup;if(e<0||e>=t.length){this.warn(`Invalid audio track id: ${e}`);return}this.selectDefaultTrack=!1;const n=this.currentTrack,r=t[e],i=r.details&&!r.details.live;if(e===this.trackId&&r===n&&i||(this.log(`Switching to audio-track ${e} "${r.name}" lang:${r.lang} group:${r.groupId} channels:${r.channels}`),this.trackId=e,this.currentTrack=r,this.hls.trigger(f.AUDIO_TRACK_SWITCHING,_({},r)),i))return;const s=this.switchParams(r.url,n==null?void 0:n.details,r.details);this.loadPlaylist(s)}findTrackId(e){const t=this.tracksInGroup;for(let n=0;n<t.length;n++){const r=t[n];if(!(this.selectDefaultTrack&&!r.default)&&(!e||et(e,r,Nt)))return n}if(e){const{name:n,lang:r,assocLang:i,characteristics:s,audioCodec:l,channels:c}=e;for(let u=0;u<t.length;u++){const d=t[u];if(et({name:n,lang:r,assocLang:i,characteristics:s,audioCodec:l,channels:c},d,Nt))return u}for(let u=0;u<t.length;u++){const d=t[u];if(zs(e.attrs,d.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return u}for(let u=0;u<t.length;u++){const d=t[u];if(zs(e.attrs,d.attrs,["LANGUAGE"]))return u}}return-1}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;this.shouldLoadPlaylist(t)&&$t(t.url,this.hls)&&this.scheduleLoading(t,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=e.id,r=e.groupId,i=this.getUrlWithDirectives(e.url,t),s=e.details,l=s==null?void 0:s.age;this.log(`Loading audio-track ${n} "${e.name}" lang:${e.lang} group:${r}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${l&&s.live?" age "+l.toFixed(1)+(s.type?" "+s.type||0:""):""} ${i}`),this.hls.trigger(f.AUDIO_TRACK_LOADING,{url:i,id:n,groupId:r,deliveryDirectives:t||null,track:e})}}class ql{constructor(e){this.tracks=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.tracks=e}destroy(){this.tracks=this.queues=null}append(e,t,n){if(this.queues===null||this.tracks===null)return;const r=this.queues[t];r.push(e),r.length===1&&!n&&this.executeNext(t)}appendBlocker(e){return new Promise(t=>{const n={label:"async-blocker",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.append(n,e)})}prependBlocker(e){return new Promise(t=>{if(this.queues){const n={label:"async-blocker-prepend",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.queues[e].unshift(n)}})}removeBlockers(){this.queues!==null&&[this.queues.video,this.queues.audio,this.queues.audiovideo].forEach(e=>{var t;const n=(t=e[0])==null?void 0:t.label;(n==="async-blocker"||n==="async-blocker-prepend")&&(e[0].execute(),e.splice(0,1))})}unblockAudio(e){if(this.queues===null)return;this.queues.audio[0]===e&&this.shiftAndExecuteNext("audio")}executeNext(e){if(this.queues===null||this.tracks===null)return;const t=this.queues[e];if(t.length){const r=t[0];try{r.execute()}catch(i){var n;if(r.onError(i),this.queues===null||this.tracks===null)return;const s=(n=this.tracks[e])==null?void 0:n.buffer;s!=null&&s.updating||this.shiftAndExecuteNext(e)}}}shiftAndExecuteNext(e){this.queues!==null&&(this.queues[e].shift(),this.executeNext(e))}current(e){var t;return((t=this.queues)==null?void 0:t[e][0])||null}toString(){const{queues:e,tracks:t}=this;return e===null||t===null?"<destroyed>":`
|
|
${this.list("video")}
|
|
${this.list("audio")}
|
|
${this.list("audiovideo")}}`}list(e){var t,n;return(t=this.queues)!=null&&t[e]||(n=this.tracks)!=null&&n[e]?`${e}: (${this.listSbInfo(e)}) ${this.listOps(e)}`:""}listSbInfo(e){var t;const n=(t=this.tracks)==null?void 0:t[e],r=n==null?void 0:n.buffer;return r?`SourceBuffer${r.updating?" updating":""}${n.ended?" ended":""}${n.ending?" ending":""}`:"none"}listOps(e){var t;return((t=this.queues)==null?void 0:t[e].map(n=>n.label).join(", "))||""}}const _o=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/,yo="HlsJsTrackRemovedError";class eu extends Error{constructor(e){super(e),this.name=yo}}class tu extends N{constructor(e,t){super("buffer-controller",e.logger),this.hls=void 0,this.fragmentTracker=void 0,this.details=null,this._objectUrl=null,this.operationQueue=null,this.bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.blockedAudioAppend=null,this.lastVideoAppendEnd=0,this.appendSource=void 0,this.transferData=void 0,this.overrides=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.sourceBuffers=[[null,null],[null,null]],this._onEndStreaming=n=>{var r;this.hls&&((r=this.mediaSource)==null?void 0:r.readyState)==="open"&&this.hls.pauseBuffering()},this._onStartStreaming=n=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=n=>{const{media:r,mediaSource:i}=this;n&&this.log("Media source opened"),!(!r||!i)&&(i.removeEventListener("sourceopen",this._onMediaSourceOpen),r.removeEventListener("emptied",this._onMediaEmptied),this.updateDuration(),this.hls.trigger(f.MEDIA_ATTACHED,{media:r,mediaSource:i}),this.mediaSource!==null&&this.checkPendingTracks())},this._onMediaSourceClose=()=>{this.log("Media source closed")},this._onMediaSourceEnded=()=>{this.log("Media source ended")},this._onMediaEmptied=()=>{const{mediaSrc:n,_objectUrl:r}=this;n!==r&&this.error(`Media element src was set while attaching MediaSource (${r} > ${n})`)},this.hls=e,this.fragmentTracker=t,this.appendSource=re(I(e.config.preferManagedMediaSource)),this.initTracks(),this.registerListeners()}hasSourceTypes(){return Object.keys(this.tracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.transferData=this.overrides=void 0,this.operationQueue&&(this.operationQueue.destroy(),this.operationQueue=null),this.hls=this.fragmentTracker=null,this._onMediaSourceOpen=this._onMediaSourceClose=null,this._onMediaSourceEnded=null,this._onStartStreaming=this._onEndStreaming=null}registerListeners(){const{hls:e}=this;e.on(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_PARSED,this.onManifestParsed,this),e.on(f.BUFFER_RESET,this.onBufferReset,this),e.on(f.BUFFER_APPENDING,this.onBufferAppending,this),e.on(f.BUFFER_CODECS,this.onBufferCodecs,this),e.on(f.BUFFER_EOS,this.onBufferEos,this),e.on(f.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(f.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(f.FRAG_PARSED,this.onFragParsed,this),e.on(f.FRAG_CHANGED,this.onFragChanged,this),e.on(f.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_PARSED,this.onManifestParsed,this),e.off(f.BUFFER_RESET,this.onBufferReset,this),e.off(f.BUFFER_APPENDING,this.onBufferAppending,this),e.off(f.BUFFER_CODECS,this.onBufferCodecs,this),e.off(f.BUFFER_EOS,this.onBufferEos,this),e.off(f.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(f.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(f.FRAG_PARSED,this.onFragParsed,this),e.off(f.FRAG_CHANGED,this.onFragChanged,this),e.off(f.ERROR,this.onError,this)}transferMedia(){const{media:e,mediaSource:t}=this;if(!e)return null;const n={};if(this.operationQueue){const i=this.isUpdating();i||this.operationQueue.removeBlockers();const s=this.isQueued();(i||s)&&this.warn(`Transfering MediaSource with${s?" operations in queue":""}${i?" updating SourceBuffer(s)":""} ${this.operationQueue}`),this.operationQueue.destroy()}const r=this.transferData;return!this.sourceBufferCount&&r&&r.mediaSource===t?h(n,r.tracks):this.sourceBuffers.forEach(i=>{const[s]=i;s&&(n[s]=h({},this.tracks[s]),this.removeBuffer(s)),i[0]=i[1]=null}),{media:e,mediaSource:t,tracks:n}}initTracks(){const e={};this.sourceBuffers=[[null,null],[null,null]],this.tracks=e,this.resetQueue(),this.resetAppendErrors(),this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.lastVideoAppendEnd=0}onManifestLoading(){this.bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){var n;let r=2;(t.audio&&!t.video||!t.altAudio)&&(r=1),this.bufferCodecEventsTotal=r,this.log(`${r} bufferCodec event(s) expected.`),(n=this.transferData)!=null&&n.mediaSource&&this.sourceBufferCount&&r&&this.bufferCreated()}onMediaAttaching(e,t){const n=this.media=t.media,r=I(this.appendSource);if(this.transferData=this.overrides=void 0,n&&r){const i=!!t.mediaSource;(i||t.overrides)&&(this.transferData=t,this.overrides=t.overrides);const s=this.mediaSource=t.mediaSource||new r;if(this.assignMediaSource(s),i)this._objectUrl=n.src,this.attachTransferred();else{const l=this._objectUrl=self.URL.createObjectURL(s);if(this.appendSource)try{n.removeAttribute("src");const c=self.ManagedMediaSource;n.disableRemotePlayback=n.disableRemotePlayback||c&&s instanceof c,Eo(n),nu(n,l),n.load()}catch(c){n.src=l}else n.src=l}n.addEventListener("emptied",this._onMediaEmptied)}}assignMediaSource(e){var t,n;this.log(`${((t=this.transferData)==null?void 0:t.mediaSource)===e?"transferred":"created"} media source: ${(n=e.constructor)==null?void 0:n.name}`),e.addEventListener("sourceopen",this._onMediaSourceOpen),e.addEventListener("sourceended",this._onMediaSourceEnded),e.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(e.addEventListener("startstreaming",this._onStartStreaming),e.addEventListener("endstreaming",this._onEndStreaming))}attachTransferred(){const e=this.media,t=this.transferData;if(!t||!e)return;const n=this.tracks,r=t.tracks,i=r?Object.keys(r):null,s=i?i.length:0,l=()=>{this.media&&this.mediaSourceOpenOrEnded&&this._onMediaSourceOpen()};if(r&&i&&s){if(!this.tracksReady){this.hls.config.startFragPrefetch=!0,this.log("attachTransferred: waiting for SourceBuffer track info");return}if(this.log(`attachTransferred: (bufferCodecEventsTotal ${this.bufferCodecEventsTotal})
|
|
required tracks: ${Et(n,(c,u)=>c==="initSegment"?void 0:u)};
|
|
transfer tracks: ${Et(r,(c,u)=>c==="initSegment"?void 0:u)}}`),!le(r,n)){t.mediaSource=null,t.tracks=void 0;const c=e.currentTime,u=this.details,d=Math.max(c,(u==null?void 0:u.fragments[0].start)||0);if(d-c>1){this.log(`attachTransferred: waiting for playback to reach new tracks start time ${c} -> ${d}`);return}this.warn(`attachTransferred: resetting MediaSource for incompatible tracks ("${Object.keys(r)}"->"${Object.keys(n)}") start time: ${d} currentTime: ${c}`),this.onMediaDetaching(f.MEDIA_DETACHING,{}),this.onMediaAttaching(f.MEDIA_ATTACHING,t),e.currentTime=d;return}this.transferData=void 0,i.forEach(c=>{const u=c,d=r[u];if(d){const p=d.buffer;if(p){const b=this.fragmentTracker,w=d.id;if(b.hasFragments(w)||b.hasParts(w)){const Y=hn.getBuffered(p);b.detectEvictedFragments(u,Y,w,null,!0)}const D=Da(u),X=[u,p];this.sourceBuffers[D]=X,p.updating&&this.operationQueue&&this.operationQueue.prependBlocker(u),this.trackSourceBuffer(u,d)}}}),l(),this.bufferCreated()}else this.log("attachTransferred: MediaSource w/o SourceBuffers"),l()}get mediaSourceOpenOrEnded(){var e;const t=(e=this.mediaSource)==null?void 0:e.readyState;return t==="open"||t==="ended"}onMediaDetaching(e,t){const n=!!t.transferMedia;this.transferData=this.overrides=void 0;const{media:r,mediaSource:i,_objectUrl:s}=this;if(i){if(this.log(`media source ${n?"transferring":"detaching"}`),n)this.sourceBuffers.forEach(([l])=>{l&&this.removeBuffer(l)}),this.resetQueue();else{if(this.mediaSourceOpenOrEnded){const l=i.readyState==="open";try{const c=i.sourceBuffers;for(let u=c.length;u--;)l&&c[u].abort(),i.removeSourceBuffer(c[u]);l&&i.endOfStream()}catch(c){this.warn(`onMediaDetaching: ${c.message} while calling endOfStream`)}}this.sourceBufferCount&&this.onBufferReset()}i.removeEventListener("sourceopen",this._onMediaSourceOpen),i.removeEventListener("sourceended",this._onMediaSourceEnded),i.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(i.removeEventListener("startstreaming",this._onStartStreaming),i.removeEventListener("endstreaming",this._onEndStreaming)),this.mediaSource=null,this._objectUrl=null}r&&(r.removeEventListener("emptied",this._onMediaEmptied),n||(s&&self.URL.revokeObjectURL(s),this.mediaSrc===s?(r.removeAttribute("src"),this.appendSource&&Eo(r),r.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.media=null),this.hls.trigger(f.MEDIA_DETACHED,t)}onBufferReset(){this.sourceBuffers.forEach(([e])=>{e&&this.resetBuffer(e)}),this.initTracks()}resetBuffer(e){var t;const n=(t=this.tracks[e])==null?void 0:t.buffer;if(this.removeBuffer(e),n)try{var r;(r=this.mediaSource)!=null&&r.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(n)}catch(i){this.warn(`onBufferReset ${e}`,i)}delete this.tracks[e]}removeBuffer(e){this.removeBufferListeners(e),this.sourceBuffers[Da(e)]=[null,null];const t=this.tracks[e];t&&(t.buffer=void 0)}resetQueue(){this.operationQueue&&this.operationQueue.destroy(),this.operationQueue=new ql(this.tracks)}onBufferCodecs(e,t){const n=this.tracks,r=Object.keys(t);this.log(`BUFFER_CODECS: "${r}" (current SB count ${this.sourceBufferCount})`);const i="audiovideo"in t&&(n.audio||n.video)||n.audiovideo&&("audio"in t||"video"in t),s=!i&&this.sourceBufferCount&&this.media&&r.some(l=>!n[l]);if(i||s){this.warn(`Unsupported transition between "${Object.keys(n)}" and "${r}" SourceBuffers`);return}r.forEach(l=>{var c,u,d;const p=t[l],{id:b,codec:w,levelCodec:D,container:X,metadata:Y,supplemental:_e}=p;let Me=n[l];const Ie=(c=this.transferData)==null||(u=c.tracks)==null?void 0:u[l],st=Ie!=null&&Ie.buffer?Ie:Me,ut=(st==null?void 0:st.pendingCodec)||(st==null?void 0:st.codec),Mt=st==null?void 0:st.levelCodec;Me||(Me=n[l]={buffer:void 0,listeners:[],codec:w,supplemental:_e,container:X,levelCodec:D,metadata:Y,id:b});const ct=ft(ut,Mt),At=ct==null?void 0:ct.replace(_o,"$1");let Ht=ft(w,D);const mt=(d=Ht)==null?void 0:d.replace(_o,"$1");Ht&&ct&&At!==mt&&(l.slice(0,5)==="audio"&&(Ht=Ze(Ht,this.appendSource)),this.log(`switching codec ${ut} to ${Ht}`),Ht!==(Me.pendingCodec||Me.codec)&&(Me.pendingCodec=Ht),Me.container=X,this.appendChangeType(l,X,Ht))}),(this.tracksReady||this.sourceBufferCount)&&(t.tracks=this.sourceBufferTracks),!this.sourceBufferCount&&this.mediaSourceOpenOrEnded&&this.checkPendingTracks()}get sourceBufferTracks(){return Object.keys(this.tracks).reduce((e,t)=>{const n=this.tracks[t];return e[t]={id:n.id,container:n.container,codec:n.codec,levelCodec:n.levelCodec},e},{})}appendChangeType(e,t,n){const r=`${t};codecs=${n}`,i={label:`change-type=${r}`,execute:()=>{const s=this.tracks[e];if(s){const l=s.buffer;l!=null&&l.changeType&&(this.log(`changing ${e} sourceBuffer type to ${r}`),l.changeType(r),s.codec=n,s.container=t)}this.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:s=>{this.warn(`Failed to change ${e} SourceBuffer type`,s)}};this.append(i,e,this.isPending(this.tracks[e]))}blockAudio(e){var t;const n=e.start,r=n+e.duration*.05;if(((t=this.fragmentTracker.getAppendedFrag(n,te.MAIN))==null?void 0:t.gap)===!0)return;const s={label:"block-audio",execute:()=>{var l;const c=this.tracks.video;(this.lastVideoAppendEnd>r||c!=null&&c.buffer&&hn.isBuffered(c.buffer,r)||((l=this.fragmentTracker.getAppendedFrag(r,te.MAIN))==null?void 0:l.gap)===!0)&&(this.blockedAudioAppend=null,this.shiftAndExecuteNext("audio"))},onStart:()=>{},onComplete:()=>{},onError:l=>{this.warn("Error executing block-audio operation",l)}};this.blockedAudioAppend={op:s,frag:e},this.append(s,"audio",!0)}unblockAudio(){const{blockedAudioAppend:e,operationQueue:t}=this;e&&t&&(this.blockedAudioAppend=null,t.unblockAudio(e.op))}onBufferAppending(e,t){const{tracks:n}=this,{data:r,type:i,parent:s,frag:l,part:c,chunkMeta:u}=t,d=u.buffering[i],p=l.sn,b=self.performance.now();d.start=b;const w=l.stats.buffering,D=c?c.stats.buffering:null;w.start===0&&(w.start=b),D&&D.start===0&&(D.start=b);const X=n.audio;let Y=!1;i==="audio"&&(X==null?void 0:X.container)==="audio/mpeg"&&(Y=!this.lastMpegAudioChunk||u.id===1||this.lastMpegAudioChunk.sn!==u.sn,this.lastMpegAudioChunk=u);const _e=this.tracks.video,Me=_e==null?void 0:_e.buffer;if(Me&&p!=="initSegment"){const ut=c||l,Mt=this.blockedAudioAppend;if(i==="audio"&&s!=="main"&&!this.blockedAudioAppend){const At=ut.start+ut.duration*.05,Ht=Me.buffered,mt=this.currentOp("video");!Ht.length&&!mt?this.blockAudio(ut):!mt&&!hn.isBuffered(Me,At)&&this.lastVideoAppendEnd<At&&this.blockAudio(ut)}else if(i==="video"){const ct=ut.end;if(Mt){const At=Mt.frag.start;(ct>At||ct<this.lastVideoAppendEnd||hn.isBuffered(Me,At))&&this.unblockAudio()}this.lastVideoAppendEnd=ct}}const Ie=(c||l).start,st={label:`append-${i}`,execute:()=>{if(d.executeStart=self.performance.now(),Y){const ut=this.tracks[i];if(ut){const Mt=ut.buffer;if(Mt){const ct=Ie-Mt.timestampOffset;Math.abs(ct)>=.1&&(this.log(`Updating audio SourceBuffer timestampOffset to ${Ie} (delta: ${ct}) sn: ${p})`),Mt.timestampOffset=Ie)}}}this.appendExecutor(r,i)},onStart:()=>{},onComplete:()=>{const ut=self.performance.now();d.executeEnd=d.end=ut,w.first===0&&(w.first=ut),D&&D.first===0&&(D.first=ut);const Mt={};this.sourceBuffers.forEach(([ct,At])=>{ct&&(Mt[ct]=hn.getBuffered(At))}),this.appendErrors[i]=0,i==="audio"||i==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(f.BUFFER_APPENDED,{type:i,frag:l,part:c,chunkMeta:u,parent:l.type,timeRanges:Mt})},onError:ut=>{var Mt;const ct={type:fe.MEDIA_ERROR,parent:l.type,details:F.BUFFER_APPEND_ERROR,sourceBufferName:i,frag:l,part:c,chunkMeta:u,error:ut,err:ut,fatal:!1},At=(Mt=this.media)==null?void 0:Mt.error;if(ut.code===DOMException.QUOTA_EXCEEDED_ERR)ct.details=F.BUFFER_FULL_ERROR;else if(ut.code===DOMException.INVALID_STATE_ERR&&this.mediaSourceOpenOrEnded&&!At)ct.errorAction=Ke(!0);else if(ut.name===yo&&this.sourceBufferCount===0)ct.errorAction=Ke(!0);else{const Ht=++this.appendErrors[i];this.warn(`Failed ${Ht}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${i}" sourceBuffer (${At||"no media error"})`),(Ht>=this.hls.config.appendErrorMaxRetry||At)&&(ct.fatal=!0)}this.hls.trigger(f.ERROR,ct)}};this.append(st,i,this.isPending(this.tracks[i]))}getFlushOp(e,t,n){return this.log(`queuing "${e}" remove ${t}-${n}`),{label:"remove",execute:()=>{this.removeExecutor(e,t,n)},onStart:()=>{},onComplete:()=>{this.hls.trigger(f.BUFFER_FLUSHED,{type:e})},onError:r=>{this.warn(`Failed to remove ${t}-${n} from "${e}" SourceBuffer`,r)}}}onBufferFlushing(e,t){const{type:n,startOffset:r,endOffset:i}=t;n?this.append(this.getFlushOp(n,r,i),n):this.sourceBuffers.forEach(([s])=>{s&&this.append(this.getFlushOp(s,r,i),s)})}onFragParsed(e,t){const{frag:n,part:r}=t,i=[],s=r?r.elementaryStreams:n.elementaryStreams;s[m.AUDIOVIDEO]?i.push("audiovideo"):(s[m.AUDIO]&&i.push("audio"),s[m.VIDEO]&&i.push("video"));const l=()=>{const c=self.performance.now();n.stats.buffering.end=c,r&&(r.stats.buffering.end=c);const u=r?r.stats:n.stats;this.hls.trigger(f.FRAG_BUFFERED,{frag:n,part:r,stats:u,id:n.type})};i.length===0&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${n.type} level: ${n.level} sn: ${n.sn}`),this.blockBuffers(l,i).catch(c=>{this.warn(`Fragment buffered callback ${c}`),this.stepOperationQueue(this.sourceBufferTypes)})}onFragChanged(e,t){this.trimBuffers()}get bufferedToEnd(){return this.sourceBufferCount>0&&!this.sourceBuffers.some(([e])=>{var t,n;return e&&(!((t=this.tracks[e])!=null&&t.ended)||((n=this.tracks[e])==null?void 0:n.ending))})}onBufferEos(e,t){var n;this.sourceBuffers.forEach(([s])=>{if(s){const l=this.tracks[s];(!t.type||t.type===s)&&(l.ending=!0,l.ended||(l.ended=!0,this.log(`${s} buffer reached EOS`)))}});const r=((n=this.overrides)==null?void 0:n.endOfStream)!==!1;this.sourceBufferCount>0&&!this.sourceBuffers.some(([s])=>{var l;return s&&!((l=this.tracks[s])!=null&&l.ended)})&&(r?(this.log("Queueing EOS"),this.blockUntilOpen(()=>{this.tracksEnded();const{mediaSource:s}=this;if(!s||s.readyState!=="open"){s&&this.log(`Could not call mediaSource.endOfStream(). mediaSource.readyState: ${s.readyState}`);return}this.log("Calling mediaSource.endOfStream()"),s.endOfStream(),this.hls.trigger(f.BUFFERED_TO_END,void 0)})):(this.tracksEnded(),this.hls.trigger(f.BUFFERED_TO_END,void 0)))}tracksEnded(){this.sourceBuffers.forEach(([e])=>{if(e!==null){const t=this.tracks[e];t&&(t.ending=!1)}})}onLevelUpdated(e,{details:t}){t.fragments.length&&(this.details=t,this.updateDuration())}updateDuration(){const e=this.getDurationAndRange();e&&this.blockUntilOpen(()=>this.updateMediaSource(e))}onError(e,t){if(t.details===F.BUFFER_APPEND_ERROR&&t.frag){var n;const r=(n=t.errorAction)==null?void 0:n.nextAutoLevel;x(r)&&r!==t.frag.level&&this.resetAppendErrors()}}resetAppendErrors(){this.appendErrors={audio:0,video:0,audiovideo:0}}trimBuffers(){const{hls:e,details:t,media:n}=this;if(!n||t===null||!this.sourceBufferCount)return;const r=e.config,i=n.currentTime,s=t.levelTargetDuration,l=t.live&&r.liveBackBufferLength!==null?r.liveBackBufferLength:r.backBufferLength;if(x(l)&&l>=0){const c=Math.max(l,s),u=Math.floor(i/s)*s-c;this.flushBackBuffer(i,s,u)}if(x(r.frontBufferFlushThreshold)&&r.frontBufferFlushThreshold>0){const c=Math.max(r.maxBufferLength,r.frontBufferFlushThreshold),u=Math.max(c,s),d=Math.floor(i/s)*s+u;this.flushFrontBuffer(i,s,d)}}flushBackBuffer(e,t,n){this.sourceBuffers.forEach(([r,i])=>{if(i){const l=hn.getBuffered(i);if(l.length>0&&n>l.start(0)){var s;this.hls.trigger(f.BACK_BUFFER_REACHED,{bufferEnd:n});const c=this.tracks[r];if((s=this.details)!=null&&s.live)this.hls.trigger(f.LIVE_BACK_BUFFER_REACHED,{bufferEnd:n});else if(c!=null&&c.ended){this.log(`Cannot flush ${r} back buffer while SourceBuffer is in ended state`);return}this.hls.trigger(f.BUFFER_FLUSHING,{startOffset:0,endOffset:n,type:r})}}})}flushFrontBuffer(e,t,n){this.sourceBuffers.forEach(([r,i])=>{if(i){const s=hn.getBuffered(i),l=s.length;if(l<2)return;const c=s.start(l-1),u=s.end(l-1);if(n>c||e>=c&&e<=u)return;this.hls.trigger(f.BUFFER_FLUSHING,{startOffset:c,endOffset:1/0,type:r})}})}getDurationAndRange(){var e;const{details:t,mediaSource:n}=this;if(!t||!this.media||(n==null?void 0:n.readyState)!=="open")return null;const r=t.edge;if(t.live&&this.hls.config.liveDurationInfinity){if(t.fragments.length&&t.live&&n.setLiveSeekableRange){const u=Math.max(0,t.fragmentStart),d=Math.max(u,r);return{duration:1/0,start:u,end:d}}return{duration:1/0}}const i=(e=this.overrides)==null?void 0:e.duration;if(i)return x(i)?{duration:i}:null;const s=this.media.duration,l=x(n.duration)?n.duration:0;return r>l&&r>s||!x(s)?{duration:r}:null}updateMediaSource({duration:e,start:t,end:n}){const r=this.mediaSource;!this.media||!r||r.readyState!=="open"||(r.duration!==e&&(x(e)&&this.log(`Updating MediaSource duration to ${e.toFixed(3)}`),r.duration=e),t!==void 0&&n!==void 0&&(this.log(`MediaSource duration is set to ${r.duration}. Setting seekable range to ${t}-${n}.`),r.setLiveSeekableRange(t,n)))}get tracksReady(){const e=this.pendingTrackCount;return e>0&&(e>=this.bufferCodecEventsTotal||this.isPending(this.tracks.audiovideo))}checkPendingTracks(){const{bufferCodecEventsTotal:e,pendingTrackCount:t,tracks:n}=this;if(this.log(`checkPendingTracks (pending: ${t} codec events expected: ${e}) ${Et(n)}`),this.tracksReady){var r;const i=(r=this.transferData)==null?void 0:r.tracks;i&&Object.keys(i).length?this.attachTransferred():this.createSourceBuffers()}}bufferCreated(){if(this.sourceBufferCount){const e={};this.sourceBuffers.forEach(([t,n])=>{if(t){const r=this.tracks[t];e[t]={buffer:n,container:r.container,codec:r.codec,supplemental:r.supplemental,levelCodec:r.levelCodec,id:r.id,metadata:r.metadata}}}),this.hls.trigger(f.BUFFER_CREATED,{tracks:e}),this.log(`SourceBuffers created. Running queue: ${this.operationQueue}`),this.sourceBuffers.forEach(([t])=>{this.executeNext(t)})}else{const e=new Error("could not create source buffer for media codec(s)");this.hls.trigger(f.ERROR,{type:fe.MEDIA_ERROR,details:F.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:e,reason:e.message})}}createSourceBuffers(){const{tracks:e,sourceBuffers:t,mediaSource:n}=this;if(!n)throw new Error("createSourceBuffers called when mediaSource was null");for(const i in e){const s=i,l=e[s];if(this.isPending(l)){const c=this.getTrackCodec(l,s),u=`${l.container};codecs=${c}`;l.codec=c,this.log(`creating sourceBuffer(${u})${this.currentOp(s)?" Queued":""} ${Et(l)}`);try{const d=n.addSourceBuffer(u),p=Da(s),b=[s,d];t[p]=b,l.buffer=d}catch(d){var r;this.error(`error while trying to add sourceBuffer: ${d.message}`),this.shiftAndExecuteNext(s),(r=this.operationQueue)==null||r.removeBlockers(),delete this.tracks[s],this.hls.trigger(f.ERROR,{type:fe.MEDIA_ERROR,details:F.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:d,sourceBufferName:s,mimeType:u,parent:l.id});return}this.trackSourceBuffer(s,l)}}this.bufferCreated()}getTrackCodec(e,t){const n=e.supplemental;let r=e.codec;n&&(t==="video"||t==="audiovideo")&&ke(n,"video")&&(r=$e(r,n));const i=ft(r,e.levelCodec);return i?t.slice(0,5)==="audio"?Ze(i,this.appendSource):i:""}trackSourceBuffer(e,t){const n=t.buffer;if(!n)return;const r=this.getTrackCodec(t,e);this.tracks[e]={buffer:n,codec:r,container:t.container,levelCodec:t.levelCodec,supplemental:t.supplemental,metadata:t.metadata,id:t.id,listeners:[]},this.removeBufferListeners(e),this.addBufferListener(e,"updatestart",this.onSBUpdateStart),this.addBufferListener(e,"updateend",this.onSBUpdateEnd),this.addBufferListener(e,"error",this.onSBUpdateError),this.appendSource&&this.addBufferListener(e,"bufferedchange",(i,s)=>{const l=s.removedRanges;l!=null&&l.length&&this.hls.trigger(f.BUFFER_FLUSHED,{type:i})})}get mediaSrc(){var e,t;const n=((e=this.media)==null||(t=e.querySelector)==null?void 0:t.call(e,"source"))||this.media;return n==null?void 0:n.src}onSBUpdateStart(e){const t=this.currentOp(e);t&&t.onStart()}onSBUpdateEnd(e){var t;if(((t=this.mediaSource)==null?void 0:t.readyState)==="closed"){this.resetBuffer(e);return}const n=this.currentOp(e);n&&(n.onComplete(),this.shiftAndExecuteNext(e))}onSBUpdateError(e,t){var n;const r=new Error(`${e} SourceBuffer error. MediaSource readyState: ${(n=this.mediaSource)==null?void 0:n.readyState}`);this.error(`${r}`,t),this.hls.trigger(f.ERROR,{type:fe.MEDIA_ERROR,details:F.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:r,fatal:!1});const i=this.currentOp(e);i&&i.onError(r)}removeExecutor(e,t,n){const{media:r,mediaSource:i}=this,s=this.tracks[e],l=s==null?void 0:s.buffer;if(!r||!i||!l){this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),this.shiftAndExecuteNext(e);return}const c=x(r.duration)?r.duration:1/0,u=x(i.duration)?i.duration:1/0,d=Math.max(0,t),p=Math.min(n,c,u);p>d&&(!s.ending||s.ended)?(s.ended=!1,this.log(`Removing [${d},${p}] from the ${e} SourceBuffer`),l.remove(d,p)):this.shiftAndExecuteNext(e)}appendExecutor(e,t){const n=this.tracks[t],r=n==null?void 0:n.buffer;if(!r)throw new eu(`Attempting to append to the ${t} SourceBuffer, but it does not exist`);n.ending=!1,n.ended=!1,r.appendBuffer(e)}blockUntilOpen(e){if(this.isUpdating()||this.isQueued())this.blockBuffers(e).catch(t=>{this.warn(`SourceBuffer blocked callback ${t}`),this.stepOperationQueue(this.sourceBufferTypes)});else try{e()}catch(t){this.warn(`Callback run without blocking ${this.operationQueue} ${t}`)}}isUpdating(){return this.sourceBuffers.some(([e,t])=>e&&t.updating)}isQueued(){return this.sourceBuffers.some(([e])=>e&&!!this.currentOp(e))}isPending(e){return!!e&&!e.buffer}blockBuffers(e,t=this.sourceBufferTypes){if(!t.length)return this.log("Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e);const{operationQueue:n}=this,r=t.map(s=>this.appendBlocker(s));return t.length>1&&!!this.blockedAudioAppend&&this.unblockAudio(),Promise.all(r).then(s=>{n===this.operationQueue&&(e(),this.stepOperationQueue(this.sourceBufferTypes))})}stepOperationQueue(e){e.forEach(t=>{var n;const r=(n=this.tracks[t])==null?void 0:n.buffer;!r||r.updating||this.shiftAndExecuteNext(t)})}append(e,t,n){this.operationQueue&&this.operationQueue.append(e,t,n)}appendBlocker(e){if(this.operationQueue)return this.operationQueue.appendBlocker(e)}currentOp(e){return this.operationQueue?this.operationQueue.current(e):null}executeNext(e){e&&this.operationQueue&&this.operationQueue.executeNext(e)}shiftAndExecuteNext(e){this.operationQueue&&this.operationQueue.shiftAndExecuteNext(e)}get pendingTrackCount(){return Object.keys(this.tracks).reduce((e,t)=>e+(this.isPending(this.tracks[t])?1:0),0)}get sourceBufferCount(){return this.sourceBuffers.reduce((e,[t])=>e+(t?1:0),0)}get sourceBufferTypes(){return this.sourceBuffers.map(([e])=>e).filter(e=>!!e)}addBufferListener(e,t,n){const r=this.tracks[e];if(!r)return;const i=r.buffer;if(!i)return;const s=n.bind(this,e);r.listeners.push({event:t,listener:s}),i.addEventListener(t,s)}removeBufferListeners(e){const t=this.tracks[e];if(!t)return;const n=t.buffer;n&&(t.listeners.forEach(r=>{n.removeEventListener(r.event,r.listener)}),t.listeners.length=0)}}function Eo(a){const e=a.querySelectorAll("source");[].slice.call(e).forEach(t=>{a.removeChild(t)})}function nu(a,e){const t=self.document.createElement("source");t.type="video/mp4",t.src=e,a.appendChild(t)}function Da(a){return a==="audio"?1:0}class Ca{constructor(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}setStreamController(e){this.streamController=e}destroy(){this.hls&&this.unregisterListener(),this.timer&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:e}=this;e.on(f.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(f.MANIFEST_PARSED,this.onManifestParsed,this),e.on(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(f.BUFFER_CODECS,this.onBufferCodecs,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(f.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(f.MANIFEST_PARSED,this.onManifestParsed,this),e.off(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(f.BUFFER_CODECS,this.onBufferCodecs,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const n=this.hls.levels[t.droppedLevel];this.isLevelAllowed(n)&&this.restrictedLevels.push({bitrate:n.bitrate,height:n.height,width:n.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(e,t){const n=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,n.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&x(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping(),this.media=null}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0){this.clientRect=null;return}const e=this.hls.levels;if(e.length){const t=this.hls,n=this.getMaxLevel(e.length-1);n!==this.autoLevelCapping&&t.logger.log(`Setting autoLevelCapping to ${n}: ${e[n].height}p@${e[n].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=n,t.autoLevelEnabled&&t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const n=t.filter((r,i)=>this.isLevelAllowed(r)&&i<=e);return this.clientRect=null,Ca.getMaxLevelByMediaSize(n,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}stopCapping(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}getDimensions(){if(this.clientRect)return this.clientRect;const e=this.media,t={width:0,height:0};if(e){const n=e.getBoundingClientRect();t.width=n.width,t.height=n.height,!t.width&&!t.height&&(t.width=n.right-n.left||e.width||0,t.height=n.bottom-n.top||e.height||0)}return this.clientRect=t,t}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch(t){}return Math.min(e,this.hls.config.maxDevicePixelRatio)}isLevelAllowed(e){return!this.restrictedLevels.some(n=>e.bitrate===n.bitrate&&e.width===n.width&&e.height===n.height)}static getMaxLevelByMediaSize(e,t,n){if(!(e!=null&&e.length))return-1;const r=(l,c)=>c?l.width!==c.width||l.height!==c.height:!0;let i=e.length-1;const s=Math.max(t,n);for(let l=0;l<e.length;l+=1){const c=e[l];if((c.width>=s||c.height>=s)&&r(c,e[l+1])){i=l;break}}return i}}const bi={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},ru={HLS:"h"},Hs={OBJECT:"CMCD-Object",REQUEST:"CMCD-Request",SESSION:"CMCD-Session",STATUS:"CMCD-Status"},iu={[Hs.OBJECT]:["br","d","ot","tb"],[Hs.REQUEST]:["bl","dl","mtp","nor","nrr","su"],[Hs.SESSION]:["cid","pr","sf","sid","st","v"],[Hs.STATUS]:["bs","rtp"]};class Rs{constructor(e,t){Array.isArray(e)&&(e=e.map(n=>n instanceof Rs?n:new Rs(n))),this.value=e,this.params=t}}const su="Dict";function au(a){return Array.isArray(a)?JSON.stringify(a):a instanceof Map?"Map{}":a instanceof Set?"Set{}":typeof a=="object"?JSON.stringify(a):String(a)}function ou(a,e,t,n){return new Error(`failed to ${a} "${au(e)}" as ${t}`,{cause:n})}function Hi(a,e,t){return ou("serialize",a,e,t)}class bo{constructor(e){this.description=e}}const xo="Bare Item",lu="Boolean";function uu(a){if(typeof a!="boolean")throw Hi(a,lu);return a?"?1":"?0"}const cu="Byte Sequence";function fu(a){if(ArrayBuffer.isView(a)===!1)throw Hi(a,cu);return`:${oi(a)}:`}const du="Integer";function hu(a){return a<-999999999999999||999999999999999<a}function So(a){if(hu(a))throw Hi(a,du);return a.toString()}function pu(a){return`@${So(a.getTime()/1e3)}`}const mu="Decimal";function gu(a){const e=Yi(a,3);if(Math.floor(Math.abs(e)).toString().length>12)throw Hi(a,mu);const t=e.toString();return t.includes(".")?t:`${t}.0`}const vu="String",_u=/[\x00-\x1f\x7f]+/;function yu(a){if(_u.test(a))throw Hi(a,vu);return`"${a.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Eu(a){return a.description||a.toString().slice(7,-1)}const bu="Token";function wo(a){const e=Eu(a);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw Hi(e,bu);return e}function Ra(a){switch(typeof a){case"number":if(!x(a))throw Hi(a,xo);return Number.isInteger(a)?So(a):gu(a);case"string":return yu(a);case"symbol":return wo(a);case"boolean":return uu(a);case"object":if(a instanceof Date)return pu(a);if(a instanceof Uint8Array)return fu(a);if(a instanceof bo)return wo(a);default:throw Hi(a,xo)}}const xu="Key";function Ia(a){if(/^[a-z*][a-z0-9\-_.*]*$/.test(a)===!1)throw Hi(a,xu);return a}function La(a){return a==null?"":Object.entries(a).map(([e,t])=>t===!0?`;${Ia(e)}`:`;${Ia(e)}=${Ra(t)}`).join("")}function Ao(a){return a instanceof Rs?`${Ra(a.value)}${La(a.params)}`:Ra(a)}function Su(a){return`(${a.value.map(Ao).join(" ")})${La(a.params)}`}function wu(a,e={whitespace:!0}){if(typeof a!="object")throw Hi(a,su);const t=a instanceof Map?a.entries():Object.entries(a),n=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([r,i])=>{i instanceof Rs||(i=new Rs(i));let s=Ia(r);return i.value===!0?s+=La(i.params):(s+="=",Array.isArray(i.value)?s+=Su(i):s+=Ao(i)),s}).join(`,${n}`)}function Au(a,e){return wu(a,e)}function Tu(a){return a==="ot"||a==="sf"||a==="st"}function Du(a){return typeof a=="number"?x(a):a!=null&&a!==""&&a!==!1}const ia=a=>Math.round(a),Cu=(a,e)=>(e!=null&&e.baseUrl&&(a=Xi(a,e.baseUrl)),encodeURIComponent(a)),sa=a=>ia(a/100)*100,Ru={br:ia,d:ia,bl:sa,dl:sa,mtp:sa,nor:Cu,rtp:sa,tb:ia};function Iu(a,e){const t={};if(a==null||typeof a!="object")return t;const n=Object.keys(a).sort(),r=h({},Ru,e==null?void 0:e.formatters),i=e==null?void 0:e.filter;return n.forEach(s=>{if(i!=null&&i(s))return;let l=a[s];const c=r[s];c&&(l=c(l,e)),!(s==="v"&&l===1)&&(s=="pr"&&l===1||Du(l)&&(Tu(s)&&typeof l=="string"&&(l=new bo(l)),t[s]=l))}),t}function To(a,e={}){return a?Au(Iu(a,e),h({whitespace:!1},e)):""}function Lu(a,e={}){const t={};if(!a)return t;const n=Object.entries(a),r=Object.entries(iu).concat(Object.entries((e==null?void 0:e.customHeaderMap)||{})),i=n.reduce((s,l)=>{var c,u;const[d,p]=l,b=((c=r.find(w=>w[1].includes(d)))===null||c===void 0?void 0:c[0])||Hs.REQUEST;return(u=s[b])!==null&&u!==void 0||(s[b]={}),s[b][d]=p,s},{});return Object.entries(i).reduce((s,[l,c])=>(s[l]=To(c,e),s),t)}function ku(a,e,t){return h(a,Lu(e,t))}const Pu="CMCD";function Ou(a,e={}){if(!a)return"";const t=To(a,e);return`${Pu}=${encodeURIComponent(t)}`}const Do=/CMCD=[^&#]+/;function Fu(a,e,t){const n=Ou(e,t);if(!n)return a;if(Do.test(a))return a.replace(Do,n);const r=a.includes("?")?"&":"?";return`${a}${r}${n}`}class Nu{constructor(e){this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.includeKeys=void 0,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=()=>{this.initialized&&(this.starved=!0),this.buffering=!0},this.onPlaying=()=>{this.initialized||(this.initialized=!0),this.buffering=!1},this.applyPlaylistData=r=>{try{this.apply(r,{ot:bi.MANIFEST,su:!this.initialized})}catch(i){this.hls.logger.warn("Could not generate manifest CMCD data.",i)}},this.applyFragmentData=r=>{try{const{frag:i,part:s}=r,l=this.hls.levels[i.level],c=this.getObjectType(i),u={d:(s||i).duration*1e3,ot:c};(c===bi.VIDEO||c===bi.AUDIO||c==bi.MUXED)&&(u.br=l.bitrate/1e3,u.tb=this.getTopBandwidth(c)/1e3,u.bl=this.getBufferLength(c));const d=s?this.getNextPart(s):this.getNextFrag(i);d!=null&&d.url&&d.url!==i.url&&(u.nor=d.url),this.apply(r,u)}catch(i){this.hls.logger.warn("Could not generate segment CMCD data.",i)}},this.hls=e;const t=this.config=e.config,{cmcd:n}=t;n!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=n.sessionId||e.sessionId,this.cid=n.contentId,this.useHeaders=n.useHeaders===!0,this.includeKeys=n.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHED,this.onMediaDetached,this),e.on(f.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHED,this.onMediaDetached,this),e.off(f.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=this.media=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var n,r;this.audioBuffer=(n=t.tracks.audio)==null?void 0:n.buffer,this.videoBuffer=(r=t.tracks.video)==null?void 0:r.buffer}createData(){var e;return{v:1,sf:ru.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){h(t,this.createData());const n=t.ot===bi.INIT||t.ot===bi.VIDEO||t.ot===bi.MUXED;this.starved&&n&&(t.bs=!0,t.su=!0,this.starved=!1),t.su==null&&(t.su=this.buffering);const{includeKeys:r}=this;r&&(t=Object.keys(t).reduce((s,l)=>(r.includes(l)&&(s[l]=t[l]),s),{}));const i={baseUrl:e.url};this.useHeaders?(e.headers||(e.headers={}),ku(e.headers,t,i)):e.url=Fu(e.url,t,i)}getNextFrag(e){var t;const n=(t=this.hls.levels[e.level])==null?void 0:t.details;if(n){const r=e.sn-n.startSN;return n.fragments[r+1]}}getNextPart(e){var t,n;const{index:r,fragment:i}=e,s=(t=this.hls.levels[i.level])==null||(n=t.details)==null?void 0:n.partList;if(s){const{sn:l}=i;for(let c=s.length-1;c>=0;c--){const u=s[c];if(u.index===r&&u.fragment.sn===l)return s[c+1]}}}getObjectType(e){const{type:t}=e;if(t==="subtitle")return bi.TIMED_TEXT;if(e.sn==="initSegment")return bi.INIT;if(t==="audio")return bi.AUDIO;if(t==="main")return this.hls.audioTracks.length?bi.VIDEO:bi.MUXED}getTopBandwidth(e){let t=0,n;const r=this.hls;if(e===bi.AUDIO)n=r.audioTracks;else{const i=r.maxAutoLevel,s=i>-1?i+1:r.levels.length;n=r.levels.slice(0,s)}for(const i of n)i.bitrate>t&&(t=i.bitrate);return t>0?t:NaN}getBufferLength(e){const t=this.media,n=e===bi.AUDIO?this.audioBuffer:this.videoBuffer;return!n||!t?NaN:hn.bufferInfo(n,t.currentTime,this.config.maxBufferHole).len*1e3}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,n=e||this.config.loader;return class{constructor(i){this.loader=void 0,this.loader=new n(i)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(i,s,l){t(i),this.loader.load(i,s,l)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,n=e||this.config.loader;return class{constructor(i){this.loader=void 0,this.loader=new n(i)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(i,s,l){t(i),this.loader.load(i,s,l)}}}}const Mu=3e5;class Bu extends N{constructor(e){super("content-steering",e.logger),this.hls=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this._pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(f.MANIFEST_PARSED,this.onManifestParsed,this),e.on(f.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(f.MANIFEST_PARSED,this.onManifestParsed,this),e.off(f.ERROR,this.onError,this))}pathways(){return(this.levels||[]).reduce((e,t)=>(e.indexOf(t.pathwayId)===-1&&e.push(t.pathwayId),e),[])}get pathwayPriority(){return this._pathwayPriority}set pathwayPriority(e){this.updatePathwayPriority(e)}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=this.timeToLoad*1e3-(performance.now()-this.updated);if(e>0){this.scheduleRefresh(this.uri,e);return}}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){this.reloadTimer!==-1&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter(n=>n!==e))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:n}=t;n!==null&&(this.pathwayId=n.pathwayId,this.uri=n.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:n}=t;if((n==null?void 0:n.action)===or.SendAlternateToPenaltyBox&&n.flags===ge.MoveAllAlternatesMatchingHost){const r=this.levels;let i=this._pathwayPriority,s=this.pathwayId;if(t.context){const{groupId:l,pathwayId:c,type:u}=t.context;l&&r?s=this.getPathwayForGroupId(l,u,s):c&&(s=c)}s in this.penalizedPathways||(this.penalizedPathways[s]=performance.now()),!i&&r&&(i=this.pathways()),i&&i.length>1&&(this.updatePathwayPriority(i),n.resolved=this.pathwayId!==s),n.resolved||this.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${s} levels: ${r&&r.length} priorities: ${Et(i)} penalized: ${Et(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(t.length===0){const n=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${n}"`),t=this.getLevelsForPathway(n),this.pathwayId=n}return t.length!==e.length&&this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t}getLevelsForPathway(e){return this.levels===null?[]:this.levels.filter(t=>e===t.pathwayId)}updatePathwayPriority(e){this._pathwayPriority=e;let t;const n=this.penalizedPathways,r=performance.now();Object.keys(n).forEach(i=>{r-n[i]>Mu&&delete n[i]});for(let i=0;i<e.length;i++){const s=e[i];if(s in n)continue;if(s===this.pathwayId)return;const l=this.hls.nextLoadLevel,c=this.hls.levels[l];if(t=this.getLevelsForPathway(s),t.length>0){this.log(`Setting Pathway to "${s}"`),this.pathwayId=s,Qr(t),this.hls.trigger(f.LEVELS_UPDATED,{levels:t});const u=this.hls.levels[l];c&&u&&this.levels&&(u.attrs["STABLE-VARIANT-ID"]!==c.attrs["STABLE-VARIANT-ID"]&&u.bitrate!==c.bitrate&&this.log(`Unstable Pathways change from bitrate ${c.bitrate} to ${u.bitrate}`),this.hls.nextLoadLevel=l);break}}}getPathwayForGroupId(e,t,n){const r=this.getLevelsForPathway(n).concat(this.levels||[]);for(let i=0;i<r.length;i++)if(t===ue.AUDIO_TRACK&&r[i].hasAudioGroup(e)||t===ue.SUBTITLE_TRACK&&r[i].hasSubtitleGroup(e))return r[i].pathwayId;return n}clonePathways(e){const t=this.levels;if(!t)return;const n={},r={};e.forEach(i=>{const{ID:s,"BASE-ID":l,"URI-REPLACEMENT":c}=i;if(t.some(d=>d.pathwayId===s))return;const u=this.getLevelsForPathway(l).map(d=>{const p=new Fn(d.attrs);p["PATHWAY-ID"]=s;const b=p.AUDIO&&`${p.AUDIO}_clone_${s}`,w=p.SUBTITLES&&`${p.SUBTITLES}_clone_${s}`;b&&(n[p.AUDIO]=b,p.AUDIO=b),w&&(r[p.SUBTITLES]=w,p.SUBTITLES=w);const D=Ro(d.uri,p["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",c),X=new St({attrs:p,audioCodec:d.audioCodec,bitrate:d.bitrate,height:d.height,name:d.name,url:D,videoCodec:d.videoCodec,width:d.width});if(d.audioGroups)for(let Y=1;Y<d.audioGroups.length;Y++)X.addGroupId("audio",`${d.audioGroups[Y]}_clone_${s}`);if(d.subtitleGroups)for(let Y=1;Y<d.subtitleGroups.length;Y++)X.addGroupId("text",`${d.subtitleGroups[Y]}_clone_${s}`);return X});t.push(...u),Co(this.audioTracks,n,c,s),Co(this.subtitleTracks,r,c,s)})}loadSteeringManifest(e){const t=this.hls.config,n=t.loader;this.loader&&this.loader.destroy(),this.loader=new n(t);let r;try{r=new self.URL(e)}catch(d){this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(r.protocol!=="data:"){const d=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;r.searchParams.set("_HLS_pathway",this.pathwayId),r.searchParams.set("_HLS_throughput",""+d)}const i={responseType:"json",url:r.href},s=t.steeringManifestLoadPolicy.default,l=s.errorRetry||s.timeoutRetry||{},c={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:l.maxNumRetry||0,retryDelay:l.retryDelayMs||0,maxRetryDelay:l.maxRetryDelayMs||0},u={onSuccess:(d,p,b,w)=>{this.log(`Loaded steering manifest: "${r}"`);const D=d.data;if((D==null?void 0:D.VERSION)!==1){this.log(`Steering VERSION ${D.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=D.TTL;const{"RELOAD-URI":X,"PATHWAY-CLONES":Y,"PATHWAY-PRIORITY":_e}=D;if(X)try{this.uri=new self.URL(X,r).href}catch(Ie){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${X}`);return}this.scheduleRefresh(this.uri||b.url),Y&&this.clonePathways(Y);const Me={steeringManifest:D,url:r.toString()};this.hls.trigger(f.STEERING_MANIFEST_LOADED,Me),_e&&this.updatePathwayPriority(_e)},onError:(d,p,b,w)=>{if(this.log(`Error loading steering manifest: ${d.code} ${d.text} (${p.url})`),this.stopLoad(),d.code===410){this.enabled=!1,this.log(`Steering manifest ${p.url} no longer available`);return}let D=this.timeToLoad*1e3;if(d.code===429){const X=this.loader;if(typeof(X==null?void 0:X.getResponseHeader)=="function"){const Y=X.getResponseHeader("Retry-After");Y&&(D=parseFloat(Y)*1e3)}this.log(`Steering manifest ${p.url} rate limited`);return}this.scheduleRefresh(this.uri||p.url,D)},onTimeout:(d,p,b)=>{this.log(`Timeout loading steering manifest (${p.url})`),this.scheduleRefresh(this.uri||p.url)}};this.log(`Requesting steering manifest: ${r}`),this.loader.load(i,c,u)}scheduleRefresh(e,t=this.timeToLoad*1e3){this.clearTimeout(),this.reloadTimer=self.setTimeout(()=>{var n;const r=(n=this.hls)==null?void 0:n.media;if(r&&!r.ended){this.loadSteeringManifest(e);return}this.scheduleRefresh(e,this.timeToLoad*1e3)},t)}}function Co(a,e,t,n){a&&Object.keys(e).forEach(r=>{const i=a.filter(s=>s.groupId===r).map(s=>{const l=h({},s);return l.details=void 0,l.attrs=new Fn(l.attrs),l.url=l.attrs.URI=Ro(s.url,s.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),l.groupId=l.attrs["GROUP-ID"]=e[r],l.attrs["PATHWAY-ID"]=n,l});a.push(...i)})}function Ro(a,e,t,n){const{HOST:r,PARAMS:i,[t]:s}=n;let l;e&&(l=s==null?void 0:s[e],l&&(a=l));const c=new self.URL(a);return r&&!l&&(c.host=r),i&&Object.keys(i).sort().forEach(u=>{u&&c.searchParams.set(u,i[u])}),c.href}class Is extends N{constructor(e){super("eme",e.logger),this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=Is.CDMCleanupPromise?[Is.CDMCleanupPromise]:[],this.onMediaEncrypted=t=>{const{initDataType:n,initData:r}=t,i=`"${t.type}" event: init data type: "${n}"`;if(this.debug(i),r!==null){if(!this.keyFormatPromise){let s=Object.keys(this.keySystemAccessPromises);s.length||(s=Ln(this.config));const l=s.map(Tr).filter(c=>!!c);this.keyFormatPromise=this.getKeyFormatPromise(l)}this.keyFormatPromise.then(s=>{const l=Jn(s);let c,u;if(n==="sinf"){if(l!==tn.FAIRPLAY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${n}" for selected key-system ${l}`);return}const D=_t(new Uint8Array(r));try{const X=hr(JSON.parse(D).sinf),Y=j(X);if(!Y)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");c=new Uint8Array(Y.subarray(8,24)),u=tn.FAIRPLAY}catch(X){this.warn(`${i} Failed to parse sinf: ${X}`);return}}else{if(l!==tn.WIDEVINE&&l!==tn.PLAYREADY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${n}" for selected key-system ${l}`);return}const D=Jt(r),X=D.filter(_e=>!!_e.systemId&&_r(_e.systemId)===l);X.length>1&&this.warn(`${i} Using first of ${X.length} pssh found for selected key-system ${l}`);const Y=X[0];if(!Y){D.length===0||D.some(_e=>!_e.systemId)?this.warn(`${i} contains incomplete or invalid pssh data`):this.log(`ignoring ${i} for ${D.map(_e=>_r(_e.systemId)).join(",")} pssh data in favor of playlist keys`);return}if(u=_r(Y.systemId),Y.version===0&&Y.data)if(u===tn.WIDEVINE){const _e=Y.data.length-22;c=new Uint8Array(Y.data.subarray(_e,_e+16))}else u===tn.PLAYREADY&&(c=Jr(Y.data))}if(!u||!c)return;const d=W.hexDump(c),{keyIdToKeySessionPromise:p,mediaKeySessions:b}=this;let w=p[d];for(let D=0;D<b.length;D++){const X=b[D],Y=X.decryptdata;if(!Y.keyId)continue;const _e=W.hexDump(Y.keyId);if(d===_e||Y.uri.replace(/-/g,"").indexOf(d)!==-1){if(w=p[_e],Y.pssh)break;delete p[_e],Y.pssh=new Uint8Array(r),Y.keyId=c,w=p[d]=w.then(()=>this.generateRequestWithPreferredKeySession(X,n,r,"encrypted-event-key-match")),w.catch(Me=>this.handleError(Me));break}}if(!w){if(u!==l){this.log(`Ignoring "${t.type}" event with ${u} init data for selected key-system ${l}`);return}w=p[d]=this.getKeySystemSelectionPromise([u]).then(({keySystem:D,mediaKeys:X})=>{var Y;this.throwIfDestroyed();const _e=new qr("ISO-23001-7",d,(Y=Tr(D))!=null?Y:"");return _e.pssh=new Uint8Array(r),_e.keyId=c,this.attemptSetMediaKeys(D,X).then(()=>{this.throwIfDestroyed();const Me=this.createMediaKeySessionContext({decryptdata:_e,keySystem:D,mediaKeys:X});return this.generateRequestWithPreferredKeySession(Me,n,r,"encrypted-event-no-match")})}),w.catch(D=>this.handleError(D))}})}},this.onWaitingForKey=t=>{this.log(`"${t.type}" event`)},this.hls=e,this.config=e.config,this.registerListeners()}destroy(){const e=this.media;this.unregisterListeners(),this.onMediaDetached(),this._clear(e);const t=this.config;t.requestMediaKeySystemAccessFunc=null,t.licenseXhrSetup=t.licenseResponseCallback=void 0,t.drmSystems=t.drmSystemOptions={},this.hls=this.config=this.keyIdToKeySessionPromise=null,this.onMediaEncrypted=this.onWaitingForKey=null}registerListeners(){this.hls.on(f.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(f.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(f.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(f.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(f.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(f.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(f.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:n}=this.config,r=t[e];if(r)return r.licenseUrl;if(e===tn.WIDEVINE&&n)return n}getLicenseServerUrlOrThrow(e){const t=this.getLicenseServerUrl(e);if(t===void 0)throw new Error(`no license server URL configured for key-system "${e}"`);return t}getServerCertificateUrl(e){const{drmSystems:t}=this.config,n=t[e];if(n)return n.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,n=(s,l,c)=>!!s&&c.indexOf(s)===l,r=t.map(s=>s.audioCodec).filter(n),i=t.map(s=>s.videoCodec).filter(n);return r.length+i.length===0&&i.push("avc1.42e01e"),new Promise((s,l)=>{const c=u=>{const d=u.shift();this.getMediaKeysPromise(d,r,i).then(p=>s({keySystem:d,mediaKeys:p})).catch(p=>{u.length?c(u):p instanceof Ri?l(p):l(new Ri({type:fe.KEY_SYSTEM_ERROR,details:F.KEY_SYSTEM_NO_ACCESS,error:p,fatal:!0},p.message))})};c(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:n}=this.config;if(typeof n!="function"){let r=`Configured requestMediaKeySystemAccess is not a function ${n}`;return Gn===null&&self.location.protocol==="http:"&&(r=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(r))}return n(e,t)}getMediaKeysPromise(e,t,n){const r=yr(e,t,n,this.config.drmSystemOptions),i=this.keySystemAccessPromises[e];let s=i==null?void 0:i.keySystemAccess;if(!s){this.log(`Requesting encrypted media "${e}" key-system access with config: ${Et(r)}`),s=this.requestMediaKeySystemAccess(e,r);const l=this.keySystemAccessPromises[e]={keySystemAccess:s};return s.catch(c=>{this.log(`Failed to obtain access to key-system "${e}": ${c}`)}),s.then(c=>{this.log(`Access for key-system "${c.keySystem}" obtained`);const u=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),l.mediaKeys=c.createMediaKeys().then(d=>(this.log(`Media-keys created for "${e}"`),u.then(p=>p?this.setMediaKeysServerCertificate(d,e,p):d))),l.mediaKeys.catch(d=>{this.error(`Failed to create media-keys for "${e}"}: ${d}`)}),l.mediaKeys})}return s.then(()=>i.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:n}){this.log(`Creating key-system session "${t}" keyId: ${W.hexDump(e.keyId||[])}`);const r=n.createSession(),i={decryptdata:e,keySystem:t,mediaKeys:n,mediaKeysSession:r,keyStatus:"status-pending"};return this.mediaKeySessions.push(i),i}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const n=this.createMediaKeySessionContext(e),r=this.getKeyIdString(t),i="cenc";this.keyIdToKeySessionPromise[r]=this.generateRequestWithPreferredKeySession(n,i,t.pssh.buffer,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}getKeyIdString(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(e.keyId===null)throw new Error("keyId is null");return W.hexDump(e.keyId)}updateKeySession(e,t){var n;const r=e.mediaKeysSession;return this.log(`Updating key-session "${r.sessionId}" for keyID ${W.hexDump(((n=e.decryptdata)==null?void 0:n.keyId)||[])}
|
|
} (data length: ${t&&t.byteLength})`),r.update(t)}selectKeySystemFormat(e){const t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){return new Promise((t,n)=>{const r=Ln(this.config),i=e.map(Jn).filter(s=>!!s&&r.indexOf(s)!==-1);return this.getKeySystemSelectionPromise(i).then(({keySystem:s})=>{const l=Tr(s);l?t(l):n(new Error(`Unable to find format for key-system "${s}"`))}).catch(n)})}loadKey(e){const t=e.keyInfo.decryptdata,n=this.getKeyIdString(t),r=`(keyId: ${n} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${r}`);let i=this.keyIdToKeySessionPromise[n];return i||(i=this.getKeySystemForKeyPromise(t).then(({keySystem:l,mediaKeys:c})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${r}`),this.attemptSetMediaKeys(l,c).then(()=>(this.throwIfDestroyed(),this.createMediaKeySessionContext({keySystem:l,mediaKeys:c,decryptdata:t}))))),(this.keyIdToKeySessionPromise[n]=i.then(l=>{const c="cenc",u=t.pssh?t.pssh.buffer:null;return this.generateRequestWithPreferredKeySession(l,c,u,"playlist-key")})).catch(l=>this.handleError(l))),i}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof Ri?this.hls.trigger(f.ERROR,e.data):this.hls.trigger(f.ERROR,{type:fe.KEY_SYSTEM_ERROR,details:F.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),n=this.keyIdToKeySessionPromise[t];if(!n){const r=Jn(e.keyFormat),i=r?[r]:Ln(this.config);return this.attemptKeySystemAccess(i)}return n}getKeySystemSelectionPromise(e){if(e.length||(e=Ln(this.config)),e.length===0)throw new Ri({type:fe.KEY_SYSTEM_ERROR,details:F.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${Et({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}attemptSetMediaKeys(e,t){const n=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const r=Promise.all(n).then(()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)});return this.setMediaKeysQueue.push(r),r.then(()=>{this.log(`Media-keys set for "${e}"`),n.push(r),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(i=>n.indexOf(i)===-1)})}generateRequestWithPreferredKeySession(e,t,n,r){var i,s;const l=(i=this.config.drmSystems)==null||(s=i[e.keySystem])==null?void 0:s.generateRequest;if(l)try{const D=l.call(this.hls,t,n,e);if(!D)throw new Error("Invalid response from configured generateRequest filter");t=D.initDataType,n=D.initData?D.initData:null,e.decryptdata.pssh=n?new Uint8Array(n):null}catch(D){var c;if(this.warn(D.message),(c=this.hls)!=null&&c.config.debug)throw D}if(n===null)return this.log(`Skipping key-session request for "${r}" (no initData)`),Promise.resolve(e);const u=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${r}": ${u} (init data type: ${t} length: ${n?n.byteLength:null})`);const d=new Zi,p=e._onmessage=D=>{const X=e.mediaKeysSession;if(!X){d.emit("error",new Error("invalid state"));return}const{messageType:Y,message:_e}=D;this.log(`"${Y}" message event for session "${X.sessionId}" message size: ${_e.byteLength}`),Y==="license-request"||Y==="license-renewal"?this.renewLicense(e,_e).catch(Me=>{d.eventNames().length?d.emit("error",Me):this.handleError(Me)}):Y==="license-release"?e.keySystem===tn.FAIRPLAY&&(this.updateKeySession(e,Sr("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${Y}"`)},b=e._onkeystatuseschange=D=>{if(!e.mediaKeysSession){d.emit("error",new Error("invalid state"));return}this.onKeyStatusChange(e);const Y=e.keyStatus;d.emit("keyStatus",Y),Y==="expired"&&(this.warn(`${e.keySystem} expired for key ${u}`),this.renewKeySession(e))};e.mediaKeysSession.addEventListener("message",p),e.mediaKeysSession.addEventListener("keystatuseschange",b);const w=new Promise((D,X)=>{d.on("error",X),d.on("keyStatus",Y=>{Y.startsWith("usable")?D():Y==="output-restricted"?X(new Ri({type:fe.KEY_SYSTEM_ERROR,details:F.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):Y==="internal-error"?X(new Ri({type:fe.KEY_SYSTEM_ERROR,details:F.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${Y}"`)):Y==="expired"?X(new Error("key expired while generating request")):this.warn(`unhandled key status change "${Y}"`)})});return e.mediaKeysSession.generateRequest(t,n).then(()=>{var D;this.log(`Request generated for key-session "${(D=e.mediaKeysSession)==null?void 0:D.sessionId}" keyId: ${u}`)}).catch(D=>{throw new Ri({type:fe.KEY_SYSTEM_ERROR,details:F.KEY_SYSTEM_NO_SESSION,error:D,fatal:!1},`Error generating key-session request: ${D}`)}).then(()=>w).catch(D=>{throw d.removeAllListeners(),this.removeSession(e),D}).then(()=>(d.removeAllListeners(),e))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach((t,n)=>{if(typeof n=="string"&&typeof t=="object"){const r=n;n=t,t=r}this.log(`key status change "${t}" for keyStatuses keyId: ${W.hexDump("buffer"in n?new Uint8Array(n.buffer,n.byteOffset,n.byteLength):new Uint8Array(n))} session keyId: ${W.hexDump(new Uint8Array(e.decryptdata.keyId||[]))} uri: ${e.decryptdata.uri}`),e.keyStatus=t})}fetchServerCertificate(e){const t=this.config,n=t.loader,r=new n(t),i=this.getServerCertificateUrl(e);return i?(this.log(`Fetching server certificate for "${e}"`),new Promise((s,l)=>{const c={responseType:"arraybuffer",url:i},u=t.certLoadPolicy.default,d={loadPolicy:u,timeout:u.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},p={onSuccess:(b,w,D,X)=>{s(b.data)},onError:(b,w,D,X)=>{l(new Ri({type:fe.KEY_SYSTEM_ERROR,details:F.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:D,response:_({url:c.url,data:void 0},b)},`"${e}" certificate request failed (${i}). Status: ${b.code} (${b.text})`))},onTimeout:(b,w,D)=>{l(new Ri({type:fe.KEY_SYSTEM_ERROR,details:F.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:D,response:{url:c.url,data:void 0}},`"${e}" certificate request timed out (${i})`))},onAbort:(b,w,D)=>{l(new Error("aborted"))}};r.load(c,d,p)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,n){return new Promise((r,i)=>{e.setServerCertificate(n).then(s=>{this.log(`setServerCertificate ${s?"success":"not supported by CDM"} (${n==null?void 0:n.byteLength}) on "${t}"`),r(e)}).catch(s=>{i(new Ri({type:fe.KEY_SYSTEM_ERROR,details:F.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:s,fatal:!0},s.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(n=>this.updateKeySession(e,new Uint8Array(n)).catch(r=>{throw new Ri({type:fe.KEY_SYSTEM_ERROR,details:F.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:r,fatal:!0},r.message)}))}unpackPlayReadyKeyMessage(e,t){const n=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!n.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const r=new DOMParser().parseFromString(n,"application/xml"),i=r.querySelectorAll("HttpHeader");if(i.length>0){let d;for(let p=0,b=i.length;p<b;p++){var s,l;d=i[p];const w=(s=d.querySelector("name"))==null?void 0:s.textContent,D=(l=d.querySelector("value"))==null?void 0:l.textContent;w&&D&&e.setRequestHeader(w,D)}}const c=r.querySelector("Challenge"),u=c==null?void 0:c.textContent;if(!u)throw new Error("Cannot find <Challenge> in key message");return Sr(atob(u))}setupLicenseXHR(e,t,n,r){const i=this.config.licenseXhrSetup;return i?Promise.resolve().then(()=>{if(!n.decryptdata)throw new Error("Key removed");return i.call(this.hls,e,t,n,r)}).catch(s=>{if(!n.decryptdata)throw s;return e.open("POST",t,!0),i.call(this.hls,e,t,n,r)}).then(s=>(e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:s||r})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:r}))}requestLicense(e,t){const n=this.config.keyLoadPolicy.default;return new Promise((r,i)=>{const s=this.getLicenseServerUrlOrThrow(e.keySystem);this.log(`Sending license request to URL: ${s}`);const l=new XMLHttpRequest;l.responseType="arraybuffer",l.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return i(new Error("invalid state"));if(l.readyState===4)if(l.status===200){this._requestLicenseFailureCount=0;let c=l.response;this.log(`License received ${c instanceof ArrayBuffer?c.byteLength:c}`);const u=this.config.licenseResponseCallback;if(u)try{c=u.call(this.hls,l,s,e)}catch(d){this.error(d)}r(c)}else{const c=n.errorRetry,u=c?c.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>u||l.status>=400&&l.status<500)i(new Ri({type:fe.KEY_SYSTEM_ERROR,details:F.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:l,response:{url:s,data:void 0,code:l.status,text:l.statusText}},`License Request XHR failed (${s}). Status: ${l.status} (${l.statusText})`));else{const d=u-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${d} attempts left`),this.requestLicense(e,t).then(r,i)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=l,this.setupLicenseXHR(l,s,e,t).then(({xhr:c,licenseChallenge:u})=>{e.keySystem==tn.PLAYREADY&&(u=this.unpackPlayReadyKeyMessage(c,u)),c.send(u)})})}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const n=t.media;this.media=n,n.removeEventListener("encrypted",this.onMediaEncrypted),n.removeEventListener("waitingforkey",this.onWaitingForKey),n.addEventListener("encrypted",this.onMediaEncrypted),n.addEventListener("waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media;e&&(e.removeEventListener("encrypted",this.onMediaEncrypted),e.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null)}_clear(e){var t;const n=this.mediaKeySessions;this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},qr.clearKeyUriToKeyIdMap();const r=n.length;Is.CDMCleanupPromise=Promise.all(n.map(i=>this.removeSession(i)).concat(e==null||(t=e.setMediaKeys(null))==null?void 0:t.catch(i=>{var s;this.log(`Could not clear media keys: ${i}`),(s=this.hls)==null||s.trigger(f.ERROR,{type:fe.OTHER_ERROR,details:F.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,fatal:!1,error:new Error(`Could not clear media keys: ${i}`)})}))).then(()=>{r&&(this.log("finished closing key sessions and clearing media keys"),n.length=0)}).catch(i=>{var s;this.log(`Could not close sessions and clear media keys: ${i}`),(s=this.hls)==null||s.trigger(f.ERROR,{type:fe.OTHER_ERROR,details:F.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close sessions and clear media keys: ${i}`)})})}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:t}){if(!(!t||!this.config.emeEnabled)&&!this.keyFormatPromise){const n=t.reduce((r,i)=>(r.indexOf(i.keyFormat)===-1&&r.push(i.keyFormat),r),[]);this.log(`Selecting key-system from session-keys ${n.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(n)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:n}=e;if(t){this.log(`Remove licenses and keys and close session ${t.sessionId}`),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),n&&n.readyState!==XMLHttpRequest.DONE&&n.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const r=this.mediaKeySessions.indexOf(e);r>-1&&this.mediaKeySessions.splice(r,1);const{drmSystemOptions:i}=this.config;return(xr(i)?new Promise((l,c)=>{self.setTimeout(()=>c(new Error("MediaKeySession.remove() timeout")),8e3),t.remove().then(l)}):Promise.resolve()).catch(l=>{var c;this.log(`Could not remove session: ${l}`),(c=this.hls)==null||c.trigger(f.ERROR,{type:fe.OTHER_ERROR,details:F.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,fatal:!1,error:new Error(`Could not remove session: ${l}`)})}).then(()=>t.close()).catch(l=>{var c;this.log(`Could not close session: ${l}`),(c=this.hls)==null||c.trigger(f.ERROR,{type:fe.OTHER_ERROR,details:F.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close session: ${l}`)})})}}}Is.CDMCleanupPromise=void 0;class Ri extends Error{constructor(e,t){super(t),this.data=void 0,e.error||(e.error=new Error(t)),this.data=e,e.err=e.error}}class Uu{constructor(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}setStreamController(e){this.streamController=e}registerListeners(){this.hls.on(f.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(f.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListeners(){this.hls.off(f.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(f.MEDIA_DETACHING,this.onMediaDetaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const n=this.hls.config;if(n.capLevelOnFPSDrop){const r=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=r,r&&typeof r.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),n.fpsDroppedMonitoringPeriod)}}onMediaDetaching(){this.media=null}checkFPS(e,t,n){const r=performance.now();if(t){if(this.lastTime){const i=r-this.lastTime,s=n-this.lastDroppedFrames,l=t-this.lastDecodedFrames,c=1e3*s/i,u=this.hls;if(u.trigger(f.FPS_DROP,{currentDropped:s,currentDecoded:l,totalDroppedFrames:n}),c>0&&s>u.config.fpsDroppedMonitoringThreshold*l){let d=u.currentLevel;u.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+d),d>0&&(u.autoLevelCapping===-1||u.autoLevelCapping>=d)&&(d=d-1,u.trigger(f.FPS_DROP_LEVEL_CAPPING,{level:d,droppedLevel:u.currentLevel}),u.autoLevelCapping=d,this.streamController.nextLevelSwitch())}}this.lastTime=r,this.lastDroppedFrames=n,this.lastDecodedFrames=t}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}}function Io(a,e){let t;try{t=new Event("addtrack")}catch(n){t=document.createEvent("Event"),t.initEvent("addtrack",!1,!1)}t.track=a,e.dispatchEvent(t)}function Lo(a,e){const t=a.mode;if(t==="disabled"&&(a.mode="hidden"),a.cues&&!a.cues.getCueById(e.id))try{if(a.addCue(e),!a.cues.getCueById(e.id))throw new Error(`addCue is failed for: ${e}`)}catch(n){G.debug(`[texttrack-utils]: ${n}`);try{const r=new self.TextTrackCue(e.startTime,e.endTime,e.text);r.id=e.id,a.addCue(r)}catch(r){G.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${r}`)}}t==="disabled"&&(a.mode=t)}function Ls(a,e){const t=a.mode;if(t==="disabled"&&(a.mode="hidden"),a.cues)for(let n=a.cues.length;n--;)e&&a.cues[n].removeEventListener("enter",e),a.removeCue(a.cues[n]);t==="disabled"&&(a.mode=t)}function ka(a,e,t,n){const r=a.mode;if(r==="disabled"&&(a.mode="hidden"),a.cues&&a.cues.length>0){const i=Zu(a.cues,e,t);for(let s=0;s<i.length;s++)(!n||n(i[s]))&&a.removeCue(i[s])}r==="disabled"&&(a.mode=r)}function Ku(a,e){if(e<=a[0].startTime)return 0;const t=a.length-1;if(e>a[t].endTime)return-1;let n=0,r=t,i;for(;n<=r;)if(i=Math.floor((r+n)/2),e<a[i].startTime)r=i-1;else if(e>a[i].startTime&&n<t)n=i+1;else return i;return a[n].startTime-e<e-a[r].startTime?n:r}function Zu(a,e,t){const n=[],r=Ku(a,e);if(r>-1)for(let i=r,s=a.length;i<s;i++){const l=a[i];if(l.startTime>=e&&l.endTime<=t)n.push(l);else if(l.startTime>t)return n}return n}function aa(a){const e=[];for(let t=0;t<a.length;t++){const n=a[t];(n.kind==="subtitles"||n.kind==="captions")&&n.label&&e.push(a[t])}return e}class zu extends Aa{constructor(e){super(e,"subtitle-track-controller"),this.media=null,this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.queuedDefaultTrack=-1,this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.asyncPollTrackChange=()=>this.pollTrackChange(0),this.onTextTracksChanged=()=>{if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let t=null;const n=aa(this.media.textTracks);for(let i=0;i<n.length;i++)if(n[i].mode==="hidden")t=n[i];else if(n[i].mode==="showing"){t=n[i];break}const r=this.findTrackForTextTrack(t);this.subtitleTrack!==r&&this.setSubtitleTrack(r)},this.registerListeners()}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,this.onTextTracksChanged=this.asyncPollTrackChange=null,super.destroy()}get subtitleDisplay(){return this._subtitleDisplay}set subtitleDisplay(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes()}registerListeners(){const{hls:e}=this;e.on(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_PARSED,this.onManifestParsed,this),e.on(f.LEVEL_LOADING,this.onLevelLoading,this),e.on(f.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(f.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(f.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_PARSED,this.onManifestParsed,this),e.off(f.LEVEL_LOADING,this.onLevelLoading,this),e.off(f.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(f.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(f.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)}onMediaDetaching(e,t){const n=this.media;if(!n)return;const r=!!t.transferMedia;if(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||n.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),this.subtitleTrack=-1,this.media=null,r)return;aa(n.textTracks).forEach(s=>{Ls(s)})}onManifestLoading(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.subtitleTracks}onSubtitleTrackLoaded(e,t){const{id:n,groupId:r,details:i}=t,s=this.tracksInGroup[n];if(!s||s.groupId!==r){this.warn(`Subtitle track with id:${n} and group:${r} not found in active group ${s==null?void 0:s.groupId}`);return}const l=s.details;s.details=t.details,this.log(`Subtitle track ${n} "${s.name}" lang:${s.lang} group:${r} loaded [${i.startSN}-${i.endSN}]`),n===this.trackId&&this.playlistLoaded(n,t,l)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const n=t.subtitleGroups||null,r=this.groupIds;let i=this.currentTrack;if(!n||(r==null?void 0:r.length)!==(n==null?void 0:n.length)||n!=null&&n.some(s=>(r==null?void 0:r.indexOf(s))===-1)){this.groupIds=n,this.trackId=-1,this.currentTrack=null;const s=this.tracks.filter(d=>!n||n.indexOf(d.groupId)!==-1);if(s.length)this.selectDefaultTrack&&!s.some(d=>d.default)&&(this.selectDefaultTrack=!1),s.forEach((d,p)=>{d.id=p});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=s;const l=this.hls.config.subtitlePreference;if(!i&&l){this.selectDefaultTrack=!1;const d=Se(l,s);if(d>-1)i=s[d];else{const p=Se(l,this.tracks);i=this.tracks[p]}}let c=this.findTrackId(i);c===-1&&i&&(c=this.findTrackId(null));const u={subtitleTracks:s};this.log(`Updating subtitle tracks, ${s.length} track(s) found in "${n==null?void 0:n.join(",")}" group-id`),this.hls.trigger(f.SUBTITLE_TRACKS_UPDATED,u),c!==-1&&this.trackId===-1&&this.setSubtitleTrack(c)}}findTrackId(e){const t=this.tracksInGroup,n=this.selectDefaultTrack;for(let r=0;r<t.length;r++){const i=t[r];if(!(n&&!i.default||!n&&!e)&&(!e||et(i,e)))return r}if(e){for(let r=0;r<t.length;r++){const i=t[r];if(zs(e.attrs,i.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return r}for(let r=0;r<t.length;r++){const i=t[r];if(zs(e.attrs,i.attrs,["LANGUAGE"]))return r}}return-1}findTrackForTextTrack(e){if(e){const t=this.tracksInGroup;for(let n=0;n<t.length;n++){const r=t[n];if(Ta(r,e))return n}}return-1}onError(e,t){t.fatal||!t.context||t.context.type===ue.SUBTITLE_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allSubtitleTracks(){return this.tracks}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}setSubtitleOption(e){if(this.hls.config.subtitlePreference=e,e){if(e.id===-1)return this.setSubtitleTrack(-1),null;const t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){const n=this.currentTrack;if(n&&et(e,n))return n;const r=Se(e,this.tracksInGroup);if(r>-1){const i=this.tracksInGroup[r];return this.setSubtitleTrack(r),i}else{if(n)return null;{const i=Se(e,t);if(i>-1)return t[i]}}}}return null}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentTrack)&&this.scheduleLoading(this.currentTrack,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=e.id,r=e.groupId,i=this.getUrlWithDirectives(e.url,t),s=e.details,l=s==null?void 0:s.age;this.log(`Loading subtitle ${n} "${e.name}" lang:${e.lang} group:${r}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${l&&s.live?" age "+l.toFixed(1)+(s.type?" "+s.type||0:""):""} ${i}`),this.hls.trigger(f.SUBTITLE_TRACK_LOADING,{url:i,id:n,groupId:r,deliveryDirectives:t||null,track:e})}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=aa(e.textTracks),n=this.currentTrack;let r;if(n&&(r=t.filter(i=>Ta(n,i))[0],r||this.warn(`Unable to find subtitle TextTrack with name "${n.name}" and language "${n.lang}"`)),[].slice.call(t).forEach(i=>{i.mode!=="disabled"&&i!==r&&(i.mode="disabled")}),r){const i=this.subtitleDisplay?"showing":"hidden";r.mode!==i&&(r.mode=i)}}setSubtitleTrack(e){const t=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=e;return}if(e<-1||e>=t.length||!x(e)){this.warn(`Invalid subtitle track id: ${e}`);return}this.selectDefaultTrack=!1;const n=this.currentTrack,r=t[e]||null;if(this.trackId=e,this.currentTrack=r,this.toggleTrackModes(),!r){this.hls.trigger(f.SUBTITLE_TRACK_SWITCH,{id:e});return}const i=!!r.details&&!r.details.live;if(e===this.trackId&&r===n&&i)return;this.log(`Switching to subtitle-track ${e}`+(r?` "${r.name}" lang:${r.lang} group:${r.groupId}`:""));const{id:s,groupId:l="",name:c,type:u,url:d}=r;this.hls.trigger(f.SUBTITLE_TRACK_SWITCH,{id:s,groupId:l,name:c,type:u,url:d});const p=this.switchParams(r.url,n==null?void 0:n.details,r.details);this.loadPlaylist(p)}}function Gs(a){let e=5381,t=a.length;for(;t;)e=e*33^a.charCodeAt(--t);return(e>>>0).toString()}const ks=.025;let oa=function(a){return a[a.Point=0]="Point",a[a.Range=1]="Range",a}({});function Hu(a,e,t){return`${a.identifier}-${t+1}-${Gs(e)}`}class Gu{constructor(e,t){this.base=void 0,this._duration=null,this._timelineStart=null,this.appendInPlaceDisabled=void 0,this.appendInPlaceStarted=void 0,this.dateRange=void 0,this.hasPlayed=!1,this.cumulativeDuration=0,this.resumeOffset=NaN,this.playoutLimit=NaN,this.restrictions={skip:!1,jump:!1},this.snapOptions={out:!1,in:!1},this.assetList=[],this.assetListLoader=void 0,this.assetListResponse=null,this.resumeAnchor=void 0,this.error=void 0,this.resetOnResume=void 0,this.base=t,this.dateRange=e,this.setDateRange(e)}setDateRange(e){this.dateRange=e,this.resumeOffset=e.attr.optionalFloat("X-RESUME-OFFSET",this.resumeOffset),this.playoutLimit=e.attr.optionalFloat("X-PLAYOUT-LIMIT",this.playoutLimit),this.restrictions=e.attr.enumeratedStringList("X-RESTRICT",this.restrictions),this.snapOptions=e.attr.enumeratedStringList("X-SNAP",this.snapOptions)}reset(){var e;this.appendInPlaceStarted=!1,(e=this.assetListLoader)==null||e.destroy(),this.assetListLoader=void 0,this.supplementsPrimary||(this.assetListResponse=null,this.assetList=[],this._duration=null)}isAssetPastPlayoutLimit(e){if(e>=this.assetList.length)return!0;const t=this.playoutLimit;return e<=0||isNaN(t)?!1:this.assetList[e].startOffset>t}findAssetIndex(e){return this.assetList.indexOf(e)}get identifier(){return this.dateRange.id}get startDate(){return this.dateRange.startDate}get startTime(){const e=this.dateRange.startTime;if(this.snapOptions.out){const t=this.dateRange.tagAnchor;if(t)return Pa(e,t)}return e}get startOffset(){return this.cue.pre?0:this.startTime}get startIsAligned(){if(this.startTime===0||this.snapOptions.out)return!0;const e=this.dateRange.tagAnchor;if(e){const t=this.dateRange.startTime,n=Pa(t,e);return t-n<.1}return!1}get resumptionOffset(){const e=this.resumeOffset,t=x(e)?e:this.duration;return this.cumulativeDuration+t}get resumeTime(){const e=this.startOffset+this.resumptionOffset;if(this.snapOptions.in){const t=this.resumeAnchor;if(t)return Pa(e,t)}return e}get appendInPlace(){return this.appendInPlaceStarted?!0:this.appendInPlaceDisabled?!1:!!(!this.cue.once&&!this.cue.pre&&this.startIsAligned&&(isNaN(this.playoutLimit)&&isNaN(this.resumeOffset)||this.resumeOffset&&this.duration&&Math.abs(this.resumeOffset-this.duration)<ks))}set appendInPlace(e){if(this.appendInPlaceStarted){this.resetOnResume=!e;return}this.appendInPlaceDisabled=!e}get timelineStart(){return this._timelineStart!==null?this._timelineStart:this.startTime}set timelineStart(e){this._timelineStart=e}get duration(){const e=this.playoutLimit;let t;return this._duration!==null?t=this._duration:this.dateRange.duration?t=this.dateRange.duration:t=this.dateRange.plannedDuration||0,!isNaN(e)&&e<t&&(t=e),t}set duration(e){this._duration=e}get cue(){return this.dateRange.cue}get timelineOccupancy(){return this.dateRange.attr["X-TIMELINE-OCCUPIES"]==="RANGE"?oa.Range:oa.Point}get supplementsPrimary(){return this.dateRange.attr["X-TIMELINE-STYLE"]==="PRIMARY"}get contentMayVary(){return this.dateRange.attr["X-CONTENT-MAY-VARY"]!=="NO"}get assetUrl(){return this.dateRange.attr["X-ASSET-URI"]}get assetListUrl(){return this.dateRange.attr["X-ASSET-LIST"]}get baseUrl(){return this.base.url}get assetListLoaded(){return this.assetList.length>0||this.assetListResponse!==null}toString(){return Wu(this)}}function Pa(a,e){return a-e.start<e.duration/2&&!(Math.abs(a-(e.start+e.duration))<ks)?e.start:e.start+e.duration}function ko(a,e,t){const n=new self.URL(a,t);return n.protocol!=="data:"&&n.searchParams.set("_HLS_primary_id",e),n}function Wu(a){return`["${a.identifier}" ${a.cue.pre?"<pre>":a.cue.post?"<post>":""}${a.timelineStart.toFixed(2)}-${a.resumeTime.toFixed(2)}]`}function Oa(a){const e=a.timelineStart,t=a.duration||0;return`["${a.identifier}" ${e.toFixed(2)}-${(e+t).toFixed(2)}]`}class Vu{constructor(e,t,n,r){this.hls=void 0,this.interstitial=void 0,this.assetItem=void 0,this.tracks=null,this.hasDetails=!1,this.mediaAttached=null,this._currentTime=void 0,this._bufferedEosTime=void 0,this.checkPlayout=()=>{const u=this.interstitial.playoutLimit,d=this.currentTime;this.startOffset+d>=u&&this.hls.trigger(f.PLAYOUT_LIMIT_REACHED,{})};const i=this.hls=new e(t);this.interstitial=n,this.assetItem=r;let s=r.uri;try{s=ko(s,i.sessionId).href}catch(c){}i.loadSource(s);const l=()=>{this.hasDetails=!0};i.once(f.LEVEL_LOADED,l),i.once(f.AUDIO_TRACK_LOADED,l),i.once(f.SUBTITLE_TRACK_LOADED,l),i.on(f.MEDIA_ATTACHING,(c,{media:u})=>{this.removeMediaListeners(),this.mediaAttached=u,this.interstitial.playoutLimit&&u.addEventListener("timeupdate",this.checkPlayout)})}bufferedInPlaceToEnd(e){var t;if(!this.interstitial.appendInPlace)return!1;if((t=this.hls)!=null&&t.bufferedToEnd)return!0;if(!e||!this._bufferedEosTime)return!1;const n=this.timelineOffset,r=hn.bufferInfo(e,n,0);return this.getAssetTime(r.end)>=this._bufferedEosTime-.02}get destroyed(){var e;return!((e=this.hls)!=null&&e.userConfig)}get assetId(){return this.assetItem.identifier}get interstitialId(){return this.assetItem.parentIdentifier}get media(){var e;return((e=this.hls)==null?void 0:e.media)||null}get bufferedEnd(){const e=this.media||this.mediaAttached;if(!e)return this._bufferedEosTime?this._bufferedEosTime:this.currentTime;const t=hn.bufferInfo(e,e.currentTime,.001);return this.getAssetTime(t.end)}get currentTime(){const e=this.media||this.mediaAttached;return e?this.getAssetTime(e.currentTime):this._currentTime||0}get duration(){const e=this.assetItem.duration;return e||0}get remaining(){const e=this.duration;return e?Math.max(0,e-this.currentTime):0}get startOffset(){return this.assetItem.startOffset}get timelineOffset(){var e;return((e=this.hls)==null?void 0:e.config.timelineOffset)||0}set timelineOffset(e){const t=this.timelineOffset;if(e!==t){const n=e-t;if(Math.abs(n)>1/9e4){if(this.hasDetails)throw new Error("Cannot set timelineOffset after playlists are loaded");this.hls.config.timelineOffset=e}}}getAssetTime(e){const t=this.timelineOffset,n=this.duration;return Math.min(Math.max(0,e-t),n)}removeMediaListeners(){const e=this.mediaAttached;e&&(this._currentTime=e.currentTime,this.bufferSnapShot(),e.removeEventListener("timeupdate",this.checkPlayout))}bufferSnapShot(){if(this.mediaAttached){var e;(e=this.hls)!=null&&e.bufferedToEnd&&(this._bufferedEosTime=this.bufferedEnd)}}destroy(){this.removeMediaListeners(),this.hls.destroy(),this.hls=this.interstitial=null,this.tracks=this.mediaAttached=this.checkPlayout=null}attachMedia(e){this.hls.attachMedia(e)}detachMedia(){this.removeMediaListeners(),this.mediaAttached=null,this.hls.detachMedia()}resumeBuffering(){this.hls.resumeBuffering()}pauseBuffering(){this.hls.pauseBuffering()}transferMedia(){return this.bufferSnapShot(),this.hls.transferMedia()}on(e,t,n){this.hls.on(e,t)}once(e,t,n){this.hls.once(e,t)}off(e,t,n){this.hls.off(e,t)}toString(){var e,t;return`HlsAssetPlayer: ${Oa(this.assetItem)} ${(e=this.hls)==null?void 0:e.sessionId} ${(t=this.interstitial)!=null&&t.appendInPlace?"append-in-place":""}`}}const Po=.033;class $u extends N{constructor(e,t){super("interstitials-sched",t),this.onScheduleUpdate=void 0,this.eventMap={},this.events=null,this.items=null,this.durations={primary:0,playout:0,integrated:0},this.onScheduleUpdate=e}destroy(){this.reset(),this.onScheduleUpdate=null}reset(){this.eventMap={},this.setDurations(0,0,0),this.events&&this.events.forEach(e=>e.reset()),this.events=this.items=null}resetErrorsInRange(e,t){return this.events?this.events.reduce((n,r)=>e<=r.startOffset&&t>r.startOffset?(delete r.error,n+1):n,0):0}get duration(){const e=this.items;return e?e[e.length-1].end:0}get length(){return this.items?this.items.length:0}getEvent(e){return e&&this.eventMap[e]||null}hasEvent(e){return e in this.eventMap}findItemIndex(e,t){if(e.event)return this.findEventIndex(e.event.identifier);let n=-1;e.nextEvent?n=this.findEventIndex(e.nextEvent.identifier)-1:e.previousEvent&&(n=this.findEventIndex(e.previousEvent.identifier)+1);const r=this.items;if(r)for(r[n]||(t===void 0&&(t=e.start),n=this.findItemIndexAtTime(t));n>=0&&(i=r[n])!=null&&i.event;){var i;n--}return n}findItemIndexAtTime(e,t){const n=this.items;if(n)for(let r=0;r<n.length;r++){let i=n[r];if(t&&t!=="primary"&&(i=i[t]),e===i.start||e>i.start&&e<i.end)return r}return-1}findJumpRestrictedIndex(e,t){const n=this.items;if(n)for(let r=e;r<=t&&n[r];r++){const i=n[r].event;if(i!=null&&i.restrictions.jump&&!i.appendInPlace)return r}return-1}findEventIndex(e){const t=this.items;if(t)for(let r=t.length;r--;){var n;if(((n=t[r].event)==null?void 0:n.identifier)===e)return r}return-1}findAssetIndex(e,t){const n=e.assetList,r=n.length;if(r>1)for(let i=0;i<r;i++){const s=n[i];if(!s.error){const l=s.timelineStart;if(t===l||t>l&&t<l+(s.duration||0))return i}}return 0}get assetIdAtEnd(){var e,t;const n=(e=this.items)==null||(t=e[this.length-1])==null?void 0:t.event;if(n){const r=n.assetList,i=r[r.length-1];if(i)return i.identifier}return null}parseInterstitialDateRanges(e,t){const n=e.main.details,{dateRanges:r}=n,i=this.events,s=this.parseDateRanges(r,{url:n.url},t),l=Object.keys(r),c=i?i.filter(u=>!l.includes(u.identifier)):[];s.length&&s.sort((u,d)=>{const p=u.cue.pre,b=u.cue.post,w=d.cue.pre,D=d.cue.post;if(p&&!w)return-1;if(w&&!p||b&&!D)return 1;if(D&&!b)return-1;if(!p&&!w&&!b&&!D){const X=u.startTime,Y=d.startTime;if(X!==Y)return X-Y}return u.dateRange.tagOrder-d.dateRange.tagOrder}),this.events=s,c.forEach(u=>{this.removeEvent(u)}),this.updateSchedule(e,c)}updateSchedule(e,t=[]){const n=this.events||[];if(n.length||t.length||this.length<2){const r=this.items,i=this.parseSchedule(n,e);(t.length||(r==null?void 0:r.length)!==i.length||i.some((l,c)=>Math.abs(l.playout.start-r[c].playout.start)>.005||Math.abs(l.playout.end-r[c].playout.end)>.005))&&(this.items=i,this.onScheduleUpdate(t,r))}}parseDateRanges(e,t,n){const r=[],i=Object.keys(e);for(let s=0;s<i.length;s++){const l=i[s],c=e[l];if(c.isInterstitial){let u=this.eventMap[l];u?u.setDateRange(c):(u=new Gu(c,t),this.eventMap[l]=u,n===!1&&(u.appendInPlace=n)),r.push(u)}}return r}parseSchedule(e,t){const n=[],r=t.main.details,i=r.live?1/0:r.edge;let s=0;if(e=e.filter(c=>!c.error&&!(c.cue.once&&c.hasPlayed)),e.length){this.resolveOffsets(e,t);let c=0,u=0;if(e.forEach((d,p)=>{const b=d.cue.pre,w=d.cue.post,D=e[p-1]||null,X=d.appendInPlace,Y=w?i:d.startOffset,_e=d.duration,Me=d.timelineOccupancy===oa.Range?_e:0,Ie=d.resumptionOffset,st=(D==null?void 0:D.startTime)===Y,ut=Y+d.cumulativeDuration;let Mt=X?ut+_e:Y+Ie;if(b||!w&&Y<=0){const At=u;u+=Me,d.timelineStart=ut;const Ht=s;s+=_e,n.push({event:d,start:ut,end:Mt,playout:{start:Ht,end:s},integrated:{start:At,end:u}})}else if(Y<=i){if(!st){const mt=Y-c;if(mt>Po){const En=c,Mn=u;u+=mt;const Lr=s;s+=mt;const vr={previousEvent:e[p-1]||null,nextEvent:d,start:En,end:En+mt,playout:{start:Lr,end:s},integrated:{start:Mn,end:u}};n.push(vr)}else mt>0&&D&&(D.cumulativeDuration+=mt,n[n.length-1].end=Y)}w&&(Mt=ut),d.timelineStart=ut;const At=u;u+=Me;const Ht=s;s+=_e,n.push({event:d,start:ut,end:Mt,playout:{start:Ht,end:s},integrated:{start:At,end:u}})}else return;const ct=d.resumeTime;w||ct>i?c=i:c=ct}),c<i){var l;const d=c,p=u,b=i-c;u+=b;const w=s;s+=b,n.push({previousEvent:((l=n[n.length-1])==null?void 0:l.event)||null,nextEvent:null,start:c,end:d+b,playout:{start:w,end:s},integrated:{start:p,end:u}})}this.setDurations(i,s,u)}else n.push({previousEvent:null,nextEvent:null,start:0,end:i,playout:{start:0,end:i},integrated:{start:0,end:i}}),this.setDurations(i,i,i);return n}setDurations(e,t,n){this.durations={primary:e,playout:t,integrated:n}}resolveOffsets(e,t){const n=t.main.details,r=n.live?1/0:n.edge;let i=0,s=-1;e.forEach((l,c)=>{const u=l.cue.pre,d=l.cue.post,p=u?0:d?r:l.startTime;this.updateAssetDurations(l),s===p?l.cumulativeDuration=i:(i=0,s=p),!d&&l.snapOptions.in&&(l.resumeAnchor=Cn(null,n.fragments,l.startOffset+l.resumptionOffset,0,0)||void 0),l.appendInPlace&&!l.appendInPlaceStarted&&(this.primaryCanResumeInPlaceAt(l,t)||(l.appendInPlace=!1)),!l.appendInPlace&&c+1<e.length&&e[c+1].startTime-e[c].resumeTime<Po&&(e[c+1].appendInPlace=!1,e[c+1].appendInPlace&&this.warn(`Could not change append strategy for abutting event ${l}`));const w=x(l.resumeOffset)?l.resumeOffset:l.duration;i+=w})}primaryCanResumeInPlaceAt(e,t){const n=e.resumeTime,r=e.startTime+e.resumptionOffset;return Math.abs(n-r)>ks?(this.log(`"${e.identifier}" resumption ${n} not aligned with estimated timeline end ${r}`),!1):t?!Object.keys(t).some(s=>{const l=t[s].details,c=l.edge;if(n>=c)return this.log(`"${e.identifier}" resumption ${n} past ${s} playlist end ${c}`),!1;const u=Cn(null,l.fragments,n);if(!u)return this.log(`"${e.identifier}" resumption ${n} does not align with any fragments in ${s} playlist (${l.fragStart}-${l.fragmentEnd})`),!0;const d=s==="audio"?.175:0;return Math.abs(u.start-n)<ks+d||Math.abs(u.end-n)<ks+d?!1:(this.log(`"${e.identifier}" resumption ${n} not aligned with ${s} fragment bounds (${u.start}-${u.end} sn: ${u.sn} cc: ${u.cc})`),!0)}):(this.log(`"${e.identifier}" resumption ${n} can not be aligned with media (none selected)`),!1)}updateAssetDurations(e){if(!e.assetListLoaded)return;const t=e.timelineStart;let n=0,r=!1,i=!1;e.assetList.forEach((s,l)=>{const c=t+n;s.startOffset=n,s.timelineStart=c,r||(r=s.duration===null),i||(i=!!s.error);const u=s.error?0:s.duration||0;n+=u}),r&&!i?e.duration=Math.max(n,e.duration):e.duration=n}removeEvent(e){e.reset(),delete this.eventMap[e.identifier]}}function hs(a){return`[${a.event?'"'+a.event.identifier+'"':"primary"}: ${a.start.toFixed(2)}-${a.end.toFixed(2)}]`}class ju{constructor(e){this.hls=void 0,this.hls=e}destroy(){this.hls=null}loadAssetList(e,t){const n=e.assetListUrl;let r;try{r=ko(n,this.hls.sessionId,e.baseUrl)}catch(b){const w=this.assignAssetListError(e,F.ASSET_LIST_LOAD_ERROR,b,n);this.hls.trigger(f.ERROR,w);return}t&&r.protocol!=="data:"&&r.searchParams.set("_HLS_start_offset",""+t);const i=this.hls.config,s=i.loader,l=new s(i),c={responseType:"json",url:r.href},u=i.interstitialAssetListLoadPolicy.default,d={loadPolicy:u,timeout:u.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},p={onSuccess:(b,w,D,X)=>{const Y=b.data,_e=Y==null?void 0:Y.ASSETS;if(!Array.isArray(_e)){const Me=this.assignAssetListError(e,F.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),D.url,w,X);this.hls.trigger(f.ERROR,Me);return}e.assetListResponse=Y,this.hls.trigger(f.ASSET_LIST_LOADED,{event:e,assetListResponse:Y,networkDetails:X})},onError:(b,w,D,X)=>{const Y=this.assignAssetListError(e,F.ASSET_LIST_LOAD_ERROR,new Error(`Error loading X-ASSET-LIST: HTTP status ${b.code} ${b.text} (${w.url})`),w.url,X,D);this.hls.trigger(f.ERROR,Y)},onTimeout:(b,w,D)=>{const X=this.assignAssetListError(e,F.ASSET_LIST_LOAD_TIMEOUT,new Error(`Timeout loading X-ASSET-LIST (${w.url})`),w.url,b,D);this.hls.trigger(f.ERROR,X)}};return l.load(c,d,p),this.hls.trigger(f.ASSET_LIST_LOADING,{event:e}),l}assignAssetListError(e,t,n,r,i,s){return e.error=n,{type:fe.NETWORK_ERROR,details:t,fatal:!1,interstitial:e,url:r,error:n,networkDetails:s,stats:i}}}function qi(a,e,t){Gi(a,e,t),a.addEventListener(e,t)}function Gi(a,e,t){a.removeEventListener(e,t)}function Oo(a){a==null||a.play().catch(()=>{})}class Yu extends N{constructor(e,t){super("interstitials",e.logger),this.HlsPlayerClass=void 0,this.hls=void 0,this.assetListLoader=void 0,this.mediaSelection=null,this.altSelection=null,this.media=null,this.detachedData=null,this.requiredTracks=null,this.manager=null,this.playerQueue=[],this.bufferedPos=-1,this.timelinePos=-1,this.schedule=void 0,this.playingItem=null,this.bufferingItem=null,this.waitingItem=null,this.endedItem=null,this.playingAsset=null,this.endedAsset=null,this.bufferingAsset=null,this.shouldPlay=!1,this.onPlay=()=>{this.shouldPlay=!0},this.onPause=()=>{this.shouldPlay=!1},this.onSeeking=()=>{const n=this.currentTime;if(n===void 0||this.playbackDisabled)return;const r=n-this.timelinePos;if(Math.abs(r)<1/7056e5)return;const s=r<=-.01;this.timelinePos=n,this.bufferedPos=n;const l=this.playingItem;if(!l){this.checkBuffer();return}if(s&&this.schedule.resetErrorsInRange(n,n-r)&&this.updateSchedule(),this.checkBuffer(),s&&n<l.start||n>=l.end){var c;const b=this.schedule.findItemIndexAtTime(this.timelinePos);if(!this.isInterstitial(l)&&(c=this.media)!=null&&c.paused&&(this.shouldPlay=!1),!s){const w=this.findItemIndex(l);if(b>w){const D=this.schedule.findJumpRestrictedIndex(w+1,b);if(D>w){this.setSchedulePosition(D);return}}}this.setSchedulePosition(b);return}const u=this.playingAsset;if(!u){if(this.playingLastItem&&this.isInterstitial(l)){const b=l.event.assetList[0];b&&(this.endedItem=this.playingItem,this.playingItem=null,this.setScheduleToAssetAtTime(n,b))}return}const d=u.timelineStart,p=u.duration||0;(s&&n<d||n>=d+p)&&this.setScheduleToAssetAtTime(n,u)},this.onTimeupdate=()=>{const n=this.currentTime;if(n===void 0||this.playbackDisabled)return;if(n>this.timelinePos)this.timelinePos=n,n>this.bufferedPos&&this.checkBuffer();else return;const r=this.playingItem;if(!r||this.playingLastItem)return;if(n>=r.end){this.timelinePos=r.end;const l=this.findItemIndex(r);this.setSchedulePosition(l+1)}const i=this.playingAsset;if(!i)return;const s=i.timelineStart+(i.duration||0);n>=s&&this.setScheduleToAssetAtTime(n,i)},this.onScheduleUpdate=(n,r)=>{const i=this.schedule,s=this.playingItem,l=i.events||[],c=i.items||[],u=i.durations,d=n.map(w=>w.identifier),p=!!(l.length||d.length);if(p&&this.log(`INTERSTITIALS_UPDATED (${l.length}): ${l}
|
|
Schedule: ${c.map(w=>hs(w))}`),d.length&&this.log(`Removed events ${d}`),this.playerQueue.forEach(w=>{if(w.interstitial.appendInPlace){const D=w.assetItem.timelineStart,X=w.timelineOffset-D;if(X)try{w.timelineOffset=D}catch(Y){Math.abs(X)>ks&&this.warn(`${Y} ("${w.assetId}" ${w.timelineOffset}->${D})`)}}}),s){const w=this.updateItem(s,this.timelinePos);this.itemsMatch(s,w)&&(this.playingItem=w,this.waitingItem=this.endedItem=null)}else this.waitingItem=this.updateItem(this.waitingItem),this.endedItem=this.updateItem(this.endedItem);const b=this.bufferingItem;if(b){const w=this.updateItem(b,this.bufferedPos);this.itemsMatch(b,w)?this.bufferingItem=w:b.event&&(this.bufferingItem=this.playingItem,this.clearInterstitial(b.event,null))}if(n.forEach(w=>{w.assetList.forEach(D=>{this.clearAssetPlayer(D.identifier,null)})}),p||r){if(this.hls.trigger(f.INTERSTITIALS_UPDATED,{events:l.slice(0),schedule:c.slice(0),durations:u,removedIds:d}),this.isInterstitial(s)&&d.includes(s.event.identifier)){this.warn(`Interstitial "${s.event.identifier}" removed while playing`),this.primaryFallback(s.event);return}this.checkBuffer()}},this.hls=e,this.HlsPlayerClass=t,this.assetListLoader=new ju(e),this.schedule=new $u(this.onScheduleUpdate,e.logger),this.registerListeners()}registerListeners(){const e=this.hls;e.on(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(f.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(f.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.on(f.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(f.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.on(f.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.on(f.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.on(f.BUFFER_APPENDED,this.onBufferAppended,this),e.on(f.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(f.BUFFERED_TO_END,this.onBufferedToEnd,this),e.on(f.MEDIA_ENDED,this.onMediaEnded,this),e.on(f.ERROR,this.onError,this),e.on(f.DESTROYING,this.onDestroying,this)}unregisterListeners(){const e=this.hls;e&&(e.off(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(f.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(f.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.off(f.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(f.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.off(f.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.off(f.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.off(f.BUFFER_CODECS,this.onBufferCodecs,this),e.off(f.BUFFER_APPENDED,this.onBufferAppended,this),e.off(f.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(f.BUFFERED_TO_END,this.onBufferedToEnd,this),e.off(f.MEDIA_ENDED,this.onMediaEnded,this),e.off(f.ERROR,this.onError,this),e.off(f.DESTROYING,this.onDestroying,this))}startLoad(){this.resumeBuffering()}stopLoad(){this.pauseBuffering()}resumeBuffering(){var e;(e=this.getBufferingPlayer())==null||e.resumeBuffering()}pauseBuffering(){var e;(e=this.getBufferingPlayer())==null||e.pauseBuffering()}destroy(){this.unregisterListeners(),this.stopLoad(),this.assetListLoader&&this.assetListLoader.destroy(),this.emptyPlayerQueue(),this.clearScheduleState(),this.schedule&&this.schedule.destroy(),this.media=this.detachedData=this.mediaSelection=this.requiredTracks=this.altSelection=this.manager=null,this.hls=this.HlsPlayerClass=this.schedule=this.log=null,this.assetListLoader=null,this.onPlay=this.onPause=this.onSeeking=this.onTimeupdate=null,this.onScheduleUpdate=null}onDestroying(){const e=this.primaryMedia||this.media;e&&this.removeMediaListeners(e)}removeMediaListeners(e){Gi(e,"play",this.onPlay),Gi(e,"pause",this.onPause),Gi(e,"seeking",this.onSeeking),Gi(e,"timeupdate",this.onTimeupdate)}onMediaAttaching(e,t){const n=this.media=t.media;qi(n,"seeking",this.onSeeking),qi(n,"timeupdate",this.onTimeupdate),qi(n,"play",this.onPlay),qi(n,"pause",this.onPause)}onMediaAttached(e,t){const n=this.effectivePlayingItem,r=this.detachedData;if(this.detachedData=null,n===null)this.checkStart();else if(!r){this.clearScheduleState();const i=this.findItemIndex(n);this.setSchedulePosition(i)}}clearScheduleState(){this.playingItem=this.bufferingItem=this.waitingItem=this.endedItem=this.playingAsset=this.endedAsset=this.bufferingAsset=null}onMediaDetaching(e,t){const n=!!t.transferMedia,r=this.media;if(this.media=null,!n&&(r&&this.removeMediaListeners(r),this.detachedData)){const i=this.getBufferingPlayer();i&&(this.playingAsset=this.endedAsset=this.bufferingAsset=this.bufferingItem=this.waitingItem=this.detachedData=null,i.detachMedia()),this.shouldPlay=!1}}get interstitialsManager(){if(!this.manager){if(!this.hls)return null;const e=this,t=()=>e.bufferingItem||e.waitingItem,n=p=>p&&e.getAssetPlayer(p.identifier),r=(p,b,w,D,X)=>{if(p){let Y=p[b].start;const _e=p.event;if(_e){if(b==="playout"||_e.timelineOccupancy!==oa.Point){const Me=n(w);(Me==null?void 0:Me.interstitial)===_e&&(Y+=Me.assetItem.startOffset+Me[X])}}else{const Me=D==="bufferedPos"?s():e[D];Y+=Me-p.start}return Y}return 0},i=(p,b)=>{if(p!==0&&b!=="primary"&&e.schedule.length){var w;const D=e.schedule.findItemIndexAtTime(p),X=(w=e.schedule.items)==null?void 0:w[D];if(X){const Y=X[b].start-X.start;return p+Y}}return p},s=()=>{const p=e.bufferedPos;return p===Number.MAX_VALUE?l("primary"):Math.max(p,0)},l=p=>{var b;return(b=e.primaryDetails)!=null&&b.live?e.primaryDetails.edge:e.schedule.durations[p]},c=(p,b)=>{var w,D;const X=e.effectivePlayingItem;if(X!=null&&(w=X.event)!=null&&w.restrictions.skip)return;e.log(`seek to ${p} "${b}"`);const Y=e.effectivePlayingItem,_e=e.schedule.findItemIndexAtTime(p,b),Me=(D=e.schedule.items)==null?void 0:D[_e],Ie=e.getBufferingPlayer(),st=Ie==null?void 0:Ie.interstitial,ut=st==null?void 0:st.appendInPlace,Mt=Y&&e.itemsMatch(Y,Me);if(Y&&(ut||Mt)){const At=n(e.playingAsset),Ht=(At==null?void 0:At.media)||e.primaryMedia;if(Ht){const mt=b==="primary"?Ht.currentTime:r(Y,b,e.playingAsset,"timelinePos","currentTime"),En=p-mt,Mn=(ut?mt:Ht.currentTime)+En;if(Mn>=0&&(!At||ut||Mn<=At.duration)){Ht.currentTime=Mn;return}}}if(Me){let At=p;if(b!=="primary"){const mt=Me[b].start,En=p-mt;At=Me.start+En}const Ht=!e.isInterstitial(Me);if((!e.isInterstitial(Y)||Y.event.appendInPlace)&&(Ht||Me.event.appendInPlace)){const mt=e.media||(ut?Ie==null?void 0:Ie.media:null);mt&&(mt.currentTime=At)}else if(Y){const mt=e.findItemIndex(Y);if(_e>mt){const Mn=e.schedule.findJumpRestrictedIndex(mt+1,_e);if(Mn>mt){e.setSchedulePosition(Mn);return}}let En=0;if(Ht)e.timelinePos=At,e.checkBuffer();else{var ct;const Mn=Me==null||(ct=Me.event)==null?void 0:ct.assetList;if(Mn){const Lr=p-(Me[b]||Me).start;for(let vr=Mn.length;vr--;){const cr=Mn[vr];if(cr.duration&&Lr>=cr.startOffset&&Lr<cr.startOffset+cr.duration){En=vr;break}}}}e.setSchedulePosition(_e,En)}}},u=()=>{const p=e.effectivePlayingItem;if(e.isInterstitial(p))return p;const b=t();return e.isInterstitial(b)?b:null},d={get currentTime(){const p=u(),b=e.effectivePlayingItem;return b&&b===p?r(b,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-b.playout.start:0},set currentTime(p){const b=u(),w=e.effectivePlayingItem;w&&w===b&&c(p+w.playout.start,"playout")},get duration(){const p=u();return p?p.playout.end-p.playout.start:0},get assetPlayers(){var p;const b=(p=u())==null?void 0:p.event.assetList;return b?b.map(w=>e.getAssetPlayer(w.identifier)):[]},get playingIndex(){var p;const b=(p=u())==null?void 0:p.event;return b&&e.effectivePlayingAsset?b.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return u()}};this.manager={get events(){var p,b;return((p=e.schedule)==null||(b=p.events)==null?void 0:b.slice(0))||[]},get schedule(){var p,b;return((p=e.schedule)==null||(b=p.items)==null?void 0:b.slice(0))||[]},get interstitialPlayer(){return u()?d:null},get playerQueue(){return e.playerQueue.slice(0)},get bufferingAsset(){return e.bufferingAsset},get bufferingItem(){return t()},get bufferingIndex(){const p=t();return e.findItemIndex(p)},get playingAsset(){return e.effectivePlayingAsset},get playingItem(){return e.effectivePlayingItem},get playingIndex(){const p=e.effectivePlayingItem;return e.findItemIndex(p)},primary:{get bufferedEnd(){return s()},get currentTime(){const p=e.timelinePos;return p>0?p:0},set currentTime(p){c(p,"primary")},get duration(){return l("primary")},get seekableStart(){var p;return((p=e.primaryDetails)==null?void 0:p.fragmentStart)||0}},integrated:{get bufferedEnd(){return r(t(),"integrated",e.bufferingAsset,"bufferedPos","bufferedEnd")},get currentTime(){return r(e.effectivePlayingItem,"integrated",e.effectivePlayingAsset,"timelinePos","currentTime")},set currentTime(p){c(p,"integrated")},get duration(){return l("integrated")},get seekableStart(){var p;return i(((p=e.primaryDetails)==null?void 0:p.fragmentStart)||0,"integrated")}},skip:()=>{const p=e.effectivePlayingItem,b=p==null?void 0:p.event;if(b&&!b.restrictions.skip){const w=e.findItemIndex(p);if(b.appendInPlace){const D=p.playout.start+p.event.duration;c(D+.001,"playout")}else e.advanceAfterAssetEnded(b,w,1/0)}}}}return this.manager}get effectivePlayingItem(){return this.waitingItem||this.playingItem||this.endedItem}get effectivePlayingAsset(){return this.playingAsset||this.endedAsset}get playingLastItem(){var e;const t=this.playingItem,n=(e=this.schedule)==null?void 0:e.items;return!this.playbackStarted||!t||!n?!1:this.findItemIndex(t)===n.length-1}get playbackStarted(){return this.effectivePlayingItem!==null}get currentTime(){var e,t,n;if(this.mediaSelection===null)return;const r=this.waitingItem||this.playingItem;if(this.isInterstitial(r)&&!r.event.appendInPlace)return;let i=this.media;!i&&(e=this.bufferingItem)!=null&&(t=e.event)!=null&&t.appendInPlace&&(i=this.primaryMedia);const s=(n=i)==null?void 0:n.currentTime;if(!(s===void 0||!x(s)))return s}get primaryMedia(){var e;return this.media||((e=this.detachedData)==null?void 0:e.media)||null}isInterstitial(e){return!!(e!=null&&e.event)}retreiveMediaSource(e,t){const n=this.getAssetPlayer(e);n&&this.transferMediaFromPlayer(n,t)}transferMediaFromPlayer(e,t){const n=e.interstitial.appendInPlace,r=e.media;if(n&&r===this.primaryMedia){if(this.bufferingAsset=null,(!t||this.isInterstitial(t)&&!t.event.appendInPlace)&&t&&r){this.detachedData={media:r};return}const i=e.transferMedia();this.log(`transfer MediaSource from ${e} ${Et(i)}`),this.detachedData=i}else t&&r&&(this.shouldPlay||(this.shouldPlay=!r.paused))}transferMediaTo(e,t){var n,r;if(e.media===t)return;let i=null;const s=this.hls,l=e!==s,c=l&&e.interstitial.appendInPlace,u=(n=this.detachedData)==null?void 0:n.mediaSource;let d;if(s.media)c&&(i=s.transferMedia(),this.detachedData=i),d="Primary";else if(u){const w=this.getBufferingPlayer();w?(i=w.transferMedia(),d=`${w}`):d="detached MediaSource"}else d="detached media";if(!i){if(u)i=this.detachedData,this.log(`using detachedData: MediaSource ${Et(i)}`);else if(!this.detachedData||s.media===t){const w=this.playerQueue;w.length>1&&w.forEach(D=>{if(l&&D.interstitial.appendInPlace!==c){const X=D.interstitial;this.clearInterstitial(D.interstitial,null),X.appendInPlace=!1,X.appendInPlace&&this.warn(`Could not change append strategy for queued assets ${X}`)}}),this.hls.detachMedia(),this.detachedData={media:t}}}const p=i&&"mediaSource"in i&&((r=i.mediaSource)==null?void 0:r.readyState)!=="closed",b=p&&i?i:t;if(this.log(`${p?"transfering MediaSource":"attaching media"} to ${l?e:"Primary"} from ${d}`),b===i){const w=l&&e.assetId===this.schedule.assetIdAtEnd;b.overrides={duration:this.schedule.duration,endOfStream:!l||w,cueRemoval:!l}}e.attachMedia(b)}onInterstitialCueEnter(){this.onTimeupdate()}checkStart(){const e=this.schedule,t=e.events;if(!t||this.playbackDisabled||!this.media)return;this.bufferedPos===-1&&(this.bufferedPos=0);const n=this.timelinePos,r=this.effectivePlayingItem;if(n===-1){const i=this.hls.startPosition;if(this.timelinePos=i,t.length&&t[0].cue.pre){const s=e.findEventIndex(t[0].identifier);this.setSchedulePosition(s)}else if(i>=0||!this.primaryLive){const s=this.timelinePos=i>0?i:0,l=e.findItemIndexAtTime(s);this.setSchedulePosition(l)}}else if(r&&!this.playingItem){const i=e.findItemIndex(r);this.setSchedulePosition(i)}}advanceAfterAssetEnded(e,t,n){const r=n+1;if(!e.isAssetPastPlayoutLimit(r)&&!e.assetList[r].error)this.setSchedulePosition(t,r);else{const i=this.schedule.items;if(i){const s=t+1,l=i.length;if(s>=l){this.setSchedulePosition(-1);return}const c=e.resumeTime;this.timelinePos<c&&(this.timelinePos=c,this.checkBuffer()),this.setSchedulePosition(s)}}}setScheduleToAssetAtTime(e,t){const n=this.schedule,r=t.parentIdentifier,i=n.getEvent(r);if(i){const s=n.findEventIndex(r),l=n.findAssetIndex(i,e);this.setSchedulePosition(s,l)}}setSchedulePosition(e,t){const n=this.schedule.items;if(!n||this.playbackDisabled)return;this.log(`setSchedulePosition ${e}, ${t}`);const r=e>=0?n[e]:null,i=this.playingItem,s=this.playingLastItem;if(this.isInterstitial(i)){var l;const u=i.event,d=this.playingAsset,p=d==null?void 0:d.identifier,b=p?this.getAssetPlayer(p):null;if(b&&p&&(!this.eventItemsMatch(i,r)||t!==void 0&&p!==((l=u.assetList)==null?void 0:l[t].identifier))){var c;const w=u.findAssetIndex(d);this.log(`INTERSTITIAL_ASSET_ENDED ${w+1}/${u.assetList.length} ${Oa(d)}`),this.endedAsset=d,this.playingAsset=null,this.hls.trigger(f.INTERSTITIAL_ASSET_ENDED,{asset:d,assetListIndex:w,event:u,schedule:n.slice(0),scheduleIndex:e,player:b}),this.retreiveMediaSource(p,r),b.media&&!((c=this.detachedData)!=null&&c.mediaSource)&&b.detachMedia()}if(!this.eventItemsMatch(i,r)&&(this.endedItem=i,this.playingItem=null,this.log(`INTERSTITIAL_ENDED ${u} ${hs(i)}`),u.hasPlayed=!0,this.hls.trigger(f.INTERSTITIAL_ENDED,{event:u,schedule:n.slice(0),scheduleIndex:e}),u.cue.once)){this.updateSchedule();const w=this.schedule.items;if(r&&w){const D=this.schedule.findItemIndex(r);this.advanceSchedule(D,w,t,i,s)}return}}this.advanceSchedule(e,n,t,i,s)}advanceSchedule(e,t,n,r,i){const s=e>=0?t[e]:null,l=this.primaryMedia,c=this.playerQueue;if(c.length&&c.forEach(u=>{const d=u.interstitial,p=this.schedule.findEventIndex(d.identifier);(p<e||p>e+1)&&this.clearInterstitial(d,s)}),this.isInterstitial(s)){this.timelinePos=Math.min(Math.max(this.timelinePos,s.start),s.end);const u=s.event;n===void 0&&(n=this.schedule.findAssetIndex(u,this.timelinePos));const d=this.waitingItem;this.assetsBuffered(s,l)||this.setBufferingItem(s);let p=this.preloadAssets(u,n);if(this.eventItemsMatch(s,d||r)||(this.waitingItem=s,this.log(`INTERSTITIAL_STARTED ${hs(s)} ${u.appendInPlace?"append in place":""}`),this.hls.trigger(f.INTERSTITIAL_STARTED,{event:u,schedule:t.slice(0),scheduleIndex:e})),!u.assetListLoaded){this.log(`Waiting for ASSET-LIST to complete loading ${u}`);return}if(u.assetListLoader&&(u.assetListLoader.destroy(),u.assetListLoader=void 0),!l){this.log(`Waiting for attachMedia to start Interstitial ${u}`);return}this.waitingItem=this.endedItem=null,this.playingItem=s;const b=u.assetList[n];if(!b){const w=t[e+1],D=this.media;w&&D&&!this.isInterstitial(w)&&D.currentTime<w.start&&(D.currentTime=this.timelinePos=w.start),this.advanceAfterAssetEnded(u,e,n||0);return}if(p||(p=this.getAssetPlayer(b.identifier)),p===null||p.destroyed){const w=u.assetList.length;this.warn(`asset ${n+1}/${w} player destroyed ${u}`),p=this.createAssetPlayer(u,b,n)}if(!this.eventItemsMatch(s,this.bufferingItem)&&u.appendInPlace&&this.isAssetBuffered(b))return;this.startAssetPlayer(p,n,t,e,l),this.shouldPlay&&Oo(p.media)}else s!==null?(this.resumePrimary(s,e,r),this.shouldPlay&&Oo(this.hls.media)):i&&this.isInterstitial(r)&&(this.endedItem=null,this.playingItem=r,r.event.appendInPlace||this.attachPrimary(this.schedule.durations.primary,null))}get playbackDisabled(){return this.hls.config.enableInterstitialPlayback===!1}get primaryDetails(){var e,t;return(e=this.mediaSelection)==null||(t=e.main)==null?void 0:t.details}get primaryLive(){var e;return!!((e=this.primaryDetails)!=null&&e.live)}resumePrimary(e,t,n){var r;if(this.playingItem=e,this.playingAsset=this.endedAsset=null,this.waitingItem=this.endedItem=null,this.bufferedToItem(e),this.log(`resuming ${hs(e)}`),!((r=this.detachedData)!=null&&r.mediaSource)){let s=this.timelinePos;(s<e.start||s>=e.end)&&(s=this.getPrimaryResumption(e,t),this.timelinePos=s),this.attachPrimary(s,e)}if(!n)return;const i=this.schedule.items;i&&(this.log(`resumed ${hs(e)}`),this.hls.trigger(f.INTERSTITIALS_PRIMARY_RESUMED,{schedule:i.slice(0),scheduleIndex:t}),this.checkBuffer())}getPrimaryResumption(e,t){const n=e.start;if(this.primaryLive){const r=this.primaryDetails;if(t===0)return this.hls.startPosition;if(r&&(n<r.fragmentStart||n>r.edge))return this.hls.liveSyncPosition||-1}return n}isAssetBuffered(e){const t=this.getAssetPlayer(e.identifier);return t!=null&&t.hls?t.hls.bufferedToEnd:hn.bufferInfo(this.primaryMedia,this.timelinePos,0).end+1>=e.timelineStart+(e.duration||0)}attachPrimary(e,t,n){t?this.setBufferingItem(t):this.bufferingItem=this.playingItem,this.bufferingAsset=null;const r=this.primaryMedia;if(!r)return;const i=this.hls;i.media?this.checkBuffer():(this.transferMediaTo(i,r),n&&this.startLoadingPrimaryAt(e,n)),n||(this.timelinePos=e,this.startLoadingPrimaryAt(e,n))}startLoadingPrimaryAt(e,t){var n;const r=this.hls;!r.loadingEnabled||!r.media||Math.abs((((n=r.mainForwardBufferInfo)==null?void 0:n.start)||r.media.currentTime)-e)>.5?r.startLoad(e,t):r.bufferingEnabled||r.resumeBuffering()}onManifestLoading(){this.stopLoad(),this.schedule.reset(),this.emptyPlayerQueue(),this.clearScheduleState(),this.shouldPlay=!1,this.bufferedPos=this.timelinePos=-1,this.mediaSelection=this.altSelection=this.manager=this.requiredTracks=null,this.hls.off(f.BUFFER_CODECS,this.onBufferCodecs,this),this.hls.on(f.BUFFER_CODECS,this.onBufferCodecs,this)}onLevelUpdated(e,t){if(t.level===-1)return;const n=this.hls.levels[t.level],r=_(_({},this.mediaSelection||this.altSelection),{},{main:n});this.mediaSelection=r,this.schedule.parseInterstitialDateRanges(r,this.hls.config.interstitialAppendInPlace),!this.effectivePlayingItem&&this.schedule.items&&this.checkStart()}onAudioTrackUpdated(e,t){const n=this.hls.audioTracks[t.id],r=this.mediaSelection;if(!r){this.altSelection=_(_({},this.altSelection),{},{audio:n});return}const i=_(_({},r),{},{audio:n});this.mediaSelection=i}onSubtitleTrackUpdated(e,t){const n=this.hls.subtitleTracks[t.id],r=this.mediaSelection;if(!r){this.altSelection=_(_({},this.altSelection),{},{subtitles:n});return}const i=_(_({},r),{},{subtitles:n});this.mediaSelection=i}onAudioTrackSwitching(e,t){const n=De(t);this.playerQueue.forEach(r=>r.hls.setAudioOption(t)||r.hls.setAudioOption(n))}onSubtitleTrackSwitch(e,t){const n=De(t);this.playerQueue.forEach(r=>r.hls.setSubtitleOption(t)||t.id!==-1&&r.hls.setSubtitleOption(n))}onBufferCodecs(e,t){const n=t.tracks;n&&(this.requiredTracks=n)}onBufferAppended(e,t){this.checkBuffer()}onBufferFlushed(e,t){const n=this.playingItem;if(n&&!this.itemsMatch(n,this.bufferingItem)&&!this.isInterstitial(n)){const r=this.timelinePos;this.bufferedPos=r,this.checkBuffer()}}onBufferedToEnd(e){const t=this.schedule.events;if(this.bufferedPos<Number.MAX_VALUE&&t){for(let r=0;r<t.length;r++){const i=t[r];if(i.cue.post){var n;const s=this.schedule.findEventIndex(i.identifier),l=(n=this.schedule.items)==null?void 0:n[s];this.isInterstitial(l)&&this.eventItemsMatch(l,this.bufferingItem)&&this.bufferedToItem(l,0);break}}this.bufferedPos=Number.MAX_VALUE}}onMediaEnded(e){const t=this.playingItem;if(!this.playingLastItem&&t){const n=this.findItemIndex(t);this.setSchedulePosition(n+1)}else this.shouldPlay=!1}updateItem(e,t){const n=this.schedule.items;if(e&&n){const r=this.findItemIndex(e,t);return n[r]||null}return null}itemsMatch(e,t){return!!t&&(e===t||e.event&&t.event&&this.eventItemsMatch(e,t)||!e.event&&!t.event&&this.findItemIndex(e)===this.findItemIndex(t))}eventItemsMatch(e,t){var n;return!!t&&(e===t||e.event.identifier===((n=t.event)==null?void 0:n.identifier))}findItemIndex(e,t){return e?this.schedule.findItemIndex(e,t):-1}updateSchedule(){const e=this.mediaSelection;e&&this.schedule.updateSchedule(e,[])}checkBuffer(e){const t=this.schedule.items;if(!t)return;const n=hn.bufferInfo(this.primaryMedia,this.timelinePos,0);e&&(this.bufferedPos=this.timelinePos),e||(e=n.len<1),this.updateBufferedPos(n.end,t,e)}updateBufferedPos(e,t,n){const r=this.schedule,i=this.bufferingItem;if(this.bufferedPos>e)return;if(t.length===1&&this.itemsMatch(t[0],i)){this.bufferedPos=e;return}const s=this.playingItem,l=this.findItemIndex(s);let c=r.findItemIndexAtTime(e);if(this.bufferedPos<e){var u,d;const p=this.findItemIndex(i),b=Math.min(p+1,t.length-1),w=t[b];if((c===-1&&i&&e>=i.end||(u=w.event)!=null&&u.appendInPlace&&e+.01>=w.start)&&(c=b),b-l>1&&(i==null||(d=i.event)==null?void 0:d.appendInPlace)===!1)return;if(this.bufferedPos=e,c>p&&c>l)this.bufferedToItem(w);else{const D=this.primaryDetails;this.primaryLive&&D&&e>D.edge-D.targetduration&&w.start<D.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(w)&&this.preloadAssets(w.event,0)}}else n&&s&&!this.itemsMatch(s,i)&&(c===l?this.bufferedToItem(s):c===l+1&&this.bufferedToItem(t[c]))}assetsBuffered(e,t){return e.event.assetList.length===0?!1:!e.event.assetList.some(r=>{const i=this.getAssetPlayer(r.identifier);return!(i!=null&&i.bufferedInPlaceToEnd(t))})}setBufferingItem(e){const t=this.bufferingItem,n=this.schedule;if(this.itemsMatch(e,t))this.bufferingItem!==e&&(this.bufferingItem=e);else{const{items:r,events:i}=n;if(!r||!i)return t;const s=this.isInterstitial(e),l=this.getBufferingPlayer();if(this.bufferingItem=e,this.bufferedPos=Math.max(e.start,Math.min(e.end,this.timelinePos)),!this.playbackDisabled){const c=l?l.remaining:t?t.end-this.timelinePos:0;this.log(`buffered to boundary ${hs(e)}`+(t?` (${c.toFixed(2)} remaining)`:"")),s?e.event.assetList.forEach(u=>{const d=this.getAssetPlayer(u.identifier);d&&d.resumeBuffering()}):(this.hls.resumeBuffering(),this.playerQueue.forEach(u=>u.pauseBuffering()))}this.hls.trigger(f.INTERSTITIALS_BUFFERED_TO_BOUNDARY,{events:i.slice(0),schedule:r.slice(0),bufferingIndex:this.findItemIndex(e),playingIndex:this.findItemIndex(this.playingItem)})}return t}bufferedToItem(e,t=0){const n=this.setBufferingItem(e);if(!this.playbackDisabled){if(this.isInterstitial(e))this.bufferedToEvent(e,t);else if(n!==null){this.bufferingAsset=null;const r=this.detachedData;r?r.mediaSource?this.attachPrimary(e.start,e,!0):this.preloadPrimary(e):this.preloadPrimary(e)}}}preloadPrimary(e){const t=this.findItemIndex(e),n=this.getPrimaryResumption(e,t);this.startLoadingPrimaryAt(n)}bufferedToEvent(e,t){const n=e.event,r=n.assetList.length===0&&!n.assetListLoader,i=n.cue.once;if(r||!i){const s=this.preloadAssets(n,t);if(s!=null&&s.interstitial.appendInPlace){const l=n.assetList[t],c=this.primaryMedia;l&&c&&this.bufferAssetPlayer(s,c)}}}preloadAssets(e,t){const n=e.assetUrl,r=e.assetList.length,i=r===0&&!e.assetListLoader,s=e.cue.once;if(i){const c=e.timelineStart;if(e.appendInPlace){var l;const b=this.playingItem;!this.isInterstitial(b)&&(b==null||(l=b.nextEvent)==null?void 0:l.identifier)===e.identifier&&this.flushFrontBuffer(c+.25)}let u,d=0;if(!this.playingItem&&this.primaryLive&&(d=this.hls.startPosition,d===-1&&(d=this.hls.liveSyncPosition||0)),d&&!(e.cue.pre||e.cue.post)){const b=d-c;b>0&&(u=Math.round(b*1e3)/1e3)}if(this.log(`Load interstitial asset ${t+1}/${n?1:r} ${e}${u?` live-start: ${d} start-offset: ${u}`:""}`),n)return this.createAsset(e,0,0,c,e.duration,n);const p=this.assetListLoader.loadAssetList(e,u);p&&(e.assetListLoader=p)}else if(!s&&r){for(let c=t;c<r;c++){const u=e.assetList[c],d=this.getAssetPlayerQueueIndex(u.identifier);(d===-1||this.playerQueue[d].destroyed)&&!u.error&&this.createAssetPlayer(e,u,c)}return this.getAssetPlayer(e.assetList[t].identifier)}return null}flushFrontBuffer(e){const t=this.requiredTracks;if(!t)return;this.log(`Removing front buffer starting at ${e}`),Object.keys(t).forEach(r=>{this.hls.trigger(f.BUFFER_FLUSHING,{startOffset:e,endOffset:1/0,type:r})})}getAssetPlayerQueueIndex(e){const t=this.playerQueue;for(let n=0;n<t.length;n++)if(e===t[n].assetId)return n;return-1}getAssetPlayer(e){const t=this.getAssetPlayerQueueIndex(e);return this.playerQueue[t]||null}getBufferingPlayer(){const{playerQueue:e,primaryMedia:t}=this;if(t){for(let n=0;n<e.length;n++)if(e[n].media===t)return e[n]}return null}createAsset(e,t,n,r,i,s){const l={parentIdentifier:e.identifier,identifier:Hu(e,s,t),duration:i,startOffset:n,timelineStart:r,uri:s};return this.createAssetPlayer(e,l,t)}createAssetPlayer(e,t,n){this.log(`create HLSAssetPlayer for ${Oa(t)}`);const r=this.hls,i=r.userConfig;let s=i.videoPreference;const l=r.loadLevelObj||r.levels[r.currentLevel];(s||l)&&(s=h({},s),l.videoCodec&&(s.videoCodec=l.videoCodec),l.videoRange&&(s.allowedVideoRanges=[l.videoRange]));const c=r.audioTracks[r.audioTrack],u=r.subtitleTracks[r.subtitleTrack];let d=0;if(this.primaryLive||e.appendInPlace){const Ie=this.timelinePos-t.timelineStart;if(Ie>1){const st=t.duration;st&&Ie<st&&(d=Ie)}}const p=t.identifier,b=_(_({},i),{},{autoStartLoad:!0,startFragPrefetch:!0,primarySessionId:r.sessionId,assetPlayerId:p,abrEwmaDefaultEstimate:r.bandwidthEstimate,interstitialsController:void 0,startPosition:d,liveDurationInfinity:!1,testBandwidth:!1,videoPreference:s,audioPreference:c||i.audioPreference,subtitlePreference:u||i.subtitlePreference});e.appendInPlace&&(e.appendInPlaceStarted=!0,t.timelineStart&&(b.timelineOffset=t.timelineStart));const w=b.cmcd;w!=null&&w.sessionId&&w.contentId&&(b.cmcd=h({},w,{contentId:Gs(t.uri)})),this.getAssetPlayer(p)&&this.warn(`Duplicate date range identifier ${e} and asset ${p}`);const D=new Vu(this.HlsPlayerClass,b,e,t);this.playerQueue.push(D),e.assetList[n]=t;const X=Ie=>{if(Ie.live){const Mt=new Error(`Interstitials MUST be VOD assets ${e}`),ct={fatal:!0,type:fe.OTHER_ERROR,details:F.INTERSTITIAL_ASSET_ITEM_ERROR,error:Mt};this.handleAssetItemError(ct,e,this.schedule.findEventIndex(e.identifier),n,Mt.message);return}const st=Ie.edge-Ie.fragmentStart,ut=t.duration;(ut===null||st>ut)&&(this.log(`Interstitial asset "${p}" duration change ${ut} > ${st}`),t.duration=st,this.updateSchedule())};D.on(f.LEVEL_UPDATED,(Ie,{details:st})=>X(st)),D.on(f.LEVEL_PTS_UPDATED,(Ie,{details:st})=>X(st));const Y=(Ie,st)=>{const ut=this.getAssetPlayer(p);if(ut&&st.tracks){ut.off(f.BUFFER_CODECS,Y),ut.tracks=st.tracks;const Mt=this.primaryMedia;this.bufferingAsset===ut.assetItem&&Mt&&!ut.media&&this.bufferAssetPlayer(ut,Mt)}};D.on(f.BUFFER_CODECS,Y);const _e=()=>{var Ie;const st=this.getAssetPlayer(p);if(this.log(`buffered to end of asset ${st}`),!st)return;const ut=this.schedule.findEventIndex(e.identifier),Mt=e.findAssetIndex(t),ct=Mt+1,At=(Ie=this.schedule.items)==null?void 0:Ie[ut];if(this.isInterstitial(At))if(Mt!==-1&&!e.isAssetPastPlayoutLimit(ct)&&!e.assetList[ct].error)this.bufferedToItem(At,ct);else{var Ht;const mt=(Ht=this.schedule.items)==null?void 0:Ht[ut+1];mt&&this.bufferedToItem(mt)}};D.on(f.BUFFERED_TO_END,_e);const Me=Ie=>()=>{if(!this.getAssetPlayer(p))return;this.shouldPlay=!0;const ut=this.schedule.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,ut,Ie)};return D.once(f.MEDIA_ENDED,Me(n)),D.once(f.PLAYOUT_LIMIT_REACHED,Me(1/0)),D.on(f.ERROR,(Ie,st)=>{const ut=this.getAssetPlayer(p);if(st.details===F.BUFFER_STALLED_ERROR){if(ut!=null&&ut.media){const Mt=ut.currentTime,ct=ut.duration-Mt;Mt&&e.appendInPlace&&ct/ut.media.playbackRate<.5?(this.log(`Advancing buffer past end of asset ${p} ${e} at ${ut.media.currentTime}`),_e()):(this.warn(`Stalled at ${Mt} of ${Mt+ct} in asset ${p} ${e}`),this.onTimeupdate(),this.checkBuffer(!0))}return}this.handleAssetItemError(st,e,this.schedule.findEventIndex(e.identifier),n,`Asset player error ${st.error} ${e}`)}),D.on(f.DESTROYING,()=>{if(!this.getAssetPlayer(p))return;const st=new Error(`Asset player destroyed unexpectedly ${p}`),ut={fatal:!0,type:fe.OTHER_ERROR,details:F.INTERSTITIAL_ASSET_ITEM_ERROR,error:st};this.handleAssetItemError(ut,e,this.schedule.findEventIndex(e.identifier),n,st.message)}),this.hls.trigger(f.INTERSTITIAL_ASSET_PLAYER_CREATED,{asset:t,assetListIndex:n,event:e,player:D}),D}clearInterstitial(e,t){e.assetList.forEach(n=>{this.clearAssetPlayer(n.identifier,t)}),e.reset()}clearAssetPlayer(e,t){const n=this.getAssetPlayerQueueIndex(e);if(n!==-1){this.log(`clearAssetPlayer "${e}" toSegment: ${t&&hs(t)}`);const r=this.playerQueue[n];this.transferMediaFromPlayer(r,t),this.playerQueue.splice(n,1),r.destroy()}}emptyPlayerQueue(){let e;for(;e=this.playerQueue.pop();)e.destroy();this.playerQueue=[]}startAssetPlayer(e,t,n,r,i){const{interstitial:s,assetItem:l,assetId:c}=e,u=s.assetList.length,d=this.playingAsset;this.endedAsset=null,this.playingAsset=l,(!d||d.identifier!==c)&&(d&&(this.clearAssetPlayer(d.identifier,n[r]),delete d.error),this.log(`INTERSTITIAL_ASSET_STARTED ${t+1}/${u} ${e}`),this.hls.trigger(f.INTERSTITIAL_ASSET_STARTED,{asset:l,assetListIndex:t,event:s,schedule:n.slice(0),scheduleIndex:r,player:e})),this.bufferAssetPlayer(e,i)}bufferAssetPlayer(e,t){var n,r;const{interstitial:i,assetItem:s,assetId:l}=e,c=this.schedule.findEventIndex(i.identifier),u=(n=this.schedule.items)==null?void 0:n[c];if(!u)return;this.setBufferingItem(u),this.bufferingAsset=s;const d=this.getBufferingPlayer();if(d===e)return;const p=i.appendInPlace;if(p&&(d==null?void 0:d.interstitial.appendInPlace)===!1)return;const b=(d==null?void 0:d.tracks)||((r=this.detachedData)==null?void 0:r.tracks)||this.requiredTracks;if(p&&s!==this.playingAsset){if(!e.tracks)return;if(b&&!le(b,e.tracks)){const w=new Error(`Asset "${l}" SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(b)}')`),D={fatal:!0,type:fe.OTHER_ERROR,details:F.INTERSTITIAL_ASSET_ITEM_ERROR,error:w},X=i.findAssetIndex(s);this.handleAssetItemError(D,i,c,X,w.message);return}}this.transferMediaTo(e,t)}handleAssetItemError(e,t,n,r,i){if(e.details===F.BUFFER_STALLED_ERROR)return;const s=t.assetList[r]||null;let l=null;if(s){const p=this.getAssetPlayerQueueIndex(s.identifier);l=this.playerQueue[p]||null}const c=this.schedule.items,u=h({},e,{fatal:!1,errorAction:Ke(!0),asset:s,assetListIndex:r,event:t,schedule:c,scheduleIndex:n,player:l});if(this.warn(`Asset item error: ${e.error}`),this.hls.trigger(f.INTERSTITIAL_ASSET_ERROR,u),!e.fatal)return;const d=new Error(i);s&&(this.playingAsset!==s&&this.clearAssetPlayer(s.identifier,null),s.error=d),t.assetList.some(p=>!p.error)?t.appendInPlace&&(t.error=d):t.error=d,this.primaryFallback(t)}primaryFallback(e){const t=e.timelineStart,n=this.effectivePlayingItem;if(this.updateSchedule(),n){this.log(`Fallback to primary from event "${e.identifier}" start: ${t} pos: ${this.timelinePos} playing: ${n?hs(n):"<none>"} error: ${e.error}`),e.appendInPlace&&(this.attachPrimary(t,null),this.flushFrontBuffer(t));let r=this.timelinePos;r===-1&&(r=this.hls.startPosition);const i=this.updateItem(n,r);if(this.itemsMatch(n,i))this.clearInterstitial(e,null);else{const s=this.schedule.findItemIndexAtTime(r);this.setSchedulePosition(s)}}else this.checkStart()}onAssetListLoaded(e,t){var n;const r=t.event,i=r.identifier,s=t.assetListResponse.ASSETS;if(!this.schedule.hasEvent(i))return;const l=r.timelineStart,c=r.duration;let u=0;s.forEach((D,X)=>{const Y=parseFloat(D.DURATION);this.createAsset(r,X,u,l+u,Y,D.URI),u+=Y}),r.duration=u,this.log(`Loaded asset-list with duration: ${u} (was: ${c}) ${r}`);const d=this.waitingItem,p=(d==null?void 0:d.event.identifier)===i;this.updateSchedule();const b=(n=this.bufferingItem)==null?void 0:n.event;if(p){var w;const D=this.schedule.findEventIndex(i),X=(w=this.schedule.items)==null?void 0:w[D];if(X){if(!this.playingItem&&this.timelinePos>X.end&&this.schedule.findItemIndexAtTime(this.timelinePos)!==D){r.error=new Error(`Interstitial no longer within playback range ${this.timelinePos} ${r}`),this.primaryFallback(r);return}this.setBufferingItem(X)}this.setSchedulePosition(D)}else if((b==null?void 0:b.identifier)===i&&b.appendInPlace){const D=r.assetList[0],X=this.getAssetPlayer(D.identifier),Y=this.primaryMedia;D&&X&&Y&&this.bufferAssetPlayer(X,Y)}}onError(e,t){switch(t.details){case F.ASSET_LIST_PARSING_ERROR:case F.ASSET_LIST_LOAD_ERROR:case F.ASSET_LIST_LOAD_TIMEOUT:{const n=t.interstitial;n&&this.primaryFallback(n);break}case F.BUFFER_STALLED_ERROR:{this.onTimeupdate(),this.checkBuffer(!0);break}}}}const Fo=500;class Xu extends ni{constructor(e,t,n){super(e,t,n,"subtitle-stream-controller",te.SUBTITLE),this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(f.LEVEL_LOADED,this.onLevelLoaded,this),e.on(f.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(f.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(f.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(f.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(f.BUFFER_FLUSHING,this.onBufferFlushing,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(f.LEVEL_LOADED,this.onLevelLoaded,this),e.off(f.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(f.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(f.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(f.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(f.BUFFER_FLUSHING,this.onBufferFlushing,this)}startLoad(e,t){this.stopLoad(),this.state=Kt.IDLE,this.setInterval(Fo),this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}onManifestLoading(){super.onManifestLoading(),this.mainDetails=null}onMediaDetaching(e,t){this.tracksBuffered=[],super.onMediaDetaching(e,t)}onLevelLoaded(e,t){this.mainDetails=t.details}onSubtitleFragProcessed(e,t){const{frag:n,success:r}=t;if(se(n)&&(this.fragPrevious=n),this.state=Kt.IDLE,!r)return;const i=this.tracksBuffered[this.currentTrackId];if(!i)return;let s;const l=n.start;for(let u=0;u<i.length;u++)if(l>=i[u].start&&l<=i[u].end){s=i[u];break}const c=n.start+n.duration;s?s.end=c:(s={start:l,end:c},i.push(s)),this.fragmentTracker.fragBuffered(n),this.fragBufferedComplete(n,null),this.media&&this.tick()}onBufferFlushing(e,t){const{startOffset:n,endOffset:r}=t;if(n===0&&r!==Number.POSITIVE_INFINITY){const i=r-1;if(i<=0)return;t.endOffsetSubtitles=Math.max(0,i),this.tracksBuffered.forEach(s=>{for(let l=0;l<s.length;){if(s[l].end<=i){s.shift();continue}else if(s[l].start<i)s[l].start=i;else break;l++}}),this.fragmentTracker.removeFragmentsInRange(n,i,te.SUBTITLE)}}onError(e,t){const n=t.frag;(n==null?void 0:n.type)===te.SUBTITLE&&(t.details===F.FRAG_GAP&&this.fragmentTracker.fragBuffered(n,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==Kt.STOPPED&&(this.state=Kt.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&vo(this.levels,t)){this.levels=t.map(n=>new St(n));return}this.tracksBuffered=[],this.levels=t.map(n=>{const r=new St(n);return this.tracksBuffered[r.id]=[],r}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,te.SUBTITLE),this.fragPrevious=null,this.mediaBuffer=null}onSubtitleTrackSwitch(e,t){var n;if(this.currentTrackId=t.id,!((n=this.levels)!=null&&n.length)||this.currentTrackId===-1){this.clearInterval();return}const r=this.levels[this.currentTrackId];r!=null&&r.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,r&&this.state!==Kt.STOPPED&&this.setInterval(Fo)}onSubtitleTrackLoaded(e,t){var n;const{currentTrackId:r,levels:i}=this,{details:s,id:l}=t;if(!i){this.warn(`Subtitle tracks were reset while loading level ${l}`);return}const c=i[l];if(l>=i.length||!c)return;this.log(`Subtitle track ${l} loaded [${s.startSN},${s.endSN}]${s.lastPartSn?`[part-${s.lastPartSn}-${s.lastPartIndex}]`:""},duration:${s.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let u=0;if(s.live||(n=c.details)!=null&&n.live){const p=this.mainDetails;if(s.deltaUpdateFailed||!p)return;const b=p.fragments[0];if(!c.details)s.hasProgramDateTime&&p.hasProgramDateTime?(Or(s,p),u=s.fragmentStart):b&&(u=b.start,Wr(s,u));else{var d;u=this.alignPlaylists(s,c.details,(d=this.levelLastLoaded)==null?void 0:d.details),u===0&&b&&(u=b.start,Wr(s,u))}}c.details=s,this.levelLastLoaded=c,l===r&&(this.hls.trigger(f.SUBTITLE_TRACK_UPDATED,{details:s,id:l,groupId:t.groupId}),this.tick(),s.live&&!this.fragCurrent&&this.media&&this.state===Kt.IDLE&&(Cn(null,s.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),c.details=void 0)))}_handleFragmentLoadComplete(e){const{frag:t,payload:n}=e,r=t.decryptdata,i=this.hls;if(!this.fragContextChanged(t)&&n&&n.byteLength>0&&r!=null&&r.key&&r.iv&&Zr(r.method)){const s=performance.now();this.decrypter.decrypt(new Uint8Array(n),r.key.buffer,r.iv.buffer,Br(r.method)).catch(l=>{throw i.trigger(f.ERROR,{type:fe.MEDIA_ERROR,details:F.FRAG_DECRYPT_ERROR,fatal:!1,error:l,reason:l.message,frag:t}),l}).then(l=>{const c=performance.now();i.trigger(f.FRAG_DECRYPTED,{frag:t,payload:l,stats:{tstart:s,tdecrypt:c}})}).catch(l=>{this.warn(`${l.name}: ${l.message}`),this.state=Kt.IDLE})}}doTick(){if(!this.media){this.state=Kt.IDLE;return}if(this.state===Kt.IDLE){const{currentTrackId:e,levels:t}=this,n=t==null?void 0:t[e];if(!n||!t.length||!n.details||this.waitForLive(n))return;const{config:r}=this,i=this.getLoadPosition(),s=hn.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],i,r.maxBufferHole),{end:l,len:c}=s,u=n.details,d=this.hls.maxBufferLength+u.levelTargetDuration;if(c>d)return;const p=u.fragments,b=p.length,w=u.edge;let D=null;const X=this.fragPrevious;if(l<w){const Me=r.maxFragLookUpTolerance,Ie=l>w-Me?0:Me;D=Cn(X,p,Math.max(p[0].start,l),Ie),!D&&X&&X.start<p[0].start&&(D=p[0])}else D=p[b-1];if(D=this.filterReplacedPrimary(D,n.details),!D)return;const Y=D.sn-u.startSN,_e=p[Y-1];if(_e&&_e.cc===D.cc&&this.fragmentTracker.getState(_e)===We.NOT_LOADED&&(D=_e),this.fragmentTracker.getState(D)===We.NOT_LOADED){const Me=this.mapToInitFragWhenRequired(D);Me&&this.loadFragment(Me,n,l)}}}loadFragment(e,t,n){se(e)?super.loadFragment(e,t,n):this._loadInitSegment(e,t)}get mediaBufferTimeRanges(){return new Qu(this.tracksBuffered[this.currentTrackId]||[])}}class Qu{constructor(e){this.buffered=void 0;const t=(n,r,i)=>{if(r=r>>>0,r>i-1)throw new DOMException(`Failed to execute '${n}' on 'TimeRanges': The index provided (${r}) is greater than the maximum bound (${i})`);return e[r][n]};this.buffered={get length(){return e.length},end(n){return t("end",n,e.length)},start(n){return t("start",n,e.length)}}}}const Ju={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},No=a=>String.fromCharCode(Ju[a]||a),Pi=15,es=100,qu={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},ec={17:2,18:4,21:6,22:8,23:10,19:13,20:15},tc={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},nc={25:2,26:4,29:6,30:8,31:10,27:13,28:15},rc=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class ic{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const n=typeof t=="function"?t():t;G.log(`${this.time} [${e}] ${n}`)}}}const _s=function(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].toString(16));return t};class Mo{constructor(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(e){const t=["foreground","underline","italics","background","flash"];for(let n=0;n<t.length;n++){const r=t[n];e.hasOwnProperty(r)&&(this[r]=e[r])}}isDefault(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash}equals(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}copy(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}toString(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}class sc{constructor(){this.uchar=" ",this.penState=new Mo}reset(){this.uchar=" ",this.penState.reset()}setChar(e,t){this.uchar=e,this.penState.copy(t)}setPenState(e){this.penState.copy(e)}equals(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)}copy(e){this.uchar=e.uchar,this.penState.copy(e.penState)}isEmpty(){return this.uchar===" "&&this.penState.isDefault()}}class ac{constructor(e){this.chars=[],this.pos=0,this.currPenState=new Mo,this.cueStartTime=null,this.logger=void 0;for(let t=0;t<es;t++)this.chars.push(new sc);this.logger=e}equals(e){for(let t=0;t<es;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<es;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<es;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e}setCursor(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>es&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=es)}moveCursor(e){const t=this.pos+e;if(e>1)for(let n=this.pos+1;n<t+1;n++)this.chars[n].setPenState(this.currPenState);this.setCursor(t)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(e){e>=144&&this.backSpace();const t=No(e);if(this.pos>=es){this.logger.log(0,()=>"Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1)}clearFromPos(e){let t;for(t=e;t<es;t++)this.chars[t].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const e=[];let t=!0;for(let n=0;n<es;n++){const r=this.chars[n].uchar;r!==" "&&(t=!1),e.push(r)}return t?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}}class Fa{constructor(e){this.rows=[],this.currRow=Pi-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<Pi;t++)this.rows.push(new ac(e));this.logger=e}reset(){for(let e=0;e<Pi;e++)this.rows[e].clear();this.currRow=Pi-1}equals(e){let t=!0;for(let n=0;n<Pi;n++)if(!this.rows[n].equals(e.rows[n])){t=!1;break}return t}copy(e){for(let t=0;t<Pi;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<Pi;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e}backSpace(){this.rows[this.currRow].backSpace()}clearToEndOfRow(){this.rows[this.currRow].clearToEndOfRow()}insertChar(e){this.rows[this.currRow].insertChar(e)}setPen(e){this.rows[this.currRow].setPenStyles(e)}moveCursor(e){this.rows[this.currRow].moveCursor(e)}setCursor(e){this.logger.log(2,"setCursor: "+e),this.rows[this.currRow].setCursor(e)}setPAC(e){this.logger.log(2,()=>"pacData = "+Et(e));let t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(let l=0;l<Pi;l++)this.rows[l].clear();const i=this.currRow+1-this.nrRollUpRows,s=this.lastOutputScreen;if(s){const l=s.rows[i].cueStartTime,c=this.logger.time;if(l!==null&&c!==null&&l<c)for(let u=0;u<this.nrRollUpRows;u++)this.rows[t-this.nrRollUpRows+u+1].copy(s.rows[i+u])}}this.currRow=t;const n=this.rows[this.currRow];if(e.indent!==null){const i=e.indent,s=Math.max(i-1,0);n.setCursor(e.indent),e.color=n.chars[s].penState.foreground}const r={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(r)}setBkgData(e){this.logger.log(2,()=>"bkgData = "+Et(e)),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(this.nrRollUpRows===null){this.logger.log(3,"roll_up but nrRollUpRows not set yet");return}this.logger.log(1,()=>this.getDisplayText());const e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const t=[];let n="",r=-1;for(let i=0;i<Pi;i++){const s=this.rows[i].getTextString();s&&(r=i+1,e?t.push("Row "+r+": '"+s+"'"):t.push(s.trim()))}return t.length>0&&(e?n="["+t.join(" | ")+"]":n=t.join(`
|
|
`)),n}getTextAndFormat(){return this.rows}}class Bo{constructor(e,t,n){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new Fa(n),this.nonDisplayedMemory=new Fa(n),this.lastOutputScreen=new Fa(n),this.currRollUpRow=this.displayedMemory.rows[Pi-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=n}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[Pi-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,()=>"MODE="+e),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let n=0;n<e.length;n++)this.writeScreen.insertChar(e[n]);const t=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,()=>t+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(1,()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,()=>"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const t={flash:!1};if(t.underline=e%2===1,t.italics=e>=46,t.italics)t.foreground="white";else{const n=Math.floor(e/2)-16,r=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=r[n]}this.logger.log(2,"MIDROW: "+Et(t)),this.writeScreen.setPen(t)}outputDataUpdate(e=!1){const t=this.logger.time;t!==null&&this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=t:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t),this.lastOutputScreen.copy(this.displayedMemory))}cueSplitAtTime(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}}class Uo{constructor(e,t,n){this.channels=void 0,this.currentChannel=0,this.cmdHistory=lc(),this.logger=void 0;const r=this.logger=new ic;this.channels=[null,new Bo(e,t,r),new Bo(e+1,n,r)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){this.logger.time=e;for(let n=0;n<t.length;n+=2){const r=t[n]&127,i=t[n+1]&127;let s=!1,l=null;if(r===0&&i===0)continue;this.logger.log(3,()=>"["+_s([t[n],t[n+1]])+"] -> ("+_s([r,i])+")");const c=this.cmdHistory;if(r>=16&&r<=31){if(oc(r,i,c)){la(null,null,c),this.logger.log(3,()=>"Repeated command ("+_s([r,i])+") is dropped");continue}la(r,i,this.cmdHistory),s=this.parseCmd(r,i),s||(s=this.parseMidrow(r,i)),s||(s=this.parsePAC(r,i)),s||(s=this.parseBackgroundAttributes(r,i))}else la(null,null,c);if(!s&&(l=this.parseChars(r,i),l)){const d=this.currentChannel;d&&d>0?this.channels[d].insertChars(l):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!s&&!l&&this.logger.log(2,()=>"Couldn't parse cleaned data "+_s([r,i])+" orig: "+_s([t[n],t[n+1]]))}}parseCmd(e,t){const n=(e===20||e===28||e===21||e===29)&&t>=32&&t<=47,r=(e===23||e===31)&&t>=33&&t<=35;if(!(n||r))return!1;const i=e===20||e===21||e===23?1:2,s=this.channels[i];return e===20||e===21||e===28||e===29?t===32?s.ccRCL():t===33?s.ccBS():t===34?s.ccAOF():t===35?s.ccAON():t===36?s.ccDER():t===37?s.ccRU(2):t===38?s.ccRU(3):t===39?s.ccRU(4):t===40?s.ccFON():t===41?s.ccRDC():t===42?s.ccTR():t===43?s.ccRTD():t===44?s.ccEDM():t===45?s.ccCR():t===46?s.ccENM():t===47&&s.ccEOC():s.ccTO(t-32),this.currentChannel=i,!0}parseMidrow(e,t){let n=0;if((e===17||e===25)&&t>=32&&t<=47){if(e===17?n=1:n=2,n!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const r=this.channels[n];return r?(r.ccMIDROW(t),this.logger.log(3,()=>"MIDROW ("+_s([e,t])+")"),!0):!1}return!1}parsePAC(e,t){let n;const r=(e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127,i=(e===16||e===24)&&t>=64&&t<=95;if(!(r||i))return!1;const s=e<=23?1:2;t>=64&&t<=95?n=s===1?qu[e]:tc[e]:n=s===1?ec[e]:nc[e];const l=this.channels[s];return l?(l.setPAC(this.interpretPAC(n,t)),this.currentChannel=s,!0):!1}interpretPAC(e,t){let n;const r={color:null,italics:!1,indent:null,underline:!1,row:e};return t>95?n=t-96:n=t-64,r.underline=(n&1)===1,n<=13?r.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(n/2)]:n<=15?(r.italics=!0,r.color="white"):r.indent=Math.floor((n-16)/2)*4,r}parseChars(e,t){let n,r=null,i=null;if(e>=25?(n=2,i=e-8):(n=1,i=e),i>=17&&i<=19){let s;i===17?s=t+80:i===18?s=t+112:s=t+144,this.logger.log(2,()=>"Special char '"+No(s)+"' in channel "+n),r=[s]}else e>=32&&e<=127&&(r=t===0?[e]:[e,t]);return r&&this.logger.log(3,()=>"Char codes = "+_s(r).join(",")),r}parseBackgroundAttributes(e,t){const n=(e===16||e===24)&&t>=32&&t<=47,r=(e===23||e===31)&&t>=45&&t<=47;if(!(n||r))return!1;let i;const s={};e===16||e===24?(i=Math.floor((t-32)/2),s.background=rc[i],t%2===1&&(s.background=s.background+"_semi")):t===45?s.background="transparent":(s.foreground="black",t===47&&(s.underline=!0));const l=e<=23?1:2;return this.channels[l].setBkgData(s),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}la(null,null,this.cmdHistory)}cueSplitAtTime(e){for(let t=0;t<this.channels.length;t++){const n=this.channels[t];n&&n.cueSplitAtTime(e)}}}function la(a,e,t){t.a=a,t.b=e}function oc(a,e,t){return t.a===a&&t.b===e}function lc(){return{a:null,b:null}}var Na=function(){if(pr!=null&&pr.VTTCue)return self.VTTCue;const a=["","lr","rl"],e=["start","middle","end","left","right"];function t(l,c){if(typeof c!="string"||!Array.isArray(l))return!1;const u=c.toLowerCase();return~l.indexOf(u)?u:!1}function n(l){return t(a,l)}function r(l){return t(e,l)}function i(l,...c){let u=1;for(;u<arguments.length;u++){const d=arguments[u];for(const p in d)l[p]=d[p]}return l}function s(l,c,u){const d=this,p={enumerable:!0};d.hasBeenReset=!1;let b="",w=!1,D=l,X=c,Y=u,_e=null,Me="",Ie=!0,st="auto",ut="start",Mt=50,ct="middle",At=50,Ht="middle";Object.defineProperty(d,"id",i({},p,{get:function(){return b},set:function(mt){b=""+mt}})),Object.defineProperty(d,"pauseOnExit",i({},p,{get:function(){return w},set:function(mt){w=!!mt}})),Object.defineProperty(d,"startTime",i({},p,{get:function(){return D},set:function(mt){if(typeof mt!="number")throw new TypeError("Start time must be set to a number.");D=mt,this.hasBeenReset=!0}})),Object.defineProperty(d,"endTime",i({},p,{get:function(){return X},set:function(mt){if(typeof mt!="number")throw new TypeError("End time must be set to a number.");X=mt,this.hasBeenReset=!0}})),Object.defineProperty(d,"text",i({},p,{get:function(){return Y},set:function(mt){Y=""+mt,this.hasBeenReset=!0}})),Object.defineProperty(d,"region",i({},p,{get:function(){return _e},set:function(mt){_e=mt,this.hasBeenReset=!0}})),Object.defineProperty(d,"vertical",i({},p,{get:function(){return Me},set:function(mt){const En=n(mt);if(En===!1)throw new SyntaxError("An invalid or illegal string was specified.");Me=En,this.hasBeenReset=!0}})),Object.defineProperty(d,"snapToLines",i({},p,{get:function(){return Ie},set:function(mt){Ie=!!mt,this.hasBeenReset=!0}})),Object.defineProperty(d,"line",i({},p,{get:function(){return st},set:function(mt){if(typeof mt!="number"&&mt!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");st=mt,this.hasBeenReset=!0}})),Object.defineProperty(d,"lineAlign",i({},p,{get:function(){return ut},set:function(mt){const En=r(mt);if(!En)throw new SyntaxError("An invalid or illegal string was specified.");ut=En,this.hasBeenReset=!0}})),Object.defineProperty(d,"position",i({},p,{get:function(){return Mt},set:function(mt){if(mt<0||mt>100)throw new Error("Position must be between 0 and 100.");Mt=mt,this.hasBeenReset=!0}})),Object.defineProperty(d,"positionAlign",i({},p,{get:function(){return ct},set:function(mt){const En=r(mt);if(!En)throw new SyntaxError("An invalid or illegal string was specified.");ct=En,this.hasBeenReset=!0}})),Object.defineProperty(d,"size",i({},p,{get:function(){return At},set:function(mt){if(mt<0||mt>100)throw new Error("Size must be between 0 and 100.");At=mt,this.hasBeenReset=!0}})),Object.defineProperty(d,"align",i({},p,{get:function(){return Ht},set:function(mt){const En=r(mt);if(!En)throw new SyntaxError("An invalid or illegal string was specified.");Ht=En,this.hasBeenReset=!0}})),d.displayState=void 0}return s.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},s}();class uc{decode(e,t){if(!e)return"";if(typeof e!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function Ko(a){function e(n,r,i,s){return(n|0)*3600+(r|0)*60+(i|0)+parseFloat(s||0)}const t=a.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return t?parseFloat(t[2])>59?e(t[2],t[3],0,t[4]):e(t[1],t[2],t[3],t[4]):null}class cc{constructor(){this.values=Object.create(null)}set(e,t){!this.get(e)&&t!==""&&(this.values[e]=t)}get(e,t,n){return n?this.has(e)?this.values[e]:t[n]:this.has(e)?this.values[e]:t}has(e){return e in this.values}alt(e,t,n){for(let r=0;r<n.length;++r)if(t===n[r]){this.set(e,t);break}}integer(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))}percent(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){const n=parseFloat(t);if(n>=0&&n<=100)return this.set(e,n),!0}return!1}}function Zo(a,e,t,n){const r=n?a.split(n):[a];for(const i in r){if(typeof r[i]!="string")continue;const s=r[i].split(t);if(s.length!==2)continue;const l=s[0],c=s[1];e(l,c)}}const Ma=new Na(0,0,""),ua=Ma.align==="middle"?"middle":"center";function fc(a,e,t){const n=a;function r(){const l=Ko(a);if(l===null)throw new Error("Malformed timestamp: "+n);return a=a.replace(/^[^\sa-zA-Z-]+/,""),l}function i(l,c){const u=new cc;Zo(l,function(b,w){let D;switch(b){case"region":for(let X=t.length-1;X>=0;X--)if(t[X].id===w){u.set(b,t[X].region);break}break;case"vertical":u.alt(b,w,["rl","lr"]);break;case"line":D=w.split(","),u.integer(b,D[0]),u.percent(b,D[0])&&u.set("snapToLines",!1),u.alt(b,D[0],["auto"]),D.length===2&&u.alt("lineAlign",D[1],["start",ua,"end"]);break;case"position":D=w.split(","),u.percent(b,D[0]),D.length===2&&u.alt("positionAlign",D[1],["start",ua,"end","line-left","line-right","auto"]);break;case"size":u.percent(b,w);break;case"align":u.alt(b,w,["start",ua,"end","left","right"]);break}},/:/,/\s/),c.region=u.get("region",null),c.vertical=u.get("vertical","");let d=u.get("line","auto");d==="auto"&&Ma.line===-1&&(d=-1),c.line=d,c.lineAlign=u.get("lineAlign","start"),c.snapToLines=u.get("snapToLines",!0),c.size=u.get("size",100),c.align=u.get("align",ua);let p=u.get("position","auto");p==="auto"&&Ma.position===50&&(p=c.align==="start"||c.align==="left"?0:c.align==="end"||c.align==="right"?100:50),c.position=p}function s(){a=a.replace(/^\s+/,"")}if(s(),e.startTime=r(),s(),a.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+n);a=a.slice(3),s(),e.endTime=r(),s(),i(a,e)}function zo(a){return a.replace(/<br(?: \/)?>/gi,`
|
|
`)}class dc{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new uc,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){const t=this;e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));function n(){let i=t.buffer,s=0;for(i=zo(i);s<i.length&&i[s]!=="\r"&&i[s]!==`
|
|
`;)++s;const l=i.slice(0,s);return i[s]==="\r"&&++s,i[s]===`
|
|
`&&++s,t.buffer=i.slice(s),l}function r(i){Zo(i,function(s,l){},/:/)}try{let i="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;i=n();const l=i.match(/^()?WEBVTT([ \t].*)?$/);if(!(l!=null&&l[0]))throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let s=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(s?s=!1:i=n(),t.state){case"HEADER":/:/.test(i)?r(i):i||(t.state="ID");continue;case"NOTE":i||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(i)){t.state="NOTE";break}if(!i)continue;if(t.cue=new Na(0,0,""),t.state="CUE",i.indexOf("-->")===-1){t.cue.id=i;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{fc(i,t.cue,t.regionList)}catch(l){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const l=i.indexOf("-->")!==-1;if(!i||l&&(s=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(t.cue===null)continue;t.cue.text&&(t.cue.text+=`
|
|
`),t.cue.text+=i}continue;case"BADCUE":i||(t.state="ID")}}}catch(i){t.state==="CUETEXT"&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=t.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this}flush(){const e=this;try{if((e.cue||e.state==="HEADER")&&(e.buffer+=`
|
|
|
|
`,e.parse()),e.state==="INITIAL"||e.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this}}const hc=/\r\n|\n\r|\n|\r/g,Ba=function(e,t,n=0){return e.slice(n,n+t.length)===t},pc=function(e){let t=parseInt(e.slice(-3));const n=parseInt(e.slice(-6,-4)),r=parseInt(e.slice(-9,-7)),i=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!x(t)||!x(n)||!x(r)||!x(i))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*n,t+=60*1e3*r,t+=60*60*1e3*i,t};function Ua(a,e,t){return Gs(a.toString())+Gs(e.toString())+Gs(t)}const mc=function(e,t,n){let r=e[t],i=e[r.prevCC];if(!i||!i.new&&r.new){e.ccOffset=e.presentationOffset=r.start,r.new=!1;return}for(;(s=i)!=null&&s.new;){var s;e.ccOffset+=r.start-i.start,r.new=!1,r=i,i=e[r.prevCC]}e.presentationOffset=n};function gc(a,e,t,n,r,i,s){const l=new dc,c=Te(new Uint8Array(a)).trim().replace(hc,`
|
|
`).split(`
|
|
`),u=[],d=e?Kl(e.baseTime,e.timescale):0;let p="00:00.000",b=0,w=0,D,X=!0;l.oncue=function(Y){const _e=t[n];let Me=t.ccOffset;const Ie=(b-d)/9e4;if(_e!=null&&_e.new&&(w!==void 0?Me=t.ccOffset=_e.start:mc(t,n,Ie)),Ie){if(!e){D=new Error("Missing initPTS for VTT MPEGTS");return}Me=Ie-t.presentationOffset}const st=Y.endTime-Y.startTime,ut=Ci((Y.startTime+Me-w)*9e4,r*9e4)/9e4;Y.startTime=Math.max(ut,0),Y.endTime=Math.max(ut+st,0);const Mt=Y.text.trim();Y.text=decodeURIComponent(encodeURIComponent(Mt)),Y.id||(Y.id=Ua(Y.startTime,Y.endTime,Mt)),Y.endTime>0&&u.push(Y)},l.onparsingerror=function(Y){D=Y},l.onflush=function(){if(D){s(D);return}i(u)},c.forEach(Y=>{if(X)if(Ba(Y,"X-TIMESTAMP-MAP=")){X=!1,Y.slice(16).split(",").forEach(_e=>{Ba(_e,"LOCAL:")?p=_e.slice(6):Ba(_e,"MPEGTS:")&&(b=parseInt(_e.slice(7)))});try{w=pc(p)/1e3}catch(_e){D=_e}return}else Y===""&&(X=!1);l.parse(Y+`
|
|
`)}),l.flush()}const Ka="stpp.ttml.im1t",Ho=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Go=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,vc={left:"start",center:"center",right:"end",start:"start",end:"end"};function Wo(a,e,t,n){const r=Z(new Uint8Array(a),["mdat"]);if(r.length===0){n(new Error("Could not parse IMSC1 mdat"));return}const i=r.map(l=>Te(l)),s=Ul(e.baseTime,1,e.timescale);try{i.forEach(l=>t(_c(l,s)))}catch(l){n(l)}}function _c(a,e){const r=new DOMParser().parseFromString(a,"text/xml").getElementsByTagName("tt")[0];if(!r)throw new Error("Invalid ttml");const i={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},s=Object.keys(i).reduce((p,b)=>(p[b]=r.getAttribute(`ttp:${b}`)||i[b],p),{}),l=r.getAttribute("xml:space")!=="preserve",c=Vo(Za(r,"styling","style")),u=Vo(Za(r,"layout","region")),d=Za(r,"body","[begin]");return[].map.call(d,p=>{const b=$o(p,l);if(!b||!p.hasAttribute("begin"))return null;const w=Ha(p.getAttribute("begin"),s),D=Ha(p.getAttribute("dur"),s);let X=Ha(p.getAttribute("end"),s);if(w===null)throw jo(p);if(X===null){if(D===null)throw jo(p);X=w+D}const Y=new Na(w-e,X-e,b);Y.id=Ua(Y.startTime,Y.endTime,Y.text);const _e=u[p.getAttribute("region")],Me=c[p.getAttribute("style")],Ie=yc(_e,Me,c),{textAlign:st}=Ie;if(st){const ut=vc[st];ut&&(Y.lineAlign=ut),Y.align=st}return h(Y,Ie),Y}).filter(p=>p!==null)}function Za(a,e,t){const n=a.getElementsByTagName(e)[0];return n?[].slice.call(n.querySelectorAll(t)):[]}function Vo(a){return a.reduce((e,t)=>{const n=t.getAttribute("xml:id");return n&&(e[n]=t),e},{})}function $o(a,e){return[].slice.call(a.childNodes).reduce((t,n,r)=>{var i;return n.nodeName==="br"&&r?t+`
|
|
`:(i=n.childNodes)!=null&&i.length?$o(n,e):e?t+n.textContent.trim().replace(/\s+/g," "):t+n.textContent},"")}function yc(a,e,t){const n="http://www.w3.org/ns/ttml#styling";let r=null;const i=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],s=a!=null&&a.hasAttribute("style")?a.getAttribute("style"):null;return s&&t.hasOwnProperty(s)&&(r=t[s]),i.reduce((l,c)=>{const u=za(e,n,c)||za(a,n,c)||za(r,n,c);return u&&(l[c]=u),l},{})}function za(a,e,t){return a&&a.hasAttributeNS(e,t)?a.getAttributeNS(e,t):null}function jo(a){return new Error(`Could not parse ttml timestamp ${a}`)}function Ha(a,e){if(!a)return null;let t=Ko(a);return t===null&&(Ho.test(a)?t=Ec(a,e):Go.test(a)&&(t=bc(a,e))),t}function Ec(a,e){const t=Ho.exec(a),n=(t[4]|0)+(t[5]|0)/e.subFrameRate;return(t[1]|0)*3600+(t[2]|0)*60+(t[3]|0)+n/e.frameRate}function bc(a,e){const t=Go.exec(a),n=Number(t[1]);switch(t[2]){case"h":return n*3600;case"m":return n*60;case"ms":return n*1e3;case"f":return n/e.frameRate;case"t":return n/e.tickRate}return n}class ca{constructor(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}dispatchCue(){this.startTime!==null&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)}newCue(e,t,n){(this.startTime===null||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=n,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}class xc{constructor(e){this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=Qo(),this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},e.on(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(f.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(f.FRAG_LOADING,this.onFragLoading,this),e.on(f.FRAG_LOADED,this.onFragLoaded,this),e.on(f.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(f.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(f.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(f.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(f.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(f.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(f.FRAG_LOADING,this.onFragLoading,this),e.off(f.FRAG_LOADED,this.onFragLoaded,this),e.off(f.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(f.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(f.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(f.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(f.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.media=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){const e=new ca(this,"textTrack1"),t=new ca(this,"textTrack2"),n=new ca(this,"textTrack3"),r=new ca(this,"textTrack4");this.cea608Parser1=new Uo(1,e,t),this.cea608Parser2=new Uo(3,n,r)}addCues(e,t,n,r,i){let s=!1;for(let l=i.length;l--;){const c=i[l],u=Sc(c[0],c[1],t,n);if(u>=0&&(c[0]=Math.min(c[0],t),c[1]=Math.max(c[1],n),s=!0,u/(n-t)>.5))return}if(s||i.push([t,n]),this.config.renderTextTracksNatively){const l=this.captionsTracks[e];this.Cues.newCue(l,t,n,r)}else{const l=this.Cues.newCue(null,t,n,r);this.hls.trigger(f.CUES_PARSED,{type:"captions",cues:l,track:e})}}onInitPtsFound(e,{frag:t,id:n,initPTS:r,timescale:i}){const{unparsedVttFrags:s}=this;n===te.MAIN&&(this.initPTS[t.cc]={baseTime:r,timescale:i}),s.length&&(this.unparsedVttFrags=[],s.forEach(l=>{this.onFragLoaded(f.FRAG_LOADED,l)}))}getExistingTrack(e,t){const{media:n}=this;if(n)for(let r=0;r<n.textTracks.length;r++){const i=n.textTracks[r];if(Xo(i,{name:e,lang:t,characteristics:"transcribes-spoken-dialog,describes-music-and-sound"}))return i}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:t,captionsTracks:n,media:r}=this,{label:i,languageCode:s}=t[e],l=this.getExistingTrack(i,s);if(l)n[e]=l,Ls(n[e]),Io(n[e],r);else{const c=this.createTextTrack("captions",i,s);c&&(c[e]=!0,n[e]=c)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const n=t.label,r={_id:e,label:n,kind:"captions",default:t.media?!!t.media.default:!1,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=r,this.hls.trigger(f.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[r]})}createTextTrack(e,t,n){const r=this.media;if(r)return r.addTextTrack(e,t,n)}onMediaAttaching(e,t){this.media=t.media,t.mediaSource||this._cleanTracks()}onMediaDetaching(e,t){const n=!!t.transferMedia;if(this.media=null,n)return;const{captionsTracks:r}=this;Object.keys(r).forEach(i=>{Ls(r[i]),delete r[i]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=Qo(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())}_cleanTracks(){const{media:e}=this;if(!e)return;const t=e.textTracks;if(t)for(let n=0;n<t.length;n++)Ls(t[n])}onSubtitleTracksUpdated(e,t){const n=t.subtitleTracks||[],r=n.some(i=>i.textCodec===Ka);if(this.config.enableWebVTT||r&&this.config.enableIMSC1){if(vo(this.tracks,n)){this.tracks=n;return}if(this.textTracks=[],this.tracks=n,this.config.renderTextTracksNatively){const s=this.media,l=s?aa(s.textTracks):null;if(this.tracks.forEach((c,u)=>{let d;if(l){let p=null;for(let b=0;b<l.length;b++)if(l[b]&&Xo(l[b],c)){p=l[b],l[b]=null;break}p&&(d=p)}if(d)Ls(d);else{const p=Yo(c);d=this.createTextTrack(p,c.name,c.lang),d&&(d.mode="disabled")}d&&this.textTracks.push(d)}),l!=null&&l.length){const c=l.filter(u=>u!==null).map(u=>u.label);c.length&&this.hls.logger.warn(`Media element contains unused subtitle tracks: ${c.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const s=this.tracks.map(l=>({label:l.name,kind:l.type.toLowerCase(),default:l.default,subtitleTrack:l}));this.hls.trigger(f.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:s})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach(n=>{const r=/(?:CC|SERVICE)([1-4])/.exec(n.instreamId);if(!r)return;const i=`textTrack${r[1]}`,s=this.captionsProperties[i];s&&(s.label=n.name,n.lang&&(s.languageCode=n.lang),s.media=n)})}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return t==null?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){if(this.enabled&&t.frag.type===te.MAIN){var n,r;const{cea608Parser1:i,cea608Parser2:s,lastSn:l}=this,{cc:c,sn:u}=t.frag,d=(n=(r=t.part)==null?void 0:r.index)!=null?n:-1;i&&s&&(u!==l+1||u===l&&d!==this.lastPartIndex+1||c!==this.lastCc)&&(i.reset(),s.reset()),this.lastCc=c,this.lastSn=u,this.lastPartIndex=d}}onFragLoaded(e,t){const{frag:n,payload:r}=t;if(n.type===te.SUBTITLE)if(r.byteLength){const i=n.decryptdata,s="stats"in t;if(i==null||!i.encrypted||s){const l=this.tracks[n.level],c=this.vttCCs;c[n.cc]||(c[n.cc]={start:n.start,prevCC:this.prevCC,new:!0},this.prevCC=n.cc),l&&l.textCodec===Ka?this._parseIMSC1(n,r):this._parseVTTs(t)}}else this.hls.trigger(f.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const n=this.hls;Wo(t,this.initPTS[e.cc],r=>{this._appendCues(r,e.level),n.trigger(f.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},r=>{n.logger.log(`Failed to parse IMSC1: ${r}`),n.trigger(f.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:r})})}_parseVTTs(e){var t;const{frag:n,payload:r}=e,{initPTS:i,unparsedVttFrags:s}=this,l=i.length-1;if(!i[n.cc]&&l===-1){s.push(e);return}const c=this.hls,u=(t=n.initSegment)!=null&&t.data?Fe(n.initSegment.data,new Uint8Array(r)).buffer:r;gc(u,this.initPTS[n.cc],this.vttCCs,n.cc,n.start,d=>{this._appendCues(d,n.level),c.trigger(f.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:n})},d=>{const p=d.message==="Missing initPTS for VTT MPEGTS";p?s.push(e):this._fallbackToIMSC1(n,r),c.logger.log(`Failed to parse VTT cue: ${d}`),!(p&&l>n.cc)&&c.trigger(f.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:n,error:d})})}_fallbackToIMSC1(e,t){const n=this.tracks[e.level];n.textCodec||Wo(t,this.initPTS[e.cc],()=>{n.textCodec=Ka,this._parseIMSC1(e,t)},()=>{n.textCodec="wvtt"})}_appendCues(e,t){const n=this.hls;if(this.config.renderTextTracksNatively){const r=this.textTracks[t];if(!r||r.mode==="disabled")return;e.forEach(i=>Lo(r,i))}else{const r=this.tracks[t];if(!r)return;const i=r.default?"default":"subtitles"+t;n.trigger(f.CUES_PARSED,{type:"subtitles",cues:e,track:i})}}onFragDecrypted(e,t){const{frag:n}=t;n.type===te.SUBTITLE&&this.onFragLoaded(f.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){if(!this.enabled||!this.config.enableCEA708Captions)return;const{frag:n,samples:r}=t;if(!(n.type===te.MAIN&&this.closedCaptionsForLevel(n)==="NONE"))for(let i=0;i<r.length;i++){const s=r[i].bytes;if(s){this.cea608Parser1||this.initCea608Parsers();const l=this.extractCea608Data(s);this.cea608Parser1.addData(r[i].pts,l[0]),this.cea608Parser2.addData(r[i].pts,l[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:n,endOffsetSubtitles:r,type:i}){const{media:s}=this;if(!(!s||s.currentTime<n)){if(!i||i==="video"){const{captionsTracks:l}=this;Object.keys(l).forEach(c=>ka(l[c],t,n))}if(this.config.renderTextTracksNatively&&t===0&&r!==void 0){const{textTracks:l}=this;Object.keys(l).forEach(c=>ka(l[c],t,r))}}}extractCea608Data(e){const t=[[],[]],n=e[0]&31;let r=2;for(let i=0;i<n;i++){const s=e[r++],l=127&e[r++],c=127&e[r++];if(l===0&&c===0)continue;if((4&s)!==0){const d=3&s;(d===0||d===1)&&(t[d].push(l),t[d].push(c))}}return t}}function Yo(a){return a.characteristics&&/transcribes-spoken-dialog/gi.test(a.characteristics)&&/describes-music-and-sound/gi.test(a.characteristics)?"captions":"subtitles"}function Xo(a,e){return!!a&&a.kind===Yo(e)&&Ta(e,a)}function Sc(a,e,t,n){return Math.min(e,n)-Math.max(a,t)}function Qo(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}const wc=/\s/,Ac={newCue(a,e,t,n){const r=[];let i,s,l,c,u;const d=self.VTTCue||self.TextTrackCue;for(let b=0;b<n.rows.length;b++)if(i=n.rows[b],l=!0,c=0,u="",!i.isEmpty()){var p;for(let X=0;X<i.chars.length;X++)wc.test(i.chars[X].uchar)&&l?c++:(u+=i.chars[X].uchar,l=!1);i.cueStartTime=e,e===t&&(t+=1e-4),c>=16?c--:c++;const w=zo(u.trim()),D=Ua(e,t,w);a!=null&&(p=a.cues)!=null&&p.getCueById(D)||(s=new d(e,t,w),s.id=D,s.line=b+1,s.align="left",s.position=10+Math.min(80,Math.floor(c*8/32)*10),r.push(s))}return a&&r.length&&(r.sort((b,w)=>b.line==="auto"||w.line==="auto"?0:b.line>8&&w.line>8?w.line-b.line:b.line-w.line),r.forEach(b=>Lo(a,b))),r}};function Tc(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(a){}return!1}const Dc=/(\d+)-(\d+)\/(\d+)/;class Jo{constructor(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=null,this.response=null,this.controller=void 0,this.context=null,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||Lc,this.controller=new self.AbortController,this.stats=new v}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,n){const r=this.stats;if(r.loading.start)throw new Error("Loader can only be used once.");r.loading.start=self.performance.now();const i=Cc(e,this.controller.signal),s=e.responseType==="arraybuffer",l=s?"byteLength":"length",{maxTimeToFirstByteMs:c,maxLoadTimeMs:u}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=n,this.request=this.fetchSetup(e,i),self.clearTimeout(this.requestTimeout),t.timeout=c&&x(c)?c:u,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},t.timeout),(Zs(this.request)?this.request.then(self.fetch):self.fetch(this.request)).then(p=>{var b;this.response=this.loader=p;const w=Math.max(self.performance.now(),r.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=u,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(r,e,this.response))},u-(w-r.loading.start)),!p.ok){const{status:X,statusText:Y}=p;throw new kc(Y||"fetch, bad network response",X,p)}r.loading.first=w,r.total=Ic(p.headers)||r.total;const D=(b=this.callbacks)==null?void 0:b.onProgress;return D&&x(t.highWaterMark)?this.loadProgressively(p,r,e,t.highWaterMark,D):s?p.arrayBuffer():e.responseType==="json"?p.json():p.text()}).then(p=>{var b,w;const D=this.response;if(!D)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),r.loading.end=Math.max(self.performance.now(),r.loading.first);const X=p[l];X&&(r.loaded=r.total=X);const Y={url:D.url,data:p,code:D.status},_e=(b=this.callbacks)==null?void 0:b.onProgress;_e&&!x(t.highWaterMark)&&_e(r,e,p,D),(w=this.callbacks)==null||w.onSuccess(Y,r,e,D)}).catch(p=>{var b;if(self.clearTimeout(this.requestTimeout),r.aborted)return;const w=p&&p.code||0,D=p?p.message:null;(b=this.callbacks)==null||b.onError({code:w,text:D},e,p?p.details:null,r)})}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,n,r=0,i){const s=new ss,l=e.body.getReader(),c=()=>l.read().then(u=>{if(u.done)return s.dataLength&&i(t,n,s.flush().buffer,e),Promise.resolve(new ArrayBuffer(0));const d=u.value,p=d.length;return t.loaded+=p,p<r||s.dataLength?(s.push(d),s.dataLength>=r&&i(t,n,s.flush().buffer,e)):i(t,n,d.buffer,e),c()}).catch(()=>Promise.reject());return c()}}function Cc(a,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(h({},a.headers))};return a.rangeEnd&&t.headers.set("Range","bytes="+a.rangeStart+"-"+String(a.rangeEnd-1)),t}function Rc(a){const e=Dc.exec(a);if(e)return parseInt(e[2])-parseInt(e[1])+1}function Ic(a){const e=a.get("Content-Range");if(e){const n=Rc(e);if(x(n))return n}const t=a.get("Content-Length");if(t)return parseInt(t)}function Lc(a,e){return new self.Request(a.url,e)}class kc extends Error{constructor(e,t,n){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=n}}const Pc=/^age:\s*[\d.]+\s*$/im;class qo{constructor(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=null,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new v,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,e.readyState!==4&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,n){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=n,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const n=this.loader=new self.XMLHttpRequest,r=this.stats;r.loading.first=0,r.loaded=0,r.aborted=!1;const i=this.xhrSetup;i?Promise.resolve().then(()=>{if(!(this.loader!==n||this.stats.aborted))return i(n,t.url)}).catch(s=>{if(!(this.loader!==n||this.stats.aborted))return n.open("GET",t.url,!0),i(n,t.url)}).then(()=>{this.loader!==n||this.stats.aborted||this.openAndSendXhr(n,t,e)}).catch(s=>{var l;(l=this.callbacks)==null||l.onError({code:n.status,text:s.message},t,n,r)}):this.openAndSendXhr(n,t,e)}openAndSendXhr(e,t,n){e.readyState||e.open("GET",t.url,!0);const r=t.headers,{maxTimeToFirstByteMs:i,maxLoadTimeMs:s}=n.loadPolicy;if(r)for(const l in r)e.setRequestHeader(l,r[l]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),n.timeout=i&&x(i)?i:s,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:n}=this;if(!e||!t)return;const r=t.readyState,i=this.config;if(!n.aborted&&r>=2&&(n.loading.first===0&&(n.loading.first=Math.max(self.performance.now(),n.loading.start),i.timeout!==i.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),i.timeout=i.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),i.loadPolicy.maxLoadTimeMs-(n.loading.first-n.loading.start)))),r===4)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const u=t.status,d=t.responseType==="text"?t.responseText:null;if(u>=200&&u<300){const D=d!=null?d:t.response;if(D!=null){var s,l;n.loading.end=Math.max(self.performance.now(),n.loading.first);const X=t.responseType==="arraybuffer"?D.byteLength:D.length;n.loaded=n.total=X,n.bwEstimate=n.total*8e3/(n.loading.end-n.loading.first);const Y=(s=this.callbacks)==null?void 0:s.onProgress;Y&&Y(n,e,D,t);const _e={url:t.responseURL,data:D,code:u};(l=this.callbacks)==null||l.onSuccess(_e,n,e,t);return}}const p=i.loadPolicy.errorRetry,b=n.retry,w={url:e.url,data:void 0,code:u};if(kn(p,b,!1,w))this.retry(p);else{var c;G.error(`${u} while loading ${e.url}`),(c=this.callbacks)==null||c.onError({code:u,text:t.statusText},e,t,n)}}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,t=this.stats.retry;if(kn(e,t,!0))this.retry(e);else{var n;G.warn(`timeout while loading ${(n=this.context)==null?void 0:n.url}`);const r=this.callbacks;r&&(this.abortInternal(),r.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:n}=this;this.retryDelay=yn(e,n.retry),n.retry++,G.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${t==null?void 0:t.url}, retrying ${n.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}getCacheAge(){let e=null;if(this.loader&&Pc.test(this.loader.getAllResponseHeaders())){const t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.loader&&new RegExp(`^${e}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}}const Oc={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},Fc=_(_({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,maxDevicePixelRatio:Number.POSITIVE_INFINITY,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,maxBufferSize:60*1e3*1e3,maxFragLookUpTolerance:.25,maxBufferHole:.1,detectStallWithCurrentTimeMs:1250,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,nudgeOnVideoHole:!0,liveSyncDurationCount:3,liveSyncOnStallIncrease:1,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,ignorePlaylistParsingErrors:!1,loader:qo,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:jt,bufferController:tu,capLevelController:Ca,errorController:Xe,fpsController:Uu,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrEwmaDefaultEstimateMax:5e6,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:Gn,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableEmsgKLVMetadata:!1,enableID3MetadataCues:!0,enableInterstitialPlayback:!0,interstitialAppendInPlace:!0,interstitialLiveLookAhead:10,useMediaCapabilities:!0,certLoadPolicy:{default:Oc},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},interstitialAssetListLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:3e4,timeoutRetry:{maxNumRetry:0,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:0,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},Nc()),{},{subtitleStreamController:Xu,subtitleTrackController:zu,timelineController:xc,audioStreamController:Ql,audioTrackController:Jl,emeController:Is,cmcdController:Nu,contentSteeringController:Bu,interstitialsController:Yu});function Nc(){return{cueHandler:Ac,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function Mc(a,e,t){if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(e.liveMaxLatencyDurationCount!==void 0&&(e.liveSyncDurationCount===void 0||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(e.liveMaxLatencyDuration!==void 0&&(e.liveSyncDuration===void 0||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const n=Ga(a),r=["manifest","level","frag"],i=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return r.forEach(s=>{const l=`${s==="level"?"playlist":s}LoadPolicy`,c=e[l]===void 0,u=[];i.forEach(d=>{const p=`${s}Loading${d}`,b=e[p];if(b!==void 0&&c){u.push(p);const w=n[l].default;switch(e[l]={default:w},d){case"TimeOut":w.maxLoadTimeMs=b,w.maxTimeToFirstByteMs=b;break;case"MaxRetry":w.errorRetry.maxNumRetry=b,w.timeoutRetry.maxNumRetry=b;break;case"RetryDelay":w.errorRetry.retryDelayMs=b,w.timeoutRetry.retryDelayMs=b;break;case"MaxRetryTimeout":w.errorRetry.maxRetryDelayMs=b,w.timeoutRetry.maxRetryDelayMs=b;break}}}),u.length&&t.warn(`hls.js config: "${u.join('", "')}" setting(s) are deprecated, use "${l}": ${Et(e[l])}`)}),_(_({},n),e)}function Ga(a){return a&&typeof a=="object"?Array.isArray(a)?a.map(Ga):Object.keys(a).reduce((e,t)=>(e[t]=Ga(a[t]),e),{}):a}function Bc(a,e){const t=a.loader;t!==Jo&&t!==qo?(e.log("[config]: Custom loader detected, cannot enable progressive streaming"),a.progressive=!1):Tc()&&(a.loader=Jo,a.progressive=!0,a.enableSoftwareAES=!0,e.log("[config]: Progressive streaming enabled, using FetchLoader"))}const fa=2,Uc=.1,Kc=.05,Zc=100;class zc extends dr{constructor(e,t){super("gap-controller",e.logger),this.hls=null,this.fragmentTracker=null,this.media=null,this.mediaSource=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.buffered={},this.lastCurrentTime=0,this.ended=0,this.waiting=0,this.onMediaPlaying=()=>{this.ended=0,this.waiting=0},this.onMediaWaiting=()=>{var n;(n=this.media)!=null&&n.seeking||(this.waiting=self.performance.now(),this.tick())},this.onMediaEnded=()=>{if(this.hls){var n;this.ended=((n=this.media)==null?void 0:n.currentTime)||1,this.hls.trigger(f.MEDIA_ENDED,{stalled:!1})}},this.hls=e,this.fragmentTracker=t,this.registerListeners()}registerListeners(){const{hls:e}=this;e&&(e.on(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.BUFFER_APPENDED,this.onBufferAppended,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.BUFFER_APPENDED,this.onBufferAppended,this))}destroy(){super.destroy(),this.unregisterListeners(),this.media=this.hls=this.fragmentTracker=null,this.mediaSource=void 0}onMediaAttached(e,t){this.setInterval(Zc),this.mediaSource=t.mediaSource;const n=this.media=t.media;qi(n,"playing",this.onMediaPlaying),qi(n,"waiting",this.onMediaWaiting),qi(n,"ended",this.onMediaEnded)}onMediaDetaching(e,t){this.clearInterval();const{media:n}=this;n&&(Gi(n,"playing",this.onMediaPlaying),Gi(n,"waiting",this.onMediaWaiting),Gi(n,"ended",this.onMediaEnded),this.media=null),this.mediaSource=void 0}onBufferAppended(e,t){this.buffered=t.timeRanges}get hasBuffered(){return Object.keys(this.buffered).length>0}tick(){var e;if(!((e=this.media)!=null&&e.readyState)||!this.hasBuffered)return;const t=this.media.currentTime;this.poll(t,this.lastCurrentTime),this.lastCurrentTime=t}poll(e,t){var n,r;const i=(n=this.hls)==null?void 0:n.config;if(!i)return;const{media:s,stalled:l}=this;if(!s)return;const{seeking:c}=s,u=this.seeking&&!c,d=!this.seeking&&c,p=s.paused&&!c||s.ended||s.playbackRate===0;if(this.seeking=c,e!==t){t&&(this.ended=0),this.moved=!0,c||(this.nudgeRetry=0,i.nudgeOnVideoHole&&!p&&e>t&&this.nudgeOnVideoHole(e,t)),this.waiting===0&&this.stallResolved(e);return}if(d||u){u&&this.stallResolved(e);return}if(p){this.nudgeRetry=0,this.stallResolved(e),!this.ended&&s.ended&&this.hls&&(this.ended=e||1,this.hls.trigger(f.MEDIA_ENDED,{stalled:!1}));return}if(!hn.getBuffered(s).length){this.nudgeRetry=0;return}const b=hn.bufferInfo(s,e,0),w=b.nextStart||0,D=this.fragmentTracker;if(c&&D&&this.hls){const Mt=el(this.hls.inFlightFragments,e),ct=b.len>fa,At=!w||Mt||w-e>fa&&!D.getPartialFragment(e);if(ct||At)return;this.moved=!1}const X=(r=this.hls)==null?void 0:r.latestLevelDetails;if(!this.moved&&this.stalled!==null&&D){if(!(b.len>0)&&!w)return;const ct=Math.max(w,b.start||0)-e,Ht=!!(X!=null&&X.live)?X.targetduration*2:fa,mt=D.getPartialFragment(e);if(ct>0&&(ct<=Ht||mt)){s.paused||this._trySkipBufferHole(mt);return}}const Y=i.detectStallWithCurrentTimeMs,_e=self.performance.now(),Me=this.waiting;if(l===null){Me>0&&_e-Me<Y?this.stalled=Me:this.stalled=_e;return}const Ie=_e-l;if(!c&&(Ie>=Y||Me)&&this.hls){var st;if(((st=this.mediaSource)==null?void 0:st.readyState)==="ended"&&!(X!=null&&X.live)&&Math.abs(e-((X==null?void 0:X.edge)||0))<1){if(this.ended)return;this.ended=e||1,this.hls.trigger(f.MEDIA_ENDED,{stalled:!0});return}if(this._reportStall(b),!this.media||!this.hls)return}const ut=hn.bufferInfo(s,e,i.maxBufferHole);this._tryFixBufferStall(ut,Ie)}stallResolved(e){const t=this.stalled;if(t&&this.hls&&(this.stalled=null,this.stallReported)){const n=self.performance.now()-t;this.log(`playback not stuck anymore @${e}, after ${Math.round(n)}ms`),this.stallReported=!1,this.waiting=0,this.hls.trigger(f.STALL_RESOLVED,{})}}nudgeOnVideoHole(e,t){var n;const r=this.buffered.video;if(this.hls&&this.media&&this.fragmentTracker&&(n=this.buffered.audio)!=null&&n.length&&r&&r.length>1&&e>r.end(0)){const i=hn.bufferedInfo(hn.timeRangesToArray(this.buffered.audio),e,0);if(i.len>1&&t>=i.start){const s=hn.timeRangesToArray(r),l=hn.bufferedInfo(s,t,0).bufferedIndex;if(l>-1&&l<s.length-1){const c=hn.bufferedInfo(s,e,0).bufferedIndex,u=s[l].end,d=s[l+1].start;if((c===-1||c>l)&&d-u<1&&e-u<2){const p=new Error(`nudging playhead to flush pipeline after video hole. currentTime: ${e} hole: ${u} -> ${d} buffered index: ${c}`);this.warn(p.message),this.media.currentTime+=1e-6;const b=this.fragmentTracker.getPartialFragment(e)||void 0,w=hn.bufferInfo(this.media,e,0);this.hls.trigger(f.ERROR,{type:fe.MEDIA_ERROR,details:F.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:p,reason:p.message,frag:b,buffer:w.len,bufferInfo:w})}}}}}_tryFixBufferStall(e,t){var n,r;const{fragmentTracker:i,media:s}=this,l=(n=this.hls)==null?void 0:n.config;if(!s||!i||!l)return;const c=s.currentTime,u=(r=this.hls)==null?void 0:r.latestLevelDetails,d=i.getPartialFragment(c);if((d||u!=null&&u.live&&c<u.fragmentStart)&&(this._trySkipBufferHole(d)||!this.media))return;const p=e.buffered;(p&&p.length>1&&e.len>l.maxBufferHole||e.nextStart&&e.nextStart-c<l.maxBufferHole)&&(t>l.highBufferWatchdogPeriod*1e3||this.waiting)&&(this.warn("Trying to nudge playhead over buffer-hole"),this._tryNudgeBuffer(e))}_reportStall(e){const{hls:t,media:n,stallReported:r,stalled:i}=this;if(!r&&i!==null&&n&&t){this.stallReported=!0;const s=new Error(`Playback stalling at @${n.currentTime} due to low buffer (${Et(e)})`);this.warn(s.message),t.trigger(f.ERROR,{type:fe.MEDIA_ERROR,details:F.BUFFER_STALLED_ERROR,fatal:!1,error:s,buffer:e.len,bufferInfo:e,stalled:{start:i}})}}_trySkipBufferHole(e){var t;const{fragmentTracker:n,media:r}=this,i=(t=this.hls)==null?void 0:t.config;if(!r||!n||!i)return 0;const s=r.currentTime,l=hn.bufferInfo(r,s,0),c=s<l.start?l.start:l.nextStart;if(c&&this.hls){const d=l.len<=i.maxBufferHole,p=l.len>0&&l.len<1&&r.readyState<3,b=c-s;if(b>0&&(d||p)){if(b>i.maxBufferHole){let D=!1;if(s===0){const X=n.getAppendedFrag(0,te.MAIN);X&&c<X.end&&(D=!0)}if(!D){const X=e||n.getAppendedFrag(s,te.MAIN);if(X){var u;if(!((u=this.hls.loadLevelObj)!=null&&u.details)||el(this.hls.inFlightFragments,c))return 0;let _e=!1,Me=X.end;for(;Me<c;){const Ie=n.getPartialFragment(Me);if(Ie)Me+=Ie.duration;else{_e=!0;break}}if(_e)return 0}}}const w=Math.max(c+Kc,s+Uc);if(this.warn(`skipping hole, adjusting currentTime from ${s} to ${w}`),this.moved=!0,r.currentTime=w,!(e!=null&&e.gap)){const D=new Error(`fragment loaded with buffer holes, seeking from ${s} to ${w}`);this.hls.trigger(f.ERROR,{type:fe.MEDIA_ERROR,details:F.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:D,reason:D.message,frag:e||void 0,buffer:l.len,bufferInfo:l})}return w}}return 0}_tryNudgeBuffer(e){const{hls:t,media:n,nudgeRetry:r}=this,i=t==null?void 0:t.config;if(!n||!i)return 0;const s=n.currentTime;if(this.nudgeRetry++,r<i.nudgeMaxRetry){const l=s+(r+1)*i.nudgeOffset,c=new Error(`Nudging 'currentTime' from ${s} to ${l}`);this.warn(c.message),n.currentTime=l,t.trigger(f.ERROR,{type:fe.MEDIA_ERROR,details:F.BUFFER_NUDGE_ON_STALL,error:c,fatal:!1,buffer:e.len,bufferInfo:e})}else{const l=new Error(`Playhead still not moving while enough data buffered @${s} after ${i.nudgeMaxRetry} nudges`);this.error(l.message),t.trigger(f.ERROR,{type:fe.MEDIA_ERROR,details:F.BUFFER_STALLED_ERROR,error:l,fatal:!0,buffer:e.len,bufferInfo:e})}}}function el(a,e){const t=tl(a.main);if(t&&t.start<=e)return t;const n=tl(a.audio);return n&&n.start<=e?n:null}function tl(a){if(!a)return null;switch(a.state){case Kt.IDLE:case Kt.STOPPED:case Kt.ENDED:case Kt.ERROR:return null}return a.frag}const Hc=.25;function Wa(){if(typeof self!="undefined")return self.VTTCue||self.TextTrackCue}function nl(a,e,t,n,r){let i=new a(e,t,"");try{i.value=n,r&&(i.type=r)}catch(s){i=new a(e,t,Et(r?_({type:r},n):n))}return i}const da=(()=>{const a=Wa();try{a&&new a(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function Gc(a){return Uint8Array.from(a.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}class Wc{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.removeCues=!0,this.onEventCueEnter=()=>{this.hls&&this.hls.trigger(f.EVENT_CUE_ENTER,{})},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=this.onEventCueEnter=null}_registerListeners(){const{hls:e}=this;e.on(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(f.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(f.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(f.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(f.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(f.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(f.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(f.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this)}onMediaAttaching(e,t){var n;this.media=t.media,((n=t.overrides)==null?void 0:n.cueRemoval)===!1&&(this.removeCues=!1)}onMediaAttached(){const e=this.hls.latestLevelDetails;e&&this.updateDateRangeCues(e)}onMediaDetaching(e,t){this.media=null,!t.transferMedia&&(this.id3Track&&(this.removeCues&&Ls(this.id3Track,this.onEventCueEnter),this.id3Track=null),this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;t<e.length;t++){const n=e[t];if(n.kind==="metadata"&&n.label==="id3")return Io(n,this.media),n}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media)return;const{hls:{config:{enableEmsgMetadataCues:n,enableID3MetadataCues:r}}}=this;if(!n&&!r)return;const{samples:i}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const s=Wa();if(s)for(let l=0;l<i.length;l++){const c=i[l].type;if(c===Si.emsg&&!n||!r)continue;const u=Ya(i[l].data);if(u){const d=i[l].pts;let p=d+i[l].duration;p>da&&(p=da),p-d<=0&&(p=d+Hc);for(let w=0;w<u.length;w++){const D=u[w];if(!Xa(D)){this.updateId3CueEnds(d,c);const X=nl(s,d,p,D,c);X&&this.id3Track.addCue(X)}}}}}updateId3CueEnds(e,t){var n;const r=(n=this.id3Track)==null?void 0:n.cues;if(r)for(let i=r.length;i--;){const s=r[i];s.type===t&&s.startTime<e&&s.endTime===da&&(s.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:n,type:r}){const{id3Track:i,hls:s}=this;if(!s)return;const{config:{enableEmsgMetadataCues:l,enableID3MetadataCues:c}}=s;if(i&&(l||c)){let u;r==="audio"?u=d=>d.type===Si.audioId3&&c:r==="video"?u=d=>d.type===Si.emsg&&l:u=d=>d.type===Si.audioId3&&c||d.type===Si.emsg&&l,ka(i,t,n,u)}}onLevelUpdated(e,{details:t}){this.updateDateRangeCues(t,!0)}onLevelPtsUpdated(e,t){Math.abs(t.drift)>.01&&this.updateDateRangeCues(t.details)}updateDateRangeCues(e,t){if(!this.media||!e.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{id3Track:n}=this,{dateRanges:r}=e,i=Object.keys(r);let s=this.dateRangeCuesAppended;if(n&&t){var l;if((l=n.cues)!=null&&l.length){const d=Object.keys(s).filter(p=>!i.includes(p));for(let p=d.length;p--;){const b=d[p],w=s[b].cues;delete s[b],Object.keys(w).forEach(D=>{try{const X=w[D];X.removeEventListener("enter",this.onEventCueEnter),n.removeCue(X)}catch(X){}})}}else s=this.dateRangeCuesAppended={}}const c=e.fragments[e.fragments.length-1];if(i.length===0||!x(c==null?void 0:c.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const u=Wa();for(let d=0;d<i.length;d++){const p=i[d],b=r[p],w=b.startTime,D=s[p],X=(D==null?void 0:D.cues)||{};let Y=(D==null?void 0:D.durationKnown)||!1,_e=da;const{duration:Me,endDate:Ie}=b;if(Ie&&Me!==null)_e=w+Me,Y=!0;else if(b.endOnNext&&!Y){const ut=i.reduce((Mt,ct)=>{if(ct!==b.id){const At=r[ct];if(At.class===b.class&&At.startDate>b.startDate&&(!Mt||b.startDate<Mt.startDate))return At}return Mt},null);ut&&(_e=ut.startTime,Y=!0)}const st=Object.keys(b.attr);for(let ut=0;ut<st.length;ut++){const Mt=st[ut];if(!ar(Mt))continue;const ct=X[Mt];if(ct)Y&&!D.durationKnown?ct.endTime=_e:Math.abs(ct.startTime-w)>.01&&(ct.startTime=w,ct.endTime=_e);else if(u){let At=b.attr[Mt];Pr(Mt)&&(At=Gc(At));const mt=nl(u,w,_e,{key:Mt,data:At},Si.dateRange);mt&&(mt.id=p,this.id3Track.addCue(mt),X[Mt]=mt,this.hls.config.interstitialsController&&(Mt==="X-ASSET-LIST"||Mt==="X-ASSET-URL")&&mt.addEventListener("enter",this.onEventCueEnter))}}s[p]={cues:X,dateRange:b,durationKnown:Y}}}}class Vc{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.currentTime=0,this.stallCount=0,this._latency=null,this._targetLatencyUpdated=!1,this.onTimeupdate=()=>{const{media:t}=this,n=this.levelDetails;if(!t||!n)return;this.currentTime=t.currentTime;const r=this.computeLatency();if(r===null)return;this._latency=r;const{lowLatencyMode:i,maxLiveSyncPlaybackRate:s}=this.config;if(!i||s===1||!n.live)return;const l=this.targetLatency;if(l===null)return;const c=r-l,u=Math.min(this.maxLatency,l+n.targetduration);if(c<u&&c>.05&&this.forwardBufferLength>1){const p=Math.min(2,Math.max(1,s)),b=Math.round(2/(1+Math.exp(-.75*c-this.edgeStalled))*20)/20,w=Math.min(p,Math.max(1,b));this.changeMediaPlaybackRate(t,w)}else t.playbackRate!==1&&t.playbackRate!==0&&this.changeMediaPlaybackRate(t,1)},this.hls=e,this.config=e.config,this.registerListeners()}get levelDetails(){var e;return((e=this.hls)==null?void 0:e.latestLevelDetails)||null}get latency(){return this._latency||0}get maxLatency(){const{config:e}=this;if(e.liveMaxLatencyDuration!==void 0)return e.liveMaxLatencyDuration;const t=this.levelDetails;return t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const e=this.levelDetails;if(e===null||this.hls===null)return null;const{holdBack:t,partHoldBack:n,targetduration:r}=e,{liveSyncDuration:i,liveSyncDurationCount:s,lowLatencyMode:l}=this.config,c=this.hls.userConfig;let u=l&&n||t;(this._targetLatencyUpdated||c.liveSyncDuration||c.liveSyncDurationCount||u===0)&&(u=i!==void 0?i:s*r);const d=r;return u+Math.min(this.stallCount*this.config.liveSyncOnStallIncrease,d)}set targetLatency(e){this.stallCount=0,this.config.liveSyncDuration=e,this._targetLatencyUpdated=!0}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency;if(e===null||t===null)return null;const n=this.levelDetails;if(n===null)return null;const r=n.edge,i=e-t-this.edgeStalled,s=r-n.totalduration,l=r-(this.config.lowLatencyMode&&n.partTarget||n.targetduration);return Math.min(Math.max(s,i),l)}get drift(){const e=this.levelDetails;return e===null?1:e.drift}get edgeStalled(){const e=this.levelDetails;if(e===null)return 0;const t=(this.config.lowLatencyMode&&e.partTarget||e.targetduration)*3;return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e}=this,t=this.levelDetails;if(!e||!t)return 0;const n=e.buffered.length;return(n?e.buffered.end(n-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.hls=null}registerListeners(){const{hls:e}=this;e&&(e.on(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(f.ERROR,this.onError,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(f.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(f.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(f.ERROR,this.onError,this))}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.onTimeupdate)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.onTimeupdate),this.media=null)}onManifestLoading(){this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){t.advanced&&this.onTimeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.onTimeupdate)}onError(e,t){var n;t.details===F.BUFFER_STALLED_ERROR&&(this.stallCount++,this.hls&&(n=this.levelDetails)!=null&&n.live&&this.hls.logger.warn("[latency-controller]: Stall detected, adjusting target latency"))}changeMediaPlaybackRate(e,t){var n,r;e.playbackRate!==t&&((n=this.hls)==null||n.logger.debug(`[latency-controller]: latency=${this.latency.toFixed(3)}, targetLatency=${(r=this.targetLatency)==null?void 0:r.toFixed(3)}, forwardBufferLength=${this.forwardBufferLength.toFixed(3)}: adjusting playback rate from ${e.playbackRate} to ${t}`),e.playbackRate=t)}estimateLiveEdge(){const e=this.levelDetails;return e===null?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return e===null?null:e-this.currentTime}}class $c extends Aa{constructor(e,t){super(e,"level-controller"),this._levels=[],this._firstLevel=-1,this._maxAutoLevel=-1,this._startLevel=void 0,this.currentLevel=null,this.currentLevelIndex=-1,this.manualLevelIndex=-1,this.steering=void 0,this.onParsedComplete=void 0,this.steering=t,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(f.LEVEL_LOADED,this.onLevelLoaded,this),e.on(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(f.FRAG_BUFFERED,this.onFragBuffered,this),e.on(f.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(f.LEVEL_LOADED,this.onLevelLoaded,this),e.off(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(f.FRAG_BUFFERED,this.onFragBuffered,this),e.off(f.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach(t=>{t.loadError=0,t.fragmentError=0}),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const n=this.hls.config.preferManagedMediaSource,r=[],i={},s={};let l=!1,c=!1,u=!1;t.levels.forEach(d=>{var p;const b=d.attrs;let{audioCodec:w,videoCodec:D}=d;w&&(d.audioCodec=w=Ze(w,n)||void 0),((p=D)==null?void 0:p.indexOf("avc1"))===0&&(D=d.videoCodec=en(D));const{width:X,height:Y,unknownCodecs:_e}=d;let Me=_e?_e.length:0;if(_e)for(let En=Me;En--;){const Mn=_e[En];this.isAudioSupported(Mn)?(d.audioCodec=w=w?`${w},${Mn}`:Mn,Me--,Yt.audio[w.substring(0,4)]=2):this.isVideoSupported(Mn)&&(d.videoCodec=D=D?`${D},${Mn}`:Mn,Me--,Yt.video[D.substring(0,4)]=2)}if(l||(l=!!(X&&Y)),c||(c=!!D),u||(u=!!w),Me||w&&!this.isAudioSupported(w)||D&&!this.isVideoSupported(D)){this.log(`Some or all CODECS not supported "${b.CODECS}"`);return}const{CODECS:Ie,"FRAME-RATE":st,"HDCP-LEVEL":ut,"PATHWAY-ID":Mt,RESOLUTION:ct,"VIDEO-RANGE":At}=b,mt=`${`${Mt||"."}-`}${d.bitrate}-${ct}-${st}-${Ie}-${At}-${ut}`;if(i[mt])if(i[mt].uri!==d.url&&!d.attrs["PATHWAY-ID"]){const En=s[mt]+=1;d.attrs["PATHWAY-ID"]=new Array(En+1).join(".");const Mn=this.createLevel(d);i[mt]=Mn,r.push(Mn)}else i[mt].addGroupId("audio",b.AUDIO),i[mt].addGroupId("text",b.SUBTITLES);else{const En=this.createLevel(d);i[mt]=En,s[mt]=1,r.push(En)}}),this.filterAndSortMediaOptions(r,t,l,c,u)}createLevel(e){const t=new St(e),n=e.supplemental;if(n!=null&&n.videoCodec&&!this.isVideoSupported(n.videoCodec)){const r=new Error(`SUPPLEMENTAL-CODECS not supported "${n.videoCodec}"`);this.log(r.message),t.supportedResult=Bn(r,[])}return t}isAudioSupported(e){return ke(e,"audio",this.hls.config.preferManagedMediaSource)}isVideoSupported(e){return ke(e,"video",this.hls.config.preferManagedMediaSource)}filterAndSortMediaOptions(e,t,n,r,i){let s=[],l=[],c=e;if((n||r)&&i&&(c=c.filter(({videoCodec:Y,videoRange:_e,width:Me,height:Ie})=>(!!Y||!!(Me&&Ie))&&Ue(_e))),c.length===0){Promise.resolve().then(()=>{if(this.hls){let Y="no level with compatible codecs found in manifest",_e=Y;t.levels.length&&(_e=`one or more CODECS in variant not supported: ${Et(t.levels.map(Ie=>Ie.attrs.CODECS).filter((Ie,st,ut)=>ut.indexOf(Ie)===st))}`,this.warn(_e),Y+=` (${_e})`);const Me=new Error(Y);this.hls.trigger(f.ERROR,{type:fe.MEDIA_ERROR,details:F.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:Me,reason:_e})}});return}t.audioTracks&&(s=t.audioTracks.filter(Y=>!Y.audioCodec||this.isAudioSupported(Y.audioCodec)),rl(s)),t.subtitles&&(l=t.subtitles,rl(l));const u=c.slice(0);c.sort((Y,_e)=>{if(Y.attrs["HDCP-LEVEL"]!==_e.attrs["HDCP-LEVEL"])return(Y.attrs["HDCP-LEVEL"]||"")>(_e.attrs["HDCP-LEVEL"]||"")?1:-1;if(n&&Y.height!==_e.height)return Y.height-_e.height;if(Y.frameRate!==_e.frameRate)return Y.frameRate-_e.frameRate;if(Y.videoRange!==_e.videoRange)return Wn.indexOf(Y.videoRange)-Wn.indexOf(_e.videoRange);if(Y.videoCodec!==_e.videoCodec){const Me=oe(Y.videoCodec),Ie=oe(_e.videoCodec);if(Me!==Ie)return Ie-Me}if(Y.uri===_e.uri&&Y.codecSet!==_e.codecSet){const Me=he(Y.codecSet),Ie=he(_e.codecSet);if(Me!==Ie)return Ie-Me}return Y.averageBitrate!==_e.averageBitrate?Y.averageBitrate-_e.averageBitrate:0});let d=u[0];if(this.steering&&(c=this.steering.filterParsedLevels(c),c.length!==u.length)){for(let Y=0;Y<u.length;Y++)if(u[Y].pathwayId===c[0].pathwayId){d=u[Y];break}}this._levels=c;for(let Y=0;Y<c.length;Y++)if(c[Y]===d){var p;this._firstLevel=Y;const _e=d.bitrate,Me=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${c.length} level(s) found, first bitrate: ${_e}`),((p=this.hls.userConfig)==null?void 0:p.abrEwmaDefaultEstimate)===void 0){const Ie=Math.min(_e,this.hls.config.abrEwmaDefaultEstimateMax);Ie>Me&&Me===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=Ie)}break}const b=i&&!r,w=this.hls.config,D=!!(w.audioStreamController&&w.audioTrackController),X={levels:c,audioTracks:s,subtitleTracks:l,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:i,video:r,altAudio:D&&!b&&s.some(Y=>!!Y.url)};this.hls.trigger(f.MANIFEST_PARSED,X)}get levels(){return this._levels.length===0?null:this._levels}get loadLevelObj(){return this.currentLevel}get level(){return this.currentLevelIndex}set level(e){const t=this._levels;if(t.length===0)return;if(e<0||e>=t.length){const d=new Error("invalid level idx"),p=e<0;if(this.hls.trigger(f.ERROR,{type:fe.OTHER_ERROR,details:F.LEVEL_SWITCH_ERROR,level:e,fatal:p,error:d,reason:d.message}),p)return;e=Math.min(e,t.length-1)}const n=this.currentLevelIndex,r=this.currentLevel,i=r?r.attrs["PATHWAY-ID"]:void 0,s=t[e],l=s.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=s,n===e&&r&&i===l)return;this.log(`Switching to level ${e} (${s.height?s.height+"p ":""}${s.videoRange?s.videoRange+" ":""}${s.codecSet?s.codecSet+" ":""}@${s.bitrate})${l?" with Pathway "+l:""} from level ${n}${i?" with Pathway "+i:""}`);const c={level:e,attrs:s.attrs,details:s.details,bitrate:s.bitrate,averageBitrate:s.averageBitrate,maxBitrate:s.maxBitrate,realBitrate:s.realBitrate,width:s.width,height:s.height,codecSet:s.codecSet,audioCodec:s.audioCodec,videoCodec:s.videoCodec,audioGroups:s.audioGroups,subtitleGroups:s.subtitleGroups,loaded:s.loaded,loadError:s.loadError,fragmentError:s.fragmentError,name:s.name,id:s.id,uri:s.uri,url:s.url,urlId:0,audioGroupIds:s.audioGroupIds,textGroupIds:s.textGroupIds};this.hls.trigger(f.LEVEL_SWITCHING,c);const u=s.details;if(!u||u.live){const d=this.switchParams(s.uri,r==null?void 0:r.details,u);this.loadPlaylist(d)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,this._startLevel===void 0&&(this._startLevel=e),e!==-1&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(this._startLevel===void 0){const e=this.hls.config.startLevel;return e!==void 0?e:this.hls.firstAutoLevel}return this._startLevel}set startLevel(e){this._startLevel=e}get pathways(){return this.steering?this.steering.pathways():[]}get pathwayPriority(){return this.steering?this.steering.pathwayPriority:null}set pathwayPriority(e){if(this.steering){const t=this.steering.pathways(),n=e.filter(r=>t.indexOf(r)!==-1);if(e.length<1){this.warn(`pathwayPriority ${e} should contain at least one pathway from list: ${t}`);return}this.steering.pathwayPriority=n}}onError(e,t){t.fatal||!t.context||t.context.type===ue.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===te.MAIN){const n=t.elementaryStreams;if(!Object.keys(n).some(i=>!!n[i]))return;const r=this._levels[t.level];r!=null&&r.loadError&&(this.log(`Resetting level error count of ${r.loadError} on frag buffered`),r.loadError=0)}}onLevelLoaded(e,t){var n;const{level:r,details:i}=t,s=t.levelInfo;if(!s){var l;this.warn(`Invalid level index ${r}`),(l=t.deliveryDirectives)!=null&&l.skip&&(i.deltaUpdateFailed=!0);return}if(s===this.currentLevel||t.withoutMultiVariant){s.fragmentError===0&&(s.loadError=0);let c=s.details;c===t.details&&c.advanced&&(c=void 0),this.playlistLoaded(r,t,c)}else(n=t.deliveryDirectives)!=null&&n.skip&&(i.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentLevel)&&this.scheduleLoading(this.currentLevel,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const n=this.getUrlWithDirectives(e.uri,t),r=this.currentLevelIndex,i=e.attrs["PATHWAY-ID"],s=e.details,l=s==null?void 0:s.age;this.log(`Loading level index ${r}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${i?" Pathway "+i:""}${l&&s.live?" age "+l.toFixed(1)+(s.type?" "+s.type||0:""):""} ${n}`),this.hls.trigger(f.LEVEL_LOADING,{url:n,level:r,levelInfo:e,pathwayId:e.attrs["PATHWAY-ID"],id:0,deliveryDirectives:t||null})}get nextLoadLevel(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;if(this._levels.length===1)return;const n=this._levels.filter((i,s)=>s!==e?!0:(this.steering&&this.steering.removeLevel(i),i===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,i.details&&i.details.fragments.forEach(l=>l.level=-1)),!1));Qr(n),this._levels=n,this.currentLevelIndex>-1&&(t=this.currentLevel)!=null&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.manualLevelIndex>-1&&(this.manualLevelIndex=this.currentLevelIndex);const r=n.length-1;this._firstLevel=Math.min(this._firstLevel,r),this._startLevel&&(this._startLevel=Math.min(this._startLevel,r)),this.hls.trigger(f.LEVELS_UPDATED,{levels:n})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:n}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(f.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:n}))}}function rl(a){const e={};a.forEach(t=>{const n=t.groupId||"";t.id=e[n]=e[n]||0,e[n]++})}function il(){return self.SourceBuffer||self.WebKitSourceBuffer}function sl(){if(!I())return!1;const e=il();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function jc(){if(!sl())return!1;const a=I();return typeof(a==null?void 0:a.isTypeSupported)=="function"&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some(e=>a.isTypeSupported(z(e,"video")))||["mp4a.40.2","fLaC"].some(e=>a.isTypeSupported(z(e,"audio"))))}function Yc(){var a;const e=il();return typeof(e==null||(a=e.prototype)==null?void 0:a.changeType)=="function"}const Xc=100;class Qc extends ni{constructor(e,t,n){super(e,t,n,"stream-controller",te.MAIN),this.audioCodecSwap=!1,this.level=-1,this._forceStartLoad=!1,this._hasEnoughToStart=!1,this.altAudio=0,this.audioOnly=!1,this.fragPlaying=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this.onMediaPlaying=()=>{this.tick()},this.onMediaSeeked=()=>{const r=this.media,i=r?r.currentTime:null;if(i===null||!x(i)||(this.log(`Media seeked to ${i.toFixed(3)}`),!this.getBufferedFrag(i)))return;const s=this.getFwdBufferInfoAtPos(r,i,te.MAIN,0);if(s===null||s.len===0){this.warn(`Main forward buffer length at ${i} on "seeked" event ${s?s.len:"empty"})`);return}this.tick()},this.registerListeners()}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(f.MANIFEST_PARSED,this.onManifestParsed,this),e.on(f.LEVEL_LOADING,this.onLevelLoading,this),e.on(f.LEVEL_LOADED,this.onLevelLoaded,this),e.on(f.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(f.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(f.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(f.BUFFER_CREATED,this.onBufferCreated,this),e.on(f.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(f.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(f.MANIFEST_PARSED,this.onManifestParsed,this),e.off(f.LEVEL_LOADED,this.onLevelLoaded,this),e.off(f.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(f.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(f.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(f.BUFFER_CREATED,this.onBufferCreated,this),e.off(f.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(f.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(f.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this.onMediaPlaying=this.onMediaSeeked=null,this.unregisterListeners(),super.onHandlerDestroying()}startLoad(e,t){if(this.levels){const{lastCurrentTime:n,hls:r}=this;if(this.stopLoad(),this.setInterval(Xc),this.level=-1,!this.startFragRequested){let i=r.startLevel;i===-1&&(r.config.testBandwidth&&this.levels.length>1?(i=0,this.bitrateTest=!0):i=r.firstAutoLevel),r.nextLoadLevel=i,this.level=r.loadLevel,this._hasEnoughToStart=!!t}n>0&&e===-1&&!t&&(this.log(`Override startPosition with lastCurrentTime @${n.toFixed(3)}`),e=n),this.state=Kt.IDLE,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=Kt.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case Kt.WAITING_LEVEL:{const{levels:t,level:n}=this,r=t==null?void 0:t[n],i=r==null?void 0:r.details;if(i&&(!i.live||this.levelLastLoaded===r&&!this.waitForLive(r))){if(this.waitForCdnTuneIn(i))break;this.state=Kt.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=Kt.IDLE;break}break}case Kt.FRAG_LOADING_WAITING_RETRY:{var e;const t=self.performance.now(),n=this.retryDate;if(!n||t>=n||(e=this.media)!=null&&e.seeking){const{levels:r,level:i}=this,s=r==null?void 0:r[i];this.resetStartWhenNotLoaded(s||null),this.state=Kt.IDLE}}break}this.state===Kt.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){var e;super.onTickEnd(),(e=this.media)!=null&&e.readyState&&this.media.seeking===!1&&(this.lastCurrentTime=this.media.currentTime),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:n,media:r}=this;if(t===null||!r&&!this.primaryPrefetch&&(this.startFragRequested||!e.config.startFragPrefetch)||this.altAudio&&this.audioOnly)return;const i=this.buffering?e.nextLoadLevel:e.loadLevel;if(!(n!=null&&n[i]))return;const s=n[i],l=this.getMainFwdBufferInfo();if(l===null)return;const c=this.getLevelDetails();if(c&&this._streamEnded(l,c)){const X={};this.altAudio===2&&(X.type="video"),this.hls.trigger(f.BUFFER_EOS,X),this.state=Kt.ENDED;return}if(!this.buffering)return;e.loadLevel!==i&&e.manualLevel===-1&&this.log(`Adapting to level ${i} from level ${this.level}`),this.level=e.nextLoadLevel=i;const u=s.details;if(!u||this.state===Kt.WAITING_LEVEL||this.waitForLive(s)){this.level=i,this.state=Kt.WAITING_LEVEL,this.startFragRequested=!1;return}const d=l.len,p=this.getMaxBufferLength(s.maxBitrate);if(d>=p)return;this.backtrackFragment&&this.backtrackFragment.start>l.end&&(this.backtrackFragment=null);const b=this.backtrackFragment?this.backtrackFragment.start:l.end;let w=this.getNextFragment(b,u);if(this.couldBacktrack&&!this.fragPrevious&&w&&se(w)&&this.fragmentTracker.getState(w)!==We.OK){var D;const Y=((D=this.backtrackFragment)!=null?D:w).sn-u.startSN,_e=u.fragments[Y-1];_e&&w.cc===_e.cc&&(w=_e,this.fragmentTracker.removeFragment(_e))}else this.backtrackFragment&&l.len&&(this.backtrackFragment=null);if(w&&this.isLoopLoading(w,b)){if(!w.gap){const Y=this.audioOnly&&!this.altAudio?m.AUDIO:m.VIDEO,_e=(Y===m.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;_e&&this.afterBufferFlushed(_e,Y,te.MAIN)}w=this.getNextFragmentLoopLoading(w,u,l,te.MAIN,p)}w&&(w.initSegment&&!w.initSegment.data&&!this.bitrateTest&&(w=w.initSegment),this.loadFragment(w,s,b))}loadFragment(e,t,n){const r=this.fragmentTracker.getState(e);r===We.NOT_LOADED||r===We.PARTIAL?se(e)?this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,t)):super.loadFragment(e,t,n):this._loadInitSegment(e,t):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,te.MAIN)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:t}=this;if(t!=null&&t.readyState){let n;const r=this.getAppendedFrag(t.currentTime);r&&r.start>1&&this.flushMainBuffer(0,r.start-1);const i=this.getLevelDetails();if(i!=null&&i.live){const l=this.getMainFwdBufferInfo();if(!l||l.len<i.targetduration*2)return}if(!t.paused&&e){const l=this.hls.nextLoadLevel,c=e[l],u=this.fragLastKbps;u&&this.fragCurrent?n=this.fragCurrent.duration*c.maxBitrate/(1e3*u)+1:n=0}else n=0;const s=this.getBufferedFrag(t.currentTime+n);if(s){const l=this.followingBufferedFrag(s);if(l){this.abortCurrentFrag();const c=l.maxStartPTS?l.maxStartPTS:l.start,u=l.duration,d=Math.max(s.end,c+Math.min(Math.max(u-this.config.maxFragLookUpTolerance,u*(this.couldBacktrack?.5:.125)),u*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(d,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case Kt.KEY_LOADING:case Kt.FRAG_LOADING:case Kt.FRAG_LOADING_WAITING_RETRY:case Kt.PARSING:case Kt.PARSED:this.state=Kt.IDLE;break}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,this.altAudio===2?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const n=t.media;qi(n,"playing",this.onMediaPlaying),qi(n,"seeked",this.onMediaSeeked)}onMediaDetaching(e,t){const{media:n}=this;n&&(Gi(n,"playing",this.onMediaPlaying),Gi(n,"seeked",this.onMediaSeeked)),this.videoBuffer=null,this.fragPlaying=null,super.onMediaDetaching(e,t),!t.transferMedia&&(this._hasEnoughToStart=!1)}onManifestLoading(){super.onManifestLoading(),this.log("Trigger BUFFER_RESET"),this.hls.trigger(f.BUFFER_RESET,void 0),this.couldBacktrack=!1,this.fragLastKbps=0,this.fragPlaying=this.backtrackFragment=null,this.altAudio=0,this.audioOnly=!1}onManifestParsed(e,t){let n=!1,r=!1;t.levels.forEach(i=>{const s=i.audioCodec;s&&(n=n||s.indexOf("mp4a.40.2")!==-1,r=r||s.indexOf("mp4a.40.5")!==-1)}),this.audioCodecSwitch=n&&r&&!Yc(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1}onLevelLoading(e,t){const{levels:n}=this;if(!n||this.state!==Kt.IDLE)return;const r=t.levelInfo;(!r.details||r.details.live&&(this.levelLastLoaded!==r||r.details.expired)||this.waitForCdnTuneIn(r.details))&&(this.state=Kt.WAITING_LEVEL)}onLevelLoaded(e,t){var n;const{levels:r,startFragRequested:i}=this,s=t.level,l=t.details,c=l.totalduration;if(!r){this.warn(`Levels were reset while loading level ${s}`);return}this.log(`Level ${s} loaded [${l.startSN},${l.endSN}]${l.lastPartSn?`[part-${l.lastPartSn}-${l.lastPartIndex}]`:""}, cc [${l.startCC}, ${l.endCC}] duration:${c}`);const u=t.levelInfo,d=this.fragCurrent;d&&(this.state===Kt.FRAG_LOADING||this.state===Kt.FRAG_LOADING_WAITING_RETRY)&&d.level!==t.level&&d.loader&&this.abortCurrentFrag();let p=0;if(l.live||(n=u.details)!=null&&n.live){var b;if(this.checkLiveUpdate(l),l.deltaUpdateFailed)return;p=this.alignPlaylists(l,u.details,(b=this.levelLastLoaded)==null?void 0:b.details)}if(u.details=l,this.levelLastLoaded=u,i||this.setStartPosition(l,p),this.hls.trigger(f.LEVEL_UPDATED,{details:l,level:s}),this.state===Kt.WAITING_LEVEL){if(this.waitForCdnTuneIn(l))return;this.state=Kt.IDLE}i&&l.live&&this.synchronizeToLiveEdge(l),this.tick()}synchronizeToLiveEdge(e){const{config:t,media:n}=this;if(!n)return;const r=this.hls.liveSyncPosition,i=this.getLoadPosition(),s=e.fragmentStart,l=e.edge,c=i>=s-t.maxFragLookUpTolerance&&i<=l;if(r!==null&&n.duration>r&&(i<r||!c)){const u=t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;(!c&&n.readyState<4||i<l-u)&&(this._hasEnoughToStart||(this.nextLoadPosition=r),n.readyState&&(this.warn(`Playback: ${i.toFixed(3)} is located too far from the end of live sliding playlist: ${l}, reset currentTime to : ${r.toFixed(3)}`),n.currentTime=r))}}_handleFragmentLoadProgress(e){var t;const n=e.frag,{part:r,payload:i}=e,{levels:s}=this;if(!s){this.warn(`Levels were reset while fragment load was in progress. Fragment ${n.sn} of level ${n.level} will not be buffered`);return}const l=s[n.level];if(!l){this.warn(`Level ${n.level} not found on progress`);return}const c=l.details;if(!c){this.warn(`Dropping fragment ${n.sn} of level ${n.level} after level details were reset`),this.fragmentTracker.removeFragment(n);return}const u=l.videoCodec,d=c.PTSKnown||!c.live,p=(t=n.initSegment)==null?void 0:t.data,b=this._getAudioCodec(l),w=this.transmuxer=this.transmuxer||new mo(this.hls,te.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),D=r?r.index:-1,X=D!==-1,Y=new ir(n.level,n.sn,n.stats.chunkCount,i.byteLength,D,X),_e=this.initPTS[n.cc];w.push(i,p,b,u,n,r,c.totalduration,d,Y,_e)}onAudioTrackSwitching(e,t){const n=this.hls,r=this.altAudio===2;if($t(t.url,n))this.altAudio=1;else{if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const s=this.fragCurrent;s&&(this.log("Switching to main audio track, cancel main fragment load"),s.abortRequests(),this.fragmentTracker.removeFragment(s)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();if(r){this.fragmentTracker.removeAllFragments(),n.once(f.BUFFER_FLUSHED,()=>{var s;(s=this.hls)==null||s.trigger(f.AUDIO_TRACK_SWITCHED,t)}),n.trigger(f.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null});return}n.trigger(f.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const n=$t(t.url,this.hls);if(n){const r=this.videoBuffer;r&&this.mediaBuffer!==r&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=r)}this.altAudio=n?2:0,this.tick()}onBufferCreated(e,t){const n=t.tracks;let r,i,s=!1;for(const l in n){const c=n[l];if(c.id==="main"){if(i=l,r=c,l==="video"){const u=n[l];u&&(this.videoBuffer=u.buffer)}}else s=!0}s&&r?(this.log(`Alternate track found, use ${i}.buffered to schedule main fragment loading`),this.mediaBuffer=r.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:n,part:r}=t,i=n.type===te.MAIN;if(i){if(this.fragContextChanged(n)){this.warn(`Fragment ${n.sn}${r?" p: "+r.index:""} of level ${n.level} finished buffering, but was aborted. state: ${this.state}`),this.state===Kt.PARSED&&(this.state=Kt.IDLE);return}const l=r?r.stats:n.stats;this.fragLastKbps=Math.round(8*l.total/(l.buffering.end-l.loading.first)),se(n)&&(this.fragPrevious=n),this.fragBufferedComplete(n,r)}const s=this.media;s&&(!this._hasEnoughToStart&&hn.getBuffered(s).length&&(this._hasEnoughToStart=!0,this.seekToStartPos()),i&&this.tick())}get hasEnoughToStart(){return this._hasEnoughToStart}onError(e,t){var n;if(t.fatal){this.state=Kt.ERROR;return}switch(t.details){case F.FRAG_GAP:case F.FRAG_PARSING_ERROR:case F.FRAG_DECRYPT_ERROR:case F.FRAG_LOAD_ERROR:case F.FRAG_LOAD_TIMEOUT:case F.KEY_LOAD_ERROR:case F.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(te.MAIN,t);break;case F.LEVEL_LOAD_ERROR:case F.LEVEL_LOAD_TIMEOUT:case F.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Kt.WAITING_LEVEL&&((n=t.context)==null?void 0:n.type)===ue.LEVEL&&(this.state=Kt.IDLE);break;case F.BUFFER_ADD_CODEC_ERROR:case F.BUFFER_APPEND_ERROR:if(t.parent!=="main")return;this.resetLoadingState();break;case F.BUFFER_FULL_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case F.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onFragLoadEmergencyAborted(){this.state=Kt.IDLE,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==m.AUDIO||!this.altAudio){const n=(t===m.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;n&&(this.afterBufferFlushed(n,t,te.MAIN),this.tick())}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level,this.level===-1&&this.resetWhenMissingContext(this.fragCurrent)),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let n=this.startPosition;if(n>=0&&t<n){if(e.seeking){this.log(`could not seek to ${n}, already seeking at ${t}`);return}const r=this.timelineOffset;r&&n&&(n+=r);const i=this.getLevelDetails(),s=hn.getBuffered(e),l=s.length?s.start(0):0,c=l-n,u=Math.max(this.config.maxBufferHole,this.config.maxFragLookUpTolerance);c>0&&(c<u||this.loadingParts&&c<2*((i==null?void 0:i.partTarget)||0))&&(this.log(`adjusting start position by ${c} to match buffer start`),n+=c,this.startPosition=n),t<n&&(this.log(`seek to target start position ${n} from current time ${t} buffer start ${l}`),e.currentTime=n)}}_getAudioCodec(e){let t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t.indexOf("mp4a.40.5")!==-1?t="mp4a.40.2":t="mp4a.40.5"),t}_loadBitrateTestFrag(e,t){e.bitrateTest=!0,this._doFragLoad(e,t).then(n=>{const{hls:r}=this,i=n==null?void 0:n.frag;if(!i||this.fragContextChanged(i))return;t.fragmentError=0,this.state=Kt.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const s=i.stats;s.parsing.start=s.parsing.end=s.buffering.start=s.buffering.end=self.performance.now(),r.trigger(f.FRAG_LOADED,n),i.bitrateTest=!1})}_handleTransmuxComplete(e){var t;const n=this.playlistType,{hls:r}=this,{remuxResult:i,chunkMeta:s}=e,l=this.getCurrentContext(s);if(!l){this.resetWhenMissingContext(s);return}const{frag:c,part:u,level:d}=l,{video:p,text:b,id3:w,initSegment:D}=i,{details:X}=d,Y=this.altAudio?void 0:i.audio;if(this.fragContextChanged(c)){this.fragmentTracker.removeFragment(c);return}if(this.state=Kt.PARSING,D){if(D!=null&&D.tracks){const Ie=c.initSegment||c;this._bufferInitSegment(d,D.tracks,Ie,s),r.trigger(f.FRAG_PARSING_INIT_SEGMENT,{frag:Ie,id:n,tracks:D.tracks})}const _e=D.initPTS,Me=D.timescale;x(_e)&&(this.initPTS[c.cc]={baseTime:_e,timescale:Me},r.trigger(f.INIT_PTS_FOUND,{frag:c,id:n,initPTS:_e,timescale:Me}))}if(p&&X){Y&&p.type==="audiovideo"&&this.logMuxedErr(c);const _e=X.fragments[c.sn-1-X.startSN],Me=c.sn===X.startSN,Ie=!_e||c.cc>_e.cc;if(i.independent!==!1){const{startPTS:st,endPTS:ut,startDTS:Mt,endDTS:ct}=p;if(u)u.elementaryStreams[p.type]={startPTS:st,endPTS:ut,startDTS:Mt,endDTS:ct};else if(p.firstKeyFrame&&p.independent&&s.id===1&&!Ie&&(this.couldBacktrack=!0),p.dropped&&p.independent){const At=this.getMainFwdBufferInfo(),Ht=(At?At.end:this.getLoadPosition())+this.config.maxBufferHole,mt=p.firstKeyFramePTS?p.firstKeyFramePTS:st;if(!Me&&Ht<mt-this.config.maxBufferHole&&!Ie){this.backtrack(c);return}else Ie&&(c.gap=!0);c.setElementaryStreamInfo(p.type,c.start,ut,c.start,ct,!0)}else Me&&st-(X.appliedTimelineOffset||0)>fa&&(c.gap=!0);c.setElementaryStreamInfo(p.type,st,ut,Mt,ct),this.backtrackFragment&&(this.backtrackFragment=c),this.bufferFragmentData(p,c,u,s,Me||Ie)}else if(Me||Ie)c.gap=!0;else{this.backtrack(c);return}}if(Y){const{startPTS:_e,endPTS:Me,startDTS:Ie,endDTS:st}=Y;u&&(u.elementaryStreams[m.AUDIO]={startPTS:_e,endPTS:Me,startDTS:Ie,endDTS:st}),c.setElementaryStreamInfo(m.AUDIO,_e,Me,Ie,st),this.bufferFragmentData(Y,c,u,s)}if(X&&w!=null&&(t=w.samples)!=null&&t.length){const _e={id:n,frag:c,details:X,samples:w.samples};r.trigger(f.FRAG_PARSING_METADATA,_e)}if(X&&b){const _e={id:n,frag:c,details:X,samples:b.samples};r.trigger(f.FRAG_PARSING_USERDATA,_e)}}logMuxedErr(e){this.warn(`${se(e)?"Media":"Init"} segment with muxed audiovideo where only video expected: ${e.url}`)}_bufferInitSegment(e,t,n,r){if(this.state!==Kt.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&(delete t.audio,t.audiovideo&&this.logMuxedErr(n));const{audio:i,video:s,audiovideo:l}=t;if(i){let u=ft(i.codec,e.audioCodec);u==="mp4a"&&(u="mp4a.40.5");const d=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){u&&(u.indexOf("mp4a.40.5")!==-1?u="mp4a.40.2":u="mp4a.40.5");const p=i.metadata;p&&"channelCount"in p&&(p.channelCount||1)!==1&&d.indexOf("firefox")===-1&&(u="mp4a.40.5")}u&&u.indexOf("mp4a.40.5")!==-1&&d.indexOf("android")!==-1&&i.container!=="audio/mpeg"&&(u="mp4a.40.2",this.log(`Android: force audio codec to ${u}`)),e.audioCodec&&e.audioCodec!==u&&this.log(`Swapping manifest audio codec "${e.audioCodec}" for "${u}"`),i.levelCodec=u,i.id=te.MAIN,this.log(`Init audio buffer, container:${i.container}, codecs[selected/level/parsed]=[${u||""}/${e.audioCodec||""}/${i.codec}]`),delete t.audiovideo}if(s){s.levelCodec=e.videoCodec,s.id=te.MAIN;const u=s.codec;if((u==null?void 0:u.length)===4)switch(u){case"hvc1":case"hev1":s.codec="hvc1.1.6.L120.90";break;case"av01":s.codec="av01.0.04M.08";break;case"avc1":s.codec="avc1.42e01e";break}this.log(`Init video buffer, container:${s.container}, codecs[level/parsed]=[${e.videoCodec||""}/${u}]${s.codec!==u?" parsed-corrected="+s.codec:""}${s.supplemental?" supplemental="+s.supplemental:""}`),delete t.audiovideo}l&&(this.log(`Init audiovideo buffer, container:${l.container}, codecs[level/parsed]=[${e.codecs}/${l.codec}]`),delete t.video,delete t.audio);const c=Object.keys(t);if(c.length){if(this.hls.trigger(f.BUFFER_CODECS,t),!this.hls)return;c.forEach(u=>{const p=t[u].initSegment;p!=null&&p.byteLength&&this.hls.trigger(f.BUFFER_APPENDING,{type:u,data:p,frag:n,part:null,chunkMeta:r,parent:n.type})})}this.tickImmediate()}getMainFwdBufferInfo(){const e=this.mediaBuffer&&this.altAudio===2?this.mediaBuffer:this.media;return this.getFwdBufferInfo(e,te.MAIN)}get maxBufferLength(){const{levels:e,level:t}=this,n=e==null?void 0:e[t];return n?this.getMaxBufferLength(n.maxBitrate):this.config.maxBufferLength}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=Kt.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const n=e.currentTime;if(hn.isBuffered(e,n)?t=this.getAppendedFrag(n):hn.isBuffered(e,n+.1)&&(t=this.getAppendedFrag(n+.1)),t){this.backtrackFragment=null;const r=this.fragPlaying,i=t.level;(!r||t.sn!==r.sn||r.level!==i)&&(this.fragPlaying=t,this.hls.trigger(f.FRAG_CHANGED,{frag:t}),(!r||r.level!==i)&&this.hls.trigger(f.LEVEL_SWITCHED,{level:i}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){var e;if(this.fragPlaying)return this.fragPlaying;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;return x(t)?this.getAppendedFrag(t):null}get currentProgramDateTime(){var e;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;if(x(t)){const n=this.getLevelDetails(),r=this.currentFrag||(n?Cn(null,n.fragments,t):null);if(r){const i=r.programDateTime;if(i!==null){const s=i+(t-r.start)*1e3;return new Date(s)}}}return null}get currentLevel(){const e=this.currentFrag;return e?e.level:-1}get nextBufferedFrag(){const e=this.currentFrag;return e?this.followingBufferedFrag(e):null}get forceStartLoad(){return this._forceStartLoad}}class Jc{constructor(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const n in this.keyUriToKeyInfo){const r=this.keyUriToKeyInfo[n].loader;if(r){var t;if(e&&e!==((t=r.context)==null?void 0:t.frag.type))return;r.abort()}}}detach(){for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e].loader;t&&t.destroy()}this.keyUriToKeyInfo={}}createKeyLoadError(e,t=F.KEY_LOAD_ERROR,n,r,i){return new dn({type:fe.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:i,error:n,networkDetails:r})}loadClear(e,t){if(this.emeController&&this.config.emeEnabled){const{sn:n,cc:r}=e;for(let i=0;i<t.length;i++){const s=t[i];if(r<=s.cc&&(n==="initSegment"||s.sn==="initSegment"||n<s.sn)){this.emeController.selectKeySystemFormat(s).then(l=>{s.setKeyFormat(l)});break}}}}load(e){return!e.decryptdata&&e.encrypted&&this.emeController&&this.config.emeEnabled?this.emeController.selectKeySystemFormat(e).then(t=>this.loadInternal(e,t)):this.loadInternal(e)}loadInternal(e,t){var n,r;t&&e.setKeyFormat(t);const i=e.decryptdata;if(!i){const u=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,F.KEY_LOAD_ERROR,u))}const s=i.uri;if(!s)return Promise.reject(this.createKeyLoadError(e,F.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${s}"`)));let l=this.keyUriToKeyInfo[s];if((n=l)!=null&&n.decryptdata.key)return i.key=l.decryptdata.key,Promise.resolve({frag:e,keyInfo:l});if((r=l)!=null&&r.keyLoadPromise){var c;switch((c=l.mediaKeySessionContext)==null?void 0:c.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return l.keyLoadPromise.then(u=>(i.key=u.keyInfo.decryptdata.key,{frag:e,keyInfo:l}))}}switch(l=this.keyUriToKeyInfo[s]={decryptdata:i,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},i.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return i.keyFormat==="identity"?this.loadKeyHTTP(l,e):this.loadKeyEME(l,e);case"AES-128":case"AES-256":case"AES-256-CTR":return this.loadKeyHTTP(l,e);default:return Promise.reject(this.createKeyLoadError(e,F.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${i.method}"`)))}}loadKeyEME(e,t){const n={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const r=this.emeController.loadKey(n);if(r)return(e.keyLoadPromise=r.then(i=>(e.mediaKeySessionContext=i,n))).catch(i=>{throw e.keyLoadPromise=null,i})}return Promise.resolve(n)}loadKeyHTTP(e,t){const n=this.config,r=n.loader,i=new r(n);return t.keyLoader=e.loader=i,e.keyLoadPromise=new Promise((s,l)=>{const c={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},u=n.keyLoadPolicy.default,d={loadPolicy:u,timeout:u.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},p={onSuccess:(b,w,D,X)=>{const{frag:Y,keyInfo:_e,url:Me}=D;if(!Y.decryptdata||_e!==this.keyUriToKeyInfo[Me])return l(this.createKeyLoadError(Y,F.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),X));_e.decryptdata.key=Y.decryptdata.key=new Uint8Array(b.data),Y.keyLoader=null,_e.loader=null,s({frag:Y,keyInfo:_e})},onError:(b,w,D,X)=>{this.resetLoader(w),l(this.createKeyLoadError(t,F.KEY_LOAD_ERROR,new Error(`HTTP Error ${b.code} loading key ${b.text}`),D,_({url:c.url,data:void 0},b)))},onTimeout:(b,w,D)=>{this.resetLoader(w),l(this.createKeyLoadError(t,F.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),D))},onAbort:(b,w,D)=>{this.resetLoader(w),l(this.createKeyLoadError(t,F.INTERNAL_ABORTED,new Error("key loading aborted"),D))}};i.load(c,d,p)})}resetLoader(e){const{frag:t,keyInfo:n,url:r}=e,i=n.loader;t.keyLoader===i&&(t.keyLoader=null,n.loader=null),delete this.keyUriToKeyInfo[r],i&&i.destroy()}}function al(a){const{type:e}=a;switch(e){case ue.AUDIO_TRACK:return te.AUDIO;case ue.SUBTITLE_TRACK:return te.SUBTITLE;default:return te.MAIN}}function Va(a,e){let t=a.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class qc{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.onManifestLoaded=this.checkAutostartLoad,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(f.MANIFEST_LOADING,this.onManifestLoading,this),e.on(f.LEVEL_LOADING,this.onLevelLoading,this),e.on(f.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(f.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.on(f.LEVELS_UPDATED,this.onLevelsUpdated,this)}unregisterListeners(){const{hls:e}=this;e.off(f.MANIFEST_LOADING,this.onManifestLoading,this),e.off(f.LEVEL_LOADING,this.onLevelLoading,this),e.off(f.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(f.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.off(f.LEVELS_UPDATED,this.onLevelsUpdated,this)}createInternalLoader(e){const t=this.hls.config,n=t.pLoader,r=t.loader,i=n||r,s=new i(t);return this.loaders[e.type]=s,s}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,t){const{url:n}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:ue.MANIFEST,url:n,deliveryDirectives:null,levelOrTrack:null})}onLevelLoading(e,t){const{id:n,level:r,pathwayId:i,url:s,deliveryDirectives:l,levelInfo:c}=t;this.load({id:n,level:r,pathwayId:i,responseType:"text",type:ue.LEVEL,url:s,deliveryDirectives:l,levelOrTrack:c})}onAudioTrackLoading(e,t){const{id:n,groupId:r,url:i,deliveryDirectives:s,track:l}=t;this.load({id:n,groupId:r,level:null,responseType:"text",type:ue.AUDIO_TRACK,url:i,deliveryDirectives:s,levelOrTrack:l})}onSubtitleTrackLoading(e,t){const{id:n,groupId:r,url:i,deliveryDirectives:s,track:l}=t;this.load({id:n,groupId:r,level:null,responseType:"text",type:ue.SUBTITLE_TRACK,url:i,deliveryDirectives:s,levelOrTrack:l})}onLevelsUpdated(e,t){const n=this.loaders[ue.LEVEL];if(n){const r=n.context;r&&!t.levels.some(i=>i===r.levelOrTrack)&&(n.abort(),delete this.loaders[ue.LEVEL])}}load(e){var t;const n=this.hls.config;let r=this.getInternalLoader(e);if(r){const u=this.hls.logger,d=r.context;if(d&&d.levelOrTrack===e.levelOrTrack&&(d.url===e.url||d.deliveryDirectives&&!e.deliveryDirectives)){d.url===e.url?u.log(`[playlist-loader]: ignore ${e.url} ongoing request`):u.log(`[playlist-loader]: ignore ${e.url} in favor of ${d.url}`);return}u.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),r.abort()}let i;if(e.type===ue.MANIFEST?i=n.manifestLoadPolicy.default:i=h({},n.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),r=this.createInternalLoader(e),x((t=e.deliveryDirectives)==null?void 0:t.part)){let u;if(e.type===ue.LEVEL&&e.level!==null?u=this.hls.levels[e.level].details:e.type===ue.AUDIO_TRACK&&e.id!==null?u=this.hls.audioTracks[e.id].details:e.type===ue.SUBTITLE_TRACK&&e.id!==null&&(u=this.hls.subtitleTracks[e.id].details),u){const d=u.partTarget,p=u.targetduration;if(d&&p){const b=Math.max(d*3,p*.8)*1e3;i=h({},i,{maxTimeToFirstByteMs:Math.min(b,i.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(b,i.maxTimeToFirstByteMs)})}}}const s=i.errorRetry||i.timeoutRetry||{},l={loadPolicy:i,timeout:i.maxLoadTimeMs,maxRetry:s.maxNumRetry||0,retryDelay:s.retryDelayMs||0,maxRetryDelay:s.maxRetryDelayMs||0},c={onSuccess:(u,d,p,b)=>{const w=this.getInternalLoader(p);this.resetInternalLoader(p.type);const D=u.data;if(D.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(u,p,new Error("no EXTM3U delimiter"),b||null,d);return}d.parsing.start=performance.now(),ui.isMediaPlaylist(D)||p.type!==ue.MANIFEST?this.handleTrackOrLevelPlaylist(u,d,p,b||null,w):this.handleMasterPlaylist(u,d,p,b)},onError:(u,d,p,b)=>{this.handleNetworkError(d,p,!1,u,b)},onTimeout:(u,d,p)=>{this.handleNetworkError(d,p,!0,void 0,u)}};r.load(e,l,c)}checkAutostartLoad(){if(!this.hls)return;const{config:{autoStartLoad:e,startPosition:t},forceStartLoad:n}=this.hls;(e||n)&&(this.hls.logger.log(`${e?"auto":"force"} startLoad with configured startPosition ${t}`),this.hls.startLoad(t))}handleMasterPlaylist(e,t,n,r){const i=this.hls,s=e.data,l=Va(e,n),c=ui.parseMasterPlaylist(s,l);if(c.playlistParsingError){this.handleManifestParsingError(e,n,c.playlistParsingError,r,t);return}const{contentSteering:u,levels:d,sessionData:p,sessionKeys:b,startTimeOffset:w,variableList:D}=c;this.variableList=D;const{AUDIO:X=[],SUBTITLES:Y,"CLOSED-CAPTIONS":_e}=ui.parseMasterPlaylistMedia(s,l,c);X.length&&!X.some(Ie=>!Ie.url)&&d[0].audioCodec&&!d[0].attrs.AUDIO&&(this.hls.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),X.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new Fn({}),bitrate:0,url:""})),i.trigger(f.MANIFEST_LOADED,{levels:d,audioTracks:X,subtitles:Y,captions:_e,contentSteering:u,url:l,stats:t,networkDetails:r,sessionData:p,sessionKeys:b,startTimeOffset:w,variableList:D})}handleTrackOrLevelPlaylist(e,t,n,r,i){const s=this.hls,{id:l,level:c,type:u}=n,d=Va(e,n),p=x(c)?c:x(l)?l:0,b=al(n),w=ui.parseLevelPlaylist(e.data,d,p,b,0,this.variableList);if(u===ue.MANIFEST){const D={attrs:new Fn({}),bitrate:0,details:w,name:"",url:d};w.requestScheduled=t.loading.start+Xr(w,0),s.trigger(f.MANIFEST_LOADED,{levels:[D],audioTracks:[],url:d,stats:t,networkDetails:r,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),n.levelDetails=w,this.handlePlaylistLoaded(w,e,t,n,r,i)}handleManifestParsingError(e,t,n,r,i){this.hls.trigger(f.ERROR,{type:fe.NETWORK_ERROR,details:F.MANIFEST_PARSING_ERROR,fatal:t.type===ue.MANIFEST,url:e.url,err:n,error:n,reason:n.message,response:e,context:t,networkDetails:r,stats:i})}handleNetworkError(e,t,n=!1,r,i){let s=`A network ${n?"timeout":"error"+(r?" (status "+r.code+")":"")} occurred while loading ${e.type}`;e.type===ue.LEVEL?s+=`: ${e.level} id: ${e.id}`:(e.type===ue.AUDIO_TRACK||e.type===ue.SUBTITLE_TRACK)&&(s+=` id: ${e.id} group-id: "${e.groupId}"`);const l=new Error(s);this.hls.logger.warn(`[playlist-loader]: ${s}`);let c=F.UNKNOWN,u=!1;const d=this.getInternalLoader(e);switch(e.type){case ue.MANIFEST:c=n?F.MANIFEST_LOAD_TIMEOUT:F.MANIFEST_LOAD_ERROR,u=!0;break;case ue.LEVEL:c=n?F.LEVEL_LOAD_TIMEOUT:F.LEVEL_LOAD_ERROR,u=!1;break;case ue.AUDIO_TRACK:c=n?F.AUDIO_TRACK_LOAD_TIMEOUT:F.AUDIO_TRACK_LOAD_ERROR,u=!1;break;case ue.SUBTITLE_TRACK:c=n?F.SUBTITLE_TRACK_LOAD_TIMEOUT:F.SUBTITLE_LOAD_ERROR,u=!1;break}d&&this.resetInternalLoader(e.type);const p={type:fe.NETWORK_ERROR,details:c,fatal:u,url:e.url,loader:d,context:e,error:l,networkDetails:t,stats:i};if(r){const b=(t==null?void 0:t.url)||e.url;p.response=_({url:b,data:void 0},r)}this.hls.trigger(f.ERROR,p)}handlePlaylistLoaded(e,t,n,r,i,s){const l=this.hls,{type:c,level:u,id:d,groupId:p,deliveryDirectives:b}=r,w=Va(t,r),D=al(r),X=typeof r.level=="number"&&D===te.MAIN?u:void 0;if(!e.fragments.length){const _e=e.playlistParsingError=new Error("No Segments found in Playlist");l.trigger(f.ERROR,{type:fe.NETWORK_ERROR,details:F.LEVEL_EMPTY_ERROR,fatal:!1,url:w,error:_e,reason:_e.message,response:t,context:r,level:X,parent:D,networkDetails:i,stats:n});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const Y=e.playlistParsingError;if(Y){if(this.hls.logger.warn(Y),!l.config.ignorePlaylistParsingErrors){l.trigger(f.ERROR,{type:fe.NETWORK_ERROR,details:F.LEVEL_PARSING_ERROR,fatal:!1,url:w,error:Y,reason:Y.message,response:t,context:r,level:X,parent:D,networkDetails:i,stats:n});return}e.playlistParsingError=null}switch(e.live&&s&&(s.getCacheAge&&(e.ageHeader=s.getCacheAge()||0),(!s.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),c){case ue.MANIFEST:case ue.LEVEL:l.trigger(f.LEVEL_LOADED,{details:e,levelInfo:r.levelOrTrack||l.levels[0],level:X||0,id:d||0,stats:n,networkDetails:i,deliveryDirectives:b,withoutMultiVariant:c===ue.MANIFEST});break;case ue.AUDIO_TRACK:l.trigger(f.AUDIO_TRACK_LOADED,{details:e,track:r.levelOrTrack,id:d||0,groupId:p||"",stats:n,networkDetails:i,deliveryDirectives:b});break;case ue.SUBTITLE_TRACK:l.trigger(f.SUBTITLE_TRACK_LOADED,{details:e,track:r.levelOrTrack,id:d||0,groupId:p||"",stats:n,networkDetails:i,deliveryDirectives:b});break}}}class ps{static get version(){return us}static isMSESupported(){return sl()}static isSupported(){return jc()}static getMediaSource(){return I()}static get Events(){return f}static get MetadataSchema(){return Si}static get ErrorTypes(){return fe}static get ErrorDetails(){return F}static get DefaultConfig(){return ps.defaultConfig?ps.defaultConfig:Fc}static set DefaultConfig(e){ps.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.logger=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new Zi,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioStreamController=void 0,this.subtititleStreamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.interstitialsController=void 0,this.gapController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this._url=null,this._sessionId=void 0,this.triggeringException=void 0,this.started=!1;const t=this.logger=ee(e.debug||!1,"Hls instance",e.assetPlayerId),n=this.config=Mc(ps.DefaultConfig,e,t);this.userConfig=e,n.progressive&&Bc(n,t);const{abrController:r,bufferController:i,capLevelController:s,errorController:l,fpsController:c}=n,u=new l(this),d=this.abrController=new r(this),p=new it(this),b=n.interstitialsController,w=b?this.interstitialsController=new b(this,ps):null,D=this.bufferController=new i(this,p),X=this.capLevelController=new s(this),Y=new c(this),_e=new qc(this),Me=n.contentSteeringController,Ie=Me?new Me(this):null,st=this.levelController=new $c(this,Ie),ut=new Wc(this),Mt=new Jc(this.config),ct=this.streamController=new Qc(this,p,Mt),At=this.gapController=new zc(this,p);X.setStreamController(ct),Y.setStreamController(ct);const Ht=[_e,st,ct];w&&Ht.splice(1,0,w),Ie&&Ht.splice(1,0,Ie),this.networkControllers=Ht;const mt=[d,D,At,X,Y,ut,p];this.audioTrackController=this.createController(n.audioTrackController,Ht);const En=n.audioStreamController;En&&Ht.push(this.audioStreamController=new En(this,p,Mt)),this.subtitleTrackController=this.createController(n.subtitleTrackController,Ht);const Mn=n.subtitleStreamController;Mn&&Ht.push(this.subtititleStreamController=new Mn(this,p,Mt)),this.createController(n.timelineController,mt),Mt.emeController=this.emeController=this.createController(n.emeController,mt),this.cmcdController=this.createController(n.cmcdController,mt),this.latencyController=this.createController(Vc,mt),this.coreComponents=mt,Ht.push(u);const Lr=u.onErrorOut;typeof Lr=="function"&&this.on(f.ERROR,Lr,u),this.on(f.MANIFEST_LOADED,_e.onManifestLoaded,_e)}createController(e,t){if(e){const n=new e(this);return t&&t.push(n),n}return null}on(e,t,n=this){this._emitter.on(e,t,n)}once(e,t,n=this){this._emitter.once(e,t,n)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,n=this,r){this._emitter.off(e,t,n,r)}listeners(e){return this._emitter.listeners(e)}emit(e,t,n){return this._emitter.emit(e,t,n)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(n){if(this.logger.error("An internal error happened while handling event "+e+'. Error message: "'+n.message+'". Here is a stacktrace:',n),!this.triggeringException){this.triggeringException=!0;const r=e===f.ERROR;this.trigger(f.ERROR,{type:fe.OTHER_ERROR,details:F.INTERNAL_EXCEPTION,fatal:r,event:e,error:n}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){this.logger.log("destroy"),this.trigger(f.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this._url=null,this.networkControllers.forEach(t=>t.destroy()),this.networkControllers.length=0,this.coreComponents.forEach(t=>t.destroy()),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){if(!e||"media"in e&&!e.media){const i=new Error(`attachMedia failed: invalid argument (${e})`);this.trigger(f.ERROR,{type:fe.OTHER_ERROR,details:F.ATTACH_MEDIA_ERROR,fatal:!0,error:i});return}this.logger.log("attachMedia"),this._media&&(this.logger.warn("media must be detached before attaching"),this.detachMedia());const t="media"in e,n=t?e.media:e,r=t?e:{media:n};this._media=n,this.trigger(f.MEDIA_ATTACHING,r)}detachMedia(){this.logger.log("detachMedia"),this.trigger(f.MEDIA_DETACHING,{}),this._media=null}transferMedia(){this._media=null;const e=this.bufferController.transferMedia();return this.trigger(f.MEDIA_DETACHING,{transferMedia:e}),e}loadSource(e){this.stopLoad();const t=this.media,n=this._url,r=this._url=V.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.logger.log(`loadSource:${r}`),t&&n&&(n!==r||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(f.MANIFEST_LOADING,{url:e})}get url(){return this._url}get hasEnoughToStart(){return this.streamController.hasEnoughToStart}get startPosition(){return this.streamController.startPositionValue}startLoad(e=-1,t){this.logger.log(`startLoad(${e+(t?", <skip seek to start>":"")})`),this.started=!0,this.resumeBuffering();for(let n=0;n<this.networkControllers.length&&(this.networkControllers[n].startLoad(e,t),!(!this.started||!this.networkControllers));n++);}stopLoad(){this.logger.log("stopLoad"),this.started=!1;for(let e=0;e<this.networkControllers.length&&(this.networkControllers[e].stopLoad(),!(this.started||!this.networkControllers));e++);}get loadingEnabled(){return this.started}get bufferingEnabled(){return this.streamController.bufferingEnabled}resumeBuffering(){this.bufferingEnabled||(this.logger.log("resume buffering"),this.networkControllers.forEach(e=>{e.resumeBuffering&&e.resumeBuffering()}))}pauseBuffering(){this.bufferingEnabled&&(this.logger.log("pause buffering"),this.networkControllers.forEach(e=>{e.pauseBuffering&&e.pauseBuffering()}))}get inFlightFragments(){const e={[te.MAIN]:this.streamController.inFlightFrag};return this.audioStreamController&&(e[te.AUDIO]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(e[te.SUBTITLE]=this.subtititleStreamController.inFlightFrag),e}swapAudioCodec(){this.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){this.logger.log("recoverMediaError");const e=this._media,t=e==null?void 0:e.currentTime;this.detachMedia(),e&&(this.attachMedia(e),t&&this.startLoad(t))}removeLevel(e){this.levelController.removeLevel(e)}get sessionId(){let e=this._sessionId;return e||(e=this._sessionId=Qi()),e}get levels(){const e=this.levelController.levels;return e||[]}get latestLevelDetails(){return this.streamController.getLevelDetails()||null}get loadLevelObj(){return this.levelController.loadLevelObj}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){this.logger.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){this.logger.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){this.logger.log(`set loadLevel:${e}`),this.levelController.manualLevel=e}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(e){this.levelController.nextLoadLevel=e}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(e){this.logger.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){const e=this.levelController.startLevel;return e===-1&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:e}set startLevel(e){this.logger.log(`set startLevel:${e}`),e!==-1&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}set bandwidthEstimate(e){this.abrController.resetEstimator(e)}get abrEwmaDefaultEstimate(){const{bwEstimator:e}=this.abrController;return e?e.defaultEstimate:NaN}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(this.logger.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){Ft(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return this.levelController.manualLevel===-1}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const n=e.length;for(let r=0;r<n;r++)if(e[r].maxBitrate>=t)return r;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:n}=this;let r;if(t===-1&&e!=null&&e.length?r=e.length-1:r=t,n)for(let i=r;i--;){const s=e[i].attrs["HDCP-LEVEL"];if(s&&s<=n)return i}return r}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(e){this.abrController.nextAutoLevel=e}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}get maxBufferLength(){return this.streamController.maxBufferLength}setAudioOption(e){var t;return((t=this.audioTrackController)==null?void 0:t.setAudioOption(e))||null}setSubtitleOption(e){var t;return((t=this.subtitleTrackController)==null?void 0:t.setSubtitleOption(e))||null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return e?e.subtitleDisplay:!1}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}set targetLatency(e){this.latencyController.targetLatency=e}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}get pathways(){return this.levelController.pathways}get pathwayPriority(){return this.levelController.pathwayPriority}set pathwayPriority(e){this.levelController.pathwayPriority=e}get bufferedToEnd(){var e;return!!((e=this.bufferController)!=null&&e.bufferedToEnd)}get interstitialsManager(){var e;return((e=this.interstitialsController)==null?void 0:e.interstitialsManager)||null}getMediaDecodingInfo(e,t=this.allAudioTracks){const n=nn(t);return Tn(e,n,navigator.mediaCapabilities)}}ps.defaultConfig=void 0},16722:function(on,je,E){"use strict";E.d(je,{Z:function(){return te}});const x=o=>typeof o=="object"&&o!=null&&o.nodeType===1,ae=(o,y)=>(!y||o!=="hidden")&&o!=="visible"&&o!=="clip",ve=(o,y)=>{if(o.clientHeight<o.scrollHeight||o.clientWidth<o.scrollWidth){const C=getComputedStyle(o,null);return ae(C.overflowY,y)||ae(C.overflowX,y)||(h=>{const g=(_=>{if(!_.ownerDocument||!_.ownerDocument.defaultView)return null;try{return _.ownerDocument.defaultView.frameElement}catch(S){return null}})(h);return!!g&&(g.clientHeight<h.scrollHeight||g.clientWidth<h.scrollWidth)})(o)}return!1},fe=(o,y,C,h,g,_,S,L)=>_<o&&S>y||_>o&&S<y?0:_<=o&&L<=C||S>=y&&L>=C?_-o-h:S>y&&L<C||_<o&&L>C?S-y+g:0,F=o=>{const y=o.parentElement;return y==null?o.getRootNode().host||null:y},f=(o,y)=>{var C,h,g,_;if(typeof document=="undefined")return[];const{scrollMode:S,block:L,inline:N,boundary:H,skipOverflowHiddenElements:R}=y,k=typeof H=="function"?H:He=>He!==H;if(!x(o))throw new TypeError("Invalid target");const T=document.scrollingElement||document.documentElement,A=[];let J=o;for(;x(J)&&k(J);){if(J=F(J),J===T){A.push(J);break}J!=null&&J===document.body&&ve(J)&&!ve(document.documentElement)||J!=null&&ve(J,R)&&A.push(J)}const ee=(h=(C=window.visualViewport)==null?void 0:C.width)!=null?h:innerWidth,G=(_=(g=window.visualViewport)==null?void 0:g.height)!=null?_:innerHeight,{scrollX:I,scrollY:re}=window,{height:le,width:Te,top:W,right:O,bottom:Q,left:q}=o.getBoundingClientRect(),{top:ie,right:V,bottom:v,left:m}=(He=>{const qe=window.getComputedStyle(He);return{top:parseFloat(qe.scrollMarginTop)||0,right:parseFloat(qe.scrollMarginRight)||0,bottom:parseFloat(qe.scrollMarginBottom)||0,left:parseFloat(qe.scrollMarginLeft)||0}})(o);let U=L==="start"||L==="nearest"?W-ie:L==="end"?Q+v:W+le/2-ie+v,se=N==="center"?q+Te/2-m+V:N==="end"?O+V:q-m;const pe=[];for(let He=0;He<A.length;He++){const qe=A[He],{height:ot,width:Ot,top:bt,right:xe,bottom:_t,left:Qt}=qe.getBoundingClientRect();if(S==="if-needed"&&W>=0&&q>=0&&Q<=G&&O<=ee&&(qe===T&&!ve(qe)||W>=bt&&Q<=_t&&q>=Qt&&O<=xe))return pe;const Lt=getComputedStyle(qe),qt=parseInt(Lt.borderLeftWidth,10),tt=parseInt(Lt.borderTopWidth,10),Re=parseInt(Lt.borderRightWidth,10),ye=parseInt(Lt.borderBottomWidth,10);let Z=0,we=0;const Le="offsetWidth"in qe?qe.offsetWidth-qe.clientWidth-qt-Re:0,$="offsetHeight"in qe?qe.offsetHeight-qe.clientHeight-tt-ye:0,P="offsetWidth"in qe?qe.offsetWidth===0?0:Ot/qe.offsetWidth:0,K="offsetHeight"in qe?qe.offsetHeight===0?0:ot/qe.offsetHeight:0;if(T===qe)Z=L==="start"?U:L==="end"?U-G:L==="nearest"?fe(re,re+G,G,tt,ye,re+U,re+U+le,le):U-G/2,we=N==="start"?se:N==="center"?se-ee/2:N==="end"?se-ee:fe(I,I+ee,ee,qt,Re,I+se,I+se+Te,Te),Z=Math.max(0,Z+re),we=Math.max(0,we+I);else{Z=L==="start"?U-bt-tt:L==="end"?U-_t+ye+$:L==="nearest"?fe(bt,_t,ot,tt,ye+$,U,U+le,le):U-(bt+ot/2)+$/2,we=N==="start"?se-Qt-qt:N==="center"?se-(Qt+Ot/2)+Le/2:N==="end"?se-xe+Re+Le:fe(Qt,xe,Ot,qt,Re+Le,se,se+Te,Te);const{scrollLeft:ne,scrollTop:M}=qe;Z=K===0?0:Math.max(0,Math.min(M+Z/K,qe.scrollHeight-ot/K+$)),we=P===0?0:Math.max(0,Math.min(ne+we/P,qe.scrollWidth-Ot/P+Le)),U+=M-Z,se+=ne-we}pe.push({el:qe,top:Z,left:we})}return pe},ue=o=>o===!1?{block:"end",inline:"nearest"}:(y=>y===Object(y)&&Object.keys(y).length!==0)(o)?o:{block:"start",inline:"nearest"};function te(o,y){if(!o.isConnected||!(g=>{let _=g;for(;_&&_.parentNode;){if(_.parentNode===document)return!0;_=_.parentNode instanceof ShadowRoot?_.parentNode.host:_.parentNode}return!1})(o))return;const C=(g=>{const _=window.getComputedStyle(g);return{top:parseFloat(_.scrollMarginTop)||0,right:parseFloat(_.scrollMarginRight)||0,bottom:parseFloat(_.scrollMarginBottom)||0,left:parseFloat(_.scrollMarginLeft)||0}})(o);if((g=>typeof g=="object"&&typeof g.behavior=="function")(y))return y.behavior(f(o,y));const h=typeof y=="boolean"||y==null?void 0:y.behavior;for(const{el:g,top:_,left:S}of f(o,ue(y))){const L=_-C.top+C.bottom,N=S-C.left+C.right;g.scroll({top:L,left:N,behavior:h})}}}}]);
|
|
}()); |