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.
NewEduCoderBuild/p__WxMiniProgram__Coursewar...

1248 lines
1.1 MiB

!(function(){var qo=Math.pow;(self.webpackChunk=self.webpackChunk||[]).push([[3897],{70557:function(Nt,ut,ie){"use strict";ie.d(ut,{Z:function(){return Te}});var V=ie(72308),Ae=ie(59301),He={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"}}]},name:"arrow-down",theme:"outlined"},ke=He,$e=ie(7657),ue=function(Y,P){return Ae.createElement($e.Z,(0,V.Z)({},Y,{ref:P,icon:ke}))},Fe=Ae.forwardRef(ue),Te=Fe},35593:function(Nt,ut,ie){"use strict";ie.d(ut,{Z:function(){return Rt}});var V=ie(77321),Ae=ie(52487),He=ie(74416),ke=ie(43403),$e=ie(92310),ue=ie.n($e),Fe=ie(29301),Te=ie(76846),l=ie(96452),Y=ie(6089),P=ie(80402),S=ie(34280),d=ie(49658),w=ie(59301),y=ie(72308),G=ie(77900),X=ie(8654);function M(Me){var Qe=Me.prefixCls,se=Me.align,Pe=Me.arrow,Re=Me.arrowPos,T=Pe||{},K=T.className,te=T.content,$=Re.x,W=$===void 0?0:$,Ee=Re.y,Le=Ee===void 0?0:Ee,Oe=w.useRef();if(!se||!se.points)return null;var Se={position:"absolute"};if(se.autoArrow!==!1){var we=se.points[0],ze=se.points[1],Ye=we[0],tt=we[1],st=ze[0],mt=ze[1];Ye===st||!["t","b"].includes(Ye)?Se.top=Le:Ye==="t"?Se.top=0:Se.bottom=0,tt===mt||!["l","r"].includes(tt)?Se.left=W:tt==="l"?Se.left=0:Se.right=0}return w.createElement("div",{ref:Oe,className:ue()("".concat(Qe,"-arrow"),K),style:Se},te)}function O(Me){var Qe=Me.prefixCls,se=Me.open,Pe=Me.zIndex,Re=Me.mask,T=Me.motion;return Re?w.createElement(G.default,(0,y.Z)({},T,{motionAppear:!0,visible:se,removeOnLeave:!0}),function(K){var te=K.className;return w.createElement("div",{style:{zIndex:Pe},className:ue()("".concat(Qe,"-mask"),te)})}):null}var Q=w.memo(function(Me){var Qe=Me.children;return Qe},function(Me,Qe){return Qe.cache}),he=Q,R=w.forwardRef(function(Me,Qe){var se=Me.popup,Pe=Me.className,Re=Me.prefixCls,T=Me.style,K=Me.target,te=Me.onVisibleChanged,$=Me.open,W=Me.keepDom,Ee=Me.fresh,Le=Me.onClick,Oe=Me.mask,Se=Me.arrow,we=Me.arrowPos,ze=Me.align,Ye=Me.motion,tt=Me.maskMotion,st=Me.forceRender,mt=Me.getPopupContainer,ht=Me.autoDestroy,ft=Me.portal,rt=Me.zIndex,g=Me.onMouseEnter,v=Me.onMouseLeave,Be=Me.onPointerEnter,I=Me.ready,ne=Me.offsetX,bt=Me.offsetY,ce=Me.offsetR,xe=Me.offsetB,Ue=Me.onAlign,B=Me.onPrepare,q=Me.stretch,oe=Me.targetWidth,ye=Me.targetHeight,L=typeof se=="function"?se():se,pt=$||W,fe=(mt==null?void 0:mt.length)>0,Et=w.useState(!mt||!fe),It=(0,Ae.Z)(Et,2),Ut=It[0],yr=It[1];if((0,S.Z)(function(){!Ut&&fe&&K&&yr(!0)},[Ut,fe,K]),!Ut)return null;var Kt="auto",Pt={left:"-1000vw",top:"-1000vh",right:Kt,bottom:Kt};if(I||!$){var br,wr=ze.points,Gr=ze.dynamicInset||((br=ze._experimental)===null||br===void 0?void 0:br.dynamicInset),zr=Gr&&wr[0][1]==="r",kt=Gr&&wr[0][0]==="b";zr?(Pt.right=ce,Pt.left=Kt):(Pt.left=ne,Pt.right=Kt),kt?(Pt.bottom=xe,Pt.top=Kt):(Pt.top=bt,Pt.bottom=Kt)}var qt={};return q&&(q.includes("height")&&ye?qt.height=ye:q.includes("minHeight")&&ye&&(qt.minHeight=ye),q.includes("width")&&oe?qt.width=oe:q.includes("minWidth")&&oe&&(qt.minWidth=oe)),$||(qt.pointerEvents="none"),w.createElement(ft,{open:st||pt,getContainer:mt&&function(){return mt(K)},autoDestroy:ht},w.createElement(O,{prefixCls:Re,open:$,zIndex:rt,mask:Oe,motion:tt}),w.createElement(Fe.Z,{onResize:Ue,disabled:!$},function(mr){return w.createElement(G.default,(0,y.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:st,leavedClassName:"".concat(Re,"-hidden")},Ye,{onAppearPrepare:B,onEnterPrepare:B,visible:$,onVisibleChanged:function(Or){var tn;Ye==null||(tn=Ye.onVisibleChanged)===null||tn===void 0||tn.call(Ye,Or),te(Or)}}),function(jr,Or){var tn=jr.className,lr=jr.style,wn=ue()(Re,tn,Pe);return w.createElement("div",{ref:(0,X.sQ)(mr,Qe,Or),className:wn,style:(0,V.Z)((0,V.Z)((0,V.Z)((0,V.Z)({"--arrow-x":"".concat(we.x||0,"px"),"--arrow-y":"".concat(we.y||0,"px")},Pt),qt),lr),{},{boxSizing:"border-box",zIndex:rt},T),onMouseEnter:g,onMouseLeave:v,onPointerEnter:Be,onClick:Le},Se&&w.createElement(M,{prefixCls:Re,arrow:Se,arrowPos:we,align:ze}),w.createElement(he,{cache:!$&&!Ee},L))})}))}),ve=R,Ce=w.forwardRef(function(Me,Qe){var se=Me.children,Pe=Me.getTriggerDOMNode,Re=(0,X.Yr)(se),T=w.useCallback(function(te){(0,X.mH)(Qe,Pe?Pe(te):te)},[Pe]),K=(0,X.x1)(T,se.ref);return Re?w.cloneElement(se,{ref:K}):se}),ge=Ce,be=w.createContext(null),Ne=be;function Ie(Me){return Me?Array.isArray(Me)?Me:[Me]:[]}function je(Me,Qe,se,Pe){return w.useMemo(function(){var Re=Ie(se!=null?se:Qe),T=Ie(Pe!=null?Pe:Qe),K=new Set(Re),te=new Set(T);return Me&&(K.has("hover")&&(K.delete("hover"),K.add("click")),te.has("hover")&&(te.delete("hover"),te.add("click"))),[K,te]},[Me,Qe,se,Pe])}var H=ie(29194);function z(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],se=arguments.length>2?arguments[2]:void 0;return se?Me[0]===Qe[0]:Me[0]===Qe[0]&&Me[1]===Qe[1]}function Z(Me,Qe,se,Pe){for(var Re=se.points,T=Object.keys(Me),K=0;K<T.length;K+=1){var te,$=T[K];if(z((te=Me[$])===null||te===void 0?void 0:te.points,Re,Pe))return"".concat(Qe,"-placement-").concat($)}return""}function ee(Me,Qe,se,Pe){return Qe||(se?{motionName:"".concat(Me,"-").concat(se)}:Pe?{motionName:Pe}:null)}function me(Me){return Me.ownerDocument.defaultView}function ae(Me){for(var Qe=[],se=Me==null?void 0:Me.parentElement,Pe=["hidden","scroll","clip","auto"];se;){var Re=me(se).getComputedStyle(se),T=Re.overflowX,K=Re.overflowY,te=Re.overflow;[T,K,te].some(function($){return Pe.includes($)})&&Qe.push(se),se=se.parentElement}return Qe}function x(Me){var Qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(Me)?Qe:Me}function A(Me){return x(parseFloat(Me),0)}function N(Me,Qe){var se=(0,V.Z)({},Me);return(Qe||[]).forEach(function(Pe){if(!(Pe instanceof HTMLBodyElement||Pe instanceof HTMLHtmlElement)){var Re=me(Pe).getComputedStyle(Pe),T=Re.overflow,K=Re.overflowClipMargin,te=Re.borderTopWidth,$=Re.borderBottomWidth,W=Re.borderLeftWidth,Ee=Re.borderRightWidth,Le=Pe.getBoundingClientRect(),Oe=Pe.offsetHeight,Se=Pe.clientHeight,we=Pe.offsetWidth,ze=Pe.clientWidth,Ye=A(te),tt=A($),st=A(W),mt=A(Ee),ht=x(Math.round(Le.width/we*1e3)/1e3),ft=x(Math.round(Le.height/Oe*1e3)/1e3),rt=(we-ze-st-mt)*ht,g=(Oe-Se-Ye-tt)*ft,v=Ye*ft,Be=tt*ft,I=st*ht,ne=mt*ht,bt=0,ce=0;if(T==="clip"){var xe=A(K);bt=xe*ht,ce=xe*ft}var Ue=Le.x+I-bt,B=Le.y+v-ce,q=Ue+Le.width+2*bt-I-ne-rt,oe=B+Le.height+2*ce-v-Be-g;se.left=Math.max(se.left,Ue),se.top=Math.max(se.top,B),se.right=Math.min(se.right,q),se.bottom=Math.min(se.bottom,oe)}}),se}function de(Me){var Qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,se="".concat(Qe),Pe=se.match(/^(.*)\%$/);return Pe?Me*(parseFloat(Pe[1])/100):parseFloat(se)}function We(Me,Qe){var se=Qe||[],Pe=(0,Ae.Z)(se,2),Re=Pe[0],T=Pe[1];return[de(Me.width,Re),de(Me.height,T)]}function qe(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[Me[0],Me[1]]}function Ge(Me,Qe){var se=Qe[0],Pe=Qe[1],Re,T;return se==="t"?T=Me.y:se==="b"?T=Me.y+Me.height:T=Me.y+Me.height/2,Pe==="l"?Re=Me.x:Pe==="r"?Re=Me.x+Me.width:Re=Me.x+Me.width/2,{x:Re,y:T}}function ot(Me,Qe){var se={t:"b",b:"t",l:"r",r:"l"};return Me.map(function(Pe,Re){return Re===Qe?se[Pe]||"c":Pe}).join("")}function Dt(Me,Qe,se,Pe,Re,T,K){var te=w.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:Re[Pe]||{}}),$=(0,Ae.Z)(te,2),W=$[0],Ee=$[1],Le=w.useRef(0),Oe=w.useMemo(function(){return Qe?ae(Qe):[]},[Qe]),Se=w.useRef({}),we=function(){Se.current={}};Me||we();var ze=(0,Y.Z)(function(){if(Qe&&se&&Me){let en=function(Pn,zn){var ri=arguments.length>2&&arguments[2]!==void 0?arguments[2]:wn,$n=L.x+Pn,Pi=L.y+zn,Fi=$n+br,Ki=Pi+Pt,Ei=Math.max($n,ri.left),es=Math.max(Pi,ri.top),Mi=Math.min(Fi,ri.right),ts=Math.min(Ki,ri.bottom);return Math.max(0,(Mi-Ei)*(ts-es))},xr=function(){Zt=L.y+gr,Fr=Zt+Pt,Hn=L.x+fr,oi=Hn+br};var st,mt,ht=Qe,ft=ht.ownerDocument,rt=me(ht),g=rt.getComputedStyle(ht),v=g.width,Be=g.height,I=g.position,ne=ht.style.left,bt=ht.style.top,ce=ht.style.right,xe=ht.style.bottom,Ue=ht.style.overflow,B=(0,V.Z)((0,V.Z)({},Re[Pe]),T),q=ft.createElement("div");(st=ht.parentElement)===null||st===void 0||st.appendChild(q),q.style.left="".concat(ht.offsetLeft,"px"),q.style.top="".concat(ht.offsetTop,"px"),q.style.position=I,q.style.height="".concat(ht.offsetHeight,"px"),q.style.width="".concat(ht.offsetWidth,"px"),ht.style.left="0",ht.style.top="0",ht.style.right="auto",ht.style.bottom="auto",ht.style.overflow="hidden";var oe;if(Array.isArray(se))oe={x:se[0],y:se[1],width:0,height:0};else{var ye=se.getBoundingClientRect();oe={x:ye.x,y:ye.y,width:ye.width,height:ye.height}}var L=ht.getBoundingClientRect(),pt=ft.documentElement,fe=pt.clientWidth,Et=pt.clientHeight,It=pt.scrollWidth,Ut=pt.scrollHeight,yr=pt.scrollTop,Kt=pt.scrollLeft,Pt=L.height,br=L.width,wr=oe.height,Gr=oe.width,zr={left:0,top:0,right:fe,bottom:Et},kt={left:-Kt,top:-yr,right:It-Kt,bottom:Ut-yr},qt=B.htmlRegion,mr="visible",jr="visibleFirst";qt!=="scroll"&&qt!==jr&&(qt=mr);var Or=qt===jr,tn=N(kt,Oe),lr=N(zr,Oe),wn=qt===mr?lr:tn,rn=Or?lr:wn;ht.style.left="auto",ht.style.top="auto",ht.style.right="0",ht.style.bottom="0";var zt=ht.getBoundingClientRect();ht.style.left=ne,ht.style.top=bt,ht.style.right=ce,ht.style.bottom=xe,ht.style.overflow=Ue,(mt=ht.parentElement)===null||mt===void 0||mt.removeChild(q);var Tt=x(Math.round(br/parseFloat(v)*1e3)/1e3),Qt=x(Math.round(Pt/parseFloat(Be)*1e3)/1e3);if(Tt===0||Qt===0||(0,Te.Sh)(se)&&!(0,H.Z)(se))return;var Er=B.offset,_r=B.targetOffset,Wr=We(L,Er),Mn=(0,Ae.Z)(Wr,2),Vr=Mn[0],Tr=Mn[1],Pr=We(oe,_r),hr=(0,Ae.Z)(Pr,2),nn=hr[0],fn=hr[1];oe.x-=nn,oe.y-=fn;var Kr=B.points||[],rr=(0,Ae.Z)(Kr,2),ur=rr[0],Dr=rr[1],Rr=qe(Dr),Sr=qe(ur),an=Ge(oe,Rr),yi=Ge(L,Sr),Ln=(0,V.Z)({},B),fr=an.x-yi.x+Vr,gr=an.y-yi.y+Tr,Bn=en(fr,gr),Jr=en(fr,gr,lr),Kn=Ge(oe,["t","l"]),bi=Ge(L,["t","l"]),Ci=Ge(oe,["b","r"]),xi=Ge(L,["b","r"]),dn=B.overflow||{},ai=dn.adjustX,wi=dn.adjustY,Qn=dn.shiftX,or=dn.shiftY,Ve=function(zn){return typeof zn=="boolean"?zn:zn>=0},Zt,Fr,Hn,oi;xr();var li=Ve(wi),En=Sr[0]===Rr[0];if(li&&Sr[0]==="t"&&(Fr>rn.bottom||Se.current.bt)){var vr=gr;En?vr-=Pt-wr:vr=Kn.y-xi.y-Tr;var Sn=en(fr,vr),In=en(fr,vr,lr);Sn>Bn||Sn===Bn&&(!Or||In>=Jr)?(Se.current.bt=!0,gr=vr,Tr=-Tr,Ln.points=[ot(Sr,0),ot(Rr,0)]):Se.current.bt=!1}if(li&&Sr[0]==="b"&&(Zt<rn.top||Se.current.tb)){var Yr=gr;En?Yr+=Pt-wr:Yr=Ci.y-bi.y-Tr;var pn=en(fr,Yr),$i=en(fr,Yr,lr);pn>Bn||pn===Bn&&(!Or||$i>=Jr)?(Se.current.tb=!0,gr=Yr,Tr=-Tr,Ln.points=[ot(Sr,0),ot(Rr,0)]):Se.current.tb=!1}var Wn=Ve(ai),ei=Sr[1]===Rr[1];if(Wn&&Sr[1]==="l"&&(oi>rn.right||Se.current.rl)){var Bt=fr;ei?Bt-=br-Gr:Bt=Kn.x-xi.x-Vr;var Dn=en(Bt,gr),Qr=en(Bt,gr,lr);Dn>Bn||Dn===Bn&&(!Or||Qr>=Jr)?(Se.current.rl=!0,fr=Bt,Vr=-Vr,Ln.points=[ot(Sr,1),ot(Rr,1)]):Se.current.rl=!1}if(Wn&&Sr[1]==="r"&&(Hn<rn.left||Se.current.lr)){var mn=fr;ei?mn+=br-Gr:mn=Ci.x-bi.x-Vr;var Gi=en(mn,gr),ti=en(mn,gr,lr);Gi>Bn||Gi===Bn&&(!Or||ti>=Jr)?(Se.current.lr=!0,fr=mn,Vr=-Vr,Ln.points=[ot(Sr,1),ot(Rr,1)]):Se.current.lr=!1}xr();var Vn=Qn===!0?0:Qn;typeof Vn=="number"&&(Hn<lr.left&&(fr-=Hn-lr.left-Vr,oe.x+Gr<lr.left+Vn&&(fr+=oe.x-lr.left+Gr-Vn)),oi>lr.right&&(fr-=oi-lr.right-Vr,oe.x>lr.right-Vn&&(fr+=oe.x-lr.right+Vn)));var Nn=or===!0?0:or;typeof Nn=="number"&&(Zt<lr.top&&(gr-=Zt-lr.top-Tr,oe.y+wr<lr.top+Nn&&(gr+=oe.y-lr.top+wr-Nn)),Fr>lr.bottom&&(gr-=Fr-lr.bottom-Tr,oe.y>lr.bottom-Nn&&(gr+=oe.y-lr.bottom+Nn)));var qr=L.x+fr,Un=qr+br,On=L.y+gr,Ri=On+Pt,gn=oe.x,An=gn+Gr,cr=oe.y,ui=cr+wr,Li=Math.max(qr,gn),Ii=Math.min(Un,An),_n=(Li+Ii)/2,ci=_n-qr,ji=Math.max(On,cr),wt=Math.min(Ri,ui),vn=(ji+wt)/2,Oi=vn-On;K==null||K(Qe,Ln);var hi=zt.right-L.x-(fr+L.width),cn=zt.bottom-L.y-(gr+L.height);Ee({ready:!0,offsetX:fr/Tt,offsetY:gr/Qt,offsetR:hi/Tt,offsetB:cn/Qt,arrowX:ci/Tt,arrowY:Oi/Qt,scaleX:Tt,scaleY:Qt,align:Ln})}}),Ye=function(){Le.current+=1;var mt=Le.current;Promise.resolve().then(function(){Le.current===mt&&ze()})},tt=function(){Ee(function(mt){return(0,V.Z)((0,V.Z)({},mt),{},{ready:!1})})};return(0,S.Z)(tt,[Pe]),(0,S.Z)(function(){Me||tt()},[Me]),[W.ready,W.offsetX,W.offsetY,W.offsetR,W.offsetB,W.arrowX,W.arrowY,W.scaleX,W.scaleY,W.align,Ye]}var at=ie(80702);function it(Me,Qe,se,Pe,Re){(0,S.Z)(function(){if(Me&&Qe&&se){let Le=function(){Pe(),Re()};var T=Qe,K=se,te=ae(T),$=ae(K),W=me(K),Ee=new Set([W].concat((0,at.Z)(te),(0,at.Z)($)));return Ee.forEach(function(Oe){Oe.addEventListener("scroll",Le,{passive:!0})}),W.addEventListener("resize",Le,{passive:!0}),Pe(),function(){Ee.forEach(function(Oe){Oe.removeEventListener("scroll",Le),W.removeEventListener("resize",Le)})}}},[Me,Qe,se])}var Lt=ie(48736),jt=ie(16089);function Xt(Me,Qe,se,Pe,Re,T,K,te){var $=w.useRef(Me),W=w.useRef(!1);$.current!==Me&&(W.current=!0,$.current=Me),w.useEffect(function(){var Ee=(0,jt.Z)(function(){W.current=!1});return function(){jt.Z.cancel(Ee)}},[Me]),w.useEffect(function(){if(Qe&&Pe&&(!Re||T)){var Ee=function(){var I=!1,ne=function(xe){var Ue=xe.target;I=K(Ue)},bt=function(xe){var Ue=xe.target;!W.current&&$.current&&!I&&!K(Ue)&&te(!1)};return[ne,bt]},Le=Ee(),Oe=(0,Ae.Z)(Le,2),Se=Oe[0],we=Oe[1],ze=Ee(),Ye=(0,Ae.Z)(ze,2),tt=Ye[0],st=Ye[1],mt=me(Pe);mt.addEventListener("mousedown",Se,!0),mt.addEventListener("click",we,!0),mt.addEventListener("contextmenu",we,!0);var ht=(0,l.A)(se);if(ht&&(ht.addEventListener("mousedown",tt,!0),ht.addEventListener("click",st,!0),ht.addEventListener("contextmenu",st,!0)),0)var ft,rt,g,v;return function(){mt.removeEventListener("mousedown",Se,!0),mt.removeEventListener("click",we,!0),mt.removeEventListener("contextmenu",we,!0),ht&&(ht.removeEventListener("mousedown",tt,!0),ht.removeEventListener("click",st,!0),ht.removeEventListener("contextmenu",st,!0))}}},[Qe,se,Pe,Re,T])}var Vt=["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 Mt(){var Me=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ke.Z,Qe=w.forwardRef(function(se,Pe){var Re=se.prefixCls,T=Re===void 0?"rc-trigger-popup":Re,K=se.children,te=se.action,$=te===void 0?"hover":te,W=se.showAction,Ee=se.hideAction,Le=se.popupVisible,Oe=se.defaultPopupVisible,Se=se.onPopupVisibleChange,we=se.afterPopupVisibleChange,ze=se.mouseEnterDelay,Ye=se.mouseLeaveDelay,tt=Ye===void 0?.1:Ye,st=se.focusDelay,mt=se.blurDelay,ht=se.mask,ft=se.maskClosable,rt=ft===void 0?!0:ft,g=se.getPopupContainer,v=se.forceRender,Be=se.autoDestroy,I=se.destroyPopupOnHide,ne=se.popup,bt=se.popupClassName,ce=se.popupStyle,xe=se.popupPlacement,Ue=se.builtinPlacements,B=Ue===void 0?{}:Ue,q=se.popupAlign,oe=se.zIndex,ye=se.stretch,L=se.getPopupClassNameFromAlign,pt=se.fresh,fe=se.alignPoint,Et=se.onPopupClick,It=se.onPopupAlign,Ut=se.arrow,yr=se.popupMotion,Kt=se.maskMotion,Pt=se.popupTransitionName,br=se.popupAnimation,wr=se.maskTransitionName,Gr=se.maskAnimation,zr=se.className,kt=se.getTriggerDOMNode,qt=(0,He.Z)(se,Vt),mr=Be||I||!1,jr=w.useState(!1),Or=(0,Ae.Z)(jr,2),tn=Or[0],lr=Or[1];(0,S.Z)(function(){lr((0,d.Z)())},[]);var wn=w.useRef({}),rn=w.useContext(Ne),zt=w.useMemo(function(){return{registerSubPopup:function(Ot,dr){wn.current[Ot]=dr,rn==null||rn.registerSubPopup(Ot,dr)}}},[rn]),Tt=(0,P.Z)(),Qt=w.useState(null),Er=(0,Ae.Z)(Qt,2),_r=Er[0],Wr=Er[1],Mn=(0,Y.Z)(function(Wt){(0,Te.Sh)(Wt)&&_r!==Wt&&Wr(Wt),rn==null||rn.registerSubPopup(Tt,Wt)}),Vr=w.useState(null),Tr=(0,Ae.Z)(Vr,2),Pr=Tr[0],hr=Tr[1],nn=w.useRef(null),fn=(0,Y.Z)(function(Wt){(0,Te.Sh)(Wt)&&Pr!==Wt&&(hr(Wt),nn.current=Wt)}),Kr=w.Children.only(K),rr=(Kr==null?void 0:Kr.props)||{},ur={},Dr=(0,Y.Z)(function(Wt){var Ot,dr,Zr=Pr;return(Zr==null?void 0:Zr.contains(Wt))||((Ot=(0,l.A)(Zr))===null||Ot===void 0?void 0:Ot.host)===Wt||Wt===Zr||(_r==null?void 0:_r.contains(Wt))||((dr=(0,l.A)(_r))===null||dr===void 0?void 0:dr.host)===Wt||Wt===_r||Object.values(wn.current).some(function(Nr){return(Nr==null?void 0:Nr.contains(Wt))||Wt===Nr})}),Rr=ee(T,yr,br,Pt),Sr=ee(T,Kt,Gr,wr),an=w.useState(Oe||!1),yi=(0,Ae.Z)(an,2),Ln=yi[0],fr=yi[1],gr=Le!=null?Le:Ln,Bn=(0,Y.Z)(function(Wt){Le===void 0&&fr(Wt)});(0,S.Z)(function(){fr(Le||!1)},[Le]);var Jr=w.useRef(gr);Jr.current=gr;var Kn=w.useRef([]);Kn.current=[];var bi=(0,Y.Z)(function(Wt){var Ot;Bn(Wt),((Ot=Kn.current[Kn.current.length-1])!==null&&Ot!==void 0?Ot:gr)!==Wt&&(Kn.current.push(Wt),Se==null||Se(Wt))}),Ci=w.useRef(),xi=function(){clearTimeout(Ci.current)},dn=function(Ot){var dr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;xi(),dr===0?bi(Ot):Ci.current=setTimeout(function(){bi(Ot)},dr*1e3)};w.useEffect(function(){return xi},[]);var ai=w.useState(!1),wi=(0,Ae.Z)(ai,2),Qn=wi[0],or=wi[1];(0,S.Z)(function(Wt){(!Wt||gr)&&or(!0)},[gr]);var Ve=w.useState(null),Zt=(0,Ae.Z)(Ve,2),Fr=Zt[0],Hn=Zt[1],oi=w.useState([0,0]),li=(0,Ae.Z)(oi,2),En=li[0],vr=li[1],Sn=function(Ot){vr([Ot.clientX,Ot.clientY])},In=Dt(gr,_r,fe?En:Pr,xe,B,q,It),Yr=(0,Ae.Z)(In,11),pn=Yr[0],$i=Yr[1],Wn=Yr[2],ei=Yr[3],Bt=Yr[4],Dn=Yr[5],Qr=Yr[6],mn=Yr[7],Gi=Yr[8],ti=Yr[9],Vn=Yr[10],Nn=je(tn,$,W,Ee),qr=(0,Ae.Z)(Nn,2),Un=qr[0],On=qr[1],Ri=Un.has("click"),gn=On.has("click")||On.has("contextMenu"),An=(0,Y.Z)(function(){Qn||Vn()}),cr=function(){Jr.current&&fe&&gn&&dn(!1)};it(gr,Pr,_r,An,cr),(0,S.Z)(function(){An()},[En,xe]),(0,S.Z)(function(){gr&&!(B!=null&&B[xe])&&An()},[JSON.stringify(q)]);var ui=w.useMemo(function(){var Wt=Z(B,T,ti,fe);return ue()(Wt,L==null?void 0:L(ti))},[ti,L,B,T,fe]);w.useImperativeHandle(Pe,function(){return{nativeElement:nn.current,forceAlign:An}});var Li=w.useState(0),Ii=(0,Ae.Z)(Li,2),_n=Ii[0],ci=Ii[1],ji=w.useState(0),wt=(0,Ae.Z)(ji,2),vn=wt[0],Oi=wt[1],hi=function(){if(ye&&Pr){var Ot=Pr.getBoundingClientRect();ci(Ot.width),Oi(Ot.height)}},cn=function(){hi(),An()},en=function(Ot){or(!1),Vn(),we==null||we(Ot)},xr=function(){return new Promise(function(Ot){hi(),Hn(function(){return Ot})})};(0,S.Z)(function(){Fr&&(Vn(),Fr(),Hn(null))},[Fr]);function Pn(Wt,Ot,dr,Zr){ur[Wt]=function(Nr){var kn;Zr==null||Zr(Nr),dn(Ot,dr);for(var Hi=arguments.length,Wi=new Array(Hi>1?Hi-1:0),Yn=1;Yn<Hi;Yn++)Wi[Yn-1]=arguments[Yn];(kn=rr[Wt])===null||kn===void 0||kn.call.apply(kn,[rr,Nr].concat(Wi))}}(Ri||gn)&&(ur.onClick=function(Wt){var Ot;Jr.current&&gn?dn(!1):!Jr.current&&Ri&&(Sn(Wt),dn(!0));for(var dr=arguments.length,Zr=new Array(dr>1?dr-1:0),Nr=1;Nr<dr;Nr++)Zr[Nr-1]=arguments[Nr];(Ot=rr.onClick)===null||Ot===void 0||Ot.call.apply(Ot,[rr,Wt].concat(Zr))}),Xt(gr,gn,Pr,_r,ht,rt,Dr,dn);var zn=Un.has("hover"),ri=On.has("hover"),$n,Pi;zn&&(Pn("onMouseEnter",!0,ze,function(Wt){Sn(Wt)}),Pn("onPointerEnter",!0,ze,function(Wt){Sn(Wt)}),$n=function(Ot){(gr||Qn)&&_r!==null&&_r!==void 0&&_r.contains(Ot.target)&&dn(!0,ze)},fe&&(ur.onMouseMove=function(Wt){var Ot;(Ot=rr.onMouseMove)===null||Ot===void 0||Ot.call(rr,Wt)})),ri&&(Pn("onMouseLeave",!1,tt),Pn("onPointerLeave",!1,tt),Pi=function(){dn(!1,tt)}),Un.has("focus")&&Pn("onFocus",!0,st),On.has("focus")&&Pn("onBlur",!1,mt),Un.has("contextMenu")&&(ur.onContextMenu=function(Wt){var Ot;Jr.current&&On.has("contextMenu")?dn(!1):(Sn(Wt),dn(!0)),Wt.preventDefault();for(var dr=arguments.length,Zr=new Array(dr>1?dr-1:0),Nr=1;Nr<dr;Nr++)Zr[Nr-1]=arguments[Nr];(Ot=rr.onContextMenu)===null||Ot===void 0||Ot.call.apply(Ot,[rr,Wt].concat(Zr))}),zr&&(ur.className=ue()(rr.className,zr));var Fi=(0,V.Z)((0,V.Z)({},rr),ur),Ki={},Ei=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Ei.forEach(function(Wt){qt[Wt]&&(Ki[Wt]=function(){for(var Ot,dr=arguments.length,Zr=new Array(dr),Nr=0;Nr<dr;Nr++)Zr[Nr]=arguments[Nr];(Ot=Fi[Wt])===null||Ot===void 0||Ot.call.apply(Ot,[Fi].concat(Zr)),qt[Wt].apply(qt,Zr)})});var es=w.cloneElement(Kr,(0,V.Z)((0,V.Z)({},Fi),Ki)),Mi={x:Dn,y:Qr},ts=Ut?(0,V.Z)({},Ut!==!0?Ut:{}):null;return w.createElement(w.Fragment,null,w.createElement(Fe.Z,{disabled:!gr,ref:fn,onResize:cn},w.createElement(ge,{getTriggerDOMNode:kt},es)),w.createElement(Ne.Provider,{value:zt},w.createElement(ve,{portal:Me,ref:Mn,prefixCls:T,popup:ne,className:ue()(bt,ui),style:ce,target:Pr,onMouseEnter:$n,onMouseLeave:Pi,onPointerEnter:$n,zIndex:oe,open:gr,keepDom:Qn,fresh:pt,onClick:Et,mask:ht,motion:Rr,maskMotion:Sr,onVisibleChanged:en,onPrepare:xr,forceRender:v,autoDestroy:mr,getPopupContainer:g,align:ti,arrow:ts,arrowPos:Mi,ready:pn,offsetX:$i,offsetY:Wn,offsetR:ei,offsetB:Bt,onAlign:An,stretch:ye,targetWidth:_n/mn,targetHeight:vn/Gi})))});return Qe}var Rt=Mt(ke.Z)},50304:function(){"use strict"},53660:function(Nt,ut){(function(ie,V){V(ut)})(this,function(ie){"use strict";var V=function(){return(V=Object.assign||function(se){for(var Pe,Re=1,T=arguments.length;Re<T;Re++)for(var K in Pe=arguments[Re])Object.prototype.hasOwnProperty.call(Pe,K)&&(se[K]=Pe[K]);return se}).apply(this,arguments)};function Ae(se,Pe,Re,T){return new(Re||(Re=Promise))(function(K,te){function $(Le){try{Ee(T.next(Le))}catch(Oe){te(Oe)}}function W(Le){try{Ee(T.throw(Le))}catch(Oe){te(Oe)}}function Ee(Le){var Oe;Le.done?K(Le.value):(Oe=Le.value,Oe instanceof Re?Oe:new Re(function(Se){Se(Oe)})).then($,W)}Ee((T=T.apply(se,Pe||[])).next())})}function He(se,Pe){var Re,T,K,te,$={label:0,sent:function(){if(1&K[0])throw K[1];return K[1]},trys:[],ops:[]};return te={next:W(0),throw:W(1),return:W(2)},typeof Symbol=="function"&&(te[Symbol.iterator]=function(){return this}),te;function W(Ee){return function(Le){return function(Oe){if(Re)throw new TypeError("Generator is already executing.");for(;$;)try{if(Re=1,T&&(K=2&Oe[0]?T.return:Oe[0]?T.throw||((K=T.return)&&K.call(T),0):T.next)&&!(K=K.call(T,Oe[1])).done)return K;switch(T=0,K&&(Oe=[2&Oe[0],K.value]),Oe[0]){case 0:case 1:K=Oe;break;case 4:return $.label++,{value:Oe[1],done:!1};case 5:$.label++,T=Oe[1],Oe=[0];continue;case 7:Oe=$.ops.pop(),$.trys.pop();continue;default:if(!(K=(K=$.trys).length>0&&K[K.length-1])&&(Oe[0]===6||Oe[0]===2)){$=0;continue}if(Oe[0]===3&&(!K||Oe[1]>K[0]&&Oe[1]<K[3])){$.label=Oe[1];break}if(Oe[0]===6&&$.label<K[1]){$.label=K[1],K=Oe;break}if(K&&$.label<K[2]){$.label=K[2],$.ops.push(Oe);break}K[2]&&$.ops.pop(),$.trys.pop();continue}Oe=Pe.call(se,$)}catch(Se){Oe=[6,Se],T=0}finally{Re=K=0}if(5&Oe[0])throw Oe[1];return{value:Oe[0]?Oe[1]:void 0,done:!0}}([Ee,Le])}}}var ke=function(){function se(){}return se.add=function(Pe){se.HANDLE_LIST.push(Pe),window.addEventListener("message",Pe,!1)},se.remove=function(Pe){var Re=se.HANDLE_LIST.indexOf(Pe);Re>=0&&se.HANDLE_LIST.splice(Re,1),window.removeEventListener("message",Pe,!1)},se.empty=function(){for(;se.HANDLE_LIST.length;)window.removeEventListener("message",se.HANDLE_LIST.shift(),!1)},se.parse=function(Pe){try{return typeof Pe=="object"?Pe:Pe&&JSON.parse(Pe)}catch(Re){return console.log("Message.parse Error:",Re),Pe}},se.HANDLE_LIST=[],se}();function $e(se){return{}.toString.call(se)==="[object Function]"}var ue,Fe,Te,l,Y={origin:""};function P(se,Pe){Y[se]=Pe}function S(se){return Y[se]}function d(se){var Pe=S("origin");return!!function(Re,T){return Re!==T&&(Re.replace(/www\./i,"").toLowerCase()!==T.replace(/www\./i,"").toLowerCase()||(Re.match("www.")?void 0:(P("origin",T),!1)))}(Pe,se.origin)&&(console.warn("postMessage \u57DF\u540D\u68C0\u67E5\u4E0D\u901A\u8FC7",{safeOrigin:Pe,eventOrigin:se.origin}),!0)}(function(se){se.unknown="unknown",se.spreadsheet="s",se.writer="w",se.presentation="p",se.pdf="f"})(ue||(ue={})),function(se){se.wps="w",se.et="s",se.presentation="p",se.pdf="f"}(Fe||(Fe={})),function(se){se.nomal="nomal",se.simple="simple"}(Te||(Te={})),function(se){se[se.requestFullscreen=1]="requestFullscreen",se[se.exitFullscreen=0]="exitFullscreen"}(l||(l={}));var w,y,G,X=(w=0,function(){return w+=1}),M=function(se,Pe,Re){Re===void 0&&(Re=!0);var T=Pe;if(!y){var K=function W(Ee){var Le=Ee.clientHeight,Oe=Ee.clientWidth;Le!==0||Oe!==0||G?Le===0&&Oe===0||!G||(G.disconnect(),G=null):window.ResizeObserver&&(G=new ResizeObserver(function(Se){W(Ee)})).observe(Ee),y.style.cssText+="height: "+Le+"px; width: "+Oe+"px"}.bind(null,T);(y=document.createElement("iframe")).classList.add("web-office-iframe");var te={id:"office-iframe",src:se,scrolling:"no",frameborder:"0",allowfullscreen:"allowfullscreen",webkitallowfullscreen:"true",mozallowfullscreen:"true",allow:"clipboard-read; clipboard-write"};for(var $ in T?(te.style="width: "+T.clientWidth+"px; height: "+T.clientHeight+"px;",Re&&window.addEventListener("resize",K)):((T=document.createElement("div")).classList.add("web-office-default-container"),function(W){var Ee=document.createElement("style");document.head.appendChild(Ee);var Le=Ee.sheet;Le.insertRule(W,Le.cssRules.length)}(".web-office-default-container {position: absolute; padding: 0; margin: 0; width: 100%; height: 100%; left: 0; top: 0;}"),document.body.appendChild(T),te.style="position: fixed; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%;"),te)y.setAttribute($,te[$]);T.appendChild(y),y.destroy=function(){y.parentNode.removeChild(y),y=null,window.removeEventListener("resize",K),G&&(G.disconnect(),G=null)}}return y},O=function(se){M().contentWindow&&M().contentWindow.postMessage(JSON.stringify(se),S("origin"))};function Q(se,Pe,Re){return new Promise(function(T){var K=X(),te=function($){if(!d($)){var W=ke.parse($.data);W.eventName===Re&&W.msgId===K&&(T(W.data),ke.remove(te))}};ke.add(te),O({data:se,msgId:K,eventName:Pe})})}var he=function(se){return Q(se,"wps.jssdk.api","wps.api.reply")},R=function(se){return Q(se,"api.basic","api.basic.reply")},ve={idMap:{}};function Ce(se){return Ae(this,void 0,void 0,function(){var Pe,Re,T,K,te,$,W,Ee,Le,Oe;return He(this,function(Se){switch(Se.label){case 0:return d(se)?[2]:(Pe=ke.parse(se.data),Re=Pe.eventName,T=Pe.callbackId,K=Pe.data,T&&(te=ve.idMap[T])?($=te.split(":"),W=$[0],Ee=$[1],Re==="api.callback"&&ve[W]&&ve[W][Ee]?[4,(Oe=ve[W][Ee]).callback.apply(Oe,K.args)]:[3,2]):[3,2]);case 1:Le=Se.sent(),O({result:Le,callbackId:T,eventName:"api.callback.reply"}),Se.label=2;case 2:return[2]}})})}var ge=function(se){return Ae(void 0,void 0,void 0,function(){function Pe(){return Object.keys(ve.idMap).find(function(Se){return ve.idMap[Se]===T+":"+Re})}var Re,T,K,te,$,W,Ee,Le,Oe;return He(this,function(Se){switch(Se.label){case 0:return Re=se.prop,T=se.parentObjId,[4,Ne([K=se.value])];case 1:return te=Se.sent(),$=te[0],W=te[1],se.value=$[0],Ee=Object.keys(W)[0],Le=ve[T],K===null&&Le&&Le[Re]&&((Oe=Pe())&&delete ve.idMap[Oe],delete Le[Re],Object.keys(Le).length||delete ve[T],Object.keys(ve.idMap).length||ke.remove(Ce)),Ee&&(Object.keys(ve.idMap).length||ke.add(Ce),ve[T]||(ve[T]={}),ve[T][Re]={callbackId:Ee,callback:W[Ee]},(Oe=Pe())&&delete ve.idMap[Oe],ve.idMap[Ee]=T+":"+Re),[2]}})})},be=function(se,Pe,Re,T){return Ae(void 0,void 0,void 0,function(){var K,te,$,W,Ee,Le,Oe,Se;return He(this,function(we){switch(we.label){case 0:return K=X(),W=new Promise(function(ze,Ye){te=ze,$=Ye}),Ee={},Pe.args?[4,Ne(Pe.args)]:[3,2];case 1:Le=we.sent(),Oe=Le[0],Se=Le[1],Pe.args=Oe,Ee=Se,we.label=2;case 2:return se!=="api.setter"?[3,4]:[4,ge(Pe)];case 3:we.sent(),we.label=4;case 4:return function(ze){var Ye=ze[0],tt=ze[1];typeof(Ye=V({},Ye)).data=="function"&&(Ye.data=Ye.data()),tt(),O(Ye)}([{eventName:se,data:Pe,msgId:K},function(){var ze=this,Ye=function(tt){return Ae(ze,void 0,void 0,function(){var st,mt,ht;return He(this,function(ft){switch(ft.label){case 0:return d(tt)?[2]:(st=ke.parse(tt.data)).eventName==="api.callback"&&st.callbackId&&Ee[st.callbackId]?[4,Ee[st.callbackId].apply(Ee,st.data.args)]:[3,2];case 1:mt=ft.sent(),O({result:mt,eventName:"api.callback.reply",callbackId:st.callbackId}),ft.label=2;case 2:return st.eventName===se+".reply"&&st.msgId===K&&(st.error?((ht=new Error("")).stack=st.error+`
`+Re,T&&T(),$(ht)):te(st.result),ke.remove(Ye)),[2]}})})};return ke.add(Ye),W}]),[2,W]}})})};function Ne(se){return Ae(this,void 0,void 0,function(){var Pe,Re,T,K,te,$,W,Ee,Le,Oe,Se;return He(this,function(we){switch(we.label){case 0:Pe={},Re=[],T=se.slice(0),we.label=1;case 1:return T.length?(K=void 0,[4,T.shift()]):[3,13];case 2:return(te=we.sent())&&te.done?[4,te.done()]:[3,4];case 3:we.sent(),we.label=4;case 4:if(!function(ze){if(!ze)return!1;for(var Ye=ze;Object.getPrototypeOf(Ye)!==null;)Ye=Object.getPrototypeOf(Ye);return Object.getPrototypeOf(ze)===Ye}(K))return[3,11];for(W in K={},$=[],te)$.push(W);Ee=0,we.label=5;case 5:return Ee<$.length?(Le=$[Ee],Oe=te[Le],/^[A-Z]/.test(Le)?Oe&&Oe.done?[4,Oe.done()]:[3,7]:[3,8]):[3,10];case 6:we.sent(),we.label=7;case 7:Oe&&Oe.objId?Oe={objId:Oe.objId}:typeof Oe=="function"&&(Se=X(),Pe[Se]=Oe,Oe={callbackId:Se}),we.label=8;case 8:K[Le]=Oe,we.label=9;case 9:return Ee++,[3,5];case 10:return[3,12];case 11:te&&te.objId?K={objId:te.objId}:typeof te=="function"&&te.objId===void 0?(Se=X(),Pe[Se]=te,K={callbackId:Se}):K=te,we.label=12;case 12:return Re.push(K),[3,1];case 13:return[2,[Re,Pe]]}})})}var Ie=function(se,Pe){Pe===void 0&&(Pe=!0);var Re=V({},se),T=Re.headers,K=T===void 0?{}:T,te=Re.subscriptions,$=te===void 0?{}:te,W=Re.mode,Ee=W===void 0?Te.nomal:W,Le=Re.commonOptions,Oe=K.backBtn,Se=Oe===void 0?{}:Oe,we=K.shareBtn,ze=we===void 0?{}:we,Ye=K.otherMenuBtn,tt=Ye===void 0?{}:Ye,st=function(rt,g){rt.subscribe&&typeof rt.subscribe=="function"&&(rt.callback=g,$[g]=rt.subscribe,Pe&&delete rt.subscribe)};if(st(Se,"wpsconfig_back_btn"),st(ze,"wpsconfig_share_btn"),st(tt,"wpsconfig_other_menu_btn"),tt.items&&Array.isArray(tt.items)){var mt=[];tt.items.forEach(function(rt,g){switch(rt===void 0&&(rt={}),rt.type){case"export_img":rt.type=1,rt.callback="export_img";break;case"export_pdf":rt.type=1,rt.callback="export_pdf";break;case"save_version":rt.type=1,rt.callback="save_version";break;case"about_wps":rt.type=1,rt.callback="about_wps";break;case"split_line":rt.type=2;break;case"custom":rt.type=3,st(rt,"wpsconfig_other_menu_btn_"+g),mt.push(rt)}}),mt.length&&(Z||ee)&&(tt.items=mt)}Re.url=Re.url||Re.wpsUrl;var ht=[];if((Ee===Te.simple||Le&&Le.isShowTopArea===!1)&&ht.push("simple","hidecmb"),Re.debug&&ht.push("debugger"),Re.url&&ht.length&&(Re.url=Re.url+(Re.url.indexOf("?")>=0?"&":"?")+ht.join("&")),Le&&(Le.isParentFullscreen||Le.isBrowserViewFullscreen)&&(document.addEventListener("fullscreenchange",me),document.addEventListener("webkitfullscreenchange",me),document.addEventListener("mozfullscreenchange",me)),Re.wordOptions&&(Re.wpsOptions=Re.wordOptions),Re.excelOptions&&(Re.etOptions=Re.excelOptions),Re.pptOptions&&(Re.wppOptions=Re.pptOptions),typeof $.print=="object"){var ft="wpsconfig_print";typeof $.print.subscribe=="function"&&($[ft]=$.print.subscribe,Re.print={callback:ft},$.print.custom!==void 0&&(Re.print.custom=$.print.custom)),delete $.print}return typeof $.exportPdf=="function"&&($[ft="wpsconfig_export_pdf"]=$.exportPdf,Re.exportPdf={callback:ft},delete $.exportPdf),Re.commandBars&&H(Re.commandBars,!1),V(V({},Re),{subscriptions:$})},je=function(se){se===void 0&&(se="");var Pe="";if(!Pe&&se){var Re=se.toLowerCase();Re.indexOf("/office/s/")!==-1&&(Pe=ue.spreadsheet),Re.indexOf("/office/w/")!==-1&&(Pe=ue.writer),Re.indexOf("/office/p/")!==-1&&(Pe=ue.presentation),Re.indexOf("/office/f/")!==-1&&(Pe=ue.pdf)}if(!Pe){var T=se.match(/[\?&]type=([a-z]+)/)||[];Pe=Fe[T[1]]||""}return Pe};function H(se,Pe){Pe===void 0&&(Pe=!0);var Re=se.map(function(T){var K=T.attributes;if(!Array.isArray(K)){var te=[];for(var $ in K)if(K.hasOwnProperty($)){var W={name:$,value:K[$]};te.push(W)}T.attributes=te}return T});return Pe&&O({data:Re,eventName:"setCommandBars"}),Re}var z=window.navigator.userAgent.toLowerCase(),Z=/Android|webOS|iPhone|iPod|BlackBerry|iPad/i.test(z),ee=function(){try{return window._parent.location.search.indexOf("from=wxminiprogram")!==-1}catch(se){return!1}}();function me(){var se={status:l.requestFullscreen},Pe=document,Re=Pe.fullscreenElement||Pe.webkitFullscreenElement||Pe.mozFullScreenElement;se.status=Re?l.requestFullscreen:l.exitFullscreen,O({data:se,eventName:"fullscreenchange"})}var ae=function(){ve.idMap={}};function x(){console.group("JSSDK \u4E8B\u4EF6\u673A\u5236\u8C03\u6574\u8BF4\u660E"),console.warn("jssdk.on\u3001jssdk.off \u548C jssdk.Application.Sub \u5C06\u5728\u540E\u7EED\u7248\u672C\u4E2D\u88AB\u5F03\u7528\uFF0C\u5EFA\u8BAE\u4F7F\u7528\u6539\u8FDB\u540E\u7684 ApiEvent"),console.warn("\u5177\u4F53\u8BF7\u53C2\u8003\uFF1Ahttps://wwo.wps.cn/docs/front-end/basic-usage/events/intro/"),console.groupEnd()}var A=0,N=new Set;function de(se){return A+=1,!se&&function(Pe){N.forEach(function(Re){return Re(Pe)})}(A),A}function We(){var se=new Error("");return(se.stack||se.message||"").split(`
`).slice(2).join(`
`)}function qe(se,Pe){var Re,T=this,K=Pe.Events,te=Pe.Enum,$=Pe.Props,W=$[0],Ee=$[1],Le={objId:A};switch(function ze(Ye,tt,st){for(var mt=tt.slice(0),ht=function(){var ft=mt.shift();!ft.alias&&~Ge.indexOf(ft.prop)&&mt.push(V(V({},ft),{alias:ft.prop+"Async"})),Object.defineProperty(Ye,ft.alias||ft.prop,{get:function(){var rt=this,g=ft.cache===1,v=g&&this["__"+ft.prop+"CacheValue"];if(!v){var Be=We(),I=de(g),ne=function(){for(var bt,ce=[],xe=0;xe<arguments.length;xe++)ce[xe]=arguments[xe];return ft.caller!==void 0?function Ue(B,q,oe){for(var ye=q.slice(0),L=function(){var pt=ye.shift();!pt.alias&&~Ge.indexOf(pt.prop)&&ye.push(V(V({},pt),{alias:pt.prop+"Async"})),Object.defineProperty(B,pt.alias||pt.prop,{get:function(){var fe=this,Et=pt.cache===1,It=Et&&this["__"+pt.prop+"CacheValue"];if(!It){var Ut=We(),yr=de(Et),Kt=function(){for(var Pt,br=[],wr=0;wr<arguments.length;wr++)br[wr]=arguments[wr];return pt.caller!==void 0?Ue(Pt={objId:de()},oe[pt.caller],oe):Pt={},Dt(Kt,Pt,"api.caller",{obj:Kt,args:br,parentObjId:B.objId,objId:Pt.objId,prop:pt.prop},Ut),Pt};return Kt.objId=-1,pt.getter!==void 0&&(Kt.objId=yr,Ue(Kt,oe[pt.getter],oe)),Dt(B,Kt,"api.getter",{parentObjId:B.objId,objId:Kt.objId,prop:pt.prop},Ut,function(){delete fe["__"+pt.prop+"CacheValue"]}),Et&&(this["__"+pt.prop+"CacheValue"]=Kt),Kt}return It},set:function(fe){var Et=We();return Dt(B,{},"api.setter",{value:fe,parentObjId:B.objId,objId:-1,prop:pt.prop},Et)}})};ye.length;)L()}(bt={objId:de()},st[ft.caller],st):bt={},Dt(ne,bt,"api.caller",{obj:ne,args:ce,parentObjId:Ye.objId,objId:bt.objId,prop:ft.prop},Be),bt};return ne.objId=-1,ft.getter!==void 0&&(ne.objId=I,ze(ne,st[ft.getter],st)),Dt(Ye,ne,"api.getter",{parentObjId:Ye.objId,objId:ne.objId,prop:ft.prop},Be,function(){delete rt["__"+ft.prop+"CacheValue"]}),g&&(this["__"+ft.prop+"CacheValue"]=ne),ne}return v},set:function(rt){var g=We();return Dt(Ye,{},"api.setter",{value:rt,parentObjId:Ye.objId,objId:-1,prop:ft.prop},g)}})};mt.length;)ht()}(Le,W,Ee),Le.Events=K,Le.Enum=te,se.Enum=Le.Enum,se.Events=Le.Events,se.Props=$,je(se.url)){case ue.writer:se.WordApplication=se.WpsApplication=function(){return Le};break;case ue.spreadsheet:se.ExcelApplication=se.EtApplication=function(){return Le};break;case ue.presentation:se.PPTApplication=se.WppApplication=function(){return Le};break;case ue.pdf:se.PDFApplication=function(){return Le}}se.Application=Le,se.Free=function(ze){return be("api.free",{objId:ze},"")},se.Stack=Le.Stack=(Re=function(ze){se&&se.Free(ze)},function(){var ze=[],Ye=function(tt){ze.push(tt)};return N.add(Ye),{End:function(){Re(ze),N.delete(Ye)}}});var Oe={};ke.add(function(ze){return Ae(T,void 0,void 0,function(){var Ye,tt,st,mt,ht;return He(this,function(ft){switch(ft.label){case 0:return d(ze)?[2]:(Ye=ke.parse(ze.data)).eventName==="api.event"&&Ye.data?(tt=Ye.data,st=tt.eventName,mt=tt.data,(ht=Oe[st])?[4,ht(mt)]:[3,2]):[3,2];case 1:ft.sent(),ft.label=2;case 2:return[2]}})})}),Le.Sub={};var Se=function(ze){var Ye=K[ze];Object.defineProperty(Le.Sub,Ye,{set:function(tt){x(),Oe[Ye]=tt,O({eventName:"api.event.register",data:{eventName:Ye,register:!!tt,objId:A+=1}})}})};for(var we in K)Se(we)}var Ge=["ExportAsFixedFormat","GetOperatorsInfo","ImportDataIntoFields","ReplaceText","ReplaceBookmark","GetBookmarkText","GetComments"];function ot(se,Pe,Re){for(var T=Pe.slice(0),K=function(){var te=T.shift();!te.alias&&~Ge.indexOf(te.prop)&&T.push(V(V({},te),{alias:te.prop+"Async"})),Object.defineProperty(se,te.alias||te.prop,{get:function(){var $=this,W=te.cache===1,Ee=W&&this["__"+te.prop+"CacheValue"];if(!Ee){var Le=We(),Oe=de(W),Se=function(){for(var ze=[],Ye=0,tt;Ye<arguments.length;Ye++)ze[Ye]=arguments[Ye];return te.caller!==void 0?(tt={objId:de()},ot(tt,Re[te.caller],Re)):tt={},Dt(we,tt,"api.caller",{obj:we,args:ze,parentObjId:se.objId,objId:tt.objId,prop:te.prop},Le),tt},we=Se;return we.objId=-1,te.getter!==void 0&&(we.objId=Oe,ot(we,Re[te.getter],Re)),Dt(se,we,"api.getter",{parentObjId:se.objId,objId:we.objId,prop:te.prop},Le,function(){delete $["__"+te.prop+"CacheValue"]}),W&&(this["__"+te.prop+"CacheValue"]=we),we}return Ee},set:function($){var W=We();return Dt(se,{},"api.setter",{value:$,parentObjId:se.objId,objId:-1,prop:te.prop},W)}})};T.length;)K()}function Dt(se,Pe,Re,T,K,te){var $,W=(se.done?se.done():Promise.resolve()).then(function(){return $||($=be(Re,T,K,te)),$});Pe.done=function(){return W},Pe.then=function(Ee,Le){return T.objId>=0?(Pe.then=null,Pe.catch=null,W.then(function(){Ee(Pe)}).catch(function(Oe){return Le(Oe)})):W.then(Ee,Le)},Pe.catch=function(Ee){return W.catch(Ee)},Pe.Destroy=function(){return be("api.free",{objId:Pe.objId},"")}}var at={},it=null,Lt={fileOpen:"fileOpen",tabSwitch:"tabSwitch",fileSaved:"fileSaved",fileStatus:"fileStatus",fullscreenChange:"fullscreenChange",error:"error",stage:"stage"},jt={getToken:"api.getToken",onToast:"event.toast",onHyperLinkOpen:"event.hyperLinkOpen",getClipboardData:"api.getClipboardData"};function Xt(se,Pe,Re,T,K,te,$){var W=this;Re===void 0&&(Re={}),ke.add(function(Ee){return Ae(W,void 0,void 0,function(){var Le,Oe,Se,we,ze,Ye,tt,st,mt,ht,ft,rt,g,v,Be,I,ne,bt,ce;return He(this,function(xe){switch(xe.label){case 0:return d(Ee)?[2]:(Le=ke.parse(Ee.data),Oe=Le.eventName,Se=Oe===void 0?"":Oe,we=Le.data,ze=we===void 0?null:we,Ye=Le.url,tt=Ye===void 0?null:Ye,["wps.jssdk.api"].indexOf(Se)!==-1?[2]:Se!=="ready"?[3,1]:(K.apiReadySended&&function(Ue){var B=[];Object.keys(at).forEach(function(q){at[q].forEach(function(oe){var ye=q;Ue.off(ye,oe),B.push({handle:oe,eventName:ye})}),delete at[q]}),B.forEach(function(q){var oe=q.eventName,ye=q.handle;it==null||it.ApiEvent.AddApiEventListener(oe,ye)})}(Pe),O({eventName:"setConfig",data:V(V({},Re),{version:se.version})}),se.tokenData&&se.setToken(V(V({},se.tokenData),{hasRefreshTokenConfig:!!Re.refreshToken})),se.iframeReady=!0,[3,15]));case 1:return Se!=="error"?[3,2]:(Pe.emit(Lt.error,ze),[3,15]);case 2:return Se!=="open.result"?[3,3]:(((ne=ze==null?void 0:ze.fileInfo)===null||ne===void 0?void 0:ne.officeVersion)!==void 0&&(se.mainVersion=ze.fileInfo.officeVersion,console.log("aliyun Main Version: V"+se.mainVersion)),Pe.emit(Lt.fileOpen,ze),[3,15]);case 3:return Se!=="api.scroll"?[3,4]:(window.scrollTo(ze.x,ze.y),[3,15]);case 4:if(Se!==jt.getToken)return[3,9];st={token:!1},xe.label=5;case 5:return xe.trys.push([5,7,,8]),[4,K.refreshToken()];case 6:return st=xe.sent(),[3,8];case 7:return mt=xe.sent(),console.error("refreshToken: "+(mt||"fail to get")),[3,8];case 8:return O({eventName:jt.getToken+".reply",data:st}),[3,15];case 9:if(Se!==jt.getClipboardData)return[3,14];ht={text:"",html:""},xe.label=10;case 10:return xe.trys.push([10,12,,13]),[4,K.getClipboardData()];case 11:return ht=xe.sent(),[3,13];case 12:return ft=xe.sent(),console.error("getClipboardData: "+(ft||"fail to get")),[3,13];case 13:return O({eventName:jt.getClipboardData+".reply",data:ht}),[3,15];case 14:Se===jt.onToast?K.onToast(ze):Se===jt.onHyperLinkOpen?K.onHyperLinkOpen(ze):Se==="stage"?Pe.emit(Lt.stage,ze):Se==="event.callback"?(rt=ze.eventName,g=ze.data,v=rt,rt==="fullScreenChange"&&(v=Lt.fullscreenChange),rt==="file.saved"&&(v=Lt.fileStatus),(!((bt=Re.commonOptions)===null||bt===void 0)&&bt.isBrowserViewFullscreen||!((ce=Re.commonOptions)===null||ce===void 0)&&ce.isParentFullscreen)&&v==="fullscreenchange"&&(Be=g.status,I=g.isDispatchEvent,Re.commonOptions.isBrowserViewFullscreen?function(Ue,B,q,oe){Ue===0?B.style="position: static; width: "+q.width+"; height: "+q.height:Ue===1&&(B.style="position: absolute; width: 100%; height: 100%"),oe&&function(ye){["fullscreen","fullscreenElement"].forEach(function(pt){Object.defineProperty(document,pt,{get:function(){return!!ye.status},configurable:!0})});var L=new CustomEvent("fullscreenchange");document.dispatchEvent(L)}({status:Ue})}(Be,te,$,I):Re.commonOptions.isParentFullscreen&&function(Ue,B,q){var oe=document.querySelector(q),ye=oe&&oe.nodeType===1?oe:B;if(Ue===0){var L=document,pt=L.exitFullscreen||L.mozCancelFullScreen||L.msExitFullscreen||L.webkitCancelFullScreen||L.webkitExitFullscreen;pt.call(document)}else if(Ue===1){var fe=ye.requestFullscreen||ye.mozRequestFullScreen||ye.msRequestFullscreen||ye.webkitRequestFullscreen;fe.call(ye)}}(Be,te,Re.commonOptions.isParentFullscreen)),Pe.emit(v,g)):Se==="api.ready"&&qe(se,ze),xe.label=15;case 15:return typeof T[Se]=="function"&&T[Se](se,tt||ze),[2]}})})})}function Vt(se){return new Promise(function(Pe){var Re=function(T){d(T)||ke.parse(T.data).eventName===se&&(Pe(),ke.remove(Re))};ke.add(Re)})}function Mt(se){var Pe,Re=this;se===void 0&&(se={}),it&&it.destroy();try{var T=Ie(se),K=T.subscriptions,te=K===void 0?{}:K,$=T.mount,W=$===void 0?null:$,Ee=T.url,Le=T.refreshToken,Oe=T.onToast,Se=T.onHyperLinkOpen,we=T.getClipboardData;P("origin",(Ee.match(/https*:\/\/[^\/]+/g)||[])[0]);var ze=M(Ee,W),Ye=Vt("ready"),tt=Vt("open.result"),st=Vt("api.ready"),mt=W?{width:W.clientWidth+"px",height:W.clientHeight+"px"}:{width:"100vw",height:"100vh"};delete T.mount,Ee&&delete T.url,delete T.subscriptions;var ht=(Pe=Pe||Object.create(null),{on:function(g,v){(Pe[g]||(Pe[g]=[])).push(v)},off:function(g,v){Pe[g]&&Pe[g].splice(Pe[g].indexOf(v)>>>0,1)},emit:function(g,v){(Pe[g]||[]).slice().map(function(Be){Be(v)}),(Pe["*"]||[]).slice().map(function(Be){Be(g,v)})}}),ft={apiReadySended:!1},rt=function(g,v,Be){return Ae(Re,void 0,void 0,function(){return He(this,function(I){switch(I.label){case 0:return function(ne,bt,ce){if(at[ne]){var xe=!!at[ne].find(function(Ue){return Ue===bt});return xe&&ce==="off"?(ht.off(ne,bt),at[ne]=at[ne].filter(function(Ue){return Ue!==bt}),!!at[ne].length||(at[ne]=void 0,!1)):(xe||ce!=="on"||(at[ne].push(bt),ht.on(ne,bt)),!0)}return ce==="on"?(at[ne]=[],at[ne].push(bt),!1):ce==="off"||void 0}(g,v,Be)?[3,2]:[4,Ye];case 1:I.sent(),function(ne,bt){var ce=ne.eventName,xe=ne.type,Ue=ne.handle;bt==="on"?ht.on(ce,Ue):ht.off(ce,Ue),xe==="base.event"&&O({eventName:"basic.event",data:{eventName:ce,action:bt}}),x()}(function(ne,bt){var ce=ne,xe="base.event";switch(ce){case Lt.fileSaved:console.warn("fileSaved\u4E8B\u4EF6\u76D1\u542C\u5373\u5C06\u5F03\u7528\uFF0C \u63A8\u8350\u4F7F\u7528fileStatus\u8FDB\u884C\u6587\u4EF6\u72B6\u6001\u7684\u76D1\u542C"),ce="fileStatus";break;case Lt.fullscreenChange:ce="fullscreenchange";break;case"error":case"fileOpen":xe="callback.event"}return{eventName:ce,type:xe,handle:bt}}(g,v),Be),I.label=2;case 2:return[2]}})})};return it={url:Ee,iframe:ze,version:"1.1.19",iframeReady:!1,tokenData:null,commandBars:null,tabs:{getTabs:function(){return Ae(this,void 0,void 0,function(){return He(this,function(g){switch(g.label){case 0:return[4,Ye];case 1:return g.sent(),[2,R({api:"tab.getTabs"})]}})})},switchTab:function(g){return Ae(this,void 0,void 0,function(){return He(this,function(v){switch(v.label){case 0:return[4,Ye];case 1:return v.sent(),[2,R({api:"tab.switchTab",args:{tabKey:g}})]}})})}},setCooperUserColor:function(g){return Ae(this,void 0,void 0,function(){return He(this,function(v){switch(v.label){case 0:return[4,Ye];case 1:return v.sent(),[2,R({api:"setCooperUserColor",args:g})]}})})},setToken:function(g){return Ae(this,void 0,void 0,function(){return He(this,function(v){switch(v.label){case 0:return[4,Ye];case 1:return v.sent(),it.tokenData=g,O({eventName:"setToken",data:g}),[2]}})})},ready:function(){return Ae(this,void 0,void 0,function(){return He(this,function(g){switch(g.label){case 0:return ft.apiReadySended?[3,2]:[4,tt];case 1:g.sent(),ft.apiReadySended=!0,O({eventName:"api.ready"}),g.label=2;case 2:return[4,st];case 3:return g.sent(),[2,new Promise(function(v){return setTimeout(function(){return v(it==null?void 0:it.Application)},0)})]}})})},destroy:function(){at={},ze.destroy(),ke.empty(),it=null,N=new Set,A=0,document.removeEventListener("fullscreenchange",me),ae()},save:function(){return Ae(this,void 0,void 0,function(){return He(this,function(g){switch(g.label){case 0:return[4,Ye];case 1:return g.sent(),[2,he({api:"save"})]}})})},setCommandBars:function(g){return Ae(this,void 0,void 0,function(){return He(this,function(v){switch(v.label){case 0:return[4,Ye];case 1:return v.sent(),H(g),[2]}})})},updateConfig:function(g){return g===void 0&&(g={}),Ae(this,void 0,void 0,function(){return He(this,function(v){switch(v.label){case 0:return[4,Ye];case 1:return v.sent(),g.commandBars?(console.warn("Deprecated: `updateConfig()` \u65B9\u6CD5\u5373\u5C06\u5E9F\u5F03\uFF0C\u8BF7\u4F7F\u7528`setCommandBars()`\u4EE3\u66FF`updateConfig()`\u66F4\u65B0`commandBars`\u914D\u7F6E\u3002"),[4,H(g.commandBars)]):[3,3];case 2:v.sent(),v.label=3;case 3:return[2]}})})},executeCommandBar:function(g){return Ae(this,void 0,void 0,function(){return He(this,function(v){switch(v.label){case 0:return[4,Ye];case 1:return v.sent(),H([{cmbId:g,attributes:[{name:"click",value:!0}]}]),[2]}})})},on:function(g,v){return Ae(this,void 0,void 0,function(){return He(this,function(Be){return[2,this.ApiEvent.AddApiEventListener(g,v)]})})},off:function(g,v){return Ae(this,void 0,void 0,function(){return He(this,function(Be){return[2,this.ApiEvent.RemoveApiEventListener(g,v)]})})},ApiEvent:{AddApiEventListener:function(g,v){return Ae(this,void 0,void 0,function(){return He(this,function(Be){switch(Be.label){case 0:return[4,rt(g,v,"on")];case 1:return[2,Be.sent()]}})})},RemoveApiEventListener:function(g,v){return Ae(this,void 0,void 0,function(){return He(this,function(Be){switch(Be.label){case 0:return[4,rt(g,v,"off")];case 1:return[2,Be.sent()]}})})}}},function(g,v,Be,I,ne,bt){v&&$e(v)&&(ne.refreshToken=v,g.refreshToken={eventName:jt.getToken}),bt&&$e(bt)&&(ne.getClipboardData=bt,g.getClipboardData={eventName:jt.getClipboardData}),Be&&$e(Be)&&(ne.onToast=Be,g.onToast={eventName:jt.onToast}),I&&$e(I)&&(ne.onHyperLinkOpen=I,g.onHyperLinkOpen={eventName:jt.onHyperLinkOpen})}(T,Le,Oe,Se,ft,we),Xt(it,ht,T,te,ft,ze,mt),it}catch(g){console.error(g)}}console.log("aliyun JS-SDK V1.1.19");var Rt=Object.freeze({__proto__:null,listener:Xt,config:Mt});window.WPS=Rt;var Me=Mt,Qe={config:Me};ie.config=Me,ie.default=Qe,Object.defineProperty(ie,"__esModule",{value:!0})})},8797:function(Nt,ut,ie){"use strict";var V=ie(59301),Ae=ie(93314),He=ie(3113),ke=Object.defineProperty,$e=Object.defineProperties,ue=Object.getOwnPropertyDescriptors,Fe=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,Y=(w,y,G)=>y in w?ke(w,y,{enumerable:!0,configurable:!0,writable:!0,value:G}):w[y]=G,P=(w,y)=>{for(var G in y||(y={}))Te.call(y,G)&&Y(w,G,y[G]);if(Fe)for(var G of Fe(y))l.call(y,G)&&Y(w,G,y[G]);return w},S=(w,y)=>$e(w,ue(y));const d=({img:w,buttonProps:y={},styles:G={},customText:X,ButtonText:M,ButtonClick:O,Buttonclass:Q,ButtonTwo:he,imgStyles:R,loading:ve=!1,className:Ce=""})=>V.createElement("section",{className:`tc animated fadeIn ${Ce}`,style:P({color:"#999",margin:"100px auto",visibility:ve?"hidden":"visible"},G)},V.createElement("img",{src:w||Ae,style:S(P({},R),{pointerEvents:"none",userSelect:"none"})}),V.createElement("p",{className:"mt20 font14"},X||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),M&&V.createElement(He.ZP,P({className:Q,onClick:O},y),M),he&&he);ut.Z=d},23210:function(Nt,ut,ie){"use strict";ie.d(ut,{Z:function(){return Q}});var V=ie(59301),Ae={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},He=ie(3113),ke=ie(70557),$e=ie(23954),ue=ie(6848),Fe=ie(955),Te=ie(94941),l=ie(8797),Y=ie(3294),P=ie(19381),S=ie(59301),d=Object.defineProperty,w=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable,X=(he,R,ve)=>R in he?d(he,R,{enumerable:!0,configurable:!0,writable:!0,value:ve}):he[R]=ve,M=(he,R)=>{for(var ve in R||(R={}))y.call(R,ve)&&X(he,ve,R[ve]);if(w)for(var ve of w(R))G.call(R,ve)&&X(he,ve,R[ve]);return he},O=(he,R,ve)=>new Promise((Ce,ge)=>{var be=je=>{try{Ie(ve.next(je))}catch(H){ge(H)}},Ne=je=>{try{Ie(ve.throw(je))}catch(H){ge(H)}},Ie=je=>je.done?Ce(je.value):Promise.resolve(je.value).then(be,Ne);Ie((ve=ve.apply(he,R)).next())}),Q=({editOffice:he="view",data:R,theme:ve,type:Ce,filename:ge,monacoEditor:be,className:Ne,style:Ie,close:je,onClose:H,hasMask:z,disabledDownload:Z,onImgDimensions:ee,showNodata:me,recordInfo:ae})=>{const[x,A]=(0,V.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[N,de]=(0,V.useState)(""),[We,qe]=(0,V.useState)(),Ge=window.ENV==="build"?"/react/build":"",ot=location.host.startsWith("localhost")?Y.Z.PROXY_SERVER:Y.Z.API_SERVER,at=10*(1024*1024),it=(0,V.useRef)();R!=null&&R.startsWith("/api")&&Ce!=="txt"&&(R=Y.Z.API_SERVER+R);const Lt=Mt=>Mt.substring(Mt.lastIndexOf("/")+1).split(".").pop();ge&&be&&(be.filename=ge),(0,V.useEffect)(()=>{var Mt,Rt;const Me=(Rt=(Mt=document.cookie)==null?void 0:Mt.replace(/\s/g,""))==null?void 0:Rt.split(";");Me==null||Me.map(Qe=>{let se=Qe.split("=");se[0]==="_educoder_session"&&de(se[1])})},[]),(0,V.useEffect)(()=>{Ce==="office"&&(R.indexOf("bigfilescdn.")>-1||R.indexOf("bigfiles1")>-1?qe({url:R,fileType:Lt(R),model:R.indexOf("model=edit")?"edit":"view"}):jt())},[Ce,R]);const jt=()=>O(void 0,null,function*(){console.log("data:",R);let Mt=R;R.startsWith("http")||(Mt=location.origin+Mt);let Rt=new URL(Mt).pathname.split("/").pop();const Me=yield(0,Te.gJ)({attachment_id:Rt});Me.url=ot+Me.url,qe(Me)}),Xt=()=>{if(R.startsWith("http")||R.startsWith("blob:")){Vt();return}(0,Fe.Sv)(ge||"educoder",R,ge)},Vt=()=>{ae&&(0,P.fc)({id:ae==null?void 0:ae.id,watch_type:1,course_id:ae==null?void 0:ae.course_id}),(0,Fe.Nd)(ge||"educoder",decodeURIComponent(R))};return S.createElement("div",{style:M({},Ie||{}),className:`${z&&Ae.bgBlack} ${Ce?Ae.wrp:"hide"}`},je&&S.createElement("div",{className:Ae.close,ref:it},!!ee&&S.createElement(ue.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>it.current},S.createElement("span",{onClick:()=>{H(),ee()}},S.createElement("i",{className:"icon-yulanpizhu"}))),!Z&&S.createElement(ue.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>it.current},S.createElement("span",{onClick:Vt},S.createElement("i",{className:"icon-quxiaozhiding"}))),S.createElement(ue.Z,{title:"\u5173\u95ED",getPopupContainer:()=>it.current},S.createElement("span",{className:"",onClick:H},S.createElement("i",{className:"icon-guanbi1"})))),S.createElement("div",{className:`${Ae[Ne]} ${Ne} ${Ae.monaco} ${Ce==="txt"?"show":"hide"}`},Ce==="txt"&&S.createElement(S.Fragment,null,S.createElement($e.ZP,M({},be)))),Ce==="audio"&&S.createElement("audio",{src:`${(R==null?void 0:R.indexOf("http://"))>-1||(R==null?void 0:R.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${R}`,autoPlay:!0}),Ce==="video"&&S.createElement(S.Fragment,null,(R==null?void 0:R.indexOf("http"))>-1?S.createElement("video",{controls:!0,src:`${R}`,autoPlay:!0}):S.createElement("video",{controls:!0,src:`data:video/mp4;base64,${R}`,autoPlay:!0})),Ce==="office"&&We&&S.createElement("iframe",{src:`${Ge}/office.html?key=${We.key}&url=${btoa(We.url)}&callbackUrl=${ot+(We.callbackUrl||"")}&fileType=${We.fileType}&title=${We.title||""}&model=${he}&officeServer=${Y.Z.ONLYOFFICE}&disabledDownload=${!!Z}`}),Ce==="html"&&S.createElement("iframe",{src:R+"&disposition=inline"}),Ce==="pdf"&&S.createElement("iframe",{src:`${Ge}/js/pdfview/index.html?filename=${ge||"educoder.pdf"}&url=${encodeURIComponent(R)}&disabledDownload=${!!Z}`}),Ce==="image"&&S.createElement("img",{src:`${(R==null?void 0:R.indexOf("http://"))>-1||(R==null?void 0:R.indexOf("https://"))>-1?"":"data:image/png;base64,"}${R}`}),(Ce==="other"||Ce==="download")&&S.createElement(S.Fragment,null,me?S.createElement(l.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:S.createElement(He.ZP,{icon:S.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Xt,disabled:Z},"\u4E0B\u8F7D")}):S.createElement(He.ZP,{type:"primary",size:"middle",onClick:Xt,disabled:Z},S.createElement(ke.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},85149:function(Nt,ut,ie){"use strict";ie.d(ut,{z:function(){return Ce},Z:function(){return ge}});var V=ie(59301),Ae=ie(50304),He=ie(24768),ke=ie(64018),$e=ie(40846),ue=ie(3294),Fe=ie(955),Te=ie(15342),l=ie(1012),Y=ie(23210),P=ie(59301),d=({html:be})=>{const Ne=(0,V.useRef)(null),Ie=(0,V.useRef)(null),je=`.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 36px !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,V.useEffect)(()=>{const H=Ne.current.attachShadow({mode:"open"});Ie.current=document.createElement("div"),Ie.current.className="markdown-body",Ie.current.innerHTML=be,H.appendChild(Ie.current);const z=document.createElement("style");return z.textContent=je,H.appendChild(z),()=>{H.innerHTML=""}},[]),(0,V.useEffect)(()=>{Ie.current&&(Ie.current.innerHTML=be)},[be]),P.createElement("div",{ref:Ne})},w=Object.defineProperty,y=Object.getOwnPropertySymbols,G=Object.prototype.hasOwnProperty,X=Object.prototype.propertyIsEnumerable,M=(be,Ne,Ie)=>Ne in be?w(be,Ne,{enumerable:!0,configurable:!0,writable:!0,value:Ie}):be[Ne]=Ie,O=(be,Ne)=>{for(var Ie in Ne||(Ne={}))G.call(Ne,Ie)&&M(be,Ie,Ne[Ie]);if(y)for(var Ie of y(Ne))X.call(Ne,Ie)&&M(be,Ie,Ne[Ie]);return be};const Q="@\u2581\u2581@",he="@\u2581@",R=/<pre[^>]*>/g;function ve(be){let Ne=document.createElement("div");return Ne.innerHTML=be,Ne.childNodes.length===0?"":Ne.childNodes[0].nodeValue}const Ce=(be,Ne)=>{be=be||"";const Ie=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,je=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,H=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,z=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ne?be.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Ie,(Z,ee,me,ae,x,A,N)=>{const de=ee||ae||A,We=me||x||N||"?";return ue.Z.API_SERVER+"/api/attachments/"+de+We+"&t="+(0,Fe.Jn)(de,Date.now())+(Z.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(be=be.replace(z,(Z,ee,me,ae,x,A,N)=>{const de=ee||ae||A,We=me||x||N||"?";return ue.Z.API_SERVER+"/attachments/download/"+de+We+"&t="+(0,Fe.Jn)(de,Date.now())+(Z.indexOf(")")>-1?")":"&")}).replace(Ie,(Z,ee,me,ae,x,A,N)=>{const de=ee||ae||A,We=me||x||N||"?";return ue.Z.API_SERVER+"/api/attachments/"+de+We+"&t="+(0,Fe.Jn)(de,Date.now())+(Z.indexOf(")")>-1?")":"&")}).replace(je,(Z,ee,me,ae,x)=>{const A=ee||ae,N=me||x||"";return'"'+ue.Z.API_SERVER+"/api/attachments/"+A+N+A+N+"&t="+(0,Fe.Jn)(A,Date.now())}).replace(H,(Z,ee,me,ae,x)=>{const A=ee||ae,N=me||x||"";return"("+ue.Z.API_SERVER+"/files/uploads/"+A+N+A+N+"&t="+(0,Fe.Jn)(A,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,`
`),be)};var ge=({value:be="",className:Ne,showTextOnly:Ie,showLines:je,style:H={},stylesPrev:z={},highlightKeywords:Z,showProgramFill:ee,isProgramFill:me,disabledFill:ae=!1,programFillValue:x,onFillChange:A=We=>{},onFillBlur:N=()=>{},onFillFocus:de=()=>{}})=>{let We=String(be);const[qe,Ge]=(0,V.useState)(""),[ot,Dt]=(0,V.useState)("office"),[at,it]=(0,V.useState)([]),Lt=(0,V.useRef)("a"+(0,l.Z)()),jt={},Xt=($,W,Ee)=>{const Le=document.createElement($===he?"input":"textarea");Le.style.width="100%",Le.style.height=$===he?"40px":"151px",Le.rows=5,Le.spellcheck=!1,Le.name="edu-program-fill",Le.placeholder="\u8BF7\u8F93\u5165",Le.dataset.id=W;const Oe=Object.keys(jt).length;return jt[Oe]=Le,`<span class="edu-program-fill-wrap ${$===he?"":"show"}" style="width:${$===he?"400px":"100%"}" title=${Ee||""}><span>${Le.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Vt($){return $=$.replace(/!\[.*?\]\(.*?\)/g,""),$=$.replace(/\[.*?\]\(.*?\)/g,""),$=$.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),$=$.replace(/<embed.*?>/g,""),$=$.replace(/<img.*?>/g,""),$=$.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),$=$.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),$=$.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),$=$.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),$}const Mt=$=>$.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(W,Ee){let Le=Ee.replace(/(\n|\r)/g,"").split("}"),Oe=[];return Le.map(Se=>{Se!=""&&Oe.push(`.${Lt.current} ${Se}`)}),`<style>${Oe.join("}")}</style>`}),Rt=(0,V.useMemo)(()=>{try{const Le=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Oe=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Se=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,we=/\(\/attachments\/download\//g;We=We.replace(we,"("+ue.Z.API_SERVER+"/attachments/download/").replace(Le,"("+ue.Z.API_SERVER+"/api/attachments/").replace(Oe,'"'+ue.Z.API_SERVER+"/api/attachments/").replace(Se,'"'+ue.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(Le){}if(ee){let Le=-1;return We=We.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(Oe,Se,we){var ze;return++Le,Xt(Oe,Le,(ze=x==null?void 0:x[Le])==null?void 0:ze.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Mt(We||"")}</pre>`}let $=Mt(We);$=(0,He.ZP)($);const W=(0,He.ez)();We.match(/\[TOC\]/)&&($=$.replace("<p>[TOC]</p>",(0,He.Qv)()),(0,He.Iy)()),$=$.replace(/(__special_katext_id_\d+__)/g,(Le,Oe)=>{const{type:Se,expression:we}=W[Oe];return(0,Te.renderToString)(ve(we)||"",{displayMode:Se==="block",throwOnError:!1,output:"html"})}),$=$.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,He.AL)();const Ee=document.createElement("div");if(Ee.innerHTML=$,Ie)return Ee.innerText;if(Z){const Le=Z.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Pe(Ee,Le),Ee.innerHTML}return setTimeout(()=>K(),500),Ee.innerHTML},[We,Z]);(0,V.useEffect)(()=>{Re.current&&Re.current.querySelectorAll(["input","textarea"]).forEach(W=>{W.oninput=Me,W.onblur=Qe,W.onfocus=se})},[at]),(0,V.useEffect)(()=>{var $,W,Ee,Le,Oe;if(x!=null&&x.length)try{const Se=Re.current.querySelectorAll(".edu-program-fill-score"),we=Re.current.querySelectorAll('[name="edu-program-fill"]');for(const[ze,Ye]of we.entries())Ye.value=(($=x==null?void 0:x[ze])==null?void 0:$.value)||"",((W=x==null?void 0:x[ze])==null?void 0:W.type)==="warning"?Ye.className="program-fill-warning":((Ee=x==null?void 0:x[ze])==null?void 0:Ee.type)==="success"?Ye.className="program-fill-success":Ye.className="";for(const[ze,Ye]of Se.entries())Ye.innerHTML=(Le=x==null?void 0:x[ze])!=null&&Le.score?`${(Oe=x==null?void 0:x[ze])==null?void 0:Oe.score}\u5206`:"";it(x)}catch(Se){console.log(Se,"error")}},[x]);const Me=$=>{at[$.target.dataset.id]=at[$.target.dataset.id]||{},at[$.target.dataset.id].value=$.target.value,it([...at]),A(at,$.target.dataset.id)},Qe=$=>{at[$.target.dataset.id]=at[$.target.dataset.id]||{},at[$.target.dataset.id].value=$.target.value,it([...at]),N(at,$.target.dataset.id)},se=$=>{at[$.target.dataset.id]=at[$.target.dataset.id]||{},at[$.target.dataset.id].value=$.target.value,it([...at]),de(at,$.target.dataset.id)};function Pe($,W){return $.childNodes.forEach(Ee=>{var Le;if(Ee.childNodes.length>0)Pe(Ee,W);else if(Ee.nodeName!=="IMG")if(Ee.innerHTML)Ee.innerHTML=(Le=Ee.innerHTML)==null?void 0:Le.replace(new RegExp(W,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Oe=document.createElement("span");Oe.innerHTML=Ee.textContent.replace(new RegExp(W,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Ee.replaceWith(Oe)}})}const Re=(0,V.useRef)();He.jb.WebkitLineClamp=je,je&&(H=O(O({},H),He.jb));function T($){let W=$.target;if(W.tagName.toUpperCase()==="A"){let Ee=W.getAttribute("href");if(Ee.indexOf("office")>-1)$.preventDefault(),Ge(Ee),Dt("office");else if(Ee.indexOf("application/pdf")>-1)$.preventDefault(),Ge(Ee),Dt("pdf");else if(Ee.indexOf("text/html")>-1)$.preventDefault(),Ge(Ee),Dt("html");else if(Ee.startsWith("#")){$.preventDefault();let Le=document.getElementById(Ee.replace("#",""));Le&&Le.scrollIntoView(!0)}}}const K=()=>{var $;const W=($=Re.current)==null?void 0:$.querySelectorAll("video");W==null||W.forEach(Ee=>{if(Ee.oncontextmenu=()=>!1,Ee.src.indexOf(".m3u8")>-1&&!Ee.canPlayType("application/vnd.apple.mpegurl")){if($e.ZP.isSupported()){var Le=new $e.ZP;Le.loadSource(Ee.src),Le.attachMedia(Ee)}}})};(0,V.useEffect)(()=>{if(Re.current&&Rt&&Rt.match(R)&&window.PR.prettyPrint(),Re.current)return Re.current.addEventListener("click",T),()=>{var $;($=Re.current)==null||$.removeEventListener("click",T),(0,He.AL)(),(0,He.Iy)()}},[Rt,Re.current,T]),(0,V.useEffect)(()=>{var $;const W=Ee=>{Ee.preventDefault(),Ee.clipboardData.setData("text",window.getSelection().toString())};return($=Re.current)==null||$.addEventListener("copy",W),()=>{var Ee;(Ee=Re.current)==null||Ee.removeEventListener("copy",W)}},[Re.current]);const te=$=>/<style[\s\S]*?>/i.test($||"");return V.createElement(V.Fragment,null,Ie&&V.createElement("div",{ref:Re},Rt),!Ie&&!te(Rt)&&V.createElement("div",{ref:Re,style:O({},H),className:`${Ne||""} ${ae?"disabled-fill":""} markdown-body ${Lt.current}`,dangerouslySetInnerHTML:{__html:Rt}}),!Ie&&te(Rt)&&V.createElement(d,{html:Rt}),V.createElement(Y.Z,{close:!0,data:qe,type:qe!=null&&qe.length?ot:"",style:O({},z),onClose:()=>Ge("")}))}},23954:function(Nt,ut,ie){"use strict";ie.d(ut,{SV:function(){return Re},ZP:function(){return Pe}});var V=ie(59301),Ae=ie(76374);const He={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"]},ke={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"]},$e={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(`
`)}]},ue={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(`
`)}]},Fe={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=ie(53184),l=ie.n(Te),Y=Object.defineProperty,P=Object.defineProperties,S=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,G=(T,K,te)=>K in T?Y(T,K,{enumerable:!0,configurable:!0,writable:!0,value:te}):T[K]=te,X=(T,K)=>{for(var te in K||(K={}))w.call(K,te)&&G(T,te,K[te]);if(d)for(var te of d(K))y.call(K,te)&&G(T,te,K[te]);return T},M=(T,K)=>P(T,S(K)),O=(T,K,te)=>new Promise(($,W)=>{var Ee=Se=>{try{Oe(te.next(Se))}catch(we){W(we)}},Le=Se=>{try{Oe(te.throw(Se))}catch(we){W(we)}},Oe=Se=>Se.done?$(Se.value):Promise.resolve(Se.value).then(Ee,Le);Oe((te=te.apply(T,K)).next())});const Q={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"]}},he=(T,K)=>K.map(te=>({label:te,kind:T.languages.CompletionItemKind.Keyword,insertText:te})),R=T=>Object.keys(Q.tables).map(K=>({label:K,kind:T.languages.CompletionItemKind.Variable,insertText:K})),ve=(T,K)=>{const te=Q.tables[T];return te?te.map($=>({label:$,kind:K.languages.CompletionItemKind.Field,insertText:$})):[]};function Ce(T,K,te,$,W){let Ee=K.getWordUntilPosition(te),Le={startLineNumber:te.lineNumber,endLineNumber:te.lineNumber,startColumn:Ee.startColumn,endColumn:Ee.endColumn},Oe=$.map(Se=>({label:Se,kind:T.languages.CompletionItemKind.Keyword,insertText:Se,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Le}));return W.map(Se=>{Oe.push(M(X({},Se),{range:Le}))}),Oe}var ge=T=>{Q.languages.map(W=>(T.languages.registerDocumentFormattingEditProvider(W,{provideDocumentFormattingEdits(Ee,Le,Oe){return O(this,null,function*(){const Se=l()(Ee.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:Ee.getFullModelRange(),text:Se}]})}}),W));const K=$e.quickKey.map(W=>({label:W.label,kind:T.languages.CompletionItemKind.Method,insertText:W.content,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet})),te=ue.quickKey.map(W=>({label:W.label,kind:T.languages.CompletionItemKind.Method,insertText:W.content,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet})),$=ke.quickKey.map(W=>({label:W.label,kind:T.languages.CompletionItemKind.Method,insertText:W.content,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet}));T.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(W,Ee){var Le=W.getWordUntilPosition(Ee),Oe={startLineNumber:Ee.lineNumber,endLineNumber:Ee.lineNumber,startColumn:Le.startColumn,endColumn:Le.endColumn},Se=W.getLineContent(Ee.lineNumber).substring(Le.startColumn-2,Le.endColumn);return{suggestions:[...$e.keywords.map(we=>({label:we,kind:T.languages.CompletionItemKind.Function,documentation:we,insertText:we,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe})),...$e.quickKey.map(we=>({label:we.label,kind:T.languages.CompletionItemKind.Function,documentation:we.content,insertText:Se.startsWith("#")?we.content.replace(/#/,""):we.content,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}))]}}}),T.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(W,Ee){var Le=W.getWordUntilPosition(Ee),Oe={startLineNumber:Ee.lineNumber,endLineNumber:Ee.lineNumber,startColumn:Le.startColumn,endColumn:Le.endColumn};return{suggestions:[...He.keywords.map(Se=>({label:Se,kind:T.languages.CompletionItemKind.Function,documentation:Se,insertText:Se,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}))]}}}),T.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(W,Ee){var Le=W.getWordUntilPosition(Ee),Oe={startLineNumber:Ee.lineNumber,endLineNumber:Ee.lineNumber,startColumn:Le.startColumn,endColumn:Le.endColumn},Se=W.getLineContent(Ee.lineNumber).substring(Le.startColumn-2,Le.endColumn);return{suggestions:[...ke.keywords.map(we=>({label:we,kind:T.languages.CompletionItemKind.Function,documentation:we,insertText:we,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe})),...ke.quickKey.map(we=>({label:we.label,kind:T.languages.CompletionItemKind.Function,documentation:we.content,insertText:Se.startsWith("#")?we.content.replace(/#/,""):we.content,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}))]}}}),T.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(W,Ee){var Le=W.getWordUntilPosition(Ee),Oe={startLineNumber:Ee.lineNumber,endLineNumber:Ee.lineNumber,startColumn:Le.startColumn,endColumn:Le.endColumn},Se=W.getLineContent(Ee.lineNumber).substring(Le.startColumn-2,Le.endColumn);return{suggestions:[...Fe.keywords.map(we=>({label:we,kind:T.languages.CompletionItemKind.Function,documentation:we,insertText:we,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe})),...Fe.quickKey.map(we=>({label:we.label,kind:T.languages.CompletionItemKind.Function,documentation:we.content,insertText:Se.startsWith("#")?we.content.replace(/#/,""):we.content,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}))]}}}),T.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(W,Ee){var Le=W.getWordUntilPosition(Ee),Oe={startLineNumber:Ee.lineNumber,endLineNumber:Ee.lineNumber,startColumn:Le.startColumn,endColumn:Le.endColumn},Se=W.getLineContent(Ee.lineNumber).substring(Le.startColumn-2,Le.endColumn);return{suggestions:[...ue.keywords.map(we=>({label:we,kind:T.languages.CompletionItemKind.Function,documentation:we,insertText:we,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe})),...ue.quickKey.map(we=>({label:we.label,kind:T.languages.CompletionItemKind.Function,documentation:we.content,insertText:Se.startsWith("#")?we.content.replace(/#/,""):we.content,insertTextRules:T.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Oe}))]}}})};const be="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Ne=Object.defineProperty,Ie=(T,K,te)=>K in T?Ne(T,K,{enumerable:!0,configurable:!0,writable:!0,value:te}):T[K]=te,je=(T,K,te)=>Ie(T,typeof K!="symbol"?K+"":K,te);const H=class Zo{constructor(K,te,$){this.placeholder=K,this.editor=te,this.monaco=$,te.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return Zo.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)}};je(H,"ID","editor.widget.placeholderHint");var Z=H,ee=ie(96236),me=ie(8591),ae=ie(6848),x=ie(89392),A=ie(34604),N=ie(56102),de=Object.defineProperty,We=Object.defineProperties,qe=Object.getOwnPropertyDescriptors,Ge=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,Dt=Object.prototype.propertyIsEnumerable,at=(T,K,te)=>K in T?de(T,K,{enumerable:!0,configurable:!0,writable:!0,value:te}):T[K]=te,it=(T,K)=>{for(var te in K||(K={}))ot.call(K,te)&&at(T,te,K[te]);if(Ge)for(var te of Ge(K))Dt.call(K,te)&&at(T,te,K[te]);return T},Lt=(T,K)=>We(T,qe(K)),jt=(T,K)=>{var te={};for(var $ in T)ot.call(T,$)&&K.indexOf($)<0&&(te[$]=T[$]);if(T!=null&&Ge)for(var $ of Ge(T))K.indexOf($)<0&&Dt.call(T,$)&&(te[$]=T[$]);return te},Xt=(T,K,te)=>new Promise(($,W)=>{var Ee=Se=>{try{Oe(te.next(Se))}catch(we){W(we)}},Le=Se=>{try{Oe(te.throw(Se))}catch(we){W(we)}},Oe=Se=>Se.done?$(Se.value):Promise.resolve(Se.value).then(Ee,Le);Oe((te=te.apply(T,K)).next())});function Vt(T){return/^\d+$/.test(T)?`${T}px`:T}function Mt(){}let Rt=!1;const Me={"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 Qe(T=[]){let K=T;if(Array.isArray(T)){for(let te=0;te<T.length;te++){let $=Me[T[te]];if($)return $}return K[0]}return Me[K]||K}let se=null;var Pe=T=>{var K=T,{width:te="100%",height:$="100%",value:W,language:Ee="javascript",style:Le={},options:Oe={},overrideServices:Se={},theme:we="vs-dark",onEditBlur:ze,isCopy:Ye=!1,onSave:tt,autoHeight:st=!1,forbidCopy:mt=!1,onChange:ht=Mt,editorDidMount:ft=Mt,onFocus:rt=Mt,onBreakPoint:g=Mt,breakPointValue:v=[],filename:Be="educoder.txt",errorLine:I,errorContent:ne="",highlightLine:bt,openBreakPoint:ce=!1,placeholder:xe=""}=K,Ue=jt(K,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder"]);const B=(0,V.useRef)(),q=(0,V.useRef)({}),oe=(0,V.useRef)(),ye=(0,V.useRef)(),L=(0,V.useRef)([]),pt=(0,V.useRef)(!1),fe=(0,V.useRef)(),Et=(0,V.useRef)(),It=(0,V.useRef)(!1),[Ut,yr]=(0,V.useState)(!1);function Kt(){let zt;return B.current&&(zt=new Ae.Z(Tt=>{for(let Qt of Tt)(Qt.target.offsetHeight>0||Qt.target.offsetWidth>0)&&q.current.instance.layout()}),zt.observe(B.current)),zt}function Pt(){me.ZP.warning({content:decodeURIComponent(be),key:"monaco-editor-tip"})}const br=()=>{let zt=q.current.instance;if(W!=null&&zt&&Ut){const Tt=zt.getModel();Tt&&W!==Tt.getValue()&&(Rt=!0,Tt.setValue(W),zt.layout(),Rt=!1)}};(0,V.useEffect)(()=>{const zt=A.Z.subscribe("formatDocument",Tt=>{var Qt;let Er=q.current.instance;(Qt=Er==null?void 0:Er.getAction)==null||Qt.call(Er,"editor.action.formatDocument").run()});return window.updateMonacoValue=Tt=>{ht(Tt)},zt},[]),(0,V.useEffect)(()=>{var zt;let Tt=q.current.instance;ye.current&&clearTimeout(ye.current),ye.current=setTimeout(()=>{br()},500),W&&(W!=null&&W.length)&&((zt=Tt==null?void 0:Tt.updateOptions)==null||zt.call(Tt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(W.split(/\r\n|\r|\n/g).length))+3,5)}))},[W,Ut,q.current]),(0,V.useEffect)(()=>{if(I&&q.current&&q.current.instance){let Tt=q.current.instance;Tt.changeViewZones(function(Qt){var Er=document.createElement("div");Er.style.padding="10px 20px",Er.style.width="calc(100% - 20px)",Er.className="my-error-line-wrp",Er.innerHTML=ne,Qt.addZone({afterLineNumber:I||11,heightInLines:3,domNode:Er})});var zt={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}};Tt.addOverlayWidget(zt),Tt.revealPositionInCenter({lineNumber:20,column:1})}},[I,q.current,Ut]);const wr=(zt="",Tt)=>{if(!zt||zt.trim()==="")return!0;const Er=q.current.instance.getModel().getLineTokens(Tt);let _r=!1;for(let Wr=0;Wr<2;Wr++)Er.getStandardTokenType(Wr)===1&&(_r=!0);return _r};(0,V.useEffect)(()=>{var zt;const Tt=(zt=q.current)==null?void 0:zt.instance;if(Tt&&Ut&&mt){const Qt=Tt.onDidBlurEditorWidget(()=>{It.current=!1}),Er=Tt.onDidFocusEditorText(()=>{It.current=!0});return()=>{Qt.dispose(),Er.dispose()}}},[q.current,Ut,mt]),(0,V.useEffect)(()=>{var zt;if((zt=q.current)!=null&&zt.instance&&Ut&&ce){let Tt=q.current.instance,Qt=Tt.getModel();if(!Qt)return;(()=>{var rr;let ur=[],Dr=[];const Rr=Qt.getAllDecorations();for(let an of Rr)an.options.className==="highlighted-line"&&(ur.push((rr=an==null?void 0:an.range)==null?void 0:rr.startLineNumber),Dr.push(an==null?void 0:an.id));if(bt===ur[0])return;Qt.deltaDecorations(Dr,[]);const Sr=Qt.getLineCount();bt&&bt<=Sr&&(Tt.deltaDecorations([],[{range:new se.Range(bt,1,bt,Qt.getLineMaxColumn(bt)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Tt.revealLineInCenter(bt))})();const _r=(rr=!1)=>{var ur;let Dr=[],Rr=[];const Sr=Qt.getAllDecorations();for(let an of Sr)an.options.linesDecorationsClassName==="breakpoints-select"&&(Dr.push((ur=an==null?void 0:an.range)==null?void 0:ur.startLineNumber),Rr.push(an==null?void 0:an.id));if(rr)return{lines:Dr,ids:Rr};g(Dr)},Wr=rr=>Xt(void 0,null,function*(){let ur={range:new se.Range(rr,1,rr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Qt.deltaDecorations([],[ur]),_r()}),Mn=rr=>Xt(void 0,null,function*(){let ur=[];const Dr=Tt.getLineDecorations(rr);for(let Rr of Dr)Rr.options.linesDecorationsClassName==="breakpoints-select"&&ur.push(Rr.id);yield Qt.deltaDecorations(ur,[]),_r()}),Vr=rr=>{let ur=Tt.getLineDecorations(rr);for(let Dr of ur)if(Dr.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,x.isEqual)(v,_r(!0).lines)){Qt.deltaDecorations(_r(!0).ids,[]);const rr=v.map(ur=>({range:new se.Range(ur,1,ur,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Qt.deltaDecorations([],rr)}const Tr=Tt.onDidChangeModelContent(rr=>{let ur=Tt.getPosition();if(ur){let Dr=ur.lineNumber;clearTimeout(Et.current),Et.current=setTimeout(()=>{wr(Qt.getLineContent(Dr),Dr)?Mn(Dr):Vr(Dr)?(Mn(Dr),Wr(Dr)):_r()},100)}}),Pr=Tt.onMouseDown(rr=>{var ur,Dr,Rr;if(rr.target.detail&&((Rr=(Dr=(ur=rr.target)==null?void 0:ur.element)==null?void 0:Dr.className)!=null&&Rr.includes("line-numbers"))){let Sr=rr.target.position.lineNumber;if(wr(Qt.getLineContent(Sr),Sr))return;Vr(Sr)?Mn(Sr):Wr(Sr)}}),hr=rr=>{let ur={range:new se.Range(rr,1,rr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};L.current=Tt.deltaDecorations(L.current,[ur])},nn=()=>{L.current=Tt.deltaDecorations(L.current,[])},fn=Tt.onMouseMove(rr=>{var ur,Dr,Rr;if(nn(),rr.target.detail&&((Rr=(Dr=(ur=rr.target)==null?void 0:ur.element)==null?void 0:Dr.className)!=null&&Rr.includes("line-numbers"))){let Sr=rr.target.position.lineNumber;if(wr(Qt.getLineContent(Sr),Sr))return;hr(Sr)}}),Kr=Tt.onMouseLeave(()=>{nn()});return()=>{Tr.dispose(),Pr.dispose(),fn.dispose(),Kr.dispose()}}},[q.current,Ut,v,bt,ce,Ee]),(0,V.useEffect)(()=>{var zt;(zt=q.current)!=null&&zt.instance&&ce&&q.current.instance.setPosition({lineNumber:0,column:0})},[bt]);function Gr(){let zt=q.current.instance;if(zt){const Tt=zt.getSelection(),Qt=q.current.pastePos||{},Er=new se.Range(Qt.startLineNumber||Tt.endLineNumber,Qt.startColumn||Tt.endColumn,Qt.endLineNumber||Tt.endLineNumber,Qt.endColumn||Tt.endColumn);setTimeout(()=>{zt.executeEdits("",[{range:Er,text:""}])},300)}}function zr(zt){(window.navigator.platform.match("Mac")?zt.metaKey:zt.ctrlKey)&&zt.keyCode==83&&(zt.preventDefault(),tt())}const kt=()=>{if(st&&q.current.instance){const zt=q.current.instance.getContentHeight();wn(zt<$?$:zt)}else wn($)};function qt(zt){var Tt=document.createEvent("MouseEvents");Tt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),zt.dispatchEvent(Tt)}const mr=zt=>{if(!It.current)return;const{keyCode:Tt,ctrlKey:Qt,metaKey:Er,target:_r,type:Wr}=zt;return(Wr==="paste"||(Tt===67||Tt===86)&&(Er||Qt))&&_r.nodeName==="TEXTAREA"&&(Pt(),zt.preventDefault()),!1};function jr(zt,Tt){var Qt=window.URL||window.webkitURL||window,Er=new Blob([Tt]),_r=document.createElementNS("http://www.w3.org/1999/xhtml","a");_r.href=Qt.createObjectURL(Er),_r.download=zt,qt(_r)}(0,V.useEffect)(()=>{kt()},[kt]),(0,V.useEffect)(()=>{B.current&&!Ut&&Promise.all([ie.e(8909),ie.e(3267)]).then(ie.bind(ie,71448)).then(zt=>{try{se=zt,q.current.instance=se.editor.create(B.current,{value:W,language:Qe(Ee),theme:we,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},Se);const Tt=q.current.instance;let _r=[...ee.BH._menuItems].find(Tr=>Tr[0]._debugName=="EditorContext")[1],Wr=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Mn=(Tr,Pr)=>{var hr,nn;let fn=Tr._first;do Pr.includes((nn=(hr=fn.element)==null?void 0:hr.command)==null?void 0:nn.id)&&Tr._remove(fn);while(fn=fn.next)};if(ft(Tt,se),setTimeout(()=>{kt(),q.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{jr(Be||"educoder.txt",Tt.getValue())}})},500),q.current.subscription=Tt.onDidChangeModelContent(Tr=>{pt.current?clearTimeout(fe.current):(kt(),ht(Tt.getValue(),Tr)),fe.current=setTimeout(()=>{pt.current=!1},500)}),window.Monaco||ge(se,Qe(Ee)),mt&&(Mn(_r,Wr),B.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",mr),window.removeEventListener("paste",mr),window.addEventListener("keydown",mr),window.addEventListener("paste",mr)),window.Monaco=se,ze&&Tt.onDidBlurEditorWidget(()=>{ze(Tt.getValue())}),rt&&Tt.onDidFocusEditorText(()=>{rt(Tt.getValue())}),mt)try{Tt.onDidPaste(Tr=>{const Pr=Tt.getSelection(),hr=q.current.pastePos||{},nn=new se.Range(hr.startLineNumber||Pr.endLineNumber,hr.startColumn||Pr.endColumn,hr.endLineNumber||Pr.endLineNumber,hr.endColumn||Pr.endColumn);Tt.executeEdits("",[{range:Tr.range,text:""}])})}catch(Tr){}let Vr=Kt();return xe&&typeof xe=="string"&&new Z(xe,Tt,se),yr(!0),()=>{const Tr=q.current.instance;Tr.dispose();const Pr=Tr.getModel();Pr&&Pr.dispose(),q.current.subscription&&q.current.subscription.dispose(),Vr.unobserve(B.current)}}catch(Tt){}})},[]),(0,V.useEffect)(()=>{if(q.current.instance&&Ut)return document.addEventListener("keydown",zr,!1),()=>{document.removeEventListener("keydown",zr)}},[tt,Ut]),(0,V.useEffect)(()=>{let zt=q.current.instance;if(zt&&Ut){let Tt=Qe(Ee);se.editor.setModelLanguage(zt.getModel(),Tt)}},[Ee,Ut]),(0,V.useEffect)(()=>{q.current.instance&&Ut&&se.editor.setTheme(we)},[we,Ut]),(0,V.useEffect)(()=>{let zt=q.current.instance;oe.current=Oe,zt&&Ut&&(zt.updateOptions(it({},Oe)),setTimeout(()=>{zt.getModel().updateOptions(it({},Oe))},200))},[JSON.stringify(Oe),Ut]),(0,V.useEffect)(()=>{let zt=q.current.instance;zt&&Ut&&zt.layout()},[te,$,Ut]);const[Or,tn]=(0,V.useState)(Vt(te)),[lr,wn]=(0,V.useState)(Vt($)),rn=Lt(it({},Le),{width:Or,height:lr,position:"relative"});return V.createElement("div",{className:"my-monaco-editor",ref:B,style:rn},Ye&&V.createElement(N.CopyToClipboard,{text:W,onCopy:()=>me.ZP.success("\u590D\u5236\u6210\u529F")},V.createElement(ae.Z,{title:"\u590D\u5236\u4EE3\u7801"},V.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},V.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Re({width:T="100%",height:K="100%",original:te,modified:$,language:W,options:Ee={}}){const Le=(0,V.useRef)(),[Oe,Se]=(0,V.useState)(null);function we(st){let mt;return Le.current&&(mt=new Ae.Z(ht=>{for(let ft of ht)(ft.target.offsetHeight>0||ft.target.offsetWidth>0)&&st.layout()}),mt.observe(Le.current)),mt}(0,V.useEffect)(()=>(Le.current&&Promise.all([ie.e(8909),ie.e(9404)]).then(ie.bind(ie,2550)).then(st=>{se=st;const mt=se.editor.createDiffEditor(Le.current,Lt(it({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},Ee),{wordWrap:!0}));Se(mt);let ht=we(mt);return()=>{mt.dispose();const ft=mt.getModel();ft&&ft.dispose(),ht.unobserve(Le.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,V.useEffect)(()=>{Oe&&Oe.setModel({original:se.editor.createModel(te,W),modified:se.editor.createModel($,W)})},[te,$,W,Oe]);const ze=Vt(T),Ye=Vt(K),tt={width:ze,height:Ye};return V.createElement("div",{className:"my-diff-editor",ref:Le,style:tt})}},57528:function(Nt,ut,ie){"use strict";ie.r(ut),ie.d(ut,{default:function(){return K}});var V=ie(59301),Ae=ie(53660),He=ie.n(Ae),ke=ie(89070),$e={box:"box___JDRma",question_buuton:"question_buuton___tVuIm",selectQuestion:"selectQuestion___xdvxF",addQuestion:"addQuestion___FQqbC",submit_button:"submit_button___NUmmN"},ue=ie(8591),Fe=ie(71418),Te=ie(24905),l=ie(3113),Y=ie(89392),P={modalContent:"modalContent___hC3en",modalContentLeft:"modalContentLeft___v0x0I",green:"green___pAmUz",textArea:"textArea___ucgCJ",red:"red___eb0mt",row:"row___td54s",html:"html___F0iOy",line:"line___I6TCQ",submit_button:"submit_button___JCIit"},S=ie(85149),d=Object.defineProperty,w=Object.defineProperties,y=Object.getOwnPropertyDescriptors,G=Object.getOwnPropertySymbols,X=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable,O=(te,$,W)=>$ in te?d(te,$,{enumerable:!0,configurable:!0,writable:!0,value:W}):te[$]=W,Q=(te,$)=>{for(var W in $||($={}))X.call($,W)&&O(te,W,$[W]);if(G)for(var W of G($))M.call($,W)&&O(te,W,$[W]);return te},he=(te,$)=>w(te,y($)),R=(te,$,W)=>new Promise((Ee,Le)=>{var Oe=ze=>{try{we(W.next(ze))}catch(Ye){Le(Ye)}},Se=ze=>{try{we(W.throw(ze))}catch(Ye){Le(Ye)}},we=ze=>ze.done?Ee(ze.value):Promise.resolve(ze.value).then(Oe,Se);we((W=W.apply(te,$)).next())});const ve=({problemset:te,dispatch:$,question:W,disabled:Ee,onSubmit:Le})=>{const[Oe,Se]=(0,V.useState)({}),[we,ze]=(0,V.useState)([]),[Ye,tt]=(0,V.useState)(!1),st=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];(0,V.useEffect)(()=>{const rt=(0,Y.cloneDeep)(W);Se(rt),ze(rt.choices),tt(!1)},[W]);const mt=()=>R(void 0,null,function*(){var rt;if(!we.some(Be=>Be==null?void 0:Be.checked)){ue.ZP.warning("\u8BF7\u60A8\u4F5C\u7B54\u540E\u518D\u63D0\u4EA4");return}const g=(rt=we==null?void 0:we.filter(Be=>Be==null?void 0:Be.checked))==null?void 0:rt.map(Be=>Be==null?void 0:Be.choice_id);if(yield Le(W==null?void 0:W.smart_plan_item_bank_id,g)){if(Ye){const Be=(0,Y.cloneDeep)(W);ze(Be.choices)}tt(!Ye)}}),ht=(rt,g)=>{console.log(rt.target.checked);const v=we.map((Be,I)=>he(Q({},Be),{checked:I===g?rt.target.checked:Be.checked}));ze(v)},ft=(rt=!1)=>{let g="";return we.forEach((v,Be)=>{rt?v!=null&&v.me_answered&&(g=g+st[Be]):v!=null&&v.is_answer&&(g=g+st[Be])}),g};return V.createElement("div",null,V.createElement("div",{className:"c-light-primary mb5 font16"},"\u591A\u9009\u9898"),V.createElement(S.Z,{value:Oe==null?void 0:Oe.name}),we==null?void 0:we.map((rt,g)=>{const{is_answer:v,checked:Be,choice_text:I,me_answered:ne}=rt;let bt="";return(Ye||W!=null&&W.is_answered)&&v&&(bt=P.green),(Ye||W!=null&&W.is_answered)&&!v&&(Be||ne)&&(bt=P.red),V.createElement("div",{key:g,style:{pointerEvents:Ye?"none":"auto"},className:`${P.row} ${bt}`},V.createElement(Te.default,{disabled:Ee||(W==null?void 0:W.is_answered),style:{padding:3},onChange:ce=>ht(ce,g),checked:Be||(rt==null?void 0:rt.me_answered)}),V.createElement("span",null,st[g],".\xA0"),V.createElement(S.Z,{className:P.html,value:I}),(Ye||(W==null?void 0:W.is_answered))&&v&&V.createElement("span",{style:{paddingTop:4},className:"iconfont icon-duigou1 font16"}),(Ye||(W==null?void 0:W.is_answered))&&!v&&(Be||ne)&&V.createElement("span",{style:{fontWeight:600,paddingTop:5},className:"iconfont icon-guanbi font16"}))}),(Ye||(W==null?void 0:W.is_answered))&&V.createElement(V.Fragment,null,V.createElement("div",{className:P.line}),V.createElement("div",{className:"c-grey-333 mb5"},V.createElement("b",null,"\u6211\u7684\u7B54\u6848:\xA0"),ft(!0)),V.createElement("div",{className:"c-grey-333 mb5"},V.createElement("b",null,"\u6B63\u786E\u7B54\u6848:\xA0"),ft()),V.createElement("div",{className:"c-grey-333 mb10"},V.createElement("b",null,"\u89E3\u6790:\xA0"),(Oe==null?void 0:Oe.analysis)||"\u6682\u65E0\u89E3\u6790")),!Ye&&!Ee&&!(W!=null&&W.is_answered)&&V.createElement("div",{className:"flex justify-center"},V.createElement(l.ZP,{className:P.submit_button,type:"primary",onClick:()=>{mt()}},"\u63D0\u4EA4")))};var Ce=(0,ke.connect)(({problemset:te})=>({problemset:te}))(ve),ge=ie(5112),be=ie(59301),Ne=Object.defineProperty,Ie=Object.defineProperties,je=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertySymbols,z=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,ee=(te,$,W)=>$ in te?Ne(te,$,{enumerable:!0,configurable:!0,writable:!0,value:W}):te[$]=W,me=(te,$)=>{for(var W in $||($={}))z.call($,W)&&ee(te,W,$[W]);if(H)for(var W of H($))Z.call($,W)&&ee(te,W,$[W]);return te},ae=(te,$)=>Ie(te,je($)),x=(te,$,W)=>new Promise((Ee,Le)=>{var Oe=ze=>{try{we(W.next(ze))}catch(Ye){Le(Ye)}},Se=ze=>{try{we(W.throw(ze))}catch(Ye){Le(Ye)}},we=ze=>ze.done?Ee(ze.value):Promise.resolve(ze.value).then(Oe,Se);we((W=W.apply(te,$)).next())});const A=({problemset:te,dispatch:$,question:W,disabled:Ee,onSubmit:Le})=>{const[Oe,Se]=(0,V.useState)({}),[we,ze]=(0,V.useState)([]),[Ye,tt]=(0,V.useState)(!1),[st]=(0,ke.useSearchParams)(),mt=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];(0,V.useEffect)(()=>{const rt=(0,Y.cloneDeep)(W);Se(rt),ze(rt.choices),tt(!1)},[W]);const ht=()=>x(void 0,null,function*(){var rt;if(!we.some(v=>v==null?void 0:v.checked)){ue.ZP.warning("\u8BF7\u60A8\u4F5C\u7B54\u540E\u518D\u63D0\u4EA4");return}if(yield Le(W==null?void 0:W.smart_plan_item_bank_id,(rt=we.find(v=>v.checked))==null?void 0:rt.choice_id)){if(Ye){const v=(0,Y.cloneDeep)(W);ze(v.choices)}tt(!Ye)}}),ft=(rt,g)=>{const v=we.map((Be,I)=>ae(me({},Be),{checked:I===g?rt.target.checked:!1}));ze(v)};return be.createElement("div",null,be.createElement("div",{className:"c-light-primary mb5 font16"},"\u5355\u9009\u9898"),be.createElement(S.Z,{value:Oe==null?void 0:Oe.name}),we==null?void 0:we.map((rt,g)=>{const{is_answer:v,checked:Be,choice_text:I,me_answered:ne}=rt;let bt="";return(Ye||W!=null&&W.is_answered)&&v&&(bt=P.green),(Ye||W!=null&&W.is_answered)&&!v&&(Be||ne)&&(bt=P.red),be.createElement("div",{key:g,style:{pointerEvents:Ye?"none":"auto"},className:`${P.row} ${bt}`},be.createElement(ge.ZP,{disabled:Ee||(W==null?void 0:W.is_answered),onChange:ce=>ft(ce,g),checked:Be||(rt==null?void 0:rt.me_answered)}),be.createElement("span",null,mt[g],".\xA0"),be.createElement(S.Z,{className:P.html,value:I}),(Ye||(W==null?void 0:W.is_answered))&&v&&be.createElement("span",{style:{paddingTop:4},className:"iconfont icon-duigou1 font16"}),(Ye||(W==null?void 0:W.is_answered))&&!v&&(Be||ne)&&be.createElement("span",{style:{fontWeight:600,paddingTop:5},className:"iconfont icon-guanbi font16"}))}),(Ye||(W==null?void 0:W.is_answered))&&be.createElement(V.Fragment,null,be.createElement("div",{className:P.line}),be.createElement("div",{className:"c-grey-333 mb5"},be.createElement("b",null,"\u6211\u7684\u7B54\u6848:\xA0"),mt[we.findIndex(rt=>rt==null?void 0:rt.me_answered)]),be.createElement("div",{className:"c-grey-333 mb5"},be.createElement("b",null,"\u6B63\u786E\u7B54\u6848:\xA0"),mt[we.findIndex(rt=>rt==null?void 0:rt.is_answer)]),be.createElement("div",{className:"c-grey-333 mb10"},be.createElement("b",null,"\u89E3\u6790:\xA0"),(Oe==null?void 0:Oe.analysis)||"\u6682\u65E0\u89E3\u6790")),!Ee&&(!Ye||!(W!=null&&W.is_answered))&&be.createElement("div",{className:"flex justify-center"},be.createElement(l.ZP,{className:P.submit_button,type:"primary",onClick:()=>{ht()}},"\u63D0\u4EA4")))};var N=(0,ke.connect)(({problemset:te})=>({problemset:te}))(A),de=Object.defineProperty,We=Object.defineProperties,qe=Object.getOwnPropertyDescriptors,Ge=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,Dt=Object.prototype.propertyIsEnumerable,at=(te,$,W)=>$ in te?de(te,$,{enumerable:!0,configurable:!0,writable:!0,value:W}):te[$]=W,it=(te,$)=>{for(var W in $||($={}))ot.call($,W)&&at(te,W,$[W]);if(Ge)for(var W of Ge($))Dt.call($,W)&&at(te,W,$[W]);return te},Lt=(te,$)=>We(te,qe($)),jt=(te,$,W)=>new Promise((Ee,Le)=>{var Oe=ze=>{try{we(W.next(ze))}catch(Ye){Le(Ye)}},Se=ze=>{try{we(W.throw(ze))}catch(Ye){Le(Ye)}},we=ze=>ze.done?Ee(ze.value):Promise.resolve(ze.value).then(Oe,Se);we((W=W.apply(te,$)).next())});const Xt=({problemset:te,dispatch:$,question:W,disabled:Ee,onSubmit:Le})=>{var Oe,Se;const[we,ze]=(0,V.useState)({}),[Ye,tt]=(0,V.useState)([]),[st,mt]=(0,V.useState)(!1),ht=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"];(0,V.useEffect)(()=>{const g=(0,Y.cloneDeep)(W);ze(g),tt(g.choices),mt(!1)},[W]);const ft=()=>jt(void 0,null,function*(){var g;if(!Ye.some(Be=>Be==null?void 0:Be.checked)){ue.ZP.warning("\u8BF7\u60A8\u4F5C\u7B54\u540E\u518D\u63D0\u4EA4");return}if(yield Le(W==null?void 0:W.smart_plan_item_bank_id,(g=Ye.find(Be=>Be.checked))==null?void 0:g.choice_id)){if(st){const Be=(0,Y.cloneDeep)(W);tt(Be.choices)}mt(!st)}}),rt=(g,v)=>{console.log(g.target.checked);const Be=Ye.map((I,ne)=>Lt(it({},I),{checked:ne===v?g.target.checked:!1}));tt(Be)};return V.createElement("div",null,V.createElement("div",{className:"c-light-primary mb5 font16"},"\u5224\u65AD\u9898"),V.createElement(S.Z,{value:we==null?void 0:we.name}),Ye==null?void 0:Ye.map((g,v)=>{const{is_answer:Be,checked:I,choice_text:ne,me_answered:bt}=g;let ce="";return(st||W!=null&&W.is_answered)&&Be&&(ce=P.green),(st||W!=null&&W.is_answered)&&!Be&&(I||bt)&&(ce=P.red),V.createElement("div",{key:v,style:{pointerEvents:st?"none":"auto"},className:`${P.row} ${ce}`},V.createElement(ge.ZP,{disabled:Ee||(W==null?void 0:W.is_answered),onChange:xe=>rt(xe,v),checked:I||(g==null?void 0:g.me_answered)}),V.createElement(S.Z,{className:P.html,value:ne}),(st||(W==null?void 0:W.is_answered))&&Be&&V.createElement("span",{style:{paddingTop:4},className:"iconfont icon-duigou1 font16"}),(st||(W==null?void 0:W.is_answered))&&!Be&&(I||bt)&&V.createElement("span",{style:{fontWeight:600,paddingTop:5},className:"iconfont icon-guanbi font16"}))}),(st||(W==null?void 0:W.is_answered))&&V.createElement(V.Fragment,null,V.createElement("div",{className:P.line}),V.createElement("div",{className:"c-grey-333 mb5"},V.createElement("b",null,"\u6211\u7684\u7B54\u6848:\xA0"),(Oe=Ye.find(g=>g==null?void 0:g.me_answered))==null?void 0:Oe.choice_text),V.createElement("div",{className:"c-grey-333 mb5"},V.createElement("b",null,"\u6B63\u786E\u7B54\u6848:\xA0"),(Se=Ye.find(g=>g==null?void 0:g.is_answer))==null?void 0:Se.choice_text),V.createElement("div",{className:"c-grey-333 mb10"},V.createElement("b",null,"\u89E3\u6790:\xA0"),(we==null?void 0:we.analysis)||"\u6682\u65E0\u89E3\u6790")),!st&&!Ee&&!(W!=null&&W.is_answered)&&V.createElement("div",{className:"flex justify-center"},V.createElement(l.ZP,{className:P.submit_button,type:"primary",onClick:()=>{ft()}},"\u63D0\u4EA4")))};var Vt=(0,ke.connect)(({problemset:te})=>({problemset:te}))(Xt),Mt=ie(99064),Rt=ie(59301),Me=(te,$,W)=>new Promise((Ee,Le)=>{var Oe=ze=>{try{we(W.next(ze))}catch(Ye){Le(Ye)}},Se=ze=>{try{we(W.throw(ze))}catch(Ye){Le(Ye)}},we=ze=>ze.done?Ee(ze.value):Promise.resolve(ze.value).then(Oe,Se);we((W=W.apply(te,$)).next())});const Qe=({user:te,officeToken:$,globalSetting:W,loading:Ee,problemset:Le,dispatch:Oe,pageCache:Se,pageNum:we})=>{var ze,Ye,tt;const[st,mt]=(0,V.useState)([]),[ht]=(0,ke.useSearchParams)(),[ft,rt]=(0,V.useState)(0),[g,v]=(0,V.useState)(!1),[Be,I]=(0,V.useState)(!(Se!=null&&Se.allow_answer&&!(Se!=null&&Se.is_end)&&($==null?void 0:$.Status)!=="ended"));(0,V.useEffect)(()=>{I(!(Se!=null&&Se.allow_answer&&!(Se!=null&&Se.is_end)&&($==null?void 0:$.Status)!=="ended"))},[Se==null?void 0:Se.allow_answer,!(Se!=null&&Se.is_end),($==null?void 0:$.Status)!=="ended"]),(0,V.useEffect)(()=>{(we||Se!=null&&Se.page)&&ne()},[we,Se==null?void 0:Se.page,Se==null?void 0:Se.allow_answer,Se==null?void 0:Se.has_item_bank,Se==null?void 0:Se.randomData]);const ne=()=>Me(void 0,null,function*(){var ce;v(!0);let xe=yield(0,Mt.ZP)(`/api/courses/${ht.get("course_id")}/smart_plans/${ht.get("id")}/item_banks.json`,{method:"get",params:{position:we||(Se==null?void 0:Se.page)}});(xe==null?void 0:xe.status)==0&&(mt((ce=xe==null?void 0:xe.data)==null?void 0:ce.item_banks),rt(0)),v(!1)}),bt=(ce,xe)=>Me(void 0,null,function*(){const Ue=yield(0,Mt.ZP)(`/api/smart_plan_item_banks/${ce}/user_answers.json`,{method:"post",body:{item_choice_id:xe}});return(Ue==null?void 0:Ue.status)===0?(yield ne(),ue.ZP.success("\u63D0\u4EA4\u6210\u529F"),!0):!1});return Rt.createElement("section",null,Rt.createElement(Fe.Z,{spinning:g},Rt.createElement("div",{className:$e.box},st[ft]&&Rt.createElement("div",null,((ze=st[ft])==null?void 0:ze.item_type)==="SINGLE"&&Rt.createElement(N,{question:st[ft],onSubmit:bt,disabled:Be}),((Ye=st[ft])==null?void 0:Ye.item_type)==="MULTIPLE"&&Rt.createElement(Ce,{question:st[ft],onSubmit:bt,disabled:Be}),((tt=st[ft])==null?void 0:tt.item_type)==="JUDGMENT"&&Rt.createElement(Vt,{question:st[ft],onSubmit:bt,disabled:Be})))))};var se=(0,ke.connect)(({user:te,classroomList:$,loading:W,globalSetting:Ee,problemset:Le})=>({user:te,classroomList:$,globalSetting:Ee,loading:W.effects,problemset:Le}))(Qe),Pe=ie(955),Re=(te,$,W)=>new Promise((Ee,Le)=>{var Oe=ze=>{try{we(W.next(ze))}catch(Ye){Le(Ye)}},Se=ze=>{try{we(W.throw(ze))}catch(Ye){Le(Ye)}},we=ze=>ze.done?Ee(ze.value):Promise.resolve(ze.value).then(Oe,Se);we((W=W.apply(te,$)).next())});const T=({user:te,classroomList:$,globalSetting:W,loading:Ee,dispatch:Le})=>{const Oe=(0,V.useRef)(),Se=(0,ke.useParams)(),[we]=(0,ke.useSearchParams)(),[ze,Ye]=(0,V.useState)(),[tt,st]=(0,V.useState)(),[mt,ht]=(0,V.useState)(),[ft,rt]=(0,V.useState)(""),[g,v]=(0,V.useState)("380rem"),Be=(0,V.useRef)(tt),I=(0,V.useRef)();we.get("educoder_session")&&(0,Pe.d8)("_educoder_session",we.get("educoder_session"),30),(0,V.useEffect)(()=>{ze!=null&&ze.WebofficeURL&&Ue()},[ze]),(0,V.useEffect)(()=>{if(ce(),localStorage.userInfo)try{JSON.parse(localStorage.userInfo).real_name!=="\u6E38\u5BA2"&&(I.current=document.createElement("meta"),I.current.name="viewport",I.current.content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no",document.head.appendChild(I.current))}catch(oe){}return()=>{document.head.removeChild(I.current)}},[]),(0,V.useEffect)(()=>{if(tt!=null&&tt.is_end&&!(ze!=null&&ze.IsCreator)){let oe=JSON.parse(sessionStorage.getItem("endPPTIds"))||[];oe&&(oe!=null&&oe.includes(we.get("id")))||(ue.ZP.info("\u672C\u6B21\u6388\u8BFE\u5DF2\u7ED3\u675F\uFF0C\u611F\u8C22\u60A8\u7684\u53C2\u4E0E\uFF01"),(oe==null?void 0:oe.length)===0?oe=[we.get("id")]:oe.push(we.get("id")),sessionStorage.setItem("endPPTIds",JSON.stringify(oe)))}return()=>{localStorage.removeItem("endPPTIds")}},[tt==null?void 0:tt.is_end,ze]),(0,V.useEffect)(()=>{(tt==null?void 0:tt.is_end)===!1&&(ze==null?void 0:ze.Status)=="in_progress"&&ne()},[tt==null?void 0:tt.is_end,ze]),(0,V.useEffect)(()=>{mt&&bt(mt)},[mt]),(0,V.useEffect)(()=>{Be.current=tt},[tt]);const ne=()=>Re(void 0,null,function*(){const oe=yield(0,Mt.ZP)(`/api/courses/${we.get("course_id")}/smart_plans/${we.get("id")}/start_class.json`,{method:"post"})});(0,V.useEffect)(()=>{var oe;((oe=te==null?void 0:te.userInfo)==null?void 0:oe.real_name)==="\u6E38\u5BA2"&&Le({type:"user/showPopLogin",payload:{showPopLogin:!0,showClosable:!1}})},[te==null?void 0:te.userInfo]);function bt(oe){return Re(this,null,function*(){yield Oe.current.ready();const ye=Oe.current.Application;ye.ActivePresentation.SlideShowWindow.View.GotoSlide(oe),yield(yield ye.ActivePresentation.SlideShowSettings).Run()})}function ce(){return Re(this,null,function*(){var oe;const ye=yield(0,Mt.ZP)(`/api/courses/${we.get("course_id")}/smart_plans/${we.get("id")}/get_office_token.json`,{method:"get",params:{is_student:!0}}),L=((oe=ye==null?void 0:ye.data)==null?void 0:oe.FileName)||"";document.title=L,Ye(ye==null?void 0:ye.data),xe()})}function xe(){return Re(this,null,function*(){var oe,ye;try{const L=yield(0,Mt.ZP)(`/api/courses/${we.get("course_id")}/smart_plans/${we.get("id")}/set_page_cache.json`,{method:"post",body:{type:1}});(oe=L==null?void 0:L.data)!=null&&oe.page&&ht((ye=L==null?void 0:L.data)==null?void 0:ye.page),st(L==null?void 0:L.data)}catch(L){}setTimeout(()=>{var L;((L=Be.current)==null?void 0:L.is_end)===!1&&xe()},1e3)})}function Ue(){return Re(this,null,function*(){var oe=document.getElementById("weboffice-zone");Oe.current=He().config({mount:oe,url:ze.WebofficeURL,refreshToken:B}),Oe.current.setToken({token:ze.AccessToken,timeout:25*60*1e3}),q()})}function B(){return new Promise(function(oe){return Re(this,null,function*(){const ye=yield(0,Mt.ZP)(`/api/courses/${we.get("course_id")}/smart_plans/${we.get("id")}/refresh_office_token.json`,{method:"get",access_token:ze==null?void 0:ze.AccessToken,refresh_token:ze==null?void 0:ze.RefreshToken});oe(ye==null?void 0:ye.data)})})}function q(){return Re(this,null,function*(){yield Oe.current.ready();const oe=Oe.current.Application;console.log("app:",oe);const pt=yield(yield(yield oe.ActivePresentation).Slides).Count;console.log("count:",pt);const fe=yield oe.ActivePresentation.SlideShowWindow.View.Slide.SlideIndex;console.log("curryPage:",fe),rt(fe);try{oe.Sub.SlideSelectionChanged=Et=>Re(this,null,function*(){console.log("\u5207\u6362\u540E\u7684\u9875\u7801\uFF1A",Et),rt(Et)})}catch(Et){console.error("\u4E8B\u4EF6\u7ED1\u5B9A\u51FA\u9519:",Et)}oe.Sub.SlideShowEnd=()=>Re(this,null,function*(){v("380rem")}),setTimeout(()=>Re(this,null,function*(){yield(yield oe.ActivePresentation.SlideShowSettings).Run()}),500)})}return V.createElement("div",null,V.createElement("div",{id:"weboffice-zone",style:{height:g}}),V.createElement(se,{pageCache:tt,pageNum:ft,officeToken:ze}))};var K=(0,ke.connect)(({user:te,classroomList:$,loading:W,globalSetting:Ee})=>({user:te,classroomList:$,globalSetting:Ee,loading:W.effects}))(T)},24768:function(Nt,ut,ie){"use strict";ie.d(ut,{AL:function(){return he},Iy:function(){return P},Qv:function(){return w},ez:function(){return Q},jb:function(){return S}});var V=ie(32834),Ae=ie.n(V),He=ie(11690),ke=ie.n(He);let $e=1;function ue(be,Ne){const Ie=be.match(/^(\s+)(?:```)/);if(Ie===null)return Ne;const je=Ie[1];return Ne.split(`
`).map(H=>{const z=H.match(/^\s+/);if(z===null)return H;const[Z]=z;return Z.length>=je.length?H.slice(je.length):H}).join(`
`)}let Fe=[],Te=["<ul>"];const l=new(Ae()).Renderer,Y=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function P(){Fe.length=0,Te=["<ul>"]}const S={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function d(be,Ne,Ie,je){if(Ne>=be.length||be[Ne].level<=Ie)return Ne;var H=be[Ne];je.push("<li><a href='#"+$e+H.anchor+"'>"+H.text+"</a>"),Ne++;var z=[];return Ne=d(be,Ne,H.level,z),z.length>0&&(je.push("<ul>"),z.forEach(function(Z){je.push(Z)}),je.push("</ul>")),je.push("</li>"),Ne=d(be,Ne,Ie,je),Ne}function w(){return d(Fe,0,0,Te),Te.push("</ul>"),Te.join("")}const y={heading(be){const Ne=Y.exec(be);if($e+=1,Ne)return{type:"heading",raw:Ne[0],depth:Ne[1].length,text:Ne[2]}},fences(be){const Ne=this.rules.block.fences.exec(be);if(Ne){const Ie=Ne[0];let je=ue(Ie,Ne[3]||"");const H=Ne[2]?Ne[2].trim():Ne[2];if(["latex","katex","math"].indexOf(H)>=0){const z=M(),Z=je;je=z,O[z]={type:"block",expression:Z}}return{type:"code",raw:Ie,lang:H,text:je}}}},G=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let X=0;const M=()=>`__special_katext_id_${X++}__`;let O={};function Q(){return O}function he(){X=0,O={}}function R(be){return be=be.replace(G,(Ne,Ie)=>{const je=M();return O[je]={type:"inline",expression:Ie},je}),be}const ve=l.listitem;l.listitem=function(be){return ve(R(be))};const Ce=l.paragraph;l.paragraph=function(be){return Ce(R(be))};const ge=l.tablecell;l.tablecell=function(be,Ne){return ge(R(be),Ne)},l.code=function(be,Ne,Ie){const je=(Ne||"").match(/\S*/)[0];return je?["latex","katex","math"].indexOf(je)>=0?`<p class='editormd-tex'>${be}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ne}">${Ie?be:(0,He.escape)(be,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(Ie?be:(0,He.escape)(be,!0))+"</code></pre>"},l.heading=function(be,Ne,Ie){let je=this.options.headerPrefix+Ie.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Fe.push({anchor:je,level:Ne,text:be}),"<h"+Ne+' id="'+$e+je+'">'+be+"</h"+Ne+">"},Ae().setOptions({silent:!0,gfm:!0,pedantic:!1}),Ae().use({tokenizer:y,renderer:l}),ut.ZP=Ae()},36785:function(Nt,ut,ie){"use strict";ie.d(ut,{o2:function(){return $e},yT:function(){return ue}});var V=ie(80702),Ae=ie(33166);const He=Ae.i.map(Fe=>`${Fe}-inverse`),ke=["success","processing","error","default","warning"];function $e(Fe){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat((0,V.Z)(He),(0,V.Z)(Ae.i)).includes(Fe):Ae.i.includes(Fe)}function ue(Fe){return ke.includes(Fe)}},79676:function(Nt,ut,ie){"use strict";ie.d(ut,{Z:function(){return ue}});var V=ie(19447);function Ae(Fe,Te,l,Y){if(Y===!1)return{adjustX:!1,adjustY:!1};const P=Y&&typeof Y=="object"?Y:{},S={};switch(Fe){case"top":case"bottom":S.shiftX=Te.dropdownArrowOffset*2+l;break;case"left":case"right":S.shiftY=Te.dropdownArrowOffsetVertical*2+l;break}const d=Object.assign(Object.assign({},S),P);return d.shiftX||(d.adjustX=!0),d.shiftY||(d.adjustY=!0),d}const He={left:{points:["cr","cl"]},right:{points:["cl","cr"]},top:{points:["bc","tc"]},bottom:{points:["tc","bc"]},topLeft:{points:["bl","tl"]},leftTop:{points:["tr","tl"]},topRight:{points:["br","tr"]},rightTop:{points:["tl","tr"]},bottomRight:{points:["tr","br"]},rightBottom:{points:["bl","br"]},bottomLeft:{points:["tl","bl"]},leftBottom:{points:["br","bl"]}},ke={topLeft:{points:["bl","tc"]},leftTop:{points:["tr","cl"]},topRight:{points:["br","tc"]},rightTop:{points:["tl","cr"]},bottomRight:{points:["tr","bc"]},rightBottom:{points:["bl","cr"]},bottomLeft:{points:["tl","bc"]},leftBottom:{points:["br","cl"]}},$e=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function ue(Fe){const{arrowWidth:Te,autoAdjustOverflow:l,arrowPointAtCenter:Y,offset:P,borderRadius:S,visibleFirst:d}=Fe,w=Te/2,y={};return Object.keys(He).forEach(G=>{const X=Y&&ke[G]||He[G],M=Object.assign(Object.assign({},X),{offset:[0,0]});switch(y[G]=M,$e.has(G)&&(M.autoArrow=!1),G){case"top":case"topLeft":case"topRight":M.offset[1]=-w-P;break;case"bottom":case"bottomLeft":case"bottomRight":M.offset[1]=w+P;break;case"left":case"leftTop":case"leftBottom":M.offset[0]=-w-P;break;case"right":case"rightTop":case"rightBottom":M.offset[0]=w+P;break}const O=(0,V.fS)({contentRadius:S,limitVerticalRadius:!0});if(Y)switch(G){case"topLeft":case"bottomLeft":M.offset[0]=-O.dropdownArrowOffset-w;break;case"topRight":case"bottomRight":M.offset[0]=O.dropdownArrowOffset+w;break;case"leftTop":case"rightTop":M.offset[1]=-O.dropdownArrowOffset-w;break;case"leftBottom":case"rightBottom":M.offset[1]=O.dropdownArrowOffset+w;break}M.overflow=Ae(G,O,Te,l),d&&(M.htmlRegion="visibleFirst")}),y}},24905:function(Nt,ut,ie){"use strict";ie.d(ut,{default:function(){return Ce}});var V=ie(92310),Ae=ie.n(V),He=ie(5630),ke=ie(59301),$e=ie(36355),ue=ie(1684),Fe=ie(32441),l=ke.createContext(null),Y=ie(98447),P=ie(14088),S=ie(4572),d=function(ge,be){var Ne={};for(var Ie in ge)Object.prototype.hasOwnProperty.call(ge,Ie)&&be.indexOf(Ie)<0&&(Ne[Ie]=ge[Ie]);if(ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,Ie=Object.getOwnPropertySymbols(ge);je<Ie.length;je++)be.indexOf(Ie[je])<0&&Object.prototype.propertyIsEnumerable.call(ge,Ie[je])&&(Ne[Ie[je]]=ge[Ie[je]]);return Ne};const w=(ge,be)=>{var Ne;const{prefixCls:Ie,className:je,rootClassName:H,children:z,indeterminate:Z=!1,style:ee,onMouseEnter:me,onMouseLeave:ae,skipGroup:x=!1,disabled:A}=ge,N=d(ge,["prefixCls","className","rootClassName","children","indeterminate","style","onMouseEnter","onMouseLeave","skipGroup","disabled"]),{getPrefixCls:de,direction:We,checkbox:qe}=ke.useContext($e.E_),Ge=ke.useContext(l),{isFormItemInput:ot}=ke.useContext(Fe.aM),Dt=ke.useContext(ue.Z),at=(Ne=(Ge==null?void 0:Ge.disabled)||A)!==null&&Ne!==void 0?Ne:Dt,it=ke.useRef(N.value);ke.useEffect(()=>{Ge==null||Ge.registerValue(N.value)},[]),ke.useEffect(()=>{if(!x)return N.value!==it.current&&(Ge==null||Ge.cancelValue(it.current),Ge==null||Ge.registerValue(N.value),it.current=N.value),()=>Ge==null?void 0:Ge.cancelValue(N.value)},[N.value]);const Lt=de("checkbox",Ie),[jt,Xt]=(0,Y.ZP)(Lt),Vt=Object.assign({},N);Ge&&!x&&(Vt.onChange=function(){N.onChange&&N.onChange.apply(N,arguments),Ge.toggleOption&&Ge.toggleOption({label:z,value:N.value})},Vt.name=Ge.name,Vt.checked=Ge.value.includes(N.value));const Mt=Ae()(`${Lt}-wrapper`,{[`${Lt}-rtl`]:We==="rtl",[`${Lt}-wrapper-checked`]:Vt.checked,[`${Lt}-wrapper-disabled`]:at,[`${Lt}-wrapper-in-form-item`]:ot},qe==null?void 0:qe.className,je,H,Xt),Rt=Ae()({[`${Lt}-indeterminate`]:Z},S.A,Xt),Me=Z?"mixed":void 0;return jt(ke.createElement(P.Z,{component:"Checkbox",disabled:at},ke.createElement("label",{className:Mt,style:Object.assign(Object.assign({},qe==null?void 0:qe.style),ee),onMouseEnter:me,onMouseLeave:ae},ke.createElement(He.Z,Object.assign({"aria-checked":Me},Vt,{prefixCls:Lt,className:Rt,disabled:at,ref:be})),z!==void 0&&ke.createElement("span",null,z))))};var G=ke.forwardRef(w),X=ie(80702),M=ie(2738),O=function(ge,be){var Ne={};for(var Ie in ge)Object.prototype.hasOwnProperty.call(ge,Ie)&&be.indexOf(Ie)<0&&(Ne[Ie]=ge[Ie]);if(ge!=null&&typeof Object.getOwnPropertySymbols=="function")for(var je=0,Ie=Object.getOwnPropertySymbols(ge);je<Ie.length;je++)be.indexOf(Ie[je])<0&&Object.prototype.propertyIsEnumerable.call(ge,Ie[je])&&(Ne[Ie[je]]=ge[Ie[je]]);return Ne};const Q=(ge,be)=>{const{defaultValue:Ne,children:Ie,options:je=[],prefixCls:H,className:z,rootClassName:Z,style:ee,onChange:me}=ge,ae=O(ge,["defaultValue","children","options","prefixCls","className","rootClassName","style","onChange"]),{getPrefixCls:x,direction:A}=ke.useContext($e.E_),[N,de]=ke.useState(ae.value||Ne||[]),[We,qe]=ke.useState([]);ke.useEffect(()=>{"value"in ae&&de(ae.value||[])},[ae.value]);const Ge=ke.useMemo(()=>je.map(Qe=>typeof Qe=="string"||typeof Qe=="number"?{label:Qe,value:Qe}:Qe),[je]),ot=Qe=>{qe(se=>se.filter(Pe=>Pe!==Qe))},Dt=Qe=>{qe(se=>[].concat((0,X.Z)(se),[Qe]))},at=Qe=>{const se=N.indexOf(Qe.value),Pe=(0,X.Z)(N);se===-1?Pe.push(Qe.value):Pe.splice(se,1),"value"in ae||de(Pe),me==null||me(Pe.filter(Re=>We.includes(Re)).sort((Re,T)=>{const K=Ge.findIndex($=>$.value===Re),te=Ge.findIndex($=>$.value===T);return K-te}))},it=x("checkbox",H),Lt=`${it}-group`,[jt,Xt]=(0,Y.ZP)(it),Vt=(0,M.Z)(ae,["value","disabled"]),Mt=je.length?Ge.map(Qe=>ke.createElement(G,{prefixCls:it,key:Qe.value.toString(),disabled:"disabled"in Qe?Qe.disabled:ae.disabled,value:Qe.value,checked:N.includes(Qe.value),onChange:Qe.onChange,className:`${Lt}-item`,style:Qe.style,title:Qe.title},Qe.label)):Ie,Rt={toggleOption:at,value:N,disabled:ae.disabled,name:ae.name,registerValue:Dt,cancelValue:ot},Me=Ae()(Lt,{[`${Lt}-rtl`]:A==="rtl"},z,Z,Xt);return jt(ke.createElement("div",Object.assign({className:Me,style:ee},Vt,{ref:be}),ke.createElement(l.Provider,{value:Rt},Mt)))},he=ke.forwardRef(Q);var R=ke.memo(he);const ve=G;ve.Group=R,ve.__ANT_CHECKBOX=!0;var Ce=ve},98447:function(Nt,ut,ie){"use strict";ie.d(ut,{C2:function(){return $e}});var V=ie(17313),Ae=ie(37613),He=ie(83116);const ke=ue=>{const{checkboxCls:Fe}=ue,Te=`${Fe}-wrapper`;return[{[`${Fe}-group`]:Object.assign(Object.assign({},(0,V.Wf)(ue)),{display:"inline-flex",flexWrap:"wrap",columnGap:ue.marginXS,[`> ${ue.antCls}-row`]:{flex:1}}),[Te]:Object.assign(Object.assign({},(0,V.Wf)(ue)),{display:"inline-flex",alignItems:"baseline",cursor:"pointer","&:after":{display:"inline-block",width:0,overflow:"hidden",content:"'\\a0'"},[`& + ${Te}`]:{marginInlineStart:0},[`&${Te}-in-form-item`]:{'input[type="checkbox"]':{width:14,height:14}}}),[Fe]:Object.assign(Object.assign({},(0,V.Wf)(ue)),{position:"relative",whiteSpace:"nowrap",lineHeight:1,cursor:"pointer",borderRadius:ue.borderRadiusSM,alignSelf:"center",[`${Fe}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0,margin:0,[`&:focus-visible + ${Fe}-inner`]:Object.assign({},(0,V.oN)(ue))},[`${Fe}-inner`]:{boxSizing:"border-box",position:"relative",top:0,insetInlineStart:0,display:"block",width:ue.checkboxSize,height:ue.checkboxSize,direction:"ltr",backgroundColor:ue.colorBgContainer,border:`${ue.lineWidth}px ${ue.lineType} ${ue.colorBorder}`,borderRadius:ue.borderRadiusSM,borderCollapse:"separate",transition:`all ${ue.motionDurationSlow}`,"&:after":{boxSizing:"border-box",position:"absolute",top:"50%",insetInlineStart:"21.5%",display:"table",width:ue.checkboxSize/14*5,height:ue.checkboxSize/14*8,border:`${ue.lineWidthBold}px solid ${ue.colorWhite}`,borderTop:0,borderInlineStart:0,transform:"rotate(45deg) scale(0) translate(-50%,-50%)",opacity:0,content:'""',transition:`all ${ue.motionDurationFast} ${ue.motionEaseInBack}, opacity ${ue.motionDurationFast}`}},"& + span":{paddingInlineStart:ue.paddingXS,paddingInlineEnd:ue.paddingXS}})},{[`
${Te}:not(${Te}-disabled),
${Fe}:not(${Fe}-disabled)
`]:{[`&:hover ${Fe}-inner`]:{borderColor:ue.colorPrimary}},[`${Te}:not(${Te}-disabled)`]:{[`&:hover ${Fe}-checked:not(${Fe}-disabled) ${Fe}-inner`]:{backgroundColor:ue.colorPrimaryHover,borderColor:"transparent"},[`&:hover ${Fe}-checked:not(${Fe}-disabled):after`]:{borderColor:ue.colorPrimaryHover}}},{[`${Fe}-checked`]:{[`${Fe}-inner`]:{backgroundColor:ue.colorPrimary,borderColor:ue.colorPrimary,"&:after":{opacity:1,transform:"rotate(45deg) scale(1) translate(-50%,-50%)",transition:`all ${ue.motionDurationMid} ${ue.motionEaseOutBack} ${ue.motionDurationFast}`}}},[`
${Te}-checked:not(${Te}-disabled),
${Fe}-checked:not(${Fe}-disabled)
`]:{[`&:hover ${Fe}-inner`]:{backgroundColor:ue.colorPrimaryHover,borderColor:"transparent"}}},{[Fe]:{"&-indeterminate":{[`${Fe}-inner`]:{backgroundColor:ue.colorBgContainer,borderColor:ue.colorBorder,"&:after":{top:"50%",insetInlineStart:"50%",width:ue.fontSizeLG/2,height:ue.fontSizeLG/2,backgroundColor:ue.colorPrimary,border:0,transform:"translate(-50%, -50%) scale(1)",opacity:1,content:'""'}}}}},{[`${Te}-disabled`]:{cursor:"not-allowed"},[`${Fe}-disabled`]:{[`&, ${Fe}-input`]:{cursor:"not-allowed",pointerEvents:"none"},[`${Fe}-inner`]:{background:ue.colorBgContainerDisabled,borderColor:ue.colorBorder,"&:after":{borderColor:ue.colorTextDisabled}},"&:after":{display:"none"},"& + span":{color:ue.colorTextDisabled},[`&${Fe}-indeterminate ${Fe}-inner::after`]:{background:ue.colorTextDisabled}}}]};function $e(ue,Fe){const Te=(0,Ae.TS)(Fe,{checkboxCls:`.${ue}`,checkboxSize:Fe.controlInteractiveSize});return[ke(Te)]}ut.ZP=(0,He.Z)("Checkbox",(ue,Fe)=>{let{prefixCls:Te}=Fe;return[$e(Te,ue)]})},5112:function(Nt,ut,ie){"use strict";ie.d(ut,{ZP:function(){return A}});var V=ie(92310),Ae=ie.n(V),He=ie(18929),ke=ie(26112),$e=ie(59301),ue=ie(36355),Fe=ie(19716);const Te=$e.createContext(null),l=Te.Provider;var Y=Te;const P=$e.createContext(null),S=P.Provider;var d=ie(5630),w=ie(8654),y=ie(1684),G=ie(32441),X=ie(17313),M=ie(83116),O=ie(37613);const Q=N=>{const{componentCls:de,antCls:We}=N,qe=`${de}-group`;return{[qe]:Object.assign(Object.assign({},(0,X.Wf)(N)),{display:"inline-block",fontSize:0,[`&${qe}-rtl`]:{direction:"rtl"},[`${We}-badge ${We}-badge-count`]:{zIndex:1},[`> ${We}-badge:not(:first-child) > ${We}-button-wrapper`]:{borderInlineStart:"none"}})}},he=N=>{const{componentCls:de,wrapperMarginInlineEnd:We,colorPrimary:qe,radioSize:Ge,motionDurationSlow:ot,motionDurationMid:Dt,motionEaseInOutCirc:at,colorBgContainer:it,colorBorder:Lt,lineWidth:jt,dotSize:Xt,colorBgContainerDisabled:Vt,colorTextDisabled:Mt,paddingXS:Rt,dotColorDisabled:Me,lineType:Qe,radioDotDisabledSize:se,wireframe:Pe,colorWhite:Re}=N,T=`${de}-inner`;return{[`${de}-wrapper`]:Object.assign(Object.assign({},(0,X.Wf)(N)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:We,cursor:"pointer",[`&${de}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:N.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${de}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${jt}px ${Qe} ${qe}`,borderRadius:"50%",visibility:"hidden",content:'""'},[de]:Object.assign(Object.assign({},(0,X.Wf)(N)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${de}-wrapper:hover &,
&:hover ${T}`]:{borderColor:qe},[`${de}-input:focus-visible + ${T}`]:Object.assign({},(0,X.oN)(N)),[`${de}:hover::after, ${de}-wrapper:hover &::after`]:{visibility:"visible"},[`${de}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:Ge,height:Ge,marginBlockStart:Ge/-2,marginInlineStart:Ge/-2,backgroundColor:Pe?qe:Re,borderBlockStart:0,borderInlineStart:0,borderRadius:Ge,transform:"scale(0)",opacity:0,transition:`all ${ot} ${at}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:Ge,height:Ge,backgroundColor:it,borderColor:Lt,borderStyle:"solid",borderWidth:jt,borderRadius:"50%",transition:`all ${Dt}`},[`${de}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${de}-checked`]:{[T]:{borderColor:qe,backgroundColor:Pe?it:qe,"&::after":{transform:`scale(${Xt/Ge})`,opacity:1,transition:`all ${ot} ${at}`}}},[`${de}-disabled`]:{cursor:"not-allowed",[T]:{backgroundColor:Vt,borderColor:Lt,cursor:"not-allowed","&::after":{backgroundColor:Me}},[`${de}-input`]:{cursor:"not-allowed"},[`${de}-disabled + span`]:{color:Mt,cursor:"not-allowed"},[`&${de}-checked`]:{[T]:{"&::after":{transform:`scale(${se/Ge})`}}}},[`span${de} + *`]:{paddingInlineStart:Rt,paddingInlineEnd:Rt}})}},R=N=>{const{buttonColor:de,controlHeight:We,componentCls:qe,lineWidth:Ge,lineType:ot,colorBorder:Dt,motionDurationSlow:at,motionDurationMid:it,buttonPaddingInline:Lt,fontSize:jt,buttonBg:Xt,fontSizeLG:Vt,controlHeightLG:Mt,controlHeightSM:Rt,paddingXS:Me,borderRadius:Qe,borderRadiusSM:se,borderRadiusLG:Pe,buttonCheckedBg:Re,buttonSolidCheckedColor:T,colorTextDisabled:K,colorBgContainerDisabled:te,buttonCheckedBgDisabled:$,buttonCheckedColorDisabled:W,colorPrimary:Ee,colorPrimaryHover:Le,colorPrimaryActive:Oe,buttonSolidCheckedBg:Se,buttonSolidCheckedHoverBg:we,buttonSolidCheckedActiveBg:ze}=N;return{[`${qe}-button-wrapper`]:{position:"relative",display:"inline-block",height:We,margin:0,paddingInline:Lt,paddingBlock:0,color:de,fontSize:jt,lineHeight:`${We-Ge*2}px`,background:Xt,border:`${Ge}px ${ot} ${Dt}`,borderBlockStartWidth:Ge+.02,borderInlineStartWidth:0,borderInlineEndWidth:Ge,cursor:"pointer",transition:[`color ${it}`,`background ${it}`,`box-shadow ${it}`].join(","),a:{color:de},[`> ${qe}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-Ge,insetInlineStart:-Ge,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:Ge,paddingInline:0,backgroundColor:Dt,transition:`background-color ${at}`,content:'""'}},"&:first-child":{borderInlineStart:`${Ge}px ${ot} ${Dt}`,borderStartStartRadius:Qe,borderEndStartRadius:Qe},"&:last-child":{borderStartEndRadius:Qe,borderEndEndRadius:Qe},"&:first-child:last-child":{borderRadius:Qe},[`${qe}-group-large &`]:{height:Mt,fontSize:Vt,lineHeight:`${Mt-Ge*2}px`,"&:first-child":{borderStartStartRadius:Pe,borderEndStartRadius:Pe},"&:last-child":{borderStartEndRadius:Pe,borderEndEndRadius:Pe}},[`${qe}-group-small &`]:{height:Rt,paddingInline:Me-Ge,paddingBlock:0,lineHeight:`${Rt-Ge*2}px`,"&:first-child":{borderStartStartRadius:se,borderEndStartRadius:se},"&:last-child":{borderStartEndRadius:se,borderEndEndRadius:se}},"&:hover":{position:"relative",color:Ee},"&:has(:focus-visible)":Object.assign({},(0,X.oN)(N)),[`${qe}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${qe}-button-wrapper-disabled)`]:{zIndex:1,color:Ee,background:Re,borderColor:Ee,"&::before":{backgroundColor:Ee},"&:first-child":{borderColor:Ee},"&:hover":{color:Le,borderColor:Le,"&::before":{backgroundColor:Le}},"&:active":{color:Oe,borderColor:Oe,"&::before":{backgroundColor:Oe}}},[`${qe}-group-solid &-checked:not(${qe}-button-wrapper-disabled)`]:{color:T,background:Se,borderColor:Se,"&:hover":{color:T,background:we,borderColor:we},"&:active":{color:T,background:ze,borderColor:ze}},"&-disabled":{color:K,backgroundColor:te,borderColor:Dt,cursor:"not-allowed","&:first-child, &:hover":{color:K,backgroundColor:te,borderColor:Dt}},[`&-disabled${qe}-button-wrapper-checked`]:{color:W,backgroundColor:$,borderColor:Dt,boxShadow:"none"}}}},ve=N=>N-4*2;var Ce=(0,M.Z)("Radio",N=>{const{controlOutline:de,controlOutlineWidth:We,radioSize:qe}=N,Ge=`0 0 0 ${We}px ${de}`,ot=Ge,Dt=ve(qe),at=(0,O.TS)(N,{radioDotDisabledSize:Dt,radioFocusShadow:Ge,radioButtonFocusShadow:ot});return[Q(at),he(at),R(at)]},N=>{const{wireframe:de,padding:We,marginXS:qe,lineWidth:Ge,fontSizeLG:ot,colorText:Dt,colorBgContainer:at,colorTextDisabled:it,controlItemBgActiveDisabled:Lt,colorTextLightSolid:jt,colorPrimary:Xt,colorPrimaryHover:Vt,colorPrimaryActive:Mt}=N,Rt=4,Me=ot,Qe=de?ve(Me):Me-(Rt+Ge)*2;return{radioSize:Me,dotSize:Qe,dotColorDisabled:it,buttonSolidCheckedColor:jt,buttonSolidCheckedBg:Xt,buttonSolidCheckedHoverBg:Vt,buttonSolidCheckedActiveBg:Mt,buttonBg:at,buttonCheckedBg:at,buttonColor:Dt,buttonCheckedBgDisabled:Lt,buttonCheckedColorDisabled:it,buttonPaddingInline:We-Ge,wrapperMarginInlineEnd:qe}}),ge=ie(14088),be=ie(4572),Ne=function(N,de){var We={};for(var qe in N)Object.prototype.hasOwnProperty.call(N,qe)&&de.indexOf(qe)<0&&(We[qe]=N[qe]);if(N!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ge=0,qe=Object.getOwnPropertySymbols(N);Ge<qe.length;Ge++)de.indexOf(qe[Ge])<0&&Object.prototype.propertyIsEnumerable.call(N,qe[Ge])&&(We[qe[Ge]]=N[qe[Ge]]);return We};const Ie=(N,de)=>{var We,qe;const Ge=$e.useContext(Y),ot=$e.useContext(P),{getPrefixCls:Dt,direction:at,radio:it}=$e.useContext(ue.E_),Lt=$e.useRef(null),jt=(0,w.sQ)(de,Lt),{isFormItemInput:Xt}=$e.useContext(G.aM),Vt=Oe=>{var Se,we;(Se=N.onChange)===null||Se===void 0||Se.call(N,Oe),(we=Ge==null?void 0:Ge.onChange)===null||we===void 0||we.call(Ge,Oe)},{prefixCls:Mt,className:Rt,rootClassName:Me,children:Qe,style:se}=N,Pe=Ne(N,["prefixCls","className","rootClassName","children","style"]),Re=Dt("radio",Mt),T=((Ge==null?void 0:Ge.optionType)||ot)==="button",K=T?`${Re}-button`:Re,[te,$]=Ce(Re),W=Object.assign({},Pe),Ee=$e.useContext(y.Z);Ge&&(W.name=Ge.name,W.onChange=Vt,W.checked=N.value===Ge.value,W.disabled=(We=W.disabled)!==null&&We!==void 0?We:Ge.disabled),W.disabled=(qe=W.disabled)!==null&&qe!==void 0?qe:Ee;const Le=Ae()(`${K}-wrapper`,{[`${K}-wrapper-checked`]:W.checked,[`${K}-wrapper-disabled`]:W.disabled,[`${K}-wrapper-rtl`]:at==="rtl",[`${K}-wrapper-in-form-item`]:Xt},it==null?void 0:it.className,Rt,Me,$);return te($e.createElement(ge.Z,{component:"Radio",disabled:W.disabled},$e.createElement("label",{className:Le,style:Object.assign(Object.assign({},it==null?void 0:it.style),se),onMouseEnter:N.onMouseEnter,onMouseLeave:N.onMouseLeave},$e.createElement(d.Z,Object.assign({},W,{className:Ae()(W.className,!T&&be.A),type:"radio",prefixCls:K,ref:jt})),Qe!==void 0?$e.createElement("span",null,Qe):null)))};var H=$e.forwardRef(Ie);const z=$e.forwardRef((N,de)=>{const{getPrefixCls:We,direction:qe}=$e.useContext(ue.E_),[Ge,ot]=(0,He.Z)(N.defaultValue,{value:N.value}),Dt=Se=>{const we=Ge,ze=Se.target.value;"value"in N||ot(ze);const{onChange:Ye}=N;Ye&&ze!==we&&Ye(Se)},{prefixCls:at,className:it,rootClassName:Lt,options:jt,buttonStyle:Xt="outline",disabled:Vt,children:Mt,size:Rt,style:Me,id:Qe,onMouseEnter:se,onMouseLeave:Pe,onFocus:Re,onBlur:T}=N,K=We("radio",at),te=`${K}-group`,[$,W]=Ce(K);let Ee=Mt;jt&&jt.length>0&&(Ee=jt.map(Se=>typeof Se=="string"||typeof Se=="number"?$e.createElement(H,{key:Se.toString(),prefixCls:K,disabled:Vt,value:Se,checked:Ge===Se},Se):$e.createElement(H,{key:`radio-group-value-options-${Se.value}`,prefixCls:K,disabled:Se.disabled||Vt,value:Se.value,checked:Ge===Se.value,title:Se.title,style:Se.style},Se.label)));const Le=(0,Fe.Z)(Rt),Oe=Ae()(te,`${te}-${Xt}`,{[`${te}-${Le}`]:Le,[`${te}-rtl`]:qe==="rtl"},it,Lt,W);return $($e.createElement("div",Object.assign({},(0,ke.Z)(N,{aria:!0,data:!0}),{className:Oe,style:Me,onMouseEnter:se,onMouseLeave:Pe,onFocus:Re,onBlur:T,id:Qe,ref:de}),$e.createElement(l,{value:{onChange:Dt,value:Ge,disabled:N.disabled,name:N.name,optionType:N.optionType}},Ee)))});var Z=$e.memo(z),ee=function(N,de){var We={};for(var qe in N)Object.prototype.hasOwnProperty.call(N,qe)&&de.indexOf(qe)<0&&(We[qe]=N[qe]);if(N!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ge=0,qe=Object.getOwnPropertySymbols(N);Ge<qe.length;Ge++)de.indexOf(qe[Ge])<0&&Object.prototype.propertyIsEnumerable.call(N,qe[Ge])&&(We[qe[Ge]]=N[qe[Ge]]);return We};const me=(N,de)=>{const{getPrefixCls:We}=$e.useContext(ue.E_),{prefixCls:qe}=N,Ge=ee(N,["prefixCls"]),ot=We("radio",qe);return $e.createElement(S,{value:"button"},$e.createElement(H,Object.assign({prefixCls:ot},Ge,{type:"radio",ref:de})))};var ae=$e.forwardRef(me);const x=H;x.Button=ae,x.Group=Z,x.__ANT_RADIO=!0;var A=x},19447:function(Nt,ut,ie){"use strict";ie.d(ut,{ZP:function(){return $e},fS:function(){return He},qN:function(){return Ae}});var V=ie(47585);const Ae=8;function He(ue){const Fe=Ae,{contentRadius:Te,limitVerticalRadius:l}=ue,Y=Te>12?Te+2:12;return{dropdownArrowOffset:Y,dropdownArrowOffsetVertical:l?Fe:Y}}function ke(ue,Fe){return ue?Fe:{}}function $e(ue,Fe){const{componentCls:Te,sizePopupArrow:l,borderRadiusXS:Y,borderRadiusOuter:P,boxShadowPopoverArrow:S}=ue,{colorBg:d,contentRadius:w=ue.borderRadiusLG,limitVerticalRadius:y,arrowDistance:G=0,arrowPlacement:X={left:!0,right:!0,top:!0,bottom:!0}}=Fe,{dropdownArrowOffsetVertical:M,dropdownArrowOffset:O}=He({contentRadius:w,limitVerticalRadius:y});return{[Te]:Object.assign(Object.assign(Object.assign(Object.assign({[`${Te}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},(0,V.r)(l,Y,P,d,S)),{"&:before":{background:d}})]},ke(!!X.top,{[[`&-placement-top ${Te}-arrow`,`&-placement-topLeft ${Te}-arrow`,`&-placement-topRight ${Te}-arrow`].join(",")]:{bottom:G,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top ${Te}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},[`&-placement-topLeft ${Te}-arrow`]:{left:{_skip_check_:!0,value:O}},[`&-placement-topRight ${Te}-arrow`]:{right:{_skip_check_:!0,value:O}}})),ke(!!X.bottom,{[[`&-placement-bottom ${Te}-arrow`,`&-placement-bottomLeft ${Te}-arrow`,`&-placement-bottomRight ${Te}-arrow`].join(",")]:{top:G,transform:"translateY(-100%)"},[`&-placement-bottom ${Te}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},[`&-placement-bottomLeft ${Te}-arrow`]:{left:{_skip_check_:!0,value:O}},[`&-placement-bottomRight ${Te}-arrow`]:{right:{_skip_check_:!0,value:O}}})),ke(!!X.left,{[[`&-placement-left ${Te}-arrow`,`&-placement-leftTop ${Te}-arrow`,`&-placement-leftBottom ${Te}-arrow`].join(",")]:{right:{_skip_check_:!0,value:G},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left ${Te}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop ${Te}-arrow`]:{top:M},[`&-placement-leftBottom ${Te}-arrow`]:{bottom:M}})),ke(!!X.right,{[[`&-placement-right ${Te}-arrow`,`&-placement-rightTop ${Te}-arrow`,`&-placement-rightBottom ${Te}-arrow`].join(",")]:{left:{_skip_check_:!0,value:G},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right ${Te}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop ${Te}-arrow`]:{top:M},[`&-placement-rightBottom ${Te}-arrow`]:{bottom:M}}))}}},47585:function(Nt,ut,ie){"use strict";ie.d(ut,{r:function(){return V}});const V=(Ae,He,ke,$e,ue)=>{const Fe=Ae/2,Te=0,l=Fe,Y=ke*1/Math.sqrt(2),P=Fe-ke*(1-1/Math.sqrt(2)),S=Fe-He*(1/Math.sqrt(2)),d=ke*(Math.sqrt(2)-1)+He*(1/Math.sqrt(2)),w=2*Fe-S,y=d,G=2*Fe-Y,X=P,M=2*Fe-Te,O=l,Q=Fe*Math.sqrt(2)+ke*(Math.sqrt(2)-2),he=ke*(Math.sqrt(2)-1);return{pointerEvents:"none",width:Ae,height:Ae,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:Ae,height:Ae/2,background:$e,clipPath:{_multi_value_:!0,value:[`polygon(${he}px 100%, 50% ${he}px, ${2*Fe-he}px 100%, ${he}px 100%)`,`path('M ${Te} ${l} A ${ke} ${ke} 0 0 0 ${Y} ${P} L ${S} ${d} A ${He} ${He} 0 0 1 ${w} ${y} L ${G} ${X} A ${ke} ${ke} 0 0 0 ${M} ${O} Z')`]},content:'""'},"&::after":{content:'""',position:"absolute",width:Q,height:Q,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${He}px 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:ue,zIndex:0,background:"transparent"}}}},33166:function(Nt,ut,ie){"use strict";ie.d(ut,{i:function(){return V}});const V=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"]},45157:function(Nt,ut,ie){"use strict";ie.d(ut,{Z:function(){return Ae}});var V=ie(33166);function Ae(He,ke){return V.i.reduce(($e,ue)=>{const Fe=He[`${ue}1`],Te=He[`${ue}3`],l=He[`${ue}6`],Y=He[`${ue}7`];return Object.assign(Object.assign({},$e),ke(ue,{lightColor:Fe,lightBorderColor:Te,darkColor:l,textColor:Y}))},{})}},6848:function(Nt,ut,ie){"use strict";ie.d(ut,{Z:function(){return Ie}});var V=ie(59301),Ae=ie(92310),He=ie.n(Ae),ke=ie(55477),$e=ie(18929),ue=ie(62892),Fe=ie(79676),Te=ie(92343),l=ie(36355),Y=ie(33234),P=ie(88088),S=ie(17313),d=ie(29878),w=ie(19447),y=ie(45157),G=ie(37613),X=ie(83116);const M=je=>{const{componentCls:H,tooltipMaxWidth:z,tooltipColor:Z,tooltipBg:ee,tooltipBorderRadius:me,zIndexPopup:ae,controlHeight:x,boxShadowSecondary:A,paddingSM:N,paddingXS:de,tooltipRadiusOuter:We}=je;return[{[H]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,S.Wf)(je)),{position:"absolute",zIndex:ae,display:"block",width:"max-content",maxWidth:z,visibility:"visible",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","&-hidden":{display:"none"},"--antd-arrow-background-color":ee,[`${H}-inner`]:{minWidth:x,minHeight:x,padding:`${N/2}px ${de}px`,color:Z,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:ee,borderRadius:me,boxShadow:A,boxSizing:"border-box"},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${H}-inner`]:{borderRadius:Math.min(me,w.qN)}},[`${H}-content`]:{position:"relative"}}),(0,y.Z)(je,(qe,Ge)=>{let{darkColor:ot}=Ge;return{[`&${H}-${qe}`]:{[`${H}-inner`]:{backgroundColor:ot},[`${H}-arrow`]:{"--antd-arrow-background-color":ot}}}})),{"&-rtl":{direction:"rtl"}})},(0,w.ZP)((0,G.TS)(je,{borderRadiusOuter:We}),{colorBg:"var(--antd-arrow-background-color)",contentRadius:me,limitVerticalRadius:!0}),{[`${H}-pure`]:{position:"relative",maxWidth:"none",margin:je.sizePopupArrow}}]};var O=(je,H)=>(0,X.Z)("Tooltip",Z=>{if(H===!1)return[];const{borderRadius:ee,colorTextLightSolid:me,colorBgDefault:ae,borderRadiusOuter:x}=Z,A=(0,G.TS)(Z,{tooltipMaxWidth:250,tooltipColor:me,tooltipBorderRadius:ee,tooltipBg:ae,tooltipRadiusOuter:x>4?4:x});return[M(A),(0,d._y)(Z,"zoom-big-fast")]},Z=>{let{zIndexPopupBase:ee,colorBgSpotlight:me}=Z;return{zIndexPopup:ee+70,colorBgDefault:me}},{resetStyle:!1})(je),Q=ie(36785);function he(je,H){const z=(0,Q.o2)(H),Z=He()({[`${je}-${H}`]:H&&z}),ee={},me={};return H&&!z&&(ee.background=H,me["--antd-arrow-background-color"]=H),{className:Z,overlayStyle:ee,arrowStyle:me}}var ve=je=>{const{prefixCls:H,className:z,placement:Z="top",title:ee,color:me,overlayInnerStyle:ae}=je,{getPrefixCls:x}=V.useContext(l.E_),A=x("tooltip",H),[N,de]=O(A,!0),We=he(A,me),qe=We.arrowStyle,Ge=Object.assign(Object.assign({},ae),We.overlayStyle),ot=He()(de,A,`${A}-pure`,`${A}-placement-${Z}`,z,We.className);return N(V.createElement("div",{className:ot,style:qe},V.createElement("div",{className:`${A}-arrow`}),V.createElement(ke.G,Object.assign({},je,{className:de,prefixCls:A,overlayInnerStyle:Ge}),ee)))},Ce=function(je,H){var z={};for(var Z in je)Object.prototype.hasOwnProperty.call(je,Z)&&H.indexOf(Z)<0&&(z[Z]=je[Z]);if(je!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ee=0,Z=Object.getOwnPropertySymbols(je);ee<Z.length;ee++)H.indexOf(Z[ee])<0&&Object.prototype.propertyIsEnumerable.call(je,Z[ee])&&(z[Z[ee]]=je[Z[ee]]);return z};const ge=(je,H)=>{const z={},Z=Object.assign({},je);return H.forEach(ee=>{je&&ee in je&&(z[ee]=je[ee],delete Z[ee])}),{picked:z,omitted:Z}};function be(je,H){const z=je.type;if((z.__ANT_BUTTON===!0||je.type==="button")&&je.props.disabled||z.__ANT_SWITCH===!0&&(je.props.disabled||je.props.loading)||z.__ANT_RADIO===!0&&je.props.disabled){const{picked:Z,omitted:ee}=ge(je.props.style,["position","left","right","top","bottom","float","display","zIndex"]),me=Object.assign(Object.assign({display:"inline-block"},Z),{cursor:"not-allowed",width:je.props.block?"100%":void 0}),ae=Object.assign(Object.assign({},ee),{pointerEvents:"none"}),x=(0,Te.Tm)(je,{style:ae,className:null});return V.createElement("span",{style:me,className:He()(je.props.className,`${H}-disabled-compatible-wrapper`)},x)}return je}const Ne=V.forwardRef((je,H)=>{var z,Z;const{prefixCls:ee,openClassName:me,getTooltipContainer:ae,overlayClassName:x,color:A,overlayInnerStyle:N,children:de,afterOpenChange:We,afterVisibleChange:qe,destroyTooltipOnHide:Ge,arrow:ot=!0,title:Dt,overlay:at,builtinPlacements:it,arrowPointAtCenter:Lt=!1,autoAdjustOverflow:jt=!0}=je,Xt=!!ot,[,Vt]=(0,P.Z)(),{getPopupContainer:Mt,getPrefixCls:Rt,direction:Me}=V.useContext(l.E_),Qe=V.useRef(null),se=()=>{var xe;(xe=Qe.current)===null||xe===void 0||xe.forceAlign()};V.useImperativeHandle(H,()=>({forceAlign:se,forcePopupAlign:()=>{se()}}));const[Pe,Re]=(0,$e.Z)(!1,{value:(z=je.open)!==null&&z!==void 0?z:je.visible,defaultValue:(Z=je.defaultOpen)!==null&&Z!==void 0?Z:je.defaultVisible}),T=!Dt&&!at&&Dt!==0,K=xe=>{var Ue,B;Re(T?!1:xe),T||((Ue=je.onOpenChange)===null||Ue===void 0||Ue.call(je,xe),(B=je.onVisibleChange)===null||B===void 0||B.call(je,xe))},te=V.useMemo(()=>{var xe,Ue;let B=Lt;return typeof ot=="object"&&(B=(Ue=(xe=ot.pointAtCenter)!==null&&xe!==void 0?xe:ot.arrowPointAtCenter)!==null&&Ue!==void 0?Ue:Lt),it||(0,Fe.Z)({arrowPointAtCenter:B,autoAdjustOverflow:jt,arrowWidth:Xt?Vt.sizePopupArrow:0,borderRadius:Vt.borderRadius,offset:Vt.marginXXS,visibleFirst:!0})},[Lt,ot,it,Vt]),$=V.useMemo(()=>Dt===0?Dt:at||Dt||"",[at,Dt]),W=V.createElement(Y.BR,null,typeof $=="function"?$():$),{getPopupContainer:Ee,placement:Le="top",mouseEnterDelay:Oe=.1,mouseLeaveDelay:Se=.1,overlayStyle:we,rootClassName:ze}=je,Ye=Ce(je,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName"]),tt=Rt("tooltip",ee),st=Rt(),mt=je["data-popover-inject"];let ht=Pe;!("open"in je)&&!("visible"in je)&&T&&(ht=!1);const ft=be((0,Te.l$)(de)&&!(0,Te.M2)(de)?de:V.createElement("span",null,de),tt),rt=ft.props,g=!rt.className||typeof rt.className=="string"?He()(rt.className,me||`${tt}-open`):rt.className,[v,Be]=O(tt,!mt),I=he(tt,A),ne=I.arrowStyle,bt=Object.assign(Object.assign({},N),I.overlayStyle),ce=He()(x,{[`${tt}-rtl`]:Me==="rtl"},I.className,ze,Be);return v(V.createElement(ke.Z,Object.assign({},Ye,{showArrow:Xt,placement:Le,mouseEnterDelay:Oe,mouseLeaveDelay:Se,prefixCls:tt,overlayClassName:ce,overlayStyle:Object.assign(Object.assign({},ne),we),getTooltipContainer:Ee||ae||Mt,ref:Qe,builtinPlacements:te,overlay:W,visible:ht,onVisibleChange:K,afterVisibleChange:We!=null?We:qe,overlayInnerStyle:bt,arrowContent:V.createElement("span",{className:`${tt}-arrow-content`}),motion:{motionName:(0,ue.m)(st,"zoom-big-fast",je.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!Ge}),ht?(0,Te.Tm)(ft,{className:g}):ft))});Ne._InternalPanelDoNotUseOrYouWillBeFired=ve;var Ie=Ne},64018:function(){var Nt,ut,ie,V=!1,Ae,He;window.PR_SHOULD_USE_CONTINUATION=!0;var ke,$e;(function(){var ue=window,Fe=["break,continue,do,else,for,if,return,while"],Te=[Fe,"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"],l=[Te,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],Y=[l,"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"],P=[l,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],S=[l,"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"],d="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",w=[l,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],y="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",G=[Fe,"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"],X=[Fe,"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"],M=[Fe,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],O=[Y,S,P,w,y,G,X,M],Q=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,he="str",R="kwd",ve="com",Ce="typ",ge="lit",be="pun",Ne="pln",Ie="tag",je="dec",H="src",z="atn",Z="atv",ee="nocode",me="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function ae(Me){for(var Qe=0,se=!1,Pe=!1,Re=0,T=Me.length;Re<T;++Re){var K=Me[Re];if(K.ignoreCase)Pe=!0;else if(/[a-z]/i.test(K.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){se=!0,Pe=!1;break}}var te={b:8,t:9,n:10,v:11,f:12,r:13};function $(Se){var we=Se.charCodeAt(0);if(we!==92)return we;var ze=Se.charAt(1);return we=te[ze],we||("0"<=ze&&ze<="7"?parseInt(Se.substring(1),8):ze==="u"||ze==="x"?parseInt(Se.substring(2),16):Se.charCodeAt(1))}function W(Se){if(Se<32)return(Se<16?"\\x0":"\\x")+Se.toString(16);var we=String.fromCharCode(Se);return we==="\\"||we==="-"||we==="]"||we==="^"?"\\"+we:we}function Ee(Se){var we=Se.substring(1,Se.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")),ze=[],Ye=we[0]==="^",tt=["["];Ye&&tt.push("^");for(var st=Ye?1:0,mt=we.length;st<mt;++st){var ht=we[st];if(/\\[bdsw]/i.test(ht))tt.push(ht);else{var ft=$(ht),rt;st+2<mt&&we[st+1]==="-"?(rt=$(we[st+2]),st+=2):rt=ft,ze.push([ft,rt]),rt<65||ft>122||(rt<65||ft>90||ze.push([Math.max(65,ft)|32,Math.min(rt,90)|32]),rt<97||ft>122||ze.push([Math.max(97,ft)&-33,Math.min(rt,122)&-33]))}}ze.sort(function(I,ne){return I[0]-ne[0]||ne[1]-I[1]});for(var g=[],v=[],st=0;st<ze.length;++st){var Be=ze[st];Be[0]<=v[1]+1?v[1]=Math.max(v[1],Be[1]):g.push(v=Be)}for(var st=0;st<g.length;++st){var Be=g[st];tt.push(W(Be[0])),Be[1]>Be[0]&&(Be[1]+1>Be[0]&&tt.push("-"),tt.push(W(Be[1])))}return tt.push("]"),tt.join("")}function Le(Se){for(var we=Se.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")),ze=we.length,Ye=[],tt=0,st=0;tt<ze;++tt){var mt=we[tt];if(mt==="(")++st;else if(mt.charAt(0)==="\\"){var ht=+mt.substring(1);ht&&(ht<=st?Ye[ht]=-1:we[tt]=W(ht))}}for(var tt=1;tt<Ye.length;++tt)Ye[tt]===-1&&(Ye[tt]=++Qe);for(var tt=0,st=0;tt<ze;++tt){var mt=we[tt];if(mt==="(")++st,Ye[st]||(we[tt]="(?:");else if(mt.charAt(0)==="\\"){var ht=+mt.substring(1);ht&&ht<=st&&(we[tt]="\\"+Ye[ht])}}for(var tt=0;tt<ze;++tt)we[tt]==="^"&&we[tt+1]!=="^"&&(we[tt]="");if(Se.ignoreCase&&se)for(var tt=0;tt<ze;++tt){var mt=we[tt],ft=mt.charAt(0);mt.length>=2&&ft==="["?we[tt]=Ee(mt):ft!=="\\"&&(we[tt]=mt.replace(/[a-zA-Z]/g,function(v){var Be=v.charCodeAt(0);return"["+String.fromCharCode(Be&-33,Be|32)+"]"}))}return we.join("")}for(var Oe=[],Re=0,T=Me.length;Re<T;++Re){var K=Me[Re];if(K.global||K.multiline)throw new Error(""+K);Oe.push("(?:"+Le(K)+")")}return new RegExp(Oe.join("|"),Pe?"gi":"g")}function x(Me,Qe){var se=/(?:^|\s)nocode(?:\s|$)/,Pe=[],Re=0,T=[],K=0;function te($){var W=$.nodeType;if(W==1){if(se.test($.className))return;for(var Ee=$.firstChild;Ee;Ee=Ee.nextSibling)te(Ee);var Le=$.nodeName.toLowerCase();(Le==="br"||Le==="li")&&(Pe[K]=`
`,T[K<<1]=Re++,T[K++<<1|1]=$)}else if(W==3||W==4){var Oe=$.nodeValue;Oe.length&&(Qe?Oe=Oe.replace(/\r\n?/g,`
`):Oe=Oe.replace(/[ \t\r\n]+/g," "),Pe[K]=Oe,T[K<<1]=Re,Re+=Oe.length,T[K++<<1|1]=$)}}return te(Me),{sourceCode:Pe.join("").replace(/\n$/,""),spans:T}}function A(Me,Qe,se,Pe,Re){if(se){var T={sourceNode:Me,pre:1,langExtension:null,numberLines:null,sourceCode:se,spans:null,basePos:Qe,decorations:null};Pe(T),Re.push.apply(Re,T.decorations)}}var N=/\S/;function de(Me){for(var Qe=void 0,se=Me.firstChild;se;se=se.nextSibling){var Pe=se.nodeType;Qe=Pe===1?Qe?Me:se:Pe===3&&N.test(se.nodeValue)?Me:Qe}return Qe===Me?void 0:Qe}function We(Me,Qe){var se={},Pe;(function(){for(var K=Me.concat(Qe),te=[],$={},W=0,Ee=K.length;W<Ee;++W){var Le=K[W],Oe=Le[3];if(Oe)for(var Se=Oe.length;--Se>=0;)se[Oe.charAt(Se)]=Le;var we=Le[1],ze=""+we;$.hasOwnProperty(ze)||(te.push(we),$[ze]=null)}te.push(/[\0-\uffff]/),Pe=ae(te)})();var Re=Qe.length,T=function(K){for(var te=K.sourceCode,$=K.basePos,W=K.sourceNode,Ee=[$,Ne],Le=0,Oe=te.match(Pe)||[],Se={},we=0,ze=Oe.length;we<ze;++we){var Ye=Oe[we],tt=Se[Ye],st=void 0,mt;if(typeof tt=="string")mt=!1;else{var ht=se[Ye.charAt(0)];if(ht)st=Ye.match(ht[1]),tt=ht[0];else{for(var ft=0;ft<Re;++ft)if(ht=Qe[ft],st=Ye.match(ht[1]),st){tt=ht[0];break}st||(tt=Ne)}mt=tt.length>=5&&tt.substring(0,5)==="lang-",mt&&!(st&&typeof st[1]=="string")&&(mt=!1,tt=H),mt||(Se[Ye]=tt)}var rt=Le;if(Le+=Ye.length,!mt)Ee.push($+rt,tt);else{var g=st[1],v=Ye.indexOf(g),Be=v+g.length;st[2]&&(Be=Ye.length-st[2].length,v=Be-g.length);var I=tt.substring(5);A(W,$+rt,Ye.substring(0,v),T,Ee),A(W,$+rt+v,g,Lt(I,g),Ee),A(W,$+rt+Be,Ye.substring(Be),T,Ee)}}K.decorations=Ee};return T}function qe(Me){var Qe=[],se=[];Me.tripleQuotedStrings?Qe.push([he,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Me.multiLineStrings?Qe.push([he,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Qe.push([he,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Me.verbatimStrings&&se.push([he,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Pe=Me.hashComments;Pe&&(Me.cStyleComments?(Pe>1?Qe.push([ve,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Qe.push([ve,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),se.push([he,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Qe.push([ve,/^#[^\r\n]*/,null,"#"])),Me.cStyleComments&&(se.push([ve,/^\/\/[^\r\n]*/,null]),se.push([ve,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Re=Me.regexLiterals;if(Re){var T=Re>1?"":`
\r`,K=T?".":"[\\S\\s]",te="/(?=[^/*"+T+"])(?:[^/\\x5B\\x5C"+T+"]|\\x5C"+K+"|\\x5B(?:[^\\x5C\\x5D"+T+"]|\\x5C"+K+")*(?:\\x5D|$))+/";se.push(["lang-regex",RegExp("^"+me+"("+te+")")])}var $=Me.types;$&&se.push([Ce,$]);var W=(""+Me.keywords).replace(/^ | $/g,"");W.length&&se.push([R,new RegExp("^(?:"+W.replace(/[\s,]+/g,"|")+")\\b"),null]),Qe.push([Ne,/^\s+/,null,` \r
\xA0`]);var Ee="^.[^\\s\\w.$@'\"`/\\\\]*";return Me.regexLiterals&&(Ee+="(?!s*/)"),se.push([ge,/^@[a-z_$][a-z_$@0-9]*/i,null],[Ce,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[Ne,/^[a-z_$][a-z_$@0-9]*/i,null],[ge,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[Ne,/^\\[\s\S]?/,null],[be,new RegExp(Ee),null]),We(Qe,se)}var Ge=qe({keywords:O,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function ot(Me,Qe,se){for(var Pe=/(?:^|\s)nocode(?:\s|$)/,Re=/\r\n?|\n/,T=Me.ownerDocument,K=T.createElement("li");Me.firstChild;)K.appendChild(Me.firstChild);var te=[K];function $(we){var ze=we.nodeType;if(ze==1&&!Pe.test(we.className))if(we.nodeName==="br")W(we),we.parentNode&&we.parentNode.removeChild(we);else for(var Ye=we.firstChild;Ye;Ye=Ye.nextSibling)$(Ye);else if((ze==3||ze==4)&&se){var tt=we.nodeValue,st=tt.match(Re);if(st){var mt=tt.substring(0,st.index);we.nodeValue=mt;var ht=tt.substring(st.index+st[0].length);if(ht){var ft=we.parentNode;ft.insertBefore(T.createTextNode(ht),we.nextSibling)}W(we),mt||we.parentNode.removeChild(we)}}}function W(we){for(;!we.nextSibling;)if(we=we.parentNode,!we)return;function ze(st,mt){var ht=mt?st.cloneNode(!1):st,ft=st.parentNode;if(ft){var rt=ze(ft,1),g=st.nextSibling;rt.appendChild(ht);for(var v=g;v;v=g)g=v.nextSibling,rt.appendChild(v)}return ht}for(var Ye=ze(we.nextSibling,0),tt;(tt=Ye.parentNode)&&tt.nodeType===1;)Ye=tt;te.push(Ye)}for(var Ee=0;Ee<te.length;++Ee)$(te[Ee]);Qe===(Qe|0)&&te[0].setAttribute("value",Qe);var Le=T.createElement("ol");Le.className="linenums";for(var Oe=Math.max(0,Qe-1|0)||0,Ee=0,Se=te.length;Ee<Se;++Ee)K=te[Ee],K.className="L"+(Ee+Oe)%10,K.firstChild||K.appendChild(T.createTextNode("\xA0")),Le.appendChild(K);Me.appendChild(Le)}function Dt(Me){var Qe=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Qe=Qe&&+Qe[1]<=8;var se=/\n/g,Pe=Me.sourceCode,Re=Pe.length,T=0,K=Me.spans,te=K.length,$=0,W=Me.decorations,Ee=W.length,Le=0;W[Ee]=Re;var Oe,Se;for(Se=Oe=0;Se<Ee;)W[Se]!==W[Se+2]?(W[Oe++]=W[Se++],W[Oe++]=W[Se++]):Se+=2;for(Ee=Oe,Se=Oe=0;Se<Ee;){for(var we=W[Se],ze=W[Se+1],Ye=Se+2;Ye+2<=Ee&&W[Ye+1]===ze;)Ye+=2;W[Oe++]=we,W[Oe++]=ze,Se=Ye}Ee=W.length=Oe;var tt=Me.sourceNode,st="";tt&&(st=tt.style.display,tt.style.display="none");try{for(var mt=null;$<te;){var ht=K[$],ft=K[$+2]||Re,rt=W[Le+2]||Re,Ye=Math.min(ft,rt),g=K[$+1],v;if(g.nodeType!==1&&(v=Pe.substring(T,Ye))){Qe&&(v=v.replace(se,"\r")),g.nodeValue=v;var Be=g.ownerDocument,I=Be.createElement("span");I.className=W[Le+1];var ne=g.parentNode;ne.replaceChild(I,g),I.appendChild(g),T<ft&&(K[$+1]=g=Be.createTextNode(Pe.substring(Ye,ft)),ne.insertBefore(g,I.nextSibling))}T=Ye,T>=ft&&($+=2),T>=rt&&(Le+=2)}}finally{tt&&(tt.style.display=st)}}var at={};function it(Me,Qe){for(var se=Qe.length;--se>=0;){var Pe=Qe[se];at.hasOwnProperty(Pe)?ue.console&&console.warn("cannot override language handler %s",Pe):at[Pe]=Me}}function Lt(Me,Qe){return Me&&at.hasOwnProperty(Me)||(Me=/^\s*</.test(Qe)?"default-markup":"default-code"),at[Me]}it(Ge,["default-code"]),it(We([],[[Ne,/^[^<?]+/],[je,/^<!\w[^>]*(?:>|$)/],[ve,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[be,/^(?:<[%?]|[%?]>)/],["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"]),it(We([[Ne,/^[\s]+/,null,` \r
`],[Z,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[Ie,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[z,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[be,/^[=<>\/]+/],["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"]),it(We([],[[Z,/^[\s\S]+/]]),["uq.val"]),it(qe({keywords:Y,hashComments:!0,cStyleComments:!0,types:Q}),["c","cc","cpp","cxx","cyc","m"]),it(qe({keywords:"null,true,false"}),["json"]),it(qe({keywords:S,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:Q}),["cs"]),it(qe({keywords:P,cStyleComments:!0}),["java"]),it(qe({keywords:M,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),it(qe({keywords:G,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),it(qe({keywords:y,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),it(qe({keywords:X,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),it(qe({keywords:w,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),it(qe({keywords:d,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),it(We([],[[he,/^[\s\S]+/]]),["regex"]);function jt(Me){var Qe=Me.langExtension;try{var se=x(Me.sourceNode,Me.pre),Pe=se.sourceCode;Me.sourceCode=Pe,Me.spans=se.spans,Me.basePos=0,Lt(Qe,Pe)(Me),Dt(Me)}catch(Re){ue.console&&console.log(Re&&Re.stack||Re)}}function Xt(Me,Qe,se){var Pe=se||!1,Re=Qe||null,T=document.createElement("div");T.innerHTML="<pre>"+Me+"</pre>",T=T.firstChild,Pe&&ot(T,Pe,!0);var K={langExtension:Re,numberLines:Pe,sourceNode:T,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return jt(K),T.innerHTML}function Vt(Me,Qe){var se=Qe||document.body,Pe=se.ownerDocument||document;function Re(ht){return se.getElementsByTagName(ht)}for(var T=[Re("pre"),Re("code"),Re("xmp")],K=[],te=0;te<T.length;++te)for(var $=0,W=T[te].length;$<W;++$)K.push(T[te][$]);T=null;var Ee=Date;Ee.now||(Ee={now:function(){return+new Date}});var Le=0,Oe=/\blang(?:uage)?-([\w.]+)(?!\S)/,Se=/\bprettyprint\b/,we=/\bprettyprinted\b/,ze=/pre|xmp/i,Ye=/^code$/i,tt=/^(?:pre|code|xmp)$/i,st={};function mt(){for(var ht=ue.PR_SHOULD_USE_CONTINUATION?Ee.now()+250:1/0;Le<K.length&&Ee.now()<ht;Le++){for(var ft=K[Le],rt=st,g=ft;g=g.previousSibling;){var v=g.nodeType,Be=(v===7||v===8)&&g.nodeValue;if(Be?!/^\??prettify\b/.test(Be):v!==3||/\S/.test(g.nodeValue))break;if(Be){rt={},Be.replace(/\b(\w+)=([\w:.%+-]+)/g,function(fe,Et,It){rt[Et]=It});break}}var I=ft.className;if((rt!==st||Se.test(I))&&!we.test(I)){for(var ne=!1,bt=ft.parentNode;bt;bt=bt.parentNode){var ce=bt.tagName;if(tt.test(ce)&&bt.className&&Se.test(bt.className)){ne=!0;break}}if(!ne){ft.className+=" prettyprinted";var xe=rt.lang;if(!xe){xe=I.match(Oe);var Ue;!xe&&(Ue=de(ft))&&Ye.test(Ue.tagName)&&(xe=Ue.className.match(Oe)),xe&&(xe=xe[1])}var B;if(ze.test(ft.tagName))B=1;else{var q=ft.currentStyle,oe=Pe.defaultView,ye=q?q.whiteSpace:oe&&oe.getComputedStyle?oe.getComputedStyle(ft,null).getPropertyValue("white-space"):0;B=ye&&ye.substring(0,3)==="pre"}var L=rt.linenums;(L=L==="true"||+L)||(L=I.match(/\blinenums\b(?::(\d+))?/),L=L?L[1]&&L[1].length?+L[1]:!0:!1),L&&ot(ft,L,B);var pt={langExtension:xe,sourceNode:ft,numberLines:L,pre:B,sourceCode:null,basePos:null,spans:null,decorations:null};jt(pt)}}}Le<K.length?ue.setTimeout(mt,250):typeof Me=="function"&&Me()}mt()}var Mt=ue.PR={createSimpleLexer:We,registerLangHandler:it,sourceDecorator:qe,PR_ATTRIB_NAME:z,PR_ATTRIB_VALUE:Z,PR_COMMENT:ve,PR_DECLARATION:je,PR_KEYWORD:R,PR_LITERAL:ge,PR_NOCODE:ee,PR_PLAIN:Ne,PR_PUNCTUATION:be,PR_SOURCE:H,PR_STRING:he,PR_TAG:Ie,PR_TYPE:Ce,prettyPrintOne:V?ue.prettyPrintOne=Xt:ke=Xt,prettyPrint:$e=V?ue.prettyPrint=Vt:$e=Vt},Rt=ue.define;typeof Rt=="function"&&Rt.amd&&Rt("google-code-prettify",[],function(){return Mt})})()},25769:function(Nt,ut,ie){"use strict";var V=ie(98040),Ae={"text/plain":"Text","text/html":"Url",default:"Text"},He="Copy to clipboard: #{key}, Enter";function ke(ue){var Fe=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return ue.replace(/#{\s*key\s*}/g,Fe)}function $e(ue,Fe){var Te,l,Y,P,S,d,w=!1;Fe||(Fe={}),Te=Fe.debug||!1;try{Y=V(),P=document.createRange(),S=document.getSelection(),d=document.createElement("span"),d.textContent=ue,d.ariaHidden="true",d.style.all="unset",d.style.position="fixed",d.style.top=0,d.style.clip="rect(0, 0, 0, 0)",d.style.whiteSpace="pre",d.style.webkitUserSelect="text",d.style.MozUserSelect="text",d.style.msUserSelect="text",d.style.userSelect="text",d.addEventListener("copy",function(G){if(G.stopPropagation(),Fe.format)if(G.preventDefault(),typeof G.clipboardData=="undefined"){Te&&console.warn("unable to use e.clipboardData"),Te&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var X=Ae[Fe.format]||Ae.default;window.clipboardData.setData(X,ue)}else G.clipboardData.clearData(),G.clipboardData.setData(Fe.format,ue);Fe.onCopy&&(G.preventDefault(),Fe.onCopy(G.clipboardData))}),document.body.appendChild(d),P.selectNodeContents(d),S.addRange(P);var y=document.execCommand("copy");if(!y)throw new Error("copy command was unsuccessful");w=!0}catch(G){Te&&console.error("unable to copy using execCommand: ",G),Te&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(Fe.format||"text",ue),Fe.onCopy&&Fe.onCopy(window.clipboardData),w=!0}catch(X){Te&&console.error("unable to copy using clipboardData: ",X),Te&&console.error("falling back to prompt"),l=ke("message"in Fe?Fe.message:He),window.prompt(l,ue)}}finally{S&&(typeof S.removeRange=="function"?S.removeRange(P):S.removeAllRanges()),d&&document.body.removeChild(d),Y()}return w}Nt.exports=$e},53184:function(Nt,ut,ie){"use strict";var V,Ae;function He(ke,$e,ue){var Fe=function(Te,l){return ke.js_beautify(Te,l)};return Fe.js=ke.js_beautify,Fe.css=$e.css_beautify,Fe.html=ue.html_beautify,Fe.js_beautify=ke.js_beautify,Fe.css_beautify=$e.css_beautify,Fe.html_beautify=ue.html_beautify,Fe}V=[ie(58553),ie(87804),ie(40998)],Ae=function(ke,$e,ue){return He(ke,$e,ue)}.apply(ut,V),Ae!==void 0&&(Nt.exports=Ae)},87804:function(Nt,ut){var ie,V;(function(){var Ae;(function(){"use strict";var ke=[,,function(Te){function l(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=[]}l.prototype.clone_empty=function(){var S=new l(this.__parent);return S.set_indent(this.__indent_count,this.__alignment_count),S},l.prototype.item=function(S){return S<0?this.__items[this.__items.length+S]:this.__items[S]},l.prototype.has_match=function(S){for(var d=this.__items.length-1;d>=0;d--)if(this.__items[d].match(S))return!0;return!1},l.prototype.set_indent=function(S,d){this.is_empty()&&(this.__indent_count=S||0,this.__alignment_count=d||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},l.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)},l.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},l.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},l.prototype.is_empty=function(){return this.__items.length===0},l.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},l.prototype.push=function(S){this.__items.push(S);var d=S.lastIndexOf(`
`);d!==-1?this.__character_count=S.length-d:this.__character_count+=S.length},l.prototype.pop=function(){var S=null;return this.is_empty()||(S=this.__items.pop(),this.__character_count-=S.length),S},l.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},l.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},l.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},l.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 Y(S,d){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)),d=d||"",S.indent_level>0&&(d=new Array(S.indent_level+1).join(this.__indent_string)),this.__base_string=d,this.__base_string_length=d.length}Y.prototype.get_indent_size=function(S,d){var w=this.__base_string_length;return d=d||0,S<0&&(w=0),w+=S*this.__indent_size,w+=d,w},Y.prototype.get_indent_string=function(S,d){var w=this.__base_string;return d=d||0,S<0&&(S=0,w=""),d+=S*this.__indent_size,this.__ensure_cache(d),w+=this.__cache[d],w},Y.prototype.__ensure_cache=function(S){for(;S>=this.__cache.length;)this.__add_column()},Y.prototype.__add_column=function(){var S=this.__cache.length,d=0,w="";this.__indent_size&&S>=this.__indent_size&&(d=Math.floor(S/this.__indent_size),S-=d*this.__indent_size,w=new Array(d+1).join(this.__indent_string)),S&&(w+=new Array(S+1).join(" ")),this.__cache.push(w)};function P(S,d){this.__indent_cache=new Y(S,d),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 l(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}P.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},P.prototype.get_line_number=function(){return this.__lines.length},P.prototype.get_indent_string=function(S,d){return this.__indent_cache.get_indent_string(S,d)},P.prototype.get_indent_size=function(S,d){return this.__indent_cache.get_indent_size(S,d)},P.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},P.prototype.add_new_line=function(S){return this.is_empty()||!S&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},P.prototype.get_code=function(S){this.trim(!0);var d=this.current_line.pop();d&&(d[d.length-1]===`
`&&(d=d.replace(/\n+$/g,"")),this.current_line.push(d)),this._end_with_newline&&this.__add_outputline();var w=this.__lines.join(`
`);return S!==`
`&&(w=w.replace(/[\n]/g,S)),w},P.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},P.prototype.set_indent=function(S,d){return S=S||0,d=d||0,this.next_line.set_indent(S,d),this.__lines.length>1?(this.current_line.set_indent(S,d),!0):(this.current_line.set_indent(),!1)},P.prototype.add_raw_token=function(S){for(var d=0;d<S.newlines;d++)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},P.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()},P.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(" "))},P.prototype.remove_indent=function(S){for(var d=this.__lines.length;S<d;)this.__lines[S]._remove_indent(),S++;this.current_line._remove_wrap_indent()},P.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},P.prototype.just_added_newline=function(){return this.current_line.is_empty()},P.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},P.prototype.ensure_empty_line_above=function(S,d){for(var w=this.__lines.length-2;w>=0;){var y=this.__lines[w];if(y.is_empty())break;if(y.item(0).indexOf(S)!==0&&y.item(-1)!==d){this.__lines.splice(w+1,0,new l(this)),this.previous_line=this.__lines[this.__lines.length-2];break}w--}},Te.exports.Output=P},,,,function(Te){function l(S,d){this.raw_options=Y(S,d),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"])}l.prototype._get_array=function(S,d){var w=this.raw_options[S],y=d||[];return typeof w=="object"?w!==null&&typeof w.concat=="function"&&(y=w.concat()):typeof w=="string"&&(y=w.split(/[^a-zA-Z0-9_\/\-]+/)),y},l.prototype._get_boolean=function(S,d){var w=this.raw_options[S],y=w===void 0?!!d:!!w;return y},l.prototype._get_characters=function(S,d){var w=this.raw_options[S],y=d||"";return typeof w=="string"&&(y=w.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),y},l.prototype._get_number=function(S,d){var w=this.raw_options[S];d=parseInt(d,10),isNaN(d)&&(d=0);var y=parseInt(w,10);return isNaN(y)&&(y=d),y},l.prototype._get_selection=function(S,d,w){var y=this._get_selection_list(S,d,w);if(y.length!==1)throw new Error("Invalid Option Value: The option '"+S+`' can only be one of the following values:
`+d+`
You passed in: '`+this.raw_options[S]+"'");return y[0]},l.prototype._get_selection_list=function(S,d,w){if(!d||d.length===0)throw new Error("Selection list cannot be empty.");if(w=w||[d[0]],!this._is_valid_selection(w,d))throw new Error("Invalid Default Value!");var y=this._get_array(S,w);if(!this._is_valid_selection(y,d))throw new Error("Invalid Option Value: The option '"+S+`' can contain only the following values:
`+d+`
You passed in: '`+this.raw_options[S]+"'");return y},l.prototype._is_valid_selection=function(S,d){return S.length&&d.length&&!S.some(function(w){return d.indexOf(w)===-1})};function Y(S,d){var w={};S=P(S);var y;for(y in S)y!==d&&(w[y]=S[y]);if(d&&S[d])for(y in S[d])w[y]=S[d][y];return w}function P(S){var d={},w;for(w in S){var y=w.replace(/-/g,"_");d[y]=S[w]}return d}Te.exports.Options=l,Te.exports.normalizeOpts=P,Te.exports.mergeOpts=Y},,function(Te){var l=RegExp.prototype.hasOwnProperty("sticky");function Y(P){this.__input=P||"",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 P=null;return this.hasNext()&&(P=this.__input.charAt(this.__position),this.__position+=1),P},Y.prototype.peek=function(P){var S=null;return P=P||0,P+=this.__position,P>=0&&P<this.__input_length&&(S=this.__input.charAt(P)),S},Y.prototype.__match=function(P,S){P.lastIndex=S;var d=P.exec(this.__input);return d&&!(l&&P.sticky)&&d.index!==S&&(d=null),d},Y.prototype.test=function(P,S){return S=S||0,S+=this.__position,S>=0&&S<this.__input_length?!!this.__match(P,S):!1},Y.prototype.testChar=function(P,S){var d=this.peek(S);return P.lastIndex=0,d!==null&&P.test(d)},Y.prototype.match=function(P){var S=this.__match(P,this.__position);return S?this.__position+=S[0].length:S=null,S},Y.prototype.read=function(P,S,d){var w="",y;return P&&(y=this.match(P),y&&(w+=y[0])),S&&(y||!P)&&(w+=this.readUntil(S,d)),w},Y.prototype.readUntil=function(P,S){var d="",w=this.__position;P.lastIndex=this.__position;var y=P.exec(this.__input);return y?(w=y.index,S&&(w+=y[0].length)):w=this.__input_length,d=this.__input.substring(this.__position,w),this.__position=w,d},Y.prototype.readUntilAfter=function(P){return this.readUntil(P,!0)},Y.prototype.get_regexp=function(P,S){var d=null,w="g";return S&&l&&(w="y"),typeof P=="string"&&P!==""?d=new RegExp(P,w):P&&(d=new RegExp(P.source,w)),d},Y.prototype.get_literal_regexp=function(P){return RegExp(P.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},Y.prototype.peekUntilAfter=function(P){var S=this.__position,d=this.readUntilAfter(P);return this.__position=S,d},Y.prototype.lookBack=function(P){var S=this.__position-1;return S>=P.length&&this.__input.substring(S-P.length,S).toLowerCase()===P},Te.exports.InputScanner=Y},,,,,function(Te){function l(Y,P){Y=typeof Y=="string"?Y:Y.source,P=typeof P=="string"?P:P.source,this.__directives_block_pattern=new RegExp(Y+/ beautify( \w+[:]\w+)+ /.source+P,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(Y+/\sbeautify\signore:end\s/.source+P,"g")}l.prototype.get_directives=function(Y){if(!Y.match(this.__directives_block_pattern))return null;var P={};this.__directive_pattern.lastIndex=0;for(var S=this.__directive_pattern.exec(Y);S;)P[S[1]]=S[2],S=this.__directive_pattern.exec(Y);return P},l.prototype.readIgnored=function(Y){return Y.readUntilAfter(this.__directives_end_ignore_pattern)},Te.exports.Directives=l},,function(Te,l,Y){var P=Y(16).Beautifier,S=Y(17).Options;function d(w,y){var G=new P(w,y);return G.beautify()}Te.exports=d,Te.exports.defaultOptions=function(){return new S}},function(Te,l,Y){var P=Y(17).Options,S=Y(2).Output,d=Y(8).InputScanner,w=Y(13).Directives,y=new w(/\/\*/,/\*\//),G=/\r\n|[\r\n]/,X=/\r\n|[\r\n]/g,M=/\s/,O=/(?:\s|\n)+/g,Q=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,he=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function R(ve,Ce){this._source_text=ve||"",this._options=new P(Ce),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"]}R.prototype.eatString=function(ve){var Ce="";for(this._ch=this._input.next();this._ch;){if(Ce+=this._ch,this._ch==="\\")Ce+=this._input.next();else if(ve.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return Ce},R.prototype.eatWhitespace=function(ve){for(var Ce=M.test(this._input.peek()),ge=0;M.test(this._input.peek());)this._ch=this._input.next(),ve&&this._ch===`
`&&(ge===0||ge<this._options.max_preserve_newlines)&&(ge++,this._output.add_new_line(!0));return Ce},R.prototype.foundNestedPseudoClass=function(){for(var ve=0,Ce=1,ge=this._input.peek(Ce);ge;){if(ge==="{")return!0;if(ge==="(")ve+=1;else if(ge===")"){if(ve===0)return!1;ve-=1}else if(ge===";"||ge==="}")return!1;Ce++,ge=this._input.peek(Ce)}return!1},R.prototype.print_string=function(ve){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(ve)},R.prototype.preserveSingleSpace=function(ve){ve&&(this._output.space_before_token=!0)},R.prototype.indent=function(){this._indentLevel++},R.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},R.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var ve=this._source_text,Ce=this._options.eol;Ce==="auto"&&(Ce=`
`,ve&&G.test(ve||"")&&(Ce=ve.match(G)[0])),ve=ve.replace(X,`
`);var ge=ve.match(/^[\t ]*/)[0];this._output=new S(this._options,ge),this._input=new d(ve),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var be=0,Ne=!1,Ie=!1,je=!1,H=!1,z=!1,Z=this._ch,ee=!1,me,ae,x;me=this._input.read(O),ae=me!=="",x=Z,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),Z=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var A=this._input.read(Q),N=y.get_directives(A);N&&N.ignore==="start"&&(A+=y.readIgnored(this._input)),this.print_string(A),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(he)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(ae),this.print_string(this._ch);var de=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);de.match(/[ :]$/)&&(de=this.eatString(": ").replace(/\s+$/,""),this.print_string(de),this._output.space_before_token=!0),be===0&&de.indexOf(":")!==-1&&(Ie=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(ae),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var We=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);We.match(/[ :]$/)&&(We=this.eatString(": ").replace(/\s+$/,""),this.print_string(We),this._output.space_before_token=!0),be===0&&We.indexOf(":")!==-1?(Ie=!0,this.indent()):We in this.NESTED_AT_RULE?(this._nestedLevel+=1,We in this.CONDITIONAL_GROUP_RULE&&(je=!0)):be===0&&!Ie&&(H=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(ae),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")Ie&&(Ie=!1,this.outdent()),H=!1,je?(je=!1,Ne=this._indentLevel>=this._nestedLevel):Ne=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&Ne&&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)):(x==="("?this._output.space_before_token=!1:x!==","&&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(),x==="{"&&this._output.trim(!0),Ie&&(this.outdent(),Ie=!1),this.print_string(this._ch),Ne=!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 qe=0;qe<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;qe++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[qe])){ee=!0;break}(Ne||je)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!H&&be===0?(this.print_string(":"),Ie||(Ie=!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 Ge=x==='"'||x==="'";this.preserveSingleSpace(Ge||ae),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")ee=!1,be===0?(Ie&&(this.outdent(),Ie=!1),H=!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(),be++,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(")")),be&&(be--,this.outdent()));else{var ot=!1;this._input.lookBack("with")&&(ot=!0),this.preserveSingleSpace(ae||ot),this.print_string(this._ch),Ie&&x==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),z=!0):(this.eatWhitespace(),be++,this.indent())}else if(this._ch===")")be&&(be--,this.outdent()),z&&this._input.peek()===";"&&this._options.selector_separator_newline&&(z=!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&&(!Ie||z)&&be===0&&!H?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!Ie&&be===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&&M.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(ae),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),M.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 Dt=x==='"'||x==="'";this.preserveSingleSpace(Dt||ae),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&ee&&this._output.add_new_line()}var at=this._output.get_code(Ce);return at},Te.exports.Beautifier=R},function(Te,l,Y){var P=Y(6).Options;function S(d){P.call(this,d,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var w=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||w;var y=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var G=0;G<y.length;G++)y[G]!=="expand"?this.brace_style="collapse":this.brace_style=y[G]}S.prototype=new P,Te.exports.Options=S}],$e={};function ue(Te){var l=$e[Te];if(l!==void 0)return l.exports;var Y=$e[Te]={exports:{}};return ke[Te](Y,Y.exports,ue),Y.exports}var Fe=ue(15);Ae=Fe})();var He=Ae;ie=[],V=function(){return{css_beautify:He}}.apply(ut,ie),V!==void 0&&(Nt.exports=V)})()},40998:function(Nt,ut,ie){var V,Ae;(function(){var He;(function(){"use strict";var Fe=[,,function(P){function S(y){this.__parent=y,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=[]}S.prototype.clone_empty=function(){var y=new S(this.__parent);return y.set_indent(this.__indent_count,this.__alignment_count),y},S.prototype.item=function(y){return y<0?this.__items[this.__items.length+y]:this.__items[y]},S.prototype.has_match=function(y){for(var G=this.__items.length-1;G>=0;G--)if(this.__items[G].match(y))return!0;return!1},S.prototype.set_indent=function(y,G){this.is_empty()&&(this.__indent_count=y||0,this.__alignment_count=G||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},S.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)},S.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},S.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var y=this.__parent.current_line;return y.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),y.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),y.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,y.__items[0]===" "&&(y.__items.splice(0,1),y.__character_count-=1),!0}return!1},S.prototype.is_empty=function(){return this.__items.length===0},S.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},S.prototype.push=function(y){this.__items.push(y);var G=y.lastIndexOf(`
`);G!==-1?this.__character_count=y.length-G:this.__character_count+=y.length},S.prototype.pop=function(){var y=null;return this.is_empty()||(y=this.__items.pop(),this.__character_count-=y.length),y},S.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},S.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},S.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},S.prototype.toString=function(){var y="";return this.is_empty()?this.__parent.indent_empty_lines&&(y=this.__parent.get_indent_string(this.__indent_count)):(y=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),y+=this.__items.join("")),y};function d(y,G){this.__cache=[""],this.__indent_size=y.indent_size,this.__indent_string=y.indent_char,y.indent_with_tabs||(this.__indent_string=new Array(y.indent_size+1).join(y.indent_char)),G=G||"",y.indent_level>0&&(G=new Array(y.indent_level+1).join(this.__indent_string)),this.__base_string=G,this.__base_string_length=G.length}d.prototype.get_indent_size=function(y,G){var X=this.__base_string_length;return G=G||0,y<0&&(X=0),X+=y*this.__indent_size,X+=G,X},d.prototype.get_indent_string=function(y,G){var X=this.__base_string;return G=G||0,y<0&&(y=0,X=""),G+=y*this.__indent_size,this.__ensure_cache(G),X+=this.__cache[G],X},d.prototype.__ensure_cache=function(y){for(;y>=this.__cache.length;)this.__add_column()},d.prototype.__add_column=function(){var y=this.__cache.length,G=0,X="";this.__indent_size&&y>=this.__indent_size&&(G=Math.floor(y/this.__indent_size),y-=G*this.__indent_size,X=new Array(G+1).join(this.__indent_string)),y&&(X+=new Array(y+1).join(" ")),this.__cache.push(X)};function w(y,G){this.__indent_cache=new d(y,G),this.raw=!1,this._end_with_newline=y.end_with_newline,this.indent_size=y.indent_size,this.wrap_line_length=y.wrap_line_length,this.indent_empty_lines=y.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new S(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}w.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},w.prototype.get_line_number=function(){return this.__lines.length},w.prototype.get_indent_string=function(y,G){return this.__indent_cache.get_indent_string(y,G)},w.prototype.get_indent_size=function(y,G){return this.__indent_cache.get_indent_size(y,G)},w.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},w.prototype.add_new_line=function(y){return this.is_empty()||!y&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},w.prototype.get_code=function(y){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 X=this.__lines.join(`
`);return y!==`
`&&(X=X.replace(/[\n]/g,y)),X},w.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},w.prototype.set_indent=function(y,G){return y=y||0,G=G||0,this.next_line.set_indent(y,G),this.__lines.length>1?(this.current_line.set_indent(y,G),!0):(this.current_line.set_indent(),!1)},w.prototype.add_raw_token=function(y){for(var G=0;G<y.newlines;G++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(y.whitespace_before),this.current_line.push(y.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},w.prototype.add_token=function(y){this.__add_space_before_token(),this.current_line.push(y),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},w.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(" "))},w.prototype.remove_indent=function(y){for(var G=this.__lines.length;y<G;)this.__lines[y]._remove_indent(),y++;this.current_line._remove_wrap_indent()},w.prototype.trim=function(y){for(y=y===void 0?!1:y,this.current_line.trim();y&&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},w.prototype.just_added_newline=function(){return this.current_line.is_empty()},w.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},w.prototype.ensure_empty_line_above=function(y,G){for(var X=this.__lines.length-2;X>=0;){var M=this.__lines[X];if(M.is_empty())break;if(M.item(0).indexOf(y)!==0&&M.item(-1)!==G){this.__lines.splice(X+1,0,new S(this)),this.previous_line=this.__lines[this.__lines.length-2];break}X--}},P.exports.Output=w},function(P){function S(d,w,y,G){this.type=d,this.text=w,this.comments_before=null,this.newlines=y||0,this.whitespace_before=G||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}P.exports.Token=S},,,function(P){function S(y,G){this.raw_options=d(y,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"])}S.prototype._get_array=function(y,G){var X=this.raw_options[y],M=G||[];return typeof X=="object"?X!==null&&typeof X.concat=="function"&&(M=X.concat()):typeof X=="string"&&(M=X.split(/[^a-zA-Z0-9_\/\-]+/)),M},S.prototype._get_boolean=function(y,G){var X=this.raw_options[y],M=X===void 0?!!G:!!X;return M},S.prototype._get_characters=function(y,G){var X=this.raw_options[y],M=G||"";return typeof X=="string"&&(M=X.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),M},S.prototype._get_number=function(y,G){var X=this.raw_options[y];G=parseInt(G,10),isNaN(G)&&(G=0);var M=parseInt(X,10);return isNaN(M)&&(M=G),M},S.prototype._get_selection=function(y,G,X){var M=this._get_selection_list(y,G,X);if(M.length!==1)throw new Error("Invalid Option Value: The option '"+y+`' can only be one of the following values:
`+G+`
You passed in: '`+this.raw_options[y]+"'");return M[0]},S.prototype._get_selection_list=function(y,G,X){if(!G||G.length===0)throw new Error("Selection list cannot be empty.");if(X=X||[G[0]],!this._is_valid_selection(X,G))throw new Error("Invalid Default Value!");var M=this._get_array(y,X);if(!this._is_valid_selection(M,G))throw new Error("Invalid Option Value: The option '"+y+`' can contain only the following values:
`+G+`
You passed in: '`+this.raw_options[y]+"'");return M},S.prototype._is_valid_selection=function(y,G){return y.length&&G.length&&!y.some(function(X){return G.indexOf(X)===-1})};function d(y,G){var X={};y=w(y);var M;for(M in y)M!==G&&(X[M]=y[M]);if(G&&y[G])for(M in y[G])X[M]=y[G][M];return X}function w(y){var G={},X;for(X in y){var M=X.replace(/-/g,"_");G[M]=y[X]}return G}P.exports.Options=S,P.exports.normalizeOpts=w,P.exports.mergeOpts=d},,function(P){var S=RegExp.prototype.hasOwnProperty("sticky");function d(w){this.__input=w||"",this.__input_length=this.__input.length,this.__position=0}d.prototype.restart=function(){this.__position=0},d.prototype.back=function(){this.__position>0&&(this.__position-=1)},d.prototype.hasNext=function(){return this.__position<this.__input_length},d.prototype.next=function(){var w=null;return this.hasNext()&&(w=this.__input.charAt(this.__position),this.__position+=1),w},d.prototype.peek=function(w){var y=null;return w=w||0,w+=this.__position,w>=0&&w<this.__input_length&&(y=this.__input.charAt(w)),y},d.prototype.__match=function(w,y){w.lastIndex=y;var G=w.exec(this.__input);return G&&!(S&&w.sticky)&&G.index!==y&&(G=null),G},d.prototype.test=function(w,y){return y=y||0,y+=this.__position,y>=0&&y<this.__input_length?!!this.__match(w,y):!1},d.prototype.testChar=function(w,y){var G=this.peek(y);return w.lastIndex=0,G!==null&&w.test(G)},d.prototype.match=function(w){var y=this.__match(w,this.__position);return y?this.__position+=y[0].length:y=null,y},d.prototype.read=function(w,y,G){var X="",M;return w&&(M=this.match(w),M&&(X+=M[0])),y&&(M||!w)&&(X+=this.readUntil(y,G)),X},d.prototype.readUntil=function(w,y){var G="",X=this.__position;w.lastIndex=this.__position;var M=w.exec(this.__input);return M?(X=M.index,y&&(X+=M[0].length)):X=this.__input_length,G=this.__input.substring(this.__position,X),this.__position=X,G},d.prototype.readUntilAfter=function(w){return this.readUntil(w,!0)},d.prototype.get_regexp=function(w,y){var G=null,X="g";return y&&S&&(X="y"),typeof w=="string"&&w!==""?G=new RegExp(w,X):w&&(G=new RegExp(w.source,X)),G},d.prototype.get_literal_regexp=function(w){return RegExp(w.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},d.prototype.peekUntilAfter=function(w){var y=this.__position,G=this.readUntilAfter(w);return this.__position=y,G},d.prototype.lookBack=function(w){var y=this.__position-1;return y>=w.length&&this.__input.substring(y-w.length,y).toLowerCase()===w},P.exports.InputScanner=d},function(P,S,d){var w=d(8).InputScanner,y=d(3).Token,G=d(10).TokenStream,X=d(11).WhitespacePattern,M={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},O=function(Q,he){this._input=new w(Q),this._options=he||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new X(this._input)};O.prototype.tokenize=function(){this._input.restart(),this.__tokens=new G,this._reset();for(var Q,he=new y(M.START,""),R=null,ve=[],Ce=new G;he.type!==M.EOF;){for(Q=this._get_next_token(he,R);this._is_comment(Q);)Ce.add(Q),Q=this._get_next_token(he,R);Ce.isEmpty()||(Q.comments_before=Ce,Ce=new G),Q.parent=R,this._is_opening(Q)?(ve.push(R),R=Q):R&&this._is_closing(Q,R)&&(Q.opened=R,R.closed=Q,R=ve.pop(),Q.parent=R),Q.previous=he,he.next=Q,this.__tokens.add(Q),he=Q}return this.__tokens},O.prototype._is_first_token=function(){return this.__tokens.isEmpty()},O.prototype._reset=function(){},O.prototype._get_next_token=function(Q,he){this._readWhitespace();var R=this._input.read(/.+/g);return R?this._create_token(M.RAW,R):this._create_token(M.EOF,"")},O.prototype._is_comment=function(Q){return!1},O.prototype._is_opening=function(Q){return!1},O.prototype._is_closing=function(Q,he){return!1},O.prototype._create_token=function(Q,he){var R=new y(Q,he,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return R},O.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},P.exports.Tokenizer=O,P.exports.TOKEN=M},function(P){function S(d){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=d}S.prototype.restart=function(){this.__position=0},S.prototype.isEmpty=function(){return this.__tokens_length===0},S.prototype.hasNext=function(){return this.__position<this.__tokens_length},S.prototype.next=function(){var d=null;return this.hasNext()&&(d=this.__tokens[this.__position],this.__position+=1),d},S.prototype.peek=function(d){var w=null;return d=d||0,d+=this.__position,d>=0&&d<this.__tokens_length&&(w=this.__tokens[d]),w},S.prototype.add=function(d){this.__parent_token&&(d.parent=this.__parent_token),this.__tokens.push(d),this.__tokens_length+=1},P.exports.TokenStream=S},function(P,S,d){var w=d(12).Pattern;function y(G,X){w.call(this,G,X),X?this._line_regexp=this._input.get_regexp(X._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}y.prototype=new w,y.prototype.__set_whitespace_patterns=function(G,X){G+="\\t ",X+="\\n\\r",this._match_pattern=this._input.get_regexp("["+G+X+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+X+"]")},y.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 X=this.__split(this._newline_regexp,G);this.newline_count=X.length-1,this.whitespace_before_token=X[this.newline_count]}return G},y.prototype.matching=function(G,X){var M=this._create();return M.__set_whitespace_patterns(G,X),M._update(),M},y.prototype._create=function(){return new y(this._input,this)},y.prototype.__split=function(G,X){G.lastIndex=0;for(var M=0,O=[],Q=G.exec(X);Q;)O.push(X.substring(M,Q.index)),M=Q.index+Q[0].length,Q=G.exec(X);return M<X.length?O.push(X.substring(M,X.length)):O.push(""),O},P.exports.WhitespacePattern=y},function(P){function S(d,w){this._input=d,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,w&&(this._starting_pattern=this._input.get_regexp(w._starting_pattern,!0),this._match_pattern=this._input.get_regexp(w._match_pattern,!0),this._until_pattern=this._input.get_regexp(w._until_pattern),this._until_after=w._until_after)}S.prototype.read=function(){var d=this._input.read(this._starting_pattern);return(!this._starting_pattern||d)&&(d+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),d},S.prototype.read_match=function(){return this._input.match(this._match_pattern)},S.prototype.until_after=function(d){var w=this._create();return w._until_after=!0,w._until_pattern=this._input.get_regexp(d),w._update(),w},S.prototype.until=function(d){var w=this._create();return w._until_after=!1,w._until_pattern=this._input.get_regexp(d),w._update(),w},S.prototype.starting_with=function(d){var w=this._create();return w._starting_pattern=this._input.get_regexp(d,!0),w._update(),w},S.prototype.matching=function(d){var w=this._create();return w._match_pattern=this._input.get_regexp(d,!0),w._update(),w},S.prototype._create=function(){return new S(this._input,this)},S.prototype._update=function(){},P.exports.Pattern=S},function(P){function S(d,w){d=typeof d=="string"?d:d.source,w=typeof w=="string"?w:w.source,this.__directives_block_pattern=new RegExp(d+/ beautify( \w+[:]\w+)+ /.source+w,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(d+/\sbeautify\signore:end\s/.source+w,"g")}S.prototype.get_directives=function(d){if(!d.match(this.__directives_block_pattern))return null;var w={};this.__directive_pattern.lastIndex=0;for(var y=this.__directive_pattern.exec(d);y;)w[y[1]]=y[2],y=this.__directive_pattern.exec(d);return w},S.prototype.readIgnored=function(d){return d.readUntilAfter(this.__directives_end_ignore_pattern)},P.exports.Directives=S},function(P,S,d){var w=d(12).Pattern,y={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function G(X,M){w.call(this,X,M),this.__template_pattern=null,this._disabled=Object.assign({},y),this._excluded=Object.assign({},y),M&&(this.__template_pattern=this._input.get_regexp(M.__template_pattern),this._excluded=Object.assign(this._excluded,M._excluded),this._disabled=Object.assign(this._disabled,M._disabled));var O=new w(X);this.__patterns={handlebars_comment:O.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:O.starting_with(/{{{/).until_after(/}}}/),handlebars:O.starting_with(/{{/).until_after(/}}/),php:O.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:O.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:O.starting_with(/{%/).until_after(/%}/),django_value:O.starting_with(/{{/).until_after(/}}/),django_comment:O.starting_with(/{#/).until_after(/#}/),smarty:O.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:O.starting_with(/{\*/).until_after(/\*}/),smarty_literal:O.starting_with(/{literal}/).until_after(/{\/literal}/)}}G.prototype=new w,G.prototype._create=function(){return new G(this._input,this)},G.prototype._update=function(){this.__set_templated_pattern()},G.prototype.disable=function(X){var M=this._create();return M._disabled[X]=!0,M._update(),M},G.prototype.read_options=function(X){var M=this._create();for(var O in y)M._disabled[O]=X.templating.indexOf(O)===-1;return M._update(),M},G.prototype.exclude=function(X){var M=this._create();return M._excluded[X]=!0,M._update(),M},G.prototype.read=function(){var X="";this._match_pattern?X=this._input.read(this._starting_pattern):X=this._input.read(this._starting_pattern,this.__template_pattern);for(var M=this._read_template();M;)this._match_pattern?M+=this._input.read(this._match_pattern):M+=this._input.readUntil(this.__template_pattern),X+=M,M=this._read_template();return this._until_after&&(X+=this._input.readUntilAfter(this._until_pattern)),X},G.prototype.__set_templated_pattern=function(){var X=[];this._disabled.php||X.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||X.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||X.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||X.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(X.push(this.__patterns.django._starting_pattern.source),X.push(this.__patterns.django_value._starting_pattern.source),X.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||X.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&X.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+X.join("|")+")")},G.prototype._read_template=function(){var X="",M=this._input.peek();if(M==="<"){var O=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&O==="?"&&(X=X||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&O==="%"&&(X=X||this.__patterns.erb.read())}else M==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(X=X||this.__patterns.handlebars_comment.read(),X=X||this.__patterns.handlebars_unescaped.read(),X=X||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(X=X||this.__patterns.django_value.read()),this._excluded.django||(X=X||this.__patterns.django_comment.read(),X=X||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(X=X||this.__patterns.smarty_comment.read(),X=X||this.__patterns.smarty_literal.read(),X=X||this.__patterns.smarty.read()));return X},P.exports.TemplatablePattern=G},,,,function(P,S,d){var w=d(19).Beautifier,y=d(20).Options;function G(X,M,O,Q){var he=new w(X,M,O,Q);return he.beautify()}P.exports=G,P.exports.defaultOptions=function(){return new y}},function(P,S,d){var w=d(20).Options,y=d(2).Output,G=d(21).Tokenizer,X=d(21).TOKEN,M=/\r\n|[\r\n]/,O=/\r\n|[\r\n]/g,Q=function(H,z){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=H.max_preserve_newlines,this.preserve_newlines=H.preserve_newlines,this._output=new y(H,z)};Q.prototype.current_line_has_match=function(H){return this._output.current_line.has_match(H)},Q.prototype.set_space_before_token=function(H,z){this._output.space_before_token=H,this._output.non_breaking_space=z},Q.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},Q.prototype.add_raw_token=function(H){this._output.add_raw_token(H)},Q.prototype.print_preserved_newlines=function(H){var z=0;H.type!==X.TEXT&&H.previous.type!==X.TEXT&&(z=H.newlines?1:0),this.preserve_newlines&&(z=H.newlines<this.max_preserve_newlines+1?H.newlines:this.max_preserve_newlines+1);for(var Z=0;Z<z;Z++)this.print_newline(Z>0);return z!==0},Q.prototype.traverse_whitespace=function(H){return H.whitespace_before||H.newlines?(this.print_preserved_newlines(H)||(this._output.space_before_token=!0),!0):!1},Q.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},Q.prototype.print_newline=function(H){this._output.add_new_line(H)},Q.prototype.print_token=function(H){H.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(H.text))},Q.prototype.indent=function(){this.indent_level++},Q.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},Q.prototype.get_full_indent=function(H){return H=this.indent_level+(H||0),H<1?"":this._output.get_indent_string(H)};var he=function(H){for(var z=null,Z=H.next;Z.type!==X.EOF&&H.closed!==Z;){if(Z.type===X.ATTRIBUTE&&Z.text==="type"){Z.next&&Z.next.type===X.EQUALS&&Z.next.next&&Z.next.next.type===X.VALUE&&(z=Z.next.next.text);break}Z=Z.next}return z},R=function(H,z){var Z=null,ee=null;return z.closed?(H==="script"?Z="text/javascript":H==="style"&&(Z="text/css"),Z=he(z)||Z,Z.search("text/css")>-1?ee="css":Z.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?ee="javascript":Z.search(/(text|application|dojo)\/(x-)?(html)/)>-1?ee="html":Z.search(/test\/null/)>-1&&(ee="null"),ee):null};function ve(H,z){return z.indexOf(H)!==-1}function Ce(H,z,Z){this.parent=H||null,this.tag=z?z.tag_name:"",this.indent_level=Z||0,this.parser_token=z||null}function ge(H){this._printer=H,this._current_frame=null}ge.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},ge.prototype.record_tag=function(H){var z=new Ce(this._current_frame,H,this._printer.indent_level);this._current_frame=z},ge.prototype._try_pop_frame=function(H){var z=null;return H&&(z=H.parser_token,this._printer.indent_level=H.indent_level,this._current_frame=H.parent),z},ge.prototype._get_frame=function(H,z){for(var Z=this._current_frame;Z&&H.indexOf(Z.tag)===-1;){if(z&&z.indexOf(Z.tag)!==-1){Z=null;break}Z=Z.parent}return Z},ge.prototype.try_pop=function(H,z){var Z=this._get_frame([H],z);return this._try_pop_frame(Z)},ge.prototype.indent_to_tag=function(H){var z=this._get_frame(H);z&&(this._printer.indent_level=z.indent_level)};function be(H,z,Z,ee){this._source_text=H||"",z=z||{},this._js_beautify=Z,this._css_beautify=ee,this._tag_stack=null;var me=new w(z,"html");this._options=me,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"}be.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var H=this._source_text,z=this._options.eol;this._options.eol==="auto"&&(z=`
`,H&&M.test(H)&&(z=H.match(M)[0])),H=H.replace(O,`
`);var Z=H.match(/^[\t ]*/)[0],ee={text:"",type:""},me=new Ne(this._options),ae=new Q(this._options,Z),x=new G(H,this._options).tokenize();this._tag_stack=new ge(ae);for(var A=null,N=x.next();N.type!==X.EOF;)N.type===X.TAG_OPEN||N.type===X.COMMENT?(A=this._handle_tag_open(ae,N,me,ee,x),me=A):N.type===X.ATTRIBUTE||N.type===X.EQUALS||N.type===X.VALUE||N.type===X.TEXT&&!me.tag_complete?A=this._handle_inside_tag(ae,N,me,ee):N.type===X.TAG_CLOSE?A=this._handle_tag_close(ae,N,me):N.type===X.TEXT?A=this._handle_text(ae,N,me):N.type===X.CONTROL_FLOW_OPEN?A=this._handle_control_flow_open(ae,N):N.type===X.CONTROL_FLOW_CLOSE?A=this._handle_control_flow_close(ae,N):ae.add_raw_token(N),ee=A,N=x.next();var de=ae._output.get_code(z);return de},be.prototype._handle_control_flow_open=function(H,z){var Z={text:z.text,type:z.type};return H.set_space_before_token(z.newlines||z.whitespace_before!=="",!0),z.newlines?H.print_preserved_newlines(z):H.set_space_before_token(z.newlines||z.whitespace_before!=="",!0),H.print_token(z),H.indent(),Z},be.prototype._handle_control_flow_close=function(H,z){var Z={text:z.text,type:z.type};return H.deindent(),z.newlines?H.print_preserved_newlines(z):H.set_space_before_token(z.newlines||z.whitespace_before!=="",!0),H.print_token(z),Z},be.prototype._handle_tag_close=function(H,z,Z){var ee={text:z.text,type:z.type};return H.alignment_size=0,Z.tag_complete=!0,H.set_space_before_token(z.newlines||z.whitespace_before!=="",!0),Z.is_unformatted?H.add_raw_token(z):(Z.tag_start_char==="<"&&(H.set_space_before_token(z.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&Z.has_wrapped_attrs&&H.print_newline(!1)),H.print_token(z)),Z.indent_content&&!(Z.is_unformatted||Z.is_content_unformatted)&&(H.indent(),Z.indent_content=!1),!Z.is_inline_element&&!(Z.is_unformatted||Z.is_content_unformatted)&&H.set_wrap_point(),ee},be.prototype._handle_inside_tag=function(H,z,Z,ee){var me=Z.has_wrapped_attrs,ae={text:z.text,type:z.type};return H.set_space_before_token(z.newlines||z.whitespace_before!=="",!0),Z.is_unformatted?H.add_raw_token(z):Z.tag_start_char==="{"&&z.type===X.TEXT?H.print_preserved_newlines(z)?(z.newlines=0,H.add_raw_token(z)):H.print_token(z):(z.type===X.ATTRIBUTE?H.set_space_before_token(!0):(z.type===X.EQUALS||z.type===X.VALUE&&z.previous.type===X.EQUALS)&&H.set_space_before_token(!1),z.type===X.ATTRIBUTE&&Z.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(H.traverse_whitespace(z),me=me||z.newlines!==0),this._is_wrap_attributes_force&&Z.attr_count>=this._options.wrap_attributes_min_attrs&&(ee.type!==X.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(H.print_newline(!1),me=!0)),H.print_token(z),me=me||H.previous_token_wrapped(),Z.has_wrapped_attrs=me),ae},be.prototype._handle_text=function(H,z,Z){var ee={text:z.text,type:"TK_CONTENT"};return Z.custom_beautifier_name?this._print_custom_beatifier_text(H,z,Z):Z.is_unformatted||Z.is_content_unformatted?H.add_raw_token(z):(H.traverse_whitespace(z),H.print_token(z)),ee},be.prototype._print_custom_beatifier_text=function(H,z,Z){var ee=this;if(z.text!==""){var me=z.text,ae,x=1,A="",N="";Z.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?ae=this._js_beautify:Z.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?ae=this._css_beautify:Z.custom_beautifier_name==="html"&&(ae=function(Dt,at){var it=new be(Dt,at,ee._js_beautify,ee._css_beautify);return it.beautify()}),this._options.indent_scripts==="keep"?x=0:this._options.indent_scripts==="separate"&&(x=-H.indent_level);var de=H.get_full_indent(x);if(me=me.replace(/\n[ \t]*$/,""),Z.custom_beautifier_name!=="html"&&me[0]==="<"&&me.match(/^(<!--|<!\[CDATA\[)/)){var We=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(me);if(!We){H.add_raw_token(z);return}A=de+We[1]+`
`,me=We[4],We[5]&&(N=de+We[5]),me=me.replace(/\n[ \t]*$/,""),(We[2]||We[3].indexOf(`
`)!==-1)&&(We=We[3].match(/[ \t]+$/),We&&(z.whitespace_before=We[0]))}if(me)if(ae){var qe=function(){this.eol=`
`};qe.prototype=this._options.raw_options;var Ge=new qe;me=ae(de+me,Ge)}else{var ot=z.whitespace_before;ot&&(me=me.replace(new RegExp(`
(`+ot+")?","g"),`
`)),me=de+me.replace(/\n/g,`
`+de)}A&&(me?me=A+me+`
`+N:me=A+N),H.print_newline(!1),me&&(z.text=me,z.whitespace_before="",z.newlines=0,H.add_raw_token(z),H.print_newline(!0))}},be.prototype._handle_tag_open=function(H,z,Z,ee,me){var ae=this._get_tag_open_token(z);if((Z.is_unformatted||Z.is_content_unformatted)&&!Z.is_empty_element&&z.type===X.TAG_OPEN&&!ae.is_start_tag?(H.add_raw_token(z),ae.start_tag_token=this._tag_stack.try_pop(ae.tag_name)):(H.traverse_whitespace(z),this._set_tag_position(H,z,ae,Z,ee),ae.is_inline_element||H.set_wrap_point(),H.print_token(z)),ae.is_start_tag&&this._is_wrap_attributes_force){var x=0,A;do A=me.peek(x),A.type===X.ATTRIBUTE&&(ae.attr_count+=1),x+=1;while(A.type!==X.EOF&&A.type!==X.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(ae.alignment_size=z.text.length+1),!ae.tag_complete&&!ae.is_unformatted&&(H.alignment_size=ae.alignment_size),ae};var Ne=function(H,z,Z){if(this.parent=z||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="",!Z)this.tag_complete=!0;else{var ee;this.tag_start_char=Z.text[0],this.text=Z.text,this.tag_start_char==="<"?(ee=Z.text.match(/^<([^\s>]*)/),this.tag_check=ee?ee[1]:""):(ee=Z.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=ee?ee[1]:"",(Z.text.startsWith("{{#>")||Z.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&Z.next!==null?this.tag_check=Z.next.text.split(" ")[0]:this.tag_check=Z.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),Z.type===X.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||Z.closed&&Z.closed.text==="/>";var me=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(me=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!H.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(me)))}};be.prototype._get_tag_open_token=function(H){var z=new Ne(this._options,this._tag_stack.get_parser_token(),H);return z.alignment_size=this._options.wrap_attributes_indent_size,z.is_end_tag=z.is_end_tag||ve(z.tag_check,this._options.void_elements),z.is_empty_element=z.tag_complete||z.is_start_tag&&z.is_end_tag,z.is_unformatted=!z.tag_complete&&ve(z.tag_check,this._options.unformatted),z.is_content_unformatted=!z.is_empty_element&&ve(z.tag_check,this._options.content_unformatted),z.is_inline_element=ve(z.tag_name,this._options.inline)||this._options.inline_custom_elements&&z.tag_name.includes("-")||z.tag_start_char==="{",z},be.prototype._set_tag_position=function(H,z,Z,ee,me){if(Z.is_empty_element||(Z.is_end_tag?Z.start_tag_token=this._tag_stack.try_pop(Z.tag_name):(this._do_optional_end_element(Z)&&(Z.is_inline_element||H.print_newline(!1)),this._tag_stack.record_tag(Z),(Z.tag_name==="script"||Z.tag_name==="style")&&!(Z.is_unformatted||Z.is_content_unformatted)&&(Z.custom_beautifier_name=R(Z.tag_check,z)))),ve(Z.tag_check,this._options.extra_liners)&&(H.print_newline(!1),H._output.just_added_blankline()||H.print_newline(!0)),Z.is_empty_element){if(Z.tag_start_char==="{"&&Z.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),Z.indent_content=!0;var ae=H.current_line_has_match(/{{#if/);ae||H.print_newline(!1)}Z.tag_name==="!--"&&me.type===X.TAG_CLOSE&&ee.is_end_tag&&Z.text.indexOf(`
`)===-1||(Z.is_inline_element||Z.is_unformatted||H.print_newline(!1),this._calcluate_parent_multiline(H,Z))}else if(Z.is_end_tag){var x=!1;x=Z.start_tag_token&&Z.start_tag_token.multiline_content,x=x||!Z.is_inline_element&&!(ee.is_inline_element||ee.is_unformatted)&&!(me.type===X.TAG_CLOSE&&Z.start_tag_token===ee)&&me.type!=="TK_CONTENT",(Z.is_content_unformatted||Z.is_unformatted)&&(x=!1),x&&H.print_newline(!1)}else Z.indent_content=!Z.custom_beautifier_name,Z.tag_start_char==="<"&&(Z.tag_name==="html"?Z.indent_content=this._options.indent_inner_html:Z.tag_name==="head"?Z.indent_content=this._options.indent_head_inner_html:Z.tag_name==="body"&&(Z.indent_content=this._options.indent_body_inner_html)),!(Z.is_inline_element||Z.is_unformatted)&&(me.type!=="TK_CONTENT"||Z.is_content_unformatted)&&H.print_newline(!1),this._calcluate_parent_multiline(H,Z)},be.prototype._calcluate_parent_multiline=function(H,z){z.parent&&H._output.just_added_newline()&&!((z.is_inline_element||z.is_unformatted)&&z.parent.is_inline_element)&&(z.parent.multiline_content=!0)};var Ie=["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"],je=["a","audio","del","ins","map","noscript","video"];be.prototype._do_optional_end_element=function(H){var z=null;if(!(H.is_empty_element||!H.is_start_tag||!H.parent)){if(H.tag_name==="body")z=z||this._tag_stack.try_pop("head");else if(H.tag_name==="li")z=z||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(H.tag_name==="dd"||H.tag_name==="dt")z=z||this._tag_stack.try_pop("dt",["dl"]),z=z||this._tag_stack.try_pop("dd",["dl"]);else if(H.parent.tag_name==="p"&&Ie.indexOf(H.tag_name)!==-1){var Z=H.parent.parent;(!Z||je.indexOf(Z.tag_name)===-1)&&(z=z||this._tag_stack.try_pop("p"))}else H.tag_name==="rp"||H.tag_name==="rt"?(z=z||this._tag_stack.try_pop("rt",["ruby","rtc"]),z=z||this._tag_stack.try_pop("rp",["ruby","rtc"])):H.tag_name==="optgroup"?z=z||this._tag_stack.try_pop("optgroup",["select"]):H.tag_name==="option"?z=z||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):H.tag_name==="colgroup"?z=z||this._tag_stack.try_pop("caption",["table"]):H.tag_name==="thead"?(z=z||this._tag_stack.try_pop("caption",["table"]),z=z||this._tag_stack.try_pop("colgroup",["table"])):H.tag_name==="tbody"||H.tag_name==="tfoot"?(z=z||this._tag_stack.try_pop("caption",["table"]),z=z||this._tag_stack.try_pop("colgroup",["table"]),z=z||this._tag_stack.try_pop("thead",["table"]),z=z||this._tag_stack.try_pop("tbody",["table"])):H.tag_name==="tr"?(z=z||this._tag_stack.try_pop("caption",["table"]),z=z||this._tag_stack.try_pop("colgroup",["table"]),z=z||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(H.tag_name==="th"||H.tag_name==="td")&&(z=z||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),z=z||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return H.parent=this._tag_stack.get_parser_token(),z}},P.exports.Beautifier=be},function(P,S,d){var w=d(6).Options;function y(G){w.call(this,G,"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"])}y.prototype=new w,P.exports.Options=y},function(P,S,d){var w=d(9).Tokenizer,y=d(9).TOKEN,G=d(13).Directives,X=d(14).TemplatablePattern,M=d(12).Pattern,O={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:y.START,RAW:y.RAW,EOF:y.EOF},Q=new G(/<\!--/,/-->/),he=function(R,ve){w.call(this,R,ve),this._current_tag_name="";var Ce=new X(this._input).read_options(this._options),ge=new M(this._input);if(this.__patterns={word:Ce.until(/[\n\r\t <]/),word_control_flow_close_excluded:Ce.until(/[\n\r\t <}]/),single_quote:Ce.until_after(/'/),double_quote:Ce.until_after(/"/),attribute:Ce.until(/[\n\r\t =>]|\/>/),element_name:Ce.until(/[\n\r\t >\/]/),angular_control_flow_start:ge.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:ge.starting_with(/{{!--/).until_after(/--}}/),handlebars:ge.starting_with(/{{/).until_after(/}}/),handlebars_open:ge.until(/[\n\r\t }]/),handlebars_raw_close:ge.until(/}}/),comment:ge.starting_with(/<!--/).until_after(/-->/),cdata:ge.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:ge.starting_with(/<!\[/).until_after(/]>/),processing:ge.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 be=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=ge.matching(be).until_after(be)}};he.prototype=new w,he.prototype._is_comment=function(R){return!1},he.prototype._is_opening=function(R){return R.type===O.TAG_OPEN||R.type===O.CONTROL_FLOW_OPEN},he.prototype._is_closing=function(R,ve){return R.type===O.TAG_CLOSE&&ve&&((R.text===">"||R.text==="/>")&&ve.text[0]==="<"||R.text==="}}"&&ve.text[0]==="{"&&ve.text[1]==="{")||R.type===O.CONTROL_FLOW_CLOSE&&R.text==="}"&&ve.text.endsWith("{")},he.prototype._reset=function(){this._current_tag_name=""},he.prototype._get_next_token=function(R,ve){var Ce=null;this._readWhitespace();var ge=this._input.peek();return ge===null?this._create_token(O.EOF,""):(Ce=Ce||this._read_open_handlebars(ge,ve),Ce=Ce||this._read_attribute(ge,R,ve),Ce=Ce||this._read_close(ge,ve),Ce=Ce||this._read_script_and_style(ge,R),Ce=Ce||this._read_control_flows(ge,ve),Ce=Ce||this._read_raw_content(ge,R,ve),Ce=Ce||this._read_content_word(ge,ve),Ce=Ce||this._read_comment_or_cdata(ge),Ce=Ce||this._read_processing(ge),Ce=Ce||this._read_open(ge,ve),Ce=Ce||this._create_token(O.UNKNOWN,this._input.next()),Ce)},he.prototype._read_comment_or_cdata=function(R){var ve=null,Ce=null,ge=null;if(R==="<"){var be=this._input.peek(1);be==="!"&&(Ce=this.__patterns.comment.read(),Ce?(ge=Q.get_directives(Ce),ge&&ge.ignore==="start"&&(Ce+=Q.readIgnored(this._input))):Ce=this.__patterns.cdata.read()),Ce&&(ve=this._create_token(O.COMMENT,Ce),ve.directives=ge)}return ve},he.prototype._read_processing=function(R){var ve=null,Ce=null,ge=null;if(R==="<"){var be=this._input.peek(1);(be==="!"||be==="?")&&(Ce=this.__patterns.conditional_comment.read(),Ce=Ce||this.__patterns.processing.read()),Ce&&(ve=this._create_token(O.COMMENT,Ce),ve.directives=ge)}return ve},he.prototype._read_open=function(R,ve){var Ce=null,ge=null;return(!ve||ve.type===O.CONTROL_FLOW_OPEN)&&R==="<"&&(Ce=this._input.next(),this._input.peek()==="/"&&(Ce+=this._input.next()),Ce+=this.__patterns.element_name.read(),ge=this._create_token(O.TAG_OPEN,Ce)),ge},he.prototype._read_open_handlebars=function(R,ve){var Ce=null,ge=null;return(!ve||ve.type===O.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&R==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(Ce=this.__patterns.handlebars_comment.read(),Ce=Ce||this.__patterns.handlebars.read(),ge=this._create_token(O.COMMENT,Ce)):(Ce=this.__patterns.handlebars_open.read(),ge=this._create_token(O.TAG_OPEN,Ce))),ge},he.prototype._read_control_flows=function(R,ve){var Ce="",ge=null;if(!this._options.templating.includes("angular"))return ge;if(R==="@"){if(Ce=this.__patterns.angular_control_flow_start.read(),Ce==="")return ge;for(var be=Ce.endsWith("(")?1:0,Ne=0;!(Ce.endsWith("{")&&be===Ne);){var Ie=this._input.next();if(Ie===null)break;Ie==="("?be++:Ie===")"&&Ne++,Ce+=Ie}ge=this._create_token(O.CONTROL_FLOW_OPEN,Ce)}else R==="}"&&ve&&ve.type===O.CONTROL_FLOW_OPEN&&(Ce=this._input.next(),ge=this._create_token(O.CONTROL_FLOW_CLOSE,Ce));return ge},he.prototype._read_close=function(R,ve){var Ce=null,ge=null;return ve&&ve.type===O.TAG_OPEN&&(ve.text[0]==="<"&&(R===">"||R==="/"&&this._input.peek(1)===">")?(Ce=this._input.next(),R==="/"&&(Ce+=this._input.next()),ge=this._create_token(O.TAG_CLOSE,Ce)):ve.text[0]==="{"&&R==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),ge=this._create_token(O.TAG_CLOSE,"}}"))),ge},he.prototype._read_attribute=function(R,ve,Ce){var ge=null,be="";if(Ce&&Ce.text[0]==="<")if(R==="=")ge=this._create_token(O.EQUALS,this._input.next());else if(R==='"'||R==="'"){var Ne=this._input.next();R==='"'?Ne+=this.__patterns.double_quote.read():Ne+=this.__patterns.single_quote.read(),ge=this._create_token(O.VALUE,Ne)}else be=this.__patterns.attribute.read(),be&&(ve.type===O.EQUALS?ge=this._create_token(O.VALUE,be):ge=this._create_token(O.ATTRIBUTE,be));return ge},he.prototype._is_content_unformatted=function(R){return this._options.void_elements.indexOf(R)===-1&&(this._options.content_unformatted.indexOf(R)!==-1||this._options.unformatted.indexOf(R)!==-1)},he.prototype._read_raw_content=function(R,ve,Ce){var ge="";if(Ce&&Ce.text[0]==="{")ge=this.__patterns.handlebars_raw_close.read();else if(ve.type===O.TAG_CLOSE&&ve.opened.text[0]==="<"&&ve.text[0]!=="/"){var be=ve.opened.text.substr(1).toLowerCase();this._is_content_unformatted(be)&&(ge=this._input.readUntil(new RegExp("</"+be+"[\\n\\r\\t ]*?>","ig")))}return ge?this._create_token(O.TEXT,ge):null},he.prototype._read_script_and_style=function(R,ve){if(ve.type===O.TAG_CLOSE&&ve.opened.text[0]==="<"&&ve.text[0]!=="/"){var Ce=ve.opened.text.substr(1).toLowerCase();if(Ce==="script"||Ce==="style"){var ge=this._read_comment_or_cdata(R);if(ge)return ge.type=O.TEXT,ge;var be=this._input.readUntil(new RegExp("</"+Ce+"[\\n\\r\\t ]*?>","ig"));if(be)return this._create_token(O.TEXT,be)}}return null},he.prototype._read_content_word=function(R,ve){var Ce="";return this._options.unformatted_content_delimiter&&R===this._options.unformatted_content_delimiter[0]&&(Ce=this.__patterns.unformatted_content_delimiter.read()),Ce||(Ce=ve&&ve.type===O.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),Ce?this._create_token(O.TEXT,Ce):null},P.exports.Tokenizer=he,P.exports.TOKEN=O}],Te={};function l(P){var S=Te[P];if(S!==void 0)return S.exports;var d=Te[P]={exports:{}};return Fe[P](d,d.exports,l),d.exports}var Y=l(18);He=Y})();var ke=He;if(1)V=[ie,ie(58553),ie(87804)],Ae=function(Fe){var Te=ie(58553),l=ie(87804);return{html_beautify:function(Y,P){return ke(Y,P,Te.js_beautify,l.css_beautify)}}}.apply(ut,V),Ae!==void 0&&(Nt.exports=Ae);else var $e,ue})()},58553:function(Nt,ut){var ie,V;(function(){var Ae;(function(){"use strict";var ke=[function(Te,l,Y){var P=Y(1).Beautifier,S=Y(5).Options;function d(w,y){var G=new P(w,y);return G.beautify()}Te.exports=d,Te.exports.defaultOptions=function(){return new S}},function(Te,l,Y){var P=Y(2).Output,S=Y(3).Token,d=Y(4),w=Y(5).Options,y=Y(7).Tokenizer,G=Y(7).line_starters,X=Y(7).positionable_operators,M=Y(7).TOKEN;function O(A,N){return N.indexOf(A)!==-1}function Q(A){return A.replace(/^\s+/g,"")}function he(A){for(var N={},de=0;de<A.length;de++)N[A[de].replace(/-/g,"_")]=A[de];return N}function R(A,N){return A&&A.type===M.RESERVED&&A.text===N}function ve(A,N){return A&&A.type===M.RESERVED&&O(A.text,N)}var Ce=["case","return","do","if","throw","else","await","break","continue","async"],ge=["before-newline","after-newline","preserve-newline"],be=he(ge),Ne=[be.before_newline,be.preserve_newline],Ie={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function je(A,N){N.multiline_frame||N.mode===Ie.ForInitializer||N.mode===Ie.Conditional||A.remove_indent(N.start_line_index)}function H(A){A=A.replace(d.allLineBreaks,`
`);for(var N=[],de=A.indexOf(`
`);de!==-1;)N.push(A.substring(0,de)),A=A.substring(de+1),de=A.indexOf(`
`);return A.length&&N.push(A),N}function z(A){return A===Ie.ArrayLiteral}function Z(A){return O(A,[Ie.Expression,Ie.ForInitializer,Ie.Conditional])}function ee(A,N){for(var de=0;de<A.length;de++){var We=A[de].trim();if(We.charAt(0)!==N)return!1}return!0}function me(A,N){for(var de=0,We=A.length,qe;de<We;de++)if(qe=A[de],qe&&qe.indexOf(N)!==0)return!1;return!0}function ae(A,N){N=N||{},this._source_text=A||"",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 w(N)}ae.prototype.create_flags=function(A,N){var de=0;A&&(de=A.indentation_level,!this._output.just_added_newline()&&A.line_indent_level>de&&(de=A.line_indent_level));var We={mode:N,parent:A,last_token:A?A.last_token:new S(M.START_BLOCK,""),last_word:A?A.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:de,alignment:0,line_indent_level:A?A.line_indent_level:de,start_line_index:this._output.get_line_number(),ternary_depth:0};return We},ae.prototype._reset=function(A){var N=A.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new P(this._options,N),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(Ie.BlockStatement);var de=new y(A,this._options);return this._tokens=de.tokenize(),A},ae.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var A,N=this._reset(this._source_text),de=this._options.eol;this._options.eol==="auto"&&(de=`
`,N&&d.lineBreak.test(N||"")&&(de=N.match(d.lineBreak)[0]));for(var We=this._tokens.next();We;)this.handle_token(We),this._last_last_text=this._flags.last_token.text,this._flags.last_token=We,We=this._tokens.next();return A=this._output.get_code(de),A},ae.prototype.handle_token=function(A,N){A.type===M.START_EXPR?this.handle_start_expr(A):A.type===M.END_EXPR?this.handle_end_expr(A):A.type===M.START_BLOCK?this.handle_start_block(A):A.type===M.END_BLOCK?this.handle_end_block(A):A.type===M.WORD?this.handle_word(A):A.type===M.RESERVED?this.handle_word(A):A.type===M.SEMICOLON?this.handle_semicolon(A):A.type===M.STRING?this.handle_string(A):A.type===M.EQUALS?this.handle_equals(A):A.type===M.OPERATOR?this.handle_operator(A):A.type===M.COMMA?this.handle_comma(A):A.type===M.BLOCK_COMMENT?this.handle_block_comment(A,N):A.type===M.COMMENT?this.handle_comment(A,N):A.type===M.DOT?this.handle_dot(A):A.type===M.EOF?this.handle_eof(A):A.type===M.UNKNOWN?this.handle_unknown(A,N):this.handle_unknown(A,N)},ae.prototype.handle_whitespace_and_comments=function(A,N){var de=A.newlines,We=this._options.keep_array_indentation&&z(this._flags.mode);if(A.comments_before)for(var qe=A.comments_before.next();qe;)this.handle_whitespace_and_comments(qe,N),this.handle_token(qe,N),qe=A.comments_before.next();if(We)for(var Ge=0;Ge<de;Ge+=1)this.print_newline(Ge>0,N);else if(this._options.max_preserve_newlines&&de>this._options.max_preserve_newlines&&(de=this._options.max_preserve_newlines),this._options.preserve_newlines&&de>1){this.print_newline(!1,N);for(var ot=1;ot<de;ot+=1)this.print_newline(!0,N)}};var x=["async","break","continue","return","throw","yield"];ae.prototype.allow_wrap_or_preserved_newline=function(A,N){if(N=N===void 0?!1:N,!this._output.just_added_newline()){var de=this._options.preserve_newlines&&A.newlines||N,We=O(this._flags.last_token.text,X)||O(A.text,X);if(We){var qe=O(this._flags.last_token.text,X)&&O(this._options.operator_position,Ne)||O(A.text,X);de=de&&qe}if(de)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(ve(this._flags.last_token,x))return;this._output.set_wrap_point()}}},ae.prototype.print_newline=function(A,N){if(!N&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==M.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var de=this._tokens.peek();this._flags.mode===Ie.Statement&&!(this._flags.if_block&&R(de,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(A)&&(this._flags.multiline_frame=!0)},ae.prototype.print_token_line_indentation=function(A){this._output.just_added_newline()&&(this._options.keep_array_indentation&&A.newlines&&(A.text==="["||z(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(A.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))},ae.prototype.print_token=function(A){if(this._output.raw){this._output.add_raw_token(A);return}if(this._options.comma_first&&A.previous&&A.previous.type===M.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var N=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(N),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(A),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(A),this._output.non_breaking_space=!0,this._output.add_token(A.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},ae.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},ae.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))},ae.prototype.set_mode=function(A){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,A),this._flags=this.create_flags(this._previous_flags,A),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},ae.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===Ie.Statement&&je(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},ae.prototype.start_of_object_property=function(){return this._flags.parent.mode===Ie.ObjectLiteral&&this._flags.mode===Ie.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||ve(this._flags.last_token,["get","set"]))},ae.prototype.start_of_statement=function(A){var N=!1;return N=N||ve(this._flags.last_token,["var","let","const"])&&A.type===M.WORD,N=N||R(this._flags.last_token,"do"),N=N||!(this._flags.parent.mode===Ie.ObjectLiteral&&this._flags.mode===Ie.Statement)&&ve(this._flags.last_token,x)&&!A.newlines,N=N||R(this._flags.last_token,"else")&&!(R(A,"if")&&!A.comments_before),N=N||this._flags.last_token.type===M.END_EXPR&&(this._previous_flags.mode===Ie.ForInitializer||this._previous_flags.mode===Ie.Conditional),N=N||this._flags.last_token.type===M.WORD&&this._flags.mode===Ie.BlockStatement&&!this._flags.in_case&&!(A.text==="--"||A.text==="++")&&this._last_last_text!=="function"&&A.type!==M.WORD&&A.type!==M.RESERVED,N=N||this._flags.mode===Ie.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||ve(this._flags.last_token,["get","set"])),N?(this.set_mode(Ie.Statement),this.indent(),this.handle_whitespace_and_comments(A,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(A,ve(A,["do","for","if","while"])),!0):!1},ae.prototype.handle_start_expr=function(A){this.start_of_statement(A)||this.handle_whitespace_and_comments(A);var N=Ie.Expression;if(A.text==="["){if(this._flags.last_token.type===M.WORD||this._flags.last_token.text===")"){ve(this._flags.last_token,G)&&(this._output.space_before_token=!0),this.print_token(A),this.set_mode(N),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}N=Ie.ArrayLiteral,z(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()),O(this._flags.last_token.type,[M.START_EXPR,M.END_EXPR,M.WORD,M.OPERATOR,M.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===M.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,N=Ie.ForInitializer):O(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,N=Ie.Conditional):O(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&A.whitespace_before===""?this._output.space_before_token=!1:(O(this._flags.last_token.text,G)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===M.EQUALS||this._flags.last_token.type===M.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(A);else if(this._flags.last_token.type===M.WORD){this._output.space_before_token=!1;var de=this._tokens.peek(-3);if(this._options.space_after_named_function&&de){var We=this._tokens.peek(-4);ve(de,["async","function"])||de.text==="*"&&ve(We,["async","function"])?this._output.space_before_token=!0:this._flags.mode===Ie.ObjectLiteral?(de.text==="{"||de.text===","||de.text==="*"&&(We.text==="{"||We.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(A);(this._flags.last_token.type===M.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(O(this._last_last_text,["function","yield"])||this._flags.mode===Ie.ObjectLiteral&&O(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===M.START_BLOCK?this.print_newline():(this._flags.last_token.type===M.END_EXPR||this._flags.last_token.type===M.START_EXPR||this._flags.last_token.type===M.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===M.COMMA)&&this.allow_wrap_or_preserved_newline(A,A.newlines),this.print_token(A),this.set_mode(N),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},ae.prototype.handle_end_expr=function(A){for(;this._flags.mode===Ie.Statement;)this.restore_mode();this.handle_whitespace_and_comments(A),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(A,A.text==="]"&&z(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===M.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(A),this.restore_mode(),je(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===Ie.Conditional&&(this._previous_flags.mode=Ie.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},ae.prototype.handle_start_block=function(A){this.handle_whitespace_and_comments(A);var N=this._tokens.peek(),de=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===M.END_EXPR?(this.set_mode(Ie.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(Ie.BlockStatement):de&&(O(de.text,[":",","])&&O(N.type,[M.STRING,M.WORD,M.RESERVED])||O(N.text,["get","set","..."])&&O(de.type,[M.WORD,M.RESERVED]))?O(this._last_last_text,["class","interface"])&&!O(de.text,[":",","])?this.set_mode(Ie.BlockStatement):this.set_mode(Ie.ObjectLiteral):this._flags.last_token.type===M.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(Ie.BlockStatement):O(this._flags.last_token.type,[M.EQUALS,M.START_EXPR,M.COMMA,M.OPERATOR])||ve(this._flags.last_token,["return","throw","import","default"])?this.set_mode(Ie.ObjectLiteral):this.set_mode(Ie.BlockStatement),this._flags.last_token&&ve(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var We=!N.comments_before&&N.text==="}",qe=We&&this._flags.last_word==="function"&&this._flags.last_token.type===M.END_EXPR;if(this._options.brace_preserve_inline){var Ge=0,ot=null;this._flags.inline_frame=!0;do if(Ge+=1,ot=this._tokens.peek(Ge-1),ot.newlines){this._flags.inline_frame=!1;break}while(ot.type!==M.EOF&&!(ot.type===M.END_BLOCK&&ot.opened===A))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&A.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==M.OPERATOR&&(qe||this._flags.last_token.type===M.EQUALS||ve(this._flags.last_token,Ce)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(z(this._previous_flags.mode)&&(this._flags.last_token.type===M.START_EXPR||this._flags.last_token.type===M.COMMA)&&((this._flags.last_token.type===M.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===M.COMMA||this._flags.last_token.type===M.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(A),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==M.OPERATOR&&this._flags.last_token.type!==M.START_EXPR&&(O(this._flags.last_token.type,[M.START_BLOCK,M.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(A),this.indent(),!We&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},ae.prototype.handle_end_block=function(A){for(this.handle_whitespace_and_comments(A);this._flags.mode===Ie.Statement;)this.restore_mode();var N=this._flags.last_token.type===M.START_BLOCK;this._flags.inline_frame&&!N?this._output.space_before_token=!0:this._options.brace_style==="expand"?N||this.print_newline():N||(z(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(A)},ae.prototype.handle_word=function(A){if(A.type===M.RESERVED){if(O(A.text,["set","get"])&&this._flags.mode!==Ie.ObjectLiteral)A.type=M.WORD;else if(A.text==="import"&&O(this._tokens.peek().text,["(","."]))A.type=M.WORD;else if(O(A.text,["as","from"])&&!this._flags.import_block)A.type=M.WORD;else if(this._flags.mode===Ie.ObjectLiteral){var N=this._tokens.peek();N.text===":"&&(A.type=M.WORD)}}if(this.start_of_statement(A)?ve(this._flags.last_token,["var","let","const"])&&A.type===M.WORD&&(this._flags.declaration_statement=!0):A.newlines&&!Z(this._flags.mode)&&(this._flags.last_token.type!==M.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==M.EQUALS&&(this._options.preserve_newlines||!ve(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(A),this.print_newline()):this.handle_whitespace_and_comments(A),this._flags.do_block&&!this._flags.do_while)if(R(A,"while")){this._output.space_before_token=!0,this.print_token(A),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&&R(A,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===Ie.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&ve(A,["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(A),this._flags.in_case=!0;return}if((this._flags.last_token.type===M.COMMA||this._flags.last_token.type===M.START_EXPR||this._flags.last_token.type===M.EQUALS||this._flags.last_token.type===M.OPERATOR)&&!this.start_of_object_property()&&!(O(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===Ie.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(A),R(A,"function")){(O(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(O(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===M.OPERATOR))&&!this._output.just_added_blankline()&&!A.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===M.RESERVED||this._flags.last_token.type===M.WORD?ve(this._flags.last_token,["get","set","new","export"])||ve(this._flags.last_token,x)?this._output.space_before_token=!0:R(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===M.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(Z(this._flags.mode)||z(this._flags.mode))||this.print_newline(),this.print_token(A),this._flags.last_word=A.text;return}var de="NONE";if(this._flags.last_token.type===M.END_BLOCK?this._previous_flags.inline_frame?de="SPACE":ve(A,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&A.newlines?de="NEWLINE":(de="SPACE",this._output.space_before_token=!0):de="NEWLINE":this._flags.last_token.type===M.SEMICOLON&&this._flags.mode===Ie.BlockStatement?de="NEWLINE":this._flags.last_token.type===M.SEMICOLON&&Z(this._flags.mode)?de="SPACE":this._flags.last_token.type===M.STRING?de="NEWLINE":this._flags.last_token.type===M.RESERVED||this._flags.last_token.type===M.WORD||this._flags.last_token.text==="*"&&(O(this._last_last_text,["function","yield"])||this._flags.mode===Ie.ObjectLiteral&&O(this._last_last_text,["{",","]))?de="SPACE":this._flags.last_token.type===M.START_BLOCK?this._flags.inline_frame?de="SPACE":de="NEWLINE":this._flags.last_token.type===M.END_EXPR&&(this._output.space_before_token=!0,de="NEWLINE"),ve(A,G)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?de="SPACE":de="NEWLINE"),ve(A,["else","catch","finally"]))if((!(this._flags.last_token.type===M.END_BLOCK&&this._previous_flags.mode===Ie.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&A.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var We=this._output.current_line;We.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else de==="NEWLINE"?ve(this._flags.last_token,Ce)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&ve(A,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==M.END_EXPR?(this._flags.last_token.type!==M.START_EXPR||!ve(A,["var","let","const"]))&&this._flags.last_token.text!==":"&&(R(A,"if")&&R(A.previous,"else")?this._output.space_before_token=!0:this.print_newline()):ve(A,G)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&z(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():de==="SPACE"&&(this._output.space_before_token=!0);A.previous&&(A.previous.type===M.WORD||A.previous.type===M.RESERVED)&&(this._output.space_before_token=!0),this.print_token(A),this._flags.last_word=A.text,A.type===M.RESERVED&&(A.text==="do"?this._flags.do_block=!0:A.text==="if"?this._flags.if_block=!0:A.text==="import"?this._flags.import_block=!0:this._flags.import_block&&R(A,"from")&&(this._flags.import_block=!1))},ae.prototype.handle_semicolon=function(A){this.start_of_statement(A)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(A);for(var N=this._tokens.peek();this._flags.mode===Ie.Statement&&!(this._flags.if_block&&R(N,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(A)},ae.prototype.handle_string=function(A){A.text.startsWith("`")&&A.newlines===0&&A.whitespace_before===""&&(A.previous.text===")"||this._flags.last_token.type===M.WORD)||(this.start_of_statement(A)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(A),this._flags.last_token.type===M.RESERVED||this._flags.last_token.type===M.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===M.COMMA||this._flags.last_token.type===M.START_EXPR||this._flags.last_token.type===M.EQUALS||this._flags.last_token.type===M.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(A):A.text.startsWith("`")&&this._flags.last_token.type===M.END_EXPR&&(A.previous.text==="]"||A.previous.text===")")&&A.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(A)},ae.prototype.handle_equals=function(A){this.start_of_statement(A)||this.handle_whitespace_and_comments(A),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(A),this._output.space_before_token=!0},ae.prototype.handle_comma=function(A){this.handle_whitespace_and_comments(A,!0),this.print_token(A),this._output.space_before_token=!0,this._flags.declaration_statement?(Z(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(A)):this._flags.mode===Ie.ObjectLiteral||this._flags.mode===Ie.Statement&&this._flags.parent.mode===Ie.ObjectLiteral?(this._flags.mode===Ie.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(A)},ae.prototype.handle_operator=function(A){var N=A.text==="*"&&(ve(this._flags.last_token,["function","yield"])||O(this._flags.last_token.type,[M.START_BLOCK,M.COMMA,M.END_BLOCK,M.SEMICOLON])),de=O(A.text,["-","+"])&&(O(this._flags.last_token.type,[M.START_BLOCK,M.START_EXPR,M.EQUALS,M.OPERATOR])||O(this._flags.last_token.text,G)||this._flags.last_token.text===",");if(!this.start_of_statement(A)){var We=!N;this.handle_whitespace_and_comments(A,We)}if(A.text==="*"&&this._flags.last_token.type===M.DOT){this.print_token(A);return}if(A.text==="::"){this.print_token(A);return}if(O(A.text,["-","+"])&&this.start_of_object_property()){this.print_token(A);return}if(this._flags.last_token.type===M.OPERATOR&&O(this._options.operator_position,Ne)&&this.allow_wrap_or_preserved_newline(A),A.text===":"&&this._flags.in_case){this.print_token(A),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==M.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 qe=!0,Ge=!0,ot=!1;if(A.text===":"?this._flags.ternary_depth===0?qe=!1:(this._flags.ternary_depth-=1,ot=!0):A.text==="?"&&(this._flags.ternary_depth+=1),!de&&!N&&this._options.preserve_newlines&&O(A.text,X)){var Dt=A.text===":",at=Dt&&ot,it=Dt&&!ot;switch(this._options.operator_position){case be.before_newline:this._output.space_before_token=!it,this.print_token(A),(!Dt||at)&&this.allow_wrap_or_preserved_newline(A),this._output.space_before_token=!0;return;case be.after_newline:this._output.space_before_token=!0,!Dt||at?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(A):this._output.space_before_token=!1,this.print_token(A),this._output.space_before_token=!0;return;case be.preserve_newline:it||this.allow_wrap_or_preserved_newline(A),qe=!(this._output.just_added_newline()||it),this._output.space_before_token=qe,this.print_token(A),this._output.space_before_token=!0;return}}if(N){this.allow_wrap_or_preserved_newline(A),qe=!1;var Lt=this._tokens.peek();Ge=Lt&&O(Lt.type,[M.WORD,M.RESERVED])}else if(A.text==="...")this.allow_wrap_or_preserved_newline(A),qe=this._flags.last_token.type===M.START_BLOCK,Ge=!1;else if(O(A.text,["--","++","!","~"])||de){if((this._flags.last_token.type===M.COMMA||this._flags.last_token.type===M.START_EXPR)&&this.allow_wrap_or_preserved_newline(A),qe=!1,Ge=!1,A.newlines&&(A.text==="--"||A.text==="++"||A.text==="~")){var jt=ve(this._flags.last_token,Ce)&&A.newlines;jt&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(jt,!0)}this._flags.last_token.text===";"&&Z(this._flags.mode)&&(qe=!0),this._flags.last_token.type===M.RESERVED?qe=!0:this._flags.last_token.type===M.END_EXPR?qe=!(this._flags.last_token.text==="]"&&(A.text==="--"||A.text==="++")):this._flags.last_token.type===M.OPERATOR&&(qe=O(A.text,["--","-","++","+"])&&O(this._flags.last_token.text,["--","-","++","+"]),O(A.text,["+","-"])&&O(this._flags.last_token.text,["--","++"])&&(Ge=!0)),(this._flags.mode===Ie.BlockStatement&&!this._flags.inline_frame||this._flags.mode===Ie.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||qe,this.print_token(A),this._output.space_before_token=Ge},ae.prototype.handle_block_comment=function(A,N){if(this._output.raw){this._output.add_raw_token(A),A.directives&&A.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(A.directives){this.print_newline(!1,N),this.print_token(A),A.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!d.newline.test(A.text)&&!A.newlines){this._output.space_before_token=!0,this.print_token(A),this._output.space_before_token=!0;return}else this.print_block_commment(A,N)},ae.prototype.print_block_commment=function(A,N){var de=H(A.text),We,qe=!1,Ge=!1,ot=A.whitespace_before,Dt=ot.length;if(this.print_newline(!1,N),this.print_token_line_indentation(A),this._output.add_token(de[0]),this.print_newline(!1,N),de.length>1){for(de=de.slice(1),qe=ee(de,"*"),Ge=me(de,ot),qe&&(this._flags.alignment=1),We=0;We<de.length;We++)qe?(this.print_token_line_indentation(A),this._output.add_token(Q(de[We]))):Ge&&de[We]?(this.print_token_line_indentation(A),this._output.add_token(de[We].substring(Dt))):(this._output.current_line.set_indent(-1),this._output.add_token(de[We])),this.print_newline(!1,N);this._flags.alignment=0}},ae.prototype.handle_comment=function(A,N){A.newlines?this.print_newline(!1,N):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(A),this.print_newline(!1,N)},ae.prototype.handle_dot=function(A){this.start_of_statement(A)||this.handle_whitespace_and_comments(A,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),ve(this._flags.last_token,Ce)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(A,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(A)},ae.prototype.handle_unknown=function(A,N){this.print_token(A),A.text[A.text.length-1]===`
`&&this.print_newline(!1,N)},ae.prototype.handle_eof=function(A){for(;this._flags.mode===Ie.Statement;)this.restore_mode();this.handle_whitespace_and_comments(A)},Te.exports.Beautifier=ae},function(Te){function l(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=[]}l.prototype.clone_empty=function(){var S=new l(this.__parent);return S.set_indent(this.__indent_count,this.__alignment_count),S},l.prototype.item=function(S){return S<0?this.__items[this.__items.length+S]:this.__items[S]},l.prototype.has_match=function(S){for(var d=this.__items.length-1;d>=0;d--)if(this.__items[d].match(S))return!0;return!1},l.prototype.set_indent=function(S,d){this.is_empty()&&(this.__indent_count=S||0,this.__alignment_count=d||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},l.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)},l.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},l.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},l.prototype.is_empty=function(){return this.__items.length===0},l.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},l.prototype.push=function(S){this.__items.push(S);var d=S.lastIndexOf(`
`);d!==-1?this.__character_count=S.length-d:this.__character_count+=S.length},l.prototype.pop=function(){var S=null;return this.is_empty()||(S=this.__items.pop(),this.__character_count-=S.length),S},l.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},l.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},l.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},l.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 Y(S,d){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)),d=d||"",S.indent_level>0&&(d=new Array(S.indent_level+1).join(this.__indent_string)),this.__base_string=d,this.__base_string_length=d.length}Y.prototype.get_indent_size=function(S,d){var w=this.__base_string_length;return d=d||0,S<0&&(w=0),w+=S*this.__indent_size,w+=d,w},Y.prototype.get_indent_string=function(S,d){var w=this.__base_string;return d=d||0,S<0&&(S=0,w=""),d+=S*this.__indent_size,this.__ensure_cache(d),w+=this.__cache[d],w},Y.prototype.__ensure_cache=function(S){for(;S>=this.__cache.length;)this.__add_column()},Y.prototype.__add_column=function(){var S=this.__cache.length,d=0,w="";this.__indent_size&&S>=this.__indent_size&&(d=Math.floor(S/this.__indent_size),S-=d*this.__indent_size,w=new Array(d+1).join(this.__indent_string)),S&&(w+=new Array(S+1).join(" ")),this.__cache.push(w)};function P(S,d){this.__indent_cache=new Y(S,d),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 l(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}P.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},P.prototype.get_line_number=function(){return this.__lines.length},P.prototype.get_indent_string=function(S,d){return this.__indent_cache.get_indent_string(S,d)},P.prototype.get_indent_size=function(S,d){return this.__indent_cache.get_indent_size(S,d)},P.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},P.prototype.add_new_line=function(S){return this.is_empty()||!S&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},P.prototype.get_code=function(S){this.trim(!0);var d=this.current_line.pop();d&&(d[d.length-1]===`
`&&(d=d.replace(/\n+$/g,"")),this.current_line.push(d)),this._end_with_newline&&this.__add_outputline();var w=this.__lines.join(`
`);return S!==`
`&&(w=w.replace(/[\n]/g,S)),w},P.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},P.prototype.set_indent=function(S,d){return S=S||0,d=d||0,this.next_line.set_indent(S,d),this.__lines.length>1?(this.current_line.set_indent(S,d),!0):(this.current_line.set_indent(),!1)},P.prototype.add_raw_token=function(S){for(var d=0;d<S.newlines;d++)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},P.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()},P.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(" "))},P.prototype.remove_indent=function(S){for(var d=this.__lines.length;S<d;)this.__lines[S]._remove_indent(),S++;this.current_line._remove_wrap_indent()},P.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},P.prototype.just_added_newline=function(){return this.current_line.is_empty()},P.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},P.prototype.ensure_empty_line_above=function(S,d){for(var w=this.__lines.length-2;w>=0;){var y=this.__lines[w];if(y.is_empty())break;if(y.item(0).indexOf(S)!==0&&y.item(-1)!==d){this.__lines.splice(w+1,0,new l(this)),this.previous_line=this.__lines[this.__lines.length-2];break}w--}},Te.exports.Output=P},function(Te){function l(Y,P,S,d){this.type=Y,this.text=P,this.comments_before=null,this.newlines=S||0,this.whitespace_before=d||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}Te.exports.Token=l},function(Te,l){var Y="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",P="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",S="\\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",d="\\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",w="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",y="(?:"+w+"|["+Y+S+"])",G="(?:"+w+"|["+P+S+d+"])*";l.identifier=new RegExp(y+G,"g"),l.identifierStart=new RegExp(y),l.identifierMatch=new RegExp("(?:"+w+"|["+P+S+d+"])+");var X=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;l.newline=/[\n\r\u2028\u2029]/,l.lineBreak=new RegExp(`\r
|`+l.newline.source),l.allLineBreaks=new RegExp(l.lineBreak.source,"g")},function(Te,l,Y){var P=Y(6).Options,S=["before-newline","after-newline","preserve-newline"];function d(w){P.call(this,w,"js");var y=this.raw_options.brace_style||null;y==="expand-strict"?this.raw_options.brace_style="expand":y==="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 G=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var X=0;X<G.length;X++)G[X]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=G[X];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",S),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}d.prototype=new P,Te.exports.Options=d},function(Te){function l(S,d){this.raw_options=Y(S,d),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"])}l.prototype._get_array=function(S,d){var w=this.raw_options[S],y=d||[];return typeof w=="object"?w!==null&&typeof w.concat=="function"&&(y=w.concat()):typeof w=="string"&&(y=w.split(/[^a-zA-Z0-9_\/\-]+/)),y},l.prototype._get_boolean=function(S,d){var w=this.raw_options[S],y=w===void 0?!!d:!!w;return y},l.prototype._get_characters=function(S,d){var w=this.raw_options[S],y=d||"";return typeof w=="string"&&(y=w.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),y},l.prototype._get_number=function(S,d){var w=this.raw_options[S];d=parseInt(d,10),isNaN(d)&&(d=0);var y=parseInt(w,10);return isNaN(y)&&(y=d),y},l.prototype._get_selection=function(S,d,w){var y=this._get_selection_list(S,d,w);if(y.length!==1)throw new Error("Invalid Option Value: The option '"+S+`' can only be one of the following values:
`+d+`
You passed in: '`+this.raw_options[S]+"'");return y[0]},l.prototype._get_selection_list=function(S,d,w){if(!d||d.length===0)throw new Error("Selection list cannot be empty.");if(w=w||[d[0]],!this._is_valid_selection(w,d))throw new Error("Invalid Default Value!");var y=this._get_array(S,w);if(!this._is_valid_selection(y,d))throw new Error("Invalid Option Value: The option '"+S+`' can contain only the following values:
`+d+`
You passed in: '`+this.raw_options[S]+"'");return y},l.prototype._is_valid_selection=function(S,d){return S.length&&d.length&&!S.some(function(w){return d.indexOf(w)===-1})};function Y(S,d){var w={};S=P(S);var y;for(y in S)y!==d&&(w[y]=S[y]);if(d&&S[d])for(y in S[d])w[y]=S[d][y];return w}function P(S){var d={},w;for(w in S){var y=w.replace(/-/g,"_");d[y]=S[w]}return d}Te.exports.Options=l,Te.exports.normalizeOpts=P,Te.exports.mergeOpts=Y},function(Te,l,Y){var P=Y(8).InputScanner,S=Y(9).Tokenizer,d=Y(9).TOKEN,w=Y(13).Directives,y=Y(4),G=Y(12).Pattern,X=Y(14).TemplatablePattern;function M(ee,me){return me.indexOf(ee)!==-1}var O={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:d.START,RAW:d.RAW,EOF:d.EOF},Q=new w(/\/\*/,/\*\//),he=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,R=/[0-9]/,ve=/[^\d\.]/,Ce=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),ge=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";ge=ge.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),ge="\\?\\.(?!\\d) "+ge,ge=ge.replace(/ /g,"|");var be=new RegExp(ge),Ne="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),Ie=Ne.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),je=new RegExp("^(?:"+Ie.join("|")+")$"),H,z=function(ee,me){S.call(this,ee,me),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var ae=new G(this._input),x=new X(this._input).read_options(this._options);this.__patterns={template:x,identifier:x.starting_with(y.identifier).matching(y.identifierMatch),number:ae.matching(he),punct:ae.matching(be),comment:ae.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:ae.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:ae.matching(/<!--/),html_comment_end:ae.matching(/-->/),include:ae.starting_with(/#include/).until_after(y.lineBreak),shebang:ae.starting_with(/#!/).until_after(y.lineBreak),xml:ae.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:x.until(/['\\\n\r\u2028\u2029]/),double_quote:x.until(/["\\\n\r\u2028\u2029]/),template_text:x.until(/[`\\$]/),template_expression:x.until(/[`}\\]/)}};z.prototype=new S,z.prototype._is_comment=function(ee){return ee.type===O.COMMENT||ee.type===O.BLOCK_COMMENT||ee.type===O.UNKNOWN},z.prototype._is_opening=function(ee){return ee.type===O.START_BLOCK||ee.type===O.START_EXPR},z.prototype._is_closing=function(ee,me){return(ee.type===O.END_BLOCK||ee.type===O.END_EXPR)&&me&&(ee.text==="]"&&me.text==="["||ee.text===")"&&me.text==="("||ee.text==="}"&&me.text==="{")},z.prototype._reset=function(){H=!1},z.prototype._get_next_token=function(ee,me){var ae=null;this._readWhitespace();var x=this._input.peek();return x===null?this._create_token(O.EOF,""):(ae=ae||this._read_non_javascript(x),ae=ae||this._read_string(x),ae=ae||this._read_pair(x,this._input.peek(1)),ae=ae||this._read_word(ee),ae=ae||this._read_singles(x),ae=ae||this._read_comment(x),ae=ae||this._read_regexp(x,ee),ae=ae||this._read_xml(x,ee),ae=ae||this._read_punctuation(),ae=ae||this._create_token(O.UNKNOWN,this._input.next()),ae)},z.prototype._read_word=function(ee){var me;if(me=this.__patterns.identifier.read(),me!=="")return me=me.replace(y.allLineBreaks,`
`),!(ee.type===O.DOT||ee.type===O.RESERVED&&(ee.text==="set"||ee.text==="get"))&&je.test(me)?(me==="in"||me==="of")&&(ee.type===O.WORD||ee.type===O.STRING)?this._create_token(O.OPERATOR,me):this._create_token(O.RESERVED,me):this._create_token(O.WORD,me);if(me=this.__patterns.number.read(),me!=="")return this._create_token(O.WORD,me)},z.prototype._read_singles=function(ee){var me=null;return ee==="("||ee==="["?me=this._create_token(O.START_EXPR,ee):ee===")"||ee==="]"?me=this._create_token(O.END_EXPR,ee):ee==="{"?me=this._create_token(O.START_BLOCK,ee):ee==="}"?me=this._create_token(O.END_BLOCK,ee):ee===";"?me=this._create_token(O.SEMICOLON,ee):ee==="."&&ve.test(this._input.peek(1))?me=this._create_token(O.DOT,ee):ee===","&&(me=this._create_token(O.COMMA,ee)),me&&this._input.next(),me},z.prototype._read_pair=function(ee,me){var ae=null;return ee==="#"&&me==="{"&&(ae=this._create_token(O.START_BLOCK,ee+me)),ae&&(this._input.next(),this._input.next()),ae},z.prototype._read_punctuation=function(){var ee=this.__patterns.punct.read();if(ee!=="")return ee==="="?this._create_token(O.EQUALS,ee):ee==="?."?this._create_token(O.DOT,ee):this._create_token(O.OPERATOR,ee)},z.prototype._read_non_javascript=function(ee){var me="";if(ee==="#"){if(this._is_first_token()&&(me=this.__patterns.shebang.read(),me))return this._create_token(O.UNKNOWN,me.trim()+`
`);if(me=this.__patterns.include.read(),me)return this._create_token(O.UNKNOWN,me.trim()+`
`);ee=this._input.next();var ae="#";if(this._input.hasNext()&&this._input.testChar(R)){do ee=this._input.next(),ae+=ee;while(this._input.hasNext()&&ee!=="#"&&ee!=="=");return ee==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(ae+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(ae+="{}",this._input.next(),this._input.next())),this._create_token(O.WORD,ae)}this._input.back()}else if(ee==="<"&&this._is_first_token()){if(me=this.__patterns.html_comment_start.read(),me){for(;this._input.hasNext()&&!this._input.testChar(y.newline);)me+=this._input.next();return H=!0,this._create_token(O.COMMENT,me)}}else if(H&&ee==="-"&&(me=this.__patterns.html_comment_end.read(),me))return H=!1,this._create_token(O.COMMENT,me);return null},z.prototype._read_comment=function(ee){var me=null;if(ee==="/"){var ae="";if(this._input.peek(1)==="*"){ae=this.__patterns.block_comment.read();var x=Q.get_directives(ae);x&&x.ignore==="start"&&(ae+=Q.readIgnored(this._input)),ae=ae.replace(y.allLineBreaks,`
`),me=this._create_token(O.BLOCK_COMMENT,ae),me.directives=x}else this._input.peek(1)==="/"&&(ae=this.__patterns.comment.read(),me=this._create_token(O.COMMENT,ae))}return me},z.prototype._read_string=function(ee){if(ee==="`"||ee==="'"||ee==='"'){var me=this._input.next();return this.has_char_escapes=!1,ee==="`"?me+=this._read_string_recursive("`",!0,"${"):me+=this._read_string_recursive(ee),this.has_char_escapes&&this._options.unescape_strings&&(me=Z(me)),this._input.peek()===ee&&(me+=this._input.next()),me=me.replace(y.allLineBreaks,`
`),this._create_token(O.STRING,me)}return null},z.prototype._allow_regexp_or_xml=function(ee){return ee.type===O.RESERVED&&M(ee.text,["return","case","throw","else","do","typeof","yield"])||ee.type===O.END_EXPR&&ee.text===")"&&ee.opened.previous.type===O.RESERVED&&M(ee.opened.previous.text,["if","while","for"])||M(ee.type,[O.COMMENT,O.START_EXPR,O.START_BLOCK,O.START,O.END_BLOCK,O.OPERATOR,O.EQUALS,O.EOF,O.SEMICOLON,O.COMMA])},z.prototype._read_regexp=function(ee,me){if(ee==="/"&&this._allow_regexp_or_xml(me)){for(var ae=this._input.next(),x=!1,A=!1;this._input.hasNext()&&(x||A||this._input.peek()!==ee)&&!this._input.testChar(y.newline);)ae+=this._input.peek(),x?x=!1:(x=this._input.peek()==="\\",this._input.peek()==="["?A=!0:this._input.peek()==="]"&&(A=!1)),this._input.next();return this._input.peek()===ee&&(ae+=this._input.next(),ae+=this._input.read(y.identifier)),this._create_token(O.STRING,ae)}return null},z.prototype._read_xml=function(ee,me){if(this._options.e4x&&ee==="<"&&this._allow_regexp_or_xml(me)){var ae="",x=this.__patterns.xml.read_match();if(x){for(var A=x[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),N=A.indexOf("{")===0,de=0;x;){var We=!!x[1],qe=x[2],Ge=!!x[x.length-1]||qe.slice(0,8)==="![CDATA[";if(!Ge&&(qe===A||N&&qe.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(We?--de:++de),ae+=x[0],de<=0)break;x=this.__patterns.xml.read_match()}return x||(ae+=this._input.match(/[\s\S]*/g)[0]),ae=ae.replace(y.allLineBreaks,`
`),this._create_token(O.STRING,ae)}}return null};function Z(ee){for(var me="",ae=0,x=new P(ee),A=null;x.hasNext();)if(A=x.match(/([\s]|[^\\]|\\\\)+/g),A&&(me+=A[0]),x.peek()==="\\"){if(x.next(),x.peek()==="x")A=x.match(/x([0-9A-Fa-f]{2})/g);else if(x.peek()==="u")A=x.match(/u([0-9A-Fa-f]{4})/g),A||(A=x.match(/u\{([0-9A-Fa-f]+)\}/g));else{me+="\\",x.hasNext()&&(me+=x.next());continue}if(!A||(ae=parseInt(A[1],16),ae>126&&ae<=255&&A[0].indexOf("x")===0))return ee;ae>=0&&ae<32||ae>1114111?me+="\\"+A[0]:ae===34||ae===39||ae===92?me+="\\"+String.fromCharCode(ae):me+=String.fromCharCode(ae)}return me}z.prototype._read_string_recursive=function(ee,me,ae){var x,A;ee==="'"?A=this.__patterns.single_quote:ee==='"'?A=this.__patterns.double_quote:ee==="`"?A=this.__patterns.template_text:ee==="}"&&(A=this.__patterns.template_expression);for(var N=A.read(),de="";this._input.hasNext();){if(de=this._input.next(),de===ee||!me&&y.newline.test(de)){this._input.back();break}else de==="\\"&&this._input.hasNext()?(x=this._input.peek(),x==="x"||x==="u"?this.has_char_escapes=!0:x==="\r"&&this._input.peek(1)===`
`&&this._input.next(),de+=this._input.next()):ae&&(ae==="${"&&de==="$"&&this._input.peek()==="{"&&(de+=this._input.next()),ae===de&&(ee==="`"?de+=this._read_string_recursive("}",me,"`"):de+=this._read_string_recursive("`",me,"${"),this._input.hasNext()&&(de+=this._input.next())));de+=A.read(),N+=de}return N},Te.exports.Tokenizer=z,Te.exports.TOKEN=O,Te.exports.positionable_operators=Ce.slice(),Te.exports.line_starters=Ne.slice()},function(Te){var l=RegExp.prototype.hasOwnProperty("sticky");function Y(P){this.__input=P||"",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 P=null;return this.hasNext()&&(P=this.__input.charAt(this.__position),this.__position+=1),P},Y.prototype.peek=function(P){var S=null;return P=P||0,P+=this.__position,P>=0&&P<this.__input_length&&(S=this.__input.charAt(P)),S},Y.prototype.__match=function(P,S){P.lastIndex=S;var d=P.exec(this.__input);return d&&!(l&&P.sticky)&&d.index!==S&&(d=null),d},Y.prototype.test=function(P,S){return S=S||0,S+=this.__position,S>=0&&S<this.__input_length?!!this.__match(P,S):!1},Y.prototype.testChar=function(P,S){var d=this.peek(S);return P.lastIndex=0,d!==null&&P.test(d)},Y.prototype.match=function(P){var S=this.__match(P,this.__position);return S?this.__position+=S[0].length:S=null,S},Y.prototype.read=function(P,S,d){var w="",y;return P&&(y=this.match(P),y&&(w+=y[0])),S&&(y||!P)&&(w+=this.readUntil(S,d)),w},Y.prototype.readUntil=function(P,S){var d="",w=this.__position;P.lastIndex=this.__position;var y=P.exec(this.__input);return y?(w=y.index,S&&(w+=y[0].length)):w=this.__input_length,d=this.__input.substring(this.__position,w),this.__position=w,d},Y.prototype.readUntilAfter=function(P){return this.readUntil(P,!0)},Y.prototype.get_regexp=function(P,S){var d=null,w="g";return S&&l&&(w="y"),typeof P=="string"&&P!==""?d=new RegExp(P,w):P&&(d=new RegExp(P.source,w)),d},Y.prototype.get_literal_regexp=function(P){return RegExp(P.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},Y.prototype.peekUntilAfter=function(P){var S=this.__position,d=this.readUntilAfter(P);return this.__position=S,d},Y.prototype.lookBack=function(P){var S=this.__position-1;return S>=P.length&&this.__input.substring(S-P.length,S).toLowerCase()===P},Te.exports.InputScanner=Y},function(Te,l,Y){var P=Y(8).InputScanner,S=Y(3).Token,d=Y(10).TokenStream,w=Y(11).WhitespacePattern,y={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},G=function(X,M){this._input=new P(X),this._options=M||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new w(this._input)};G.prototype.tokenize=function(){this._input.restart(),this.__tokens=new d,this._reset();for(var X,M=new S(y.START,""),O=null,Q=[],he=new d;M.type!==y.EOF;){for(X=this._get_next_token(M,O);this._is_comment(X);)he.add(X),X=this._get_next_token(M,O);he.isEmpty()||(X.comments_before=he,he=new d),X.parent=O,this._is_opening(X)?(Q.push(O),O=X):O&&this._is_closing(X,O)&&(X.opened=O,O.closed=X,O=Q.pop(),X.parent=O),X.previous=M,M.next=X,this.__tokens.add(X),M=X}return this.__tokens},G.prototype._is_first_token=function(){return this.__tokens.isEmpty()},G.prototype._reset=function(){},G.prototype._get_next_token=function(X,M){this._readWhitespace();var O=this._input.read(/.+/g);return O?this._create_token(y.RAW,O):this._create_token(y.EOF,"")},G.prototype._is_comment=function(X){return!1},G.prototype._is_opening=function(X){return!1},G.prototype._is_closing=function(X,M){return!1},G.prototype._create_token=function(X,M){var O=new S(X,M,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return O},G.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},Te.exports.Tokenizer=G,Te.exports.TOKEN=y},function(Te){function l(Y){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=Y}l.prototype.restart=function(){this.__position=0},l.prototype.isEmpty=function(){return this.__tokens_length===0},l.prototype.hasNext=function(){return this.__position<this.__tokens_length},l.prototype.next=function(){var Y=null;return this.hasNext()&&(Y=this.__tokens[this.__position],this.__position+=1),Y},l.prototype.peek=function(Y){var P=null;return Y=Y||0,Y+=this.__position,Y>=0&&Y<this.__tokens_length&&(P=this.__tokens[Y]),P},l.prototype.add=function(Y){this.__parent_token&&(Y.parent=this.__parent_token),this.__tokens.push(Y),this.__tokens_length+=1},Te.exports.TokenStream=l},function(Te,l,Y){var P=Y(12).Pattern;function S(d,w){P.call(this,d,w),w?this._line_regexp=this._input.get_regexp(w._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}S.prototype=new P,S.prototype.__set_whitespace_patterns=function(d,w){d+="\\t ",w+="\\n\\r",this._match_pattern=this._input.get_regexp("["+d+w+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+w+"]")},S.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var d=this._input.read(this._match_pattern);if(d===" ")this.whitespace_before_token=" ";else if(d){var w=this.__split(this._newline_regexp,d);this.newline_count=w.length-1,this.whitespace_before_token=w[this.newline_count]}return d},S.prototype.matching=function(d,w){var y=this._create();return y.__set_whitespace_patterns(d,w),y._update(),y},S.prototype._create=function(){return new S(this._input,this)},S.prototype.__split=function(d,w){d.lastIndex=0;for(var y=0,G=[],X=d.exec(w);X;)G.push(w.substring(y,X.index)),y=X.index+X[0].length,X=d.exec(w);return y<w.length?G.push(w.substring(y,w.length)):G.push(""),G},Te.exports.WhitespacePattern=S},function(Te){function l(Y,P){this._input=Y,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,P&&(this._starting_pattern=this._input.get_regexp(P._starting_pattern,!0),this._match_pattern=this._input.get_regexp(P._match_pattern,!0),this._until_pattern=this._input.get_regexp(P._until_pattern),this._until_after=P._until_after)}l.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},l.prototype.read_match=function(){return this._input.match(this._match_pattern)},l.prototype.until_after=function(Y){var P=this._create();return P._until_after=!0,P._until_pattern=this._input.get_regexp(Y),P._update(),P},l.prototype.until=function(Y){var P=this._create();return P._until_after=!1,P._until_pattern=this._input.get_regexp(Y),P._update(),P},l.prototype.starting_with=function(Y){var P=this._create();return P._starting_pattern=this._input.get_regexp(Y,!0),P._update(),P},l.prototype.matching=function(Y){var P=this._create();return P._match_pattern=this._input.get_regexp(Y,!0),P._update(),P},l.prototype._create=function(){return new l(this._input,this)},l.prototype._update=function(){},Te.exports.Pattern=l},function(Te){function l(Y,P){Y=typeof Y=="string"?Y:Y.source,P=typeof P=="string"?P:P.source,this.__directives_block_pattern=new RegExp(Y+/ beautify( \w+[:]\w+)+ /.source+P,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(Y+/\sbeautify\signore:end\s/.source+P,"g")}l.prototype.get_directives=function(Y){if(!Y.match(this.__directives_block_pattern))return null;var P={};this.__directive_pattern.lastIndex=0;for(var S=this.__directive_pattern.exec(Y);S;)P[S[1]]=S[2],S=this.__directive_pattern.exec(Y);return P},l.prototype.readIgnored=function(Y){return Y.readUntilAfter(this.__directives_end_ignore_pattern)},Te.exports.Directives=l},function(Te,l,Y){var P=Y(12).Pattern,S={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function d(w,y){P.call(this,w,y),this.__template_pattern=null,this._disabled=Object.assign({},S),this._excluded=Object.assign({},S),y&&(this.__template_pattern=this._input.get_regexp(y.__template_pattern),this._excluded=Object.assign(this._excluded,y._excluded),this._disabled=Object.assign(this._disabled,y._disabled));var G=new P(w);this.__patterns={handlebars_comment:G.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:G.starting_with(/{{{/).until_after(/}}}/),handlebars:G.starting_with(/{{/).until_after(/}}/),php:G.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:G.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:G.starting_with(/{%/).until_after(/%}/),django_value:G.starting_with(/{{/).until_after(/}}/),django_comment:G.starting_with(/{#/).until_after(/#}/),smarty:G.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:G.starting_with(/{\*/).until_after(/\*}/),smarty_literal:G.starting_with(/{literal}/).until_after(/{\/literal}/)}}d.prototype=new P,d.prototype._create=function(){return new d(this._input,this)},d.prototype._update=function(){this.__set_templated_pattern()},d.prototype.disable=function(w){var y=this._create();return y._disabled[w]=!0,y._update(),y},d.prototype.read_options=function(w){var y=this._create();for(var G in S)y._disabled[G]=w.templating.indexOf(G)===-1;return y._update(),y},d.prototype.exclude=function(w){var y=this._create();return y._excluded[w]=!0,y._update(),y},d.prototype.read=function(){var w="";this._match_pattern?w=this._input.read(this._starting_pattern):w=this._input.read(this._starting_pattern,this.__template_pattern);for(var y=this._read_template();y;)this._match_pattern?y+=this._input.read(this._match_pattern):y+=this._input.readUntil(this.__template_pattern),w+=y,y=this._read_template();return this._until_after&&(w+=this._input.readUntilAfter(this._until_pattern)),w},d.prototype.__set_templated_pattern=function(){var w=[];this._disabled.php||w.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||w.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||w.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||w.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(w.push(this.__patterns.django._starting_pattern.source),w.push(this.__patterns.django_value._starting_pattern.source),w.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||w.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&w.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+w.join("|")+")")},d.prototype._read_template=function(){var w="",y=this._input.peek();if(y==="<"){var G=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&G==="?"&&(w=w||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&G==="%"&&(w=w||this.__patterns.erb.read())}else y==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(w=w||this.__patterns.handlebars_comment.read(),w=w||this.__patterns.handlebars_unescaped.read(),w=w||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(w=w||this.__patterns.django_value.read()),this._excluded.django||(w=w||this.__patterns.django_comment.read(),w=w||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(w=w||this.__patterns.smarty_comment.read(),w=w||this.__patterns.smarty_literal.read(),w=w||this.__patterns.smarty.read()));return w},Te.exports.TemplatablePattern=d}],$e={};function ue(Te){var l=$e[Te];if(l!==void 0)return l.exports;var Y=$e[Te]={exports:{}};return ke[Te](Y,Y.exports,ue),Y.exports}var Fe=ue(0);Ae=Fe})();var He=Ae;ie=[],V=function(){return{js_beautify:He}}.apply(ut,ie),V!==void 0&&(Nt.exports=V)})()},15342:function(Nt){(function(ie,V){Nt.exports=V()})(typeof self!="undefined"?self:this,function(){return function(ut){var ie={};function V(Ae){if(ie[Ae])return ie[Ae].exports;var He=ie[Ae]={i:Ae,l:!1,exports:{}};return ut[Ae].call(He.exports,He,He.exports,V),He.l=!0,He.exports}return V.m=ut,V.c=ie,V.d=function(Ae,He,ke){V.o(Ae,He)||Object.defineProperty(Ae,He,{enumerable:!0,get:ke})},V.r=function(Ae){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(Ae,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(Ae,"__esModule",{value:!0})},V.t=function(Ae,He){if(He&1&&(Ae=V(Ae)),He&8||He&4&&typeof Ae=="object"&&Ae&&Ae.__esModule)return Ae;var ke=Object.create(null);if(V.r(ke),Object.defineProperty(ke,"default",{enumerable:!0,value:Ae}),He&2&&typeof Ae!="string")for(var $e in Ae)V.d(ke,$e,function(ue){return Ae[ue]}.bind(null,$e));return ke},V.n=function(Ae){var He=Ae&&Ae.__esModule?function(){return Ae.default}:function(){return Ae};return V.d(He,"a",He),He},V.o=function(Ae,He){return Object.prototype.hasOwnProperty.call(Ae,He)},V.p="",V(V.s=1)}([function(ut,ie,V){},function(ut,ie,V){"use strict";V.r(ie);var Ae=V(0),He=function(){function k(o,c,h){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=o,this.start=c,this.end=h}return k.range=function(c,h){return h?!c||!c.loc||!h.loc||c.loc.lexer!==h.loc.lexer?null:new k(c.loc.lexer,c.loc.start,h.loc.end):c&&c.loc},k}(),ke=function(){function k(c,h){this.text=void 0,this.loc=void 0,this.text=c,this.loc=h}var o=k.prototype;return o.range=function(h,p){return new k(p,He.range(this,h))},k}(),$e=function k(o,c){this.position=void 0;var h="KaTeX parse error: "+o,p,E=c&&c.loc;if(E&&E.start<=E.end){var D=E.lexer.input;p=E.start;var J=E.end;p===D.length?h+=" at end of input: ":h+=" at position "+(p+1)+": ";var le=D.slice(p,J).replace(/[^]/g,"$&\u0332"),_e;p>15?_e="\u2026"+D.slice(p-15,p):_e=D.slice(0,p);var Ke;J+15<D.length?Ke=D.slice(J,J+15)+"\u2026":Ke=D.slice(J),h+=_e+le+Ke}var Je=new Error(h);return Je.name="ParseError",Je.__proto__=k.prototype,Je.position=p,Je};$e.prototype.__proto__=Error.prototype;var ue=$e,Fe=function(o,c){return o.indexOf(c)!==-1},Te=function(o,c){return o===void 0?c:o},l=/([A-Z])/g,Y=function(o){return o.replace(l,"-$1").toLowerCase()},P={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},S=/[&><"']/g;function d(k){return String(k).replace(S,function(o){return P[o]})}var w=function k(o){return o.type==="ordgroup"||o.type==="color"?o.body.length===1?k(o.body[0]):o:o.type==="font"?k(o.body):o},y=function(o){var c=w(o);return c.type==="mathord"||c.type==="textord"||c.type==="atom"},G=function(o){if(!o)throw new Error("Expected non-null, but got "+String(o));return o},X=function(o){var c=/^\s*([^\\/#]*?)(?::|&#0*58|&#x0*3a)/i.exec(o);return c!=null?c[1]:"_relative"},M={contains:Fe,deflt:Te,escape:d,hyphenate:Y,getBaseElem:w,isCharacterBox:y,protocolFromUrl:X},O=function(){function k(c){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,c=c||{},this.displayMode=M.deflt(c.displayMode,!1),this.output=M.deflt(c.output,"htmlAndMathml"),this.leqno=M.deflt(c.leqno,!1),this.fleqn=M.deflt(c.fleqn,!1),this.throwOnError=M.deflt(c.throwOnError,!0),this.errorColor=M.deflt(c.errorColor,"#cc0000"),this.macros=c.macros||{},this.minRuleThickness=Math.max(0,M.deflt(c.minRuleThickness,0)),this.colorIsTextColor=M.deflt(c.colorIsTextColor,!1),this.strict=M.deflt(c.strict,"warn"),this.trust=M.deflt(c.trust,!1),this.maxSize=Math.max(0,M.deflt(c.maxSize,1/0)),this.maxExpand=Math.max(0,M.deflt(c.maxExpand,1e3))}var o=k.prototype;return o.reportNonstrict=function(h,p,E){var D=this.strict;if(typeof D=="function"&&(D=D(h,p,E)),!(!D||D==="ignore")){if(D===!0||D==="error")throw new ue("LaTeX-incompatible input and strict mode is set to 'error': "+(p+" ["+h+"]"),E);D==="warn"?typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(p+" ["+h+"]")):typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+D+"': "+p+" ["+h+"]"))}},o.useStrictBehavior=function(h,p,E){var D=this.strict;if(typeof D=="function")try{D=D(h,p,E)}catch(J){D="error"}return!D||D==="ignore"?!1:D===!0||D==="error"?!0:D==="warn"?(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(p+" ["+h+"]")),!1):(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+D+"': "+p+" ["+h+"]")),!1)},o.isTrusted=function(h){h.url&&!h.protocol&&(h.protocol=M.protocolFromUrl(h.url));var p=typeof this.trust=="function"?this.trust(h):this.trust;return!!p},k}(),Q=function(){function k(c,h,p){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=c,this.size=h,this.cramped=p}var o=k.prototype;return o.sup=function(){return je[H[this.id]]},o.sub=function(){return je[z[this.id]]},o.fracNum=function(){return je[Z[this.id]]},o.fracDen=function(){return je[ee[this.id]]},o.cramp=function(){return je[me[this.id]]},o.text=function(){return je[ae[this.id]]},o.isTight=function(){return this.size>=2},k}(),he=0,R=1,ve=2,Ce=3,ge=4,be=5,Ne=6,Ie=7,je=[new Q(he,0,!1),new Q(R,0,!0),new Q(ve,1,!1),new Q(Ce,1,!0),new Q(ge,2,!1),new Q(be,2,!0),new Q(Ne,3,!1),new Q(Ie,3,!0)],H=[ge,be,ge,be,Ne,Ie,Ne,Ie],z=[be,be,be,be,Ie,Ie,Ie,Ie],Z=[ve,Ce,ge,be,Ne,Ie,Ne,Ie],ee=[Ce,Ce,be,be,Ie,Ie,Ie,Ie],me=[R,R,Ce,Ce,be,be,Ie,Ie],ae=[he,R,ve,Ce,ve,Ce,ve,Ce],x={DISPLAY:je[he],TEXT:je[ve],SCRIPT:je[ge],SCRIPTSCRIPT:je[Ne]},A=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function N(k){for(var o=0;o<A.length;o++)for(var c=A[o],h=0;h<c.blocks.length;h++){var p=c.blocks[h];if(k>=p[0]&&k<=p[1])return c.name}return null}var de=[];A.forEach(function(k){return k.blocks.forEach(function(o){return de.push.apply(de,o)})});function We(k){for(var o=0;o<de.length;o+=2)if(k>=de[o]&&k<=de[o+1])return!0;return!1}var qe=80,Ge=function(o,c){return"M95,"+(622+o+c)+`
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
c69,-144,104.5,-217.7,106.5,-221
l`+o/2.075+" -"+o+`
c5.3,-9.3,12,-14,20,-14
H400000v`+(40+o)+`H845.2724
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
M`+(834+o)+" "+c+"h400000v"+(40+o)+"h-400000z"},ot=function(o,c){return"M263,"+(601+o+c)+`c0.7,0,18,39.7,52,119
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
c340,-704.7,510.7,-1060.3,512,-1067
l`+o/2.084+" -"+o+`
c4.7,-7.3,11,-11,19,-11
H40000v`+(40+o)+`H1012.3
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
M`+(1001+o)+" "+c+"h400000v"+(40+o)+"h-400000z"},Dt=function(o,c){return"M983 "+(10+o+c)+`
l`+o/3.13+" -"+o+`
c4,-6.7,10,-10,18,-10 H400000v`+(40+o)+`
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
M`+(1001+o)+" "+c+"h400000v"+(40+o)+"h-400000z"},at=function(o,c){return"M424,"+(2398+o+c)+`
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
l`+o/4.223+" -"+o+`c4,-6.7,10,-10,18,-10 H400000
v`+(40+o)+`H1014.6
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2z M`+(1001+o)+" "+c+`
h400000v`+(40+o)+"h-400000z"},it=function(o,c){return"M473,"+(2713+o+c)+`
c339.3,-1799.3,509.3,-2700,510,-2702 l`+o/5.298+" -"+o+`
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+o)+`H1017.7
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
606zM`+(1001+o)+" "+c+"h400000v"+(40+o)+"H1017.7z"},Lt=function(o,c,h){var p=h-54-c-o;return"M702 "+(o+c)+"H400000"+(40+o)+`
H742v`+p+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
219 661 l218 661zM702 `+c+"H400000v"+(40+o)+"H742z"},jt=function(o,c,h){c=1e3*c;var p="";switch(o){case"sqrtMain":p=Ge(c,qe);break;case"sqrtSize1":p=ot(c,qe);break;case"sqrtSize2":p=Dt(c,qe);break;case"sqrtSize3":p=at(c,qe);break;case"sqrtSize4":p=it(c,qe);break;case"sqrtTall":p=Lt(c,qe,h)}return p},Xt={doubleleftarrow:`M262 157
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
435 0h399565z`,leftgroupunder:`M400000 262
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
-338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
-175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Vt=function(){function k(c){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=c,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var o=k.prototype;return o.hasClass=function(h){return M.contains(this.classes,h)},o.toNode=function(){for(var h=document.createDocumentFragment(),p=0;p<this.children.length;p++)h.appendChild(this.children[p].toNode());return h},o.toMarkup=function(){for(var h="",p=0;p<this.children.length;p++)h+=this.children[p].toMarkup();return h},o.toText=function(){var h=function(E){return E.toText()};return this.children.map(h).join("")},k}(),Mt=function(o){return o.filter(function(c){return c}).join(" ")},Rt=function(o,c,h){if(this.classes=o||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=h||{},c){c.style.isTight()&&this.classes.push("mtight");var p=c.getColor();p&&(this.style.color=p)}},Me=function(o){var c=document.createElement(o);c.className=Mt(this.classes);for(var h in this.style)this.style.hasOwnProperty(h)&&(c.style[h]=this.style[h]);for(var p in this.attributes)this.attributes.hasOwnProperty(p)&&c.setAttribute(p,this.attributes[p]);for(var E=0;E<this.children.length;E++)c.appendChild(this.children[E].toNode());return c},Qe=function(o){var c="<"+o;this.classes.length&&(c+=' class="'+M.escape(Mt(this.classes))+'"');var h="";for(var p in this.style)this.style.hasOwnProperty(p)&&(h+=M.hyphenate(p)+":"+this.style[p]+";");h&&(c+=' style="'+M.escape(h)+'"');for(var E in this.attributes)this.attributes.hasOwnProperty(E)&&(c+=" "+E+'="'+M.escape(this.attributes[E])+'"');c+=">";for(var D=0;D<this.children.length;D++)c+=this.children[D].toMarkup();return c+="</"+o+">",c},se=function(){function k(c,h,p,E){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,Rt.call(this,c,p,E),this.children=h||[]}var o=k.prototype;return o.setAttribute=function(h,p){this.attributes[h]=p},o.hasClass=function(h){return M.contains(this.classes,h)},o.toNode=function(){return Me.call(this,"span")},o.toMarkup=function(){return Qe.call(this,"span")},k}(),Pe=function(){function k(c,h,p,E){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,Rt.call(this,h,E),this.children=p||[],this.setAttribute("href",c)}var o=k.prototype;return o.setAttribute=function(h,p){this.attributes[h]=p},o.hasClass=function(h){return M.contains(this.classes,h)},o.toNode=function(){return Me.call(this,"a")},o.toMarkup=function(){return Qe.call(this,"a")},k}(),Re=function(){function k(c,h,p){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.alt=h,this.src=c,this.classes=["mord"],this.style=p}var o=k.prototype;return o.hasClass=function(h){return M.contains(this.classes,h)},o.toNode=function(){var h=document.createElement("img");h.src=this.src,h.alt=this.alt,h.className="mord";for(var p in this.style)this.style.hasOwnProperty(p)&&(h.style[p]=this.style[p]);return h},o.toMarkup=function(){var h="<img src='"+this.src+" 'alt='"+this.alt+"' ",p="";for(var E in this.style)this.style.hasOwnProperty(E)&&(p+=M.hyphenate(E)+":"+this.style[E]+";");return p&&(h+=' style="'+M.escape(p)+'"'),h+="'/>",h},k}(),T={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},K=function(){function k(c,h,p,E,D,J,le,_e){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.classes=void 0,this.style=void 0,this.text=c,this.height=h||0,this.depth=p||0,this.italic=E||0,this.skew=D||0,this.width=J||0,this.classes=le||[],this.style=_e||{},this.maxFontSize=0;var Ke=N(this.text.charCodeAt(0));Ke&&this.classes.push(Ke+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=T[this.text])}var o=k.prototype;return o.hasClass=function(h){return M.contains(this.classes,h)},o.toNode=function(){var h=document.createTextNode(this.text),p=null;this.italic>0&&(p=document.createElement("span"),p.style.marginRight=this.italic+"em"),this.classes.length>0&&(p=p||document.createElement("span"),p.className=Mt(this.classes));for(var E in this.style)this.style.hasOwnProperty(E)&&(p=p||document.createElement("span"),p.style[E]=this.style[E]);return p?(p.appendChild(h),p):h},o.toMarkup=function(){var h=!1,p="<span";this.classes.length&&(h=!0,p+=' class="',p+=M.escape(Mt(this.classes)),p+='"');var E="";this.italic>0&&(E+="margin-right:"+this.italic+"em;");for(var D in this.style)this.style.hasOwnProperty(D)&&(E+=M.hyphenate(D)+":"+this.style[D]+";");E&&(h=!0,p+=' style="'+M.escape(E)+'"');var J=M.escape(this.text);return h?(p+=">",p+=J,p+="</span>",p):J},k}(),te=function(){function k(c,h){this.children=void 0,this.attributes=void 0,this.children=c||[],this.attributes=h||{}}var o=k.prototype;return o.toNode=function(){var h="http://www.w3.org/2000/svg",p=document.createElementNS(h,"svg");for(var E in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,E)&&p.setAttribute(E,this.attributes[E]);for(var D=0;D<this.children.length;D++)p.appendChild(this.children[D].toNode());return p},o.toMarkup=function(){var h="<svg";for(var p in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,p)&&(h+=" "+p+"='"+this.attributes[p]+"'");h+=">";for(var E=0;E<this.children.length;E++)h+=this.children[E].toMarkup();return h+="</svg>",h},k}(),$=function(){function k(c,h){this.pathName=void 0,this.alternate=void 0,this.pathName=c,this.alternate=h}var o=k.prototype;return o.toNode=function(){var h="http://www.w3.org/2000/svg",p=document.createElementNS(h,"path");return this.alternate?p.setAttribute("d",this.alternate):p.setAttribute("d",Xt[this.pathName]),p},o.toMarkup=function(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+Xt[this.pathName]+"'/>"},k}(),W=function(){function k(c){this.attributes=void 0,this.attributes=c||{}}var o=k.prototype;return o.toNode=function(){var h="http://www.w3.org/2000/svg",p=document.createElementNS(h,"line");for(var E in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,E)&&p.setAttribute(E,this.attributes[E]);return p},o.toMarkup=function(){var h="<line";for(var p in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,p)&&(h+=" "+p+"='"+this.attributes[p]+"'");return h+="/>",h},k}();function Ee(k){if(k instanceof K)return k;throw new Error("Expected symbolNode but got "+String(k)+".")}function Le(k){if(k instanceof se)return k;throw new Error("Expected span<HtmlDomNode> but got "+String(k)+".")}var Oe={"AMS-Regular":{65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473]},"Fraktur-Regular":{33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],163:[0,.69444,0,0,.86853],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],163:[0,.69444,0,0,.76909],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],305:[0,.43056,0,.02778,.32246],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],567:[.19444,.43056,0,.08334,.38403],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,1],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.67,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.9,0,0,.278],8943:[-.19,.31,0,0,1.172],8945:[-.1,.82,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.744,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.744,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333]},"Math-Italic":{65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059]},"Math-Regular":{65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059]},"SansSerif-Bold":{33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212]},"Size1-Regular":{40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Se={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},we={\u00C5:"A",\u00C7:"C",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00E7:"c",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function ze(k,o){Oe[k]=o}function Ye(k,o,c){if(!Oe[o])throw new Error("Font metrics not found for font: "+o+".");var h=k.charCodeAt(0),p=Oe[o][h];if(!p&&k[0]in we&&(h=we[k[0]].charCodeAt(0),p=Oe[o][h]),!p&&c==="text"&&We(h)&&(p=Oe[o][77]),p)return{depth:p[0],height:p[1],italic:p[2],skew:p[3],width:p[4]}}var tt={};function st(k){var o;if(k>=5?o=0:k>=3?o=1:o=2,!tt[o]){var c=tt[o]={cssEmPerMu:Se.quad[o]/18};for(var h in Se)Se.hasOwnProperty(h)&&(c[h]=Se[h][o])}return tt[o]}var mt={bin:1,close:1,inner:1,open:1,punct:1,rel:1},ht={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},ft={math:{},text:{}},rt=ft;function g(k,o,c,h,p,E){ft[k][p]={font:o,group:c,replace:h},E&&h&&(ft[k][h]=ft[k][p])}var v="math",Be="text",I="main",ne="ams",bt="accent-token",ce="bin",xe="close",Ue="inner",B="mathord",q="op-token",oe="open",ye="punct",L="rel",pt="spacing",fe="textord";g(v,I,L,"\u2261","\\equiv",!0),g(v,I,L,"\u227A","\\prec",!0),g(v,I,L,"\u227B","\\succ",!0),g(v,I,L,"\u223C","\\sim",!0),g(v,I,L,"\u22A5","\\perp"),g(v,I,L,"\u2AAF","\\preceq",!0),g(v,I,L,"\u2AB0","\\succeq",!0),g(v,I,L,"\u2243","\\simeq",!0),g(v,I,L,"\u2223","\\mid",!0),g(v,I,L,"\u226A","\\ll",!0),g(v,I,L,"\u226B","\\gg",!0),g(v,I,L,"\u224D","\\asymp",!0),g(v,I,L,"\u2225","\\parallel"),g(v,I,L,"\u22C8","\\bowtie",!0),g(v,I,L,"\u2323","\\smile",!0),g(v,I,L,"\u2291","\\sqsubseteq",!0),g(v,I,L,"\u2292","\\sqsupseteq",!0),g(v,I,L,"\u2250","\\doteq",!0),g(v,I,L,"\u2322","\\frown",!0),g(v,I,L,"\u220B","\\ni",!0),g(v,I,L,"\u221D","\\propto",!0),g(v,I,L,"\u22A2","\\vdash",!0),g(v,I,L,"\u22A3","\\dashv",!0),g(v,I,L,"\u220B","\\owns"),g(v,I,ye,".","\\ldotp"),g(v,I,ye,"\u22C5","\\cdotp"),g(v,I,fe,"#","\\#"),g(Be,I,fe,"#","\\#"),g(v,I,fe,"&","\\&"),g(Be,I,fe,"&","\\&"),g(v,I,fe,"\u2135","\\aleph",!0),g(v,I,fe,"\u2200","\\forall",!0),g(v,I,fe,"\u210F","\\hbar",!0),g(v,I,fe,"\u2203","\\exists",!0),g(v,I,fe,"\u2207","\\nabla",!0),g(v,I,fe,"\u266D","\\flat",!0),g(v,I,fe,"\u2113","\\ell",!0),g(v,I,fe,"\u266E","\\natural",!0),g(v,I,fe,"\u2663","\\clubsuit",!0),g(v,I,fe,"\u2118","\\wp",!0),g(v,I,fe,"\u266F","\\sharp",!0),g(v,I,fe,"\u2662","\\diamondsuit",!0),g(v,I,fe,"\u211C","\\Re",!0),g(v,I,fe,"\u2661","\\heartsuit",!0),g(v,I,fe,"\u2111","\\Im",!0),g(v,I,fe,"\u2660","\\spadesuit",!0),g(Be,I,fe,"\xA7","\\S",!0),g(Be,I,fe,"\xB6","\\P",!0),g(v,I,fe,"\u2020","\\dag"),g(Be,I,fe,"\u2020","\\dag"),g(Be,I,fe,"\u2020","\\textdagger"),g(v,I,fe,"\u2021","\\ddag"),g(Be,I,fe,"\u2021","\\ddag"),g(Be,I,fe,"\u2021","\\textdaggerdbl"),g(v,I,xe,"\u23B1","\\rmoustache",!0),g(v,I,oe,"\u23B0","\\lmoustache",!0),g(v,I,xe,"\u27EF","\\rgroup",!0),g(v,I,oe,"\u27EE","\\lgroup",!0),g(v,I,ce,"\u2213","\\mp",!0),g(v,I,ce,"\u2296","\\ominus",!0),g(v,I,ce,"\u228E","\\uplus",!0),g(v,I,ce,"\u2293","\\sqcap",!0),g(v,I,ce,"\u2217","\\ast"),g(v,I,ce,"\u2294","\\sqcup",!0),g(v,I,ce,"\u25EF","\\bigcirc"),g(v,I,ce,"\u2219","\\bullet"),g(v,I,ce,"\u2021","\\ddagger"),g(v,I,ce,"\u2240","\\wr",!0),g(v,I,ce,"\u2A3F","\\amalg"),g(v,I,ce,"&","\\And"),g(v,I,L,"\u27F5","\\longleftarrow",!0),g(v,I,L,"\u21D0","\\Leftarrow",!0),g(v,I,L,"\u27F8","\\Longleftarrow",!0),g(v,I,L,"\u27F6","\\longrightarrow",!0),g(v,I,L,"\u21D2","\\Rightarrow",!0),g(v,I,L,"\u27F9","\\Longrightarrow",!0),g(v,I,L,"\u2194","\\leftrightarrow",!0),g(v,I,L,"\u27F7","\\longleftrightarrow",!0),g(v,I,L,"\u21D4","\\Leftrightarrow",!0),g(v,I,L,"\u27FA","\\Longleftrightarrow",!0),g(v,I,L,"\u21A6","\\mapsto",!0),g(v,I,L,"\u27FC","\\longmapsto",!0),g(v,I,L,"\u2197","\\nearrow",!0),g(v,I,L,"\u21A9","\\hookleftarrow",!0),g(v,I,L,"\u21AA","\\hookrightarrow",!0),g(v,I,L,"\u2198","\\searrow",!0),g(v,I,L,"\u21BC","\\leftharpoonup",!0),g(v,I,L,"\u21C0","\\rightharpoonup",!0),g(v,I,L,"\u2199","\\swarrow",!0),g(v,I,L,"\u21BD","\\leftharpoondown",!0),g(v,I,L,"\u21C1","\\rightharpoondown",!0),g(v,I,L,"\u2196","\\nwarrow",!0),g(v,I,L,"\u21CC","\\rightleftharpoons",!0),g(v,ne,L,"\u226E","\\nless",!0),g(v,ne,L,"\uE010","\\@nleqslant"),g(v,ne,L,"\uE011","\\@nleqq"),g(v,ne,L,"\u2A87","\\lneq",!0),g(v,ne,L,"\u2268","\\lneqq",!0),g(v,ne,L,"\uE00C","\\@lvertneqq"),g(v,ne,L,"\u22E6","\\lnsim",!0),g(v,ne,L,"\u2A89","\\lnapprox",!0),g(v,ne,L,"\u2280","\\nprec",!0),g(v,ne,L,"\u22E0","\\npreceq",!0),g(v,ne,L,"\u22E8","\\precnsim",!0),g(v,ne,L,"\u2AB9","\\precnapprox",!0),g(v,ne,L,"\u2241","\\nsim",!0),g(v,ne,L,"\uE006","\\@nshortmid"),g(v,ne,L,"\u2224","\\nmid",!0),g(v,ne,L,"\u22AC","\\nvdash",!0),g(v,ne,L,"\u22AD","\\nvDash",!0),g(v,ne,L,"\u22EA","\\ntriangleleft"),g(v,ne,L,"\u22EC","\\ntrianglelefteq",!0),g(v,ne,L,"\u228A","\\subsetneq",!0),g(v,ne,L,"\uE01A","\\@varsubsetneq"),g(v,ne,L,"\u2ACB","\\subsetneqq",!0),g(v,ne,L,"\uE017","\\@varsubsetneqq"),g(v,ne,L,"\u226F","\\ngtr",!0),g(v,ne,L,"\uE00F","\\@ngeqslant"),g(v,ne,L,"\uE00E","\\@ngeqq"),g(v,ne,L,"\u2A88","\\gneq",!0),g(v,ne,L,"\u2269","\\gneqq",!0),g(v,ne,L,"\uE00D","\\@gvertneqq"),g(v,ne,L,"\u22E7","\\gnsim",!0),g(v,ne,L,"\u2A8A","\\gnapprox",!0),g(v,ne,L,"\u2281","\\nsucc",!0),g(v,ne,L,"\u22E1","\\nsucceq",!0),g(v,ne,L,"\u22E9","\\succnsim",!0),g(v,ne,L,"\u2ABA","\\succnapprox",!0),g(v,ne,L,"\u2246","\\ncong",!0),g(v,ne,L,"\uE007","\\@nshortparallel"),g(v,ne,L,"\u2226","\\nparallel",!0),g(v,ne,L,"\u22AF","\\nVDash",!0),g(v,ne,L,"\u22EB","\\ntriangleright"),g(v,ne,L,"\u22ED","\\ntrianglerighteq",!0),g(v,ne,L,"\uE018","\\@nsupseteqq"),g(v,ne,L,"\u228B","\\supsetneq",!0),g(v,ne,L,"\uE01B","\\@varsupsetneq"),g(v,ne,L,"\u2ACC","\\supsetneqq",!0),g(v,ne,L,"\uE019","\\@varsupsetneqq"),g(v,ne,L,"\u22AE","\\nVdash",!0),g(v,ne,L,"\u2AB5","\\precneqq",!0),g(v,ne,L,"\u2AB6","\\succneqq",!0),g(v,ne,L,"\uE016","\\@nsubseteqq"),g(v,ne,ce,"\u22B4","\\unlhd"),g(v,ne,ce,"\u22B5","\\unrhd"),g(v,ne,L,"\u219A","\\nleftarrow",!0),g(v,ne,L,"\u219B","\\nrightarrow",!0),g(v,ne,L,"\u21CD","\\nLeftarrow",!0),g(v,ne,L,"\u21CF","\\nRightarrow",!0),g(v,ne,L,"\u21AE","\\nleftrightarrow",!0),g(v,ne,L,"\u21CE","\\nLeftrightarrow",!0),g(v,ne,L,"\u25B3","\\vartriangle"),g(v,ne,fe,"\u210F","\\hslash"),g(v,ne,fe,"\u25BD","\\triangledown"),g(v,ne,fe,"\u25CA","\\lozenge"),g(v,ne,fe,"\u24C8","\\circledS"),g(v,ne,fe,"\xAE","\\circledR"),g(Be,ne,fe,"\xAE","\\circledR"),g(v,ne,fe,"\u2221","\\measuredangle",!0),g(v,ne,fe,"\u2204","\\nexists"),g(v,ne,fe,"\u2127","\\mho"),g(v,ne,fe,"\u2132","\\Finv",!0),g(v,ne,fe,"\u2141","\\Game",!0),g(v,ne,fe,"\u2035","\\backprime"),g(v,ne,fe,"\u25B2","\\blacktriangle"),g(v,ne,fe,"\u25BC","\\blacktriangledown"),g(v,ne,fe,"\u25A0","\\blacksquare"),g(v,ne,fe,"\u29EB","\\blacklozenge"),g(v,ne,fe,"\u2605","\\bigstar"),g(v,ne,fe,"\u2222","\\sphericalangle",!0),g(v,ne,fe,"\u2201","\\complement",!0),g(v,ne,fe,"\xF0","\\eth",!0),g(v,ne,fe,"\u2571","\\diagup"),g(v,ne,fe,"\u2572","\\diagdown"),g(v,ne,fe,"\u25A1","\\square"),g(v,ne,fe,"\u25A1","\\Box"),g(v,ne,fe,"\u25CA","\\Diamond"),g(v,ne,fe,"\xA5","\\yen",!0),g(Be,ne,fe,"\xA5","\\yen",!0),g(v,ne,fe,"\u2713","\\checkmark",!0),g(Be,ne,fe,"\u2713","\\checkmark"),g(v,ne,fe,"\u2136","\\beth",!0),g(v,ne,fe,"\u2138","\\daleth",!0),g(v,ne,fe,"\u2137","\\gimel",!0),g(v,ne,fe,"\u03DD","\\digamma",!0),g(v,ne,fe,"\u03F0","\\varkappa"),g(v,ne,oe,"\u250C","\\ulcorner",!0),g(v,ne,xe,"\u2510","\\urcorner",!0),g(v,ne,oe,"\u2514","\\llcorner",!0),g(v,ne,xe,"\u2518","\\lrcorner",!0),g(v,ne,L,"\u2266","\\leqq",!0),g(v,ne,L,"\u2A7D","\\leqslant",!0),g(v,ne,L,"\u2A95","\\eqslantless",!0),g(v,ne,L,"\u2272","\\lesssim",!0),g(v,ne,L,"\u2A85","\\lessapprox",!0),g(v,ne,L,"\u224A","\\approxeq",!0),g(v,ne,ce,"\u22D6","\\lessdot"),g(v,ne,L,"\u22D8","\\lll",!0),g(v,ne,L,"\u2276","\\lessgtr",!0),g(v,ne,L,"\u22DA","\\lesseqgtr",!0),g(v,ne,L,"\u2A8B","\\lesseqqgtr",!0),g(v,ne,L,"\u2251","\\doteqdot"),g(v,ne,L,"\u2253","\\risingdotseq",!0),g(v,ne,L,"\u2252","\\fallingdotseq",!0),g(v,ne,L,"\u223D","\\backsim",!0),g(v,ne,L,"\u22CD","\\backsimeq",!0),g(v,ne,L,"\u2AC5","\\subseteqq",!0),g(v,ne,L,"\u22D0","\\Subset",!0),g(v,ne,L,"\u228F","\\sqsubset",!0),g(v,ne,L,"\u227C","\\preccurlyeq",!0),g(v,ne,L,"\u22DE","\\curlyeqprec",!0),g(v,ne,L,"\u227E","\\precsim",!0),g(v,ne,L,"\u2AB7","\\precapprox",!0),g(v,ne,L,"\u22B2","\\vartriangleleft"),g(v,ne,L,"\u22B4","\\trianglelefteq"),g(v,ne,L,"\u22A8","\\vDash",!0),g(v,ne,L,"\u22AA","\\Vvdash",!0),g(v,ne,L,"\u2323","\\smallsmile"),g(v,ne,L,"\u2322","\\smallfrown"),g(v,ne,L,"\u224F","\\bumpeq",!0),g(v,ne,L,"\u224E","\\Bumpeq",!0),g(v,ne,L,"\u2267","\\geqq",!0),g(v,ne,L,"\u2A7E","\\geqslant",!0),g(v,ne,L,"\u2A96","\\eqslantgtr",!0),g(v,ne,L,"\u2273","\\gtrsim",!0),g(v,ne,L,"\u2A86","\\gtrapprox",!0),g(v,ne,ce,"\u22D7","\\gtrdot"),g(v,ne,L,"\u22D9","\\ggg",!0),g(v,ne,L,"\u2277","\\gtrless",!0),g(v,ne,L,"\u22DB","\\gtreqless",!0),g(v,ne,L,"\u2A8C","\\gtreqqless",!0),g(v,ne,L,"\u2256","\\eqcirc",!0),g(v,ne,L,"\u2257","\\circeq",!0),g(v,ne,L,"\u225C","\\triangleq",!0),g(v,ne,L,"\u223C","\\thicksim"),g(v,ne,L,"\u2248","\\thickapprox"),g(v,ne,L,"\u2AC6","\\supseteqq",!0),g(v,ne,L,"\u22D1","\\Supset",!0),g(v,ne,L,"\u2290","\\sqsupset",!0),g(v,ne,L,"\u227D","\\succcurlyeq",!0),g(v,ne,L,"\u22DF","\\curlyeqsucc",!0),g(v,ne,L,"\u227F","\\succsim",!0),g(v,ne,L,"\u2AB8","\\succapprox",!0),g(v,ne,L,"\u22B3","\\vartriangleright"),g(v,ne,L,"\u22B5","\\trianglerighteq"),g(v,ne,L,"\u22A9","\\Vdash",!0),g(v,ne,L,"\u2223","\\shortmid"),g(v,ne,L,"\u2225","\\shortparallel"),g(v,ne,L,"\u226C","\\between",!0),g(v,ne,L,"\u22D4","\\pitchfork",!0),g(v,ne,L,"\u221D","\\varpropto"),g(v,ne,L,"\u25C0","\\blacktriangleleft"),g(v,ne,L,"\u2234","\\therefore",!0),g(v,ne,L,"\u220D","\\backepsilon"),g(v,ne,L,"\u25B6","\\blacktriangleright"),g(v,ne,L,"\u2235","\\because",!0),g(v,ne,L,"\u22D8","\\llless"),g(v,ne,L,"\u22D9","\\gggtr"),g(v,ne,ce,"\u22B2","\\lhd"),g(v,ne,ce,"\u22B3","\\rhd"),g(v,ne,L,"\u2242","\\eqsim",!0),g(v,I,L,"\u22C8","\\Join"),g(v,ne,L,"\u2251","\\Doteq",!0),g(v,ne,ce,"\u2214","\\dotplus",!0),g(v,ne,ce,"\u2216","\\smallsetminus"),g(v,ne,ce,"\u22D2","\\Cap",!0),g(v,ne,ce,"\u22D3","\\Cup",!0),g(v,ne,ce,"\u2A5E","\\doublebarwedge",!0),g(v,ne,ce,"\u229F","\\boxminus",!0),g(v,ne,ce,"\u229E","\\boxplus",!0),g(v,ne,ce,"\u22C7","\\divideontimes",!0),g(v,ne,ce,"\u22C9","\\ltimes",!0),g(v,ne,ce,"\u22CA","\\rtimes",!0),g(v,ne,ce,"\u22CB","\\leftthreetimes",!0),g(v,ne,ce,"\u22CC","\\rightthreetimes",!0),g(v,ne,ce,"\u22CF","\\curlywedge",!0),g(v,ne,ce,"\u22CE","\\curlyvee",!0),g(v,ne,ce,"\u229D","\\circleddash",!0),g(v,ne,ce,"\u229B","\\circledast",!0),g(v,ne,ce,"\u22C5","\\centerdot"),g(v,ne,ce,"\u22BA","\\intercal",!0),g(v,ne,ce,"\u22D2","\\doublecap"),g(v,ne,ce,"\u22D3","\\doublecup"),g(v,ne,ce,"\u22A0","\\boxtimes",!0),g(v,ne,L,"\u21E2","\\dashrightarrow",!0),g(v,ne,L,"\u21E0","\\dashleftarrow",!0),g(v,ne,L,"\u21C7","\\leftleftarrows",!0),g(v,ne,L,"\u21C6","\\leftrightarrows",!0),g(v,ne,L,"\u21DA","\\Lleftarrow",!0),g(v,ne,L,"\u219E","\\twoheadleftarrow",!0),g(v,ne,L,"\u21A2","\\leftarrowtail",!0),g(v,ne,L,"\u21AB","\\looparrowleft",!0),g(v,ne,L,"\u21CB","\\leftrightharpoons",!0),g(v,ne,L,"\u21B6","\\curvearrowleft",!0),g(v,ne,L,"\u21BA","\\circlearrowleft",!0),g(v,ne,L,"\u21B0","\\Lsh",!0),g(v,ne,L,"\u21C8","\\upuparrows",!0),g(v,ne,L,"\u21BF","\\upharpoonleft",!0),g(v,ne,L,"\u21C3","\\downharpoonleft",!0),g(v,ne,L,"\u22B8","\\multimap",!0),g(v,ne,L,"\u21AD","\\leftrightsquigarrow",!0),g(v,ne,L,"\u21C9","\\rightrightarrows",!0),g(v,ne,L,"\u21C4","\\rightleftarrows",!0),g(v,ne,L,"\u21A0","\\twoheadrightarrow",!0),g(v,ne,L,"\u21A3","\\rightarrowtail",!0),g(v,ne,L,"\u21AC","\\looparrowright",!0),g(v,ne,L,"\u21B7","\\curvearrowright",!0),g(v,ne,L,"\u21BB","\\circlearrowright",!0),g(v,ne,L,"\u21B1","\\Rsh",!0),g(v,ne,L,"\u21CA","\\downdownarrows",!0),g(v,ne,L,"\u21BE","\\upharpoonright",!0),g(v,ne,L,"\u21C2","\\downharpoonright",!0),g(v,ne,L,"\u21DD","\\rightsquigarrow",!0),g(v,ne,L,"\u21DD","\\leadsto"),g(v,ne,L,"\u21DB","\\Rrightarrow",!0),g(v,ne,L,"\u21BE","\\restriction"),g(v,I,fe,"\u2018","`"),g(v,I,fe,"$","\\$"),g(Be,I,fe,"$","\\$"),g(Be,I,fe,"$","\\textdollar"),g(v,I,fe,"%","\\%"),g(Be,I,fe,"%","\\%"),g(v,I,fe,"_","\\_"),g(Be,I,fe,"_","\\_"),g(Be,I,fe,"_","\\textunderscore"),g(v,I,fe,"\u2220","\\angle",!0),g(v,I,fe,"\u221E","\\infty",!0),g(v,I,fe,"\u2032","\\prime"),g(v,I,fe,"\u25B3","\\triangle"),g(v,I,fe,"\u0393","\\Gamma",!0),g(v,I,fe,"\u0394","\\Delta",!0),g(v,I,fe,"\u0398","\\Theta",!0),g(v,I,fe,"\u039B","\\Lambda",!0),g(v,I,fe,"\u039E","\\Xi",!0),g(v,I,fe,"\u03A0","\\Pi",!0),g(v,I,fe,"\u03A3","\\Sigma",!0),g(v,I,fe,"\u03A5","\\Upsilon",!0),g(v,I,fe,"\u03A6","\\Phi",!0),g(v,I,fe,"\u03A8","\\Psi",!0),g(v,I,fe,"\u03A9","\\Omega",!0),g(v,I,fe,"A","\u0391"),g(v,I,fe,"B","\u0392"),g(v,I,fe,"E","\u0395"),g(v,I,fe,"Z","\u0396"),g(v,I,fe,"H","\u0397"),g(v,I,fe,"I","\u0399"),g(v,I,fe,"K","\u039A"),g(v,I,fe,"M","\u039C"),g(v,I,fe,"N","\u039D"),g(v,I,fe,"O","\u039F"),g(v,I,fe,"P","\u03A1"),g(v,I,fe,"T","\u03A4"),g(v,I,fe,"X","\u03A7"),g(v,I,fe,"\xAC","\\neg",!0),g(v,I,fe,"\xAC","\\lnot"),g(v,I,fe,"\u22A4","\\top"),g(v,I,fe,"\u22A5","\\bot"),g(v,I,fe,"\u2205","\\emptyset"),g(v,ne,fe,"\u2205","\\varnothing"),g(v,I,B,"\u03B1","\\alpha",!0),g(v,I,B,"\u03B2","\\beta",!0),g(v,I,B,"\u03B3","\\gamma",!0),g(v,I,B,"\u03B4","\\delta",!0),g(v,I,B,"\u03F5","\\epsilon",!0),g(v,I,B,"\u03B6","\\zeta",!0),g(v,I,B,"\u03B7","\\eta",!0),g(v,I,B,"\u03B8","\\theta",!0),g(v,I,B,"\u03B9","\\iota",!0),g(v,I,B,"\u03BA","\\kappa",!0),g(v,I,B,"\u03BB","\\lambda",!0),g(v,I,B,"\u03BC","\\mu",!0),g(v,I,B,"\u03BD","\\nu",!0),g(v,I,B,"\u03BE","\\xi",!0),g(v,I,B,"\u03BF","\\omicron",!0),g(v,I,B,"\u03C0","\\pi",!0),g(v,I,B,"\u03C1","\\rho",!0),g(v,I,B,"\u03C3","\\sigma",!0),g(v,I,B,"\u03C4","\\tau",!0),g(v,I,B,"\u03C5","\\upsilon",!0),g(v,I,B,"\u03D5","\\phi",!0),g(v,I,B,"\u03C7","\\chi",!0),g(v,I,B,"\u03C8","\\psi",!0),g(v,I,B,"\u03C9","\\omega",!0),g(v,I,B,"\u03B5","\\varepsilon",!0),g(v,I,B,"\u03D1","\\vartheta",!0),g(v,I,B,"\u03D6","\\varpi",!0),g(v,I,B,"\u03F1","\\varrho",!0),g(v,I,B,"\u03C2","\\varsigma",!0),g(v,I,B,"\u03C6","\\varphi",!0),g(v,I,ce,"\u2217","*"),g(v,I,ce,"+","+"),g(v,I,ce,"\u2212","-"),g(v,I,ce,"\u22C5","\\cdot",!0),g(v,I,ce,"\u2218","\\circ"),g(v,I,ce,"\xF7","\\div",!0),g(v,I,ce,"\xB1","\\pm",!0),g(v,I,ce,"\xD7","\\times",!0),g(v,I,ce,"\u2229","\\cap",!0),g(v,I,ce,"\u222A","\\cup",!0),g(v,I,ce,"\u2216","\\setminus"),g(v,I,ce,"\u2227","\\land"),g(v,I,ce,"\u2228","\\lor"),g(v,I,ce,"\u2227","\\wedge",!0),g(v,I,ce,"\u2228","\\vee",!0),g(v,I,fe,"\u221A","\\surd"),g(v,I,oe,"(","("),g(v,I,oe,"[","["),g(v,I,oe,"\u27E8","\\langle",!0),g(v,I,oe,"\u2223","\\lvert"),g(v,I,oe,"\u2225","\\lVert"),g(v,I,xe,")",")"),g(v,I,xe,"]","]"),g(v,I,xe,"?","?"),g(v,I,xe,"!","!"),g(v,I,xe,"\u27E9","\\rangle",!0),g(v,I,xe,"\u2223","\\rvert"),g(v,I,xe,"\u2225","\\rVert"),g(v,I,L,"=","="),g(v,I,L,"<","<"),g(v,I,L,">",">"),g(v,I,L,":",":"),g(v,I,L,"\u2248","\\approx",!0),g(v,I,L,"\u2245","\\cong",!0),g(v,I,L,"\u2265","\\ge"),g(v,I,L,"\u2265","\\geq",!0),g(v,I,L,"\u2190","\\gets"),g(v,I,L,">","\\gt"),g(v,I,L,"\u2208","\\in",!0),g(v,I,L,"\uE020","\\@not"),g(v,I,L,"\u2282","\\subset",!0),g(v,I,L,"\u2283","\\supset",!0),g(v,I,L,"\u2286","\\subseteq",!0),g(v,I,L,"\u2287","\\supseteq",!0),g(v,ne,L,"\u2288","\\nsubseteq",!0),g(v,ne,L,"\u2289","\\nsupseteq",!0),g(v,I,L,"\u22A8","\\models"),g(v,I,L,"\u2190","\\leftarrow",!0),g(v,I,L,"\u2264","\\le"),g(v,I,L,"\u2264","\\leq",!0),g(v,I,L,"<","\\lt"),g(v,I,L,"\u2192","\\rightarrow",!0),g(v,I,L,"\u2192","\\to"),g(v,ne,L,"\u2271","\\ngeq",!0),g(v,ne,L,"\u2270","\\nleq",!0),g(v,I,pt,"\xA0","\\ "),g(v,I,pt,"\xA0","~"),g(v,I,pt,"\xA0","\\space"),g(v,I,pt,"\xA0","\\nobreakspace"),g(Be,I,pt,"\xA0","\\ "),g(Be,I,pt,"\xA0","~"),g(Be,I,pt,"\xA0","\\space"),g(Be,I,pt,"\xA0","\\nobreakspace"),g(v,I,pt,null,"\\nobreak"),g(v,I,pt,null,"\\allowbreak"),g(v,I,ye,",",","),g(v,I,ye,";",";"),g(v,ne,ce,"\u22BC","\\barwedge",!0),g(v,ne,ce,"\u22BB","\\veebar",!0),g(v,I,ce,"\u2299","\\odot",!0),g(v,I,ce,"\u2295","\\oplus",!0),g(v,I,ce,"\u2297","\\otimes",!0),g(v,I,fe,"\u2202","\\partial",!0),g(v,I,ce,"\u2298","\\oslash",!0),g(v,ne,ce,"\u229A","\\circledcirc",!0),g(v,ne,ce,"\u22A1","\\boxdot",!0),g(v,I,ce,"\u25B3","\\bigtriangleup"),g(v,I,ce,"\u25BD","\\bigtriangledown"),g(v,I,ce,"\u2020","\\dagger"),g(v,I,ce,"\u22C4","\\diamond"),g(v,I,ce,"\u22C6","\\star"),g(v,I,ce,"\u25C3","\\triangleleft"),g(v,I,ce,"\u25B9","\\triangleright"),g(v,I,oe,"{","\\{"),g(Be,I,fe,"{","\\{"),g(Be,I,fe,"{","\\textbraceleft"),g(v,I,xe,"}","\\}"),g(Be,I,fe,"}","\\}"),g(Be,I,fe,"}","\\textbraceright"),g(v,I,oe,"{","\\lbrace"),g(v,I,xe,"}","\\rbrace"),g(v,I,oe,"[","\\lbrack"),g(Be,I,fe,"[","\\lbrack"),g(v,I,xe,"]","\\rbrack"),g(Be,I,fe,"]","\\rbrack"),g(v,I,oe,"(","\\lparen"),g(v,I,xe,")","\\rparen"),g(Be,I,fe,"<","\\textless"),g(Be,I,fe,">","\\textgreater"),g(v,I,oe,"\u230A","\\lfloor",!0),g(v,I,xe,"\u230B","\\rfloor",!0),g(v,I,oe,"\u2308","\\lceil",!0),g(v,I,xe,"\u2309","\\rceil",!0),g(v,I,fe,"\\","\\backslash"),g(v,I,fe,"\u2223","|"),g(v,I,fe,"\u2223","\\vert"),g(Be,I,fe,"|","\\textbar"),g(v,I,fe,"\u2225","\\|"),g(v,I,fe,"\u2225","\\Vert"),g(Be,I,fe,"\u2225","\\textbardbl"),g(Be,I,fe,"~","\\textasciitilde"),g(Be,I,fe,"\\","\\textbackslash"),g(Be,I,fe,"^","\\textasciicircum"),g(v,I,L,"\u2191","\\uparrow",!0),g(v,I,L,"\u21D1","\\Uparrow",!0),g(v,I,L,"\u2193","\\downarrow",!0),g(v,I,L,"\u21D3","\\Downarrow",!0),g(v,I,L,"\u2195","\\updownarrow",!0),g(v,I,L,"\u21D5","\\Updownarrow",!0),g(v,I,q,"\u2210","\\coprod"),g(v,I,q,"\u22C1","\\bigvee"),g(v,I,q,"\u22C0","\\bigwedge"),g(v,I,q,"\u2A04","\\biguplus"),g(v,I,q,"\u22C2","\\bigcap"),g(v,I,q,"\u22C3","\\bigcup"),g(v,I,q,"\u222B","\\int"),g(v,I,q,"\u222B","\\intop"),g(v,I,q,"\u222C","\\iint"),g(v,I,q,"\u222D","\\iiint"),g(v,I,q,"\u220F","\\prod"),g(v,I,q,"\u2211","\\sum"),g(v,I,q,"\u2A02","\\bigotimes"),g(v,I,q,"\u2A01","\\bigoplus"),g(v,I,q,"\u2A00","\\bigodot"),g(v,I,q,"\u222E","\\oint"),g(v,I,q,"\u222F","\\oiint"),g(v,I,q,"\u2230","\\oiiint"),g(v,I,q,"\u2A06","\\bigsqcup"),g(v,I,q,"\u222B","\\smallint"),g(Be,I,Ue,"\u2026","\\textellipsis"),g(v,I,Ue,"\u2026","\\mathellipsis"),g(Be,I,Ue,"\u2026","\\ldots",!0),g(v,I,Ue,"\u2026","\\ldots",!0),g(v,I,Ue,"\u22EF","\\@cdots",!0),g(v,I,Ue,"\u22F1","\\ddots",!0),g(v,I,fe,"\u22EE","\\varvdots"),g(v,I,bt,"\u02CA","\\acute"),g(v,I,bt,"\u02CB","\\grave"),g(v,I,bt,"\xA8","\\ddot"),g(v,I,bt,"~","\\tilde"),g(v,I,bt,"\u02C9","\\bar"),g(v,I,bt,"\u02D8","\\breve"),g(v,I,bt,"\u02C7","\\check"),g(v,I,bt,"^","\\hat"),g(v,I,bt,"\u20D7","\\vec"),g(v,I,bt,"\u02D9","\\dot"),g(v,I,bt,"\u02DA","\\mathring"),g(v,I,B,"\u0131","\\imath",!0),g(v,I,B,"\u0237","\\jmath",!0),g(Be,I,fe,"\u0131","\\i",!0),g(Be,I,fe,"\u0237","\\j",!0),g(Be,I,fe,"\xDF","\\ss",!0),g(Be,I,fe,"\xE6","\\ae",!0),g(Be,I,fe,"\xE6","\\ae",!0),g(Be,I,fe,"\u0153","\\oe",!0),g(Be,I,fe,"\xF8","\\o",!0),g(Be,I,fe,"\xC6","\\AE",!0),g(Be,I,fe,"\u0152","\\OE",!0),g(Be,I,fe,"\xD8","\\O",!0),g(Be,I,bt,"\u02CA","\\'"),g(Be,I,bt,"\u02CB","\\`"),g(Be,I,bt,"\u02C6","\\^"),g(Be,I,bt,"\u02DC","\\~"),g(Be,I,bt,"\u02C9","\\="),g(Be,I,bt,"\u02D8","\\u"),g(Be,I,bt,"\u02D9","\\."),g(Be,I,bt,"\u02DA","\\r"),g(Be,I,bt,"\u02C7","\\v"),g(Be,I,bt,"\xA8",'\\"'),g(Be,I,bt,"\u02DD","\\H"),g(Be,I,bt,"\u25EF","\\textcircled");var Et={"--":!0,"---":!0,"``":!0,"''":!0};g(Be,I,fe,"\u2013","--"),g(Be,I,fe,"\u2013","\\textendash"),g(Be,I,fe,"\u2014","---"),g(Be,I,fe,"\u2014","\\textemdash"),g(Be,I,fe,"\u2018","`"),g(Be,I,fe,"\u2018","\\textquoteleft"),g(Be,I,fe,"\u2019","'"),g(Be,I,fe,"\u2019","\\textquoteright"),g(Be,I,fe,"\u201C","``"),g(Be,I,fe,"\u201C","\\textquotedblleft"),g(Be,I,fe,"\u201D","''"),g(Be,I,fe,"\u201D","\\textquotedblright"),g(v,I,fe,"\xB0","\\degree",!0),g(Be,I,fe,"\xB0","\\degree"),g(Be,I,fe,"\xB0","\\textdegree",!0),g(v,I,B,"\xA3","\\pounds"),g(v,I,B,"\xA3","\\mathsterling",!0),g(Be,I,B,"\xA3","\\pounds"),g(Be,I,B,"\xA3","\\textsterling",!0),g(v,ne,fe,"\u2720","\\maltese"),g(Be,ne,fe,"\u2720","\\maltese"),g(Be,I,pt,"\xA0","\\ "),g(Be,I,pt,"\xA0"," "),g(Be,I,pt,"\xA0","~");for(var It='0123456789/@."',Ut=0;Ut<It.length;Ut++){var yr=It.charAt(Ut);g(v,I,fe,yr,yr)}for(var Kt='0123456789!@*()-=+[]<>|";:?/.,',Pt=0;Pt<Kt.length;Pt++){var br=Kt.charAt(Pt);g(Be,I,fe,br,br)}for(var wr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Gr=0;Gr<wr.length;Gr++){var zr=wr.charAt(Gr);g(v,I,B,zr,zr),g(Be,I,fe,zr,zr)}g(v,ne,fe,"C","\u2102"),g(Be,ne,fe,"C","\u2102"),g(v,ne,fe,"H","\u210D"),g(Be,ne,fe,"H","\u210D"),g(v,ne,fe,"N","\u2115"),g(Be,ne,fe,"N","\u2115"),g(v,ne,fe,"P","\u2119"),g(Be,ne,fe,"P","\u2119"),g(v,ne,fe,"Q","\u211A"),g(Be,ne,fe,"Q","\u211A"),g(v,ne,fe,"R","\u211D"),g(Be,ne,fe,"R","\u211D"),g(v,ne,fe,"Z","\u2124"),g(Be,ne,fe,"Z","\u2124"),g(v,I,B,"h","\u210E"),g(Be,I,B,"h","\u210E");for(var kt="",qt=0;qt<wr.length;qt++){var mr=wr.charAt(qt);kt=String.fromCharCode(55349,56320+qt),g(v,I,B,mr,kt),g(Be,I,fe,mr,kt),kt=String.fromCharCode(55349,56372+qt),g(v,I,B,mr,kt),g(Be,I,fe,mr,kt),kt=String.fromCharCode(55349,56424+qt),g(v,I,B,mr,kt),g(Be,I,fe,mr,kt),kt=String.fromCharCode(55349,56580+qt),g(v,I,B,mr,kt),g(Be,I,fe,mr,kt),kt=String.fromCharCode(55349,56736+qt),g(v,I,B,mr,kt),g(Be,I,fe,mr,kt),kt=String.fromCharCode(55349,56788+qt),g(v,I,B,mr,kt),g(Be,I,fe,mr,kt),kt=String.fromCharCode(55349,56840+qt),g(v,I,B,mr,kt),g(Be,I,fe,mr,kt),kt=String.fromCharCode(55349,56944+qt),g(v,I,B,mr,kt),g(Be,I,fe,mr,kt),qt<26&&(kt=String.fromCharCode(55349,56632+qt),g(v,I,B,mr,kt),g(Be,I,fe,mr,kt),kt=String.fromCharCode(55349,56476+qt),g(v,I,B,mr,kt),g(Be,I,fe,mr,kt))}kt="\u{1D55C}",g(v,I,B,"k",kt),g(Be,I,fe,"k",kt);for(var jr=0;jr<10;jr++){var Or=jr.toString();kt=String.fromCharCode(55349,57294+jr),g(v,I,B,Or,kt),g(Be,I,fe,Or,kt),kt=String.fromCharCode(55349,57314+jr),g(v,I,B,Or,kt),g(Be,I,fe,Or,kt),kt=String.fromCharCode(55349,57324+jr),g(v,I,B,Or,kt),g(Be,I,fe,Or,kt),kt=String.fromCharCode(55349,57334+jr),g(v,I,B,Or,kt),g(Be,I,fe,Or,kt)}for(var tn="\xC7\xD0\xDE\xE7\xFE",lr=0;lr<tn.length;lr++){var wn=tn.charAt(lr);g(v,I,B,wn,wn),g(Be,I,fe,wn,wn)}g(Be,I,fe,"\xF0","\xF0"),g(Be,I,fe,"\u2013","\u2013"),g(Be,I,fe,"\u2014","\u2014"),g(Be,I,fe,"\u2018","\u2018"),g(Be,I,fe,"\u2019","\u2019"),g(Be,I,fe,"\u201C","\u201C"),g(Be,I,fe,"\u201D","\u201D");var rn=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathdefault","textit","Math-Italic"],["mathdefault","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["","",""],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],zt=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Tt=function(o,c){var h=o.charCodeAt(0),p=o.charCodeAt(1),E=(h-55296)*1024+(p-56320)+65536,D=c==="math"?0:1;if(119808<=E&&E<120484){var J=Math.floor((E-119808)/26);return[rn[J][2],rn[J][D]]}else if(120782<=E&&E<=120831){var le=Math.floor((E-120782)/10);return[zt[le][2],zt[le][D]]}else{if(E===120485||E===120486)return[rn[0][2],rn[0][D]];if(120486<E&&E<120782)return["",""];throw new ue("Unsupported character: "+o)}},Qt=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],Er=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],_r=function(o,c){return c.size<2?o:Qt[o-1][c.size-1]},Wr=function(){function k(c){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=void 0,this.style=c.style,this.color=c.color,this.size=c.size||k.BASESIZE,this.textSize=c.textSize||this.size,this.phantom=!!c.phantom,this.font=c.font||"",this.fontFamily=c.fontFamily||"",this.fontWeight=c.fontWeight||"",this.fontShape=c.fontShape||"",this.sizeMultiplier=Er[this.size-1],this.maxSize=c.maxSize,this.minRuleThickness=c.minRuleThickness,this._fontMetrics=void 0}var o=k.prototype;return o.extend=function(h){var p={style:this.style,size:this.size,textSize:this.textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var E in h)h.hasOwnProperty(E)&&(p[E]=h[E]);return new k(p)},o.havingStyle=function(h){return this.style===h?this:this.extend({style:h,size:_r(this.textSize,h)})},o.havingCrampedStyle=function(){return this.havingStyle(this.style.cramp())},o.havingSize=function(h){return this.size===h&&this.textSize===h?this:this.extend({style:this.style.text(),size:h,textSize:h,sizeMultiplier:Er[h-1]})},o.havingBaseStyle=function(h){h=h||this.style.text();var p=_r(k.BASESIZE,h);return this.size===p&&this.textSize===k.BASESIZE&&this.style===h?this:this.extend({style:h,size:p})},o.havingBaseSizing=function(){var h;switch(this.style.id){case 4:case 5:h=3;break;case 6:case 7:h=1;break;default:h=6}return this.extend({style:this.style.text(),size:h})},o.withColor=function(h){return this.extend({color:h})},o.withPhantom=function(){return this.extend({phantom:!0})},o.withFont=function(h){return this.extend({font:h})},o.withTextFontFamily=function(h){return this.extend({fontFamily:h,font:""})},o.withTextFontWeight=function(h){return this.extend({fontWeight:h,font:""})},o.withTextFontShape=function(h){return this.extend({fontShape:h,font:""})},o.sizingClasses=function(h){return h.size!==this.size?["sizing","reset-size"+h.size,"size"+this.size]:[]},o.baseSizingClasses=function(){return this.size!==k.BASESIZE?["sizing","reset-size"+this.size,"size"+k.BASESIZE]:[]},o.fontMetrics=function(){return this._fontMetrics||(this._fontMetrics=st(this.size)),this._fontMetrics},o.getColor=function(){return this.phantom?"transparent":this.color},k}();Wr.BASESIZE=6;var Mn=Wr,Vr={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Tr={ex:!0,em:!0,mu:!0},Pr=function(o){return typeof o!="string"&&(o=o.unit),o in Vr||o in Tr||o==="ex"},hr=function(o,c){var h;if(o.unit in Vr)h=Vr[o.unit]/c.fontMetrics().ptPerEm/c.sizeMultiplier;else if(o.unit==="mu")h=c.fontMetrics().cssEmPerMu;else{var p;if(c.style.isTight()?p=c.havingStyle(c.style.text()):p=c,o.unit==="ex")h=p.fontMetrics().xHeight;else if(o.unit==="em")h=p.fontMetrics().quad;else throw new ue("Invalid unit: '"+o.unit+"'");p!==c&&(h*=p.sizeMultiplier/c.sizeMultiplier)}return Math.min(o.number*h,c.maxSize)},nn=["\\imath","\u0131","\\jmath","\u0237","\\pounds","\\mathsterling","\\textsterling","\xA3"],fn=function(o,c,h){return rt[h][o]&&rt[h][o].replace&&(o=rt[h][o].replace),{value:o,metrics:Ye(o,c,h)}},Kr=function(o,c,h,p,E){var D=fn(o,c,h),J=D.metrics;o=D.value;var le;if(J){var _e=J.italic;(h==="text"||p&&p.font==="mathit")&&(_e=0),le=new K(o,J.height,J.depth,_e,J.skew,J.width,E)}else typeof console!="undefined"&&console.warn("No character metrics "+("for '"+o+"' in style '"+c+"' and mode '"+h+"'")),le=new K(o,0,0,0,0,0,E);if(p){le.maxFontSize=p.sizeMultiplier,p.style.isTight()&&le.classes.push("mtight");var Ke=p.getColor();Ke&&(le.style.color=Ke)}return le},rr=function(o,c,h,p){return p===void 0&&(p=[]),h.font==="boldsymbol"&&fn(o,"Main-Bold",c).metrics?Kr(o,"Main-Bold",c,h,p.concat(["mathbf"])):o==="\\"||rt[c][o].font==="main"?Kr(o,"Main-Regular",c,h,p):Kr(o,"AMS-Regular",c,h,p.concat(["amsrm"]))},ur=function(o,c,h,p){return/[0-9]/.test(o.charAt(0))||M.contains(nn,o)?{fontName:"Main-Italic",fontClass:"mathit"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},Dr=function(o,c,h,p){return M.contains(nn,o)?{fontName:"Main-Italic",fontClass:"mathit"}:/[0-9]/.test(o.charAt(0))?{fontName:"Caligraphic-Regular",fontClass:"mathcal"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},Rr=function(o,c,h,p){return fn(o,"Math-BoldItalic",c).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},Sr=function(o,c,h){var p=o.mode,E=o.text,D=["mord"],J=p==="math"||p==="text"&&c.font,le=J?c.font:c.fontFamily;if(E.charCodeAt(0)===55349){var _e=Tt(E,p),Ke=_e[0],Je=_e[1];return Kr(E,Ke,p,c,D.concat(Je))}else if(le){var lt,gt;if(le==="boldsymbol"||le==="mathnormal"){var xt=le==="boldsymbol"?Rr(E,p,c,D):Dr(E,p,c,D);lt=xt.fontName,gt=[xt.fontClass]}else M.contains(nn,E)?(lt="Main-Italic",gt=["mathit"]):J?(lt=wi[le].fontName,gt=[le]):(lt=ai(le,c.fontWeight,c.fontShape),gt=[le,c.fontWeight,c.fontShape]);if(fn(E,lt,p).metrics)return Kr(E,lt,p,c,D.concat(gt));if(Et.hasOwnProperty(E)&&lt.substr(0,10)==="Typewriter"){for(var Ct=[],Ht=0;Ht<E.length;Ht++)Ct.push(Kr(E[Ht],lt,p,c,D.concat(gt)));return Kn(Ct)}}if(h==="mathord"){var er=ur(E,p,c,D);return Kr(E,er.fontName,p,c,D.concat([er.fontClass]))}else if(h==="textord"){var nr=rt[p][E]&&rt[p][E].font;if(nr==="ams"){var tr=ai("amsrm",c.fontWeight,c.fontShape);return Kr(E,tr,p,c,D.concat("amsrm",c.fontWeight,c.fontShape))}else if(nr==="main"||!nr){var Lr=ai("textrm",c.fontWeight,c.fontShape);return Kr(E,Lr,p,c,D.concat(c.fontWeight,c.fontShape))}else{var Ir=ai(nr,c.fontWeight,c.fontShape);return Kr(E,Ir,p,c,D.concat(Ir,c.fontWeight,c.fontShape))}}else throw new Error("unexpected type: "+h+" in makeOrd")},an=function(o,c){if(Mt(o.classes)!==Mt(c.classes)||o.skew!==c.skew||o.maxFontSize!==c.maxFontSize)return!1;for(var h in o.style)if(o.style.hasOwnProperty(h)&&o.style[h]!==c.style[h])return!1;for(var p in c.style)if(c.style.hasOwnProperty(p)&&o.style[p]!==c.style[p])return!1;return!0},yi=function(o){for(var c=0;c<o.length-1;c++){var h=o[c],p=o[c+1];h instanceof K&&p instanceof K&&an(h,p)&&(h.text+=p.text,h.height=Math.max(h.height,p.height),h.depth=Math.max(h.depth,p.depth),h.italic=p.italic,o.splice(c+1,1),c--)}return o},Ln=function(o){for(var c=0,h=0,p=0,E=0;E<o.children.length;E++){var D=o.children[E];D.height>c&&(c=D.height),D.depth>h&&(h=D.depth),D.maxFontSize>p&&(p=D.maxFontSize)}o.height=c,o.depth=h,o.maxFontSize=p},fr=function(o,c,h,p){var E=new se(o,c,h,p);return Ln(E),E},gr=function(o,c,h,p){return new se(o,c,h,p)},Bn=function(o,c,h){var p=fr([o],[],c);return p.height=Math.max(h||c.fontMetrics().defaultRuleThickness,c.minRuleThickness),p.style.borderBottomWidth=p.height+"em",p.maxFontSize=1,p},Jr=function(o,c,h,p){var E=new Pe(o,c,h,p);return Ln(E),E},Kn=function(o){var c=new Vt(o);return Ln(c),c},bi=function(o,c){return o instanceof Vt?fr([],[o],c):o},Ci=function(o){if(o.positionType==="individualShift"){for(var c=o.children,h=[c[0]],p=-c[0].shift-c[0].elem.depth,E=p,D=1;D<c.length;D++){var J=-c[D].shift-E-c[D].elem.depth,le=J-(c[D-1].elem.height+c[D-1].elem.depth);E=E+J,h.push({type:"kern",size:le}),h.push(c[D])}return{children:h,depth:p}}var _e;if(o.positionType==="top"){for(var Ke=o.positionData,Je=0;Je<o.children.length;Je++){var lt=o.children[Je];Ke-=lt.type==="kern"?lt.size:lt.elem.height+lt.elem.depth}_e=Ke}else if(o.positionType==="bottom")_e=-o.positionData;else{var gt=o.children[0];if(gt.type!=="elem")throw new Error('First child must have type "elem".');if(o.positionType==="shift")_e=-gt.elem.depth-o.positionData;else if(o.positionType==="firstBaseline")_e=-gt.elem.depth;else throw new Error("Invalid positionType "+o.positionType+".")}return{children:o.children,depth:_e}},xi=function(o,c){for(var h=Ci(o),p=h.children,E=h.depth,D=0,J=0;J<p.length;J++){var le=p[J];if(le.type==="elem"){var _e=le.elem;D=Math.max(D,_e.maxFontSize,_e.height)}}D+=2;var Ke=fr(["pstrut"],[]);Ke.style.height=D+"em";for(var Je=[],lt=E,gt=E,xt=E,Ct=0;Ct<p.length;Ct++){var Ht=p[Ct];if(Ht.type==="kern")xt+=Ht.size;else{var er=Ht.elem,nr=Ht.wrapperClasses||[],tr=Ht.wrapperStyle||{},Lr=fr(nr,[Ke,er],void 0,tr);Lr.style.top=-D-xt-er.depth+"em",Ht.marginLeft&&(Lr.style.marginLeft=Ht.marginLeft),Ht.marginRight&&(Lr.style.marginRight=Ht.marginRight),Je.push(Lr),xt+=er.height+er.depth}lt=Math.min(lt,xt),gt=Math.max(gt,xt)}var Ir=fr(["vlist"],Je);Ir.style.height=gt+"em";var $r;if(lt<0){var Hr=fr([],[]),Xr=fr(["vlist"],[Hr]);Xr.style.height=-lt+"em";var yn=fr(["vlist-s"],[new K("\u200B")]);$r=[fr(["vlist-r"],[Ir,yn]),fr(["vlist-r"],[Xr])]}else $r=[fr(["vlist-r"],[Ir])];var hn=fr(["vlist-t"],$r);return $r.length===2&&hn.classes.push("vlist-t2"),hn.height=gt,hn.depth=-lt,hn},dn=function(o,c){var h=fr(["mspace"],[],c),p=hr(o,c);return h.style.marginRight=p+"em",h},ai=function(o,c,h){var p="";switch(o){case"amsrm":p="AMS";break;case"textrm":p="Main";break;case"textsf":p="SansSerif";break;case"texttt":p="Typewriter";break;default:p=o}var E;return c==="textbf"&&h==="textit"?E="BoldItalic":c==="textbf"?E="Bold":c==="textit"?E="Italic":E="Regular",p+"-"+E},wi={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Main-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"Typewriter-Regular"}},Qn={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},or=function(o,c){var h=Qn[o],p=h[0],E=h[1],D=h[2],J=new $(p),le=new te([J],{width:E+"em",height:D+"em",style:"width:"+E+"em",viewBox:"0 0 "+1e3*E+" "+1e3*D,preserveAspectRatio:"xMinYMin"}),_e=gr(["overlay"],[le],c);return _e.height=D,_e.style.height=D+"em",_e.style.width=E+"em",_e},Ve={fontMap:wi,makeSymbol:Kr,mathsym:rr,makeSpan:fr,makeSvgSpan:gr,makeLineSpan:Bn,makeAnchor:Jr,makeFragment:Kn,wrapFragment:bi,makeVList:xi,makeOrd:Sr,makeGlue:dn,staticSvg:or,svgData:Qn,tryCombineChars:yi};function Zt(k,o){var c=Fr(k,o);if(!c)throw new Error("Expected node of type "+o+", but got "+(k?"node of type "+k.type:String(k)));return c}function Fr(k,o){return k&&k.type===o?k:null}function Hn(k,o){var c=oi(k,o);if(!c)throw new Error('Expected node of type "atom" and family "'+o+'", but got '+(k?k.type==="atom"?"atom of family "+k.family:"node of type "+k.type:String(k)));return c}function oi(k,o){return k&&k.type==="atom"&&k.family===o?k:null}function li(k){var o=En(k);if(!o)throw new Error("Expected node of symbol group type, but got "+(k?"node of type "+k.type:String(k)));return o}function En(k){return k&&(k.type==="atom"||ht.hasOwnProperty(k.type))?k:null}var vr={number:3,unit:"mu"},Sn={number:4,unit:"mu"},In={number:5,unit:"mu"},Yr={mord:{mop:vr,mbin:Sn,mrel:In,minner:vr},mop:{mord:vr,mop:vr,mrel:In,minner:vr},mbin:{mord:Sn,mop:Sn,mopen:Sn,minner:Sn},mrel:{mord:In,mop:In,mopen:In,minner:In},mopen:{},mclose:{mop:vr,mbin:Sn,mrel:In,minner:vr},mpunct:{mord:vr,mop:vr,mrel:In,mopen:vr,mclose:vr,mpunct:vr,minner:vr},minner:{mord:vr,mop:vr,mbin:Sn,mrel:In,mopen:vr,mpunct:vr,minner:vr}},pn={mord:{mop:vr},mop:{mord:vr,mop:vr},mbin:{},mrel:{},mopen:{},mclose:{mop:vr},mpunct:{},minner:{mop:vr}},$i={},Wn={},ei={};function Bt(k){for(var o=k.type,c=k.names,h=k.props,p=k.handler,E=k.htmlBuilder,D=k.mathmlBuilder,J={type:o,numArgs:h.numArgs,argTypes:h.argTypes,greediness:h.greediness===void 0?1:h.greediness,allowedInText:!!h.allowedInText,allowedInMath:h.allowedInMath===void 0?!0:h.allowedInMath,numOptionalArgs:h.numOptionalArgs||0,infix:!!h.infix,handler:p},le=0;le<c.length;++le)$i[c[le]]=J;o&&(E&&(Wn[o]=E),D&&(ei[o]=D))}function Dn(k){var o=k.type,c=k.htmlBuilder,h=k.mathmlBuilder;Bt({type:o,names:[],props:{numArgs:0},handler:function(){throw new Error("Should never be called.")},htmlBuilder:c,mathmlBuilder:h})}var Qr=function(o){var c=Fr(o,"ordgroup");return c?c.body:[o]},mn=Ve.makeSpan,Gi=["leftmost","mbin","mopen","mrel","mop","mpunct"],ti=["rightmost","mrel","mclose","mpunct"],Vn={display:x.DISPLAY,text:x.TEXT,script:x.SCRIPT,scriptscript:x.SCRIPTSCRIPT},Nn={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},qr=function(o,c,h,p){p===void 0&&(p=[null,null]);for(var E=[],D=0;D<o.length;D++){var J=cr(o[D],c);if(J instanceof Vt){var le=J.children;E.push.apply(E,le)}else E.push(J)}if(!h)return E;var _e=c;if(o.length===1){var Ke=Fr(o[0],"sizing")||Fr(o[0],"styling");Ke&&(Ke.type==="sizing"?_e=c.havingSize(Ke.size):Ke.type==="styling"&&(_e=c.havingStyle(Vn[Ke.style])))}var Je=mn([p[0]||"leftmost"],[],c),lt=mn([p[1]||"rightmost"],[],c);return Un(E,function(gt,xt){var Ct=xt.classes[0],Ht=gt.classes[0];Ct==="mbin"&&M.contains(ti,Ht)?xt.classes[0]="mord":Ht==="mbin"&&M.contains(Gi,Ct)&&(gt.classes[0]="mord")},{node:Je},lt),Un(E,function(gt,xt){var Ct=gn(xt),Ht=gn(gt),er=Ct&&Ht?gt.hasClass("mtight")?pn[Ct][Ht]:Yr[Ct][Ht]:null;if(er)return Ve.makeGlue(er,_e)},{node:Je},lt),E},Un=function k(o,c,h,p){p&&o.push(p);for(var E=0;E<o.length;E++){var D=o[E],J=On(D);if(J){k(J.children,c,h);continue}if(D.classes[0]!=="mspace"){var le=c(D,h.node);le&&(h.insertAfter?h.insertAfter(le):(o.unshift(le),E++)),h.node=D,h.insertAfter=function(_e){return function(Ke){o.splice(_e+1,0,Ke),E++}}(E)}}p&&o.pop()},On=function(o){return o instanceof Vt||o instanceof Pe?o:null},Ri=function k(o,c){var h=On(o);if(h){var p=h.children;if(p.length){if(c==="right")return k(p[p.length-1],"right");if(c==="left")return k(p[0],"left")}}return o},gn=function(o,c){return o?(c&&(o=Ri(o,c)),Nn[o.classes[0]]||null):null},An=function(o,c){var h=["nulldelimiter"].concat(o.baseSizingClasses());return mn(c.concat(h))},cr=function(o,c,h){if(!o)return mn();if(Wn[o.type]){var p=Wn[o.type](o,c);if(h&&c.size!==h.size){p=mn(c.sizingClasses(h),[p],c);var E=c.sizeMultiplier/h.sizeMultiplier;p.height*=E,p.depth*=E}return p}else throw new ue("Got group of unknown type: '"+o.type+"'")};function ui(k,o){var c=mn(["base"],k,o),h=mn(["strut"]);return h.style.height=c.height+c.depth+"em",h.style.verticalAlign=-c.depth+"em",c.children.unshift(h),c}function Li(k,o){var c=null;k.length===1&&k[0].type==="tag"&&(c=k[0].tag,k=k[0].body);for(var h=qr(k,o,!0),p=[],E=[],D=0;D<h.length;D++)if(E.push(h[D]),h[D].hasClass("mbin")||h[D].hasClass("mrel")||h[D].hasClass("allowbreak")){for(var J=!1;D<h.length-1&&h[D+1].hasClass("mspace")&&!h[D+1].hasClass("newline");)D++,E.push(h[D]),h[D].hasClass("nobreak")&&(J=!0);J||(p.push(ui(E,o)),E=[])}else h[D].hasClass("newline")&&(E.pop(),E.length>0&&(p.push(ui(E,o)),E=[]),p.push(h[D]));E.length>0&&p.push(ui(E,o));var le;c&&(le=ui(qr(c,o,!0)),le.classes=["tag"],p.push(le));var _e=mn(["katex-html"],p);if(_e.setAttribute("aria-hidden","true"),le){var Ke=le.children[0];Ke.style.height=_e.height+_e.depth+"em",Ke.style.verticalAlign=-_e.depth+"em"}return _e}function Ii(k){return new Vt(k)}var _n=function(){function k(c,h){this.type=void 0,this.attributes=void 0,this.children=void 0,this.type=c,this.attributes={},this.children=h||[]}var o=k.prototype;return o.setAttribute=function(h,p){this.attributes[h]=p},o.getAttribute=function(h){return this.attributes[h]},o.toNode=function(){var h=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var p in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,p)&&h.setAttribute(p,this.attributes[p]);for(var E=0;E<this.children.length;E++)h.appendChild(this.children[E].toNode());return h},o.toMarkup=function(){var h="<"+this.type;for(var p in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,p)&&(h+=" "+p+'="',h+=M.escape(this.attributes[p]),h+='"');h+=">";for(var E=0;E<this.children.length;E++)h+=this.children[E].toMarkup();return h+="</"+this.type+">",h},o.toText=function(){return this.children.map(function(h){return h.toText()}).join("")},k}(),ci=function(){function k(c){this.text=void 0,this.text=c}var o=k.prototype;return o.toNode=function(){return document.createTextNode(this.text)},o.toMarkup=function(){return M.escape(this.toText())},o.toText=function(){return this.text},k}(),ji=function(){function k(c){this.width=void 0,this.character=void 0,this.width=c,c>=.05555&&c<=.05556?this.character="\u200A":c>=.1666&&c<=.1667?this.character="\u2009":c>=.2222&&c<=.2223?this.character="\u2005":c>=.2777&&c<=.2778?this.character="\u2005\u200A":c>=-.05556&&c<=-.05555?this.character="\u200A\u2063":c>=-.1667&&c<=-.1666?this.character="\u2009\u2063":c>=-.2223&&c<=-.2222?this.character="\u205F\u2063":c>=-.2778&&c<=-.2777?this.character="\u2005\u2063":this.character=null}var o=k.prototype;return o.toNode=function(){if(this.character)return document.createTextNode(this.character);var h=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return h.setAttribute("width",this.width+"em"),h},o.toMarkup=function(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+this.width+'em"/>'},o.toText=function(){return this.character?this.character:" "},k}(),wt={MathNode:_n,TextNode:ci,SpaceNode:ji,newDocumentFragment:Ii},vn=function(o,c,h){return rt[c][o]&&rt[c][o].replace&&o.charCodeAt(0)!==55349&&!(Et.hasOwnProperty(o)&&h&&(h.fontFamily&&h.fontFamily.substr(4,2)==="tt"||h.font&&h.font.substr(4,2)==="tt"))&&(o=rt[c][o].replace),new wt.TextNode(o)},Oi=function(o){return o.length===1?o[0]:new wt.MathNode("mrow",o)},hi=function(o,c){if(c.fontFamily==="texttt")return"monospace";if(c.fontFamily==="textsf")return c.fontShape==="textit"&&c.fontWeight==="textbf"?"sans-serif-bold-italic":c.fontShape==="textit"?"sans-serif-italic":c.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(c.fontShape==="textit"&&c.fontWeight==="textbf")return"bold-italic";if(c.fontShape==="textit")return"italic";if(c.fontWeight==="textbf")return"bold";var h=c.font;if(!h||h==="mathnormal")return null;var p=o.mode;if(h==="mathit")return"italic";if(h==="boldsymbol")return"bold-italic";if(h==="mathbf")return"bold";if(h==="mathbb")return"double-struck";if(h==="mathfrak")return"fraktur";if(h==="mathscr"||h==="mathcal")return"script";if(h==="mathsf")return"sans-serif";if(h==="mathtt")return"monospace";var E=o.text;if(M.contains(["\\imath","\\jmath"],E))return null;rt[p][E]&&rt[p][E].replace&&(E=rt[p][E].replace);var D=Ve.fontMap[h].fontName;return Ye(E,D,p)?Ve.fontMap[h].variant:null},cn=function(o,c,h){if(o.length===1){var p=xr(o[0],c);return h&&p instanceof _n&&p.type==="mo"&&(p.setAttribute("lspace","0em"),p.setAttribute("rspace","0em")),[p]}for(var E=[],D,J=0;J<o.length;J++){var le=xr(o[J],c);if(le instanceof _n&&D instanceof _n){if(le.type==="mtext"&&D.type==="mtext"&&le.getAttribute("mathvariant")===D.getAttribute("mathvariant")){var _e;(_e=D.children).push.apply(_e,le.children);continue}else if(le.type==="mn"&&D.type==="mn"){var Ke;(Ke=D.children).push.apply(Ke,le.children);continue}else if(le.type==="mi"&&le.children.length===1&&D.type==="mn"){var Je=le.children[0];if(Je instanceof ci&&Je.text==="."){var lt;(lt=D.children).push.apply(lt,le.children);continue}}else if(D.type==="mi"&&D.children.length===1){var gt=D.children[0];if(gt instanceof ci&&gt.text==="\u0338"&&(le.type==="mo"||le.type==="mi"||le.type==="mn")){var xt=le.children[0];xt instanceof ci&&xt.text.length>0&&(xt.text=xt.text.slice(0,1)+"\u0338"+xt.text.slice(1),E.pop())}}}E.push(le),D=le}return E},en=function(o,c,h){return Oi(cn(o,c,h))},xr=function(o,c){if(!o)return new wt.MathNode("mrow");if(ei[o.type]){var h=ei[o.type](o,c);return h}else throw new ue("Got group of unknown type: '"+o.type+"'")};function Pn(k,o,c,h){var p=cn(k,c),E;p.length===1&&p[0]instanceof _n&&M.contains(["mrow","mtable"],p[0].type)?E=p[0]:E=new wt.MathNode("mrow",p);var D=new wt.MathNode("annotation",[new wt.TextNode(o)]);D.setAttribute("encoding","application/x-tex");var J=new wt.MathNode("semantics",[E,D]),le=new wt.MathNode("math",[J]);le.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML");var _e=h?"katex":"katex-mathml";return Ve.makeSpan([_e],[le])}var zn=function(o){return new Mn({style:o.displayMode?x.DISPLAY:x.TEXT,maxSize:o.maxSize,minRuleThickness:o.minRuleThickness})},ri=function(o,c){if(c.displayMode){var h=["katex-display"];c.leqno&&h.push("leqno"),c.fleqn&&h.push("fleqn"),o=Ve.makeSpan(h,[o])}return o},$n=function(o,c,h){var p=zn(h),E;if(h.output==="mathml")return Pn(o,c,p,!0);if(h.output==="html"){var D=Li(o,p);E=Ve.makeSpan(["katex"],[D])}else{var J=Pn(o,c,p,!1),le=Li(o,p);E=Ve.makeSpan(["katex"],[J,le])}return ri(E,h)},Pi=function(o,c,h){var p=zn(h),E=Li(o,p),D=Ve.makeSpan(["katex"],[E]);return ri(D,h)},Fi=$n,Ki={widehat:"^",widecheck:"\u02C7",widetilde:"~",utilde:"~",overleftarrow:"\u2190",underleftarrow:"\u2190",xleftarrow:"\u2190",overrightarrow:"\u2192",underrightarrow:"\u2192",xrightarrow:"\u2192",underbrace:"\u23DF",overbrace:"\u23DE",overgroup:"\u23E0",undergroup:"\u23E1",overleftrightarrow:"\u2194",underleftrightarrow:"\u2194",xleftrightarrow:"\u2194",Overrightarrow:"\u21D2",xRightarrow:"\u21D2",overleftharpoon:"\u21BC",xleftharpoonup:"\u21BC",overrightharpoon:"\u21C0",xrightharpoonup:"\u21C0",xLeftarrow:"\u21D0",xLeftrightarrow:"\u21D4",xhookleftarrow:"\u21A9",xhookrightarrow:"\u21AA",xmapsto:"\u21A6",xrightharpoondown:"\u21C1",xleftharpoondown:"\u21BD",xrightleftharpoons:"\u21CC",xleftrightharpoons:"\u21CB",xtwoheadleftarrow:"\u219E",xtwoheadrightarrow:"\u21A0",xlongequal:"=",xtofrom:"\u21C4",xrightleftarrows:"\u21C4",xrightequilibrium:"\u21CC",xleftequilibrium:"\u21CB"},Ei=function(o){var c=new wt.MathNode("mo",[new wt.TextNode(Ki[o.substr(1)])]);return c.setAttribute("stretchy","true"),c},es={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["doublerightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarrow"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},Mi=function(o){return o.type==="ordgroup"?o.body.length:1},ts=function(o,c){function h(){var le=4e5,_e=o.label.substr(1);if(M.contains(["widehat","widecheck","widetilde","utilde"],_e)){var Ke=o,Je=Mi(Ke.base),lt,gt,xt;if(Je>5)_e==="widehat"||_e==="widecheck"?(lt=420,le=2364,xt=.42,gt=_e+"4"):(lt=312,le=2340,xt=.34,gt="tilde4");else{var Ct=[1,1,2,2,3,3][Je];_e==="widehat"||_e==="widecheck"?(le=[0,1062,2364,2364,2364][Ct],lt=[0,239,300,360,420][Ct],xt=[0,.24,.3,.3,.36,.42][Ct],gt=_e+Ct):(le=[0,600,1033,2339,2340][Ct],lt=[0,260,286,306,312][Ct],xt=[0,.26,.286,.3,.306,.34][Ct],gt="tilde"+Ct)}var Ht=new $(gt),er=new te([Ht],{width:"100%",height:xt+"em",viewBox:"0 0 "+le+" "+lt,preserveAspectRatio:"none"});return{span:Ve.makeSvgSpan([],[er],c),minWidth:0,height:xt}}else{var nr=[],tr=es[_e],Lr=tr[0],Ir=tr[1],$r=tr[2],Hr=$r/1e3,Xr=Lr.length,yn,hn;if(Xr===1){var kr=tr[3];yn=["hide-tail"],hn=[kr]}else if(Xr===2)yn=["halfarrow-left","halfarrow-right"],hn=["xMinYMin","xMaxYMin"];else if(Xr===3)yn=["brace-left","brace-center","brace-right"],hn=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
`+Xr+" children.");for(var jn=0;jn<Xr;jn++){var _i=new $(Lr[jn]),Jn=new te([_i],{width:"400em",height:Hr+"em",viewBox:"0 0 "+le+" "+$r,preserveAspectRatio:hn[jn]+" slice"}),bn=Ve.makeSvgSpan([yn[jn]],[Jn],c);if(Xr===1)return{span:bn,minWidth:Ir,height:Hr};bn.style.height=Hr+"em",nr.push(bn)}return{span:Ve.makeSpan(["stretchy"],nr,c),minWidth:Ir,height:Hr}}}var p=h(),E=p.span,D=p.minWidth,J=p.height;return E.height=J,E.style.height=J+"em",D>0&&(E.style.minWidth=D+"em"),E},Wt=function(o,c,h,p){var E,D=o.height+o.depth+2*h;if(/fbox|color/.test(c)){if(E=Ve.makeSpan(["stretchy",c],[],p),c==="fbox"){var J=p.color&&p.getColor();J&&(E.style.borderColor=J)}}else{var le=[];/^[bx]cancel$/.test(c)&&le.push(new W({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(c)&&le.push(new W({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var _e=new te(le,{width:"100%",height:D+"em"});E=Ve.makeSvgSpan([],[_e],p)}return E.height=D,E.style.height=D+"em",E},Ot={encloseSpan:Wt,mathMLnode:Ei,svgSpan:ts},dr=function(o,c){var h,p,E=Fr(o,"supsub"),D;E?(p=Zt(E.base,"accent"),h=p.base,E.base=h,D=Le(cr(E,c)),E.base=p):(p=Zt(o,"accent"),h=p.base);var J=cr(h,c.havingCrampedStyle()),le=p.isShifty&&M.isCharacterBox(h),_e=0;if(le){var Ke=M.getBaseElem(h),Je=cr(Ke,c.havingCrampedStyle());_e=Ee(Je).skew}var lt=Math.min(J.height,c.fontMetrics().xHeight),gt;if(p.isStretchy)gt=Ot.svgSpan(p,c),gt=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:J},{type:"elem",elem:gt,wrapperClasses:["svg-align"],wrapperStyle:_e>0?{width:"calc(100% - "+2*_e+"em)",marginLeft:2*_e+"em"}:void 0}]},c);else{var xt,Ct;p.label==="\\vec"?(xt=Ve.staticSvg("vec",c),Ct=Ve.svgData.vec[1]):(xt=Ve.makeOrd({mode:p.mode,text:p.label},c,"textord"),xt=Ee(xt),xt.italic=0,Ct=xt.width),gt=Ve.makeSpan(["accent-body"],[xt]);var Ht=p.label==="\\textcircled";Ht&&(gt.classes.push("accent-full"),lt=J.height);var er=_e;Ht||(er-=Ct/2),gt.style.left=er+"em",p.label==="\\textcircled"&&(gt.style.top=".2em"),gt=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:J},{type:"kern",size:-lt},{type:"elem",elem:gt}]},c)}var nr=Ve.makeSpan(["mord","accent"],[gt],c);return D?(D.children[0]=nr,D.height=Math.max(nr.height,D.height),D.classes[0]="mord",D):nr},Zr=function(o,c){var h=o.isStretchy?Ot.mathMLnode(o.label):new wt.MathNode("mo",[vn(o.label,o.mode)]),p=new wt.MathNode("mover",[xr(o.base,c),h]);return p.setAttribute("accent","true"),p},Nr=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(function(k){return"\\"+k}).join("|"));Bt({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:function(o,c){var h=c[0],p=!Nr.test(o.funcName),E=!p||o.funcName==="\\widehat"||o.funcName==="\\widetilde"||o.funcName==="\\widecheck";return{type:"accent",mode:o.parser.mode,label:o.funcName,isStretchy:p,isShifty:E,base:h}},htmlBuilder:dr,mathmlBuilder:Zr}),Bt({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!1},handler:function(o,c){var h=c[0];return{type:"accent",mode:o.parser.mode,label:o.funcName,isStretchy:!1,isShifty:!0,base:h}},htmlBuilder:dr,mathmlBuilder:Zr}),Bt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(o,c){var h=o.parser,p=o.funcName,E=c[0];return{type:"accentUnder",mode:h.mode,label:p,base:E}},htmlBuilder:function(o,c){var h=cr(o.base,c),p=Ot.svgSpan(o,c),E=o.label==="\\utilde"?.12:0,D=Ve.makeVList({positionType:"bottom",positionData:p.height+E,children:[{type:"elem",elem:p,wrapperClasses:["svg-align"]},{type:"kern",size:E},{type:"elem",elem:h}]},c);return Ve.makeSpan(["mord","accentunder"],[D],c)},mathmlBuilder:function(o,c){var h=Ot.mathMLnode(o.label),p=new wt.MathNode("munder",[xr(o.base,c),h]);return p.setAttribute("accentunder","true"),p}});var kn=function(o){var c=new wt.MathNode("mpadded",o?[o]:[]);return c.setAttribute("width","+0.6em"),c.setAttribute("lspace","0.3em"),c};Bt({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium"],props:{numArgs:1,numOptionalArgs:1},handler:function(o,c,h){var p=o.parser,E=o.funcName;return{type:"xArrow",mode:p.mode,label:E,body:c[0],below:h[0]}},htmlBuilder:function(o,c){var h=c.style,p=c.havingStyle(h.sup()),E=Ve.wrapFragment(cr(o.body,p,c),c);E.classes.push("x-arrow-pad");var D;o.below&&(p=c.havingStyle(h.sub()),D=Ve.wrapFragment(cr(o.below,p,c),c),D.classes.push("x-arrow-pad"));var J=Ot.svgSpan(o,c),le=-c.fontMetrics().axisHeight+.5*J.height,_e=-c.fontMetrics().axisHeight-.5*J.height-.111;(E.depth>.25||o.label==="\\xleftequilibrium")&&(_e-=E.depth);var Ke;if(D){var Je=-c.fontMetrics().axisHeight+D.height+.5*J.height+.111;Ke=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:E,shift:_e},{type:"elem",elem:J,shift:le},{type:"elem",elem:D,shift:Je}]},c)}else Ke=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:E,shift:_e},{type:"elem",elem:J,shift:le}]},c);return Ke.children[0].children[0].children[1].classes.push("svg-align"),Ve.makeSpan(["mrel","x-arrow"],[Ke],c)},mathmlBuilder:function(o,c){var h=Ot.mathMLnode(o.label),p;if(o.body){var E=kn(xr(o.body,c));if(o.below){var D=kn(xr(o.below,c));p=new wt.MathNode("munderover",[h,D,E])}else p=new wt.MathNode("mover",[h,E])}else if(o.below){var J=kn(xr(o.below,c));p=new wt.MathNode("munder",[h,J])}else p=kn(),p=new wt.MathNode("mover",[h,p]);return p}}),Bt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(o,c){for(var h=o.parser,p=Zt(c[0],"ordgroup"),E=p.body,D="",J=0;J<E.length;J++){var le=Zt(E[J],"textord");D+=le.text}var _e=parseInt(D);if(isNaN(_e))throw new ue("\\@char has non-numeric argument "+D);return{type:"textord",mode:h.mode,text:String.fromCharCode(_e)}}});var Hi=function(o,c){var h=qr(o.body,c.withColor(o.color),!1);return Ve.makeFragment(h)},Wi=function(o,c){var h=cn(o.body,c.withColor(o.color)),p=new wt.MathNode("mstyle",h);return p.setAttribute("mathcolor",o.color),p};Bt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","original"]},handler:function(o,c){var h=o.parser,p=Zt(c[0],"color-token").color,E=c[1];return{type:"color",mode:h.mode,color:p,body:Qr(E)}},htmlBuilder:Hi,mathmlBuilder:Wi}),Bt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,greediness:3,argTypes:["color"]},handler:function(o,c){var h=o.parser,p=o.breakOnTokenText,E=Zt(c[0],"color-token").color;h.gullet.macros.set("\\current@color",E);var D=h.parseExpression(!0,p);return{type:"color",mode:h.mode,color:E,body:D}},htmlBuilder:Hi,mathmlBuilder:Wi}),Bt({type:"cr",names:["\\cr","\\newline"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(o,c,h){var p=o.parser,E=o.funcName,D=h[0],J=E==="\\cr",le=!1;return J||(p.settings.displayMode&&p.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode")?le=!1:le=!0),{type:"cr",mode:p.mode,newLine:le,newRow:J,size:D&&Zt(D,"size").value}},htmlBuilder:function(o,c){if(o.newRow)throw new ue("\\cr valid only within a tabular/array environment");var h=Ve.makeSpan(["mspace"],[],c);return o.newLine&&(h.classes.push("newline"),o.size&&(h.style.marginTop=hr(o.size,c)+"em")),h},mathmlBuilder:function(o,c){var h=new wt.MathNode("mspace");return o.newLine&&(h.setAttribute("linebreak","newline"),o.size&&h.setAttribute("height",hr(o.size,c)+"em")),h}});var Yn=function(o,c,h){var p=rt.math[o]&&rt.math[o].replace,E=Ye(p||o,c,h);if(!E)throw new Error("Unsupported symbol "+o+" and font size "+c+".");return E},Ls=function(o,c,h,p){var E=h.havingBaseStyle(c),D=Ve.makeSpan(p.concat(E.sizingClasses(h)),[o],h),J=E.sizeMultiplier/h.sizeMultiplier;return D.height*=J,D.depth*=J,D.maxFontSize=E.sizeMultiplier,D},ra=function(o,c,h){var p=c.havingBaseStyle(h),E=(1-c.sizeMultiplier/p.sizeMultiplier)*c.fontMetrics().axisHeight;o.classes.push("delimcenter"),o.style.top=E+"em",o.height-=E,o.depth+=E},Pa=function(o,c,h,p,E,D){var J=Ve.makeSymbol(o,"Main-Regular",E,p),le=Ls(J,c,p,D);return h&&ra(le,p,c),le},Fa=function(o,c,h,p){return Ve.makeSymbol(o,"Size"+c+"-Regular",h,p)},na=function(o,c,h,p,E,D){var J=Fa(o,c,E,p),le=Ls(Ve.makeSpan(["delimsizing","size"+c],[J],p),x.TEXT,p,D);return h&&ra(le,p,x.TEXT),le},Si=function(o,c,h){var p;c==="Size1-Regular"?p="delim-size1":p="delim-size4";var E=Ve.makeSpan(["delimsizinginner",p],[Ve.makeSpan([],[Ve.makeSymbol(o,c,h)])]);return{type:"elem",elem:E}},Fn={type:"kern",size:-.005},ia=function(o,c,h,p,E,D){var J,le,_e,Ke;J=_e=Ke=o,le=null;var Je="Size1-Regular";o==="\\uparrow"?_e=Ke="\u23D0":o==="\\Uparrow"?_e=Ke="\u2016":o==="\\downarrow"?J=_e="\u23D0":o==="\\Downarrow"?J=_e="\u2016":o==="\\updownarrow"?(J="\\uparrow",_e="\u23D0",Ke="\\downarrow"):o==="\\Updownarrow"?(J="\\Uparrow",_e="\u2016",Ke="\\Downarrow"):o==="["||o==="\\lbrack"?(J="\u23A1",_e="\u23A2",Ke="\u23A3",Je="Size4-Regular"):o==="]"||o==="\\rbrack"?(J="\u23A4",_e="\u23A5",Ke="\u23A6",Je="Size4-Regular"):o==="\\lfloor"||o==="\u230A"?(_e=J="\u23A2",Ke="\u23A3",Je="Size4-Regular"):o==="\\lceil"||o==="\u2308"?(J="\u23A1",_e=Ke="\u23A2",Je="Size4-Regular"):o==="\\rfloor"||o==="\u230B"?(_e=J="\u23A5",Ke="\u23A6",Je="Size4-Regular"):o==="\\rceil"||o==="\u2309"?(J="\u23A4",_e=Ke="\u23A5",Je="Size4-Regular"):o==="("||o==="\\lparen"?(J="\u239B",_e="\u239C",Ke="\u239D",Je="Size4-Regular"):o===")"||o==="\\rparen"?(J="\u239E",_e="\u239F",Ke="\u23A0",Je="Size4-Regular"):o==="\\{"||o==="\\lbrace"?(J="\u23A7",le="\u23A8",Ke="\u23A9",_e="\u23AA",Je="Size4-Regular"):o==="\\}"||o==="\\rbrace"?(J="\u23AB",le="\u23AC",Ke="\u23AD",_e="\u23AA",Je="Size4-Regular"):o==="\\lgroup"||o==="\u27EE"?(J="\u23A7",Ke="\u23A9",_e="\u23AA",Je="Size4-Regular"):o==="\\rgroup"||o==="\u27EF"?(J="\u23AB",Ke="\u23AD",_e="\u23AA",Je="Size4-Regular"):o==="\\lmoustache"||o==="\u23B0"?(J="\u23A7",Ke="\u23AD",_e="\u23AA",Je="Size4-Regular"):(o==="\\rmoustache"||o==="\u23B1")&&(J="\u23AB",Ke="\u23A9",_e="\u23AA",Je="Size4-Regular");var lt=Yn(J,Je,E),gt=lt.height+lt.depth,xt=Yn(_e,Je,E),Ct=xt.height+xt.depth,Ht=Yn(Ke,Je,E),er=Ht.height+Ht.depth,nr=0,tr=1;if(le!==null){var Lr=Yn(le,Je,E);nr=Lr.height+Lr.depth,tr=2}var Ir=gt+er+nr,$r=Math.max(0,Math.ceil((c-Ir)/(tr*Ct))),Hr=Ir+$r*tr*Ct,Xr=p.fontMetrics().axisHeight;h&&(Xr*=p.sizeMultiplier);var yn=Hr/2-Xr,hn=($r+1)*.005-Ct,kr=[];if(kr.push(Si(Ke,Je,E)),le===null)for(var jn=0;jn<$r;jn++)kr.push(Fn),kr.push(Si(_e,Je,E));else{for(var _i=0;_i<$r;_i++)kr.push(Fn),kr.push(Si(_e,Je,E));kr.push({type:"kern",size:hn}),kr.push(Si(_e,Je,E)),kr.push(Fn),kr.push(Si(le,Je,E));for(var Jn=0;Jn<$r;Jn++)kr.push(Fn),kr.push(Si(_e,Je,E))}kr.push({type:"kern",size:hn}),kr.push(Si(_e,Je,E)),kr.push(Fn),kr.push(Si(J,Je,E));var bn=p.havingBaseStyle(x.TEXT),vi=Ve.makeVList({positionType:"bottom",positionData:yn,children:kr},bn);return Ls(Ve.makeSpan(["delimsizing","mult"],[vi],bn),x.TEXT,p,D)},Is=80,Gn=.08,fi=function(o,c,h,p,E){var D=jt(o,p,h),J=new $(o,D),le=new te([J],{width:"400em",height:c+"em",viewBox:"0 0 400000 "+h,preserveAspectRatio:"xMinYMin slice"});return Ve.makeSvgSpan(["hide-tail"],[le],E)},Ma=function(o,c){var h=c.havingBaseSizing(),p=sa("\\surd",o*h.sizeMultiplier,rs,h),E=h.sizeMultiplier,D=Math.max(0,c.minRuleThickness-c.fontMetrics().sqrtRuleThickness),J,le=0,_e=0,Ke=0,Je;return p.type==="small"?(Ke=1e3+1e3*D+Is,o<1?E=1:o<1.4&&(E=.7),le=(1+D+Gn)/E,_e=(1+D)/E,J=fi("sqrtMain",le,Ke,D,c),J.style.minWidth="0.853em",Je=.833/E):p.type==="large"?(Ke=(1e3+Is)*us[p.size],_e=(us[p.size]+D)/E,le=(us[p.size]+D+Gn)/E,J=fi("sqrtSize"+p.size,le,Ke,D,c),J.style.minWidth="1.02em",Je=1/E):(le=o+D+Gn,_e=o+D,Ke=Math.floor(1e3*o+D)+Is,J=fi("sqrtTall",le,Ke,D,c),J.style.minWidth="0.742em",Je=1.056),J.height=_e,J.style.height=le+"em",{span:J,advanceWidth:Je,ruleWidth:(c.fontMetrics().sqrtRuleThickness+D)*E}},Ai=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],Ba=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],Os=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],us=[0,1.2,1.8,2.4,3],Na=function(o,c,h,p,E){if(o==="<"||o==="\\lt"||o==="\u27E8"?o="\\langle":(o===">"||o==="\\gt"||o==="\u27E9")&&(o="\\rangle"),M.contains(Ai,o)||M.contains(Os,o))return na(o,c,!1,h,p,E);if(M.contains(Ba,o))return ia(o,us[c],!1,h,p,E);throw new ue("Illegal delimiter: '"+o+"'")},on=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Ua=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"stack"}],rs=[{type:"small",style:x.SCRIPTSCRIPT},{type:"small",style:x.SCRIPT},{type:"small",style:x.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],Vi=function(o){if(o.type==="small")return"Main-Regular";if(o.type==="large")return"Size"+o.size+"-Regular";if(o.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+o.type+"' here.")},sa=function(o,c,h,p){for(var E=Math.min(2,3-p.style.size),D=E;D<h.length&&h[D].type!=="stack";D++){var J=Yn(o,Vi(h[D]),"math"),le=J.height+J.depth;if(h[D].type==="small"){var _e=p.havingBaseStyle(h[D].style);le*=_e.sizeMultiplier}if(le>c)return h[D]}return h[h.length-1]},Mr=function(o,c,h,p,E,D){o==="<"||o==="\\lt"||o==="\u27E8"?o="\\langle":(o===">"||o==="\\gt"||o==="\u27E9")&&(o="\\rangle");var J;M.contains(Os,o)?J=on:M.contains(Ai,o)?J=rs:J=Ua;var le=sa(o,c,J,p);return le.type==="small"?Pa(o,le.style,h,p,E,D):le.type==="large"?na(o,le.size,h,p,E,D):ia(o,c,h,p,E,D)},Ps=function(o,c,h,p,E,D){var J=p.fontMetrics().axisHeight*p.sizeMultiplier,le=901,_e=5/p.fontMetrics().ptPerEm,Ke=Math.max(c-J,h+J),Je=Math.max(Ke/500*le,2*Ke-_e);return Mr(o,Je,!0,p,E,D)},qn={sqrtImage:Ma,sizedDelim:Na,customSizedDelim:Mr,leftRightDelim:Ps},ns={"\\bigl":{mclass:"mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",size:4}},za=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","<",">","\\langle","\u27E8","\\rangle","\u27E9","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function cs(k,o){var c=En(k);if(c&&M.contains(za,c.text))return c;throw new ue("Invalid delimiter: '"+(c?c.text:JSON.stringify(k))+"' after '"+o.funcName+"'",k)}Bt({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1},handler:function(o,c){var h=cs(c[0],o);return{type:"delimsizing",mode:o.parser.mode,size:ns[o.funcName].size,mclass:ns[o.funcName].mclass,delim:h.text}},htmlBuilder:function(o,c){return o.delim==="."?Ve.makeSpan([o.mclass]):qn.sizedDelim(o.delim,o.size,c,o.mode,[o.mclass])},mathmlBuilder:function(o){var c=[];o.delim!=="."&&c.push(vn(o.delim,o.mode));var h=new wt.MathNode("mo",c);return o.mclass==="mopen"||o.mclass==="mclose"?h.setAttribute("fence","true"):h.setAttribute("fence","false"),h}});function Fs(k){if(!k.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Bt({type:"leftright-right",names:["\\right"],props:{numArgs:1},handler:function(o,c){var h=o.parser.gullet.macros.get("\\current@color");if(h&&typeof h!="string")throw new ue("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:o.parser.mode,delim:cs(c[0],o).text,color:h}}}),Bt({type:"leftright",names:["\\left"],props:{numArgs:1},handler:function(o,c){var h=cs(c[0],o),p=o.parser;++p.leftrightDepth;var E=p.parseExpression(!1);--p.leftrightDepth,p.expect("\\right",!1);var D=Zt(p.parseFunction(),"leftright-right");return{type:"leftright",mode:p.mode,body:E,left:h.text,right:D.delim,rightColor:D.color}},htmlBuilder:function(o,c){Fs(o);for(var h=qr(o.body,c,!0,["mopen","mclose"]),p=0,E=0,D=!1,J=0;J<h.length;J++)h[J].isMiddle?D=!0:(p=Math.max(h[J].height,p),E=Math.max(h[J].depth,E));p*=c.sizeMultiplier,E*=c.sizeMultiplier;var le;if(o.left==="."?le=An(c,["mopen"]):le=qn.leftRightDelim(o.left,p,E,c,o.mode,["mopen"]),h.unshift(le),D)for(var _e=1;_e<h.length;_e++){var Ke=h[_e],Je=Ke.isMiddle;Je&&(h[_e]=qn.leftRightDelim(Je.delim,p,E,Je.options,o.mode,[]))}var lt;if(o.right===".")lt=An(c,["mclose"]);else{var gt=o.rightColor?c.withColor(o.rightColor):c;lt=qn.leftRightDelim(o.right,p,E,gt,o.mode,["mclose"])}return h.push(lt),Ve.makeSpan(["minner"],h,c)},mathmlBuilder:function(o,c){Fs(o);var h=cn(o.body,c);if(o.left!=="."){var p=new wt.MathNode("mo",[vn(o.left,o.mode)]);p.setAttribute("fence","true"),h.unshift(p)}if(o.right!=="."){var E=new wt.MathNode("mo",[vn(o.right,o.mode)]);E.setAttribute("fence","true"),o.rightColor&&E.setAttribute("mathcolor",o.rightColor),h.push(E)}return Oi(h)}}),Bt({type:"middle",names:["\\middle"],props:{numArgs:1},handler:function(o,c){var h=cs(c[0],o);if(!o.parser.leftrightDepth)throw new ue("\\middle without preceding \\left",h);return{type:"middle",mode:o.parser.mode,delim:h.text}},htmlBuilder:function(o,c){var h;if(o.delim===".")h=An(c,[]);else{h=qn.sizedDelim(o.delim,1,c,o.mode,[]);var p={delim:o.delim,options:c};h.isMiddle=p}return h},mathmlBuilder:function(o,c){var h=o.delim==="\\vert"||o.delim==="|"?vn("|","text"):vn(o.delim,o.mode),p=new wt.MathNode("mo",[h]);return p.setAttribute("fence","true"),p.setAttribute("lspace","0.05em"),p.setAttribute("rspace","0.05em"),p}});var hs=function(o,c){var h=Ve.wrapFragment(cr(o.body,c),c),p=o.label.substr(1),E=c.sizeMultiplier,D,J=0,le=M.isCharacterBox(o.body);if(p==="sout")D=Ve.makeSpan(["stretchy","sout"]),D.height=c.fontMetrics().defaultRuleThickness/E,J=-.5*c.fontMetrics().xHeight;else{/cancel/.test(p)?le||h.classes.push("cancel-pad"):h.classes.push("boxpad");var _e=0,Ke=0;/box/.test(p)?(Ke=Math.max(c.fontMetrics().fboxrule,c.minRuleThickness),_e=c.fontMetrics().fboxsep+(p==="colorbox"?0:Ke)):_e=le?.2:0,D=Ot.encloseSpan(h,p,_e,c),/fbox|boxed|fcolorbox/.test(p)&&(D.style.borderStyle="solid",D.style.borderWidth=Ke+"em"),J=h.depth+_e,o.backgroundColor&&(D.style.backgroundColor=o.backgroundColor,o.borderColor&&(D.style.borderColor=o.borderColor))}var Je;return o.backgroundColor?Je=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:D,shift:J},{type:"elem",elem:h,shift:0}]},c):Je=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:h,shift:0},{type:"elem",elem:D,shift:J,wrapperClasses:/cancel/.test(p)?["svg-align"]:[]}]},c),/cancel/.test(p)&&(Je.height=h.height,Je.depth=h.depth),/cancel/.test(p)&&!le?Ve.makeSpan(["mord","cancel-lap"],[Je],c):Ve.makeSpan(["mord"],[Je],c)},Ms=function(o,c){var h=0,p=new wt.MathNode(o.label.indexOf("colorbox")>-1?"mpadded":"menclose",[xr(o.body,c)]);switch(o.label){case"\\cancel":p.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":p.setAttribute("notation","downdiagonalstrike");break;case"\\sout":p.setAttribute("notation","horizontalstrike");break;case"\\fbox":p.setAttribute("notation","box");break;case"\\fcolorbox":case"\\colorbox":if(h=c.fontMetrics().fboxsep*c.fontMetrics().ptPerEm,p.setAttribute("width","+"+2*h+"pt"),p.setAttribute("height","+"+2*h+"pt"),p.setAttribute("lspace",h+"pt"),p.setAttribute("voffset",h+"pt"),o.label==="\\fcolorbox"){var E=Math.max(c.fontMetrics().fboxrule,c.minRuleThickness);p.setAttribute("style","border: "+E+"em solid "+String(o.borderColor))}break;case"\\xcancel":p.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return o.backgroundColor&&p.setAttribute("mathbackground",o.backgroundColor),p};Bt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","text"]},handler:function(o,c,h){var p=o.parser,E=o.funcName,D=Zt(c[0],"color-token").color,J=c[1];return{type:"enclose",mode:p.mode,label:E,backgroundColor:D,body:J}},htmlBuilder:hs,mathmlBuilder:Ms}),Bt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,greediness:3,argTypes:["color","color","text"]},handler:function(o,c,h){var p=o.parser,E=o.funcName,D=Zt(c[0],"color-token").color,J=Zt(c[1],"color-token").color,le=c[2];return{type:"enclose",mode:p.mode,label:E,backgroundColor:J,borderColor:D,body:le}},htmlBuilder:hs,mathmlBuilder:Ms}),Bt({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(o,c){var h=o.parser;return{type:"enclose",mode:h.mode,label:"\\fbox",body:c[0]}}}),Bt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout"],props:{numArgs:1},handler:function(o,c,h){var p=o.parser,E=o.funcName,D=c[0];return{type:"enclose",mode:p.mode,label:E,body:D}},htmlBuilder:hs,mathmlBuilder:Ms});var aa={};function Zn(k){for(var o=k.type,c=k.names,h=k.props,p=k.handler,E=k.htmlBuilder,D=k.mathmlBuilder,J={type:o,numArgs:h.numArgs||0,greediness:1,allowedInText:!1,numOptionalArgs:0,handler:p},le=0;le<c.length;++le)aa[c[le]]=J;E&&(Wn[o]=E),D&&(ei[o]=D)}function Bs(k){var o=[];k.consumeSpaces();for(var c=k.fetch().text;c==="\\hline"||c==="\\hdashline";)k.consume(),o.push(c==="\\hdashline"),k.consumeSpaces(),c=k.fetch().text;return o}function Bi(k,o,c){var h=o.hskipBeforeAndAfter,p=o.addJot,E=o.cols,D=o.arraystretch,J=o.colSeparationType;if(k.gullet.beginGroup(),k.gullet.macros.set("\\\\","\\cr"),!D){var le=k.gullet.expandMacroAsText("\\arraystretch");if(le==null)D=1;else if(D=parseFloat(le),!D||D<0)throw new ue("Invalid \\arraystretch: "+le)}k.gullet.beginGroup();var _e=[],Ke=[_e],Je=[],lt=[];for(lt.push(Bs(k));;){var gt=k.parseExpression(!1,"\\cr");k.gullet.endGroup(),k.gullet.beginGroup(),gt={type:"ordgroup",mode:k.mode,body:gt},c&&(gt={type:"styling",mode:k.mode,style:c,body:[gt]}),_e.push(gt);var xt=k.fetch().text;if(xt==="&")k.consume();else if(xt==="\\end"){_e.length===1&&gt.type==="styling"&&gt.body[0].body.length===0&&Ke.pop(),lt.length<Ke.length+1&&lt.push([]);break}else if(xt==="\\cr"){var Ct=Zt(k.parseFunction(),"cr");Je.push(Ct.size),lt.push(Bs(k)),_e=[],Ke.push(_e)}else throw new ue("Expected & or \\\\ or \\cr or \\end",k.nextToken)}return k.gullet.endGroup(),k.gullet.endGroup(),{type:"array",mode:k.mode,addJot:p,arraystretch:D,body:Ke,cols:E,rowGaps:Je,hskipBeforeAndAfter:h,hLinesBeforeRow:lt,colSeparationType:J}}function fs(k){return k.substr(0,1)==="d"?"display":"text"}var di=function(o,c){var h,p,E=o.body.length,D=o.hLinesBeforeRow,J=0,le=new Array(E),_e=[],Ke=Math.max(c.fontMetrics().arrayRuleWidth,c.minRuleThickness),Je=1/c.fontMetrics().ptPerEm,lt=5*Je;if(o.colSeparationType&&o.colSeparationType==="small"){var gt=c.havingStyle(x.SCRIPT).sizeMultiplier;lt=.2778*(gt/c.sizeMultiplier)}var xt=12*Je,Ct=3*Je,Ht=o.arraystretch*xt,er=.7*Ht,nr=.3*Ht,tr=0;function Lr(ea){for(var zi=0;zi<ea.length;++zi)zi>0&&(tr+=.25),_e.push({pos:tr,isDashed:ea[zi]})}for(Lr(D[0]),h=0;h<o.body.length;++h){var Ir=o.body[h],$r=er,Hr=nr;J<Ir.length&&(J=Ir.length);var Xr=new Array(Ir.length);for(p=0;p<Ir.length;++p){var yn=cr(Ir[p],c);Hr<yn.depth&&(Hr=yn.depth),$r<yn.height&&($r=yn.height),Xr[p]=yn}var hn=o.rowGaps[h],kr=0;hn&&(kr=hr(hn,c),kr>0&&(kr+=nr,Hr<kr&&(Hr=kr),kr=0)),o.addJot&&(Hr+=Ct),Xr.height=$r,Xr.depth=Hr,tr+=$r,Xr.pos=tr,tr+=Hr+kr,le[h]=Xr,Lr(D[h+1])}var jn=tr/2+c.fontMetrics().axisHeight,_i=o.cols||[],Jn=[],bn,vi;for(p=0,vi=0;p<J||vi<_i.length;++p,++vi){for(var sn=_i[vi]||{},ni=!0;sn.type==="separator";){if(ni||(bn=Ve.makeSpan(["arraycolsep"],[]),bn.style.width=c.fontMetrics().doubleRuleSep+"em",Jn.push(bn)),sn.separator==="|"||sn.separator===":"){var to=sn.separator==="|"?"solid":"dashed",Xi=Ve.makeSpan(["vertical-separator"],[],c);Xi.style.height=tr+"em",Xi.style.borderRightWidth=Ke+"em",Xi.style.borderRightStyle=to,Xi.style.margin="0 -"+Ke/2+"em",Xi.style.verticalAlign=-(tr-jn)+"em",Jn.push(Xi)}else throw new ue("Invalid separator type: "+sn.separator);vi++,sn=_i[vi]||{},ni=!1}if(!(p>=J)){var Ji=void 0;(p>0||o.hskipBeforeAndAfter)&&(Ji=M.deflt(sn.pregap,lt),Ji!==0&&(bn=Ve.makeSpan(["arraycolsep"],[]),bn.style.width=Ji+"em",Jn.push(bn)));var Qi=[];for(h=0;h<E;++h){var Ts=le[h],Ds=Ts[p];if(Ds){var Ui=Ts.pos-jn;Ds.depth=Ts.depth,Ds.height=Ts.height,Qi.push({type:"elem",elem:Ds,shift:Ui})}}Qi=Ve.makeVList({positionType:"individualShift",children:Qi},c),Qi=Ve.makeSpan(["col-align-"+(sn.align||"c")],[Qi]),Jn.push(Qi),(p<J-1||o.hskipBeforeAndAfter)&&(Ji=M.deflt(sn.postgap,lt),Ji!==0&&(bn=Ve.makeSpan(["arraycolsep"],[]),bn.style.width=Ji+"em",Jn.push(bn)))}}if(le=Ve.makeSpan(["mtable"],Jn),_e.length>0){for(var Da=Ve.makeLineSpan("hline",c,Ke),ro=Ve.makeLineSpan("hdashline",c,Ke),Js=[{type:"elem",elem:le,shift:0}];_e.length>0;){var ks=_e.pop(),Qs=ks.pos-jn;ks.isDashed?Js.push({type:"elem",elem:ro,shift:Qs}):Js.push({type:"elem",elem:Da,shift:Qs})}le=Ve.makeVList({positionType:"individualShift",children:Js},c)}return Ve.makeSpan(["mord"],[le],c)},pi={c:"center ",l:"left ",r:"right "},Ti=function(o,c){var h=new wt.MathNode("mtable",o.body.map(function(tr){return new wt.MathNode("mtr",tr.map(function(Lr){return new wt.MathNode("mtd",[xr(Lr,c)])}))})),p=o.arraystretch===.5?.1:.16+o.arraystretch-1+(o.addJot?.09:0);h.setAttribute("rowspacing",p+"em");var E="",D="";if(o.cols){var J=o.cols,le="",_e=!1,Ke=0,Je=J.length;J[0].type==="separator"&&(E+="top ",Ke=1),J[J.length-1].type==="separator"&&(E+="bottom ",Je-=1);for(var lt=Ke;lt<Je;lt++)J[lt].type==="align"?(D+=pi[J[lt].align],_e&&(le+="none "),_e=!0):J[lt].type==="separator"&&_e&&(le+=J[lt].separator==="|"?"solid ":"dashed ",_e=!1);h.setAttribute("columnalign",D.trim()),/[sd]/.test(le)&&h.setAttribute("columnlines",le.trim())}if(o.colSeparationType==="align"){for(var gt=o.cols||[],xt="",Ct=1;Ct<gt.length;Ct++)xt+=Ct%2?"0em ":"1em ";h.setAttribute("columnspacing",xt.trim())}else o.colSeparationType==="alignat"?h.setAttribute("columnspacing","0em"):o.colSeparationType==="small"?h.setAttribute("columnspacing","0.2778em"):h.setAttribute("columnspacing","1em");var Ht="",er=o.hLinesBeforeRow;E+=er[0].length>0?"left ":"",E+=er[er.length-1].length>0?"right ":"";for(var nr=1;nr<er.length-1;nr++)Ht+=er[nr].length===0?"none ":er[nr][0]?"dashed ":"solid ";return/[sd]/.test(Ht)&&h.setAttribute("rowlines",Ht.trim()),E!==""&&(h=new wt.MathNode("menclose",[h]),h.setAttribute("notation",E.trim())),o.arraystretch&&o.arraystretch<1&&(h=new wt.MathNode("mstyle",[h]),h.setAttribute("scriptlevel","1")),h},oa=function(o,c){var h=[],p=Bi(o.parser,{cols:h,addJot:!0},"display"),E,D=0,J={type:"ordgroup",mode:o.mode,body:[]},le=Fr(c[0],"ordgroup");if(le){for(var _e="",Ke=0;Ke<le.body.length;Ke++){var Je=Zt(le.body[Ke],"textord");_e+=Je.text}E=Number(_e),D=E*2}var lt=!D;p.body.forEach(function(Ht){for(var er=1;er<Ht.length;er+=2){var nr=Zt(Ht[er],"styling"),tr=Zt(nr.body[0],"ordgroup");tr.body.unshift(J)}if(lt)D<Ht.length&&(D=Ht.length);else{var Lr=Ht.length/2;if(E<Lr)throw new ue("Too many math in a row: "+("expected "+E+", but got "+Lr),Ht[0])}});for(var gt=0;gt<D;++gt){var xt="r",Ct=0;gt%2===1?xt="l":gt>0&&lt&&(Ct=1),h[gt]={type:"align",align:xt,pregap:Ct,postgap:0}}return p.colSeparationType=lt?"align":"alignat",p};Zn({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(o,c){var h=En(c[0]),p=h?[c[0]]:Zt(c[0],"ordgroup").body,E=p.map(function(J){var le=li(J),_e=le.text;if("lcr".indexOf(_e)!==-1)return{type:"align",align:_e};if(_e==="|")return{type:"separator",separator:"|"};if(_e===":")return{type:"separator",separator:":"};throw new ue("Unknown column alignment: "+_e,J)}),D={cols:E,hskipBeforeAndAfter:!0};return Bi(o.parser,D,fs(o.envName))},htmlBuilder:di,mathmlBuilder:Ti}),Zn({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix"],props:{numArgs:0},handler:function(o){var c={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[o.envName],h={hskipBeforeAndAfter:!1},p=Bi(o.parser,h,fs(o.envName));return c?{type:"leftright",mode:o.mode,body:[p],left:c[0],right:c[1],rightColor:void 0}:p},htmlBuilder:di,mathmlBuilder:Ti}),Zn({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(o){var c={arraystretch:.5},h=Bi(o.parser,c,"script");return h.colSeparationType="small",h},htmlBuilder:di,mathmlBuilder:Ti}),Zn({type:"array",names:["subarray"],props:{numArgs:1},handler:function(o,c){var h=En(c[0]),p=h?[c[0]]:Zt(c[0],"ordgroup").body,E=p.map(function(J){var le=li(J),_e=le.text;if("lc".indexOf(_e)!==-1)return{type:"align",align:_e};throw new ue("Unknown column alignment: "+_e,J)});if(E.length>1)throw new ue("{subarray} can contain only one column");var D={cols:E,hskipBeforeAndAfter:!1,arraystretch:.5};if(D=Bi(o.parser,D,"script"),D.body[0].length>1)throw new ue("{subarray} can contain only one column");return D},htmlBuilder:di,mathmlBuilder:Ti}),Zn({type:"array",names:["cases","dcases"],props:{numArgs:0},handler:function(o){var c={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},h=Bi(o.parser,c,fs(o.envName));return{type:"leftright",mode:o.mode,body:[h],left:"\\{",right:".",rightColor:void 0}},htmlBuilder:di,mathmlBuilder:Ti}),Zn({type:"array",names:["aligned"],props:{numArgs:0},handler:oa,htmlBuilder:di,mathmlBuilder:Ti}),Zn({type:"array",names:["gathered"],props:{numArgs:0},handler:function(o){var c={cols:[{type:"align",align:"c"}],addJot:!0};return Bi(o.parser,c,"display")},htmlBuilder:di,mathmlBuilder:Ti}),Zn({type:"array",names:["alignedat"],props:{numArgs:1},handler:oa,htmlBuilder:di,mathmlBuilder:Ti}),Bt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(o,c){throw new ue(o.funcName+" valid only within array environment")}});var $a=aa,la=$a;Bt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(o,c){var h=o.parser,p=o.funcName,E=c[0];if(E.type!=="ordgroup")throw new ue("Invalid environment name",E);for(var D="",J=0;J<E.body.length;++J)D+=Zt(E.body[J],"textord").text;if(p==="\\begin"){if(!la.hasOwnProperty(D))throw new ue("No such environment: "+D,E);var le=la[D],_e=h.parseArguments("\\begin{"+D+"}",le),Ke=_e.args,Je=_e.optArgs,lt={mode:h.mode,envName:D,parser:h},gt=le.handler(lt,Ke,Je);h.expect("\\end",!1);var xt=h.nextToken,Ct=Zt(h.parseFunction(),"environment");if(Ct.name!==D)throw new ue("Mismatch: \\begin{"+D+"} matched by \\end{"+Ct.name+"}",xt);return gt}return{type:"environment",mode:h.mode,name:D,nameGroup:E}}});var Ga=Ve.makeSpan;function ds(k,o){var c=qr(k.body,o,!0);return Ga([k.mclass],c,o)}function ua(k,o){var c,h=cn(k.body,o);return k.mclass==="minner"?wt.newDocumentFragment(h):(k.mclass==="mord"?k.isCharacterBox?(c=h[0],c.type="mi"):c=new wt.MathNode("mi",h):(k.isCharacterBox?(c=h[0],c.type="mo"):c=new wt.MathNode("mo",h),k.mclass==="mbin"?(c.attributes.lspace="0.22em",c.attributes.rspace="0.22em"):k.mclass==="mpunct"?(c.attributes.lspace="0em",c.attributes.rspace="0.17em"):(k.mclass==="mopen"||k.mclass==="mclose")&&(c.attributes.lspace="0em",c.attributes.rspace="0em")),c)}Bt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1},handler:function(o,c){var h=o.parser,p=o.funcName,E=c[0];return{type:"mclass",mode:h.mode,mclass:"m"+p.substr(5),body:Qr(E),isCharacterBox:M.isCharacterBox(E)}},htmlBuilder:ds,mathmlBuilder:ua});var vt=function(o){var c=o.type==="ordgroup"&&o.body.length?o.body[0]:o;return c.type==="atom"&&(c.family==="bin"||c.family==="rel")?"m"+c.family:"mord"};Bt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler:function(o,c){var h=o.parser;return{type:"mclass",mode:h.mode,mclass:vt(c[0]),body:[c[1]],isCharacterBox:M.isCharacterBox(c[1])}}}),Bt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(o,c){var h=o.parser,p=o.funcName,E=c[1],D=c[0],J;p!=="\\stackrel"?J=vt(E):J="mrel";var le={type:"op",mode:E.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:p!=="\\stackrel",body:Qr(E)},_e={type:"supsub",mode:D.mode,base:le,sup:p==="\\underset"?null:D,sub:p==="\\underset"?D:null};return{type:"mclass",mode:h.mode,mclass:J,body:[_e],isCharacterBox:M.isCharacterBox(_e)}},htmlBuilder:ds,mathmlBuilder:ua});var ps=function(o,c){var h=o.font,p=c.withFont(h);return cr(o.body,p)},Ns=function(o,c){var h=o.font,p=c.withFont(h);return xr(o.body,p)},ca={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Bt({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,greediness:2},handler:function(o,c){var h=o.parser,p=o.funcName,E=c[0],D=p;return D in ca&&(D=ca[D]),{type:"font",mode:h.mode,font:D.slice(1),body:E}},htmlBuilder:ps,mathmlBuilder:Ns}),Bt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1,greediness:2},handler:function(o,c){var h=o.parser,p=c[0],E=M.isCharacterBox(p);return{type:"mclass",mode:h.mode,mclass:vt(p),body:[{type:"font",mode:h.mode,font:"boldsymbol",body:p}],isCharacterBox:E}}}),Bt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it"],props:{numArgs:0,allowedInText:!0},handler:function(o,c){var h=o.parser,p=o.funcName,E=o.breakOnTokenText,D=h.mode,J=h.parseExpression(!0,E),le="math"+p.slice(1);return{type:"font",mode:D,font:le,body:{type:"ordgroup",mode:h.mode,body:J}}},htmlBuilder:ps,mathmlBuilder:Ns});var ha=function(o,c){var h=c;return o==="display"?h=h.id>=x.SCRIPT.id?h.text():x.DISPLAY:o==="text"&&h.size===x.DISPLAY.size?h=x.TEXT:o==="script"?h=x.SCRIPT:o==="scriptscript"&&(h=x.SCRIPTSCRIPT),h},Us=function(o,c){var h=ha(o.size,c.style),p=h.fracNum(),E=h.fracDen(),D;D=c.havingStyle(p);var J=cr(o.numer,D,c);if(o.continued){var le=8.5/c.fontMetrics().ptPerEm,_e=3.5/c.fontMetrics().ptPerEm;J.height=J.height<le?le:J.height,J.depth=J.depth<_e?_e:J.depth}D=c.havingStyle(E);var Ke=cr(o.denom,D,c),Je,lt,gt;o.hasBarLine?(o.barSize?(lt=hr(o.barSize,c),Je=Ve.makeLineSpan("frac-line",c,lt)):Je=Ve.makeLineSpan("frac-line",c),lt=Je.height,gt=Je.height):(Je=null,lt=0,gt=c.fontMetrics().defaultRuleThickness);var xt,Ct,Ht;h.size===x.DISPLAY.size||o.size==="display"?(xt=c.fontMetrics().num1,lt>0?Ct=3*gt:Ct=7*gt,Ht=c.fontMetrics().denom1):(lt>0?(xt=c.fontMetrics().num2,Ct=gt):(xt=c.fontMetrics().num3,Ct=3*gt),Ht=c.fontMetrics().denom2);var er;if(Je){var tr=c.fontMetrics().axisHeight;xt-J.depth-(tr+.5*lt)<Ct&&(xt+=Ct-(xt-J.depth-(tr+.5*lt))),tr-.5*lt-(Ke.height-Ht)<Ct&&(Ht+=Ct-(tr-.5*lt-(Ke.height-Ht)));var Lr=-(tr-.5*lt);er=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:Ke,shift:Ht},{type:"elem",elem:Je,shift:Lr},{type:"elem",elem:J,shift:-xt}]},c)}else{var nr=xt-J.depth-(Ke.height-Ht);nr<Ct&&(xt+=.5*(Ct-nr),Ht+=.5*(Ct-nr)),er=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:Ke,shift:Ht},{type:"elem",elem:J,shift:-xt}]},c)}D=c.havingStyle(h),er.height*=D.sizeMultiplier/c.sizeMultiplier,er.depth*=D.sizeMultiplier/c.sizeMultiplier;var Ir;h.size===x.DISPLAY.size?Ir=c.fontMetrics().delim1:Ir=c.fontMetrics().delim2;var $r,Hr;return o.leftDelim==null?$r=An(c,["mopen"]):$r=qn.customSizedDelim(o.leftDelim,Ir,!0,c.havingStyle(h),o.mode,["mopen"]),o.continued?Hr=Ve.makeSpan([]):o.rightDelim==null?Hr=An(c,["mclose"]):Hr=qn.customSizedDelim(o.rightDelim,Ir,!0,c.havingStyle(h),o.mode,["mclose"]),Ve.makeSpan(["mord"].concat(D.sizingClasses(c)),[$r,Ve.makeSpan(["mfrac"],[er]),Hr],c)},zs=function(o,c){var h=new wt.MathNode("mfrac",[xr(o.numer,c),xr(o.denom,c)]);if(!o.hasBarLine)h.setAttribute("linethickness","0px");else if(o.barSize){var p=hr(o.barSize,c);h.setAttribute("linethickness",p+"em")}var E=ha(o.size,c.style);if(E.size!==c.style.size){h=new wt.MathNode("mstyle",[h]);var D=E.size===x.DISPLAY.size?"true":"false";h.setAttribute("displaystyle",D),h.setAttribute("scriptlevel","0")}if(o.leftDelim!=null||o.rightDelim!=null){var J=[];if(o.leftDelim!=null){var le=new wt.MathNode("mo",[new wt.TextNode(o.leftDelim.replace("\\",""))]);le.setAttribute("fence","true"),J.push(le)}if(J.push(h),o.rightDelim!=null){var _e=new wt.MathNode("mo",[new wt.TextNode(o.rightDelim.replace("\\",""))]);_e.setAttribute("fence","true"),J.push(_e)}return Oi(J)}return h};Bt({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,greediness:2},handler:function(o,c){var h=o.parser,p=o.funcName,E=c[0],D=c[1],J,le=null,_e=null,Ke="auto";switch(p){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":J=!0;break;case"\\\\atopfrac":J=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":J=!1,le="(",_e=")";break;case"\\\\bracefrac":J=!1,le="\\{",_e="\\}";break;case"\\\\brackfrac":J=!1,le="[",_e="]";break;default:throw new Error("Unrecognized genfrac command")}switch(p){case"\\cfrac":case"\\dfrac":case"\\dbinom":Ke="display";break;case"\\tfrac":case"\\tbinom":Ke="text";break}return{type:"genfrac",mode:h.mode,continued:p==="\\cfrac",numer:E,denom:D,hasBarLine:J,leftDelim:le,rightDelim:_e,size:Ke,barSize:null}},htmlBuilder:Us,mathmlBuilder:zs}),Bt({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler:function(o){var c=o.parser,h=o.funcName,p=o.token,E;switch(h){case"\\over":E="\\frac";break;case"\\choose":E="\\binom";break;case"\\atop":E="\\\\atopfrac";break;case"\\brace":E="\\\\bracefrac";break;case"\\brack":E="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:c.mode,replaceWith:E,token:p}}});var Xn=["display","text","script","scriptscript"],ms=function(o){var c=null;return o.length>0&&(c=o,c=c==="."?null:c),c};Bt({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,greediness:6,argTypes:["math","math","size","text","math","math"]},handler:function(o,c){var h=o.parser,p=c[4],E=c[5],D=Fr(c[0],"atom");D&&(D=Hn(c[0],"open"));var J=D?ms(D.text):null,le=Fr(c[1],"atom");le&&(le=Hn(c[1],"close"));var _e=le?ms(le.text):null,Ke=Zt(c[2],"size"),Je,lt=null;Ke.isBlank?Je=!0:(lt=Ke.value,Je=lt.number>0);var gt="auto",xt=Fr(c[3],"ordgroup");if(xt){if(xt.body.length>0){var Ct=Zt(xt.body[0],"textord");gt=Xn[Number(Ct.text)]}}else xt=Zt(c[3],"textord"),gt=Xn[Number(xt.text)];return{type:"genfrac",mode:h.mode,numer:p,denom:E,continued:!1,hasBarLine:Je,barSize:lt,leftDelim:J,rightDelim:_e,size:gt}},htmlBuilder:Us,mathmlBuilder:zs}),Bt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(o,c){var h=o.parser,p=o.funcName,E=o.token;return{type:"infix",mode:h.mode,replaceWith:"\\\\abovefrac",size:Zt(c[0],"size").value,token:E}}}),Bt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(o,c){var h=o.parser,p=o.funcName,E=c[0],D=G(Zt(c[1],"infix").size),J=c[2],le=D.number>0;return{type:"genfrac",mode:h.mode,numer:E,denom:J,continued:!1,hasBarLine:le,barSize:D,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Us,mathmlBuilder:zs});var fa=function(o,c){var h=c.style,p,E,D=Fr(o,"supsub");D?(p=D.sup?cr(D.sup,c.havingStyle(h.sup()),c):cr(D.sub,c.havingStyle(h.sub()),c),E=Zt(D.base,"horizBrace")):E=Zt(o,"horizBrace");var J=cr(E.base,c.havingBaseStyle(x.DISPLAY)),le=Ot.svgSpan(E,c),_e;if(E.isOver?(_e=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:J},{type:"kern",size:.1},{type:"elem",elem:le}]},c),_e.children[0].children[0].children[1].classes.push("svg-align")):(_e=Ve.makeVList({positionType:"bottom",positionData:J.depth+.1+le.height,children:[{type:"elem",elem:le},{type:"kern",size:.1},{type:"elem",elem:J}]},c),_e.children[0].children[0].children[0].classes.push("svg-align")),p){var Ke=Ve.makeSpan(["mord",E.isOver?"mover":"munder"],[_e],c);E.isOver?_e=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:Ke},{type:"kern",size:.2},{type:"elem",elem:p}]},c):_e=Ve.makeVList({positionType:"bottom",positionData:Ke.depth+.2+p.height+p.depth,children:[{type:"elem",elem:p},{type:"kern",size:.2},{type:"elem",elem:Ke}]},c)}return Ve.makeSpan(["mord",E.isOver?"mover":"munder"],[_e],c)},ja=function(o,c){var h=Ot.mathMLnode(o.label);return new wt.MathNode(o.isOver?"mover":"munder",[xr(o.base,c),h])};Bt({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(o,c){var h=o.parser,p=o.funcName;return{type:"horizBrace",mode:h.mode,label:p,isOver:/^\\over/.test(p),base:c[0]}},htmlBuilder:fa,mathmlBuilder:ja}),Bt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(o,c){var h=o.parser,p=c[1],E=Zt(c[0],"url").url;return h.settings.isTrusted({command:"\\href",url:E})?{type:"href",mode:h.mode,href:E,body:Qr(p)}:h.formatUnsupportedCmd("\\href")},htmlBuilder:function(o,c){var h=qr(o.body,c,!1);return Ve.makeAnchor(o.href,[],h,c)},mathmlBuilder:function(o,c){var h=en(o.body,c);return h instanceof _n||(h=new _n("mrow",[h])),h.setAttribute("href",o.href),h}}),Bt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(o,c){var h=o.parser,p=Zt(c[0],"url").url;if(!h.settings.isTrusted({command:"\\url",url:p}))return h.formatUnsupportedCmd("\\url");for(var E=[],D=0;D<p.length;D++){var J=p[D];J==="~"&&(J="\\textasciitilde"),E.push({type:"textord",mode:"text",text:J})}var le={type:"text",mode:h.mode,font:"\\texttt",body:E};return{type:"href",mode:h.mode,href:p,body:Qr(le)}}}),Bt({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:function(o,c){var h=o.parser;return{type:"htmlmathml",mode:h.mode,html:Qr(c[0]),mathml:Qr(c[1])}},htmlBuilder:function(o,c){var h=qr(o.html,c,!1);return Ve.makeFragment(h)},mathmlBuilder:function(o,c){return en(o.mathml,c)}});var gs=function(o){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(o))return{number:+o,unit:"bp"};var c=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(o);if(!c)throw new ue("Invalid size: '"+o+"' in \\includegraphics");var h={number:+(c[1]+c[2]),unit:c[3]};if(!Pr(h))throw new ue("Invalid unit: '"+h.unit+"' in \\includegraphics.");return h};Bt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:function(o,c,h){var p=o.parser,E={number:0,unit:"em"},D={number:.9,unit:"em"},J={number:0,unit:"em"},le="";if(h[0])for(var _e=Zt(h[0],"raw").string,Ke=_e.split(","),Je=0;Je<Ke.length;Je++){var lt=Ke[Je].split("=");if(lt.length===2){var gt=lt[1].trim();switch(lt[0].trim()){case"alt":le=gt;break;case"width":E=gs(gt);break;case"height":D=gs(gt);break;case"totalheight":J=gs(gt);break;default:throw new ue("Invalid key: '"+lt[0]+"' in \\includegraphics.")}}}var xt=Zt(c[0],"url").url;return le===""&&(le=xt,le=le.replace(/^.*[\\/]/,""),le=le.substring(0,le.lastIndexOf("."))),p.settings.isTrusted({command:"\\includegraphics",url:xt})?{type:"includegraphics",mode:p.mode,alt:le,width:E,height:D,totalheight:J,src:xt}:p.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:function(o,c){var h=hr(o.height,c),p=0;o.totalheight.number>0&&(p=hr(o.totalheight,c)-h,p=Number(p.toFixed(2)));var E=0;o.width.number>0&&(E=hr(o.width,c));var D={height:h+p+"em"};E>0&&(D.width=E+"em"),p>0&&(D.verticalAlign=-p+"em");var J=new Re(o.src,o.alt,D);return J.height=h,J.depth=p,J},mathmlBuilder:function(o,c){var h=new wt.MathNode("mglyph",[]);h.setAttribute("alt",o.alt);var p=hr(o.height,c),E=0;if(o.totalheight.number>0&&(E=hr(o.totalheight,c)-p,E=E.toFixed(2),h.setAttribute("valign","-"+E+"em")),h.setAttribute("height",p+E+"em"),o.width.number>0){var D=hr(o.width,c);h.setAttribute("width",D+"em")}return h.setAttribute("src",o.src),h}}),Bt({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],allowedInText:!0},handler:function(o,c){var h=o.parser,p=o.funcName,E=Zt(c[0],"size");if(h.settings.strict){var D=p[1]==="m",J=E.value.unit==="mu";D?(J||h.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+p+" supports only mu units, "+("not "+E.value.unit+" units")),h.mode!=="math"&&h.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+p+" works only in math mode")):J&&h.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+p+" doesn't support mu units")}return{type:"kern",mode:h.mode,dimension:E.value}},htmlBuilder:function(o,c){return Ve.makeGlue(o.dimension,c)},mathmlBuilder:function(o,c){var h=hr(o.dimension,c);return new wt.SpaceNode(h)}}),Bt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(o,c){var h=o.parser,p=o.funcName,E=c[0];return{type:"lap",mode:h.mode,alignment:p.slice(5),body:E}},htmlBuilder:function(o,c){var h;o.alignment==="clap"?(h=Ve.makeSpan([],[cr(o.body,c)]),h=Ve.makeSpan(["inner"],[h],c)):h=Ve.makeSpan(["inner"],[cr(o.body,c)]);var p=Ve.makeSpan(["fix"],[]),E=Ve.makeSpan([o.alignment],[h,p],c),D=Ve.makeSpan(["strut"]);return D.style.height=E.height+E.depth+"em",D.style.verticalAlign=-E.depth+"em",E.children.unshift(D),E=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:E}]},c),Ve.makeSpan(["mord"],[E],c)},mathmlBuilder:function(o,c){var h=new wt.MathNode("mpadded",[xr(o.body,c)]);if(o.alignment!=="rlap"){var p=o.alignment==="llap"?"-1":"-0.5";h.setAttribute("lspace",p+"width")}return h.setAttribute("width","0px"),h}}),Bt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(o,c){var h=o.funcName,p=o.parser,E=p.mode;p.switchMode("math");var D=h==="\\("?"\\)":"$",J=p.parseExpression(!1,D);return p.expect(D),p.switchMode(E),{type:"styling",mode:p.mode,style:"text",body:J}}}),Bt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(o,c){throw new ue("Mismatched "+o.funcName)}});var $s=function(o,c){switch(c.style.size){case x.DISPLAY.size:return o.display;case x.TEXT.size:return o.text;case x.SCRIPT.size:return o.script;case x.SCRIPTSCRIPT.size:return o.scriptscript;default:return o.text}};Bt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4},handler:function(o,c){var h=o.parser;return{type:"mathchoice",mode:h.mode,display:Qr(c[0]),text:Qr(c[1]),script:Qr(c[2]),scriptscript:Qr(c[3])}},htmlBuilder:function(o,c){var h=$s(o,c),p=qr(h,c,!1);return Ve.makeFragment(p)},mathmlBuilder:function(o,c){var h=$s(o,c);return en(h,c)}});var _s=function(o,c,h,p,E,D,J){o=Ve.makeSpan([],[o]);var le,_e;if(c){var Ke=cr(c,p.havingStyle(E.sup()),p);_e={elem:Ke,kern:Math.max(p.fontMetrics().bigOpSpacing1,p.fontMetrics().bigOpSpacing3-Ke.depth)}}if(h){var Je=cr(h,p.havingStyle(E.sub()),p);le={elem:Je,kern:Math.max(p.fontMetrics().bigOpSpacing2,p.fontMetrics().bigOpSpacing4-Je.height)}}var lt;if(_e&&le){var gt=p.fontMetrics().bigOpSpacing5+le.elem.height+le.elem.depth+le.kern+o.depth+J;lt=Ve.makeVList({positionType:"bottom",positionData:gt,children:[{type:"kern",size:p.fontMetrics().bigOpSpacing5},{type:"elem",elem:le.elem,marginLeft:-D+"em"},{type:"kern",size:le.kern},{type:"elem",elem:o},{type:"kern",size:_e.kern},{type:"elem",elem:_e.elem,marginLeft:D+"em"},{type:"kern",size:p.fontMetrics().bigOpSpacing5}]},p)}else if(le){var xt=o.height-J;lt=Ve.makeVList({positionType:"top",positionData:xt,children:[{type:"kern",size:p.fontMetrics().bigOpSpacing5},{type:"elem",elem:le.elem,marginLeft:-D+"em"},{type:"kern",size:le.kern},{type:"elem",elem:o}]},p)}else if(_e){var Ct=o.depth+J;lt=Ve.makeVList({positionType:"bottom",positionData:Ct,children:[{type:"elem",elem:o},{type:"kern",size:_e.kern},{type:"elem",elem:_e.elem,marginLeft:D+"em"},{type:"kern",size:p.fontMetrics().bigOpSpacing5}]},p)}else return o;return Ve.makeSpan(["mop","op-limits"],[lt],p)},da=["\\smallint"],mi=function(o,c){var h,p,E=!1,D,J=Fr(o,"supsub");J?(h=J.sup,p=J.sub,D=Zt(J.base,"op"),E=!0):D=Zt(o,"op");var le=c.style,_e=!1;le.size===x.DISPLAY.size&&D.symbol&&!M.contains(da,D.name)&&(_e=!0);var Ke;if(D.symbol){var Je=_e?"Size2-Regular":"Size1-Regular",lt="";if((D.name==="\\oiint"||D.name==="\\oiiint")&&(lt=D.name.substr(1),D.name=lt==="oiint"?"\\iint":"\\iiint"),Ke=Ve.makeSymbol(D.name,Je,"math",c,["mop","op-symbol",_e?"large-op":"small-op"]),lt.length>0){var gt=Ke.italic,xt=Ve.staticSvg(lt+"Size"+(_e?"2":"1"),c);Ke=Ve.makeVList({positionType:"individualShift",children:[{type:"elem",elem:Ke,shift:0},{type:"elem",elem:xt,shift:_e?.08:0}]},c),D.name="\\"+lt,Ke.classes.unshift("mop"),Ke.italic=gt}}else if(D.body){var Ct=qr(D.body,c,!0);Ct.length===1&&Ct[0]instanceof K?(Ke=Ct[0],Ke.classes[0]="mop"):Ke=Ve.makeSpan(["mop"],Ve.tryCombineChars(Ct),c)}else{for(var Ht=[],er=1;er<D.name.length;er++)Ht.push(Ve.mathsym(D.name[er],D.mode,c));Ke=Ve.makeSpan(["mop"],Ht,c)}var nr=0,tr=0;return(Ke instanceof K||D.name==="\\oiint"||D.name==="\\oiiint")&&!D.suppressBaseShift&&(nr=(Ke.height-Ke.depth)/2-c.fontMetrics().axisHeight,tr=Ke.italic),E?_s(Ke,h,p,c,le,tr,nr):(nr&&(Ke.style.position="relative",Ke.style.top=nr+"em"),Ke)},is=function(o,c){var h;if(o.symbol)h=new _n("mo",[vn(o.name,o.mode)]),M.contains(da,o.name)&&h.setAttribute("largeop","false");else if(o.body)h=new _n("mo",cn(o.body,c));else{h=new _n("mi",[new ci(o.name.slice(1))]);var p=new _n("mo",[vn("\u2061","text")]);o.parentIsSupSub?h=new _n("mo",[h,p]):h=Ii([h,p])}return h},Ka={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};Bt({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","\u220F","\u2210","\u2211","\u22C0","\u22C1","\u22C2","\u22C3","\u2A00","\u2A01","\u2A02","\u2A04","\u2A06"],props:{numArgs:0},handler:function(o,c){var h=o.parser,p=o.funcName,E=p;return E.length===1&&(E=Ka[E]),{type:"op",mode:h.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:E}},htmlBuilder:mi,mathmlBuilder:is}),Bt({type:"op",names:["\\mathop"],props:{numArgs:1},handler:function(o,c){var h=o.parser,p=c[0];return{type:"op",mode:h.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:Qr(p)}},htmlBuilder:mi,mathmlBuilder:is});var pa={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};Bt({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler:function(o){var c=o.parser,h=o.funcName;return{type:"op",mode:c.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:h}},htmlBuilder:mi,mathmlBuilder:is}),Bt({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler:function(o){var c=o.parser,h=o.funcName;return{type:"op",mode:c.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:h}},htmlBuilder:mi,mathmlBuilder:is}),Bt({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler:function(o){var c=o.parser,h=o.funcName,p=h;return p.length===1&&(p=pa[p]),{type:"op",mode:c.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:p}},htmlBuilder:mi,mathmlBuilder:is});var Gs=function(o,c){var h,p,E=!1,D,J=Fr(o,"supsub");J?(h=J.sup,p=J.sub,D=Zt(J.base,"operatorname"),E=!0):D=Zt(o,"operatorname");var le;if(D.body.length>0){for(var _e=D.body.map(function(gt){var xt=gt.text;return typeof xt=="string"?{type:"textord",mode:gt.mode,text:xt}:gt}),Ke=qr(_e,c.withFont("mathrm"),!0),Je=0;Je<Ke.length;Je++){var lt=Ke[Je];lt instanceof K&&(lt.text=lt.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}le=Ve.makeSpan(["mop"],Ke,c)}else le=Ve.makeSpan(["mop"],[],c);return E?_s(le,h,p,c,c.style,0,0):le},Ha=function(o,c){for(var h=cn(o.body,c.withFont("mathrm")),p=!0,E=0;E<h.length;E++){var D=h[E];if(!(D instanceof wt.SpaceNode))if(D instanceof wt.MathNode)switch(D.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var J=D.children[0];D.children.length===1&&J instanceof wt.TextNode?J.text=J.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):p=!1;break}default:p=!1}else p=!1}if(p){var le=h.map(function(Je){return Je.toText()}).join("");h=[new wt.TextNode(le)]}var _e=new wt.MathNode("mi",h);_e.setAttribute("mathvariant","normal");var Ke=new wt.MathNode("mo",[vn("\u2061","text")]);return o.parentIsSupSub?new wt.MathNode("mo",[_e,Ke]):wt.newDocumentFragment([_e,Ke])};Bt({type:"operatorname",names:["\\operatorname","\\operatorname*"],props:{numArgs:1},handler:function(o,c){var h=o.parser,p=o.funcName,E=c[0];return{type:"operatorname",mode:h.mode,body:Qr(E),alwaysHandleSupSub:p==="\\operatorname*",limits:!1,parentIsSupSub:!1}},htmlBuilder:Gs,mathmlBuilder:Ha}),Dn({type:"ordgroup",htmlBuilder:function(o,c){return o.semisimple?Ve.makeFragment(qr(o.body,c,!1)):Ve.makeSpan(["mord"],qr(o.body,c,!0),c)},mathmlBuilder:function(o,c){return en(o.body,c,!0)}}),Bt({type:"overline",names:["\\overline"],props:{numArgs:1},handler:function(o,c){var h=o.parser,p=c[0];return{type:"overline",mode:h.mode,body:p}},htmlBuilder:function(o,c){var h=cr(o.body,c.havingCrampedStyle()),p=Ve.makeLineSpan("overline-line",c),E=c.fontMetrics().defaultRuleThickness,D=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:h},{type:"kern",size:3*E},{type:"elem",elem:p},{type:"kern",size:E}]},c);return Ve.makeSpan(["mord","overline"],[D],c)},mathmlBuilder:function(o,c){var h=new wt.MathNode("mo",[new wt.TextNode("\u203E")]);h.setAttribute("stretchy","true");var p=new wt.MathNode("mover",[xr(o.body,c),h]);return p.setAttribute("accent","true"),p}}),Bt({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:function(o,c){var h=o.parser,p=c[0];return{type:"phantom",mode:h.mode,body:Qr(p)}},htmlBuilder:function(o,c){var h=qr(o.body,c.withPhantom(),!1);return Ve.makeFragment(h)},mathmlBuilder:function(o,c){var h=cn(o.body,c);return new wt.MathNode("mphantom",h)}}),Bt({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:function(o,c){var h=o.parser,p=c[0];return{type:"hphantom",mode:h.mode,body:p}},htmlBuilder:function(o,c){var h=Ve.makeSpan([],[cr(o.body,c.withPhantom())]);if(h.height=0,h.depth=0,h.children)for(var p=0;p<h.children.length;p++)h.children[p].height=0,h.children[p].depth=0;return h=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:h}]},c),Ve.makeSpan(["mord"],[h],c)},mathmlBuilder:function(o,c){var h=cn(Qr(o.body),c),p=new wt.MathNode("mphantom",h),E=new wt.MathNode("mpadded",[p]);return E.setAttribute("height","0px"),E.setAttribute("depth","0px"),E}}),Bt({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:function(o,c){var h=o.parser,p=c[0];return{type:"vphantom",mode:h.mode,body:p}},htmlBuilder:function(o,c){var h=Ve.makeSpan(["inner"],[cr(o.body,c.withPhantom())]),p=Ve.makeSpan(["fix"],[]);return Ve.makeSpan(["mord","rlap"],[h,p],c)},mathmlBuilder:function(o,c){var h=cn(Qr(o.body),c),p=new wt.MathNode("mphantom",h),E=new wt.MathNode("mpadded",[p]);return E.setAttribute("width","0px"),E}}),Bt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler:function(o,c){var h=o.parser,p=Zt(c[0],"size").value,E=c[1];return{type:"raisebox",mode:h.mode,dy:p,body:E}},htmlBuilder:function(o,c){var h=cr(o.body,c),p=hr(o.dy,c);return Ve.makeVList({positionType:"shift",positionData:-p,children:[{type:"elem",elem:h}]},c)},mathmlBuilder:function(o,c){var h=new wt.MathNode("mpadded",[xr(o.body,c)]),p=o.dy.number+o.dy.unit;return h.setAttribute("voffset",p),h}}),Bt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler:function(o,c,h){var p=o.parser,E=h[0],D=Zt(c[0],"size"),J=Zt(c[1],"size");return{type:"rule",mode:p.mode,shift:E&&Zt(E,"size").value,width:D.value,height:J.value}},htmlBuilder:function(o,c){var h=Ve.makeSpan(["mord","rule"],[],c),p=hr(o.width,c),E=hr(o.height,c),D=o.shift?hr(o.shift,c):0;return h.style.borderRightWidth=p+"em",h.style.borderTopWidth=E+"em",h.style.bottom=D+"em",h.width=p,h.height=E+D,h.depth=-D,h.maxFontSize=E*1.125*c.sizeMultiplier,h},mathmlBuilder:function(o,c){var h=hr(o.width,c),p=hr(o.height,c),E=o.shift?hr(o.shift,c):0,D=c.color&&c.getColor()||"black",J=new wt.MathNode("mspace");J.setAttribute("mathbackground",D),J.setAttribute("width",h+"em"),J.setAttribute("height",p+"em");var le=new wt.MathNode("mpadded",[J]);return E>=0?le.setAttribute("height","+"+E+"em"):(le.setAttribute("height",E+"em"),le.setAttribute("depth","+"+-E+"em")),le.setAttribute("voffset",E+"em"),le}});function js(k,o,c){for(var h=qr(k,o,!1),p=o.sizeMultiplier/c.sizeMultiplier,E=0;E<h.length;E++){var D=h[E].classes.indexOf("sizing");D<0?Array.prototype.push.apply(h[E].classes,o.sizingClasses(c)):h[E].classes[D+1]==="reset-size"+o.size&&(h[E].classes[D+1]="reset-size"+c.size),h[E].height*=p,h[E].depth*=p}return Ve.makeFragment(h)}var ss=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Wa=function(o,c){var h=c.havingSize(o.size);return js(o.body,h,c)};Bt({type:"sizing",names:ss,props:{numArgs:0,allowedInText:!0},handler:function(o,c){var h=o.breakOnTokenText,p=o.funcName,E=o.parser,D=E.parseExpression(!1,h);return{type:"sizing",mode:E.mode,size:ss.indexOf(p)+1,body:D}},htmlBuilder:Wa,mathmlBuilder:function(o,c){var h=c.havingSize(o.size),p=cn(o.body,h),E=new wt.MathNode("mstyle",p);return E.setAttribute("mathsize",h.sizeMultiplier+"em"),E}}),Bt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(o,c,h){var p=o.parser,E=!1,D=!1,J=h[0]&&Zt(h[0],"ordgroup");if(J)for(var le="",_e=0;_e<J.body.length;++_e){var Ke=J.body[_e];if(le=Ke.text,le==="t")E=!0;else if(le==="b")D=!0;else{E=!1,D=!1;break}}else E=!0,D=!0;var Je=c[0];return{type:"smash",mode:p.mode,body:Je,smashHeight:E,smashDepth:D}},htmlBuilder:function(o,c){var h=Ve.makeSpan([],[cr(o.body,c)]);if(!o.smashHeight&&!o.smashDepth)return h;if(o.smashHeight&&(h.height=0,h.children))for(var p=0;p<h.children.length;p++)h.children[p].height=0;if(o.smashDepth&&(h.depth=0,h.children))for(var E=0;E<h.children.length;E++)h.children[E].depth=0;var D=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:h}]},c);return Ve.makeSpan(["mord"],[D],c)},mathmlBuilder:function(o,c){var h=new wt.MathNode("mpadded",[xr(o.body,c)]);return o.smashHeight&&h.setAttribute("height","0px"),o.smashDepth&&h.setAttribute("depth","0px"),h}}),Bt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler:function(o,c,h){var p=o.parser,E=h[0],D=c[0];return{type:"sqrt",mode:p.mode,body:D,index:E}},htmlBuilder:function(o,c){var h=cr(o.body,c.havingCrampedStyle());h.height===0&&(h.height=c.fontMetrics().xHeight),h=Ve.wrapFragment(h,c);var p=c.fontMetrics(),E=p.defaultRuleThickness,D=E;c.style.id<x.TEXT.id&&(D=c.fontMetrics().xHeight);var J=E+D/4,le=h.height+h.depth+J+E,_e=qn.sqrtImage(le,c),Ke=_e.span,Je=_e.ruleWidth,lt=_e.advanceWidth,gt=Ke.height-Je;gt>h.height+h.depth+J&&(J=(J+gt-h.height-h.depth)/2);var xt=Ke.height-h.height-J-Je;h.style.paddingLeft=lt+"em";var Ct=Ve.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:h,wrapperClasses:["svg-align"]},{type:"kern",size:-(h.height+xt)},{type:"elem",elem:Ke},{type:"kern",size:Je}]},c);if(o.index){var Ht=c.havingStyle(x.SCRIPTSCRIPT),er=cr(o.index,Ht,c),nr=.6*(Ct.height-Ct.depth),tr=Ve.makeVList({positionType:"shift",positionData:-nr,children:[{type:"elem",elem:er}]},c),Lr=Ve.makeSpan(["root"],[tr]);return Ve.makeSpan(["mord","sqrt"],[Lr,Ct],c)}else return Ve.makeSpan(["mord","sqrt"],[Ct],c)},mathmlBuilder:function(o,c){var h=o.body,p=o.index;return p?new wt.MathNode("mroot",[xr(h,c),xr(p,c)]):new wt.MathNode("msqrt",[xr(h,c)])}});var ma={display:x.DISPLAY,text:x.TEXT,script:x.SCRIPT,scriptscript:x.SCRIPTSCRIPT};Bt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0},handler:function(o,c){var h=o.breakOnTokenText,p=o.funcName,E=o.parser,D=E.parseExpression(!0,h),J=p.slice(1,p.length-5);return{type:"styling",mode:E.mode,style:J,body:D}},htmlBuilder:function(o,c){var h=ma[o.style],p=c.havingStyle(h).withFont("");return js(o.body,p,c)},mathmlBuilder:function(o,c){var h=ma[o.style],p=c.havingStyle(h),E=cn(o.body,p),D=new wt.MathNode("mstyle",E),J={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},le=J[o.style];return D.setAttribute("scriptlevel",le[0]),D.setAttribute("displaystyle",le[1]),D}});var Va=function(o,c){var h=o.base;if(h)if(h.type==="op"){var p=h.limits&&(c.style.size===x.DISPLAY.size||h.alwaysHandleSupSub);return p?mi:null}else if(h.type==="operatorname"){var E=h.alwaysHandleSupSub&&(c.style.size===x.DISPLAY.size||h.limits);return E?Gs:null}else{if(h.type==="accent")return M.isCharacterBox(h.base)?dr:null;if(h.type==="horizBrace"){var D=!o.sub;return D===h.isOver?fa:null}else return null}else return null};Dn({type:"supsub",htmlBuilder:function(o,c){var h=Va(o,c);if(h)return h(o,c);var p=o.base,E=o.sup,D=o.sub,J=cr(p,c),le,_e,Ke=c.fontMetrics(),Je=0,lt=0,gt=p&&M.isCharacterBox(p);if(E){var xt=c.havingStyle(c.style.sup());le=cr(E,xt,c),gt||(Je=J.height-xt.fontMetrics().supDrop*xt.sizeMultiplier/c.sizeMultiplier)}if(D){var Ct=c.havingStyle(c.style.sub());_e=cr(D,Ct,c),gt||(lt=J.depth+Ct.fontMetrics().subDrop*Ct.sizeMultiplier/c.sizeMultiplier)}var Ht;c.style===x.DISPLAY?Ht=Ke.sup1:c.style.cramped?Ht=Ke.sup3:Ht=Ke.sup2;var er=c.sizeMultiplier,nr=.5/Ke.ptPerEm/er+"em",tr=null;if(_e){var Lr=o.base&&o.base.type==="op"&&o.base.name&&(o.base.name==="\\oiint"||o.base.name==="\\oiiint");(J instanceof K||Lr)&&(tr=-J.italic+"em")}var Ir;if(le&&_e){Je=Math.max(Je,Ht,le.depth+.25*Ke.xHeight),lt=Math.max(lt,Ke.sub2);var $r=Ke.defaultRuleThickness,Hr=4*$r;if(Je-le.depth-(_e.height-lt)<Hr){lt=Hr-(Je-le.depth)+_e.height;var Xr=.8*Ke.xHeight-(Je-le.depth);Xr>0&&(Je+=Xr,lt-=Xr)}var yn=[{type:"elem",elem:_e,shift:lt,marginRight:nr,marginLeft:tr},{type:"elem",elem:le,shift:-Je,marginRight:nr}];Ir=Ve.makeVList({positionType:"individualShift",children:yn},c)}else if(_e){lt=Math.max(lt,Ke.sub1,_e.height-.8*Ke.xHeight);var hn=[{type:"elem",elem:_e,marginLeft:tr,marginRight:nr}];Ir=Ve.makeVList({positionType:"shift",positionData:lt,children:hn},c)}else if(le)Je=Math.max(Je,Ht,le.depth+.25*Ke.xHeight),Ir=Ve.makeVList({positionType:"shift",positionData:-Je,children:[{type:"elem",elem:le,marginRight:nr}]},c);else throw new Error("supsub must have either sup or sub.");var kr=gn(J,"right")||"mord";return Ve.makeSpan([kr],[J,Ve.makeSpan(["msupsub"],[Ir])],c)},mathmlBuilder:function(o,c){var h=!1,p,E,D=Fr(o.base,"horizBrace");D&&(E=!!o.sup,E===D.isOver&&(h=!0,p=D.isOver)),o.base&&(o.base.type==="op"||o.base.type==="operatorname")&&(o.base.parentIsSupSub=!0);var J=[xr(o.base,c)];o.sub&&J.push(xr(o.sub,c)),o.sup&&J.push(xr(o.sup,c));var le;if(h)le=p?"mover":"munder";else if(o.sub)if(o.sup){var Je=o.base;Je&&Je.type==="op"&&Je.limits&&c.style===x.DISPLAY||Je&&Je.type==="operatorname"&&Je.alwaysHandleSupSub&&(c.style===x.DISPLAY||Je.limits)?le="munderover":le="msubsup"}else{var Ke=o.base;Ke&&Ke.type==="op"&&Ke.limits&&(c.style===x.DISPLAY||Ke.alwaysHandleSupSub)||Ke&&Ke.type==="operatorname"&&Ke.alwaysHandleSupSub&&(Ke.limits||c.style===x.DISPLAY)?le="munder":le="msub"}else{var _e=o.base;_e&&_e.type==="op"&&_e.limits&&(c.style===x.DISPLAY||_e.alwaysHandleSupSub)||_e&&_e.type==="operatorname"&&_e.alwaysHandleSupSub&&(_e.limits||c.style===x.DISPLAY)?le="mover":le="msup"}var lt=new wt.MathNode(le,J);return lt}}),Dn({type:"atom",htmlBuilder:function(o,c){return Ve.mathsym(o.text,o.mode,c,["m"+o.family])},mathmlBuilder:function(o,c){var h=new wt.MathNode("mo",[vn(o.text,o.mode)]);if(o.family==="bin"){var p=hi(o,c);p==="bold-italic"&&h.setAttribute("mathvariant",p)}else o.family==="punct"?h.setAttribute("separator","true"):(o.family==="open"||o.family==="close")&&h.setAttribute("stretchy","false");return h}});var ga={mi:"italic",mn:"normal",mtext:"normal"};Dn({type:"mathord",htmlBuilder:function(o,c){return Ve.makeOrd(o,c,"mathord")},mathmlBuilder:function(o,c){var h=new wt.MathNode("mi",[vn(o.text,o.mode,c)]),p=hi(o,c)||"italic";return p!==ga[h.type]&&h.setAttribute("mathvariant",p),h}}),Dn({type:"textord",htmlBuilder:function(o,c){return Ve.makeOrd(o,c,"textord")},mathmlBuilder:function(o,c){var h=vn(o.text,o.mode,c),p=hi(o,c)||"normal",E;return o.mode==="text"?E=new wt.MathNode("mtext",[h]):/[0-9]/.test(o.text)?E=new wt.MathNode("mn",[h]):o.text==="\\prime"?E=new wt.MathNode("mo",[h]):E=new wt.MathNode("mi",[h]),p!==ga[E.type]&&E.setAttribute("mathvariant",p),E}});var vs={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},ys={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Dn({type:"spacing",htmlBuilder:function(o,c){if(ys.hasOwnProperty(o.text)){var h=ys[o.text].className||"";if(o.mode==="text"){var p=Ve.makeOrd(o,c,"textord");return p.classes.push(h),p}else return Ve.makeSpan(["mspace",h],[Ve.mathsym(o.text,o.mode,c)],c)}else{if(vs.hasOwnProperty(o.text))return Ve.makeSpan(["mspace",vs[o.text]],[],c);throw new ue('Unknown type of space "'+o.text+'"')}},mathmlBuilder:function(o,c){var h;if(ys.hasOwnProperty(o.text))h=new wt.MathNode("mtext",[new wt.TextNode("\xA0")]);else{if(vs.hasOwnProperty(o.text))return new wt.MathNode("mspace");throw new ue('Unknown type of space "'+o.text+'"')}return h}});var bs=function(){var o=new wt.MathNode("mtd",[]);return o.setAttribute("width","50%"),o};Dn({type:"tag",mathmlBuilder:function(o,c){var h=new wt.MathNode("mtable",[new wt.MathNode("mtr",[bs(),new wt.MathNode("mtd",[en(o.body,c)]),bs(),new wt.MathNode("mtd",[en(o.tag,c)])])]);return h.setAttribute("width","100%"),h}});var Ks={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},_a={"\\textbf":"textbf","\\textmd":"textmd"},va={"\\textit":"textit","\\textup":"textup"},ya=function(o,c){var h=o.font;return h?Ks[h]?c.withTextFontFamily(Ks[h]):_a[h]?c.withTextFontWeight(_a[h]):c.withTextFontShape(va[h]):c};Bt({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],greediness:2,allowedInText:!0},handler:function(o,c){var h=o.parser,p=o.funcName,E=c[0];return{type:"text",mode:h.mode,body:Qr(E),font:p}},htmlBuilder:function(o,c){var h=ya(o,c),p=qr(o.body,h,!0);return Ve.makeSpan(["mord","text"],Ve.tryCombineChars(p),h)},mathmlBuilder:function(o,c){var h=ya(o,c);return en(o.body,h)}}),Bt({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(o,c){var h=o.parser;return{type:"underline",mode:h.mode,body:c[0]}},htmlBuilder:function(o,c){var h=cr(o.body,c),p=Ve.makeLineSpan("underline-line",c),E=c.fontMetrics().defaultRuleThickness,D=Ve.makeVList({positionType:"top",positionData:h.height,children:[{type:"kern",size:E},{type:"elem",elem:p},{type:"kern",size:3*E},{type:"elem",elem:h}]},c);return Ve.makeSpan(["mord","underline"],[D],c)},mathmlBuilder:function(o,c){var h=new wt.MathNode("mo",[new wt.TextNode("\u203E")]);h.setAttribute("stretchy","true");var p=new wt.MathNode("munder",[xr(o.body,c),h]);return p.setAttribute("accentunder","true"),p}}),Bt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(o,c,h){throw new ue("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(o,c){for(var h=ba(o),p=[],E=c.havingStyle(c.style.text()),D=0;D<h.length;D++){var J=h[D];J==="~"&&(J="\\textasciitilde"),p.push(Ve.makeSymbol(J,"Typewriter-Regular",o.mode,E,["mord","texttt"]))}return Ve.makeSpan(["mord","text"].concat(E.sizingClasses(c)),Ve.tryCombineChars(p),E)},mathmlBuilder:function(o,c){var h=new wt.TextNode(ba(o)),p=new wt.MathNode("mtext",[h]);return p.setAttribute("mathvariant","monospace"),p}});var ba=function(o){return o.body.replace(/ /g,o.star?"\u2423":"\xA0")},Ya=$i,Yi=Ya,Hs=`[ \r
]`,Ws="\\\\[a-zA-Z@]+",qa="\\\\[^\uD800-\uDFFF]",xa=""+Ws+Hs+"*",Za=new RegExp("^("+Ws+")"+Hs+"*$"),Vs="[\u0300-\u036F]",ln=new RegExp(Vs+"+$"),Di="("+Hs+"+)|([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(Vs+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Vs+"*")+"|\\\\verb\\*([^]).*?\\3|\\\\verb([^*a-zA-Z]).*?\\4|\\\\operatorname\\*"+("|"+xa)+("|"+qa+")"),xs=function(){function k(c,h){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=c,this.settings=h,this.tokenRegex=new RegExp(Di,"g"),this.catcodes={"%":14}}var o=k.prototype;return o.setCatcode=function(h,p){this.catcodes[h]=p},o.lex=function(){var h=this.input,p=this.tokenRegex.lastIndex;if(p===h.length)return new ke("EOF",new He(this,p,p));var E=this.tokenRegex.exec(h);if(E===null||E.index!==p)throw new ue("Unexpected character: '"+h[p]+"'",new ke(h[p],new He(this,p,p+1)));var D=E[2]||" ";if(this.catcodes[D]===14){var J=h.indexOf(`
`,this.tokenRegex.lastIndex);return J===-1?(this.tokenRegex.lastIndex=h.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=J+1,this.lex()}var le=D.match(Za);return le&&(D=le[1]),new ke(D,new He(this,p,this.tokenRegex.lastIndex))},k}(),Xa=function(){function k(c,h){c===void 0&&(c={}),h===void 0&&(h={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=h,this.builtins=c,this.undefStack=[]}var o=k.prototype;return o.beginGroup=function(){this.undefStack.push({})},o.endGroup=function(){if(this.undefStack.length===0)throw new ue("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var h=this.undefStack.pop();for(var p in h)h.hasOwnProperty(p)&&(h[p]===void 0?delete this.current[p]:this.current[p]=h[p])},o.has=function(h){return this.current.hasOwnProperty(h)||this.builtins.hasOwnProperty(h)},o.get=function(h){return this.current.hasOwnProperty(h)?this.current[h]:this.builtins[h]},o.set=function(h,p,E){if(E===void 0&&(E=!1),E){for(var D=0;D<this.undefStack.length;D++)delete this.undefStack[D][h];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][h]=p)}else{var J=this.undefStack[this.undefStack.length-1];J&&!J.hasOwnProperty(h)&&(J[h]=this.current[h])}this.current[h]=p},k}(),wa={},ws=wa;function pe(k,o){wa[k]=o}pe("\\@firstoftwo",function(k){var o=k.consumeArgs(2);return{tokens:o[0],numArgs:0}}),pe("\\@secondoftwo",function(k){var o=k.consumeArgs(2);return{tokens:o[1],numArgs:0}}),pe("\\@ifnextchar",function(k){var o=k.consumeArgs(3),c=k.future();return o[0].length===1&&o[0][0].text===c.text?{tokens:o[1],numArgs:0}:{tokens:o[2],numArgs:0}}),pe("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),pe("\\TextOrMath",function(k){var o=k.consumeArgs(2);return k.mode==="text"?{tokens:o[0],numArgs:0}:{tokens:o[1],numArgs:0}});var Ni={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};pe("\\char",function(k){var o=k.popToken(),c,h="";if(o.text==="'")c=8,o=k.popToken();else if(o.text==='"')c=16,o=k.popToken();else if(o.text==="`")if(o=k.popToken(),o.text[0]==="\\")h=o.text.charCodeAt(1);else{if(o.text==="EOF")throw new ue("\\char` missing argument");h=o.text.charCodeAt(0)}else c=10;if(c){if(h=Ni[o.text],h==null||h>=c)throw new ue("Invalid base-"+c+" digit "+o.text);for(var p;(p=Ni[k.future().text])!=null&&p<c;)h*=c,h+=p,k.popToken()}return"\\@char{"+h+"}"});var Ys=function(o,c){var h=o.consumeArgs(1)[0];if(h.length!==1)throw new ue("\\gdef's first argument must be a macro name");var p=h[0].text,E=0;for(h=o.consumeArgs(1)[0];h.length===1&&h[0].text==="#";){if(h=o.consumeArgs(1)[0],h.length!==1)throw new ue('Invalid argument number length "'+h.length+'"');if(!/^[1-9]$/.test(h[0].text))throw new ue('Invalid argument number "'+h[0].text+'"');if(E++,parseInt(h[0].text)!==E)throw new ue('Argument number "'+h[0].text+'" out of order');h=o.consumeArgs(1)[0]}return o.macros.set(p,{tokens:h,numArgs:E},c),""};pe("\\gdef",function(k){return Ys(k,!0)}),pe("\\def",function(k){return Ys(k,!1)}),pe("\\global",function(k){var o=k.consumeArgs(1)[0];if(o.length!==1)throw new ue("Invalid command after \\global");var c=o[0].text;if(c==="\\def")return Ys(k,!0);throw new ue("Invalid command '"+c+"' after \\global")});var Es=function(o,c,h){var p=o.consumeArgs(1)[0];if(p.length!==1)throw new ue("\\newcommand's first argument must be a macro name");var E=p[0].text,D=o.isDefined(E);if(D&&!c)throw new ue("\\newcommand{"+E+"} attempting to redefine "+(E+"; use \\renewcommand"));if(!D&&!h)throw new ue("\\renewcommand{"+E+"} when command "+E+" does not yet exist; use \\newcommand");var J=0;if(p=o.consumeArgs(1)[0],p.length===1&&p[0].text==="["){for(var le="",_e=o.expandNextToken();_e.text!=="]"&&_e.text!=="EOF";)le+=_e.text,_e=o.expandNextToken();if(!le.match(/^\s*[0-9]+\s*$/))throw new ue("Invalid number of arguments: "+le);J=parseInt(le),p=o.consumeArgs(1)[0]}return o.macros.set(E,{tokens:p,numArgs:J}),""};pe("\\newcommand",function(k){return Es(k,!1,!0)}),pe("\\renewcommand",function(k){return Es(k,!0,!1)}),pe("\\providecommand",function(k){return Es(k,!0,!0)}),pe("\\bgroup","{"),pe("\\egroup","}"),pe("\\lq","`"),pe("\\rq","'"),pe("\\aa","\\r a"),pe("\\AA","\\r A"),pe("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}"),pe("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),pe("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}"),pe("\u212C","\\mathscr{B}"),pe("\u2130","\\mathscr{E}"),pe("\u2131","\\mathscr{F}"),pe("\u210B","\\mathscr{H}"),pe("\u2110","\\mathscr{I}"),pe("\u2112","\\mathscr{L}"),pe("\u2133","\\mathscr{M}"),pe("\u211B","\\mathscr{R}"),pe("\u212D","\\mathfrak{C}"),pe("\u210C","\\mathfrak{H}"),pe("\u2128","\\mathfrak{Z}"),pe("\\Bbbk","\\Bbb{k}"),pe("\xB7","\\cdotp"),pe("\\llap","\\mathllap{\\textrm{#1}}"),pe("\\rlap","\\mathrlap{\\textrm{#1}}"),pe("\\clap","\\mathclap{\\textrm{#1}}"),pe("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),pe("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),pe("\\ne","\\neq"),pe("\u2260","\\neq"),pe("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),pe("\u2209","\\notin"),pe("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),pe("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),pe("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}"),pe("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}"),pe("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}"),pe("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}"),pe("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"),pe("\u27C2","\\perp"),pe("\u203C","\\mathclose{!\\mkern-0.8mu!}"),pe("\u220C","\\notni"),pe("\u231C","\\ulcorner"),pe("\u231D","\\urcorner"),pe("\u231E","\\llcorner"),pe("\u231F","\\lrcorner"),pe("\xA9","\\copyright"),pe("\xAE","\\textregistered"),pe("\uFE0F","\\textregistered"),pe("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),pe("\u22EE","\\vdots"),pe("\\varGamma","\\mathit{\\Gamma}"),pe("\\varDelta","\\mathit{\\Delta}"),pe("\\varTheta","\\mathit{\\Theta}"),pe("\\varLambda","\\mathit{\\Lambda}"),pe("\\varXi","\\mathit{\\Xi}"),pe("\\varPi","\\mathit{\\Pi}"),pe("\\varSigma","\\mathit{\\Sigma}"),pe("\\varUpsilon","\\mathit{\\Upsilon}"),pe("\\varPhi","\\mathit{\\Phi}"),pe("\\varPsi","\\mathit{\\Psi}"),pe("\\varOmega","\\mathit{\\Omega}"),pe("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),pe("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu"),pe("\\boxed","\\fbox{$\\displaystyle{#1}$}"),pe("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),pe("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),pe("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var gi={",":"\\dotsc","\\not":"\\dotsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarrow":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};pe("\\dots",function(k){var o="\\dotso",c=k.expandAfterFuture().text;return c in gi?o=gi[c]:(c.substr(0,4)==="\\not"||c in rt.math&&M.contains(["bin","rel"],rt.math[c].group))&&(o="\\dotsb"),o});var nt={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};pe("\\dotso",function(k){var o=k.future().text;return o in nt?"\\ldots\\,":"\\ldots"}),pe("\\dotsc",function(k){var o=k.future().text;return o in nt&&o!==","?"\\ldots\\,":"\\ldots"}),pe("\\cdots",function(k){var o=k.future().text;return o in nt?"\\@cdots\\,":"\\@cdots"}),pe("\\dotsb","\\cdots"),pe("\\dotsm","\\cdots"),pe("\\dotsi","\\!\\cdots"),pe("\\dotsx","\\ldots\\,"),pe("\\DOTSI","\\relax"),pe("\\DOTSB","\\relax"),pe("\\DOTSX","\\relax"),pe("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),pe("\\,","\\tmspace+{3mu}{.1667em}"),pe("\\thinspace","\\,"),pe("\\>","\\mskip{4mu}"),pe("\\:","\\tmspace+{4mu}{.2222em}"),pe("\\medspace","\\:"),pe("\\;","\\tmspace+{5mu}{.2777em}"),pe("\\thickspace","\\;"),pe("\\!","\\tmspace-{3mu}{.1667em}"),pe("\\negthinspace","\\!"),pe("\\negmedspace","\\tmspace-{4mu}{.2222em}"),pe("\\negthickspace","\\tmspace-{5mu}{.277em}"),pe("\\enspace","\\kern.5em "),pe("\\enskip","\\hskip.5em\\relax"),pe("\\quad","\\hskip1em\\relax"),pe("\\qquad","\\hskip2em\\relax"),pe("\\tag","\\@ifstar\\tag@literal\\tag@paren"),pe("\\tag@paren","\\tag@literal{({#1})}"),pe("\\tag@literal",function(k){if(k.macros.get("\\df@tag"))throw new ue("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),pe("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),pe("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),pe("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),pe("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),pe("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),pe("\\\\","\\newline"),pe("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var qs=Oe["Main-Regular"][84][1]-.7*Oe["Main-Regular"][65][1]+"em";pe("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+qs+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),pe("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+qs+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),pe("\\hspace","\\@ifstar\\@hspacer\\@hspace"),pe("\\@hspace","\\hskip #1\\relax"),pe("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),pe("\\ordinarycolon",":"),pe("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),pe("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),pe("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),pe("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),pe("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),pe("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),pe("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),pe("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),pe("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),pe("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),pe("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),pe("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),pe("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),pe("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),pe("\u2237","\\dblcolon"),pe("\u2239","\\eqcolon"),pe("\u2254","\\coloneqq"),pe("\u2255","\\eqqcolon"),pe("\u2A74","\\Coloneqq"),pe("\\ratio","\\vcentcolon"),pe("\\coloncolon","\\dblcolon"),pe("\\colonequals","\\coloneqq"),pe("\\coloncolonequals","\\Coloneqq"),pe("\\equalscolon","\\eqqcolon"),pe("\\equalscoloncolon","\\Eqqcolon"),pe("\\colonminus","\\coloneq"),pe("\\coloncolonminus","\\Coloneq"),pe("\\minuscolon","\\eqcolon"),pe("\\minuscoloncolon","\\Eqcolon"),pe("\\coloncolonapprox","\\Colonapprox"),pe("\\coloncolonsim","\\Colonsim"),pe("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),pe("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),pe("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),pe("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),pe("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}"),pe("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),pe("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),pe("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),pe("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),pe("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),pe("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),pe("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),pe("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),pe("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),pe("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),pe("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),pe("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),pe("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}"),pe("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}"),pe("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}"),pe("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}"),pe("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}"),pe("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}"),pe("\u27E6","\\llbracket"),pe("\u27E7","\\rrbracket"),pe("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),pe("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),pe("\u2983","\\lBrace"),pe("\u2984","\\rBrace"),pe("\\darr","\\downarrow"),pe("\\dArr","\\Downarrow"),pe("\\Darr","\\Downarrow"),pe("\\lang","\\langle"),pe("\\rang","\\rangle"),pe("\\uarr","\\uparrow"),pe("\\uArr","\\Uparrow"),pe("\\Uarr","\\Uparrow"),pe("\\N","\\mathbb{N}"),pe("\\R","\\mathbb{R}"),pe("\\Z","\\mathbb{Z}"),pe("\\alef","\\aleph"),pe("\\alefsym","\\aleph"),pe("\\Alpha","\\mathrm{A}"),pe("\\Beta","\\mathrm{B}"),pe("\\bull","\\bullet"),pe("\\Chi","\\mathrm{X}"),pe("\\clubs","\\clubsuit"),pe("\\cnums","\\mathbb{C}"),pe("\\Complex","\\mathbb{C}"),pe("\\Dagger","\\ddagger"),pe("\\diamonds","\\diamondsuit"),pe("\\empty","\\emptyset"),pe("\\Epsilon","\\mathrm{E}"),pe("\\Eta","\\mathrm{H}"),pe("\\exist","\\exists"),pe("\\harr","\\leftrightarrow"),pe("\\hArr","\\Leftrightarrow"),pe("\\Harr","\\Leftrightarrow"),pe("\\hearts","\\heartsuit"),pe("\\image","\\Im"),pe("\\infin","\\infty"),pe("\\Iota","\\mathrm{I}"),pe("\\isin","\\in"),pe("\\Kappa","\\mathrm{K}"),pe("\\larr","\\leftarrow"),pe("\\lArr","\\Leftarrow"),pe("\\Larr","\\Leftarrow"),pe("\\lrarr","\\leftrightarrow"),pe("\\lrArr","\\Leftrightarrow"),pe("\\Lrarr","\\Leftrightarrow"),pe("\\Mu","\\mathrm{M}"),pe("\\natnums","\\mathbb{N}"),pe("\\Nu","\\mathrm{N}"),pe("\\Omicron","\\mathrm{O}"),pe("\\plusmn","\\pm"),pe("\\rarr","\\rightarrow"),pe("\\rArr","\\Rightarrow"),pe("\\Rarr","\\Rightarrow"),pe("\\real","\\Re"),pe("\\reals","\\mathbb{R}"),pe("\\Reals","\\mathbb{R}"),pe("\\Rho","\\mathrm{P}"),pe("\\sdot","\\cdot"),pe("\\sect","\\S"),pe("\\spades","\\spadesuit"),pe("\\sub","\\subset"),pe("\\sube","\\subseteq"),pe("\\supe","\\supseteq"),pe("\\Tau","\\mathrm{T}"),pe("\\thetasym","\\vartheta"),pe("\\weierp","\\wp"),pe("\\Zeta","\\mathrm{Z}"),pe("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),pe("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),pe("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),pe("\\blue","\\textcolor{##6495ed}{#1}"),pe("\\orange","\\textcolor{##ffa500}{#1}"),pe("\\pink","\\textcolor{##ff00af}{#1}"),pe("\\red","\\textcolor{##df0030}{#1}"),pe("\\green","\\textcolor{##28ae7b}{#1}"),pe("\\gray","\\textcolor{gray}{#1}"),pe("\\purple","\\textcolor{##9d38bd}{#1}"),pe("\\blueA","\\textcolor{##ccfaff}{#1}"),pe("\\blueB","\\textcolor{##80f6ff}{#1}"),pe("\\blueC","\\textcolor{##63d9ea}{#1}"),pe("\\blueD","\\textcolor{##11accd}{#1}"),pe("\\blueE","\\textcolor{##0c7f99}{#1}"),pe("\\tealA","\\textcolor{##94fff5}{#1}"),pe("\\tealB","\\textcolor{##26edd5}{#1}"),pe("\\tealC","\\textcolor{##01d1c1}{#1}"),pe("\\tealD","\\textcolor{##01a995}{#1}"),pe("\\tealE","\\textcolor{##208170}{#1}"),pe("\\greenA","\\textcolor{##b6ffb0}{#1}"),pe("\\greenB","\\textcolor{##8af281}{#1}"),pe("\\greenC","\\textcolor{##74cf70}{#1}"),pe("\\greenD","\\textcolor{##1fab54}{#1}"),pe("\\greenE","\\textcolor{##0d923f}{#1}"),pe("\\goldA","\\textcolor{##ffd0a9}{#1}"),pe("\\goldB","\\textcolor{##ffbb71}{#1}"),pe("\\goldC","\\textcolor{##ff9c39}{#1}"),pe("\\goldD","\\textcolor{##e07d10}{#1}"),pe("\\goldE","\\textcolor{##a75a05}{#1}"),pe("\\redA","\\textcolor{##fca9a9}{#1}"),pe("\\redB","\\textcolor{##ff8482}{#1}"),pe("\\redC","\\textcolor{##f9685d}{#1}"),pe("\\redD","\\textcolor{##e84d39}{#1}"),pe("\\redE","\\textcolor{##bc2612}{#1}"),pe("\\maroonA","\\textcolor{##ffbde0}{#1}"),pe("\\maroonB","\\textcolor{##ff92c6}{#1}"),pe("\\maroonC","\\textcolor{##ed5fa6}{#1}"),pe("\\maroonD","\\textcolor{##ca337c}{#1}"),pe("\\maroonE","\\textcolor{##9e034e}{#1}"),pe("\\purpleA","\\textcolor{##ddd7ff}{#1}"),pe("\\purpleB","\\textcolor{##c6b9fc}{#1}"),pe("\\purpleC","\\textcolor{##aa87ff}{#1}"),pe("\\purpleD","\\textcolor{##7854ab}{#1}"),pe("\\purpleE","\\textcolor{##543b78}{#1}"),pe("\\mintA","\\textcolor{##f5f9e8}{#1}"),pe("\\mintB","\\textcolor{##edf2df}{#1}"),pe("\\mintC","\\textcolor{##e0e5cc}{#1}"),pe("\\grayA","\\textcolor{##f6f7f7}{#1}"),pe("\\grayB","\\textcolor{##f0f1f2}{#1}"),pe("\\grayC","\\textcolor{##e3e5e6}{#1}"),pe("\\grayD","\\textcolor{##d6d8da}{#1}"),pe("\\grayE","\\textcolor{##babec2}{#1}"),pe("\\grayF","\\textcolor{##888d93}{#1}"),pe("\\grayG","\\textcolor{##626569}{#1}"),pe("\\grayH","\\textcolor{##3b3e40}{#1}"),pe("\\grayI","\\textcolor{##21242c}{#1}"),pe("\\kaBlue","\\textcolor{##314453}{#1}"),pe("\\kaGreen","\\textcolor{##71B307}{#1}");var Ss={"\\relax":!0,"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Ja=function(){function k(c,h,p){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=h,this.expansionCount=0,this.feed(c),this.macros=new Xa(ws,h.macros),this.mode=p,this.stack=[]}var o=k.prototype;return o.feed=function(h){this.lexer=new xs(h,this.settings)},o.switchMode=function(h){this.mode=h},o.beginGroup=function(){this.macros.beginGroup()},o.endGroup=function(){this.macros.endGroup()},o.future=function(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},o.popToken=function(){return this.future(),this.stack.pop()},o.pushToken=function(h){this.stack.push(h)},o.pushTokens=function(h){var p;(p=this.stack).push.apply(p,h)},o.consumeSpaces=function(){for(;;){var h=this.future();if(h.text===" ")this.stack.pop();else break}},o.consumeArgs=function(h){for(var p=[],E=0;E<h;++E){this.consumeSpaces();var D=this.popToken();if(D.text==="{"){for(var J=[],le=1;le!==0;){var _e=this.popToken();if(J.push(_e),_e.text==="{")++le;else if(_e.text==="}")--le;else if(_e.text==="EOF")throw new ue("End of input in macro argument",D)}J.pop(),J.reverse(),p[E]=J}else{if(D.text==="EOF")throw new ue("End of input expecting macro argument");p[E]=[D]}}return p},o.expandOnce=function(){var h=this.popToken(),p=h.text,E=this._getExpansion(p);if(E==null)return this.pushToken(h),h;if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new ue("Too many expansions: infinite loop or need to increase maxExpand setting");var D=E.tokens;if(E.numArgs){var J=this.consumeArgs(E.numArgs);D=D.slice();for(var le=D.length-1;le>=0;--le){var _e=D[le];if(_e.text==="#"){if(le===0)throw new ue("Incomplete placeholder at end of macro body",_e);if(_e=D[--le],_e.text==="#")D.splice(le+1,1);else if(/^[1-9]$/.test(_e.text)){var Ke;(Ke=D).splice.apply(Ke,[le,2].concat(J[+_e.text-1]))}else throw new ue("Not a valid argument number",_e)}}}return this.pushTokens(D),D},o.expandAfterFuture=function(){return this.expandOnce(),this.future()},o.expandNextToken=function(){for(;;){var h=this.expandOnce();if(h instanceof ke)if(h.text==="\\relax")this.stack.pop();else return this.stack.pop()}throw new Error},o.expandMacro=function(h){if(this.macros.get(h)){var p=[],E=this.stack.length;for(this.pushToken(new ke(h));this.stack.length>E;){var D=this.expandOnce();D instanceof ke&&p.push(this.stack.pop())}return p}},o.expandMacroAsText=function(h){var p=this.expandMacro(h);return p&&p.map(function(E){return E.text}).join("")},o._getExpansion=function(h){var p=this.macros.get(h);if(p==null)return p;var E=typeof p=="function"?p(this):p;if(typeof E=="string"){var D=0;if(E.indexOf("#")!==-1)for(var J=E.replace(/##/g,"");J.indexOf("#"+(D+1))!==-1;)++D;for(var le=new xs(E,this.settings),_e=[],Ke=le.lex();Ke.text!=="EOF";)_e.push(Ke),Ke=le.lex();_e.reverse();var Je={tokens:_e,numArgs:D};return Je}return E},o.isDefined=function(h){return this.macros.has(h)||Yi.hasOwnProperty(h)||rt.math.hasOwnProperty(h)||rt.text.hasOwnProperty(h)||Ss.hasOwnProperty(h)},k}(),qi={"\u0301":{text:"\\'",math:"\\acute"},"\u0300":{text:"\\`",math:"\\grave"},"\u0308":{text:'\\"',math:"\\ddot"},"\u0303":{text:"\\~",math:"\\tilde"},"\u0304":{text:"\\=",math:"\\bar"},"\u0306":{text:"\\u",math:"\\breve"},"\u030C":{text:"\\v",math:"\\check"},"\u0302":{text:"\\^",math:"\\hat"},"\u0307":{text:"\\.",math:"\\dot"},"\u030A":{text:"\\r",math:"\\mathring"},"\u030B":{text:"\\H"}},Ea={\u00E1:"a\u0301",\u00E0:"a\u0300",\u00E4:"a\u0308",\u01DF:"a\u0308\u0304",\u00E3:"a\u0303",\u0101:"a\u0304",\u0103:"a\u0306",\u1EAF:"a\u0306\u0301",\u1EB1:"a\u0306\u0300",\u1EB5:"a\u0306\u0303",\u01CE:"a\u030C",\u00E2:"a\u0302",\u1EA5:"a\u0302\u0301",\u1EA7:"a\u0302\u0300",\u1EAB:"a\u0302\u0303",\u0227:"a\u0307",\u01E1:"a\u0307\u0304",\u00E5:"a\u030A",\u01FB:"a\u030A\u0301",\u1E03:"b\u0307",\u0107:"c\u0301",\u010D:"c\u030C",\u0109:"c\u0302",\u010B:"c\u0307",\u010F:"d\u030C",\u1E0B:"d\u0307",\u00E9:"e\u0301",\u00E8:"e\u0300",\u00EB:"e\u0308",\u1EBD:"e\u0303",\u0113:"e\u0304",\u1E17:"e\u0304\u0301",\u1E15:"e\u0304\u0300",\u0115:"e\u0306",\u011B:"e\u030C",\u00EA:"e\u0302",\u1EBF:"e\u0302\u0301",\u1EC1:"e\u0302\u0300",\u1EC5:"e\u0302\u0303",\u0117:"e\u0307",\u1E1F:"f\u0307",\u01F5:"g\u0301",\u1E21:"g\u0304",\u011F:"g\u0306",\u01E7:"g\u030C",\u011D:"g\u0302",\u0121:"g\u0307",\u1E27:"h\u0308",\u021F:"h\u030C",\u0125:"h\u0302",\u1E23:"h\u0307",\u00ED:"i\u0301",\u00EC:"i\u0300",\u00EF:"i\u0308",\u1E2F:"i\u0308\u0301",\u0129:"i\u0303",\u012B:"i\u0304",\u012D:"i\u0306",\u01D0:"i\u030C",\u00EE:"i\u0302",\u01F0:"j\u030C",\u0135:"j\u0302",\u1E31:"k\u0301",\u01E9:"k\u030C",\u013A:"l\u0301",\u013E:"l\u030C",\u1E3F:"m\u0301",\u1E41:"m\u0307",\u0144:"n\u0301",\u01F9:"n\u0300",\u00F1:"n\u0303",\u0148:"n\u030C",\u1E45:"n\u0307",\u00F3:"o\u0301",\u00F2:"o\u0300",\u00F6:"o\u0308",\u022B:"o\u0308\u0304",\u00F5:"o\u0303",\u1E4D:"o\u0303\u0301",\u1E4F:"o\u0303\u0308",\u022D:"o\u0303\u0304",\u014D:"o\u0304",\u1E53:"o\u0304\u0301",\u1E51:"o\u0304\u0300",\u014F:"o\u0306",\u01D2:"o\u030C",\u00F4:"o\u0302",\u1ED1:"o\u0302\u0301",\u1ED3:"o\u0302\u0300",\u1ED7:"o\u0302\u0303",\u022F:"o\u0307",\u0231:"o\u0307\u0304",\u0151:"o\u030B",\u1E55:"p\u0301",\u1E57:"p\u0307",\u0155:"r\u0301",\u0159:"r\u030C",\u1E59:"r\u0307",\u015B:"s\u0301",\u1E65:"s\u0301\u0307",\u0161:"s\u030C",\u1E67:"s\u030C\u0307",\u015D:"s\u0302",\u1E61:"s\u0307",\u1E97:"t\u0308",\u0165:"t\u030C",\u1E6B:"t\u0307",\u00FA:"u\u0301",\u00F9:"u\u0300",\u00FC:"u\u0308",\u01D8:"u\u0308\u0301",\u01DC:"u\u0308\u0300",\u01D6:"u\u0308\u0304",\u01DA:"u\u0308\u030C",\u0169:"u\u0303",\u1E79:"u\u0303\u0301",\u016B:"u\u0304",\u1E7B:"u\u0304\u0308",\u016D:"u\u0306",\u01D4:"u\u030C",\u00FB:"u\u0302",\u016F:"u\u030A",\u0171:"u\u030B",\u1E7D:"v\u0303",\u1E83:"w\u0301",\u1E81:"w\u0300",\u1E85:"w\u0308",\u0175:"w\u0302",\u1E87:"w\u0307",\u1E98:"w\u030A",\u1E8D:"x\u0308",\u1E8B:"x\u0307",\u00FD:"y\u0301",\u1EF3:"y\u0300",\u00FF:"y\u0308",\u1EF9:"y\u0303",\u0233:"y\u0304",\u0177:"y\u0302",\u1E8F:"y\u0307",\u1E99:"y\u030A",\u017A:"z\u0301",\u017E:"z\u030C",\u1E91:"z\u0302",\u017C:"z\u0307",\u00C1:"A\u0301",\u00C0:"A\u0300",\u00C4:"A\u0308",\u01DE:"A\u0308\u0304",\u00C3:"A\u0303",\u0100:"A\u0304",\u0102:"A\u0306",\u1EAE:"A\u0306\u0301",\u1EB0:"A\u0306\u0300",\u1EB4:"A\u0306\u0303",\u01CD:"A\u030C",\u00C2:"A\u0302",\u1EA4:"A\u0302\u0301",\u1EA6:"A\u0302\u0300",\u1EAA:"A\u0302\u0303",\u0226:"A\u0307",\u01E0:"A\u0307\u0304",\u00C5:"A\u030A",\u01FA:"A\u030A\u0301",\u1E02:"B\u0307",\u0106:"C\u0301",\u010C:"C\u030C",\u0108:"C\u0302",\u010A:"C\u0307",\u010E:"D\u030C",\u1E0A:"D\u0307",\u00C9:"E\u0301",\u00C8:"E\u0300",\u00CB:"E\u0308",\u1EBC:"E\u0303",\u0112:"E\u0304",\u1E16:"E\u0304\u0301",\u1E14:"E\u0304\u0300",\u0114:"E\u0306",\u011A:"E\u030C",\u00CA:"E\u0302",\u1EBE:"E\u0302\u0301",\u1EC0:"E\u0302\u0300",\u1EC4:"E\u0302\u0303",\u0116:"E\u0307",\u1E1E:"F\u0307",\u01F4:"G\u0301",\u1E20:"G\u0304",\u011E:"G\u0306",\u01E6:"G\u030C",\u011C:"G\u0302",\u0120:"G\u0307",\u1E26:"H\u0308",\u021E:"H\u030C",\u0124:"H\u0302",\u1E22:"H\u0307",\u00CD:"I\u0301",\u00CC:"I\u0300",\u00CF:"I\u0308",\u1E2E:"I\u0308\u0301",\u0128:"I\u0303",\u012A:"I\u0304",\u012C:"I\u0306",\u01CF:"I\u030C",\u00CE:"I\u0302",\u0130:"I\u0307",\u0134:"J\u0302",\u1E30:"K\u0301",\u01E8:"K\u030C",\u0139:"L\u0301",\u013D:"L\u030C",\u1E3E:"M\u0301",\u1E40:"M\u0307",\u0143:"N\u0301",\u01F8:"N\u0300",\u00D1:"N\u0303",\u0147:"N\u030C",\u1E44:"N\u0307",\u00D3:"O\u0301",\u00D2:"O\u0300",\u00D6:"O\u0308",\u022A:"O\u0308\u0304",\u00D5:"O\u0303",\u1E4C:"O\u0303\u0301",\u1E4E:"O\u0303\u0308",\u022C:"O\u0303\u0304",\u014C:"O\u0304",\u1E52:"O\u0304\u0301",\u1E50:"O\u0304\u0300",\u014E:"O\u0306",\u01D1:"O\u030C",\u00D4:"O\u0302",\u1ED0:"O\u0302\u0301",\u1ED2:"O\u0302\u0300",\u1ED6:"O\u0302\u0303",\u022E:"O\u0307",\u0230:"O\u0307\u0304",\u0150:"O\u030B",\u1E54:"P\u0301",\u1E56:"P\u0307",\u0154:"R\u0301",\u0158:"R\u030C",\u1E58:"R\u0307",\u015A:"S\u0301",\u1E64:"S\u0301\u0307",\u0160:"S\u030C",\u1E66:"S\u030C\u0307",\u015C:"S\u0302",\u1E60:"S\u0307",\u0164:"T\u030C",\u1E6A:"T\u0307",\u00DA:"U\u0301",\u00D9:"U\u0300",\u00DC:"U\u0308",\u01D7:"U\u0308\u0301",\u01DB:"U\u0308\u0300",\u01D5:"U\u0308\u0304",\u01D9:"U\u0308\u030C",\u0168:"U\u0303",\u1E78:"U\u0303\u0301",\u016A:"U\u0304",\u1E7A:"U\u0304\u0308",\u016C:"U\u0306",\u01D3:"U\u030C",\u00DB:"U\u0302",\u016E:"U\u030A",\u0170:"U\u030B",\u1E7C:"V\u0303",\u1E82:"W\u0301",\u1E80:"W\u0300",\u1E84:"W\u0308",\u0174:"W\u0302",\u1E86:"W\u0307",\u1E8C:"X\u0308",\u1E8A:"X\u0307",\u00DD:"Y\u0301",\u1EF2:"Y\u0300",\u0178:"Y\u0308",\u1EF8:"Y\u0303",\u0232:"Y\u0304",\u0176:"Y\u0302",\u1E8E:"Y\u0307",\u0179:"Z\u0301",\u017D:"Z\u030C",\u1E90:"Z\u0302",\u017B:"Z\u0307",\u03AC:"\u03B1\u0301",\u1F70:"\u03B1\u0300",\u1FB1:"\u03B1\u0304",\u1FB0:"\u03B1\u0306",\u03AD:"\u03B5\u0301",\u1F72:"\u03B5\u0300",\u03AE:"\u03B7\u0301",\u1F74:"\u03B7\u0300",\u03AF:"\u03B9\u0301",\u1F76:"\u03B9\u0300",\u03CA:"\u03B9\u0308",\u0390:"\u03B9\u0308\u0301",\u1FD2:"\u03B9\u0308\u0300",\u1FD1:"\u03B9\u0304",\u1FD0:"\u03B9\u0306",\u03CC:"\u03BF\u0301",\u1F78:"\u03BF\u0300",\u03CD:"\u03C5\u0301",\u1F7A:"\u03C5\u0300",\u03CB:"\u03C5\u0308",\u03B0:"\u03C5\u0308\u0301",\u1FE2:"\u03C5\u0308\u0300",\u1FE1:"\u03C5\u0304",\u1FE0:"\u03C5\u0306",\u03CE:"\u03C9\u0301",\u1F7C:"\u03C9\u0300",\u038E:"\u03A5\u0301",\u1FEA:"\u03A5\u0300",\u03AB:"\u03A5\u0308",\u1FE9:"\u03A5\u0304",\u1FE8:"\u03A5\u0306",\u038F:"\u03A9\u0301",\u1FFA:"\u03A9\u0300"},As=function(){function k(c,h){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new Ja(c,h,this.mode),this.settings=h,this.leftrightDepth=0}var o=k.prototype;return o.expect=function(h,p){if(p===void 0&&(p=!0),this.fetch().text!==h)throw new ue("Expected '"+h+"', got '"+this.fetch().text+"'",this.fetch());p&&this.consume()},o.consume=function(){this.nextToken=null},o.fetch=function(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken},o.switchMode=function(h){this.mode=h,this.gullet.switchMode(h)},o.parse=function(){this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");var h=this.parseExpression(!1);return this.expect("EOF"),this.gullet.endGroup(),h},o.parseExpression=function(h,p){for(var E=[];;){this.mode==="math"&&this.consumeSpaces();var D=this.fetch();if(k.endOfExpression.indexOf(D.text)!==-1||p&&D.text===p||h&&Yi[D.text]&&Yi[D.text].infix)break;var J=this.parseAtom(p);if(!J)break;E.push(J)}return this.mode==="text"&&this.formLigatures(E),this.handleInfixNodes(E)},o.handleInfixNodes=function(h){for(var p=-1,E,D=0;D<h.length;D++){var J=Fr(h[D],"infix");if(J){if(p!==-1)throw new ue("only one infix operator per group",J.token);p=D,E=J.replaceWith}}if(p!==-1&&E){var le,_e,Ke=h.slice(0,p),Je=h.slice(p+1);Ke.length===1&&Ke[0].type==="ordgroup"?le=Ke[0]:le={type:"ordgroup",mode:this.mode,body:Ke},Je.length===1&&Je[0].type==="ordgroup"?_e=Je[0]:_e={type:"ordgroup",mode:this.mode,body:Je};var lt;return E==="\\\\abovefrac"?lt=this.callFunction(E,[le,h[p],_e],[]):lt=this.callFunction(E,[le,_e],[]),[lt]}else return h},o.handleSupSubscript=function(h){var p=this.fetch(),E=p.text;this.consume();var D=this.parseGroup(h,!1,k.SUPSUB_GREEDINESS,void 0,void 0,!0);if(!D)throw new ue("Expected group after '"+E+"'",p);return D},o.formatUnsupportedCmd=function(h){for(var p=[],E=0;E<h.length;E++)p.push({type:"textord",mode:"text",text:h[E]});var D={type:"text",mode:this.mode,body:p},J={type:"color",mode:this.mode,color:this.settings.errorColor,body:[D]};return J},o.parseAtom=function(h){var p=this.parseGroup("atom",!1,null,h);if(this.mode==="text")return p;for(var E,D;;){this.consumeSpaces();var J=this.fetch();if(J.text==="\\limits"||J.text==="\\nolimits"){var le=Fr(p,"op");if(le){var _e=J.text==="\\limits";le.limits=_e,le.alwaysHandleSupSub=!0}else if(le=Fr(p,"operatorname"),le&&le.alwaysHandleSupSub){var Ke=J.text==="\\limits";le.limits=Ke}else throw new ue("Limit controls must follow a math operator",J);this.consume()}else if(J.text==="^"){if(E)throw new ue("Double superscript",J);E=this.handleSupSubscript("superscript")}else if(J.text==="_"){if(D)throw new ue("Double subscript",J);D=this.handleSupSubscript("subscript")}else if(J.text==="'"){if(E)throw new ue("Double superscript",J);var Je={type:"textord",mode:this.mode,text:"\\prime"},lt=[Je];for(this.consume();this.fetch().text==="'";)lt.push(Je),this.consume();this.fetch().text==="^"&&lt.push(this.handleSupSubscript("superscript")),E={type:"ordgroup",mode:this.mode,body:lt}}else break}return E||D?{type:"supsub",mode:this.mode,base:p,sup:E,sub:D}:p},o.parseFunction=function(h,p,E){var D=this.fetch(),J=D.text,le=Yi[J];if(!le)return null;if(this.consume(),E!=null&&le.greediness<=E)throw new ue("Got function '"+J+"' with no arguments"+(p?" as "+p:""),D);if(this.mode==="text"&&!le.allowedInText)throw new ue("Can't use function '"+J+"' in text mode",D);if(this.mode==="math"&&le.allowedInMath===!1)throw new ue("Can't use function '"+J+"' in math mode",D);var _e=this.parseArguments(J,le),Ke=_e.args,Je=_e.optArgs;return this.callFunction(J,Ke,Je,D,h)},o.callFunction=function(h,p,E,D,J){var le={funcName:h,parser:this,token:D,breakOnTokenText:J},_e=Yi[h];if(_e&&_e.handler)return _e.handler(le,p,E);throw new ue("No function handler for "+h)},o.parseArguments=function(h,p){var E=p.numArgs+p.numOptionalArgs;if(E===0)return{args:[],optArgs:[]};for(var D=p.greediness,J=[],le=[],_e=0;_e<E;_e++){var Ke=p.argTypes&&p.argTypes[_e],Je=_e<p.numOptionalArgs,lt=_e>0&&!Je||_e===0&&!Je&&this.mode==="math",gt=this.parseGroupOfType("argument to '"+h+"'",Ke,Je,D,lt);if(!gt){if(Je){le.push(null);continue}throw new ue("Expected group after '"+h+"'",this.fetch())}(Je?le:J).push(gt)}return{args:J,optArgs:le}},o.parseGroupOfType=function(h,p,E,D,J){switch(p){case"color":return J&&this.consumeSpaces(),this.parseColorGroup(E);case"size":return J&&this.consumeSpaces(),this.parseSizeGroup(E);case"url":return this.parseUrlGroup(E,J);case"math":case"text":return this.parseGroup(h,E,D,void 0,p,J);case"hbox":{var le=this.parseGroup(h,E,D,void 0,"text",J);if(!le)return le;var _e={type:"styling",mode:le.mode,body:[le],style:"text"};return _e}case"raw":{if(J&&this.consumeSpaces(),E&&this.fetch().text==="{")return null;var Ke=this.parseStringGroup("raw",E,!0);if(Ke)return{type:"raw",mode:"text",string:Ke.text};throw new ue("Expected raw group",this.fetch())}case"original":case null:case void 0:return this.parseGroup(h,E,D,void 0,void 0,J);default:throw new ue("Unknown group type as "+h,this.fetch())}},o.consumeSpaces=function(){for(;this.fetch().text===" ";)this.consume()},o.parseStringGroup=function(h,p,E){var D=p?"[":"{",J=p?"]":"}",le=this.fetch();if(le.text!==D){if(p)return null;if(E&&le.text!=="EOF"&&/[^{}[\]]/.test(le.text))return this.consume(),le}var _e=this.mode;this.mode="text",this.expect(D);for(var Ke="",Je=this.fetch(),lt=0,gt=Je,xt;(xt=this.fetch()).text!==J||E&&lt>0;){switch(xt.text){case"EOF":throw new ue("Unexpected end of input in "+h,Je.range(gt,Ke));case D:lt++;break;case J:lt--;break}gt=xt,Ke+=gt.text,this.consume()}return this.expect(J),this.mode=_e,Je.range(gt,Ke)},o.parseRegexGroup=function(h,p){var E=this.mode;this.mode="text";for(var D=this.fetch(),J=D,le="",_e;(_e=this.fetch()).text!=="EOF"&&h.test(le+_e.text);)J=_e,le+=J.text,this.consume();if(le==="")throw new ue("Invalid "+p+": '"+D.text+"'",D);return this.mode=E,D.range(J,le)},o.parseColorGroup=function(h){var p=this.parseStringGroup("color",h);if(!p)return null;var E=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(p.text);if(!E)throw new ue("Invalid color: '"+p.text+"'",p);var D=E[0];return/^[0-9a-f]{6}$/i.test(D)&&(D="#"+D),{type:"color-token",mode:this.mode,color:D}},o.parseSizeGroup=function(h){var p,E=!1;if(!h&&this.fetch().text!=="{"?p=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):p=this.parseStringGroup("size",h),!p)return null;!h&&p.text.length===0&&(p.text="0pt",E=!0);var D=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(p.text);if(!D)throw new ue("Invalid size: '"+p.text+"'",p);var J={number:+(D[1]+D[2]),unit:D[3]};if(!Pr(J))throw new ue("Invalid unit: '"+J.unit+"'",p);return{type:"size",mode:this.mode,value:J,isBlank:E}},o.parseUrlGroup=function(h,p){this.gullet.lexer.setCatcode("%",13);var E=this.parseStringGroup("url",h,!0);if(this.gullet.lexer.setCatcode("%",14),!E)return null;var D=E.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:D}},o.parseGroup=function(h,p,E,D,J,le){var _e=this.mode;J&&this.switchMode(J),le&&this.consumeSpaces();var Ke=this.fetch(),Je=Ke.text,lt;if(p?Je==="[":Je==="{"||Je==="\\begingroup"){this.consume();var gt=k.endOfGroup[Je];this.gullet.beginGroup();var xt=this.parseExpression(!1,gt),Ct=this.fetch();this.expect(gt),this.gullet.endGroup(),lt={type:"ordgroup",mode:this.mode,loc:He.range(Ke,Ct),body:xt,semisimple:Je==="\\begingroup"||void 0}}else if(p)lt=null;else if(lt=this.parseFunction(D,h,E)||this.parseSymbol(),lt==null&&Je[0]==="\\"&&!Ss.hasOwnProperty(Je)){if(this.settings.throwOnError)throw new ue("Undefined control sequence: "+Je,Ke);lt=this.formatUnsupportedCmd(Je),this.consume()}return J&&this.switchMode(_e),lt},o.formLigatures=function(h){for(var p=h.length-1,E=0;E<p;++E){var D=h[E],J=D.text;J==="-"&&h[E+1].text==="-"&&(E+1<p&&h[E+2].text==="-"?(h.splice(E,3,{type:"textord",mode:"text",loc:He.range(D,h[E+2]),text:"---"}),p-=2):(h.splice(E,2,{type:"textord",mode:"text",loc:He.range(D,h[E+1]),text:"--"}),p-=1)),(J==="'"||J==="`")&&h[E+1].text===J&&(h.splice(E,2,{type:"textord",mode:"text",loc:He.range(D,h[E+1]),text:J+J}),p-=1)}},o.parseSymbol=function(){var h=this.fetch(),p=h.text;if(/^\\verb[^a-zA-Z]/.test(p)){this.consume();var E=p.slice(5),D=E.charAt(0)==="*";if(D&&(E=E.slice(1)),E.length<2||E.charAt(0)!==E.slice(-1))throw new ue(`\\verb assertion failed --
please report what input caused this bug`);return E=E.slice(1,-1),{type:"verb",mode:"text",body:E,star:D}}Ea.hasOwnProperty(p[0])&&!rt[this.mode][p[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+p[0]+'" used in math mode',h),p=Ea[p[0]]+p.substr(1));var J=ln.exec(p);J&&(p=p.substring(0,J.index),p==="i"?p="\u0131":p==="j"&&(p="\u0237"));var le;if(rt[this.mode][p]){this.settings.strict&&this.mode==="math"&&tn.indexOf(p)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+p[0]+'" used in math mode',h);var _e=rt[this.mode][p].group,Ke=He.range(h),Je;if(mt.hasOwnProperty(_e)){var lt=_e;Je={type:"atom",mode:this.mode,family:lt,loc:Ke,text:p}}else Je={type:_e,mode:this.mode,loc:Ke,text:p};le=Je}else if(p.charCodeAt(0)>=128)this.settings.strict&&(We(p.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+p[0]+'" used in math mode',h):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+p[0]+'"'+(" ("+p.charCodeAt(0)+")"),h)),le={type:"textord",mode:"text",loc:He.range(h),text:p};else return null;if(this.consume(),J)for(var gt=0;gt<J[0].length;gt++){var xt=J[0][gt];if(!qi[xt])throw new ue("Unknown accent ' "+xt+"'",h);var Ct=qi[xt][this.mode];if(!Ct)throw new ue("Accent "+xt+" unsupported in "+this.mode+" mode",h);le={type:"accent",mode:this.mode,loc:He.range(h),label:Ct,isStretchy:!1,isShifty:!0,base:le}}return le},k}();As.endOfExpression=["}","\\endgroup","\\end","\\right","&"],As.endOfGroup={"[":"]","{":"}","\\begingroup":"\\endgroup"},As.SUPSUB_GREEDINESS=1;var Sa=function(o,c){if(!(typeof o=="string"||o instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var h=new As(o,c);delete h.gullet.macros.current["\\df@tag"];var p=h.parse();if(h.gullet.macros.get("\\df@tag")){if(!c.displayMode)throw new ue("\\tag works only in display equations");h.gullet.feed("\\df@tag"),p=[{type:"tag",mode:"text",body:p,tag:h.parse()}]}return p},Zs=Sa,Aa=function(o,c,h){c.textContent="";var p=Cn(o,h).toNode();c.appendChild(p)};typeof document!="undefined"&&document.compatMode!=="CSS1Compat"&&(typeof console!="undefined"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),Aa=function(){throw new ue("KaTeX doesn't work in quirks mode.")});var Zi=function(o,c){var h=Cn(o,c).toMarkup();return h},Xs=function(o,c){var h=new O(c);return Zs(o,h)},as=function(o,c,h){if(h.throwOnError||!(o instanceof ue))throw o;var p=Ve.makeSpan(["katex-error"],[new K(c)]);return p.setAttribute("title",o.toString()),p.setAttribute("style","color:"+h.errorColor),p},Cn=function(o,c){var h=new O(c);try{var p=Zs(o,h);return $n(p,o,h)}catch(E){return as(E,o,h)}},Qa=function(o,c){var h=new O(c);try{var p=Zs(o,h);return Pi(p,o,h)}catch(E){return as(E,o,h)}},Ta={version:"0.11.1",render:Aa,renderToString:Zi,ParseError:ue,__parse:Xs,__renderToDomTree:Cn,__renderToHTMLTree:Qa,__setFontMetrics:ze,__defineSymbol:g,__defineMacro:pe,__domTree:{Span:se,Anchor:Pe,SymbolNode:K,SvgNode:te,PathNode:$,LineNode:W}},eo=ie.default=Ta}]).default})},32834:function(Nt){(function(ut,ie){Nt.exports=ie()})(this,function(){"use strict";function ut(ce,xe){for(var Ue=0;Ue<xe.length;Ue++){var B=xe[Ue];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(ce,B.key,B)}}function ie(ce,xe,Ue){return xe&&ut(ce.prototype,xe),Ue&&ut(ce,Ue),ce}function V(ce,xe){if(ce){if(typeof ce=="string")return Ae(ce,xe);var Ue=Object.prototype.toString.call(ce).slice(8,-1);if(Ue==="Object"&&ce.constructor&&(Ue=ce.constructor.name),Ue==="Map"||Ue==="Set")return Array.from(ce);if(Ue==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Ue))return Ae(ce,xe)}}function Ae(ce,xe){(xe==null||xe>ce.length)&&(xe=ce.length);for(var Ue=0,B=new Array(xe);Ue<xe;Ue++)B[Ue]=ce[Ue];return B}function He(ce,xe){var Ue=typeof Symbol!="undefined"&&ce[Symbol.iterator]||ce["@@iterator"];if(Ue)return(Ue=Ue.call(ce)).next.bind(Ue);if(Array.isArray(ce)||(Ue=V(ce))||xe&&ce&&typeof ce.length=="number"){Ue&&(ce=Ue);var B=0;return function(){return B>=ce.length?{done:!0}:{done:!1,value:ce[B++]}}}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 ke={exports:{}};function $e(){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 ue(ce){ke.exports.defaults=ce}ke.exports={defaults:$e(),getDefaults:$e,changeDefaults:ue};var Fe=/[&<>"']/,Te=/[&<>"']/g,l=/[<>"']|&(?!#?\w+;)/,Y=/[<>"']|&(?!#?\w+;)/g,P={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},S=function(xe){return P[xe]};function d(ce,xe){if(xe){if(Fe.test(ce))return ce.replace(Te,S)}else if(l.test(ce))return ce.replace(Y,S);return ce}var w=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function y(ce){return ce.replace(w,function(xe,Ue){return Ue=Ue.toLowerCase(),Ue==="colon"?":":Ue.charAt(0)==="#"?Ue.charAt(1)==="x"?String.fromCharCode(parseInt(Ue.substring(2),16)):String.fromCharCode(+Ue.substring(1)):""})}var G=/(^|[^\[])\^/g;function X(ce,xe){ce=ce.source||ce,xe=xe||"";var Ue={replace:function(q,oe){return oe=oe.source||oe,oe=oe.replace(G,"$1"),ce=ce.replace(q,oe),Ue},getRegex:function(){return new RegExp(ce,xe)}};return Ue}var M=/[^\w:]/g,O=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Q(ce,xe,Ue){if(ce){var B;try{B=decodeURIComponent(y(Ue)).replace(M,"").toLowerCase()}catch(q){return null}if(B.indexOf("javascript:")===0||B.indexOf("vbscript:")===0||B.indexOf("data:")===0)return null}xe&&!O.test(Ue)&&(Ue=ge(xe,Ue));try{Ue=encodeURI(Ue).replace(/%25/g,"%")}catch(q){return null}return Ue}var he={},R=/^[^:]+:\/*[^/]*$/,ve=/^([^:]+:)[\s\S]*$/,Ce=/^([^:]+:\/*[^/]*)[\s\S]*$/;function ge(ce,xe){he[" "+ce]||(R.test(ce)?he[" "+ce]=ce+"/":he[" "+ce]=je(ce,"/",!0)),ce=he[" "+ce];var Ue=ce.indexOf(":")===-1;return xe.substring(0,2)==="//"?Ue?xe:ce.replace(ve,"$1")+xe:xe.charAt(0)==="/"?Ue?xe:ce.replace(Ce,"$1")+xe:ce+xe}var be={exec:function(){}};function Ne(ce){for(var xe=1,Ue,B;xe<arguments.length;xe++){Ue=arguments[xe];for(B in Ue)Object.prototype.hasOwnProperty.call(Ue,B)&&(ce[B]=Ue[B])}return ce}function Ie(ce,xe){var Ue=ce.replace(/\|/g,function(oe,ye,L){for(var pt=!1,fe=ye;--fe>=0&&L[fe]==="\\";)pt=!pt;return pt?"|":" |"}),B=Ue.split(/ \|/),q=0;if(B.length>xe)B.splice(xe);else for(;B.length<xe;)B.push("");for(;q<B.length;q++)B[q]=B[q].trim().replace(/\\\|/g,"|");return B}function je(ce,xe,Ue){var B=ce.length;if(B===0)return"";for(var q=0;q<B;){var oe=ce.charAt(B-q-1);if(oe===xe&&!Ue)q++;else if(oe!==xe&&Ue)q++;else break}return ce.substr(0,B-q)}function H(ce,xe){if(ce.indexOf(xe[1])===-1)return-1;for(var Ue=ce.length,B=0,q=0;q<Ue;q++)if(ce[q]==="\\")q++;else if(ce[q]===xe[0])B++;else if(ce[q]===xe[1]&&(B--,B<0))return q;return-1}function z(ce){ce&&ce.sanitize&&!ce.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 Z(ce,xe){if(xe<1)return"";for(var Ue="";xe>1;)xe&1&&(Ue+=ce),xe>>=1,ce+=ce;return Ue+ce}var ee={escape:d,unescape:y,edit:X,cleanUrl:Q,resolveUrl:ge,noopTest:be,merge:Ne,splitCells:Ie,rtrim:je,findClosingBracket:H,checkSanitizeDeprecation:z,repeatString:Z},me=ke.exports.defaults,ae=ee.rtrim,x=ee.splitCells,A=ee.escape,N=ee.findClosingBracket;function de(ce,xe,Ue){var B=xe.href,q=xe.title?A(xe.title):null,oe=ce[1].replace(/\\([\[\]])/g,"$1");return ce[0].charAt(0)!=="!"?{type:"link",raw:Ue,href:B,title:q,text:oe}:{type:"image",raw:Ue,href:B,title:q,text:A(oe)}}function We(ce,xe){var Ue=ce.match(/^(\s+)(?:```)/);if(Ue===null)return xe;var B=Ue[1];return xe.split(`
`).map(function(q){var oe=q.match(/^\s+/);if(oe===null)return q;var ye=oe[0];return ye.length>=B.length?q.slice(B.length):q}).join(`
`)}var qe=function(){function ce(Ue){this.options=Ue||me}var xe=ce.prototype;return xe.space=function(B){var q=this.rules.block.newline.exec(B);if(q)return q[0].length>1?{type:"space",raw:q[0]}:{raw:`
`}},xe.code=function(B){var q=this.rules.block.code.exec(B);if(q){var oe=q[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:q[0],codeBlockStyle:"indented",text:this.options.pedantic?oe:ae(oe,`
`)}}},xe.fences=function(B){var q=this.rules.block.fences.exec(B);if(q){var oe=q[0],ye=We(oe,q[3]||"");return{type:"code",raw:oe,lang:q[2]?q[2].trim():q[2],text:ye}}},xe.heading=function(B){var q=this.rules.block.heading.exec(B);if(q){var oe=q[2].trim();if(/#$/.test(oe)){var ye=ae(oe,"#");(this.options.pedantic||!ye||/ $/.test(ye))&&(oe=ye.trim())}return{type:"heading",raw:q[0],depth:q[1].length,text:oe}}},xe.nptable=function(B){var q=this.rules.block.nptable.exec(B);if(q){var oe={type:"table",header:x(q[1].replace(/^ *| *\| *$/g,"")),align:q[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:q[3]?q[3].replace(/\n$/,"").split(`
`):[],raw:q[0]};if(oe.header.length===oe.align.length){var ye=oe.align.length,L;for(L=0;L<ye;L++)/^ *-+: *$/.test(oe.align[L])?oe.align[L]="right":/^ *:-+: *$/.test(oe.align[L])?oe.align[L]="center":/^ *:-+ *$/.test(oe.align[L])?oe.align[L]="left":oe.align[L]=null;for(ye=oe.cells.length,L=0;L<ye;L++)oe.cells[L]=x(oe.cells[L],oe.header.length);return oe}}},xe.hr=function(B){var q=this.rules.block.hr.exec(B);if(q)return{type:"hr",raw:q[0]}},xe.blockquote=function(B){var q=this.rules.block.blockquote.exec(B);if(q){var oe=q[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:q[0],text:oe}}},xe.list=function(B){var q=this.rules.block.list.exec(B);if(q){var oe=q[0],ye=q[2],L=ye.length>1,pt={type:"list",raw:oe,ordered:L,start:L?+ye.slice(0,-1):"",loose:!1,items:[]},fe=q[0].match(this.rules.block.item),Et=!1,It,Ut,yr,Kt,Pt,br,wr,Gr,zr,kt=fe.length;yr=this.rules.block.listItemStart.exec(fe[0]);for(var qt=0;qt<kt;qt++){if(It=fe[qt],oe=It,this.options.pedantic||(zr=It.match(new RegExp("\\n\\s*\\n {0,"+(yr[0].length-1)+"}\\S")),zr&&(Pt=It.length-zr.index+fe.slice(qt+1).join(`
`).length,pt.raw=pt.raw.substring(0,pt.raw.length-Pt),It=It.substring(0,zr.index),oe=It,kt=qt+1)),qt!==kt-1){if(Kt=this.rules.block.listItemStart.exec(fe[qt+1]),this.options.pedantic?Kt[1].length>yr[1].length:Kt[1].length>=yr[0].length||Kt[1].length>3){fe.splice(qt,2,fe[qt]+(!this.options.pedantic&&Kt[1].length<yr[0].length&&!fe[qt].match(/\n$/)?"":`
`)+fe[qt+1]),qt--,kt--;continue}else(!this.options.pedantic||this.options.smartLists?Kt[2][Kt[2].length-1]!==ye[ye.length-1]:L===(Kt[2].length===1))&&(Pt=fe.slice(qt+1).join(`
`).length,pt.raw=pt.raw.substring(0,pt.raw.length-Pt),qt=kt-1);yr=Kt}Ut=It.length,It=It.replace(/^ *([*+-]|\d+[.)]) ?/,""),~It.indexOf(`
`)&&(Ut-=It.length,It=this.options.pedantic?It.replace(/^ {1,4}/gm,""):It.replace(new RegExp("^ {1,"+Ut+"}","gm"),"")),It=ae(It,`
`),qt!==kt-1&&(oe=oe+`
`),br=Et||/\n\n(?!\s*$)/.test(oe),qt!==kt-1&&(Et=oe.slice(-2)===`
`,br||(br=Et)),br&&(pt.loose=!0),this.options.gfm&&(wr=/^\[[ xX]\] /.test(It),Gr=void 0,wr&&(Gr=It[1]!==" ",It=It.replace(/^\[[ xX]\] +/,""))),pt.items.push({type:"list_item",raw:oe,task:wr,checked:Gr,loose:br,text:It})}return pt}},xe.html=function(B){var q=this.rules.block.html.exec(B);if(q)return{type:this.options.sanitize?"paragraph":"html",raw:q[0],pre:!this.options.sanitizer&&(q[1]==="pre"||q[1]==="script"||q[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(q[0]):A(q[0]):q[0]}},xe.def=function(B){var q=this.rules.block.def.exec(B);if(q){q[3]&&(q[3]=q[3].substring(1,q[3].length-1));var oe=q[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:oe,raw:q[0],href:q[2],title:q[3]}}},xe.table=function(B){var q=this.rules.block.table.exec(B);if(q){var oe={type:"table",header:x(q[1].replace(/^ *| *\| *$/g,"")),align:q[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:q[3]?q[3].replace(/\n$/,"").split(`
`):[]};if(oe.header.length===oe.align.length){oe.raw=q[0];var ye=oe.align.length,L;for(L=0;L<ye;L++)/^ *-+: *$/.test(oe.align[L])?oe.align[L]="right":/^ *:-+: *$/.test(oe.align[L])?oe.align[L]="center":/^ *:-+ *$/.test(oe.align[L])?oe.align[L]="left":oe.align[L]=null;for(ye=oe.cells.length,L=0;L<ye;L++)oe.cells[L]=x(oe.cells[L].replace(/^ *\| *| *\| *$/g,""),oe.header.length);return oe}}},xe.lheading=function(B){var q=this.rules.block.lheading.exec(B);if(q)return{type:"heading",raw:q[0],depth:q[2].charAt(0)==="="?1:2,text:q[1]}},xe.paragraph=function(B){var q=this.rules.block.paragraph.exec(B);if(q)return{type:"paragraph",raw:q[0],text:q[1].charAt(q[1].length-1)===`
`?q[1].slice(0,-1):q[1]}},xe.text=function(B){var q=this.rules.block.text.exec(B);if(q)return{type:"text",raw:q[0],text:q[0]}},xe.escape=function(B){var q=this.rules.inline.escape.exec(B);if(q)return{type:"escape",raw:q[0],text:A(q[1])}},xe.tag=function(B,q,oe){var ye=this.rules.inline.tag.exec(B);if(ye)return!q&&/^<a /i.test(ye[0])?q=!0:q&&/^<\/a>/i.test(ye[0])&&(q=!1),!oe&&/^<(pre|code|kbd|script)(\s|>)/i.test(ye[0])?oe=!0:oe&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(ye[0])&&(oe=!1),{type:this.options.sanitize?"text":"html",raw:ye[0],inLink:q,inRawBlock:oe,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ye[0]):A(ye[0]):ye[0]}},xe.link=function(B){var q=this.rules.inline.link.exec(B);if(q){var oe=q[2].trim();if(!this.options.pedantic&&/^</.test(oe)){if(!/>$/.test(oe))return;var ye=ae(oe.slice(0,-1),"\\");if((oe.length-ye.length)%2===0)return}else{var L=N(q[2],"()");if(L>-1){var pt=q[0].indexOf("!")===0?5:4,fe=pt+q[1].length+L;q[2]=q[2].substring(0,L),q[0]=q[0].substring(0,fe).trim(),q[3]=""}}var Et=q[2],It="";if(this.options.pedantic){var Ut=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Et);Ut&&(Et=Ut[1],It=Ut[3])}else It=q[3]?q[3].slice(1,-1):"";return Et=Et.trim(),/^</.test(Et)&&(this.options.pedantic&&!/>$/.test(oe)?Et=Et.slice(1):Et=Et.slice(1,-1)),de(q,{href:Et&&Et.replace(this.rules.inline._escapes,"$1"),title:It&&It.replace(this.rules.inline._escapes,"$1")},q[0])}},xe.reflink=function(B,q){var oe;if((oe=this.rules.inline.reflink.exec(B))||(oe=this.rules.inline.nolink.exec(B))){var ye=(oe[2]||oe[1]).replace(/\s+/g," ");if(ye=q[ye.toLowerCase()],!ye||!ye.href){var L=oe[0].charAt(0);return{type:"text",raw:L,text:L}}return de(oe,ye,oe[0])}},xe.emStrong=function(B,q,oe){oe===void 0&&(oe="");var ye=this.rules.inline.emStrong.lDelim.exec(B);if(ye&&!(ye[3]&&oe.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 L=ye[1]||ye[2]||"";if(!L||L&&(oe===""||this.rules.inline.punctuation.exec(oe))){var pt=ye[0].length-1,fe,Et,It=pt,Ut=0,yr=ye[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(yr.lastIndex=0,q=q.slice(-1*B.length+pt);(ye=yr.exec(q))!=null;)if(fe=ye[1]||ye[2]||ye[3]||ye[4]||ye[5]||ye[6],!!fe){if(Et=fe.length,ye[3]||ye[4]){It+=Et;continue}else if((ye[5]||ye[6])&&pt%3&&!((pt+Et)%3)){Ut+=Et;continue}if(It-=Et,!(It>0))return Et=Math.min(Et,Et+It+Ut),Math.min(pt,Et)%2?{type:"em",raw:B.slice(0,pt+ye.index+Et+1),text:B.slice(1,pt+ye.index+Et)}:{type:"strong",raw:B.slice(0,pt+ye.index+Et+1),text:B.slice(2,pt+ye.index+Et-1)}}}}},xe.codespan=function(B){var q=this.rules.inline.code.exec(B);if(q){var oe=q[2].replace(/\n/g," "),ye=/[^ ]/.test(oe),L=/^ /.test(oe)&&/ $/.test(oe);return ye&&L&&(oe=oe.substring(1,oe.length-1)),oe=A(oe,!0),{type:"codespan",raw:q[0],text:oe}}},xe.br=function(B){var q=this.rules.inline.br.exec(B);if(q)return{type:"br",raw:q[0]}},xe.del=function(B){var q=this.rules.inline.del.exec(B);if(q)return{type:"del",raw:q[0],text:q[2]}},xe.autolink=function(B,q){var oe=this.rules.inline.autolink.exec(B);if(oe){var ye,L;return oe[2]==="@"?(ye=A(this.options.mangle?q(oe[1]):oe[1]),L="mailto:"+ye):(ye=A(oe[1]),L=ye),{type:"link",raw:oe[0],text:ye,href:L,tokens:[{type:"text",raw:ye,text:ye}]}}},xe.url=function(B,q){var oe;if(oe=this.rules.inline.url.exec(B)){var ye,L;if(oe[2]==="@")ye=A(this.options.mangle?q(oe[0]):oe[0]),L="mailto:"+ye;else{var pt;do pt=oe[0],oe[0]=this.rules.inline._backpedal.exec(oe[0])[0];while(pt!==oe[0]);ye=A(oe[0]),oe[1]==="www."?L="http://"+ye:L=ye}return{type:"link",raw:oe[0],text:ye,href:L,tokens:[{type:"text",raw:ye,text:ye}]}}},xe.inlineText=function(B,q,oe){var ye=this.rules.inline.text.exec(B);if(ye){var L;return q?L=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(ye[0]):A(ye[0]):ye[0]:L=A(this.options.smartypants?oe(ye[0]):ye[0]),{type:"text",raw:ye[0],text:L}}},ce}(),Ge=ee.noopTest,ot=ee.edit,Dt=ee.merge,at={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:Ge,table:Ge,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};at._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,at._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,at.def=ot(at.def).replace("label",at._label).replace("title",at._title).getRegex(),at.bullet=/(?:[*+-]|\d{1,9}[.)])/,at.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,at.item=ot(at.item,"gm").replace(/bull/g,at.bullet).getRegex(),at.listItemStart=ot(/^( *)(bull) */).replace("bull",at.bullet).getRegex(),at.list=ot(at.list).replace(/bull/g,at.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+at.def.source+")").getRegex(),at._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",at._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,at.html=ot(at.html,"i").replace("comment",at._comment).replace("tag",at._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),at.paragraph=ot(at._paragraph).replace("hr",at.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",at._tag).getRegex(),at.blockquote=ot(at.blockquote).replace("paragraph",at.paragraph).getRegex(),at.normal=Dt({},at),at.gfm=Dt({},at.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*|$)"}),at.gfm.nptable=ot(at.gfm.nptable).replace("hr",at.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",at._tag).getRegex(),at.gfm.table=ot(at.gfm.table).replace("hr",at.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",at._tag).getRegex(),at.pedantic=Dt({},at.normal,{html:ot(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",at._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:Ge,paragraph:ot(at.normal._paragraph).replace("hr",at.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",at.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var it={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ge,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:Ge,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};it._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",it.punctuation=ot(it.punctuation).replace(/punctuation/g,it._punctuation).getRegex(),it.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,it.escapedEmSt=/\\\*|\\_/g,it._comment=ot(at._comment).replace("(?:-->|$)","-->").getRegex(),it.emStrong.lDelim=ot(it.emStrong.lDelim).replace(/punct/g,it._punctuation).getRegex(),it.emStrong.rDelimAst=ot(it.emStrong.rDelimAst,"g").replace(/punct/g,it._punctuation).getRegex(),it.emStrong.rDelimUnd=ot(it.emStrong.rDelimUnd,"g").replace(/punct/g,it._punctuation).getRegex(),it._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,it._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,it._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])?)+(?![-_])/,it.autolink=ot(it.autolink).replace("scheme",it._scheme).replace("email",it._email).getRegex(),it._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,it.tag=ot(it.tag).replace("comment",it._comment).replace("attribute",it._attribute).getRegex(),it._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,it._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,it._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,it.link=ot(it.link).replace("label",it._label).replace("href",it._href).replace("title",it._title).getRegex(),it.reflink=ot(it.reflink).replace("label",it._label).getRegex(),it.reflinkSearch=ot(it.reflinkSearch,"g").replace("reflink",it.reflink).replace("nolink",it.nolink).getRegex(),it.normal=Dt({},it),it.pedantic=Dt({},it.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",it._label).getRegex(),reflink:ot(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",it._label).getRegex()}),it.gfm=Dt({},it.normal,{escape:ot(it.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),it.gfm.url=ot(it.gfm.url,"i").replace("email",it.gfm._extended_email).getRegex(),it.breaks=Dt({},it.gfm,{br:ot(it.br).replace("{2,}","*").getRegex(),text:ot(it.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var Lt={block:at,inline:it},jt=qe,Xt=ke.exports.defaults,Vt=Lt.block,Mt=Lt.inline,Rt=ee.repeatString;function Me(ce){return ce.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 Qe(ce){var xe="",Ue,B,q=ce.length;for(Ue=0;Ue<q;Ue++)B=ce.charCodeAt(Ue),Math.random()>.5&&(B="x"+B.toString(16)),xe+="&#"+B+";";return xe}var se=function(){function ce(Ue){this.tokens=[],this.tokens.links=Object.create(null),this.options=Ue||Xt,this.options.tokenizer=this.options.tokenizer||new jt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var B={block:Vt.normal,inline:Mt.normal};this.options.pedantic?(B.block=Vt.pedantic,B.inline=Mt.pedantic):this.options.gfm&&(B.block=Vt.gfm,this.options.breaks?B.inline=Mt.breaks:B.inline=Mt.gfm),this.tokenizer.rules=B}ce.lex=function(B,q){var oe=new ce(q);return oe.lex(B)},ce.lexInline=function(B,q){var oe=new ce(q);return oe.inlineTokens(B)};var xe=ce.prototype;return xe.lex=function(B){return B=B.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(B,this.tokens,!0),this.inline(this.tokens),this.tokens},xe.blockTokens=function(B,q,oe){q===void 0&&(q=[]),oe===void 0&&(oe=!0),this.options.pedantic&&(B=B.replace(/^ +$/gm,""));for(var ye,L,pt,fe;B;){if(ye=this.tokenizer.space(B)){B=B.substring(ye.raw.length),ye.type&&q.push(ye);continue}if(ye=this.tokenizer.code(B)){B=B.substring(ye.raw.length),fe=q[q.length-1],fe&&fe.type==="paragraph"?(fe.raw+=`
`+ye.raw,fe.text+=`
`+ye.text):q.push(ye);continue}if(ye=this.tokenizer.fences(B)){B=B.substring(ye.raw.length),q.push(ye);continue}if(ye=this.tokenizer.heading(B)){B=B.substring(ye.raw.length),q.push(ye);continue}if(ye=this.tokenizer.nptable(B)){B=B.substring(ye.raw.length),q.push(ye);continue}if(ye=this.tokenizer.hr(B)){B=B.substring(ye.raw.length),q.push(ye);continue}if(ye=this.tokenizer.blockquote(B)){B=B.substring(ye.raw.length),ye.tokens=this.blockTokens(ye.text,[],oe),q.push(ye);continue}if(ye=this.tokenizer.list(B)){for(B=B.substring(ye.raw.length),pt=ye.items.length,L=0;L<pt;L++)ye.items[L].tokens=this.blockTokens(ye.items[L].text,[],!1);q.push(ye);continue}if(ye=this.tokenizer.html(B)){B=B.substring(ye.raw.length),q.push(ye);continue}if(oe&&(ye=this.tokenizer.def(B))){B=B.substring(ye.raw.length),this.tokens.links[ye.tag]||(this.tokens.links[ye.tag]={href:ye.href,title:ye.title});continue}if(ye=this.tokenizer.table(B)){B=B.substring(ye.raw.length),q.push(ye);continue}if(ye=this.tokenizer.lheading(B)){B=B.substring(ye.raw.length),q.push(ye);continue}if(oe&&(ye=this.tokenizer.paragraph(B))){B=B.substring(ye.raw.length),q.push(ye);continue}if(ye=this.tokenizer.text(B)){B=B.substring(ye.raw.length),fe=q[q.length-1],fe&&fe.type==="text"?(fe.raw+=`
`+ye.raw,fe.text+=`
`+ye.text):q.push(ye);continue}if(B){var Et="Infinite loop on byte: "+B.charCodeAt(0);if(this.options.silent){console.error(Et);break}else throw new Error(Et)}}return q},xe.inline=function(B){var q,oe,ye,L,pt,fe,Et=B.length;for(q=0;q<Et;q++)switch(fe=B[q],fe.type){case"paragraph":case"text":case"heading":{fe.tokens=[],this.inlineTokens(fe.text,fe.tokens);break}case"table":{for(fe.tokens={header:[],cells:[]},L=fe.header.length,oe=0;oe<L;oe++)fe.tokens.header[oe]=[],this.inlineTokens(fe.header[oe],fe.tokens.header[oe]);for(L=fe.cells.length,oe=0;oe<L;oe++)for(pt=fe.cells[oe],fe.tokens.cells[oe]=[],ye=0;ye<pt.length;ye++)fe.tokens.cells[oe][ye]=[],this.inlineTokens(pt[ye],fe.tokens.cells[oe][ye]);break}case"blockquote":{this.inline(fe.tokens);break}case"list":{for(L=fe.items.length,oe=0;oe<L;oe++)this.inline(fe.items[oe].tokens);break}}return B},xe.inlineTokens=function(B,q,oe,ye){q===void 0&&(q=[]),oe===void 0&&(oe=!1),ye===void 0&&(ye=!1);var L,pt,fe=B,Et,It,Ut;if(this.tokens.links){var yr=Object.keys(this.tokens.links);if(yr.length>0)for(;(Et=this.tokenizer.rules.inline.reflinkSearch.exec(fe))!=null;)yr.includes(Et[0].slice(Et[0].lastIndexOf("[")+1,-1))&&(fe=fe.slice(0,Et.index)+"["+Rt("a",Et[0].length-2)+"]"+fe.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Et=this.tokenizer.rules.inline.blockSkip.exec(fe))!=null;)fe=fe.slice(0,Et.index)+"["+Rt("a",Et[0].length-2)+"]"+fe.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(Et=this.tokenizer.rules.inline.escapedEmSt.exec(fe))!=null;)fe=fe.slice(0,Et.index)+"++"+fe.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;B;){if(It||(Ut=""),It=!1,L=this.tokenizer.escape(B)){B=B.substring(L.raw.length),q.push(L);continue}if(L=this.tokenizer.tag(B,oe,ye)){B=B.substring(L.raw.length),oe=L.inLink,ye=L.inRawBlock;var Kt=q[q.length-1];Kt&&L.type==="text"&&Kt.type==="text"?(Kt.raw+=L.raw,Kt.text+=L.text):q.push(L);continue}if(L=this.tokenizer.link(B)){B=B.substring(L.raw.length),L.type==="link"&&(L.tokens=this.inlineTokens(L.text,[],!0,ye)),q.push(L);continue}if(L=this.tokenizer.reflink(B,this.tokens.links)){B=B.substring(L.raw.length);var Pt=q[q.length-1];L.type==="link"?(L.tokens=this.inlineTokens(L.text,[],!0,ye),q.push(L)):Pt&&L.type==="text"&&Pt.type==="text"?(Pt.raw+=L.raw,Pt.text+=L.text):q.push(L);continue}if(L=this.tokenizer.emStrong(B,fe,Ut)){B=B.substring(L.raw.length),L.tokens=this.inlineTokens(L.text,[],oe,ye),q.push(L);continue}if(L=this.tokenizer.codespan(B)){B=B.substring(L.raw.length),q.push(L);continue}if(L=this.tokenizer.br(B)){B=B.substring(L.raw.length),q.push(L);continue}if(L=this.tokenizer.del(B)){B=B.substring(L.raw.length),L.tokens=this.inlineTokens(L.text,[],oe,ye),q.push(L);continue}if(L=this.tokenizer.autolink(B,Qe)){B=B.substring(L.raw.length),q.push(L);continue}if(!oe&&(L=this.tokenizer.url(B,Qe))){B=B.substring(L.raw.length),q.push(L);continue}if(L=this.tokenizer.inlineText(B,ye,Me)){B=B.substring(L.raw.length),L.raw.slice(-1)!=="_"&&(Ut=L.raw.slice(-1)),It=!0,pt=q[q.length-1],pt&&pt.type==="text"?(pt.raw+=L.raw,pt.text+=L.text):q.push(L);continue}if(B){var br="Infinite loop on byte: "+B.charCodeAt(0);if(this.options.silent){console.error(br);break}else throw new Error(br)}}return q},ie(ce,null,[{key:"rules",get:function(){return{block:Vt,inline:Mt}}}]),ce}(),Pe=ke.exports.defaults,Re=ee.cleanUrl,T=ee.escape,K=function(){function ce(Ue){this.options=Ue||Pe}var xe=ce.prototype;return xe.code=function(B,q,oe){var ye=(q||"").match(/\S*/)[0];if(this.options.highlight){var L=this.options.highlight(B,ye);L!=null&&L!==B&&(oe=!0,B=L)}return B=B.replace(/\n$/,"")+`
`,ye?'<pre><code class="'+this.options.langPrefix+T(ye,!0)+'">'+(oe?B:T(B,!0))+`</code></pre>
`:"<pre><code>"+(oe?B:T(B,!0))+`</code></pre>
`},xe.blockquote=function(B){return`<blockquote>
`+B+`</blockquote>
`},xe.html=function(B){return B},xe.heading=function(B,q,oe,ye){return this.options.headerIds?"<h"+q+' id="'+this.options.headerPrefix+ye.slug(oe)+'">'+B+"</h"+q+`>
`:"<h"+q+">"+B+"</h"+q+`>
`},xe.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},xe.list=function(B,q,oe){var ye=q?"ol":"ul",L=q&&oe!==1?' start="'+oe+'"':"";return"<"+ye+L+`>
`+B+"</"+ye+`>
`},xe.listitem=function(B){return"<li>"+B+`</li>
`},xe.checkbox=function(B){return"<input "+(B?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},xe.paragraph=function(B){return"<p>"+B+`</p>
`},xe.table=function(B,q){return q&&(q="<tbody>"+q+"</tbody>"),`<table>
<thead>
`+B+`</thead>
`+q+`</table>
`},xe.tablerow=function(B){return`<tr>
`+B+`</tr>
`},xe.tablecell=function(B,q){var oe=q.header?"th":"td",ye=q.align?"<"+oe+' align="'+q.align+'">':"<"+oe+">";return ye+B+"</"+oe+`>
`},xe.strong=function(B){return"<strong>"+B+"</strong>"},xe.em=function(B){return"<em>"+B+"</em>"},xe.codespan=function(B){return"<code>"+B+"</code>"},xe.br=function(){return this.options.xhtml?"<br/>":"<br>"},xe.del=function(B){return"<del>"+B+"</del>"},xe.link=function(B,q,oe){if(B=Re(this.options.sanitize,this.options.baseUrl,B),B===null)return oe;var ye='<a href="'+T(B)+'"';return q&&(ye+=' title="'+q+'"'),ye+=">"+oe+"</a>",ye},xe.image=function(B,q,oe){if(B=Re(this.options.sanitize,this.options.baseUrl,B),B===null)return oe;var ye='<img src="'+B+'" alt="'+oe+'"';return q&&(ye+=' title="'+q+'"'),ye+=this.options.xhtml?"/>":">",ye},xe.text=function(B){return B},ce}(),te=function(){function ce(){}var xe=ce.prototype;return xe.strong=function(B){return B},xe.em=function(B){return B},xe.codespan=function(B){return B},xe.del=function(B){return B},xe.html=function(B){return B},xe.text=function(B){return B},xe.link=function(B,q,oe){return""+oe},xe.image=function(B,q,oe){return""+oe},xe.br=function(){return""},ce}(),$=function(){function ce(){this.seen={}}var xe=ce.prototype;return xe.serialize=function(B){return B.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},xe.getNextSafeSlug=function(B,q){var oe=B,ye=0;if(this.seen.hasOwnProperty(oe)){ye=this.seen[B];do ye++,oe=B+"-"+ye;while(this.seen.hasOwnProperty(oe))}return q||(this.seen[B]=ye,this.seen[oe]=0),oe},xe.slug=function(B,q){q===void 0&&(q={});var oe=this.serialize(B);return this.getNextSafeSlug(oe,q.dryrun)},ce}(),W=K,Ee=te,Le=$,Oe=ke.exports.defaults,Se=ee.unescape,we=function(){function ce(Ue){this.options=Ue||Oe,this.options.renderer=this.options.renderer||new W,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Ee,this.slugger=new Le}ce.parse=function(B,q){var oe=new ce(q);return oe.parse(B)},ce.parseInline=function(B,q){var oe=new ce(q);return oe.parseInline(B)};var xe=ce.prototype;return xe.parse=function(B,q){q===void 0&&(q=!0);var oe="",ye,L,pt,fe,Et,It,Ut,yr,Kt,Pt,br,wr,Gr,zr,kt,qt,mr,jr,Or=B.length;for(ye=0;ye<Or;ye++)switch(Pt=B[ye],Pt.type){case"space":continue;case"hr":{oe+=this.renderer.hr();continue}case"heading":{oe+=this.renderer.heading(this.parseInline(Pt.tokens),Pt.depth,Se(this.parseInline(Pt.tokens,this.textRenderer)),this.slugger);continue}case"code":{oe+=this.renderer.code(Pt.text,Pt.lang,Pt.escaped);continue}case"table":{for(yr="",Ut="",fe=Pt.header.length,L=0;L<fe;L++)Ut+=this.renderer.tablecell(this.parseInline(Pt.tokens.header[L]),{header:!0,align:Pt.align[L]});for(yr+=this.renderer.tablerow(Ut),Kt="",fe=Pt.cells.length,L=0;L<fe;L++){for(It=Pt.tokens.cells[L],Ut="",Et=It.length,pt=0;pt<Et;pt++)Ut+=this.renderer.tablecell(this.parseInline(It[pt]),{header:!1,align:Pt.align[pt]});Kt+=this.renderer.tablerow(Ut)}oe+=this.renderer.table(yr,Kt);continue}case"blockquote":{Kt=this.parse(Pt.tokens),oe+=this.renderer.blockquote(Kt);continue}case"list":{for(br=Pt.ordered,wr=Pt.start,Gr=Pt.loose,fe=Pt.items.length,Kt="",L=0;L<fe;L++)kt=Pt.items[L],qt=kt.checked,mr=kt.task,zr="",kt.task&&(jr=this.renderer.checkbox(qt),Gr?kt.tokens.length>0&&kt.tokens[0].type==="text"?(kt.tokens[0].text=jr+" "+kt.tokens[0].text,kt.tokens[0].tokens&&kt.tokens[0].tokens.length>0&&kt.tokens[0].tokens[0].type==="text"&&(kt.tokens[0].tokens[0].text=jr+" "+kt.tokens[0].tokens[0].text)):kt.tokens.unshift({type:"text",text:jr}):zr+=jr),zr+=this.parse(kt.tokens,Gr),Kt+=this.renderer.listitem(zr,mr,qt);oe+=this.renderer.list(Kt,br,wr);continue}case"html":{oe+=this.renderer.html(Pt.text);continue}case"paragraph":{oe+=this.renderer.paragraph(this.parseInline(Pt.tokens));continue}case"text":{for(Kt=Pt.tokens?this.parseInline(Pt.tokens):Pt.text;ye+1<Or&&B[ye+1].type==="text";)Pt=B[++ye],Kt+=`
`+(Pt.tokens?this.parseInline(Pt.tokens):Pt.text);oe+=q?this.renderer.paragraph(Kt):Kt;continue}default:{var tn='Token with "'+Pt.type+'" type was not found.';if(this.options.silent){console.error(tn);return}else throw new Error(tn)}}return oe},xe.parseInline=function(B,q){q=q||this.renderer;var oe="",ye,L,pt=B.length;for(ye=0;ye<pt;ye++)switch(L=B[ye],L.type){case"escape":{oe+=q.text(L.text);break}case"html":{oe+=q.html(L.text);break}case"link":{oe+=q.link(L.href,L.title,this.parseInline(L.tokens,q));break}case"image":{oe+=q.image(L.href,L.title,L.text);break}case"strong":{oe+=q.strong(this.parseInline(L.tokens,q));break}case"em":{oe+=q.em(this.parseInline(L.tokens,q));break}case"codespan":{oe+=q.codespan(L.text);break}case"br":{oe+=q.br();break}case"del":{oe+=q.del(this.parseInline(L.tokens,q));break}case"text":{oe+=q.text(L.text);break}default:{var fe='Token with "'+L.type+'" type was not found.';if(this.options.silent){console.error(fe);return}else throw new Error(fe)}}return oe},ce}(),ze=se,Ye=we,tt=qe,st=K,mt=te,ht=$,ft=ee.merge,rt=ee.checkSanitizeDeprecation,g=ee.escape,v=ke.exports.getDefaults,Be=ke.exports.changeDefaults,I=ke.exports.defaults;function ne(ce,xe,Ue){if(typeof ce=="undefined"||ce===null)throw new Error("marked(): input parameter is undefined or null");if(typeof ce!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(ce)+", string expected");if(typeof xe=="function"&&(Ue=xe,xe=null),xe=ft({},ne.defaults,xe||{}),rt(xe),Ue){var B=xe.highlight,q;try{q=ze.lex(ce,xe)}catch(pt){return Ue(pt)}var oe=function(fe){var Et;if(!fe)try{xe.walkTokens&&ne.walkTokens(q,xe.walkTokens),Et=Ye.parse(q,xe)}catch(It){fe=It}return xe.highlight=B,fe?Ue(fe):Ue(null,Et)};if(!B||B.length<3||(delete xe.highlight,!q.length))return oe();var ye=0;ne.walkTokens(q,function(pt){pt.type==="code"&&(ye++,setTimeout(function(){B(pt.text,pt.lang,function(fe,Et){if(fe)return oe(fe);Et!=null&&Et!==pt.text&&(pt.text=Et,pt.escaped=!0),ye--,ye===0&&oe()})},0))}),ye===0&&oe();return}try{var L=ze.lex(ce,xe);return xe.walkTokens&&ne.walkTokens(L,xe.walkTokens),Ye.parse(L,xe)}catch(pt){if(pt.message+=`
Please report this to https://github.com/markedjs/marked.`,xe.silent)return"<p>An error occurred:</p><pre>"+g(pt.message+"",!0)+"</pre>";throw pt}}ne.options=ne.setOptions=function(ce){return ft(ne.defaults,ce),Be(ne.defaults),ne},ne.getDefaults=v,ne.defaults=I,ne.use=function(ce){var xe=ft({},ce);if(ce.renderer&&function(){var B=ne.defaults.renderer||new st,q=function(L){var pt=B[L];B[L]=function(){for(var fe=arguments.length,Et=new Array(fe),It=0;It<fe;It++)Et[It]=arguments[It];var Ut=ce.renderer[L].apply(B,Et);return Ut===!1&&(Ut=pt.apply(B,Et)),Ut}};for(var oe in ce.renderer)q(oe);xe.renderer=B}(),ce.tokenizer&&function(){var B=ne.defaults.tokenizer||new tt,q=function(L){var pt=B[L];B[L]=function(){for(var fe=arguments.length,Et=new Array(fe),It=0;It<fe;It++)Et[It]=arguments[It];var Ut=ce.tokenizer[L].apply(B,Et);return Ut===!1&&(Ut=pt.apply(B,Et)),Ut}};for(var oe in ce.tokenizer)q(oe);xe.tokenizer=B}(),ce.walkTokens){var Ue=ne.defaults.walkTokens;xe.walkTokens=function(B){ce.walkTokens(B),Ue&&Ue(B)}}ne.setOptions(xe)},ne.walkTokens=function(ce,xe){for(var Ue=He(ce),B;!(B=Ue()).done;){var q=B.value;switch(xe(q),q.type){case"table":{for(var oe=He(q.tokens.header),ye;!(ye=oe()).done;){var L=ye.value;ne.walkTokens(L,xe)}for(var pt=He(q.tokens.cells),fe;!(fe=pt()).done;)for(var Et=fe.value,It=He(Et),Ut;!(Ut=It()).done;){var yr=Ut.value;ne.walkTokens(yr,xe)}break}case"list":{ne.walkTokens(q.items,xe);break}default:q.tokens&&ne.walkTokens(q.tokens,xe)}}},ne.parseInline=function(ce,xe){if(typeof ce=="undefined"||ce===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof ce!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(ce)+", string expected");xe=ft({},ne.defaults,xe||{}),rt(xe);try{var Ue=ze.lexInline(ce,xe);return xe.walkTokens&&ne.walkTokens(Ue,xe.walkTokens),Ye.parseInline(Ue,xe)}catch(B){if(B.message+=`
Please report this to https://github.com/markedjs/marked.`,xe.silent)return"<p>An error occurred:</p><pre>"+g(B.message+"",!0)+"</pre>";throw B}},ne.Parser=Ye,ne.parser=Ye.parse,ne.Renderer=st,ne.TextRenderer=mt,ne.Lexer=ze,ne.lexer=ze.lex,ne.Tokenizer=tt,ne.Slugger=ht,ne.parse=ne;var bt=ne;return bt})},11690:function(Nt){const ut=/[&<>"']/,ie=/[&<>"']/g,V=/[<>"']|&(?!#?\w+;)/,Ae=/[<>"']|&(?!#?\w+;)/g,He={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ke=ge=>He[ge];function $e(ge,be){if(be){if(ut.test(ge))return ge.replace(ie,ke)}else if(V.test(ge))return ge.replace(Ae,ke);return ge}const ue=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Fe(ge){return ge.replace(ue,(be,Ne)=>(Ne=Ne.toLowerCase(),Ne==="colon"?":":Ne.charAt(0)==="#"?Ne.charAt(1)==="x"?String.fromCharCode(parseInt(Ne.substring(2),16)):String.fromCharCode(+Ne.substring(1)):""))}const Te=/(^|[^\[])\^/g;function l(ge,be){ge=ge.source||ge,be=be||"";const Ne={replace:(Ie,je)=>(je=je.source||je,je=je.replace(Te,"$1"),ge=ge.replace(Ie,je),Ne),getRegex:()=>new RegExp(ge,be)};return Ne}const Y=/[^\w:]/g,P=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function S(ge,be,Ne){if(ge){let Ie;try{Ie=decodeURIComponent(Fe(Ne)).replace(Y,"").toLowerCase()}catch(je){return null}if(Ie.indexOf("javascript:")===0||Ie.indexOf("vbscript:")===0||Ie.indexOf("data:")===0)return null}be&&!P.test(Ne)&&(Ne=X(be,Ne));try{Ne=encodeURI(Ne).replace(/%25/g,"%")}catch(Ie){return null}return Ne}const d={},w=/^[^:]+:\/*[^/]*$/,y=/^([^:]+:)[\s\S]*$/,G=/^([^:]+:\/*[^/]*)[\s\S]*$/;function X(ge,be){d[" "+ge]||(w.test(ge)?d[" "+ge]=ge+"/":d[" "+ge]=he(ge,"/",!0)),ge=d[" "+ge];const Ne=ge.indexOf(":")===-1;return be.substring(0,2)==="//"?Ne?be:ge.replace(y,"$1")+be:be.charAt(0)==="/"?Ne?be:ge.replace(G,"$1")+be:ge+be}const M={exec:function(){}};function O(ge){let be=1,Ne,Ie;for(;be<arguments.length;be++){Ne=arguments[be];for(Ie in Ne)Object.prototype.hasOwnProperty.call(Ne,Ie)&&(ge[Ie]=Ne[Ie])}return ge}function Q(ge,be){const Ne=ge.replace(/\|/g,(H,z,Z)=>{let ee=!1,me=z;for(;--me>=0&&Z[me]==="\\";)ee=!ee;return ee?"|":" |"}),Ie=Ne.split(/ \|/);let je=0;if(Ie.length>be)Ie.splice(be);else for(;Ie.length<be;)Ie.push("");for(;je<Ie.length;je++)Ie[je]=Ie[je].trim().replace(/\\\|/g,"|");return Ie}function he(ge,be,Ne){const Ie=ge.length;if(Ie===0)return"";let je=0;for(;je<Ie;){const H=ge.charAt(Ie-je-1);if(H===be&&!Ne)je++;else if(H!==be&&Ne)je++;else break}return ge.substr(0,Ie-je)}function R(ge,be){if(ge.indexOf(be[1])===-1)return-1;const Ne=ge.length;let Ie=0,je=0;for(;je<Ne;je++)if(ge[je]==="\\")je++;else if(ge[je]===be[0])Ie++;else if(ge[je]===be[1]&&(Ie--,Ie<0))return je;return-1}function ve(ge){ge&&ge.sanitize&&!ge.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 Ce(ge,be){if(be<1)return"";let Ne="";for(;be>1;)be&1&&(Ne+=ge),be>>=1,ge+=ge;return Ne+ge}Nt.exports={escape:$e,unescape:Fe,edit:l,cleanUrl:S,resolveUrl:X,noopTest:M,merge:O,splitCells:Q,rtrim:he,findClosingBracket:R,checkSanitizeDeprecation:ve,repeatString:Ce}},75918:function(Nt,ut,ie){"use strict";ie.d(ut,{Wi:function(){return ue},Z0:function(){return Fe},aU:function(){return $e},eZ:function(){return l},wY:function(){return Te}});var V=ie(4348),Ae=ie(69323),He=ie(13268),ke=function(Y,P,S,d){function w(y){return y instanceof S?y:new S(function(G){G(y)})}return new(S||(S=Promise))(function(y,G){function X(Q){try{O(d.next(Q))}catch(he){G(he)}}function M(Q){try{O(d.throw(Q))}catch(he){G(he)}}function O(Q){Q.done?y(Q.value):w(Q.value).then(X,M)}O((d=d.apply(Y,P||[])).next())})};class $e extends Ae.JT{constructor(P,S="",d="",w=!0,y){super(),this._onDidChange=this._register(new V.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=P,this._label=S,this._cssClass=d,this._enabled=w,this._actionCallback=y}get id(){return this._id}get label(){return this._label}set label(P){this._setLabel(P)}_setLabel(P){this._label!==P&&(this._label=P,this._onDidChange.fire({label:P}))}get tooltip(){return this._tooltip||""}set tooltip(P){this._setTooltip(P)}_setTooltip(P){this._tooltip!==P&&(this._tooltip=P,this._onDidChange.fire({tooltip:P}))}get class(){return this._cssClass}set class(P){this._setClass(P)}_setClass(P){this._cssClass!==P&&(this._cssClass=P,this._onDidChange.fire({class:P}))}get enabled(){return this._enabled}set enabled(P){this._setEnabled(P)}_setEnabled(P){this._enabled!==P&&(this._enabled=P,this._onDidChange.fire({enabled:P}))}get checked(){return this._checked}set checked(P){this._setChecked(P)}_setChecked(P){this._checked!==P&&(this._checked=P,this._onDidChange.fire({checked:P}))}run(P,S){return ke(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(P))})}}class ue extends Ae.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new V.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new V.Q5),this.onDidRun=this._onDidRun.event}run(P,S){return ke(this,void 0,void 0,function*(){if(!P.enabled)return;this._onBeforeRun.fire({action:P});let d;try{yield this.runAction(P,S)}catch(w){d=w}this._onDidRun.fire({action:P,error:d})})}runAction(P,S){return ke(this,void 0,void 0,function*(){yield P.run(S)})}}class Fe extends $e{constructor(P){super(Fe.ID,P,P?"separator text":"separator"),this.checked=!1,this.enabled=!1}}Fe.ID="vs.actions.separator";class Te{constructor(P,S,d,w){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=P,this.label=S,this.class=w,this._actions=d}get actions(){return this._actions}dispose(){}run(){return ke(this,void 0,void 0,function*(){})}}class l extends $e{constructor(){super(l.ID,He.N("submenu.empty","(empty)"),void 0,!1)}}l.ID="vs.actions.empty"},76068:function(Nt,ut,ie){"use strict";ie.d(ut,{ok:function(){return V}});function V(Ae,He){if(!Ae)throw new Error(He?`Assertion failed (${He})`:"Assertion Failed")}},52615:function(Nt,ut,ie){"use strict";ie.d(ut,{CM:function(){return $e},JL:function(){return ue},dT:function(){return Te},fK:function(){return ke},lA:function(){return Fe}});var V=ie(4348);class Ae{constructor(){this._icons=new Map,this._onDidRegister=new V.Q5}add(Y){const P=this._icons.get(Y.id);P?Y.description?P.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 He=new Ae,ke=He;function $e(l,Y){return new Fe(l,Y)}function ue(l){return l?l.replace(/\$\((.*?)\)/g,(Y,P)=>` ${P} `).trim():""}class Fe{constructor(Y,P,S){this.id=Y,this.definition=P,this.description=S,He.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(l){l.iconNameSegment="[A-Za-z0-9]+",l.iconNameExpression="[A-Za-z0-9\\-]+",l.iconModifierExpression="~[A-Za-z]+";const Y=new RegExp(`^(${l.iconNameExpression})(${l.iconModifierExpression})?$`);function P(w){if(w instanceof Fe)return["codicon","codicon-"+w.id];const y=Y.exec(w.id);if(!y)return P(Fe.error);let[,G,X]=y;const M=["codicon","codicon-"+G];return X&&M.push("codicon-modifier-"+X.substr(1)),M}l.asClassNameArray=P;function S(w){return P(w).join(" ")}l.asClassName=S;function d(w){return"."+P(w).join(".")}l.asCSSSelector=d})(Te||(Te={})),function(l){l.add=new l("add",{fontCharacter:"\\ea60"}),l.plus=new l("plus",l.add.definition),l.gistNew=new l("gist-new",l.add.definition),l.repoCreate=new l("repo-create",l.add.definition),l.lightbulb=new l("lightbulb",{fontCharacter:"\\ea61"}),l.lightBulb=new l("light-bulb",{fontCharacter:"\\ea61"}),l.repo=new l("repo",{fontCharacter:"\\ea62"}),l.repoDelete=new l("repo-delete",{fontCharacter:"\\ea62"}),l.gistFork=new l("gist-fork",{fontCharacter:"\\ea63"}),l.repoForked=new l("repo-forked",{fontCharacter:"\\ea63"}),l.gitPullRequest=new l("git-pull-request",{fontCharacter:"\\ea64"}),l.gitPullRequestAbandoned=new l("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),l.recordKeys=new l("record-keys",{fontCharacter:"\\ea65"}),l.keyboard=new l("keyboard",{fontCharacter:"\\ea65"}),l.tag=new l("tag",{fontCharacter:"\\ea66"}),l.tagAdd=new l("tag-add",{fontCharacter:"\\ea66"}),l.tagRemove=new l("tag-remove",{fontCharacter:"\\ea66"}),l.person=new l("person",{fontCharacter:"\\ea67"}),l.personFollow=new l("person-follow",{fontCharacter:"\\ea67"}),l.personOutline=new l("person-outline",{fontCharacter:"\\ea67"}),l.personFilled=new l("person-filled",{fontCharacter:"\\ea67"}),l.gitBranch=new l("git-branch",{fontCharacter:"\\ea68"}),l.gitBranchCreate=new l("git-branch-create",{fontCharacter:"\\ea68"}),l.gitBranchDelete=new l("git-branch-delete",{fontCharacter:"\\ea68"}),l.sourceControl=new l("source-control",{fontCharacter:"\\ea68"}),l.mirror=new l("mirror",{fontCharacter:"\\ea69"}),l.mirrorPublic=new l("mirror-public",{fontCharacter:"\\ea69"}),l.star=new l("star",{fontCharacter:"\\ea6a"}),l.starAdd=new l("star-add",{fontCharacter:"\\ea6a"}),l.starDelete=new l("star-delete",{fontCharacter:"\\ea6a"}),l.starEmpty=new l("star-empty",{fontCharacter:"\\ea6a"}),l.comment=new l("comment",{fontCharacter:"\\ea6b"}),l.commentAdd=new l("comment-add",{fontCharacter:"\\ea6b"}),l.alert=new l("alert",{fontCharacter:"\\ea6c"}),l.warning=new l("warning",{fontCharacter:"\\ea6c"}),l.search=new l("search",{fontCharacter:"\\ea6d"}),l.searchSave=new l("search-save",{fontCharacter:"\\ea6d"}),l.logOut=new l("log-out",{fontCharacter:"\\ea6e"}),l.signOut=new l("sign-out",{fontCharacter:"\\ea6e"}),l.logIn=new l("log-in",{fontCharacter:"\\ea6f"}),l.signIn=new l("sign-in",{fontCharacter:"\\ea6f"}),l.eye=new l("eye",{fontCharacter:"\\ea70"}),l.eyeUnwatch=new l("eye-unwatch",{fontCharacter:"\\ea70"}),l.eyeWatch=new l("eye-watch",{fontCharacter:"\\ea70"}),l.circleFilled=new l("circle-filled",{fontCharacter:"\\ea71"}),l.primitiveDot=new l("primitive-dot",{fontCharacter:"\\ea71"}),l.closeDirty=new l("close-dirty",{fontCharacter:"\\ea71"}),l.debugBreakpoint=new l("debug-breakpoint",{fontCharacter:"\\ea71"}),l.debugBreakpointDisabled=new l("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),l.debugHint=new l("debug-hint",{fontCharacter:"\\ea71"}),l.primitiveSquare=new l("primitive-square",{fontCharacter:"\\ea72"}),l.edit=new l("edit",{fontCharacter:"\\ea73"}),l.pencil=new l("pencil",{fontCharacter:"\\ea73"}),l.info=new l("info",{fontCharacter:"\\ea74"}),l.issueOpened=new l("issue-opened",{fontCharacter:"\\ea74"}),l.gistPrivate=new l("gist-private",{fontCharacter:"\\ea75"}),l.gitForkPrivate=new l("git-fork-private",{fontCharacter:"\\ea75"}),l.lock=new l("lock",{fontCharacter:"\\ea75"}),l.mirrorPrivate=new l("mirror-private",{fontCharacter:"\\ea75"}),l.close=new l("close",{fontCharacter:"\\ea76"}),l.removeClose=new l("remove-close",{fontCharacter:"\\ea76"}),l.x=new l("x",{fontCharacter:"\\ea76"}),l.repoSync=new l("repo-sync",{fontCharacter:"\\ea77"}),l.sync=new l("sync",{fontCharacter:"\\ea77"}),l.clone=new l("clone",{fontCharacter:"\\ea78"}),l.desktopDownload=new l("desktop-download",{fontCharacter:"\\ea78"}),l.beaker=new l("beaker",{fontCharacter:"\\ea79"}),l.microscope=new l("microscope",{fontCharacter:"\\ea79"}),l.vm=new l("vm",{fontCharacter:"\\ea7a"}),l.deviceDesktop=new l("device-desktop",{fontCharacter:"\\ea7a"}),l.file=new l("file",{fontCharacter:"\\ea7b"}),l.fileText=new l("file-text",{fontCharacter:"\\ea7b"}),l.more=new l("more",{fontCharacter:"\\ea7c"}),l.ellipsis=new l("ellipsis",{fontCharacter:"\\ea7c"}),l.kebabHorizontal=new l("kebab-horizontal",{fontCharacter:"\\ea7c"}),l.mailReply=new l("mail-reply",{fontCharacter:"\\ea7d"}),l.reply=new l("reply",{fontCharacter:"\\ea7d"}),l.organization=new l("organization",{fontCharacter:"\\ea7e"}),l.organizationFilled=new l("organization-filled",{fontCharacter:"\\ea7e"}),l.organizationOutline=new l("organization-outline",{fontCharacter:"\\ea7e"}),l.newFile=new l("new-file",{fontCharacter:"\\ea7f"}),l.fileAdd=new l("file-add",{fontCharacter:"\\ea7f"}),l.newFolder=new l("new-folder",{fontCharacter:"\\ea80"}),l.fileDirectoryCreate=new l("file-directory-create",{fontCharacter:"\\ea80"}),l.trash=new l("trash",{fontCharacter:"\\ea81"}),l.trashcan=new l("trashcan",{fontCharacter:"\\ea81"}),l.history=new l("history",{fontCharacter:"\\ea82"}),l.clock=new l("clock",{fontCharacter:"\\ea82"}),l.folder=new l("folder",{fontCharacter:"\\ea83"}),l.fileDirectory=new l("file-directory",{fontCharacter:"\\ea83"}),l.symbolFolder=new l("symbol-folder",{fontCharacter:"\\ea83"}),l.logoGithub=new l("logo-github",{fontCharacter:"\\ea84"}),l.markGithub=new l("mark-github",{fontCharacter:"\\ea84"}),l.github=new l("github",{fontCharacter:"\\ea84"}),l.terminal=new l("terminal",{fontCharacter:"\\ea85"}),l.console=new l("console",{fontCharacter:"\\ea85"}),l.repl=new l("repl",{fontCharacter:"\\ea85"}),l.zap=new l("zap",{fontCharacter:"\\ea86"}),l.symbolEvent=new l("symbol-event",{fontCharacter:"\\ea86"}),l.error=new l("error",{fontCharacter:"\\ea87"}),l.stop=new l("stop",{fontCharacter:"\\ea87"}),l.variable=new l("variable",{fontCharacter:"\\ea88"}),l.symbolVariable=new l("symbol-variable",{fontCharacter:"\\ea88"}),l.array=new l("array",{fontCharacter:"\\ea8a"}),l.symbolArray=new l("symbol-array",{fontCharacter:"\\ea8a"}),l.symbolModule=new l("symbol-module",{fontCharacter:"\\ea8b"}),l.symbolPackage=new l("symbol-package",{fontCharacter:"\\ea8b"}),l.symbolNamespace=new l("symbol-namespace",{fontCharacter:"\\ea8b"}),l.symbolObject=new l("symbol-object",{fontCharacter:"\\ea8b"}),l.symbolMethod=new l("symbol-method",{fontCharacter:"\\ea8c"}),l.symbolFunction=new l("symbol-function",{fontCharacter:"\\ea8c"}),l.symbolConstructor=new l("symbol-constructor",{fontCharacter:"\\ea8c"}),l.symbolBoolean=new l("symbol-boolean",{fontCharacter:"\\ea8f"}),l.symbolNull=new l("symbol-null",{fontCharacter:"\\ea8f"}),l.symbolNumeric=new l("symbol-numeric",{fontCharacter:"\\ea90"}),l.symbolNumber=new l("symbol-number",{fontCharacter:"\\ea90"}),l.symbolStructure=new l("symbol-structure",{fontCharacter:"\\ea91"}),l.symbolStruct=new l("symbol-struct",{fontCharacter:"\\ea91"}),l.symbolParameter=new l("symbol-parameter",{fontCharacter:"\\ea92"}),l.symbolTypeParameter=new l("symbol-type-parameter",{fontCharacter:"\\ea92"}),l.symbolKey=new l("symbol-key",{fontCharacter:"\\ea93"}),l.symbolText=new l("symbol-text",{fontCharacter:"\\ea93"}),l.symbolReference=new l("symbol-reference",{fontCharacter:"\\ea94"}),l.goToFile=new l("go-to-file",{fontCharacter:"\\ea94"}),l.symbolEnum=new l("symbol-enum",{fontCharacter:"\\ea95"}),l.symbolValue=new l("symbol-value",{fontCharacter:"\\ea95"}),l.symbolRuler=new l("symbol-ruler",{fontCharacter:"\\ea96"}),l.symbolUnit=new l("symbol-unit",{fontCharacter:"\\ea96"}),l.activateBreakpoints=new l("activate-breakpoints",{fontCharacter:"\\ea97"}),l.archive=new l("archive",{fontCharacter:"\\ea98"}),l.arrowBoth=new l("arrow-both",{fontCharacter:"\\ea99"}),l.arrowDown=new l("arrow-down",{fontCharacter:"\\ea9a"}),l.arrowLeft=new l("arrow-left",{fontCharacter:"\\ea9b"}),l.arrowRight=new l("arrow-right",{fontCharacter:"\\ea9c"}),l.arrowSmallDown=new l("arrow-small-down",{fontCharacter:"\\ea9d"}),l.arrowSmallLeft=new l("arrow-small-left",{fontCharacter:"\\ea9e"}),l.arrowSmallRight=new l("arrow-small-right",{fontCharacter:"\\ea9f"}),l.arrowSmallUp=new l("arrow-small-up",{fontCharacter:"\\eaa0"}),l.arrowUp=new l("arrow-up",{fontCharacter:"\\eaa1"}),l.bell=new l("bell",{fontCharacter:"\\eaa2"}),l.bold=new l("bold",{fontCharacter:"\\eaa3"}),l.book=new l("book",{fontCharacter:"\\eaa4"}),l.bookmark=new l("bookmark",{fontCharacter:"\\eaa5"}),l.debugBreakpointConditionalUnverified=new l("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),l.debugBreakpointConditional=new l("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),l.debugBreakpointConditionalDisabled=new l("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),l.debugBreakpointDataUnverified=new l("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),l.debugBreakpointData=new l("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),l.debugBreakpointDataDisabled=new l("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),l.debugBreakpointLogUnverified=new l("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),l.debugBreakpointLog=new l("debug-breakpoint-log",{fontCharacter:"\\eaab"}),l.debugBreakpointLogDisabled=new l("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),l.briefcase=new l("briefcase",{fontCharacter:"\\eaac"}),l.broadcast=new l("broadcast",{fontCharacter:"\\eaad"}),l.browser=new l("browser",{fontCharacter:"\\eaae"}),l.bug=new l("bug",{fontCharacter:"\\eaaf"}),l.calendar=new l("calendar",{fontCharacter:"\\eab0"}),l.caseSensitive=new l("case-sensitive",{fontCharacter:"\\eab1"}),l.check=new l("check",{fontCharacter:"\\eab2"}),l.checklist=new l("checklist",{fontCharacter:"\\eab3"}),l.chevronDown=new l("chevron-down",{fontCharacter:"\\eab4"}),l.dropDownButton=new l("drop-down-button",l.chevronDown.definition),l.chevronLeft=new l("chevron-left",{fontCharacter:"\\eab5"}),l.chevronRight=new l("chevron-right",{fontCharacter:"\\eab6"}),l.chevronUp=new l("chevron-up",{fontCharacter:"\\eab7"}),l.chromeClose=new l("chrome-close",{fontCharacter:"\\eab8"}),l.chromeMaximize=new l("chrome-maximize",{fontCharacter:"\\eab9"}),l.chromeMinimize=new l("chrome-minimize",{fontCharacter:"\\eaba"}),l.chromeRestore=new l("chrome-restore",{fontCharacter:"\\eabb"}),l.circleOutline=new l("circle-outline",{fontCharacter:"\\eabc"}),l.debugBreakpointUnverified=new l("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),l.circleSlash=new l("circle-slash",{fontCharacter:"\\eabd"}),l.circuitBoard=new l("circuit-board",{fontCharacter:"\\eabe"}),l.clearAll=new l("clear-all",{fontCharacter:"\\eabf"}),l.clippy=new l("clippy",{fontCharacter:"\\eac0"}),l.closeAll=new l("close-all",{fontCharacter:"\\eac1"}),l.cloudDownload=new l("cloud-download",{fontCharacter:"\\eac2"}),l.cloudUpload=new l("cloud-upload",{fontCharacter:"\\eac3"}),l.code=new l("code",{fontCharacter:"\\eac4"}),l.collapseAll=new l("collapse-all",{fontCharacter:"\\eac5"}),l.colorMode=new l("color-mode",{fontCharacter:"\\eac6"}),l.commentDiscussion=new l("comment-discussion",{fontCharacter:"\\eac7"}),l.compareChanges=new l("compare-changes",{fontCharacter:"\\eafd"}),l.creditCard=new l("credit-card",{fontCharacter:"\\eac9"}),l.dash=new l("dash",{fontCharacter:"\\eacc"}),l.dashboard=new l("dashboard",{fontCharacter:"\\eacd"}),l.database=new l("database",{fontCharacter:"\\eace"}),l.debugContinue=new l("debug-continue",{fontCharacter:"\\eacf"}),l.debugDisconnect=new l("debug-disconnect",{fontCharacter:"\\ead0"}),l.debugPause=new l("debug-pause",{fontCharacter:"\\ead1"}),l.debugRestart=new l("debug-restart",{fontCharacter:"\\ead2"}),l.debugStart=new l("debug-start",{fontCharacter:"\\ead3"}),l.debugStepInto=new l("debug-step-into",{fontCharacter:"\\ead4"}),l.debugStepOut=new l("debug-step-out",{fontCharacter:"\\ead5"}),l.debugStepOver=new l("debug-step-over",{fontCharacter:"\\ead6"}),l.debugStop=new l("debug-stop",{fontCharacter:"\\ead7"}),l.debug=new l("debug",{fontCharacter:"\\ead8"}),l.deviceCameraVideo=new l("device-camera-video",{fontCharacter:"\\ead9"}),l.deviceCamera=new l("device-camera",{fontCharacter:"\\eada"}),l.deviceMobile=new l("device-mobile",{fontCharacter:"\\eadb"}),l.diffAdded=new l("diff-added",{fontCharacter:"\\eadc"}),l.diffIgnored=new l("diff-ignored",{fontCharacter:"\\eadd"}),l.diffModified=new l("diff-modified",{fontCharacter:"\\eade"}),l.diffRemoved=new l("diff-removed",{fontCharacter:"\\eadf"}),l.diffRenamed=new l("diff-renamed",{fontCharacter:"\\eae0"}),l.diff=new l("diff",{fontCharacter:"\\eae1"}),l.discard=new l("discard",{fontCharacter:"\\eae2"}),l.editorLayout=new l("editor-layout",{fontCharacter:"\\eae3"}),l.emptyWindow=new l("empty-window",{fontCharacter:"\\eae4"}),l.exclude=new l("exclude",{fontCharacter:"\\eae5"}),l.extensions=new l("extensions",{fontCharacter:"\\eae6"}),l.eyeClosed=new l("eye-closed",{fontCharacter:"\\eae7"}),l.fileBinary=new l("file-binary",{fontCharacter:"\\eae8"}),l.fileCode=new l("file-code",{fontCharacter:"\\eae9"}),l.fileMedia=new l("file-media",{fontCharacter:"\\eaea"}),l.filePdf=new l("file-pdf",{fontCharacter:"\\eaeb"}),l.fileSubmodule=new l("file-submodule",{fontCharacter:"\\eaec"}),l.fileSymlinkDirectory=new l("file-symlink-directory",{fontCharacter:"\\eaed"}),l.fileSymlinkFile=new l("file-symlink-file",{fontCharacter:"\\eaee"}),l.fileZip=new l("file-zip",{fontCharacter:"\\eaef"}),l.files=new l("files",{fontCharacter:"\\eaf0"}),l.filter=new l("filter",{fontCharacter:"\\eaf1"}),l.flame=new l("flame",{fontCharacter:"\\eaf2"}),l.foldDown=new l("fold-down",{fontCharacter:"\\eaf3"}),l.foldUp=new l("fold-up",{fontCharacter:"\\eaf4"}),l.fold=new l("fold",{fontCharacter:"\\eaf5"}),l.folderActive=new l("folder-active",{fontCharacter:"\\eaf6"}),l.folderOpened=new l("folder-opened",{fontCharacter:"\\eaf7"}),l.gear=new l("gear",{fontCharacter:"\\eaf8"}),l.gift=new l("gift",{fontCharacter:"\\eaf9"}),l.gistSecret=new l("gist-secret",{fontCharacter:"\\eafa"}),l.gist=new l("gist",{fontCharacter:"\\eafb"}),l.gitCommit=new l("git-commit",{fontCharacter:"\\eafc"}),l.gitCompare=new l("git-compare",{fontCharacter:"\\eafd"}),l.gitMerge=new l("git-merge",{fontCharacter:"\\eafe"}),l.githubAction=new l("github-action",{fontCharacter:"\\eaff"}),l.githubAlt=new l("github-alt",{fontCharacter:"\\eb00"}),l.globe=new l("globe",{fontCharacter:"\\eb01"}),l.grabber=new l("grabber",{fontCharacter:"\\eb02"}),l.graph=new l("graph",{fontCharacter:"\\eb03"}),l.gripper=new l("gripper",{fontCharacter:"\\eb04"}),l.heart=new l("heart",{fontCharacter:"\\eb05"}),l.home=new l("home",{fontCharacter:"\\eb06"}),l.horizontalRule=new l("horizontal-rule",{fontCharacter:"\\eb07"}),l.hubot=new l("hubot",{fontCharacter:"\\eb08"}),l.inbox=new l("inbox",{fontCharacter:"\\eb09"}),l.issueClosed=new l("issue-closed",{fontCharacter:"\\eba4"}),l.issueReopened=new l("issue-reopened",{fontCharacter:"\\eb0b"}),l.issues=new l("issues",{fontCharacter:"\\eb0c"}),l.italic=new l("italic",{fontCharacter:"\\eb0d"}),l.jersey=new l("jersey",{fontCharacter:"\\eb0e"}),l.json=new l("json",{fontCharacter:"\\eb0f"}),l.kebabVertical=new l("kebab-vertical",{fontCharacter:"\\eb10"}),l.key=new l("key",{fontCharacter:"\\eb11"}),l.law=new l("law",{fontCharacter:"\\eb12"}),l.lightbulbAutofix=new l("lightbulb-autofix",{fontCharacter:"\\eb13"}),l.linkExternal=new l("link-external",{fontCharacter:"\\eb14"}),l.link=new l("link",{fontCharacter:"\\eb15"}),l.listOrdered=new l("list-ordered",{fontCharacter:"\\eb16"}),l.listUnordered=new l("list-unordered",{fontCharacter:"\\eb17"}),l.liveShare=new l("live-share",{fontCharacter:"\\eb18"}),l.loading=new l("loading",{fontCharacter:"\\eb19"}),l.location=new l("location",{fontCharacter:"\\eb1a"}),l.mailRead=new l("mail-read",{fontCharacter:"\\eb1b"}),l.mail=new l("mail",{fontCharacter:"\\eb1c"}),l.markdown=new l("markdown",{fontCharacter:"\\eb1d"}),l.megaphone=new l("megaphone",{fontCharacter:"\\eb1e"}),l.mention=new l("mention",{fontCharacter:"\\eb1f"}),l.milestone=new l("milestone",{fontCharacter:"\\eb20"}),l.mortarBoard=new l("mortar-board",{fontCharacter:"\\eb21"}),l.move=new l("move",{fontCharacter:"\\eb22"}),l.multipleWindows=new l("multiple-windows",{fontCharacter:"\\eb23"}),l.mute=new l("mute",{fontCharacter:"\\eb24"}),l.noNewline=new l("no-newline",{fontCharacter:"\\eb25"}),l.note=new l("note",{fontCharacter:"\\eb26"}),l.octoface=new l("octoface",{fontCharacter:"\\eb27"}),l.openPreview=new l("open-preview",{fontCharacter:"\\eb28"}),l.package_=new l("package",{fontCharacter:"\\eb29"}),l.paintcan=new l("paintcan",{fontCharacter:"\\eb2a"}),l.pin=new l("pin",{fontCharacter:"\\eb2b"}),l.play=new l("play",{fontCharacter:"\\eb2c"}),l.run=new l("run",{fontCharacter:"\\eb2c"}),l.plug=new l("plug",{fontCharacter:"\\eb2d"}),l.preserveCase=new l("preserve-case",{fontCharacter:"\\eb2e"}),l.preview=new l("preview",{fontCharacter:"\\eb2f"}),l.project=new l("project",{fontCharacter:"\\eb30"}),l.pulse=new l("pulse",{fontCharacter:"\\eb31"}),l.question=new l("question",{fontCharacter:"\\eb32"}),l.quote=new l("quote",{fontCharacter:"\\eb33"}),l.radioTower=new l("radio-tower",{fontCharacter:"\\eb34"}),l.reactions=new l("reactions",{fontCharacter:"\\eb35"}),l.references=new l("references",{fontCharacter:"\\eb36"}),l.refresh=new l("refresh",{fontCharacter:"\\eb37"}),l.regex=new l("regex",{fontCharacter:"\\eb38"}),l.remoteExplorer=new l("remote-explorer",{fontCharacter:"\\eb39"}),l.remote=new l("remote",{fontCharacter:"\\eb3a"}),l.remove=new l("remove",{fontCharacter:"\\eb3b"}),l.replaceAll=new l("replace-all",{fontCharacter:"\\eb3c"}),l.replace=new l("replace",{fontCharacter:"\\eb3d"}),l.repoClone=new l("repo-clone",{fontCharacter:"\\eb3e"}),l.repoForcePush=new l("repo-force-push",{fontCharacter:"\\eb3f"}),l.repoPull=new l("repo-pull",{fontCharacter:"\\eb40"}),l.repoPush=new l("repo-push",{fontCharacter:"\\eb41"}),l.report=new l("report",{fontCharacter:"\\eb42"}),l.requestChanges=new l("request-changes",{fontCharacter:"\\eb43"}),l.rocket=new l("rocket",{fontCharacter:"\\eb44"}),l.rootFolderOpened=new l("root-folder-opened",{fontCharacter:"\\eb45"}),l.rootFolder=new l("root-folder",{fontCharacter:"\\eb46"}),l.rss=new l("rss",{fontCharacter:"\\eb47"}),l.ruby=new l("ruby",{fontCharacter:"\\eb48"}),l.saveAll=new l("save-all",{fontCharacter:"\\eb49"}),l.saveAs=new l("save-as",{fontCharacter:"\\eb4a"}),l.save=new l("save",{fontCharacter:"\\eb4b"}),l.screenFull=new l("screen-full",{fontCharacter:"\\eb4c"}),l.screenNormal=new l("screen-normal",{fontCharacter:"\\eb4d"}),l.searchStop=new l("search-stop",{fontCharacter:"\\eb4e"}),l.server=new l("server",{fontCharacter:"\\eb50"}),l.settingsGear=new l("settings-gear",{fontCharacter:"\\eb51"}),l.settings=new l("settings",{fontCharacter:"\\eb52"}),l.shield=new l("shield",{fontCharacter:"\\eb53"}),l.smiley=new l("smiley",{fontCharacter:"\\eb54"}),l.sortPrecedence=new l("sort-precedence",{fontCharacter:"\\eb55"}),l.splitHorizontal=new l("split-horizontal",{fontCharacter:"\\eb56"}),l.splitVertical=new l("split-vertical",{fontCharacter:"\\eb57"}),l.squirrel=new l("squirrel",{fontCharacter:"\\eb58"}),l.starFull=new l("star-full",{fontCharacter:"\\eb59"}),l.starHalf=new l("star-half",{fontCharacter:"\\eb5a"}),l.symbolClass=new l("symbol-class",{fontCharacter:"\\eb5b"}),l.symbolColor=new l("symbol-color",{fontCharacter:"\\eb5c"}),l.symbolConstant=new l("symbol-constant",{fontCharacter:"\\eb5d"}),l.symbolEnumMember=new l("symbol-enum-member",{fontCharacter:"\\eb5e"}),l.symbolField=new l("symbol-field",{fontCharacter:"\\eb5f"}),l.symbolFile=new l("symbol-file",{fontCharacter:"\\eb60"}),l.symbolInterface=new l("symbol-interface",{fontCharacter:"\\eb61"}),l.symbolKeyword=new l("symbol-keyword",{fontCharacter:"\\eb62"}),l.symbolMisc=new l("symbol-misc",{fontCharacter:"\\eb63"}),l.symbolOperator=new l("symbol-operator",{fontCharacter:"\\eb64"}),l.symbolProperty=new l("symbol-property",{fontCharacter:"\\eb65"}),l.wrench=new l("wrench",{fontCharacter:"\\eb65"}),l.wrenchSubaction=new l("wrench-subaction",{fontCharacter:"\\eb65"}),l.symbolSnippet=new l("symbol-snippet",{fontCharacter:"\\eb66"}),l.tasklist=new l("tasklist",{fontCharacter:"\\eb67"}),l.telescope=new l("telescope",{fontCharacter:"\\eb68"}),l.textSize=new l("text-size",{fontCharacter:"\\eb69"}),l.threeBars=new l("three-bars",{fontCharacter:"\\eb6a"}),l.thumbsdown=new l("thumbsdown",{fontCharacter:"\\eb6b"}),l.thumbsup=new l("thumbsup",{fontCharacter:"\\eb6c"}),l.tools=new l("tools",{fontCharacter:"\\eb6d"}),l.triangleDown=new l("triangle-down",{fontCharacter:"\\eb6e"}),l.triangleLeft=new l("triangle-left",{fontCharacter:"\\eb6f"}),l.triangleRight=new l("triangle-right",{fontCharacter:"\\eb70"}),l.triangleUp=new l("triangle-up",{fontCharacter:"\\eb71"}),l.twitter=new l("twitter",{fontCharacter:"\\eb72"}),l.unfold=new l("unfold",{fontCharacter:"\\eb73"}),l.unlock=new l("unlock",{fontCharacter:"\\eb74"}),l.unmute=new l("unmute",{fontCharacter:"\\eb75"}),l.unverified=new l("unverified",{fontCharacter:"\\eb76"}),l.verified=new l("verified",{fontCharacter:"\\eb77"}),l.versions=new l("versions",{fontCharacter:"\\eb78"}),l.vmActive=new l("vm-active",{fontCharacter:"\\eb79"}),l.vmOutline=new l("vm-outline",{fontCharacter:"\\eb7a"}),l.vmRunning=new l("vm-running",{fontCharacter:"\\eb7b"}),l.watch=new l("watch",{fontCharacter:"\\eb7c"}),l.whitespace=new l("whitespace",{fontCharacter:"\\eb7d"}),l.wholeWord=new l("whole-word",{fontCharacter:"\\eb7e"}),l.window=new l("window",{fontCharacter:"\\eb7f"}),l.wordWrap=new l("word-wrap",{fontCharacter:"\\eb80"}),l.zoomIn=new l("zoom-in",{fontCharacter:"\\eb81"}),l.zoomOut=new l("zoom-out",{fontCharacter:"\\eb82"}),l.listFilter=new l("list-filter",{fontCharacter:"\\eb83"}),l.listFlat=new l("list-flat",{fontCharacter:"\\eb84"}),l.listSelection=new l("list-selection",{fontCharacter:"\\eb85"}),l.selection=new l("selection",{fontCharacter:"\\eb85"}),l.listTree=new l("list-tree",{fontCharacter:"\\eb86"}),l.debugBreakpointFunctionUnverified=new l("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),l.debugBreakpointFunction=new l("debug-breakpoint-function",{fontCharacter:"\\eb88"}),l.debugBreakpointFunctionDisabled=new l("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),l.debugStackframeActive=new l("debug-stackframe-active",{fontCharacter:"\\eb89"}),l.debugStackframeDot=new l("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),l.debugStackframe=new l("debug-stackframe",{fontCharacter:"\\eb8b"}),l.debugStackframeFocused=new l("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),l.debugBreakpointUnsupported=new l("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),l.symbolString=new l("symbol-string",{fontCharacter:"\\eb8d"}),l.debugReverseContinue=new l("debug-reverse-continue",{fontCharacter:"\\eb8e"}),l.debugStepBack=new l("debug-step-back",{fontCharacter:"\\eb8f"}),l.debugRestartFrame=new l("debug-restart-frame",{fontCharacter:"\\eb90"}),l.callIncoming=new l("call-incoming",{fontCharacter:"\\eb92"}),l.callOutgoing=new l("call-outgoing",{fontCharacter:"\\eb93"}),l.menu=new l("menu",{fontCharacter:"\\eb94"}),l.expandAll=new l("expand-all",{fontCharacter:"\\eb95"}),l.feedback=new l("feedback",{fontCharacter:"\\eb96"}),l.groupByRefType=new l("group-by-ref-type",{fontCharacter:"\\eb97"}),l.ungroupByRefType=new l("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),l.account=new l("account",{fontCharacter:"\\eb99"}),l.bellDot=new l("bell-dot",{fontCharacter:"\\eb9a"}),l.debugConsole=new l("debug-console",{fontCharacter:"\\eb9b"}),l.library=new l("library",{fontCharacter:"\\eb9c"}),l.output=new l("output",{fontCharacter:"\\eb9d"}),l.runAll=new l("run-all",{fontCharacter:"\\eb9e"}),l.syncIgnored=new l("sync-ignored",{fontCharacter:"\\eb9f"}),l.pinned=new l("pinned",{fontCharacter:"\\eba0"}),l.githubInverted=new l("github-inverted",{fontCharacter:"\\eba1"}),l.debugAlt=new l("debug-alt",{fontCharacter:"\\eb91"}),l.serverProcess=new l("server-process",{fontCharacter:"\\eba2"}),l.serverEnvironment=new l("server-environment",{fontCharacter:"\\eba3"}),l.pass=new l("pass",{fontCharacter:"\\eba4"}),l.stopCircle=new l("stop-circle",{fontCharacter:"\\eba5"}),l.playCircle=new l("play-circle",{fontCharacter:"\\eba6"}),l.record=new l("record",{fontCharacter:"\\eba7"}),l.debugAltSmall=new l("debug-alt-small",{fontCharacter:"\\eba8"}),l.vmConnect=new l("vm-connect",{fontCharacter:"\\eba9"}),l.cloud=new l("cloud",{fontCharacter:"\\ebaa"}),l.merge=new l("merge",{fontCharacter:"\\ebab"}),l.exportIcon=new l("export",{fontCharacter:"\\ebac"}),l.graphLeft=new l("graph-left",{fontCharacter:"\\ebad"}),l.magnet=new l("magnet",{fontCharacter:"\\ebae"}),l.notebook=new l("notebook",{fontCharacter:"\\ebaf"}),l.redo=new l("redo",{fontCharacter:"\\ebb0"}),l.checkAll=new l("check-all",{fontCharacter:"\\ebb1"}),l.pinnedDirty=new l("pinned-dirty",{fontCharacter:"\\ebb2"}),l.passFilled=new l("pass-filled",{fontCharacter:"\\ebb3"}),l.circleLargeFilled=new l("circle-large-filled",{fontCharacter:"\\ebb4"}),l.circleLargeOutline=new l("circle-large-outline",{fontCharacter:"\\ebb5"}),l.combine=new l("combine",{fontCharacter:"\\ebb6"}),l.gather=new l("gather",{fontCharacter:"\\ebb6"}),l.table=new l("table",{fontCharacter:"\\ebb7"}),l.variableGroup=new l("variable-group",{fontCharacter:"\\ebb8"}),l.typeHierarchy=new l("type-hierarchy",{fontCharacter:"\\ebb9"}),l.typeHierarchySub=new l("type-hierarchy-sub",{fontCharacter:"\\ebba"}),l.typeHierarchySuper=new l("type-hierarchy-super",{fontCharacter:"\\ebbb"}),l.gitPullRequestCreate=new l("git-pull-request-create",{fontCharacter:"\\ebbc"}),l.runAbove=new l("run-above",{fontCharacter:"\\ebbd"}),l.runBelow=new l("run-below",{fontCharacter:"\\ebbe"}),l.notebookTemplate=new l("notebook-template",{fontCharacter:"\\ebbf"}),l.debugRerun=new l("debug-rerun",{fontCharacter:"\\ebc0"}),l.workspaceTrusted=new l("workspace-trusted",{fontCharacter:"\\ebc1"}),l.workspaceUntrusted=new l("workspace-untrusted",{fontCharacter:"\\ebc2"}),l.workspaceUnspecified=new l("workspace-unspecified",{fontCharacter:"\\ebc3"}),l.terminalCmd=new l("terminal-cmd",{fontCharacter:"\\ebc4"}),l.terminalDebian=new l("terminal-debian",{fontCharacter:"\\ebc5"}),l.terminalLinux=new l("terminal-linux",{fontCharacter:"\\ebc6"}),l.terminalPowershell=new l("terminal-powershell",{fontCharacter:"\\ebc7"}),l.terminalTmux=new l("terminal-tmux",{fontCharacter:"\\ebc8"}),l.terminalUbuntu=new l("terminal-ubuntu",{fontCharacter:"\\ebc9"}),l.terminalBash=new l("terminal-bash",{fontCharacter:"\\ebca"}),l.arrowSwap=new l("arrow-swap",{fontCharacter:"\\ebcb"}),l.copy=new l("copy",{fontCharacter:"\\ebcc"}),l.personAdd=new l("person-add",{fontCharacter:"\\ebcd"}),l.filterFilled=new l("filter-filled",{fontCharacter:"\\ebce"}),l.wand=new l("wand",{fontCharacter:"\\ebcf"}),l.debugLineByLine=new l("debug-line-by-line",{fontCharacter:"\\ebd0"}),l.inspect=new l("inspect",{fontCharacter:"\\ebd1"}),l.layers=new l("layers",{fontCharacter:"\\ebd2"}),l.layersDot=new l("layers-dot",{fontCharacter:"\\ebd3"}),l.layersActive=new l("layers-active",{fontCharacter:"\\ebd4"}),l.compass=new l("compass",{fontCharacter:"\\ebd5"}),l.compassDot=new l("compass-dot",{fontCharacter:"\\ebd6"}),l.compassActive=new l("compass-active",{fontCharacter:"\\ebd7"}),l.azure=new l("azure",{fontCharacter:"\\ebd8"}),l.issueDraft=new l("issue-draft",{fontCharacter:"\\ebd9"}),l.gitPullRequestClosed=new l("git-pull-request-closed",{fontCharacter:"\\ebda"}),l.gitPullRequestDraft=new l("git-pull-request-draft",{fontCharacter:"\\ebdb"}),l.debugAll=new l("debug-all",{fontCharacter:"\\ebdc"}),l.debugCoverage=new l("debug-coverage",{fontCharacter:"\\ebdd"}),l.runErrors=new l("run-errors",{fontCharacter:"\\ebde"}),l.folderLibrary=new l("folder-library",{fontCharacter:"\\ebdf"}),l.debugContinueSmall=new l("debug-continue-small",{fontCharacter:"\\ebe0"}),l.beakerStop=new l("beaker-stop",{fontCharacter:"\\ebe1"}),l.graphLine=new l("graph-line",{fontCharacter:"\\ebe2"}),l.graphScatter=new l("graph-scatter",{fontCharacter:"\\ebe3"}),l.pieChart=new l("pie-chart",{fontCharacter:"\\ebe4"}),l.bracket=new l("bracket",l.json.definition),l.bracketDot=new l("bracket-dot",{fontCharacter:"\\ebe5"}),l.bracketError=new l("bracket-error",{fontCharacter:"\\ebe6"}),l.lockSmall=new l("lock-small",{fontCharacter:"\\ebe7"}),l.azureDevops=new l("azure-devops",{fontCharacter:"\\ebe8"}),l.verifiedFilled=new l("verified-filled",{fontCharacter:"\\ebe9"})}(Fe||(Fe={}))},79881:function(Nt,ut,ie){"use strict";ie.d(ut,{B8:function(){return P},Cp:function(){return ke},F0:function(){return Te},L6:function(){return Y},VV:function(){return Fe},b1:function(){return l},dL:function(){return He},ri:function(){return $e}});class V{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(d){setTimeout(()=>{throw d.stack?new Error(d.message+`
`+d.stack):d},0)}}emit(d){this.listeners.forEach(w=>{w(d)})}onUnexpectedError(d){this.unexpectedErrorHandler(d),this.emit(d)}onUnexpectedExternalError(d){this.unexpectedErrorHandler(d)}}const Ae=new V;function He(S){Fe(S)||Ae.onUnexpectedError(S)}function ke(S){Fe(S)||Ae.onUnexpectedExternalError(S)}function $e(S){if(S instanceof Error){let{name:d,message:w}=S;const y=S.stacktrace||S.stack;return{$isError:!0,name:d,message:w,stack:y}}return S}const ue="Canceled";function Fe(S){return S instanceof Error&&S.name===ue&&S.message===ue}function Te(){const S=new Error(ue);return S.name=S.message,S}function l(S){return S?new Error(`Illegal argument: ${S}`):new Error("Illegal argument")}function Y(S){return S?new Error(`Illegal state: ${S}`):new Error("Illegal state")}class P extends Error{constructor(d){super("NotSupported"),d&&(this.message=d)}}},4348:function(Nt,ut,ie){"use strict";ie.d(ut,{D0:function(){return P},E7:function(){return S},K3:function(){return Y},Q5:function(){return l},ZD:function(){return d},ju:function(){return $e}});var V=ie(79881),Ae=ie(69323),He=ie(34502),ke=ie(95830),$e;(function(w){w.None=()=>Ae.JT.None;function y(Z){return(ee,me=null,ae)=>{let x=!1,A;return A=Z(N=>{if(!x)return A?A.dispose():x=!0,ee.call(me,N)},null,ae),x&&A.dispose(),A}}w.once=y;function G(Z,ee){return R((me,ae=null,x)=>Z(A=>me.call(ae,ee(A)),null,x))}w.map=G;function X(Z,ee){return R((me,ae=null,x)=>Z(A=>{ee(A),me.call(ae,A)},null,x))}w.forEach=X;function M(Z,ee){return R((me,ae=null,x)=>Z(A=>ee(A)&&me.call(ae,A),null,x))}w.filter=M;function O(Z){return Z}w.signal=O;function Q(...Z){return(ee,me=null,ae)=>(0,Ae.F8)(...Z.map(x=>x(A=>ee.call(me,A),null,ae)))}w.any=Q;function he(Z,ee,me){let ae=me;return G(Z,x=>(ae=ee(ae,x),ae))}w.reduce=he;function R(Z){let ee;const me=new l({onFirstListenerAdd(){ee=Z(me.fire,me)},onLastListenerRemove(){ee.dispose()}});return me.event}function ve(Z,ee,me=100,ae=!1,x){let A,N,de,We=0;const qe=new l({leakWarningThreshold:x,onFirstListenerAdd(){A=Z(Ge=>{We++,N=ee(N,Ge),ae&&!de&&(qe.fire(N),N=void 0),clearTimeout(de),de=setTimeout(()=>{const ot=N;N=void 0,de=void 0,(!ae||We>1)&&qe.fire(ot),We=0},me)})},onLastListenerRemove(){A.dispose()}});return qe.event}w.debounce=ve;function Ce(Z,ee=(me,ae)=>me===ae){let me=!0,ae;return M(Z,x=>{const A=me||!ee(x,ae);return me=!1,ae=x,A})}w.latch=Ce;function ge(Z,ee){return[w.filter(Z,ee),w.filter(Z,me=>!ee(me))]}w.split=ge;function be(Z,ee=!1,me=[]){let ae=me.slice(),x=Z(de=>{ae?ae.push(de):N.fire(de)});const A=()=>{ae&&ae.forEach(de=>N.fire(de)),ae=null},N=new l({onFirstListenerAdd(){x||(x=Z(de=>N.fire(de)))},onFirstListenerDidAdd(){ae&&(ee?setTimeout(A):A())},onLastListenerRemove(){x&&x.dispose(),x=null}});return N.event}w.buffer=be;class Ne{constructor(ee){this.event=ee}map(ee){return new Ne(G(this.event,ee))}forEach(ee){return new Ne(X(this.event,ee))}filter(ee){return new Ne(M(this.event,ee))}reduce(ee,me){return new Ne(he(this.event,ee,me))}latch(){return new Ne(Ce(this.event))}debounce(ee,me=100,ae=!1,x){return new Ne(ve(this.event,ee,me,ae,x))}on(ee,me,ae){return this.event(ee,me,ae)}once(ee,me,ae){return y(this.event)(ee,me,ae)}}function Ie(Z){return new Ne(Z)}w.chain=Ie;function je(Z,ee,me=ae=>ae){const ae=(...de)=>N.fire(me(...de)),x=()=>Z.on(ee,ae),A=()=>Z.removeListener(ee,ae),N=new l({onFirstListenerAdd:x,onLastListenerRemove:A});return N.event}w.fromNodeEventEmitter=je;function H(Z,ee,me=ae=>ae){const ae=(...de)=>N.fire(me(...de)),x=()=>Z.addEventListener(ee,ae),A=()=>Z.removeEventListener(ee,ae),N=new l({onFirstListenerAdd:x,onLastListenerRemove:A});return N.event}w.fromDOMEventEmitter=H;function z(Z){return new Promise(ee=>y(Z)(ee))}w.toPromise=z})($e||($e={}));class ue{constructor(y){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${y}_${ue._idPool++}`}start(y){this._stopWatch=new ke.G(!0),this._listenerCount=y}stop(){if(this._stopWatch){const y=this._stopWatch.elapsed();this._elapsedOverall+=y,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${y.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}ue._idPool=0;let Fe=-1;class Te{constructor(y,G=Math.random().toString(18).slice(2,5)){this.customThreshold=y,this.name=G,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(y){let G=Fe;if(typeof this.customThreshold=="number"&&(G=this.customThreshold),G<=0||y<G)return;this._stacks||(this._stacks=new Map);const X=new Error().stack.split(`
`).slice(3).join(`
`),M=this._stacks.get(X)||0;if(this._stacks.set(X,M+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=G*.5;let O,Q=0;for(const[he,R]of this._stacks)(!O||Q<R)&&(O=he,Q=R);console.warn(`[${this.name}] potential listener LEAK detected, having ${y} listeners already. MOST frequent listener (${Q}):`),console.warn(O)}return()=>{const O=this._stacks.get(X)||0;this._stacks.set(X,O-1)}}}class l{constructor(y){var G;this._disposed=!1,this._options=y,this._leakageMon=Fe>0?new Te(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((G=this._options)===null||G===void 0)&&G._profName?new ue(this._options._profName):void 0}get event(){return this._event||(this._event=(y,G,X)=>{var M;this._listeners||(this._listeners=new He.S);const O=this._listeners.isEmpty();O&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const Q=this._listeners.push(G?[y,G]:y);O&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,y,G);const he=(M=this._leakageMon)===null||M===void 0?void 0:M.check(this._listeners.size),R=(0,Ae.OF)(()=>{he&&he(),this._disposed||(Q(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return X instanceof Ae.SL?X.add(R):Array.isArray(X)&&X.push(R),R}),this._event}fire(y){var G,X;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new He.S);for(let M of this._listeners)this._deliveryQueue.push([M,y]);for((G=this._perfMon)===null||G===void 0||G.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[M,O]=this._deliveryQueue.shift();try{typeof M=="function"?M.call(void 0,O):M[0].call(M[1],O)}catch(Q){(0,V.dL)(Q)}}(X=this._perfMon)===null||X===void 0||X.stop()}}dispose(){var y,G,X,M,O;this._disposed||(this._disposed=!0,(y=this._listeners)===null||y===void 0||y.clear(),(G=this._deliveryQueue)===null||G===void 0||G.clear(),(M=(X=this._options)===null||X===void 0?void 0:X.onLastListenerRemove)===null||M===void 0||M.call(X),(O=this._leakageMon)===null||O===void 0||O.dispose())}}class Y extends l{constructor(y){super(y),this._isPaused=0,this._eventQueue=new He.S,this._mergeFn=y==null?void 0:y.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const y=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(y))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(y){this._listeners&&(this._isPaused!==0?this._eventQueue.push(y):super.fire(y))}}class P extends Y{constructor(y){var G;super(y),this._delay=(G=y.delay)!==null&&G!==void 0?G:100}fire(y){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(y)}}class S{constructor(){this.buffers=[]}wrapEvent(y){return(G,X,M)=>y(O=>{const Q=this.buffers[this.buffers.length-1];Q?Q.push(()=>G.call(X,O)):G.call(X,O)},void 0,M)}bufferEvents(y){const G=[];this.buffers.push(G);const X=y();return this.buffers.pop(),G.forEach(M=>M()),X}}class d{constructor(){this.listening=!1,this.inputEvent=$e.None,this.inputEventListener=Ae.JT.None,this.emitter=new l({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(y){this.inputEvent=y,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=y(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},17845:function(Nt,ut,ie){"use strict";ie.d(ut,{I:function(){return V}});function V(Ae){const He=this;let ke=!1,$e;return function(){return ke||(ke=!0,$e=Ae.apply(He,arguments)),$e}}},88226:function(Nt,ut,ie){"use strict";ie.d(ut,{$:function(){return V}});var V;(function(Ae){function He(Q){return Q&&typeof Q=="object"&&typeof Q[Symbol.iterator]=="function"}Ae.is=He;const ke=Object.freeze([]);function $e(){return ke}Ae.empty=$e;function*ue(Q){yield Q}Ae.single=ue;function Fe(Q){return Q||ke}Ae.from=Fe;function Te(Q){return!Q||Q[Symbol.iterator]().next().done===!0}Ae.isEmpty=Te;function l(Q){return Q[Symbol.iterator]().next().value}Ae.first=l;function Y(Q,he){for(const R of Q)if(he(R))return!0;return!1}Ae.some=Y;function P(Q,he){for(const R of Q)if(he(R))return R}Ae.find=P;function*S(Q,he){for(const R of Q)he(R)&&(yield R)}Ae.filter=S;function*d(Q,he){let R=0;for(const ve of Q)yield he(ve,R++)}Ae.map=d;function*w(...Q){for(const he of Q)for(const R of he)yield R}Ae.concat=w;function*y(Q){for(const he of Q)for(const R of he)yield R}Ae.concatNested=y;function G(Q,he,R){let ve=R;for(const Ce of Q)ve=he(ve,Ce);return ve}Ae.reduce=G;function*X(Q,he,R=Q.length){for(he<0&&(he+=Q.length),R<0?R+=Q.length:R>Q.length&&(R=Q.length);he<R;he++)yield Q[he]}Ae.slice=X;function M(Q,he=Number.POSITIVE_INFINITY){const R=[];if(he===0)return[R,Q];const ve=Q[Symbol.iterator]();for(let Ce=0;Ce<he;Ce++){const ge=ve.next();if(ge.done)return[R,Ae.empty()];R.push(ge.value)}return[R,{[Symbol.iterator](){return ve}}]}Ae.consume=M;function O(Q,he,R=(ve,Ce)=>ve===Ce){const ve=Q[Symbol.iterator](),Ce=he[Symbol.iterator]();for(;;){const ge=ve.next(),be=Ce.next();if(ge.done!==be.done)return!1;if(ge.done)return!0;if(!R(ge.value,be.value))return!1}}Ae.equals=O})(V||(V={}))},69323:function(Nt,ut,ie){"use strict";ie.d(ut,{B9:function(){return d},F8:function(){return w},JT:function(){return X},Jz:function(){return O},OF:function(){return y},SL:function(){return G},Wf:function(){return S},XK:function(){return M},dk:function(){return Y}});var V=ie(17845),Ae=ie(88226);const He=!1;let ke=null;function $e(Q){ke=Q}if(He){const Q="__is_disposable_tracked__";$e(new class{trackDisposable(he){const R=new Error("Potentially leaked disposable").stack;setTimeout(()=>{he[Q]||console.log(R)},3e3)}setParent(he,R){if(he&&he!==X.None)try{he[Q]=!0}catch(ve){}}markAsDisposed(he){if(he&&he!==X.None)try{he[Q]=!0}catch(R){}}markAsSingleton(he){}})}function ue(Q){return ke==null||ke.trackDisposable(Q),Q}function Fe(Q){ke==null||ke.markAsDisposed(Q)}function Te(Q,he){ke==null||ke.setParent(Q,he)}function l(Q,he){if(ke)for(const R of Q)ke.setParent(R,he)}function Y(Q){return ke==null||ke.markAsSingleton(Q),Q}class P extends Error{constructor(he){super(`Encountered errors while disposing of store. Errors: [${he.join(", ")}]`),this.errors=he}}function S(Q){return typeof Q.dispose=="function"&&Q.dispose.length===0}function d(Q){if(Ae.$.is(Q)){let he=[];for(const R of Q)if(R)try{R.dispose()}catch(ve){he.push(ve)}if(he.length===1)throw he[0];if(he.length>1)throw new P(he);return Array.isArray(Q)?[]:Q}else if(Q)return Q.dispose(),Q}function w(...Q){const he=y(()=>d(Q));return l(Q,he),he}function y(Q){const he=ue({dispose:(0,V.I)(()=>{Fe(he),Q()})});return he}class G{constructor(){this._toDispose=new Set,this._isDisposed=!1,ue(this)}dispose(){this._isDisposed||(Fe(this),this._isDisposed=!0,this.clear())}clear(){try{d(this._toDispose.values())}finally{this._toDispose.clear()}}add(he){if(!he)return he;if(he===this)throw new Error("Cannot register a disposable on itself!");return Te(he,this),this._isDisposed?G.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(he),he}}G.DISABLE_DISPOSED_WARNING=!1;class X{constructor(){this._store=new G,ue(this),Te(this._store,this)}dispose(){Fe(this),this._store.dispose()}_register(he){if(he===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(he)}}X.None=Object.freeze({dispose(){}});class M{constructor(){this._isDisposed=!1,ue(this)}get value(){return this._isDisposed?void 0:this._value}set value(he){var R;this._isDisposed||he===this._value||((R=this._value)===null||R===void 0||R.dispose(),he&&Te(he,this),this._value=he)}clear(){this.value=void 0}dispose(){var he;this._isDisposed=!0,Fe(this),(he=this._value)===null||he===void 0||he.dispose(),this._value=void 0}clearAndLeak(){const he=this._value;return this._value=void 0,he&&Te(he,null),he}}class O{constructor(he){this.object=he}dispose(){}}},34502:function(Nt,ut,ie){"use strict";ie.d(ut,{S:function(){return Ae}});class V{constructor(ke){this.element=ke,this.next=V.Undefined,this.prev=V.Undefined}}V.Undefined=new V(void 0);class Ae{constructor(){this._first=V.Undefined,this._last=V.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===V.Undefined}clear(){let ke=this._first;for(;ke!==V.Undefined;){const $e=ke.next;ke.prev=V.Undefined,ke.next=V.Undefined,ke=$e}this._first=V.Undefined,this._last=V.Undefined,this._size=0}unshift(ke){return this._insert(ke,!1)}push(ke){return this._insert(ke,!0)}_insert(ke,$e){const ue=new V(ke);if(this._first===V.Undefined)this._first=ue,this._last=ue;else if($e){const Te=this._last;this._last=ue,ue.prev=Te,Te.next=ue}else{const Te=this._first;this._first=ue,ue.next=Te,Te.prev=ue}this._size+=1;let Fe=!1;return()=>{Fe||(Fe=!0,this._remove(ue))}}shift(){if(this._first!==V.Undefined){const ke=this._first.element;return this._remove(this._first),ke}}pop(){if(this._last!==V.Undefined){const ke=this._last.element;return this._remove(this._last),ke}}_remove(ke){if(ke.prev!==V.Undefined&&ke.next!==V.Undefined){const $e=ke.prev;$e.next=ke.next,ke.next.prev=$e}else ke.prev===V.Undefined&&ke.next===V.Undefined?(this._first=V.Undefined,this._last=V.Undefined):ke.next===V.Undefined?(this._last=this._last.prev,this._last.next=V.Undefined):ke.prev===V.Undefined&&(this._first=this._first.next,this._first.prev=V.Undefined);this._size-=1}*[Symbol.iterator](){let ke=this._first;for(;ke!==V.Undefined;)yield ke.element,ke=ke.next}}},23345:function(Nt,ut,ie){"use strict";ie.d(ut,{$L:function(){return ve},ED:function(){return O},IJ:function(){return he},OS:function(){return Ne},WE:function(){return ge},dz:function(){return Q},gn:function(){return Ce},li:function(){return y},r:function(){return H},tY:function(){return R},xS:function(){return be}});var V=ie(97671),Ae;const He="en";let ke=!1,$e=!1,ue=!1,Fe=!1,Te=!1,l=!1,Y=!1,P,S=null,d=null,w;const y=typeof self=="object"?self:typeof ie.g=="object"?ie.g:{};let G;typeof y.vscode!="undefined"&&typeof y.vscode.process!="undefined"?G=y.vscode.process:typeof V!="undefined"&&(G=V);const X=typeof((Ae=G==null?void 0:G.versions)===null||Ae===void 0?void 0:Ae.electron)=="string"&&G.type==="renderer";if(typeof navigator=="object"&&!X)w=navigator.userAgent,ke=w.indexOf("Windows")>=0,$e=w.indexOf("Macintosh")>=0,Y=(w.indexOf("Macintosh")>=0||w.indexOf("iPad")>=0||w.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,ue=w.indexOf("Linux")>=0,l=!0,P=navigator.language,S=P;else if(typeof G=="object"){ke=G.platform==="win32",$e=G.platform==="darwin",ue=G.platform==="linux",Fe=ue&&!!G.env.SNAP&&!!G.env.SNAP_REVISION,P=He,S=He;const z=G.env.VSCODE_NLS_CONFIG;if(z)try{const Z=JSON.parse(z),ee=Z.availableLanguages["*"];P=Z.locale,S=ee||He,d=Z._translationsConfigFile}catch(Z){}Te=!0}else console.error("Unable to resolve platform.");let M=0;$e?M=1:ke?M=3:ue&&(M=2);const O=ke,Q=$e,he=ue,R=Te,ve=l,Ce=Y,ge=w,be=function(){if(y.setImmediate)return y.setImmediate.bind(y);if(typeof y.postMessage=="function"&&!y.importScripts){let ee=[];y.addEventListener("message",ae=>{if(ae.data&&ae.data.vscodeSetImmediateId)for(let x=0,A=ee.length;x<A;x++){const N=ee[x];if(N.id===ae.data.vscodeSetImmediateId){ee.splice(x,1),N.callback();return}}});let me=0;return ae=>{const x=++me;ee.push({id:x,callback:ae}),y.postMessage({vscodeSetImmediateId:x},"*")}}if(typeof(G==null?void 0:G.nextTick)=="function")return G.nextTick.bind(G);const Z=Promise.resolve();return ee=>Z.then(ee)}(),Ne=$e||Y?2:ke?1:3;let Ie=!0,je=!1;function H(){if(!je){je=!0;const z=new Uint8Array(2);z[0]=1,z[1]=2,Ie=new Uint16Array(z.buffer)[0]===513}return Ie}},95830:function(Nt,ut,ie){"use strict";ie.d(ut,{G:function(){return He}});var V=ie(23345);const Ae=V.li.performance&&typeof V.li.performance.now=="function";class He{constructor($e){this._highResolution=Ae&&$e,this._startTime=this._now(),this._stopTime=-1}static create($e=!0){return new He($e)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?V.li.performance.now():Date.now()}}},82983:function(Nt,ut,ie){"use strict";ie.d(ut,{$i:function(){return We},C8:function(){return at},GF:function(){return P},HO:function(){return me},IO:function(){return S},K7:function(){return Dt},Kw:function(){return jt},LC:function(){return y},Mh:function(){return be},P1:function(){return Ne},PJ:function(){return Xt},Qe:function(){return qe},R1:function(){return Y},RP:function(){return N},S6:function(){return Vt},TT:function(){return O},Ut:function(){return x},V8:function(){return G},WU:function(){return He},YK:function(){return je},YU:function(){return ke},ZG:function(){return Ie},ZH:function(){return z},ab:function(){return Ge},c1:function(){return it},df:function(){return ve},ec:function(){return $e},fi:function(){return Mt},fy:function(){return ue},j3:function(){return Fe},j_:function(){return he},m5:function(){return V},mK:function(){return R},mr:function(){return d},oH:function(){return Qe},oL:function(){return Te},ok:function(){return ge},ow:function(){return X},qq:function(){return Ce},qu:function(){return M},rL:function(){return H},uS:function(){return Lt},un:function(){return l},uq:function(){return w},vH:function(){return ee},xe:function(){return ot},zY:function(){return Q}});function V(T){return!T||typeof T!="string"?!0:T.trim().length===0}const Ae=/{(\d+)}/g;function He(T,...K){return K.length===0?T:T.replace(Ae,function(te,$){const W=parseInt($,10);return isNaN(W)||W<0||W>=K.length?te:K[W]})}function ke(T){return T.replace(/[<>&]/g,function(K){switch(K){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return K}})}function $e(T){return T.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function ue(T,K=" "){const te=Fe(T,K);return Te(te,K)}function Fe(T,K){if(!T||!K)return T;const te=K.length;if(te===0||T.length===0)return T;let $=0;for(;T.indexOf(K,$)===$;)$=$+te;return T.substring($)}function Te(T,K){if(!T||!K)return T;const te=K.length,$=T.length;if(te===0||$===0)return T;let W=$,Ee=-1;for(;Ee=T.lastIndexOf(K,W-1),!(Ee===-1||Ee+te!==W);){if(Ee===0)return"";W=Ee}return T.substring(0,W)}function l(T){return T.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function Y(T){return T.replace(/\*/g,"")}function P(T,K,te={}){if(!T)throw new Error("Cannot create regex from empty string");K||(T=$e(T)),te.wholeWord&&(/\B/.test(T.charAt(0))||(T="\\b"+T),/\B/.test(T.charAt(T.length-1))||(T=T+"\\b"));let $="";return te.global&&($+="g"),te.matchCase||($+="i"),te.multiline&&($+="m"),te.unicode&&($+="u"),new RegExp(T,$)}function S(T){return T.source==="^"||T.source==="^$"||T.source==="$"||T.source==="^\\s*$"?!1:!!(T.exec("")&&T.lastIndex===0)}function d(T){return(T.global?"g":"")+(T.ignoreCase?"i":"")+(T.multiline?"m":"")+(T.unicode?"u":"")}function w(T){return T.split(/\r\n|\r|\n/)}function y(T){for(let K=0,te=T.length;K<te;K++){const $=T.charCodeAt(K);if($!==32&&$!==9)return K}return-1}function G(T,K=0,te=T.length){for(let $=K;$<te;$++){const W=T.charCodeAt($);if(W!==32&&W!==9)return T.substring(K,$)}return T.substring(K,te)}function X(T,K=T.length-1){for(let te=K;te>=0;te--){const $=T.charCodeAt(te);if($!==32&&$!==9)return te}return-1}function M(T,K){return T<K?-1:T>K?1:0}function O(T,K,te=0,$=T.length,W=0,Ee=K.length){for(;te<$&&W<Ee;te++,W++){let Se=T.charCodeAt(te),we=K.charCodeAt(W);if(Se<we)return-1;if(Se>we)return 1}const Le=$-te,Oe=Ee-W;return Le<Oe?-1:Le>Oe?1:0}function Q(T,K){return he(T,K,0,T.length,0,K.length)}function he(T,K,te=0,$=T.length,W=0,Ee=K.length){for(;te<$&&W<Ee;te++,W++){let Se=T.charCodeAt(te),we=K.charCodeAt(W);if(Se===we)continue;if(Se>=128||we>=128)return O(T.toLowerCase(),K.toLowerCase(),te,$,W,Ee);R(Se)&&(Se-=32),R(we)&&(we-=32);const ze=Se-we;if(ze!==0)return ze}const Le=$-te,Oe=Ee-W;return Le<Oe?-1:Le>Oe?1:0}function R(T){return T>=97&&T<=122}function ve(T){return T>=65&&T<=90}function Ce(T,K){return T.length===K.length&&he(T,K)===0}function ge(T,K){const te=K.length;return K.length>T.length?!1:he(T,K,0,te)===0}function be(T,K){let te,$=Math.min(T.length,K.length);for(te=0;te<$;te++)if(T.charCodeAt(te)!==K.charCodeAt(te))return te;return $}function Ne(T,K){let te,$=Math.min(T.length,K.length);const W=T.length-1,Ee=K.length-1;for(te=0;te<$;te++)if(T.charCodeAt(W-te)!==K.charCodeAt(Ee-te))return te;return $}function Ie(T){return 55296<=T&&T<=56319}function je(T){return 56320<=T&&T<=57343}function H(T,K){return(T-55296<<10)+(K-56320)+65536}function z(T,K,te){const $=T.charCodeAt(te);if(Ie($)&&te+1<K){const W=T.charCodeAt(te+1);if(je(W))return H($,W)}return $}function Z(T,K){const te=T.charCodeAt(K-1);if(je(te)&&K>1){const $=T.charCodeAt(K-2);if(Ie($))return H($,te)}return te}function ee(T,K){const te=Rt.getInstance(),$=K,W=T.length,Ee=z(T,W,K);K+=Ee>=65536?2:1;let Le=te.getGraphemeBreakType(Ee);for(;K<W;){const Oe=z(T,W,K),Se=te.getGraphemeBreakType(Oe);if(Mt(Le,Se))break;K+=Oe>=65536?2:1,Le=Se}return K-$}function me(T,K){const te=Rt.getInstance(),$=K,W=Z(T,K);K-=W>=65536?2:1;let Ee=te.getGraphemeBreakType(W);for(;K>0;){const Le=Z(T,K),Oe=te.getGraphemeBreakType(Le);if(Mt(Oe,Ee))break;K-=Le>=65536?2:1,Ee=Oe}return $-K}const ae=/(?:[\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 x(T){return ae.test(T)}const A=/(?:[\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 N(T){return A.test(T)}const de=/^[\t\n\r\x20-\x7E]*$/;function We(T){return de.test(T)}const qe=/[\u2028\u2029]/;function Ge(T){return qe.test(T)}function ot(T){for(let K=0,te=T.length;K<te;K++)if(Dt(T.charCodeAt(K)))return!0;return!1}function Dt(T){return T=+T,T>=11904&&T<=55215||T>=63744&&T<=64255||T>=65281&&T<=65374}function at(T){return T>=127462&&T<=127487||T===8986||T===8987||T===9200||T===9203||T>=9728&&T<=10175||T===11088||T===11093||T>=127744&&T<=128591||T>=128640&&T<=128764||T>=128992&&T<=129003||T>=129280&&T<=129535||T>=129648&&T<=129750}const it="\uFEFF";function Lt(T){return!!(T&&T.length>0&&T.charCodeAt(0)===65279)}function jt(T,K=!1){return T?(K&&(T=T.replace(/\\./g,"")),T.toLowerCase()!==T):!1}function Xt(T){return T=T%(2*26),T<26?String.fromCharCode(97+T):String.fromCharCode(65+T-26)}function Vt(T){return Rt.getInstance().getGraphemeBreakType(T)}function Mt(T,K){return T===0?K!==5&&K!==7:T===2&&K===3?!1:T===4||T===2||T===3||K===4||K===2||K===3?!0:!(T===8&&(K===8||K===9||K===11||K===12)||(T===11||T===9)&&(K===9||K===10)||(T===12||T===10)&&K===10||K===5||K===13||K===7||T===1||T===13&&K===14||T===6&&K===6)}class Rt{constructor(){this._data=Me()}static getInstance(){return Rt._INSTANCE||(Rt._INSTANCE=new Rt),Rt._INSTANCE}getGraphemeBreakType(K){if(K<32)return K===10?3:K===13?2:4;if(K<127)return 0;const te=this._data,$=te.length/3;let W=1;for(;W<=$;)if(K<te[3*W])W=2*W;else if(K>te[3*W+1])W=2*W+1;else return te[3*W+2];return 0}}Rt._INSTANCE=null;function Me(){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 Qe(T,K){if(T===0)return 0;const te=se(T,K);if(te!==void 0)return te;const $=Z(K,T);return T-=Pe($),T}function se(T,K){let te=Z(K,T);for(T-=Pe(te);Re(te)||te===65039||te===8419;){if(T===0)return;te=Z(K,T),T-=Pe(te)}if(at(te)){if(T>=0){const $=Z(K,T);$===8205&&(T-=Pe($))}return T}}function Pe(T){return T>=65536?2:1}function Re(T){return 127995<=T&&T<=127999}},72999:function(Nt,ut,ie){"use strict";ie.d(ut,{$E:function(){return y},$K:function(){return Fe},D8:function(){return S},HD:function(){return Ae},IU:function(){return G},Jp:function(){return Te},Kn:function(){return He},cW:function(){return Y},f6:function(){return X},hj:function(){return ke},jn:function(){return $e},kJ:function(){return V},mf:function(){return P},o8:function(){return ue},p_:function(){return l},vE:function(){return M}});function V(O){return Array.isArray(O)}function Ae(O){return typeof O=="string"}function He(O){return typeof O=="object"&&O!==null&&!Array.isArray(O)&&!(O instanceof RegExp)&&!(O instanceof Date)}function ke(O){return typeof O=="number"&&!isNaN(O)}function $e(O){return O===!0||O===!1}function ue(O){return typeof O=="undefined"}function Fe(O){return!Te(O)}function Te(O){return ue(O)||O===null}function l(O,Q){if(!O)throw new Error(Q?`Unexpected type, expected '${Q}'`:"Unexpected type")}function Y(O){if(Te(O))throw new Error("Assertion Failed: argument is undefined or null");return O}function P(O){return typeof O=="function"}function S(O,Q){const he=Math.min(O.length,Q.length);for(let R=0;R<he;R++)d(O[R],Q[R])}function d(O,Q){if(Ae(Q)){if(typeof O!==Q)throw new Error(`argument does not match constraint: typeof ${Q}`)}else if(P(Q)){try{if(O instanceof Q)return}catch(he){}if(!Te(O)&&O.constructor===Q||Q.length===1&&Q.call(void 0,O)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function w(O){let Q=[],he=Object.getPrototypeOf(O);for(;Object.prototype!==he;)Q=Q.concat(Object.getOwnPropertyNames(he)),he=Object.getPrototypeOf(he);return Q}function y(O){const Q=[];for(const he of w(O))typeof O[he]=="function"&&Q.push(he);return Q}function G(O,Q){const he=ve=>function(){const Ce=Array.prototype.slice.call(arguments,0);return Q(ve,Ce)};let R={};for(const ve of O)R[ve]=he(ve);return R}function X(O){return O===null?void 0:O}function M(O,Q="Unreachable"){throw new Error(Q)}},13268:function(Nt,ut,ie){"use strict";ie.d(ut,{N:function(){return Ae}});function V(He,ke){let $e;return ke.length===0?$e=He:$e=He.replace(/\{(\d+)\}/g,function(ue,Fe){const Te=Fe[0];return typeof ke[Te]!="undefined"?ke[Te]:ue}),$e}function Ae(He,ke,...$e){return V(ke,$e)}},96236:function(Nt,ut,ie){"use strict";ie.d(ut,{BH:function(){return G},NZ:function(){return X},U8:function(){return M},co:function(){return y},eH:function(){return w},vr:function(){return d}});var V=ie(75918),Ae=ie(52615),He=ie(4348),ke=ie(88226),$e=ie(69323),ue=ie(34502),Fe=ie(35884),Te=ie(90689),l=ie(16925),Y=ie(49055),P=function(O,Q,he,R){var ve=arguments.length,Ce=ve<3?Q:R===null?R=Object.getOwnPropertyDescriptor(Q,he):R,ge;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Ce=Reflect.decorate(O,Q,he,R);else for(var be=O.length-1;be>=0;be--)(ge=O[be])&&(Ce=(ve<3?ge(Ce):ve>3?ge(Q,he,Ce):ge(Q,he))||Ce);return ve>3&&Ce&&Object.defineProperty(Q,he,Ce),Ce},S=function(O,Q){return function(he,R){Q(he,R,O)}};function d(O){return O.command!==void 0}class w{constructor(Q){this.id=w._idPool++,this._debugName=Q}}w._idPool=0,w.CommandPalette=new w("CommandPalette"),w.EditorContext=new w("EditorContext"),w.SimpleEditorContext=new w("SimpleEditorContext"),w.EditorContextCopy=new w("EditorContextCopy"),w.EditorContextPeek=new w("EditorContextPeek"),w.MenubarEditMenu=new w("MenubarEditMenu"),w.MenubarCopy=new w("MenubarCopy"),w.MenubarGoMenu=new w("MenubarGoMenu"),w.MenubarSelectionMenu=new w("MenubarSelectionMenu"),w.InlineCompletionsActions=new w("InlineCompletionsActions");const y=(0,l.yh)("menuService"),G=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new He.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:O=>O===w.CommandPalette}}addCommand(O){return this.addCommands(ke.$.single(O))}addCommands(O){for(const Q of O)this._commands.set(Q.id,Q);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,$e.OF)(()=>{let Q=!1;for(const he of O)Q=this._commands.delete(he.id)||Q;Q&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(O){return this._commands.get(O)}getCommands(){const O=new Map;return this._commands.forEach((Q,he)=>O.set(he,Q)),O}appendMenuItem(O,Q){return this.appendMenuItems(ke.$.single({id:O,item:Q}))}appendMenuItems(O){const Q=new Set,he=new ue.S;for(const{id:R,item:ve}of O){let Ce=this._menuItems.get(R);Ce||(Ce=new ue.S,this._menuItems.set(R,Ce)),he.push(Ce.push(ve)),Q.add(R)}return this._onDidChangeMenu.fire(Q),(0,$e.OF)(()=>{if(he.size>0){for(let R of he)R();this._onDidChangeMenu.fire(Q),he.clear()}})}getMenuItems(O){let Q;return this._menuItems.has(O)?Q=[...this._menuItems.get(O)]:Q=[],O===w.CommandPalette&&this._appendImplicitItems(Q),Q}_appendImplicitItems(O){const Q=new Set;for(const he of O)d(he)&&(Q.add(he.command.id),he.alt&&Q.add(he.alt.id));this._commands.forEach((he,R)=>{Q.has(R)||O.push({command:he})})}};class X extends V.wY{constructor(Q,he,R,ve){super(`submenuitem.${Q.submenu.id}`,typeof Q.title=="string"?Q.title:Q.title.value,[],"submenu"),this.item=Q,this._menuService=he,this._contextKeyService=R,this._options=ve}get actions(){const Q=[],he=this._menuService.createMenu(this.item.submenu,this._contextKeyService),R=he.getActions(this._options);he.dispose();for(const[,ve]of R)ve.length>0&&(Q.push(...ve),Q.push(new V.Z0));return Q.length&&Q.pop(),Q}}let M=class Xo{constructor(Q,he,R,ve,Ce){var ge,be;if(this._commandService=Ce,this.id=Q.id,this.label=R!=null&&R.renderShortTitle&&Q.shortTitle?typeof Q.shortTitle=="string"?Q.shortTitle:Q.shortTitle.value:typeof Q.title=="string"?Q.title:Q.title.value,this.tooltip=(be=typeof Q.tooltip=="string"?Q.tooltip:(ge=Q.tooltip)===null||ge===void 0?void 0:ge.value)!==null&&be!==void 0?be:"",this.enabled=!Q.precondition||ve.contextMatchesRules(Q.precondition),this.checked=void 0,Q.toggled){const Ne=Q.toggled.condition?Q.toggled:{condition:Q.toggled};this.checked=ve.contextMatchesRules(Ne.condition),this.checked&&Ne.tooltip&&(this.tooltip=typeof Ne.tooltip=="string"?Ne.tooltip:Ne.tooltip.value),Ne.title&&(this.label=typeof Ne.title=="string"?Ne.title:Ne.title.value)}this.item=Q,this.alt=he?new Xo(he,void 0,R,ve,Ce):void 0,this._options=R,Y.kS.isThemeIcon(Q.icon)&&(this.class=Ae.dT.asClassName(Q.icon))}dispose(){}run(...Q){var he,R;let ve=[];return!((he=this._options)===null||he===void 0)&&he.arg&&(ve=[...ve,this._options.arg]),!((R=this._options)===null||R===void 0)&&R.shouldForwardArgs&&(ve=[...ve,...Q]),this._commandService.executeCommand(this.id,...ve)}};M=P([S(3,Te.i6),S(4,Fe.H)],M)},35884:function(Nt,ut,ie){"use strict";ie.d(ut,{H:function(){return Fe},P:function(){return Te}});var V=ie(4348),Ae=ie(88226),He=ie(69323),ke=ie(34502),$e=ie(72999),ue=ie(16925);const Fe=(0,ue.yh)("commandService"),Te=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new V.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(l,Y){if(!l)throw new Error("invalid command");if(typeof l=="string"){if(!Y)throw new Error("invalid command");return this.registerCommand({id:l,handler:Y})}if(l.description){const y=[];for(let X of l.description.args)y.push(X.constraint);const G=l.handler;l.handler=function(X,...M){return(0,$e.D8)(M,y),G(X,...M)}}const{id:P}=l;let S=this._commands.get(P);S||(S=new ke.S,this._commands.set(P,S));let d=S.unshift(l),w=(0,He.OF)(()=>{d();const y=this._commands.get(P);y!=null&&y.isEmpty()&&this._commands.delete(P)});return this._onDidRegisterCommand.fire(P),w}registerCommandAlias(l,Y){return Te.registerCommand(l,(P,...S)=>P.get(Fe).executeCommand(Y,...S))}getCommand(l){const Y=this._commands.get(l);if(!(!Y||Y.isEmpty()))return Ae.$.first(Y)}getCommands(){const l=new Map;for(const Y of this._commands.keys()){const P=this.getCommand(Y);P&&l.set(Y,P)}return l}};Te.registerCommand("noop",()=>{})},90689:function(Nt,ut,ie){"use strict";ie.d(ut,{Ao:function(){return Fe},Eq:function(){return H},Fb:function(){return Te},K8:function(){return ee},i6:function(){return je},uy:function(){return Ie}});var V=ie(23345),Ae=ie(82983),He=ie(16925);let ke=V.WE||"";const $e=new Map;$e.set("false",!1),$e.set("true",!0),$e.set("isMac",V.dz),$e.set("isLinux",V.IJ),$e.set("isWindows",V.ED),$e.set("isWeb",V.$L),$e.set("isMacNative",V.dz&&!V.$L),$e.set("isEdge",ke.indexOf("Edg/")>=0),$e.set("isFirefox",ke.indexOf("Firefox")>=0),$e.set("isChrome",ke.indexOf("Chrome")>=0),$e.set("isSafari",ke.indexOf("Safari")>=0);const ue=Object.prototype.hasOwnProperty;class Fe{static has(x){return S.create(x)}static equals(x,A){return d.create(x,A)}static regex(x,A){return ve.create(x,A)}static not(x){return X.create(x)}static and(...x){return be.create(x,null)}static or(...x){return Ne.create(x,null,!0)}static deserialize(x,A=!1){if(x)return this._deserializeOrExpression(x,A)}static _deserializeOrExpression(x,A){let N=x.split("||");return Ne.create(N.map(de=>this._deserializeAndExpression(de,A)),null,!0)}static _deserializeAndExpression(x,A){let N=x.split("&&");return be.create(N.map(de=>this._deserializeOne(de,A)),null)}static _deserializeOne(x,A){if(x=x.trim(),x.indexOf("!=")>=0){let N=x.split("!=");return G.create(N[0].trim(),this._deserializeValue(N[1],A))}if(x.indexOf("==")>=0){let N=x.split("==");return d.create(N[0].trim(),this._deserializeValue(N[1],A))}if(x.indexOf("=~")>=0){let N=x.split("=~");return ve.create(N[0].trim(),this._deserializeRegexValue(N[1],A))}if(x.indexOf(" in ")>=0){let N=x.split(" in ");return w.create(N[0].trim(),N[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(x)){const N=x.split(">=");return Q.create(N[0].trim(),N[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(x)){const N=x.split(">");return O.create(N[0].trim(),N[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(x)){const N=x.split("<=");return R.create(N[0].trim(),N[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(x)){const N=x.split("<");return he.create(N[0].trim(),N[1].trim())}return/^\!\s*/.test(x)?X.create(x.substr(1).trim()):S.create(x)}static _deserializeValue(x,A){if(x=x.trim(),x==="true")return!0;if(x==="false")return!1;let N=/^'([^']*)'$/.exec(x);return N?N[1].trim():x}static _deserializeRegexValue(x,A){if((0,Ae.m5)(x)){if(A)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let N=x.indexOf("/"),de=x.lastIndexOf("/");if(N===de||N<0){if(A)throw new Error(`bad regexp-value '${x}', missing /-enclosure`);return console.warn(`bad regexp-value '${x}', missing /-enclosure`),null}let We=x.slice(N+1,de),qe=x[de+1]==="i"?"i":"";try{return new RegExp(We,qe)}catch(Ge){if(A)throw new Error(`bad regexp-value '${x}', parse error: ${Ge}`);return console.warn(`bad regexp-value '${x}', parse error: ${Ge}`),null}}}function Te(ae,x){const A=ae?ae.substituteConstants():void 0,N=x?x.substituteConstants():void 0;return!A&&!N?!0:!A||!N?!1:A.equals(N)}function l(ae,x){return ae.cmp(x)}class Y{constructor(){this.type=0}cmp(x){return this.type-x.type}equals(x){return x.type===this.type}substituteConstants(){return this}evaluate(x){return!1}serialize(){return"false"}keys(){return[]}negate(){return P.INSTANCE}}Y.INSTANCE=new Y;class P{constructor(){this.type=1}cmp(x){return this.type-x.type}equals(x){return x.type===this.type}substituteConstants(){return this}evaluate(x){return!0}serialize(){return"true"}keys(){return[]}negate(){return Y.INSTANCE}}P.INSTANCE=new P;class S{constructor(x,A){this.key=x,this.negated=A,this.type=2}static create(x,A=null){const N=$e.get(x);return typeof N=="boolean"?N?P.INSTANCE:Y.INSTANCE:new S(x,A)}cmp(x){return x.type!==this.type?this.type-x.type:z(this.key,x.key)}equals(x){return x.type===this.type?this.key===x.key:!1}substituteConstants(){const x=$e.get(this.key);return typeof x=="boolean"?x?P.INSTANCE:Y.INSTANCE:this}evaluate(x){return!!x.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=X.create(this.key,this)),this.negated}}class d{constructor(x,A,N){this.key=x,this.value=A,this.negated=N,this.type=4}static create(x,A,N=null){if(typeof A=="boolean")return A?S.create(x,N):X.create(x,N);const de=$e.get(x);return typeof de=="boolean"?A===(de?"true":"false")?P.INSTANCE:Y.INSTANCE:new d(x,A,N)}cmp(x){return x.type!==this.type?this.type-x.type:Z(this.key,this.value,x.key,x.value)}equals(x){return x.type===this.type?this.key===x.key&&this.value===x.value:!1}substituteConstants(){const x=$e.get(this.key);if(typeof x=="boolean"){const A=x?"true":"false";return this.value===A?P.INSTANCE:Y.INSTANCE}return this}evaluate(x){return x.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 w{constructor(x,A){this.key=x,this.valueKey=A,this.type=10,this.negated=null}static create(x,A){return new w(x,A)}cmp(x){return x.type!==this.type?this.type-x.type:Z(this.key,this.valueKey,x.key,x.valueKey)}equals(x){return x.type===this.type?this.key===x.key&&this.valueKey===x.valueKey:!1}substituteConstants(){return this}evaluate(x){const A=x.getValue(this.valueKey),N=x.getValue(this.key);return Array.isArray(A)?A.indexOf(N)>=0:typeof N=="string"&&typeof A=="object"&&A!==null?ue.call(A,N):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=y.create(this)),this.negated}}class y{constructor(x){this._actual=x,this.type=11}static create(x){return new y(x)}cmp(x){return x.type!==this.type?this.type-x.type:this._actual.cmp(x._actual)}equals(x){return x.type===this.type?this._actual.equals(x._actual):!1}substituteConstants(){return this}evaluate(x){return!this._actual.evaluate(x)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class G{constructor(x,A,N){this.key=x,this.value=A,this.negated=N,this.type=5}static create(x,A,N=null){if(typeof A=="boolean")return A?X.create(x,N):S.create(x,N);const de=$e.get(x);return typeof de=="boolean"?A===(de?"true":"false")?Y.INSTANCE:P.INSTANCE:new G(x,A,N)}cmp(x){return x.type!==this.type?this.type-x.type:Z(this.key,this.value,x.key,x.value)}equals(x){return x.type===this.type?this.key===x.key&&this.value===x.value:!1}substituteConstants(){const x=$e.get(this.key);if(typeof x=="boolean"){const A=x?"true":"false";return this.value===A?Y.INSTANCE:P.INSTANCE}return this}evaluate(x){return x.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=d.create(this.key,this.value,this)),this.negated}}class X{constructor(x,A){this.key=x,this.negated=A,this.type=3}static create(x,A=null){const N=$e.get(x);return typeof N=="boolean"?N?Y.INSTANCE:P.INSTANCE:new X(x,A)}cmp(x){return x.type!==this.type?this.type-x.type:z(this.key,x.key)}equals(x){return x.type===this.type?this.key===x.key:!1}substituteConstants(){const x=$e.get(this.key);return typeof x=="boolean"?x?Y.INSTANCE:P.INSTANCE:this}evaluate(x){return!x.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=S.create(this.key,this)),this.negated}}function M(ae,x){if(typeof ae=="string"){const A=parseFloat(ae);isNaN(A)||(ae=A)}return typeof ae=="string"||typeof ae=="number"?x(ae):Y.INSTANCE}class O{constructor(x,A,N){this.key=x,this.value=A,this.negated=N,this.type=12}static create(x,A,N=null){return M(A,de=>new O(x,de,N))}cmp(x){return x.type!==this.type?this.type-x.type:Z(this.key,this.value,x.key,x.value)}equals(x){return x.type===this.type?this.key===x.key&&this.value===x.value:!1}substituteConstants(){return this}evaluate(x){return typeof this.value=="string"?!1:parseFloat(x.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 Q{constructor(x,A,N){this.key=x,this.value=A,this.negated=N,this.type=13}static create(x,A,N=null){return M(A,de=>new Q(x,de,N))}cmp(x){return x.type!==this.type?this.type-x.type:Z(this.key,this.value,x.key,x.value)}equals(x){return x.type===this.type?this.key===x.key&&this.value===x.value:!1}substituteConstants(){return this}evaluate(x){return typeof this.value=="string"?!1:parseFloat(x.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=he.create(this.key,this.value,this)),this.negated}}class he{constructor(x,A,N){this.key=x,this.value=A,this.negated=N,this.type=14}static create(x,A,N=null){return M(A,de=>new he(x,de,N))}cmp(x){return x.type!==this.type?this.type-x.type:Z(this.key,this.value,x.key,x.value)}equals(x){return x.type===this.type?this.key===x.key&&this.value===x.value:!1}substituteConstants(){return this}evaluate(x){return typeof this.value=="string"?!1:parseFloat(x.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Q.create(this.key,this.value,this)),this.negated}}class R{constructor(x,A,N){this.key=x,this.value=A,this.negated=N,this.type=15}static create(x,A,N=null){return M(A,de=>new R(x,de,N))}cmp(x){return x.type!==this.type?this.type-x.type:Z(this.key,this.value,x.key,x.value)}equals(x){return x.type===this.type?this.key===x.key&&this.value===x.value:!1}substituteConstants(){return this}evaluate(x){return typeof this.value=="string"?!1:parseFloat(x.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=O.create(this.key,this.value,this)),this.negated}}class ve{constructor(x,A){this.key=x,this.regexp=A,this.type=7,this.negated=null}static create(x,A){return new ve(x,A)}cmp(x){if(x.type!==this.type)return this.type-x.type;if(this.key<x.key)return-1;if(this.key>x.key)return 1;const A=this.regexp?this.regexp.source:"",N=x.regexp?x.regexp.source:"";return A<N?-1:A>N?1:0}equals(x){if(x.type===this.type){const A=this.regexp?this.regexp.source:"",N=x.regexp?x.regexp.source:"";return this.key===x.key&&A===N}return!1}substituteConstants(){return this}evaluate(x){let A=x.getValue(this.key);return this.regexp?this.regexp.test(A):!1}serialize(){const x=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${x}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Ce.create(this)),this.negated}}class Ce{constructor(x){this._actual=x,this.type=8}static create(x){return new Ce(x)}cmp(x){return x.type!==this.type?this.type-x.type:this._actual.cmp(x._actual)}equals(x){return x.type===this.type?this._actual.equals(x._actual):!1}substituteConstants(){return this}evaluate(x){return!this._actual.evaluate(x)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function ge(ae){let x=null;for(let A=0,N=ae.length;A<N;A++){const de=ae[A].substituteConstants();if(ae[A]!==de&&x===null){x=[];for(let We=0;We<A;We++)x[We]=ae[We]}x!==null&&(x[A]=de)}return x===null?ae:x}class be{constructor(x,A){this.expr=x,this.negated=A,this.type=6}static create(x,A){return be._normalizeArr(x,A)}cmp(x){if(x.type!==this.type)return this.type-x.type;if(this.expr.length<x.expr.length)return-1;if(this.expr.length>x.expr.length)return 1;for(let A=0,N=this.expr.length;A<N;A++){const de=l(this.expr[A],x.expr[A]);if(de!==0)return de}return 0}equals(x){if(x.type===this.type){if(this.expr.length!==x.expr.length)return!1;for(let A=0,N=this.expr.length;A<N;A++)if(!this.expr[A].equals(x.expr[A]))return!1;return!0}return!1}substituteConstants(){const x=ge(this.expr);return x===this.expr?this:be.create(x,this.negated)}evaluate(x){for(let A=0,N=this.expr.length;A<N;A++)if(!this.expr[A].evaluate(x))return!1;return!0}static _normalizeArr(x,A){const N=[];let de=!1;for(const We of x)if(We){if(We.type===1){de=!0;continue}if(We.type===0)return Y.INSTANCE;if(We.type===6){N.push(...We.expr);continue}N.push(We)}if(N.length===0&&de)return P.INSTANCE;if(N.length!==0){if(N.length===1)return N[0];N.sort(l);for(let We=1;We<N.length;We++)N[We-1].equals(N[We])&&(N.splice(We,1),We--);if(N.length===1)return N[0];for(;N.length>1;){const We=N[N.length-1];if(We.type!==9)break;N.pop();const qe=N.pop(),Ge=N.length===0,ot=Ne.create(We.expr.map(Dt=>be.create([Dt,qe],null)),null,Ge);ot&&(N.push(ot),N.sort(l))}return N.length===1?N[0]:new be(N,A)}}serialize(){return this.expr.map(x=>x.serialize()).join(" && ")}keys(){const x=[];for(let A of this.expr)x.push(...A.keys());return x}negate(){if(!this.negated){const x=[];for(let A of this.expr)x.push(A.negate());this.negated=Ne.create(x,this,!0)}return this.negated}}class Ne{constructor(x,A){this.expr=x,this.negated=A,this.type=9}static create(x,A,N){return Ne._normalizeArr(x,A,N)}cmp(x){if(x.type!==this.type)return this.type-x.type;if(this.expr.length<x.expr.length)return-1;if(this.expr.length>x.expr.length)return 1;for(let A=0,N=this.expr.length;A<N;A++){const de=l(this.expr[A],x.expr[A]);if(de!==0)return de}return 0}equals(x){if(x.type===this.type){if(this.expr.length!==x.expr.length)return!1;for(let A=0,N=this.expr.length;A<N;A++)if(!this.expr[A].equals(x.expr[A]))return!1;return!0}return!1}substituteConstants(){const x=ge(this.expr);return x===this.expr?this:Ne.create(x,this.negated,!1)}evaluate(x){for(let A=0,N=this.expr.length;A<N;A++)if(this.expr[A].evaluate(x))return!0;return!1}static _normalizeArr(x,A,N){let de=[],We=!1;if(x){for(let qe=0,Ge=x.length;qe<Ge;qe++){const ot=x[qe];if(ot){if(ot.type===0){We=!0;continue}if(ot.type===1)return P.INSTANCE;if(ot.type===9){de=de.concat(ot.expr);continue}de.push(ot)}}if(de.length===0&&We)return Y.INSTANCE;de.sort(l)}if(de.length!==0){if(de.length===1)return de[0];for(let qe=1;qe<de.length;qe++)de[qe-1].equals(de[qe])&&(de.splice(qe,1),qe--);if(de.length===1)return de[0];if(N){for(let qe=0;qe<de.length;qe++)for(let Ge=qe+1;Ge<de.length;Ge++)ee(de[qe],de[Ge])&&(de.splice(Ge,1),Ge--);if(de.length===1)return de[0]}return new Ne(de,A)}}serialize(){return this.expr.map(x=>x.serialize()).join(" || ")}keys(){const x=[];for(let A of this.expr)x.push(...A.keys());return x}negate(){if(!this.negated){let x=[];for(let A of this.expr)x.push(A.negate());for(;x.length>1;){const A=x.shift(),N=x.shift(),de=[];for(const qe of me(A))for(const Ge of me(N))de.push(be.create([qe,Ge],null));const We=x.length===0;x.unshift(Ne.create(de,null,We))}this.negated=x[0]}return this.negated}}class Ie extends S{constructor(x,A,N){super(x,null),this._defaultValue=A,typeof N=="object"?Ie._info.push(Object.assign(Object.assign({},N),{key:x})):N!==!0&&Ie._info.push({key:x,description:N,type:A!=null?typeof A:void 0})}static all(){return Ie._info.values()}bindTo(x){return x.createKey(this.key,this._defaultValue)}getValue(x){return x.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(x){return d.create(this.key,x)}}Ie._info=[];const je=(0,He.yh)("contextKeyService"),H="setContext";function z(ae,x){return ae<x?-1:ae>x?1:0}function Z(ae,x,A,N){return ae<A?-1:ae>A?1:x<N?-1:x>N?1:0}function ee(ae,x){if(x.type===6&&ae.type!==9&&ae.type!==6){for(const de of x.expr)if(ae.equals(de))return!0}const A=ae.negate(),N=me(A).concat(me(x));N.sort(l);for(let de=0;de<N.length;de++){const qe=N[de].negate();for(let Ge=de+1;Ge<N.length;Ge++){const ot=N[Ge];if(qe.equals(ot))return!0}}return!1}function me(ae){return ae.type===9?ae.expr:[ae]}},16925:function(Nt,ut,ie){"use strict";ie.d(ut,{I8:function(){return V},TG:function(){return Ae},jt:function(){return $e},yh:function(){return ke}});var V;(function(ue){ue.serviceIds=new Map,ue.DI_TARGET="$di$target",ue.DI_DEPENDENCIES="$di$dependencies";function Fe(Te){return Te[ue.DI_DEPENDENCIES]||[]}ue.getServiceDependencies=Fe})(V||(V={}));const Ae=ke("instantiationService");function He(ue,Fe,Te,l){Fe[V.DI_TARGET]===Fe?Fe[V.DI_DEPENDENCIES].push({id:ue,index:Te,optional:l}):(Fe[V.DI_DEPENDENCIES]=[{id:ue,index:Te,optional:l}],Fe[V.DI_TARGET]=Fe)}function ke(ue){if(V.serviceIds.has(ue))return V.serviceIds.get(ue);const Fe=function(Te,l,Y){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");He(Fe,Te,Y,!1)};return Fe.toString=()=>ue,V.serviceIds.set(ue,Fe),Fe}function $e(ue){return function(Fe,Te,l){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");He(ue,Fe,l,!0)}}},44650:function(Nt,ut,ie){"use strict";ie.d(ut,{B:function(){return ke}});var V=ie(76068),Ae=ie(72999);class He{constructor(){this.data=new Map}add(ue,Fe){V.ok(Ae.HD(ue)),V.ok(Ae.Kn(Fe)),V.ok(!this.data.has(ue),"There is already an extension with this id"),this.data.set(ue,Fe)}as(ue){return this.data.get(ue)||null}}const ke=new He},66213:function(Nt,ut,ie){"use strict";ie.d(ut,{e:function(){return V}});var V;(function(Ae){Ae.DARK="dark",Ae.LIGHT="light",Ae.HIGH_CONTRAST="hc"})(V||(V={}))},49055:function(Nt,ut,ie){"use strict";ie.d(ut,{EN:function(){return l},IP:function(){return S},Ic:function(){return y},XE:function(){return Fe},bB:function(){return G},kS:function(){return Y},m6:function(){return P}});var V=ie(52615),Ae=ie(4348),He=ie(69323),ke=ie(16925),$e=ie(44650),ue=ie(66213);const Fe=(0,ke.yh)("themeService");var Te;(function(X){function M(O){return O&&typeof O=="object"&&typeof O.id=="string"}X.isThemeColor=M})(Te||(Te={}));function l(X){return{id:X}}var Y;(function(X){function M(Ce){return Ce&&typeof Ce=="object"&&typeof Ce.id=="string"&&(typeof Ce.color=="undefined"||Te.isThemeColor(Ce.color))}X.isThemeIcon=M;const O=new RegExp(`^\\$\\((${V.dT.iconNameExpression}(?:${V.dT.iconModifierExpression})?)\\)$`);function Q(Ce){const ge=O.exec(Ce);if(!ge)return;let[,be]=ge;return{id:be}}X.fromString=Q;function he(Ce,ge){let be=Ce.id;const Ne=be.lastIndexOf("~");return Ne!==-1&&(be=be.substring(0,Ne)),ge&&(be=`${be}~${ge}`),{id:be}}X.modify=he;function R(Ce,ge){var be,Ne;return Ce.id===ge.id&&((be=Ce.color)===null||be===void 0?void 0:be.id)===((Ne=ge.color)===null||Ne===void 0?void 0:Ne.id)}X.isEqual=R;function ve(Ce,ge){return{id:Ce.id,color:ge?l(ge):void 0}}X.asThemeIcon=ve,X.asClassNameArray=V.dT.asClassNameArray,X.asClassName=V.dT.asClassName,X.asCSSSelector=V.dT.asCSSSelector})(Y||(Y={}));function P(X){switch(X){case ue.e.DARK:return"vs-dark";case ue.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const S={ThemingContribution:"base.contributions.theming"};class d{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new Ae.Q5}onColorThemeChange(M){return this.themingParticipants.push(M),this.onThemingParticipantAddedEmitter.fire(M),(0,He.OF)(()=>{const O=this.themingParticipants.indexOf(M);this.themingParticipants.splice(O,1)})}getThemingParticipants(){return this.themingParticipants}}let w=new d;$e.B.add(S.ThemingContribution,w);function y(X){return w.onColorThemeChange(X)}class G extends He.JT{constructor(M){super(),this.themeService=M,this.theme=M.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(O=>this.onThemeChange(O)))}onThemeChange(M){this.theme=M,this.updateStyles()}updateStyles(){}}},5630:function(Nt,ut,ie){"use strict";var V=ie(72308),Ae=ie(77321),He=ie(49618),ke=ie(52487),$e=ie(74416),ue=ie(92310),Fe=ie.n(ue),Te=ie(18929),l=ie(59301),Y=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],P=(0,l.forwardRef)(function(S,d){var w,y=S.prefixCls,G=y===void 0?"rc-checkbox":y,X=S.className,M=S.style,O=S.checked,Q=S.disabled,he=S.defaultChecked,R=he===void 0?!1:he,ve=S.type,Ce=ve===void 0?"checkbox":ve,ge=S.title,be=S.onChange,Ne=(0,$e.Z)(S,Y),Ie=(0,l.useRef)(null),je=(0,Te.Z)(R,{value:O}),H=(0,ke.Z)(je,2),z=H[0],Z=H[1];(0,l.useImperativeHandle)(d,function(){return{focus:function(){var x;(x=Ie.current)===null||x===void 0||x.focus()},blur:function(){var x;(x=Ie.current)===null||x===void 0||x.blur()},input:Ie.current}});var ee=Fe()(G,X,(w={},(0,He.Z)(w,"".concat(G,"-checked"),z),(0,He.Z)(w,"".concat(G,"-disabled"),Q),w)),me=function(x){Q||("checked"in S||Z(x.target.checked),be==null||be({target:(0,Ae.Z)((0,Ae.Z)({},S),{},{type:Ce,checked:x.target.checked}),stopPropagation:function(){x.stopPropagation()},preventDefault:function(){x.preventDefault()},nativeEvent:x.nativeEvent}))};return l.createElement("span",{className:ee,title:ge,style:M},l.createElement("input",(0,V.Z)({},Ne,{className:"".concat(G,"-input"),ref:Ie,onChange:me,disabled:Q,checked:!!z,type:Ce})),l.createElement("span",{className:"".concat(G,"-inner")}))});ut.Z=P},29301:function(Nt,ut,ie){"use strict";ie.d(ut,{Z:function(){return H}});var V=ie(72308),Ae=ie(59301),He=ie(11592),ke=ie(48736),$e=ie(77321),ue=ie(62853),Fe=ie(76846),Te=ie(8654),l=Ae.createContext(null);function Y(z){var Z=z.children,ee=z.onBatchResize,me=Ae.useRef(0),ae=Ae.useRef([]),x=Ae.useContext(l),A=Ae.useCallback(function(N,de,We){me.current+=1;var qe=me.current;ae.current.push({size:N,element:de,data:We}),Promise.resolve().then(function(){qe===me.current&&(ee==null||ee(ae.current),ae.current=[])}),x==null||x(N,de,We)},[ee,x]);return Ae.createElement(l.Provider,{value:A},Z)}var P=ie(76374),S=new Map;function d(z){z.forEach(function(Z){var ee,me=Z.target;(ee=S.get(me))===null||ee===void 0||ee.forEach(function(ae){return ae(me)})})}var w=new P.Z(d),y=null,G=null;function X(z,Z){S.has(z)||(S.set(z,new Set),w.observe(z)),S.get(z).add(Z)}function M(z,Z){S.has(z)&&(S.get(z).delete(Z),S.get(z).size||(w.unobserve(z),S.delete(z)))}var O=ie(96949),Q=ie(55090),he=ie(77205),R=ie(38793),ve=function(z){(0,he.Z)(ee,z);var Z=(0,R.Z)(ee);function ee(){return(0,O.Z)(this,ee),Z.apply(this,arguments)}return(0,Q.Z)(ee,[{key:"render",value:function(){return this.props.children}}]),ee}(Ae.Component);function Ce(z,Z){var ee=z.children,me=z.disabled,ae=Ae.useRef(null),x=Ae.useRef(null),A=Ae.useContext(l),N=typeof ee=="function",de=N?ee(ae):ee,We=Ae.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),qe=!N&&Ae.isValidElement(de)&&(0,Te.Yr)(de),Ge=qe?(0,Te.C4)(de):null,ot=(0,Te.x1)(Ge,ae),Dt=function(){var jt;return(0,Fe.ZP)(ae.current)||(ae.current&&(0,ue.Z)(ae.current)==="object"?(0,Fe.ZP)((jt=ae.current)===null||jt===void 0?void 0:jt.nativeElement):null)||(0,Fe.ZP)(x.current)};Ae.useImperativeHandle(Z,function(){return Dt()});var at=Ae.useRef(z);at.current=z;var it=Ae.useCallback(function(Lt){var jt=at.current,Xt=jt.onResize,Vt=jt.data,Mt=Lt.getBoundingClientRect(),Rt=Mt.width,Me=Mt.height,Qe=Lt.offsetWidth,se=Lt.offsetHeight,Pe=Math.floor(Rt),Re=Math.floor(Me);if(We.current.width!==Pe||We.current.height!==Re||We.current.offsetWidth!==Qe||We.current.offsetHeight!==se){var T={width:Pe,height:Re,offsetWidth:Qe,offsetHeight:se};We.current=T;var K=Qe===Math.round(Rt)?Rt:Qe,te=se===Math.round(Me)?Me:se,$=(0,$e.Z)((0,$e.Z)({},T),{},{offsetWidth:K,offsetHeight:te});A==null||A($,Lt,Vt),Xt&&Promise.resolve().then(function(){Xt($,Lt)})}},[]);return Ae.useEffect(function(){var Lt=Dt();return Lt&&!me&&X(Lt,it),function(){return M(Lt,it)}},[ae.current,me]),Ae.createElement(ve,{ref:x},qe?Ae.cloneElement(de,{ref:ot}):de)}var ge=Ae.forwardRef(Ce),be=ge,Ne="rc-observer-key";function Ie(z,Z){var ee=z.children,me=typeof ee=="function"?[ee]:(0,He.Z)(ee);return me.map(function(ae,x){var A=(ae==null?void 0:ae.key)||"".concat(Ne,"-").concat(x);return Ae.createElement(be,(0,V.Z)({},z,{key:A,ref:x===0?Z:void 0}),ae)})}var je=Ae.forwardRef(Ie);je.Collection=Y;var H=je},55477:function(Nt,ut,ie){"use strict";ie.d(ut,{G:function(){return d},Z:function(){return X}});var V=ie(72308),Ae=ie(77321),He=ie(74416),ke=ie(35593),$e=ie(59301),ue={shiftX:64,adjustY:1},Fe={adjustX:1,shiftY:!0},Te=[0,0],l={left:{points:["cr","cl"],overflow:Fe,offset:[-4,0],targetOffset:Te},right:{points:["cl","cr"],overflow:Fe,offset:[4,0],targetOffset:Te},top:{points:["bc","tc"],overflow:ue,offset:[0,-4],targetOffset:Te},bottom:{points:["tc","bc"],overflow:ue,offset:[0,4],targetOffset:Te},topLeft:{points:["bl","tl"],overflow:ue,offset:[0,-4],targetOffset:Te},leftTop:{points:["tr","tl"],overflow:Fe,offset:[-4,0],targetOffset:Te},topRight:{points:["br","tr"],overflow:ue,offset:[0,-4],targetOffset:Te},rightTop:{points:["tl","tr"],overflow:Fe,offset:[4,0],targetOffset:Te},bottomRight:{points:["tr","br"],overflow:ue,offset:[0,4],targetOffset:Te},rightBottom:{points:["bl","br"],overflow:Fe,offset:[4,0],targetOffset:Te},bottomLeft:{points:["tl","bl"],overflow:ue,offset:[0,4],targetOffset:Te},leftBottom:{points:["br","bl"],overflow:Fe,offset:[-4,0],targetOffset:Te}},Y=null,P=ie(92310),S=ie.n(P);function d(M){var O=M.children,Q=M.prefixCls,he=M.id,R=M.overlayInnerStyle,ve=M.className,Ce=M.style;return $e.createElement("div",{className:S()("".concat(Q,"-content"),ve),style:Ce},$e.createElement("div",{className:"".concat(Q,"-inner"),id:he,role:"tooltip",style:R},typeof O=="function"?O():O))}var w=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"],y=function(O,Q){var he=O.overlayClassName,R=O.trigger,ve=R===void 0?["hover"]:R,Ce=O.mouseEnterDelay,ge=Ce===void 0?0:Ce,be=O.mouseLeaveDelay,Ne=be===void 0?.1:be,Ie=O.overlayStyle,je=O.prefixCls,H=je===void 0?"rc-tooltip":je,z=O.children,Z=O.onVisibleChange,ee=O.afterVisibleChange,me=O.transitionName,ae=O.animation,x=O.motion,A=O.placement,N=A===void 0?"right":A,de=O.align,We=de===void 0?{}:de,qe=O.destroyTooltipOnHide,Ge=qe===void 0?!1:qe,ot=O.defaultVisible,Dt=O.getTooltipContainer,at=O.overlayInnerStyle,it=O.arrowContent,Lt=O.overlay,jt=O.id,Xt=O.showArrow,Vt=Xt===void 0?!0:Xt,Mt=(0,He.Z)(O,w),Rt=(0,$e.useRef)(null);(0,$e.useImperativeHandle)(Q,function(){return Rt.current});var Me=(0,Ae.Z)({},Mt);"visible"in O&&(Me.popupVisible=O.visible);var Qe=function(){return $e.createElement(d,{key:"content",prefixCls:H,id:jt,overlayInnerStyle:at},Lt)};return $e.createElement(ke.Z,(0,V.Z)({popupClassName:he,prefixCls:H,popup:Qe,action:ve,builtinPlacements:l,popupPlacement:N,ref:Rt,popupAlign:We,getPopupContainer:Dt,onPopupVisibleChange:Z,afterPopupVisibleChange:ee,popupTransitionName:me,popupAnimation:ae,popupMotion:x,defaultPopupVisible:ot,autoDestroy:Ge,mouseLeaveDelay:Ne,popupStyle:Ie,mouseEnterDelay:ge,arrow:Vt},Me),z)},G=(0,$e.forwardRef)(y),X=G},49658:function(Nt,ut){"use strict";ut.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var ie=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(ie)||/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(ie==null?void 0:ie.substr(0,4))}},83145:function(Nt,ut,ie){"use strict";Object.defineProperty(ut,"__esModule",{value:!0}),ut.CopyToClipboard=void 0;var V=He(ie(59301)),Ae=He(ie(25769));function He(O){return O&&O.__esModule?O:{default:O}}function ke(O){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ke=function(he){return typeof he}:ke=function(he){return he&&typeof Symbol=="function"&&he.constructor===Symbol&&he!==Symbol.prototype?"symbol":typeof he},ke(O)}function $e(O,Q){var he=Object.keys(O);if(Object.getOwnPropertySymbols){var R=Object.getOwnPropertySymbols(O);Q&&(R=R.filter(function(ve){return Object.getOwnPropertyDescriptor(O,ve).enumerable})),he.push.apply(he,R)}return he}function ue(O){for(var Q=1;Q<arguments.length;Q++){var he=arguments[Q]!=null?arguments[Q]:{};Q%2?$e(he,!0).forEach(function(R){X(O,R,he[R])}):Object.getOwnPropertyDescriptors?Object.defineProperties(O,Object.getOwnPropertyDescriptors(he)):$e(he).forEach(function(R){Object.defineProperty(O,R,Object.getOwnPropertyDescriptor(he,R))})}return O}function Fe(O,Q){if(O==null)return{};var he=Te(O,Q),R,ve;if(Object.getOwnPropertySymbols){var Ce=Object.getOwnPropertySymbols(O);for(ve=0;ve<Ce.length;ve++)R=Ce[ve],!(Q.indexOf(R)>=0)&&Object.prototype.propertyIsEnumerable.call(O,R)&&(he[R]=O[R])}return he}function Te(O,Q){if(O==null)return{};var he={},R=Object.keys(O),ve,Ce;for(Ce=0;Ce<R.length;Ce++)ve=R[Ce],!(Q.indexOf(ve)>=0)&&(he[ve]=O[ve]);return he}function l(O,Q){if(!(O instanceof Q))throw new TypeError("Cannot call a class as a function")}function Y(O,Q){for(var he=0;he<Q.length;he++){var R=Q[he];R.enumerable=R.enumerable||!1,R.configurable=!0,"value"in R&&(R.writable=!0),Object.defineProperty(O,R.key,R)}}function P(O,Q,he){return Q&&Y(O.prototype,Q),he&&Y(O,he),O}function S(O,Q){return Q&&(ke(Q)==="object"||typeof Q=="function")?Q:w(O)}function d(O){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(he){return he.__proto__||Object.getPrototypeOf(he)},d(O)}function w(O){if(O===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return O}function y(O,Q){if(typeof Q!="function"&&Q!==null)throw new TypeError("Super expression must either be null or a function");O.prototype=Object.create(Q&&Q.prototype,{constructor:{value:O,writable:!0,configurable:!0}}),Q&&G(O,Q)}function G(O,Q){return G=Object.setPrototypeOf||function(R,ve){return R.__proto__=ve,R},G(O,Q)}function X(O,Q,he){return Q in O?Object.defineProperty(O,Q,{value:he,enumerable:!0,configurable:!0,writable:!0}):O[Q]=he,O}var M=function(O){y(Q,O);function Q(){var he,R;l(this,Q);for(var ve=arguments.length,Ce=new Array(ve),ge=0;ge<ve;ge++)Ce[ge]=arguments[ge];return R=S(this,(he=d(Q)).call.apply(he,[this].concat(Ce))),X(w(R),"onClick",function(be){var Ne=R.props,Ie=Ne.text,je=Ne.onCopy,H=Ne.children,z=Ne.options,Z=V.default.Children.only(H),ee=(0,Ae.default)(Ie,z);je&&je(Ie,ee),Z&&Z.props&&typeof Z.props.onClick=="function"&&Z.props.onClick(be)}),R}return P(Q,[{key:"render",value:function(){var R=this.props,ve=R.text,Ce=R.onCopy,ge=R.options,be=R.children,Ne=Fe(R,["text","onCopy","options","children"]),Ie=V.default.Children.only(be);return V.default.cloneElement(Ie,ue({},Ne,{onClick:this.onClick}))}}]),Q}(V.default.PureComponent);ut.CopyToClipboard=M,X(M,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(Nt,ut,ie){"use strict";var V=ie(83145),Ae=V.CopyToClipboard;Ae.CopyToClipboard=Ae,Nt.exports=Ae},76374:function(Nt,ut,ie){"use strict";var V=function(){if(typeof Map!="undefined")return Map;function H(z,Z){var ee=-1;return z.some(function(me,ae){return me[0]===Z?(ee=ae,!0):!1}),ee}return function(){function z(){this.__entries__=[]}return Object.defineProperty(z.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),z.prototype.get=function(Z){var ee=H(this.__entries__,Z),me=this.__entries__[ee];return me&&me[1]},z.prototype.set=function(Z,ee){var me=H(this.__entries__,Z);~me?this.__entries__[me][1]=ee:this.__entries__.push([Z,ee])},z.prototype.delete=function(Z){var ee=this.__entries__,me=H(ee,Z);~me&&ee.splice(me,1)},z.prototype.has=function(Z){return!!~H(this.__entries__,Z)},z.prototype.clear=function(){this.__entries__.splice(0)},z.prototype.forEach=function(Z,ee){ee===void 0&&(ee=null);for(var me=0,ae=this.__entries__;me<ae.length;me++){var x=ae[me];Z.call(ee,x[1],x[0])}},z}()}(),Ae=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,He=function(){return typeof ie.g!="undefined"&&ie.g.Math===Math?ie.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),ke=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(He):function(H){return setTimeout(function(){return H(Date.now())},1e3/60)}}(),$e=2;function ue(H,z){var Z=!1,ee=!1,me=0;function ae(){Z&&(Z=!1,H()),ee&&A()}function x(){ke(ae)}function A(){var N=Date.now();if(Z){if(N-me<$e)return;ee=!0}else Z=!0,ee=!1,setTimeout(x,z);me=N}return A}var Fe=20,Te=["top","right","bottom","left","width","height","size","weight"],l=typeof MutationObserver!="undefined",Y=function(){function H(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=ue(this.refresh.bind(this),Fe)}return H.prototype.addObserver=function(z){~this.observers_.indexOf(z)||this.observers_.push(z),this.connected_||this.connect_()},H.prototype.removeObserver=function(z){var Z=this.observers_,ee=Z.indexOf(z);~ee&&Z.splice(ee,1),!Z.length&&this.connected_&&this.disconnect_()},H.prototype.refresh=function(){var z=this.updateObservers_();z&&this.refresh()},H.prototype.updateObservers_=function(){var z=this.observers_.filter(function(Z){return Z.gatherActive(),Z.hasActive()});return z.forEach(function(Z){return Z.broadcastActive()}),z.length>0},H.prototype.connect_=function(){!Ae||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),l?(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)},H.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)},H.prototype.onTransitionEnd_=function(z){var Z=z.propertyName,ee=Z===void 0?"":Z,me=Te.some(function(ae){return!!~ee.indexOf(ae)});me&&this.refresh()},H.getInstance=function(){return this.instance_||(this.instance_=new H),this.instance_},H.instance_=null,H}(),P=function(H,z){for(var Z=0,ee=Object.keys(z);Z<ee.length;Z++){var me=ee[Z];Object.defineProperty(H,me,{value:z[me],enumerable:!1,writable:!1,configurable:!0})}return H},S=function(H){var z=H&&H.ownerDocument&&H.ownerDocument.defaultView;return z||He},d=ve(0,0,0,0);function w(H){return parseFloat(H)||0}function y(H){for(var z=[],Z=1;Z<arguments.length;Z++)z[Z-1]=arguments[Z];return z.reduce(function(ee,me){var ae=H["border-"+me+"-width"];return ee+w(ae)},0)}function G(H){for(var z=["top","right","bottom","left"],Z={},ee=0,me=z;ee<me.length;ee++){var ae=me[ee],x=H["padding-"+ae];Z[ae]=w(x)}return Z}function X(H){var z=H.getBBox();return ve(0,0,z.width,z.height)}function M(H){var z=H.clientWidth,Z=H.clientHeight;if(!z&&!Z)return d;var ee=S(H).getComputedStyle(H),me=G(ee),ae=me.left+me.right,x=me.top+me.bottom,A=w(ee.width),N=w(ee.height);if(ee.boxSizing==="border-box"&&(Math.round(A+ae)!==z&&(A-=y(ee,"left","right")+ae),Math.round(N+x)!==Z&&(N-=y(ee,"top","bottom")+x)),!Q(H)){var de=Math.round(A+ae)-z,We=Math.round(N+x)-Z;Math.abs(de)!==1&&(A-=de),Math.abs(We)!==1&&(N-=We)}return ve(me.left,me.top,A,N)}var O=function(){return typeof SVGGraphicsElement!="undefined"?function(H){return H instanceof S(H).SVGGraphicsElement}:function(H){return H instanceof S(H).SVGElement&&typeof H.getBBox=="function"}}();function Q(H){return H===S(H).document.documentElement}function he(H){return Ae?O(H)?X(H):M(H):d}function R(H){var z=H.x,Z=H.y,ee=H.width,me=H.height,ae=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,x=Object.create(ae.prototype);return P(x,{x:z,y:Z,width:ee,height:me,top:Z,right:z+ee,bottom:me+Z,left:z}),x}function ve(H,z,Z,ee){return{x:H,y:z,width:Z,height:ee}}var Ce=function(){function H(z){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=ve(0,0,0,0),this.target=z}return H.prototype.isActive=function(){var z=he(this.target);return this.contentRect_=z,z.width!==this.broadcastWidth||z.height!==this.broadcastHeight},H.prototype.broadcastRect=function(){var z=this.contentRect_;return this.broadcastWidth=z.width,this.broadcastHeight=z.height,z},H}(),ge=function(){function H(z,Z){var ee=R(Z);P(this,{target:z,contentRect:ee})}return H}(),be=function(){function H(z,Z,ee){if(this.activeObservations_=[],this.observations_=new V,typeof z!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=z,this.controller_=Z,this.callbackCtx_=ee}return H.prototype.observe=function(z){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(z instanceof S(z).Element))throw new TypeError('parameter 1 is not of type "Element".');var Z=this.observations_;Z.has(z)||(Z.set(z,new Ce(z)),this.controller_.addObserver(this),this.controller_.refresh())}},H.prototype.unobserve=function(z){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(z instanceof S(z).Element))throw new TypeError('parameter 1 is not of type "Element".');var Z=this.observations_;Z.has(z)&&(Z.delete(z),Z.size||this.controller_.removeObserver(this))}},H.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},H.prototype.gatherActive=function(){var z=this;this.clearActive(),this.observations_.forEach(function(Z){Z.isActive()&&z.activeObservations_.push(Z)})},H.prototype.broadcastActive=function(){if(this.hasActive()){var z=this.callbackCtx_,Z=this.activeObservations_.map(function(ee){return new ge(ee.target,ee.broadcastRect())});this.callback_.call(z,Z,z),this.clearActive()}},H.prototype.clearActive=function(){this.activeObservations_.splice(0)},H.prototype.hasActive=function(){return this.activeObservations_.length>0},H}(),Ne=typeof WeakMap!="undefined"?new WeakMap:new V,Ie=function(){function H(z){if(!(this instanceof H))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var Z=Y.getInstance(),ee=new be(z,Z,this);Ne.set(this,ee)}return H}();["observe","unobserve","disconnect"].forEach(function(H){Ie.prototype[H]=function(){var z;return(z=Ne.get(this))[H].apply(z,arguments)}});var je=function(){return typeof He.ResizeObserver!="undefined"?He.ResizeObserver:Ie}();ut.Z=je},98040:function(Nt){Nt.exports=function(){var ut=document.getSelection();if(!ut.rangeCount)return function(){};for(var ie=document.activeElement,V=[],Ae=0;Ae<ut.rangeCount;Ae++)V.push(ut.getRangeAt(Ae));switch(ie.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":ie.blur();break;default:ie=null;break}return ut.removeAllRanges(),function(){ut.type==="Caret"&&ut.removeAllRanges(),ut.rangeCount||V.forEach(function(He){ut.addRange(He)}),ie&&ie.focus()}}},1012:function(Nt,ut,ie){"use strict";ie.d(ut,{Z:function(){return S}});var V=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),Ae=new Uint8Array(16);function He(){if(!V)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return V(Ae)}var ke=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function $e(d){return typeof d=="string"&&ke.test(d)}for(var ue=$e,Fe=[],Te=0;Te<256;++Te)Fe.push((Te+256).toString(16).substr(1));function l(d){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,y=(Fe[d[w+0]]+Fe[d[w+1]]+Fe[d[w+2]]+Fe[d[w+3]]+"-"+Fe[d[w+4]]+Fe[d[w+5]]+"-"+Fe[d[w+6]]+Fe[d[w+7]]+"-"+Fe[d[w+8]]+Fe[d[w+9]]+"-"+Fe[d[w+10]]+Fe[d[w+11]]+Fe[d[w+12]]+Fe[d[w+13]]+Fe[d[w+14]]+Fe[d[w+15]]).toLowerCase();if(!ue(y))throw TypeError("Stringified UUID is invalid");return y}var Y=l;function P(d,w,y){d=d||{};var G=d.random||(d.rng||He)();if(G[6]=G[6]&15|64,G[8]=G[8]&63|128,w){y=y||0;for(var X=0;X<16;++X)w[y+X]=G[X];return w}return Y(G)}var S=P},93314:function(Nt){"use strict";Nt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},40846:function(Nt,ut,ie){"use strict";ie.d(ut,{ZP:function(){return ls}});function V(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var Ae={exports:{}};(function(a,e){(function(t){var r=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,n=/^(?=([^\/?#]*))\1([^]*)$/,i=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,u={buildAbsoluteURL:function(f,m,_){if(_=_||{},f=f.trim(),m=m.trim(),!m){if(!_.alwaysNormalize)return f;var b=u.parseURL(f);if(!b)throw new Error("Error trying to parse base URL.");return b.path=u.normalizePath(b.path),u.buildURLFromParts(b)}var C=u.parseURL(m);if(!C)throw new Error("Error trying to parse relative URL.");if(C.scheme)return _.alwaysNormalize?(C.path=u.normalizePath(C.path),u.buildURLFromParts(C)):m;var U=u.parseURL(f);if(!U)throw new Error("Error trying to parse base URL.");if(!U.netLoc&&U.path&&U.path[0]!=="/"){var F=n.exec(U.path);U.netLoc=F[1],U.path=F[2]}U.netLoc&&!U.path&&(U.path="/");var j={scheme:U.scheme,netLoc:C.netLoc,path:null,params:C.params,query:C.query,fragment:C.fragment};if(!C.netLoc&&(j.netLoc=U.netLoc,C.path[0]!=="/"))if(!C.path)j.path=U.path,C.params||(j.params=U.params,C.query||(j.query=U.query));else{var re=U.path,De=re.substring(0,re.lastIndexOf("/")+1)+C.path;j.path=u.normalizePath(De)}return j.path===null&&(j.path=_.alwaysNormalize?u.normalizePath(C.path):C.path),u.buildURLFromParts(j)},parseURL:function(f){var m=r.exec(f);return m?{scheme:m[1]||"",netLoc:m[2]||"",path:m[3]||"",params:m[4]||"",query:m[5]||"",fragment:m[6]||""}:null},normalizePath:function(f){for(f=f.split("").reverse().join("").replace(i,"");f.length!==(f=f.replace(s,"")).length;);return f.split("").reverse().join("")},buildURLFromParts:function(f){return f.scheme+f.netLoc+f.path+f.params+f.query+f.fragment}};a.exports=u})()})(Ae);var He=Ae.exports;function ke(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(a,n).enumerable})),t.push.apply(t,r)}return t}function $e(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ke(Object(t),!0).forEach(function(r){Te(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):ke(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}function ue(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var r=t.call(a,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function Fe(a){var e=ue(a,"string");return typeof e=="symbol"?e:String(e)}function Te(a,e,t){return e=Fe(e),e in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function l(){return l=Object.assign?Object.assign.bind():function(a){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(a[r]=t[r])}return a},l.apply(this,arguments)}const Y=Number.isFinite||function(a){return typeof a=="number"&&isFinite(a)},P=Number.isSafeInteger||function(a){return typeof a=="number"&&Math.abs(a)<=S},S=Number.MAX_SAFE_INTEGER||9007199254740991;let d=function(a){return a.MEDIA_ATTACHING="hlsMediaAttaching",a.MEDIA_ATTACHED="hlsMediaAttached",a.MEDIA_DETACHING="hlsMediaDetaching",a.MEDIA_DETACHED="hlsMediaDetached",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.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.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_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}({}),w=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}({}),y=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.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.INTERNAL_EXCEPTION="internalException",a.INTERNAL_ABORTED="aborted",a.UNKNOWN="unknown",a}({});const G=function(){},X={trace:G,debug:G,log:G,warn:G,info:G,error:G};let M=X;function O(a){const e=self.console[a];return e?e.bind(self.console,`[${a}] >`):G}function Q(a,...e){e.forEach(function(t){M[t]=a[t]?a[t].bind(a):O(t)})}function he(a,e){if(typeof console=="object"&&a===!0||typeof a=="object"){Q(a,"debug","log","info","warn","error");try{M.log(`Debug logs enabled for "${e}" in hls.js version 1.5.20`)}catch(t){M=X}}else M=X}const R=M,ve=/^(\d+)x(\d+)$/,Ce=/(.+?)=(".*?"|.*?)(?:,|$)/g;class ge{constructor(e){typeof e=="string"&&(e=ge.parseAttrList(e)),l(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 r=new Uint8Array(t.length/2);for(let n=0;n<t.length/2;n++)r[n]=parseInt(t.slice(n*2,n*2+2),16);return r}else 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 r=this[e];return r?parseFloat(r):t}enumeratedString(e){return this[e]}bool(e){return this[e]==="YES"}decimalResolution(e){const t=ve.exec(this[e]);if(t!==null)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e){let t;const r={},n='"';for(Ce.lastIndex=0;(t=Ce.exec(e))!==null;){let i=t[2];i.indexOf(n)===0&&i.lastIndexOf(n)===i.length-1&&(i=i.slice(1,-1));const s=t[1].trim();r[s]=i}return r}}function be(a){return a!=="ID"&&a!=="CLASS"&&a!=="START-DATE"&&a!=="DURATION"&&a!=="END-DATE"&&a!=="END-ON-NEXT"}function Ne(a){return a==="SCTE35-OUT"||a==="SCTE35-IN"}class Ie{constructor(e,t){if(this.attr=void 0,this._startDate=void 0,this._endDate=void 0,this._badValueForSameId=void 0,t){const r=t.attr;for(const n in r)if(Object.prototype.hasOwnProperty.call(e,n)&&e[n]!==r[n]){R.warn(`DATERANGE tag attribute: "${n}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=n;break}e=l(new ge({}),r,e)}if(this.attr=e,this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const r=new Date(this.attr["END-DATE"]);Y(r.getTime())&&(this._endDate=r)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get startDate(){return this._startDate}get endDate(){if(this._endDate)return this._endDate;const e=this.duration;return e!==null?new Date(this._startDate.getTime()+e*1e3):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(Y(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 isValid(){return!!this.id&&!this._badValueForSameId&&Y(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)}}class je{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 H={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class z{constructor(e){this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams={[H.AUDIO]:null,[H.VIDEO]:null,[H.AUDIOVIDEO]:null},this.baseurl=e}setByteRange(e,t){const r=e.split("@",2);let n;r.length===1?n=(t==null?void 0:t.byteRangeEndOffset)||0:n=parseInt(r[1]),this._byteRange=[n,parseInt(r[0])+n]}get byteRange(){return this._byteRange?this._byteRange:[]}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=He.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}}class Z extends z{constructor(e,t){super(t),this._decryptdata=null,this.rawProgramDateTime=null,this.programDateTime=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.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.stats=new je,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 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 r=Object.keys(this.levelkeys);if(r.length===1)return this._decryptdata=this.levelkeys[r[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null||!Y(this.programDateTime))return null;const e=Y(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),r=t.length;if(r>1||r===1&&this.levelkeys[t[0]].encrypted)return!0}return!1}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,r,n,i,s=!1){const{elementaryStreams:u}=this,f=u[e];if(!f){u[e]={startPTS:t,endPTS:r,startDTS:n,endDTS:i,partial:s};return}f.startPTS=Math.min(f.startPTS,t),f.endPTS=Math.max(f.endPTS,r),f.startDTS=Math.min(f.startDTS,n),f.endDTS=Math.max(f.endDTS,i)}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[H.AUDIO]=null,e[H.VIDEO]=null,e[H.AUDIOVIDEO]=null}}class ee extends z{constructor(e,t,r,n,i){super(r),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.stats=new je,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=n;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)}}const me=10;class ae{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.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 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.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,r=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!r||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||t===0&&r>0,this.updated||this.advanced?this.misses=Math.floor(e.misses*.6):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay}get hasProgramDateTime(){return this.fragments.length?Y(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||me}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 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 lastPartSn(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}function x(a){return Uint8Array.from(atob(a),e=>e.charCodeAt(0))}function A(a){const e=We(a).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function N(a){const e=function(r,n,i){const s=r[n];r[n]=r[i],r[i]=s};e(a,0,3),e(a,1,2),e(a,4,5),e(a,6,7)}function de(a){const e=a.split(":");let t=null;if(e[0]==="data"&&e.length===2){const r=e[1].split(";"),n=r[r.length-1].split(",");if(n.length===2){const i=n[0]==="base64",s=n[1];i?(r.splice(-1,1),t=x(s)):t=A(s)}}return t}function We(a){return Uint8Array.from(unescape(encodeURIComponent(a)),e=>e.charCodeAt(0))}const qe=typeof self!="undefined"?self:void 0;var Ge={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},ot={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function Dt(a){switch(a){case ot.FAIRPLAY:return Ge.FAIRPLAY;case ot.PLAYREADY:return Ge.PLAYREADY;case ot.WIDEVINE:return Ge.WIDEVINE;case ot.CLEARKEY:return Ge.CLEARKEY}}var at={CENC:"1077efecc0b24d02ace33c1e52e2fb4b",CLEARKEY:"e2719d58a985b3c9781ab030af78d30e",FAIRPLAY:"94ce86fb07ff4f43adb893d2fa968ca2",PLAYREADY:"9a04f07998404286ab92e65be0885f95",WIDEVINE:"edef8ba979d64acea3c827dcd51d21ed"};function it(a){if(a===at.WIDEVINE)return Ge.WIDEVINE;if(a===at.PLAYREADY)return Ge.PLAYREADY;if(a===at.CENC||a===at.CLEARKEY)return Ge.CLEARKEY}function Lt(a){switch(a){case Ge.FAIRPLAY:return ot.FAIRPLAY;case Ge.PLAYREADY:return ot.PLAYREADY;case Ge.WIDEVINE:return ot.WIDEVINE;case Ge.CLEARKEY:return ot.CLEARKEY}}function jt(a){const{drmSystems:e,widevineLicenseUrl:t}=a,r=e?[Ge.FAIRPLAY,Ge.WIDEVINE,Ge.PLAYREADY,Ge.CLEARKEY].filter(n=>!!e[n]):[];return!r[Ge.WIDEVINE]&&t&&r.push(Ge.WIDEVINE),r}const Xt=function(a){return qe!=null&&(a=qe.navigator)!=null&&a.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function Vt(a,e,t,r){let n;switch(a){case Ge.FAIRPLAY:n=["cenc","sinf"];break;case Ge.WIDEVINE:case Ge.PLAYREADY:n=["cenc"];break;case Ge.CLEARKEY:n=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${a}`)}return Mt(n,e,t,r)}function Mt(a,e,t,r){return[{initDataTypes:a,persistentState:r.persistentState||"optional",distinctiveIdentifier:r.distinctiveIdentifier||"optional",sessionTypes:r.sessionTypes||[r.sessionType||"temporary"],audioCapabilities:e.map(i=>({contentType:`audio/mp4; codecs="${i}"`,robustness:r.audioRobustness||"",encryptionScheme:r.audioEncryptionScheme||null})),videoCapabilities:t.map(i=>({contentType:`video/mp4; codecs="${i}"`,robustness:r.videoRobustness||"",encryptionScheme:r.videoEncryptionScheme||null}))}]}function Rt(a){const e=new Uint16Array(a.buffer,a.byteOffset,a.byteLength/2),t=String.fromCharCode.apply(null,Array.from(e)),r=t.substring(t.indexOf("<"),t.length),s=new DOMParser().parseFromString(r,"text/xml").getElementsByTagName("KID")[0];if(s){const u=s.childNodes[0]?s.childNodes[0].nodeValue:s.getAttribute("VALUE");if(u){const f=x(u).subarray(0,16);return N(f),f}}return null}function Me(a,e,t){return Uint8Array.prototype.slice?a.slice(e,t):new Uint8Array(Array.prototype.slice.call(a,e,t))}const Qe=(a,e)=>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,se=(a,e)=>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,Pe=(a,e)=>{const t=e;let r=0;for(;Qe(a,e);){r+=10;const n=Re(a,e+6);r+=n,se(a,e+10)&&(r+=10),e+=r}if(r>0)return a.subarray(t,t+r)},Re=(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},T=(a,e)=>Qe(a,e)&&Re(a,e+6)+10<=a.length-e,K=a=>{const e=W(a);for(let t=0;t<e.length;t++){const r=e[t];if(te(r))return we(r)}},te=a=>a&&a.key==="PRIV"&&a.info==="com.apple.streaming.transportStreamTimestamp",$=a=>{const e=String.fromCharCode(a[0],a[1],a[2],a[3]),t=Re(a,4),r=10;return{type:e,size:t,data:a.subarray(r,r+t)}},W=a=>{let e=0;const t=[];for(;Qe(a,e);){const r=Re(a,e+6);e+=10;const n=e+r;for(;e+8<n;){const i=$(a.subarray(e)),s=Ee(i);s&&t.push(s),e+=i.size+10}se(a,e)&&(e+=10)}return t},Ee=a=>a.type==="PRIV"?Le(a):a.type[0]==="W"?Se(a):Oe(a),Le=a=>{if(a.size<2)return;const e=ze(a.data,!0),t=new Uint8Array(a.data.subarray(e.length+1));return{key:a.type,info:e,data:t.buffer}},Oe=a=>{if(a.size<2)return;if(a.type==="TXXX"){let t=1;const r=ze(a.data.subarray(t),!0);t+=r.length+1;const n=ze(a.data.subarray(t));return{key:a.type,info:r,data:n}}const e=ze(a.data.subarray(1));return{key:a.type,data:e}},Se=a=>{if(a.type==="WXXX"){if(a.size<2)return;let t=1;const r=ze(a.data.subarray(t),!0);t+=r.length+1;const n=ze(a.data.subarray(t));return{key:a.type,info:r,data:n}}const e=ze(a.data);return{key:a.type,data:e}},we=a=>{if(a.data.byteLength===8){const e=new Uint8Array(a.data),t=e[3]&1;let r=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return r/=45,t&&(r+=4772185884e-2),Math.round(r)}},ze=(a,e=!1)=>{const t=tt();if(t){const m=t.decode(a);if(e){const _=m.indexOf("\0");return _!==-1?m.substring(0,_):m}return m.replace(/\0/g,"")}const r=a.length;let n,i,s,u="",f=0;for(;f<r;){if(n=a[f++],n===0&&e)return u;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:u+=String.fromCharCode(n);break;case 12:case 13:i=a[f++],u+=String.fromCharCode((n&31)<<6|i&63);break;case 14:i=a[f++],s=a[f++],u+=String.fromCharCode((n&15)<<12|(i&63)<<6|(s&63)<<0);break}}return u};let Ye;function tt(){if(!navigator.userAgent.includes("PlayStation 4"))return!Ye&&typeof self.TextDecoder!="undefined"&&(Ye=new self.TextDecoder("utf-8")),Ye}const st={hexDump:function(a){let e="";for(let t=0;t<a.length;t++){let r=a[t].toString(16);r.length<2&&(r="0"+r),e+=r}return e}},mt=Math.pow(2,32)-1,ht=[].push,ft={video:1,audio:2,id3:3,text:4};function rt(a){return String.fromCharCode.apply(null,a)}function g(a,e){const t=a[e]<<8|a[e+1];return t<0?65536+t:t}function v(a,e){const t=I(a,e);return t<0?4294967296+t:t}function Be(a,e){let t=v(a,e);return t*=Math.pow(2,32),t+=v(a,e+4),t}function I(a,e){return a[e]<<24|a[e+1]<<16|a[e+2]<<8|a[e+3]}function ne(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 bt(a){const e=a.byteLength;for(let t=0;t<e;){const r=v(a,t);if(r>8&&a[t+4]===109&&a[t+5]===111&&a[t+6]===111&&a[t+7]===102)return!0;t=r>1?t+r:e}return!1}function ce(a,e){const t=[];if(!e.length)return t;const r=a.byteLength;for(let n=0;n<r;){const i=v(a,n),s=rt(a.subarray(n+4,n+8)),u=i>1?n+i:r;if(s===e[0])if(e.length===1)t.push(a.subarray(n+8,u));else{const f=ce(a.subarray(n+8,u),e.slice(1));f.length&&ht.apply(t,f)}n=u}return t}function xe(a){const e=[],t=a[0];let r=8;const n=v(a,r);r+=4;let i=0,s=0;t===0?(i=v(a,r),s=v(a,r+4),r+=8):(i=Be(a,r),s=Be(a,r+8),r+=16),r+=2;let u=a.length+s;const f=g(a,r);r+=2;for(let m=0;m<f;m++){let _=r;const b=v(a,_);_+=4;const C=b&2147483647;if((b&2147483648)>>>31===1)return R.warn("SIDX has hierarchical references (not supported)"),null;const F=v(a,_);_+=4,e.push({referenceSize:C,subsegmentDuration:F,info:{duration:F/n,start:u,end:u+C-1}}),u+=C,_+=4,r=_}return{earliestPresentationTime:i,timescale:n,version:t,referencesCount:f,references:e}}function Ue(a){const e=[],t=ce(a,["moov","trak"]);for(let n=0;n<t.length;n++){const i=t[n],s=ce(i,["tkhd"])[0];if(s){let u=s[0];const f=v(s,u===0?12:20),m=ce(i,["mdia","mdhd"])[0];if(m){u=m[0];const _=v(m,u===0?12:20),b=ce(i,["mdia","hdlr"])[0];if(b){const C=rt(b.subarray(8,12)),U={soun:H.AUDIO,vide:H.VIDEO}[C];if(U){const F=ce(i,["mdia","minf","stbl","stsd"])[0],j=B(F);e[f]={timescale:_,type:U},e[U]=$e({timescale:_,id:f},j)}}}}}return ce(a,["moov","mvex","trex"]).forEach(n=>{const i=v(n,4),s=e[i];s&&(s.default={duration:v(n,12),flags:v(n,20)})}),e}function B(a){const e=a.subarray(8),t=e.subarray(86),r=rt(e.subarray(4,8));let n=r;const i=r==="enca"||r==="encv";if(i){const u=ce(e,[r])[0].subarray(r==="enca"?28:78);ce(u,["sinf"]).forEach(m=>{const _=ce(m,["schm"])[0];if(_){const b=rt(_.subarray(4,8));if(b==="cbcs"||b==="cenc"){const C=ce(m,["frma"])[0];C&&(n=rt(C))}}})}switch(n){case"avc1":case"avc2":case"avc3":case"avc4":{const s=ce(t,["avcC"])[0];n+="."+oe(s[1])+oe(s[2])+oe(s[3]);break}case"mp4a":{const s=ce(e,[r])[0],u=ce(s.subarray(28),["esds"])[0];if(u&&u.length>12){let f=4;if(u[f++]!==3)break;f=q(u,f),f+=2;const m=u[f++];if(m&128&&(f+=2),m&64&&(f+=u[f++]),u[f++]!==4)break;f=q(u,f);const _=u[f++];if(_===64)n+="."+oe(_);else break;if(f+=12,u[f++]!==5)break;f=q(u,f);const b=u[f++];let C=(b&248)>>3;C===31&&(C+=1+((b&7)<<3)+((u[f]&224)>>5)),n+="."+C}break}case"hvc1":case"hev1":{const s=ce(t,["hvcC"])[0],u=s[1],f=["","A","B","C"][u>>6],m=u&31,_=v(s,2),b=(u&32)>>5?"H":"L",C=s[12],U=s.subarray(6,12);n+="."+f+m,n+="."+_.toString(16).toUpperCase(),n+="."+b+C;let F="";for(let j=U.length;j--;){const re=U[j];(re||F)&&(F="."+re.toString(16).toUpperCase()+F)}n+=F;break}case"dvh1":case"dvhe":{const s=ce(t,["dvcC"])[0],u=s[2]>>1&127,f=s[2]<<5&32|s[3]>>3&31;n+="."+ye(u)+"."+ye(f);break}case"vp09":{const s=ce(t,["vpcC"])[0],u=s[4],f=s[5],m=s[6]>>4&15;n+="."+ye(u)+"."+ye(f)+"."+ye(m);break}case"av01":{const s=ce(t,["av1C"])[0],u=s[1]>>>5,f=s[1]&31,m=s[2]>>>7?"H":"M",_=(s[2]&64)>>6,b=(s[2]&32)>>5,C=u===2&&_?b?12:10:_?10:8,U=(s[2]&16)>>4,F=(s[2]&8)>>3,j=(s[2]&4)>>2,re=s[2]&3;n+="."+u+"."+ye(f)+m+"."+ye(C)+"."+U+"."+F+j+re+"."+ye(1)+"."+ye(1)+"."+ye(1)+"."+0;break}}return{codec:n,encrypted:i}}function q(a,e){const t=e+5;for(;a[e++]&128&&e<t;);return e}function oe(a){return("0"+a.toString(16).toUpperCase()).slice(-2)}function ye(a){return(a<10?"0":"")+a}function L(a,e){if(!a||!e)return a;const t=e.keyId;return t&&e.isCommonEncryption&&ce(a,["moov","trak"]).forEach(n=>{const s=ce(n,["mdia","minf","stbl","stsd"])[0].subarray(8);let u=ce(s,["enca"]);const f=u.length>0;f||(u=ce(s,["encv"])),u.forEach(m=>{const _=f?m.subarray(28):m.subarray(78);ce(_,["sinf"]).forEach(C=>{const U=pt(C);if(U){const F=U.subarray(8,24);F.some(j=>j!==0)||(R.log(`[eme] Patching keyId in 'enc${f?"a":"v"}>sinf>>tenc' box: ${st.hexDump(F)} -> ${st.hexDump(t)}`),U.set(t,8))}})})}),a}function pt(a){const e=ce(a,["schm"])[0];if(e){const t=rt(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return ce(a,["schi","tenc"])[0]}return null}function fe(a,e){return ce(e,["moof","traf"]).reduce((t,r)=>{const n=ce(r,["tfdt"])[0],i=n[0],s=ce(r,["tfhd"]).reduce((u,f)=>{const m=v(f,4),_=a[m];if(_){let b=v(n,4);if(i===1){if(b===mt)return R.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),u;b*=mt+1,b+=v(n,8)}const C=_.timescale||9e4,U=b/C;if(Y(U)&&(u===null||U<u))return U}return u},null);return s!==null&&Y(s)&&(t===null||s<t)?s:t},null)}function Et(a,e){let t=0,r=0,n=0;const i=ce(a,["moof","traf"]);for(let s=0;s<i.length;s++){const u=i[s],f=ce(u,["tfhd"])[0],m=v(f,4),_=e[m];if(!_)continue;const b=_.default,C=v(f,0)|(b==null?void 0:b.flags);let U=b==null?void 0:b.duration;C&8&&(C&2?U=v(f,12):U=v(f,8));const F=_.timescale||9e4,j=ce(u,["trun"]);for(let re=0;re<j.length;re++){if(t=It(j[re]),!t&&U){const De=v(j[re],4);t=U*De}_.type===H.VIDEO?r+=t/F:_.type===H.AUDIO&&(n+=t/F)}}if(r===0&&n===0){let s=1/0,u=0,f=0;const m=ce(a,["sidx"]);for(let _=0;_<m.length;_++){const b=xe(m[_]);if(b!=null&&b.references){s=Math.min(s,b.earliestPresentationTime/b.timescale);const C=b.references.reduce((U,F)=>U+F.info.duration||0,0);u=Math.max(u,C+b.earliestPresentationTime/b.timescale),f=u-s}}if(f&&Y(f))return f}return r||n}function It(a){const e=v(a,0);let t=8;e&1&&(t+=4),e&4&&(t+=4);let r=0;const n=v(a,4);for(let i=0;i<n;i++){if(e&256){const s=v(a,t);r+=s,t+=4}e&512&&(t+=4),e&1024&&(t+=4),e&2048&&(t+=4)}return r}function Ut(a,e,t){ce(e,["moof","traf"]).forEach(r=>{ce(r,["tfhd"]).forEach(n=>{const i=v(n,4),s=a[i];if(!s)return;const u=s.timescale||9e4;ce(r,["tfdt"]).forEach(f=>{const m=f[0],_=t*u;if(_){let b=v(f,4);if(m===0)b-=_,b=Math.max(b,0),ne(f,4,b);else{b*=Math.pow(2,32),b+=v(f,8),b-=_,b=Math.max(b,0);const C=Math.floor(b/(mt+1)),U=Math.floor(b%(mt+1));ne(f,4,C),ne(f,8,U)}}})})})}function yr(a){const e={valid:null,remainder:null},t=ce(a,["moof"]);if(t.length<2)return e.remainder=a,e;const r=t[t.length-1];return e.valid=Me(a,0,r.byteOffset-8),e.remainder=Me(a,r.byteOffset-8),e}function Kt(a,e){const t=new Uint8Array(a.length+e.length);return t.set(a),t.set(e,a.length),t}function Pt(a,e){const t=[],r=e.samples,n=e.timescale,i=e.id;let s=!1;return ce(r,["moof"]).map(f=>{const m=f.byteOffset-8;ce(f,["traf"]).map(b=>{const C=ce(b,["tfdt"]).map(U=>{const F=U[0];let j=v(U,4);return F===1&&(j*=Math.pow(2,32),j+=v(U,8)),j/n})[0];return C!==void 0&&(a=C),ce(b,["tfhd"]).map(U=>{const F=v(U,4),j=v(U,0)&16777215,re=(j&1)!==0,De=(j&2)!==0,Xe=(j&8)!==0;let Ze=0;const dt=(j&16)!==0;let et=0;const yt=(j&32)!==0;let ct=8;F===i&&(re&&(ct+=8),De&&(ct+=4),Xe&&(Ze=v(U,ct),ct+=4),dt&&(et=v(U,ct),ct+=4),yt&&(ct+=4),e.type==="video"&&(s=br(e.codec)),ce(b,["trun"]).map(St=>{const Ft=St[0],_t=v(St,0)&16777215,At=(_t&1)!==0;let ar=0;const $t=(_t&4)!==0,sr=(_t&256)!==0;let ir=0;const Jt=(_t&512)!==0;let Ar=0;const Ur=(_t&1024)!==0,Yt=(_t&2048)!==0;let Gt=0;const Cr=v(St,4);let pr=8;At&&(ar=v(St,pr),pr+=4),$t&&(pr+=4);let Br=ar+m;for(let un=0;un<Cr;un++){if(sr?(ir=v(St,pr),pr+=4):ir=Ze,Jt?(Ar=v(St,pr),pr+=4):Ar=et,Ur&&(pr+=4),Yt&&(Ft===0?Gt=v(St,pr):Gt=I(St,pr),pr+=4),e.type===H.VIDEO){let xn=0;for(;xn<Ar;){const Tn=v(r,Br);if(Br+=4,wr(s,r[Br])){const si=r.subarray(Br,Br+Tn);Gr(si,s?2:1,a+Gt/n,t)}Br+=Tn,xn+=Tn+4}}a+=ir/n}}))})})}),t}function br(a){if(!a)return!1;const e=a.indexOf("."),t=e<0?a:a.substring(0,e);return t==="hvc1"||t==="hev1"||t==="dvh1"||t==="dvhe"}function wr(a,e){if(a){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function Gr(a,e,t,r){const n=zr(a);let i=0;i+=e;let s=0,u=0,f=0;for(;i<n.length;){s=0;do{if(i>=n.length)break;f=n[i++],s+=f}while(f===255);u=0;do{if(i>=n.length)break;f=n[i++],u+=f}while(f===255);const m=n.length-i;let _=i;if(u<m)i+=u;else if(u>m){R.error(`Malformed SEI payload. ${u} is too small, only ${m} bytes left to parse.`);break}if(s===4){if(n[_++]===181){const C=g(n,_);if(_+=2,C===49){const U=v(n,_);if(_+=4,U===1195456820){const F=n[_++];if(F===3){const j=n[_++],re=31&j,De=64&j,Xe=De?2+re*3:0,Ze=new Uint8Array(Xe);if(De){Ze[0]=j;for(let dt=1;dt<Xe;dt++)Ze[dt]=n[_++]}r.push({type:F,payloadType:s,pts:t,bytes:Ze})}}}}}else if(s===5&&u>16){const b=[];for(let F=0;F<16;F++){const j=n[_++].toString(16);b.push(j.length==1?"0"+j:j),(F===3||F===5||F===7||F===9)&&b.push("-")}const C=u-16,U=new Uint8Array(C);for(let F=0;F<C;F++)U[F]=n[_++];r.push({payloadType:s,pts:t,uuid:b.join(""),userData:ze(U),userDataBytes:U})}}}function zr(a){const e=a.byteLength,t=[];let r=1;for(;r<e-2;)a[r]===0&&a[r+1]===0&&a[r+2]===3?(t.push(r+2),r+=2):r++;if(t.length===0)return a;const n=e-t.length,i=new Uint8Array(n);let s=0;for(r=0;r<n;s++,r++)s===t[0]&&(s++,t.shift()),i[r]=a[s];return i}function kt(a){const e=a[0];let t="",r="",n=0,i=0,s=0,u=0,f=0,m=0;if(e===0){for(;rt(a.subarray(m,m+1))!=="\0";)t+=rt(a.subarray(m,m+1)),m+=1;for(t+=rt(a.subarray(m,m+1)),m+=1;rt(a.subarray(m,m+1))!=="\0";)r+=rt(a.subarray(m,m+1)),m+=1;r+=rt(a.subarray(m,m+1)),m+=1,n=v(a,12),i=v(a,16),u=v(a,20),f=v(a,24),m=28}else if(e===1){m+=4,n=v(a,m),m+=4;const b=v(a,m);m+=4;const C=v(a,m);for(m+=4,s=qo(2,32)*b+C,P(s)||(s=Number.MAX_SAFE_INTEGER,R.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),u=v(a,m),m+=4,f=v(a,m),m+=4;rt(a.subarray(m,m+1))!=="\0";)t+=rt(a.subarray(m,m+1)),m+=1;for(t+=rt(a.subarray(m,m+1)),m+=1;rt(a.subarray(m,m+1))!=="\0";)r+=rt(a.subarray(m,m+1)),m+=1;r+=rt(a.subarray(m,m+1)),m+=1}const _=a.subarray(m,a.byteLength);return{schemeIdUri:t,value:r,timeScale:n,presentationTime:s,presentationTimeDelta:i,eventDuration:u,id:f,payload:_}}function qt(a,...e){const t=e.length;let r=8,n=t;for(;n--;)r+=e[n].byteLength;const i=new Uint8Array(r);for(i[0]=r>>24&255,i[1]=r>>16&255,i[2]=r>>8&255,i[3]=r&255,i.set(a,4),n=0,r=8;n<t;n++)i.set(e[n],r),r+=e[n].byteLength;return i}function mr(a,e,t){if(a.byteLength!==16)throw new RangeError("Invalid system id");let r,n;if(e){r=1,n=new Uint8Array(e.length*16);for(let u=0;u<e.length;u++){const f=e[u];if(f.byteLength!==16)throw new RangeError("Invalid key");n.set(f,u*16)}}else r=0,n=new Uint8Array;let i;r>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),qt([112,115,115,104],new Uint8Array([r,0,0,0]),a,i,n,s,t||new Uint8Array)}function jr(a){const e=[];if(a instanceof ArrayBuffer){const t=a.byteLength;let r=0;for(;r+32<t;){const n=new DataView(a,r),i=Or(n);e.push(i),r+=i.size}}return e}function Or(a){const e=a.getUint32(0),t=a.byteOffset,r=a.byteLength;if(r<e)return{offset:t,size:r};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,u=st.hexDump(new Uint8Array(s,t+12,16)),f=a.getUint32(28);let m=null,_=null;if(i===0){if(e-32<f||f<22)return{offset:t,size:e};_=new Uint8Array(s,t+32,f)}else if(i===1){if(!f||r<t+32+f*16+16)return{offset:t,size:e};m=[];for(let b=0;b<f;b++)m.push(new Uint8Array(s,t+32+b*16,16))}return{version:i,systemId:u,kids:m,data:_,offset:t,size:e}}let tn={};class lr{static clearKeyUriToKeyIdMap(){tn={}}constructor(e,t,r,n=[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=r,this.keyFormatVersions=n,this.iv=i,this.encrypted=e?e!=="NONE":!1,this.isCommonEncryption=this.encrypted&&e!=="AES-128"}isSupported(){if(this.method){if(this.method==="AES-128"||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case ot.FAIRPLAY:case ot.WIDEVINE:case ot.PLAYREADY:case ot.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(this.method==="AES-128"&&this.uri&&!this.iv){typeof e!="number"&&(this.method==="AES-128"&&!this.iv&&R.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const r=wn(e);return new lr(this.method,this.uri,"identity",this.keyFormatVersions,r)}const t=de(this.uri);if(t)switch(this.keyFormat){case ot.WIDEVINE:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case ot.PLAYREADY:{const r=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=mr(r,null,t),this.keyId=Rt(t);break}default:{let r=t.subarray(0,16);if(r.length!==16){const n=new Uint8Array(16);n.set(r,16-r.length),r=n}this.keyId=r;break}}if(!this.keyId||this.keyId.byteLength!==16){let r=tn[this.uri];if(!r){const n=Object.keys(tn).length%Number.MAX_SAFE_INTEGER;r=new Uint8Array(16),new DataView(r.buffer,12,4).setUint32(0,n),tn[this.uri]=r}this.keyId=r}return this}}function wn(a){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=a>>8*(15-t)&255;return e}const rn=/\{\$([a-zA-Z0-9-_]+)\}/g;function zt(a){return rn.test(a)}function Tt(a,e,t){if(a.variableList!==null||a.hasVariableRefs)for(let r=t.length;r--;){const n=t[r],i=e[n];i&&(e[n]=Qt(a,i))}}function Qt(a,e){if(a.variableList!==null||a.hasVariableRefs){const t=a.variableList;return e.replace(rn,r=>{const n=r.substring(2,r.length-1),i=t==null?void 0:t[n];return i===void 0?(a.playlistParsingError||(a.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${n}"`)),r):i})}return e}function Er(a,e,t){let r=a.variableList;r||(a.variableList=r={});let n,i;if("QUERYPARAM"in e){n=e.QUERYPARAM;try{const s=new self.URL(t).searchParams;if(s.has(n))i=s.get(n);else throw new Error(`"${n}" does not match any query parameter in URI: "${t}"`)}catch(s){a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${s.message}`))}}else n=e.NAME,i=e.VALUE;n in r?a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${n}"`)):r[n]=i||""}function _r(a,e,t){const r=e.IMPORT;if(t&&r in t){let n=a.variableList;n||(a.variableList=n={}),n[r]=t[r]}else a.playlistParsingError||(a.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${r}"`))}function Wr(a=!0){return typeof self=="undefined"?void 0:(a||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function Mn(a){return typeof self!="undefined"&&a===self.ManagedMediaSource}const Vr={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,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 Tr(a,e){const t=Vr[e];return!!t&&!!t[a.slice(0,4)]}function Pr(a,e,t=!0){return!a.split(",").some(r=>!hr(r,e,t))}function hr(a,e,t=!0){var r;const n=Wr(t);return(r=n==null?void 0:n.isTypeSupported(nn(a,e)))!=null?r:!1}function nn(a,e){return`${e}/mp4;codecs="${a}"`}function fn(a){if(a){const e=a.substring(0,4);return Vr.video[e]}return 2}function Kr(a){return a.split(",").reduce((e,t)=>{const r=Vr.video[t];return r?(r*2+e)/(e?3:2):(Vr.audio[t]+e)/(e?2:1)},0)}const rr={};function ur(a,e=!0){if(rr[a])return rr[a];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"]}[a];for(let r=0;r<t.length;r++)if(hr(t[r],"audio",e))return rr[a]=t[r],t[r];return a}const Dr=/flac|opus/i;function Rr(a,e=!0){return a.replace(Dr,t=>ur(t.toLowerCase(),e))}function Sr(a,e){return a&&a!=="mp4a"?a:e&&e.split(",")[0]}function an(a){const e=a.split(",");for(let t=0;t<e.length;t++){const r=e[t].split(".");if(r.length>2){let n=r.shift()+".";n+=parseInt(r.shift()).toString(16),n+=("000"+parseInt(r.shift()).toString(16)).slice(-4),e[t]=n}}return e.join(",")}const yi=/#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,Ln=/#EXT-X-MEDIA:(.*)/g,fr=/^#EXT(?:INF|-X-TARGETDURATION):/m,gr=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),Bn=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(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 Jr{static findGroup(e,t){for(let r=0;r<e.length;r++){const n=e[r];if(n.id===t)return n}}static resolve(e,t){return He.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return fr.test(e)}static parseMasterPlaylist(e,t){const r=zt(e),n={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:r},i=[];yi.lastIndex=0;let s;for(;(s=yi.exec(e))!=null;)if(s[1]){var u;const m=new ge(s[1]);Tt(n,m,["CODECS","SUPPLEMENTAL-CODECS","ALLOWED-CPC","PATHWAY-ID","STABLE-VARIANT-ID","AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS","NAME"]);const _=Qt(n,s[2]),b={attrs:m,bitrate:m.decimalInteger("BANDWIDTH")||m.decimalInteger("AVERAGE-BANDWIDTH"),name:m.NAME,url:Jr.resolve(_,t)},C=m.decimalResolution("RESOLUTION");C&&(b.width=C.width,b.height=C.height),Ci(m.CODECS,b),(u=b.unknownCodecs)!=null&&u.length||i.push(b),n.levels.push(b)}else if(s[3]){const m=s[3],_=s[4];switch(m){case"SESSION-DATA":{const b=new ge(_);Tt(n,b,["DATA-ID","LANGUAGE","VALUE","URI"]);const C=b["DATA-ID"];C&&(n.sessionData===null&&(n.sessionData={}),n.sessionData[C]=b);break}case"SESSION-KEY":{const b=Kn(_,t,n);b.encrypted&&b.isSupported()?(n.sessionKeys===null&&(n.sessionKeys=[]),n.sessionKeys.push(b)):R.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${_}"`);break}case"DEFINE":{{const b=new ge(_);Tt(n,b,["NAME","VALUE","QUERYPARAM"]),Er(n,b,t)}break}case"CONTENT-STEERING":{const b=new ge(_);Tt(n,b,["SERVER-URI","PATHWAY-ID"]),n.contentSteering={uri:Jr.resolve(b["SERVER-URI"],t),pathwayId:b["PATHWAY-ID"]||"."};break}case"START":{n.startTimeOffset=bi(_);break}}}const f=i.length>0&&i.length<n.levels.length;return n.levels=f?i:n.levels,n.levels.length===0&&(n.playlistParsingError=new Error("no levels found in manifest")),n}static parseMasterPlaylistMedia(e,t,r){let n;const i={},s=r.levels,u={AUDIO:s.map(m=>({id:m.attrs.AUDIO,audioCodec:m.audioCodec})),SUBTITLES:s.map(m=>({id:m.attrs.SUBTITLES,textCodec:m.textCodec})),"CLOSED-CAPTIONS":[]};let f=0;for(Ln.lastIndex=0;(n=Ln.exec(e))!==null;){const m=new ge(n[1]),_=m.TYPE;if(_){const b=u[_],C=i[_]||[];i[_]=C,Tt(r,m,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);const U=m.LANGUAGE,F=m["ASSOC-LANGUAGE"],j=m.CHANNELS,re=m.CHARACTERISTICS,De=m["INSTREAM-ID"],Xe={attrs:m,bitrate:0,id:f++,groupId:m["GROUP-ID"]||"",name:m.NAME||U||"",type:_,default:m.bool("DEFAULT"),autoselect:m.bool("AUTOSELECT"),forced:m.bool("FORCED"),lang:U,url:m.URI?Jr.resolve(m.URI,t):""};if(F&&(Xe.assocLang=F),j&&(Xe.channels=j),re&&(Xe.characteristics=re),De&&(Xe.instreamId=De),b!=null&&b.length){const Ze=Jr.findGroup(b,Xe.groupId)||b[0];xi(Xe,Ze,"audioCodec"),xi(Xe,Ze,"textCodec")}C.push(Xe)}}return i}static parseLevelPlaylist(e,t,r,n,i,s){const u=new ae(t),f=u.fragments;let m=null,_=0,b=0,C=0,U=0,F=null,j=new Z(n,t),re,De,Xe,Ze=-1,dt=!1,et=null;for(gr.lastIndex=0,u.m3u8=e,u.hasVariableRefs=zt(e);(re=gr.exec(e))!==null;){dt&&(dt=!1,j=new Z(n,t),j.start=C,j.sn=_,j.cc=U,j.level=r,m&&(j.initSegment=m,j.rawProgramDateTime=m.rawProgramDateTime,m.rawProgramDateTime=null,et&&(j.setByteRange(et),et=null)));const Ft=re[1];if(Ft){j.duration=parseFloat(Ft);const _t=(" "+re[2]).slice(1);j.title=_t||null,j.tagList.push(_t?["INF",Ft,_t]:["INF",Ft])}else if(re[3]){if(Y(j.duration)){j.start=C,Xe&&Qn(j,Xe,u),j.sn=_,j.level=r,j.cc=U,f.push(j);const _t=(" "+re[3]).slice(1);j.relurl=Qt(u,_t),ai(j,F),F=j,C+=j.duration,_++,b=0,dt=!0}}else if(re[4]){const _t=(" "+re[4]).slice(1);F?j.setByteRange(_t,F):j.setByteRange(_t)}else if(re[5])j.rawProgramDateTime=(" "+re[5]).slice(1),j.tagList.push(["PROGRAM-DATE-TIME",j.rawProgramDateTime]),Ze===-1&&(Ze=f.length);else{if(re=re[0].match(Bn),!re){R.warn("No matches on slow regex match for level playlist!");continue}for(De=1;De<re.length&&typeof re[De]=="undefined";De++);const _t=(" "+re[De]).slice(1),At=(" "+re[De+1]).slice(1),ar=re[De+2]?(" "+re[De+2]).slice(1):"";switch(_t){case"PLAYLIST-TYPE":u.type=At.toUpperCase();break;case"MEDIA-SEQUENCE":_=u.startSN=parseInt(At);break;case"SKIP":{const $t=new ge(At);Tt(u,$t,["RECENTLY-REMOVED-DATERANGES"]);const sr=$t.decimalInteger("SKIPPED-SEGMENTS");if(Y(sr)){u.skippedSegments=sr;for(let Jt=sr;Jt--;)f.unshift(null);_+=sr}const ir=$t.enumeratedString("RECENTLY-REMOVED-DATERANGES");ir&&(u.recentlyRemovedDateranges=ir.split(" "));break}case"TARGETDURATION":u.targetduration=Math.max(parseInt(At),1);break;case"VERSION":u.version=parseInt(At);break;case"INDEPENDENT-SEGMENTS":case"EXTM3U":break;case"ENDLIST":u.live=!1;break;case"#":(At||ar)&&j.tagList.push(ar?[At,ar]:[At]);break;case"DISCONTINUITY":U++,j.tagList.push(["DIS"]);break;case"GAP":j.gap=!0,j.tagList.push([_t]);break;case"BITRATE":j.tagList.push([_t,At]);break;case"DATERANGE":{const $t=new ge(At);Tt(u,$t,["ID","CLASS","START-DATE","END-DATE","SCTE35-CMD","SCTE35-OUT","SCTE35-IN"]),Tt(u,$t,$t.clientAttrs);const sr=new Ie($t,u.dateRanges[$t.ID]);sr.isValid||u.skippedSegments?u.dateRanges[sr.id]=sr:R.warn(`Ignoring invalid DATERANGE tag: "${At}"`),j.tagList.push(["EXT-X-DATERANGE",At]);break}case"DEFINE":{{const $t=new ge(At);Tt(u,$t,["NAME","VALUE","IMPORT","QUERYPARAM"]),"IMPORT"in $t?_r(u,$t,s):Er(u,$t,t)}break}case"DISCONTINUITY-SEQUENCE":U=parseInt(At);break;case"KEY":{const $t=Kn(At,t,u);if($t.isSupported()){if($t.method==="NONE"){Xe=void 0;break}Xe||(Xe={}),Xe[$t.keyFormat]&&(Xe=l({},Xe)),Xe[$t.keyFormat]=$t}else R.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${At}"`);break}case"START":u.startTimeOffset=bi(At);break;case"MAP":{const $t=new ge(At);if(Tt(u,$t,["BYTERANGE","URI"]),j.duration){const sr=new Z(n,t);wi(sr,$t,r,Xe),m=sr,j.initSegment=m,m.rawProgramDateTime&&!j.rawProgramDateTime&&(j.rawProgramDateTime=m.rawProgramDateTime)}else{const sr=j.byteRangeEndOffset;if(sr){const ir=j.byteRangeStartOffset;et=`${sr-ir}@${ir}`}else et=null;wi(j,$t,r,Xe),m=j,dt=!0}break}case"SERVER-CONTROL":{const $t=new ge(At);u.canBlockReload=$t.bool("CAN-BLOCK-RELOAD"),u.canSkipUntil=$t.optionalFloat("CAN-SKIP-UNTIL",0),u.canSkipDateRanges=u.canSkipUntil>0&&$t.bool("CAN-SKIP-DATERANGES"),u.partHoldBack=$t.optionalFloat("PART-HOLD-BACK",0),u.holdBack=$t.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{const $t=new ge(At);u.partTarget=$t.decimalFloatingPoint("PART-TARGET");break}case"PART":{let $t=u.partList;$t||($t=u.partList=[]);const sr=b>0?$t[$t.length-1]:void 0,ir=b++,Jt=new ge(At);Tt(u,Jt,["BYTERANGE","URI"]);const Ar=new ee(Jt,j,t,ir,sr);$t.push(Ar),j.duration+=Ar.duration;break}case"PRELOAD-HINT":{const $t=new ge(At);Tt(u,$t,["URI"]),u.preloadHint=$t;break}case"RENDITION-REPORT":{const $t=new ge(At);Tt(u,$t,["URI"]),u.renditionReports=u.renditionReports||[],u.renditionReports.push($t);break}default:R.warn(`line parsed but not handled: ${re}`);break}}}F&&!F.relurl?(f.pop(),C-=F.duration,u.partList&&(u.fragmentHint=F)):u.partList&&(ai(j,F),j.cc=U,u.fragmentHint=j,Xe&&Qn(j,Xe,u));const yt=f.length,ct=f[0],St=f[yt-1];if(C+=u.skippedSegments*u.targetduration,C>0&&yt&&St){u.averagetargetduration=C/yt;const Ft=St.sn;u.endSN=Ft!=="initSegment"?Ft:0,u.live||(St.endList=!0),ct&&(u.startCC=ct.cc)}else u.endSN=0,u.startCC=0;return u.fragmentHint&&(C+=u.fragmentHint.duration),u.totalduration=C,u.endCC=U,Ze>0&&dn(f,Ze),u}}function Kn(a,e,t){var r,n;const i=new ge(a);Tt(t,i,["KEYFORMAT","KEYFORMATVERSIONS","URI","IV","URI"]);const s=(r=i.METHOD)!=null?r:"",u=i.URI,f=i.hexadecimalInteger("IV"),m=i.KEYFORMATVERSIONS,_=(n=i.KEYFORMAT)!=null?n:"identity";u&&i.IV&&!f&&R.error(`Invalid IV: ${i.IV}`);const b=u?Jr.resolve(u,e):"",C=(m||"1").split("/").map(Number).filter(Number.isFinite);return new lr(s,b,_,C,f)}function bi(a){const t=new ge(a).decimalFloatingPoint("TIME-OFFSET");return Y(t)?t:null}function Ci(a,e){let t=(a||"").split(/[ ,]+/).filter(r=>r);["video","audio","text"].forEach(r=>{const n=t.filter(i=>Tr(i,r));n.length&&(e[`${r}Codec`]=n.join(","),t=t.filter(i=>n.indexOf(i)===-1))}),e.unknownCodecs=t}function xi(a,e,t){const r=e[t];r&&(a[t]=r)}function dn(a,e){let t=a[e];for(let r=e;r--;){const n=a[r];if(!n)return;n.programDateTime=t.programDateTime-n.duration*1e3,t=n}}function ai(a,e){a.rawProgramDateTime?a.programDateTime=Date.parse(a.rawProgramDateTime):e!=null&&e.programDateTime&&(a.programDateTime=e.endProgramDateTime),Y(a.programDateTime)||(a.programDateTime=null,a.rawProgramDateTime=null)}function wi(a,e,t,r){a.relurl=e.URI,e.BYTERANGE&&a.setByteRange(e.BYTERANGE),a.level=t,a.sn="initSegment",r&&(a.levelkeys=r),a.initSegment=null}function Qn(a,e,t){a.levelkeys=e;const{encryptedFragments:r}=t;(!r.length||r[r.length-1].levelkeys!==e)&&Object.keys(e).some(n=>e[n].isCommonEncryption)&&r.push(a)}var or={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},Ve={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};function Zt(a){const{type:e}=a;switch(e){case or.AUDIO_TRACK:return Ve.AUDIO;case or.SUBTITLE_TRACK:return Ve.SUBTITLE;default:return Ve.MAIN}}function Fr(a,e){let t=a.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class Hn{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.LEVEL_LOADING,this.onLevelLoading,this),e.on(d.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(d.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}unregisterListeners(){const{hls:e}=this;e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.LEVEL_LOADING,this.onLevelLoading,this),e.off(d.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(d.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}createInternalLoader(e){const t=this.hls.config,r=t.pLoader,n=t.loader,i=r||n,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:r}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:or.MANIFEST,url:r,deliveryDirectives:null})}onLevelLoading(e,t){const{id:r,level:n,pathwayId:i,url:s,deliveryDirectives:u}=t;this.load({id:r,level:n,pathwayId:i,responseType:"text",type:or.LEVEL,url:s,deliveryDirectives:u})}onAudioTrackLoading(e,t){const{id:r,groupId:n,url:i,deliveryDirectives:s}=t;this.load({id:r,groupId:n,level:null,responseType:"text",type:or.AUDIO_TRACK,url:i,deliveryDirectives:s})}onSubtitleTrackLoading(e,t){const{id:r,groupId:n,url:i,deliveryDirectives:s}=t;this.load({id:r,groupId:n,level:null,responseType:"text",type:or.SUBTITLE_TRACK,url:i,deliveryDirectives:s})}load(e){var t;const r=this.hls.config;let n=this.getInternalLoader(e);if(n){const m=n.context;if(m&&m.url===e.url&&m.level===e.level){R.trace("[playlist-loader]: playlist request ongoing");return}R.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),n.abort()}let i;if(e.type===or.MANIFEST?i=r.manifestLoadPolicy.default:i=l({},r.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),n=this.createInternalLoader(e),Y((t=e.deliveryDirectives)==null?void 0:t.part)){let m;if(e.type===or.LEVEL&&e.level!==null?m=this.hls.levels[e.level].details:e.type===or.AUDIO_TRACK&&e.id!==null?m=this.hls.audioTracks[e.id].details:e.type===or.SUBTITLE_TRACK&&e.id!==null&&(m=this.hls.subtitleTracks[e.id].details),m){const _=m.partTarget,b=m.targetduration;if(_&&b){const C=Math.max(_*3,b*.8)*1e3;i=l({},i,{maxTimeToFirstByteMs:Math.min(C,i.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(C,i.maxTimeToFirstByteMs)})}}}const s=i.errorRetry||i.timeoutRetry||{},u={loadPolicy:i,timeout:i.maxLoadTimeMs,maxRetry:s.maxNumRetry||0,retryDelay:s.retryDelayMs||0,maxRetryDelay:s.maxRetryDelayMs||0},f={onSuccess:(m,_,b,C)=>{const U=this.getInternalLoader(b);this.resetInternalLoader(b.type);const F=m.data;if(F.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(m,b,new Error("no EXTM3U delimiter"),C||null,_);return}_.parsing.start=performance.now(),Jr.isMediaPlaylist(F)?this.handleTrackOrLevelPlaylist(m,_,b,C||null,U):this.handleMasterPlaylist(m,_,b,C)},onError:(m,_,b,C)=>{this.handleNetworkError(_,b,!1,m,C)},onTimeout:(m,_,b)=>{this.handleNetworkError(_,b,!0,void 0,m)}};n.load(e,u,f)}handleMasterPlaylist(e,t,r,n){const i=this.hls,s=e.data,u=Fr(e,r),f=Jr.parseMasterPlaylist(s,u);if(f.playlistParsingError){this.handleManifestParsingError(e,r,f.playlistParsingError,n,t);return}const{contentSteering:m,levels:_,sessionData:b,sessionKeys:C,startTimeOffset:U,variableList:F}=f;this.variableList=F;const{AUDIO:j=[],SUBTITLES:re,"CLOSED-CAPTIONS":De}=Jr.parseMasterPlaylistMedia(s,u,f);j.length&&!j.some(Ze=>!Ze.url)&&_[0].audioCodec&&!_[0].attrs.AUDIO&&(R.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),j.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new ge({}),bitrate:0,url:""})),i.trigger(d.MANIFEST_LOADED,{levels:_,audioTracks:j,subtitles:re,captions:De,contentSteering:m,url:u,stats:t,networkDetails:n,sessionData:b,sessionKeys:C,startTimeOffset:U,variableList:F})}handleTrackOrLevelPlaylist(e,t,r,n,i){const s=this.hls,{id:u,level:f,type:m}=r,_=Fr(e,r),b=0,C=Y(f)?f:Y(u)?u:0,U=Zt(r),F=Jr.parseLevelPlaylist(e.data,_,C,U,b,this.variableList);if(m===or.MANIFEST){const j={attrs:new ge({}),bitrate:0,details:F,name:"",url:_};s.trigger(d.MANIFEST_LOADED,{levels:[j],audioTracks:[],url:_,stats:t,networkDetails:n,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),r.levelDetails=F,this.handlePlaylistLoaded(F,e,t,r,n,i)}handleManifestParsingError(e,t,r,n,i){this.hls.trigger(d.ERROR,{type:w.NETWORK_ERROR,details:y.MANIFEST_PARSING_ERROR,fatal:t.type===or.MANIFEST,url:e.url,err:r,error:r,reason:r.message,response:e,context:t,networkDetails:n,stats:i})}handleNetworkError(e,t,r=!1,n,i){let s=`A network ${r?"timeout":"error"+(n?" (status "+n.code+")":"")} occurred while loading ${e.type}`;e.type===or.LEVEL?s+=`: ${e.level} id: ${e.id}`:(e.type===or.AUDIO_TRACK||e.type===or.SUBTITLE_TRACK)&&(s+=` id: ${e.id} group-id: "${e.groupId}"`);const u=new Error(s);R.warn(`[playlist-loader]: ${s}`);let f=y.UNKNOWN,m=!1;const _=this.getInternalLoader(e);switch(e.type){case or.MANIFEST:f=r?y.MANIFEST_LOAD_TIMEOUT:y.MANIFEST_LOAD_ERROR,m=!0;break;case or.LEVEL:f=r?y.LEVEL_LOAD_TIMEOUT:y.LEVEL_LOAD_ERROR,m=!1;break;case or.AUDIO_TRACK:f=r?y.AUDIO_TRACK_LOAD_TIMEOUT:y.AUDIO_TRACK_LOAD_ERROR,m=!1;break;case or.SUBTITLE_TRACK:f=r?y.SUBTITLE_TRACK_LOAD_TIMEOUT:y.SUBTITLE_LOAD_ERROR,m=!1;break}_&&this.resetInternalLoader(e.type);const b={type:w.NETWORK_ERROR,details:f,fatal:m,url:e.url,loader:_,context:e,error:u,networkDetails:t,stats:i};if(n){const C=(t==null?void 0:t.url)||e.url;b.response=$e({url:C,data:void 0},n)}this.hls.trigger(d.ERROR,b)}handlePlaylistLoaded(e,t,r,n,i,s){const u=this.hls,{type:f,level:m,id:_,groupId:b,deliveryDirectives:C}=n,U=Fr(t,n),F=Zt(n),j=typeof n.level=="number"&&F===Ve.MAIN?m:void 0;if(!e.fragments.length){const De=new Error("No Segments found in Playlist");u.trigger(d.ERROR,{type:w.NETWORK_ERROR,details:y.LEVEL_EMPTY_ERROR,fatal:!1,url:U,error:De,reason:De.message,response:t,context:n,level:j,parent:F,networkDetails:i,stats:r});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const re=e.playlistParsingError;if(re){u.trigger(d.ERROR,{type:w.NETWORK_ERROR,details:y.LEVEL_PARSING_ERROR,fatal:!1,url:U,error:re,reason:re.message,response:t,context:n,level:j,parent:F,networkDetails:i,stats:r});return}switch(e.live&&s&&(s.getCacheAge&&(e.ageHeader=s.getCacheAge()||0),(!s.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),f){case or.MANIFEST:case or.LEVEL:u.trigger(d.LEVEL_LOADED,{details:e,level:j||0,id:_||0,stats:r,networkDetails:i,deliveryDirectives:C});break;case or.AUDIO_TRACK:u.trigger(d.AUDIO_TRACK_LOADED,{details:e,id:_||0,groupId:b||"",stats:r,networkDetails:i,deliveryDirectives:C});break;case or.SUBTITLE_TRACK:u.trigger(d.SUBTITLE_TRACK_LOADED,{details:e,id:_||0,groupId:b||"",stats:r,networkDetails:i,deliveryDirectives:C});break}}}function oi(a,e){let t;try{t=new Event("addtrack")}catch(r){t=document.createEvent("Event"),t.initEvent("addtrack",!1,!1)}t.track=a,e.dispatchEvent(t)}function li(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(r){R.debug(`[texttrack-utils]: ${r}`);try{const n=new self.TextTrackCue(e.startTime,e.endTime,e.text);n.id=e.id,a.addCue(n)}catch(n){R.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${n}`)}}t==="disabled"&&(a.mode=t)}function En(a){const e=a.mode;if(e==="disabled"&&(a.mode="hidden"),a.cues)for(let t=a.cues.length;t--;)a.removeCue(a.cues[t]);e==="disabled"&&(a.mode=e)}function vr(a,e,t,r){const n=a.mode;if(n==="disabled"&&(a.mode="hidden"),a.cues&&a.cues.length>0){const i=In(a.cues,e,t);for(let s=0;s<i.length;s++)(!r||r(i[s]))&&a.removeCue(i[s])}n==="disabled"&&(a.mode=n)}function Sn(a,e){if(e<a[0].startTime)return 0;const t=a.length-1;if(e>a[t].endTime)return-1;let r=0,n=t;for(;r<=n;){const i=Math.floor((n+r)/2);if(e<a[i].startTime)n=i-1;else if(e>a[i].startTime&&r<t)r=i+1;else return i}return a[r].startTime-e<e-a[n].startTime?r:n}function In(a,e,t){const r=[],n=Sn(a,e);if(n>-1)for(let i=n,s=a.length;i<s;i++){const u=a[i];if(u.startTime>=e&&u.endTime<=t)r.push(u);else if(u.startTime>t)return r}return r}function Yr(a){const e=[];for(let t=0;t<a.length;t++){const r=a[t];(r.kind==="subtitles"||r.kind==="captions")&&r.label&&e.push(a[t])}return e}var pn={audioId3:"org.id3",dateRange:"com.apple.quicktime.HLS",emsg:"https://aomedia.org/emsg/ID3"};const $i=.25;function Wn(){if(typeof self!="undefined")return self.VTTCue||self.TextTrackCue}function ei(a,e,t,r,n){let i=new a(e,t,"");try{i.value=r,n&&(i.type=n)}catch(s){i=new a(e,t,JSON.stringify(n?$e({type:n},r):r))}return i}const Bt=(()=>{const a=Wn();try{a&&new a(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function Dn(a,e){return a.getTime()/1e3-e}function Qr(a){return Uint8Array.from(a.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}class mn{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null}_registerListeners(){const{hls:e}=this;e.on(d.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(d.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(d.LEVEL_UPDATED,this.onLevelUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(d.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(d.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(d.LEVEL_UPDATED,this.onLevelUpdated,this)}onMediaAttached(e,t){this.media=t.media}onMediaDetaching(){this.id3Track&&(En(this.id3Track),this.id3Track=null,this.media=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 r=e[t];if(r.kind==="metadata"&&r.label==="id3")return oi(r,this.media),r}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media)return;const{hls:{config:{enableEmsgMetadataCues:r,enableID3MetadataCues:n}}}=this;if(!r&&!n)return;const{samples:i}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const s=Wn();if(s)for(let u=0;u<i.length;u++){const f=i[u].type;if(f===pn.emsg&&!r||!n)continue;const m=W(i[u].data);if(m){const _=i[u].pts;let b=_+i[u].duration;b>Bt&&(b=Bt),b-_<=0&&(b=_+$i);for(let U=0;U<m.length;U++){const F=m[U];if(!te(F)){this.updateId3CueEnds(_,f);const j=ei(s,_,b,F,f);j&&this.id3Track.addCue(j)}}}}}updateId3CueEnds(e,t){var r;const n=(r=this.id3Track)==null?void 0:r.cues;if(n)for(let i=n.length;i--;){const s=n[i];s.type===t&&s.startTime<e&&s.endTime===Bt&&(s.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:r,type:n}){const{id3Track:i,hls:s}=this;if(!s)return;const{config:{enableEmsgMetadataCues:u,enableID3MetadataCues:f}}=s;if(i&&(u||f)){let m;n==="audio"?m=_=>_.type===pn.audioId3&&f:n==="video"?m=_=>_.type===pn.emsg&&u:m=_=>_.type===pn.audioId3&&f||_.type===pn.emsg&&u,vr(i,t,r,m)}}onLevelUpdated(e,{details:t}){if(!this.media||!t.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{dateRangeCuesAppended:r,id3Track:n}=this,{dateRanges:i}=t,s=Object.keys(i);if(n){const _=Object.keys(r).filter(b=>!s.includes(b));for(let b=_.length;b--;){const C=_[b];Object.keys(r[C].cues).forEach(U=>{n.removeCue(r[C].cues[U])}),delete r[C]}}const u=t.fragments[t.fragments.length-1];if(s.length===0||!Y(u==null?void 0:u.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const f=u.programDateTime/1e3-u.start,m=Wn();for(let _=0;_<s.length;_++){const b=s[_],C=i[b],U=Dn(C.startDate,f),F=r[b],j=(F==null?void 0:F.cues)||{};let re=(F==null?void 0:F.durationKnown)||!1,De=Bt;const Xe=C.endDate;if(Xe)De=Dn(Xe,f),re=!0;else if(C.endOnNext&&!re){const dt=s.reduce((et,yt)=>{if(yt!==C.id){const ct=i[yt];if(ct.class===C.class&&ct.startDate>C.startDate&&(!et||C.startDate<et.startDate))return ct}return et},null);dt&&(De=Dn(dt.startDate,f),re=!0)}const Ze=Object.keys(C.attr);for(let dt=0;dt<Ze.length;dt++){const et=Ze[dt];if(!be(et))continue;const yt=j[et];if(yt)re&&!F.durationKnown&&(yt.endTime=De);else if(m){let ct=C.attr[et];Ne(et)&&(ct=Qr(ct));const St=ei(m,U,De,{key:et,data:ct},pn.dateRange);St&&(St.id=b,this.id3Track.addCue(St),j[et]=St)}}r[b]={cues:j,dateRange:C,durationKnown:re}}}}class Gi{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this.timeupdateHandler=()=>this.timeupdate(),this.hls=e,this.config=e.config,this.registerListeners()}get latency(){return this._latency||0}get maxLatency(){const{config:e,levelDetails:t}=this;return e.liveMaxLatencyDuration!==void 0?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const{levelDetails:e}=this;if(e===null)return null;const{holdBack:t,partHoldBack:r,targetduration:n}=e,{liveSyncDuration:i,liveSyncDurationCount:s,lowLatencyMode:u}=this.config,f=this.hls.userConfig;let m=u&&r||t;(f.liveSyncDuration||f.liveSyncDurationCount||m===0)&&(m=i!==void 0?i:s*n);const _=n;return m+Math.min(this.stallCount*1,_)}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency,r=this.levelDetails;if(e===null||t===null||r===null)return null;const n=r.edge,i=e-t-this.edgeStalled,s=n-r.totalduration,u=n-(this.config.lowLatencyMode&&r.partTarget||r.targetduration);return Math.min(Math.max(s,i),u)}get drift(){const{levelDetails:e}=this;return e===null?1:e.drift}get edgeStalled(){const{levelDetails:e}=this;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,levelDetails:t}=this;if(!e||!t)return 0;const r=e.buffered.length;return(r?e.buffered.end(r-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=this.timeupdateHandler=null}registerListeners(){this.hls.on(d.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(d.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(d.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(d.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(d.ERROR,this.onError,this)}unregisterListeners(){this.hls.off(d.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(d.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(d.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(d.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(d.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.timeupdateHandler)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.timeupdateHandler),this.media=null)}onManifestLoading(){this.levelDetails=null,this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){this.levelDetails=t,t.advanced&&this.timeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.timeupdateHandler)}onError(e,t){var r;t.details===y.BUFFER_STALLED_ERROR&&(this.stallCount++,(r=this.levelDetails)!=null&&r.live&&R.warn("[playback-rate-controller]: Stall detected, adjusting target latency"))}timeupdate(){const{media:e,levelDetails:t}=this;if(!e||!t)return;this.currentTime=e.currentTime;const r=this.computeLatency();if(r===null)return;this._latency=r;const{lowLatencyMode:n,maxLiveSyncPlaybackRate:i}=this.config;if(!n||i===1||!t.live)return;const s=this.targetLatency;if(s===null)return;const u=r-s,f=Math.min(this.maxLatency,s+t.targetduration);if(u<f&&u>.05&&this.forwardBufferLength>1){const _=Math.min(2,Math.max(1,i)),b=Math.round(2/(1+Math.exp(-.75*u-this.edgeStalled))*20)/20;e.playbackRate=Math.min(_,Math.max(1,b))}else e.playbackRate!==1&&e.playbackRate!==0&&(e.playbackRate=1)}estimateLiveEdge(){const{levelDetails:e}=this;return e===null?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return e===null?null:e-this.currentTime}}const ti=["NONE","TYPE-0","TYPE-1",null];function Vn(a){return ti.indexOf(a)>-1}const Nn=["SDR","PQ","HLG"];function qr(a){return!!a&&Nn.indexOf(a)>-1}var Un={No:"",Yes:"YES",v2:"v2"};function On(a){const{canSkipUntil:e,canSkipDateRanges:t,age:r}=a,n=r<e/2;return e&&n?t?Un.v2:Un.Yes:Un.No}class Ri{constructor(e,t,r){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=r}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 gn{constructor(e){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.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(t=>!!t).map(t=>t.substring(0,4)).join(","),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 An(this._audioGroups,e)}hasSubtitleGroup(e){return An(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,t){if(t){if(e==="audio"){let r=this._audioGroups;r||(r=this._audioGroups=[]),r.indexOf(t)===-1&&r.push(t)}else if(e==="text"){let r=this._subtitleGroups;r||(r=this._subtitleGroups=[]),r.indexOf(t)===-1&&r.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 An(a,e){return!e||!a?!1:a.indexOf(e)!==-1}function cr(a,e){const t=e.startPTS;if(Y(t)){let r=0,n;e.sn>a.sn?(r=t-a.start,n=a):(r=a.start-t,n=e),n.duration!==r&&(n.duration=r)}else e.sn>a.sn?a.cc===e.cc&&a.minEndPTS?e.start=a.start+(a.minEndPTS-a.start):e.start=a.start+a.duration:e.start=Math.max(a.start-e.duration,0)}function ui(a,e,t,r,n,i){r-t<=0&&(R.warn("Fragment should have a positive duration",e),r=t+e.duration,i=n+e.duration);let u=t,f=r;const m=e.startPTS,_=e.endPTS;if(Y(m)){const re=Math.abs(m-t);Y(e.deltaPTS)?e.deltaPTS=Math.max(re,e.deltaPTS):e.deltaPTS=re,u=Math.max(t,m),t=Math.min(t,m),n=Math.min(n,e.startDTS),f=Math.min(r,_),r=Math.max(r,_),i=Math.max(i,e.endDTS)}const b=t-e.start;e.start!==0&&(e.start=t),e.duration=r-e.start,e.startPTS=t,e.maxStartPTS=u,e.startDTS=n,e.endPTS=r,e.minEndPTS=f,e.endDTS=i;const C=e.sn;if(!a||C<a.startSN||C>a.endSN)return 0;let U;const F=C-a.startSN,j=a.fragments;for(j[F]=e,U=F;U>0;U--)cr(j[U],j[U-1]);for(U=F;U<j.length-1;U++)cr(j[U],j[U+1]);return a.fragmentHint&&cr(j[j.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,b}function Li(a,e){let t=null;const r=a.fragments;for(let u=r.length-1;u>=0;u--){const f=r[u].initSegment;if(f){t=f;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;let n;ci(a,e,(u,f,m,_)=>{if(e.skippedSegments&&f.cc!==u.cc){const b=u.cc-f.cc;for(let C=m;C<_.length;C++)_[C].cc+=b}Y(u.startPTS)&&Y(u.endPTS)&&(f.start=f.startPTS=u.startPTS,f.startDTS=u.startDTS,f.maxStartPTS=u.maxStartPTS,f.endPTS=u.endPTS,f.endDTS=u.endDTS,f.minEndPTS=u.minEndPTS,f.duration=u.endPTS-u.startPTS,f.duration&&(n=f),e.PTSKnown=e.alignedSliding=!0),f.elementaryStreams=u.elementaryStreams,f.loader=u.loader,f.stats=u.stats,u.initSegment&&(f.initSegment=u.initSegment,t=u.initSegment)});const i=e.fragments;if(t&&(e.fragmentHint?i.concat(e.fragmentHint):i).forEach(f=>{var m;f&&(!f.initSegment||f.initSegment.relurl===((m=t)==null?void 0:m.relurl))&&(f.initSegment=t)}),e.skippedSegments){if(e.deltaUpdateFailed=i.some(u=>!u),e.deltaUpdateFailed){R.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let u=e.skippedSegments;u--;)i.shift();e.startSN=i[0].sn}else e.canSkipDateRanges&&(e.dateRanges=Ii(a.dateRanges,e.dateRanges,e.recentlyRemovedDateranges));e.startCC=e.fragments[0].cc,e.endCC=i[i.length-1].cc}_n(a.partList,e.partList,(u,f)=>{f.elementaryStreams=u.elementaryStreams,f.stats=u.stats}),n?ui(e,n,n.startPTS,n.endPTS,n.startDTS,n.endDTS):ji(a,e),i.length&&(e.totalduration=e.edge-i[0].start),e.driftStartTime=a.driftStartTime,e.driftStart=a.driftStart;const s=e.advancedDateTime;if(e.advanced&&s){const u=e.edge;e.driftStart||(e.driftStartTime=s,e.driftStart=u),e.driftEndTime=s,e.driftEnd=u}else e.driftEndTime=a.driftEndTime,e.driftEnd=a.driftEnd,e.advancedDateTime=a.advancedDateTime}function Ii(a,e,t){const r=l({},a);return t&&t.forEach(n=>{delete r[n]}),Object.keys(e).forEach(n=>{const i=new Ie(e[n].attr,r[n]);i.isValid?r[n]=i:R.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${JSON.stringify(e[n].attr)}"`)}),r}function _n(a,e,t){if(a&&e){let r=0;for(let n=0,i=a.length;n<=i;n++){const s=a[n],u=e[n+r];s&&u&&s.index===u.index&&s.fragment.sn===u.fragment.sn?t(s,u):r--}}}function ci(a,e,t){const r=e.skippedSegments,n=Math.max(a.startSN,e.startSN)-e.startSN,i=(a.fragmentHint?1:0)+(r?e.endSN:Math.min(a.endSN,e.endSN))-e.startSN,s=e.startSN-a.startSN,u=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,f=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments;for(let m=n;m<=i;m++){const _=f[s+m];let b=u[m];r&&!b&&m<r&&(b=e.fragments[m]=_),_&&b&&t(_,b,m,u)}}function ji(a,e){const t=e.startSN+e.skippedSegments-a.startSN,r=a.fragments;t<0||t>=r.length||wt(e,r[t].start)}function wt(a,e){if(e){const t=a.fragments;for(let r=a.skippedSegments;r<t.length;r++)t[r].start+=e;a.fragmentHint&&(a.fragmentHint.start+=e)}}function vn(a,e=1/0){let t=1e3*a.targetduration;if(a.updated){const r=a.fragments;if(r.length&&t*4>e){const i=r[r.length-1].duration*1e3;i<t&&(t=i)}}else t/=2;return Math.round(t)}function Oi(a,e,t){if(!(a!=null&&a.details))return null;const r=a.details;let n=r.fragments[e-r.startSN];return n||(n=r.fragmentHint,n&&n.sn===e)?n:e<r.startSN&&t&&t.sn===e?t:null}function hi(a,e,t){var r;return a!=null&&a.details?cn((r=a.details)==null?void 0:r.partList,e,t):null}function cn(a,e,t){if(a)for(let r=a.length;r--;){const n=a[r];if(n.index===t&&n.fragment.sn===e)return n}return null}function en(a){a.forEach((e,t)=>{const{details:r}=e;r!=null&&r.fragments&&r.fragments.forEach(n=>{n.level=t})})}function xr(a){switch(a.details){case y.FRAG_LOAD_TIMEOUT:case y.KEY_LOAD_TIMEOUT:case y.LEVEL_LOAD_TIMEOUT:case y.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function Pn(a,e){const t=xr(e);return a.default[`${t?"timeout":"error"}Retry`]}function zn(a,e){const t=a.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*a.retryDelayMs,a.maxRetryDelayMs)}function ri(a){return $e($e({},a),{errorRetry:null,timeoutRetry:null})}function $n(a,e,t,r){if(!a)return!1;const n=r==null?void 0:r.code,i=e<a.maxNumRetry&&(Pi(n)||!!t);return a.shouldRetry?a.shouldRetry(a,e,t,r,i):i}function Pi(a){return a===0&&navigator.onLine===!1||!!a&&(a<400||a>499)}const Fi={search:function(a,e){let t=0,r=a.length-1,n=null,i=null;for(;t<=r;){n=(t+r)/2|0,i=a[n];const s=e(i);if(s>0)t=n+1;else if(s<0)r=n-1;else return i}return null}};function Ki(a,e,t){if(e===null||!Array.isArray(a)||!a.length||!Y(e))return null;const r=a[0].programDateTime;if(e<(r||0))return null;const n=a[a.length-1].endProgramDateTime;if(e>=(n||0))return null;t=t||0;for(let i=0;i<a.length;++i){const s=a[i];if(ts(e,t,s))return s}return null}function Ei(a,e,t=0,r=0,n=.005){let i=null;if(a){i=e[a.sn-e[0].sn+1]||null;const u=a.endDTS-t;u>0&&u<15e-7&&(t+=15e-7)}else t===0&&e[0].start===0&&(i=e[0]);if(i&&((!a||a.level===i.level)&&Mi(t,r,i)===0||es(i,a,Math.min(n,r))))return i;const s=Fi.search(e,Mi.bind(null,t,r));return s&&(s!==a||!i)?s:i}function es(a,e,t){if(e&&e.start===0&&e.level<a.level&&(e.endPTS||0)>0){const r=e.tagList.reduce((n,i)=>(i[0]==="INF"&&(n+=parseFloat(i[1])),n),t);return a.start<=r}return!1}function Mi(a=0,e=0,t){if(t.start<=a&&t.start+t.duration>a)return 0;const r=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-r<=a?1:t.start-r>a&&t.start?-1:0}function ts(a,e,t){const r=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-r>a}function Wt(a,e){return Fi.search(a,t=>t.cc<e?1:t.cc>e?-1:0)}var Ot={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},dr={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,SwitchToSDR:4};class Zr{constructor(e){this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.log=void 0,this.warn=void 0,this.error=void 0,this.hls=e,this.log=R.log.bind(R,"[info]:"),this.warn=R.warn.bind(R,"[warning]:"),this.error=R.error.bind(R,"[error]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(d.ERROR,this.onError,this),e.on(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(d.ERROR,this.onError,this),e.off(d.ERROR,this.onErrorOut,this),e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.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)===Ve.MAIN?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var r,n;if(t.fatal)return;const i=this.hls,s=t.context;switch(t.details){case y.FRAG_LOAD_ERROR:case y.FRAG_LOAD_TIMEOUT:case y.KEY_LOAD_ERROR:case y.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case y.FRAG_PARSING_ERROR:if((r=t.frag)!=null&&r.gap){t.errorAction={action:Ot.DoNothing,flags:dr.None};return}case y.FRAG_GAP:case y.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=Ot.SendAlternateToPenaltyBox;return}case y.LEVEL_EMPTY_ERROR:case y.LEVEL_PARSING_ERROR:{var u,f;const m=t.parent===Ve.MAIN?t.level:i.loadLevel;t.details===y.LEVEL_EMPTY_ERROR&&((u=t.context)!=null&&(f=u.levelDetails)!=null&&f.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,m):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,m))}return;case y.LEVEL_LOAD_ERROR:case y.LEVEL_LOAD_TIMEOUT:typeof(s==null?void 0:s.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,s.level));return;case y.AUDIO_TRACK_LOAD_ERROR:case y.AUDIO_TRACK_LOAD_TIMEOUT:case y.SUBTITLE_LOAD_ERROR:case y.SUBTITLE_TRACK_LOAD_TIMEOUT:if(s){const m=i.levels[i.loadLevel];if(m&&(s.type===or.AUDIO_TRACK&&m.hasAudioGroup(s.groupId)||s.type===or.SUBTITLE_TRACK&&m.hasSubtitleGroup(s.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.loadLevel),t.errorAction.action=Ot.SendAlternateToPenaltyBox,t.errorAction.flags=dr.MoveAllAlternatesMatchingHost;return}}return;case y.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const m=i.levels[i.loadLevel],_=m==null?void 0:m.attrs["HDCP-LEVEL"];_?t.errorAction={action:Ot.SendAlternateToPenaltyBox,flags:dr.MoveAllAlternatesMatchingHDCP,hdcpLevel:_}:this.keySystemError(t)}return;case y.BUFFER_ADD_CODEC_ERROR:case y.REMUX_ALLOC_ERROR:case y.BUFFER_APPEND_ERROR:t.errorAction=this.getLevelSwitchAction(t,(n=t.level)!=null?n:i.loadLevel);return;case y.INTERNAL_EXCEPTION:case y.BUFFER_APPENDING_ERROR:case y.BUFFER_FULL_ERROR:case y.LEVEL_SWITCH_ERROR:case y.BUFFER_STALLED_ERROR:case y.BUFFER_SEEK_OVER_HOLE:case y.BUFFER_NUDGE_ON_STALL:t.errorAction={action:Ot.DoNothing,flags:dr.None};return}t.type===w.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 r=this.hls,n=Pn(r.config.playlistLoadPolicy,e),i=this.playlistError++;if($n(n,i,xr(e),e.response))return{action:Ot.RetryRequest,flags:dr.None,retryConfig:n,retryCount:i};const u=this.getLevelSwitchAction(e,t);return n&&(u.retryConfig=n,u.retryCount=i),u}getFragRetryOrSwitchAction(e){const t=this.hls,r=this.getVariantLevelIndex(e.frag),n=t.levels[r],{fragLoadPolicy:i,keyLoadPolicy:s}=t.config,u=Pn(e.details.startsWith("key")?s:i,e),f=t.levels.reduce((_,b)=>_+b.fragmentError,0);if(n&&(e.details!==y.FRAG_GAP&&n.fragmentError++,$n(u,f,xr(e),e.response)))return{action:Ot.RetryRequest,flags:dr.None,retryConfig:u,retryCount:f};const m=this.getLevelSwitchAction(e,r);return u&&(m.retryConfig=u,m.retryCount=f),m}getLevelSwitchAction(e,t){const r=this.hls;t==null&&(t=r.loadLevel);const n=this.hls.levels[t];if(n){var i,s;const m=e.details;n.loadError++,m===y.BUFFER_APPEND_ERROR&&n.fragmentError++;let _=-1;const{levels:b,loadLevel:C,minAutoLevel:U,maxAutoLevel:F}=r;r.autoLevelEnabled||(r.loadLevel=-1);const j=(i=e.frag)==null?void 0:i.type,De=(j===Ve.AUDIO&&m===y.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(m===y.BUFFER_ADD_CODEC_ERROR||m===y.BUFFER_APPEND_ERROR))&&b.some(({audioCodec:yt})=>n.audioCodec!==yt),Ze=e.sourceBufferName==="video"&&(m===y.BUFFER_ADD_CODEC_ERROR||m===y.BUFFER_APPEND_ERROR)&&b.some(({codecSet:yt,audioCodec:ct})=>n.codecSet!==yt&&n.audioCodec===ct),{type:dt,groupId:et}=(s=e.context)!=null?s:{};for(let yt=b.length;yt--;){const ct=(yt+C)%b.length;if(ct!==C&&ct>=U&&ct<=F&&b[ct].loadError===0){var u,f;const St=b[ct];if(m===y.FRAG_GAP&&j===Ve.MAIN&&e.frag){const Ft=b[ct].details;if(Ft){const _t=Ei(e.frag,Ft.fragments,e.frag.start);if(_t!=null&&_t.gap)continue}}else{if(dt===or.AUDIO_TRACK&&St.hasAudioGroup(et)||dt===or.SUBTITLE_TRACK&&St.hasSubtitleGroup(et))continue;if(j===Ve.AUDIO&&(u=n.audioGroups)!=null&&u.some(Ft=>St.hasAudioGroup(Ft))||j===Ve.SUBTITLE&&(f=n.subtitleGroups)!=null&&f.some(Ft=>St.hasSubtitleGroup(Ft))||De&&n.audioCodec===St.audioCodec||!De&&n.audioCodec!==St.audioCodec||Ze&&n.codecSet===St.codecSet)continue}_=ct;break}}if(_>-1&&r.loadLevel!==_)return e.levelRetry=!0,this.playlistError=0,{action:Ot.SendAlternateToPenaltyBox,flags:dr.None,nextAutoLevel:_}}return{action:Ot.SendAlternateToPenaltyBox,flags:dr.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var r;switch((r=t.errorAction)==null?void 0:r.action){case Ot.DoNothing:break;case Ot.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==y.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 Ot.RetryRequest:break}if(t.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(e){const t=this.hls,r=e.errorAction;if(!r)return;const{flags:n,hdcpLevel:i,nextAutoLevel:s}=r;switch(n){case dr.None:this.switchLevel(e,s);break;case dr.MoveAllAlternatesMatchingHDCP:i&&(t.maxHdcpLevel=ti[ti.indexOf(i)-1],r.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}r.resolved||this.switchLevel(e,s)}switchLevel(e,t){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)}}class Nr{constructor(e,t){this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.log=void 0,this.warn=void 0,this.log=R.log.bind(R,`${t}:`),this.warn=R.warn.bind(R,`${t}:`),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.requestScheduled=-1,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t,r){const n=t==null?void 0:t.renditionReports;if(n){let i=-1;for(let s=0;s<n.length;s++){const u=n[s];let f;try{f=new self.URL(u.URI,t.url).href}catch(m){R.warn(`Could not construct new URL for Rendition Report: ${m}`),f=u.URI||""}if(f===e){i=s;break}else f===e.substring(0,f.length)&&(i=s)}if(i!==-1){const s=n[i],u=parseInt(s["LAST-MSN"])||(t==null?void 0:t.lastPartSn);let f=parseInt(s["LAST-PART"])||(t==null?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){const _=Math.min(t.age-t.partTarget,t.targetduration);f>=0&&_>t.partTarget&&(f+=1)}const m=r&&On(r);return new Ri(u,f>=0?f:void 0,m)}}}loadPlaylist(e){this.requestScheduled===-1&&(this.requestScheduled=self.performance.now())}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}shouldReloadPlaylist(e){return this.timer===-1&&this.requestScheduled===-1&&this.shouldLoadPlaylist(e)}playlistLoaded(e,t,r){const{details:n,stats:i}=t,s=self.performance.now(),u=i.loading.first?Math.max(0,s-i.loading.first):0;if(n.advancedDateTime=Date.now()-u,n.live||r!=null&&r.live){if(n.reloaded(r),r&&this.log(`live playlist ${e} ${n.advanced?"REFRESHED "+n.lastPartSn+"-"+n.lastPartIndex:n.updated?"UPDATED":"MISSED"}`),r&&n.fragments.length>0&&Li(r,n),!this.canLoad||!n.live)return;let f,m,_;if(n.canBlockReload&&n.endSN&&n.advanced){const re=this.hls.config.lowLatencyMode,De=n.lastPartSn,Xe=n.endSN,Ze=n.lastPartIndex,dt=Ze!==-1,et=De===Xe,yt=re?0:Ze;dt?(m=et?Xe+1:De,_=et?yt:Ze+1):m=Xe+1;const ct=n.age,St=ct+n.ageHeader;let Ft=Math.min(St-n.partTarget,n.targetduration*1.5);if(Ft>0){if(r&&Ft>r.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${r.tuneInGoal} to: ${Ft} with playlist age: ${n.age}`),Ft=0;else{const _t=Math.floor(Ft/n.targetduration);if(m+=_t,_!==void 0){const At=Math.round(Ft%n.targetduration/n.partTarget);_+=At}this.log(`CDN Tune-in age: ${n.ageHeader}s last advanced ${ct.toFixed(2)}s goal: ${Ft} skip sn ${_t} to part ${_}`)}n.tuneInGoal=Ft}if(f=this.getDeliveryDirectives(n,t.deliveryDirectives,m,_),re||!et){this.loadPlaylist(f);return}}else(n.canBlockReload||n.canSkipUntil)&&(f=this.getDeliveryDirectives(n,t.deliveryDirectives,m,_));const b=this.hls.mainForwardBufferInfo,C=b?b.end-b.len:0,U=(n.edge-C)*1e3,F=vn(n,U);n.updated&&s>this.requestScheduled+F&&(this.requestScheduled=i.loading.start),m!==void 0&&n.canBlockReload?this.requestScheduled=i.loading.first+F-(n.partTarget*1e3||1e3):this.requestScheduled===-1||this.requestScheduled+F<s?this.requestScheduled=s:this.requestScheduled-s<=0&&(this.requestScheduled+=F);let j=this.requestScheduled-s;j=Math.max(0,j),this.log(`reload live playlist ${e} in ${Math.round(j)} ms`),this.timer=self.setTimeout(()=>this.loadPlaylist(f),j)}else this.clearTimer()}getDeliveryDirectives(e,t,r,n){let i=On(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(r=t.msn,n=t.part,i=Un.No),new Ri(r,n,i)}checkRetry(e){const t=e.details,r=xr(e),n=e.errorAction,{action:i,retryCount:s=0,retryConfig:u}=n||{},f=!!n&&!!u&&(i===Ot.RetryRequest||!n.resolved&&i===Ot.SendAlternateToPenaltyBox);if(f){var m;if(this.requestScheduled=-1,s>=u.maxNumRetry)return!1;if(r&&(m=e.context)!=null&&m.deliveryDirectives)this.warn(`Retrying playlist loading ${s+1}/${u.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const _=zn(u,s);this.timer=self.setTimeout(()=>this.loadPlaylist(),_),this.warn(`Retrying playlist loading ${s+1}/${u.maxNumRetry} after "${t}" in ${_}ms`)}e.levelRetry=!0,n.resolved=!0}return f}}class kn{constructor(e,t=0,r=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_=r}sample(e,t){const r=Math.pow(this.alpha_,e);this.estimate_=t*(1-r)+r*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 Hi{constructor(e,t,r,n=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_=r,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new kn(e),this.fast_=new kn(t),this.defaultTTFB_=n,this.ttfb_=new kn(e)}update(e,t){const{slow_:r,fast_:n,ttfb_:i}=this;r.halfLife!==e&&(this.slow_=new kn(e,r.getEstimate(),r.getTotalWeight())),n.halfLife!==t&&(this.fast_=new kn(t,n.getEstimate(),n.getTotalWeight())),i.halfLife!==e&&(this.ttfb_=new kn(e,i.getEstimate(),i.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const r=8*t,n=e/1e3,i=r/n;this.fast_.sample(n,i),this.slow_.sample(n,i)}sampleTTFB(e){const t=e/1e3,r=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(r,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_}destroy(){}}const Wi={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]},Yn={};function Ls(a,e,t,r,n,i){const s=a.audioCodec?a.audioGroups:null,u=i==null?void 0:i.audioCodec,f=i==null?void 0:i.channels,m=f?parseInt(f):u?1/0:2;let _=null;if(s!=null&&s.length)try{s.length===1&&s[0]?_=e.groups[s[0]].channels:_=s.reduce((b,C)=>{if(C){const U=e.groups[C];if(!U)throw new Error(`Audio track group ${C} not found`);Object.keys(U.channels).forEach(F=>{b[F]=(b[F]||0)+U.channels[F]})}return b},{2:0})}catch(b){return!0}return a.videoCodec!==void 0&&(a.width>1920&&a.height>1088||a.height>1920&&a.width>1088||a.frameRate>Math.max(r,30)||a.videoRange!=="SDR"&&a.videoRange!==t||a.bitrate>Math.max(n,8e6))||!!_&&Y(m)&&Object.keys(_).some(b=>parseInt(b)>m)}function ra(a,e,t){const r=a.videoCodec,n=a.audioCodec;if(!r||!n||!t)return Promise.resolve(Wi);const i={width:a.width,height:a.height,bitrate:Math.ceil(Math.max(a.bitrate*.9,a.averageBitrate)),framerate:a.frameRate||30},s=a.videoRange;s!=="SDR"&&(i.transferFunction=s.toLowerCase());const u=r.split(",").map(f=>({type:"media-source",video:$e($e({},i),{},{contentType:nn(f,"video")})}));return n&&a.audioGroups&&a.audioGroups.forEach(f=>{var m;f&&((m=e.groups[f])==null||m.tracks.forEach(_=>{if(_.groupId===f){const b=_.channels||"",C=parseFloat(b);Y(C)&&C>2&&u.push.apply(u,n.split(",").map(U=>({type:"media-source",audio:{contentType:nn(U,"audio"),channels:""+C}})))}}))}),Promise.all(u.map(f=>{const m=Pa(f);return Yn[m]||(Yn[m]=t.decodingInfo(f))})).then(f=>({supported:!f.some(m=>!m.supported),configurations:u,decodingInfoResults:f})).catch(f=>({supported:!1,configurations:u,decodingInfoResults:[],error:f}))}function Pa(a){const{audio:e,video:t}=a,r=t||e;if(r){const n=r.contentType.split('"')[1];if(t)return`r${t.height}x${t.width}f${Math.ceil(t.framerate)}${t.transferFunction||"sd"}_${n}_${Math.ceil(t.bitrate/1e5)}`;if(e)return`c${e.channels}${e.spatialRendering?"s":"n"}_${n}`}return""}function Fa(){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 na(a,e){let t=!1,r=[];return a&&(t=a!=="SDR",r=[a]),e&&(r=e.allowedVideoRanges||Nn.slice(0),t=e.preferHDR!==void 0?e.preferHDR:Fa(),t?r=r.filter(n=>n!=="SDR"):r=["SDR"]),{preferHDR:t,allowedVideoRanges:r}}function Si(a,e,t,r,n){const i=Object.keys(a),s=r==null?void 0:r.channels,u=r==null?void 0:r.audioCodec,f=s&&parseInt(s)===2;let m=!0,_=!1,b=1/0,C=1/0,U=1/0,F=0,j=[];const{preferHDR:re,allowedVideoRanges:De}=na(e,n);for(let et=i.length;et--;){const yt=a[i[et]];m=yt.channels[2]>0,b=Math.min(b,yt.minHeight),C=Math.min(C,yt.minFramerate),U=Math.min(U,yt.minBitrate);const ct=De.filter(St=>yt.videoRanges[St]>0);ct.length>0&&(_=!0,j=ct)}b=Y(b)?b:0,C=Y(C)?C:0;const Xe=Math.max(1080,b),Ze=Math.max(30,C);return U=Y(U)?U:t,t=Math.max(U,t),_||(e=void 0,j=[]),{codecSet:i.reduce((et,yt)=>{const ct=a[yt];if(yt===et)return et;if(ct.minBitrate>t)return Fn(yt,`min bitrate of ${ct.minBitrate} > current estimate of ${t}`),et;if(!ct.hasDefaultAudio)return Fn(yt,"no renditions with default or auto-select sound found"),et;if(u&&yt.indexOf(u.substring(0,4))%5!==0)return Fn(yt,`audio codec preference "${u}" not found`),et;if(s&&!f){if(!ct.channels[s])return Fn(yt,`no renditions with ${s} channel sound found (channels options: ${Object.keys(ct.channels)})`),et}else if((!u||f)&&m&&ct.channels[2]===0)return Fn(yt,"no renditions with stereo sound found"),et;return ct.minHeight>Xe?(Fn(yt,`min resolution of ${ct.minHeight} > maximum of ${Xe}`),et):ct.minFramerate>Ze?(Fn(yt,`min framerate of ${ct.minFramerate} > maximum of ${Ze}`),et):j.some(St=>ct.videoRanges[St]>0)?ct.maxScore<F?(Fn(yt,`max score of ${ct.maxScore} < selected max of ${F}`),et):et&&(Kr(yt)>=Kr(et)||ct.fragmentError>a[et].fragmentError)?et:(F=ct.maxScore,yt):(Fn(yt,`no variants with VIDEO-RANGE of ${JSON.stringify(j)} found`),et)},void 0),videoRanges:j,preferHDR:re,minFramerate:C,minBitrate:U}}function Fn(a,e){R.log(`[abr] start candidates with "${a}" ignored because ${e}`)}function ia(a){return a.reduce((e,t)=>{let r=e.groups[t.groupId];r||(r=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),r.tracks.push(t);const n=t.channels||"2";return r.channels[n]=(r.channels[n]||0)+1,r.hasDefault=r.hasDefault||t.default,r.hasAutoSelect=r.hasAutoSelect||t.autoselect,r.hasDefault&&(e.hasDefaultAudio=!0),r.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function Is(a,e,t,r){return a.slice(t,r+1).reduce((n,i)=>{if(!i.codecSet)return n;const s=i.audioGroups;let u=n[i.codecSet];u||(n[i.codecSet]=u={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!s,fragmentError:0}),u.minBitrate=Math.min(u.minBitrate,i.bitrate);const f=Math.min(i.height,i.width);return u.minHeight=Math.min(u.minHeight,f),u.minFramerate=Math.min(u.minFramerate,i.frameRate),u.maxScore=Math.max(u.maxScore,i.score),u.fragmentError+=i.fragmentError,u.videoRanges[i.videoRange]=(u.videoRanges[i.videoRange]||0)+1,s&&s.forEach(m=>{if(!m)return;const _=e.groups[m];_&&(u.hasDefaultAudio=u.hasDefaultAudio||e.hasDefaultAudio?_.hasDefault:_.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(_.channels).forEach(b=>{u.channels[b]=(u.channels[b]||0)+_.channels[b]}))}),n},{})}function Gn(a,e,t){if("attrs"in a){const r=e.indexOf(a);if(r!==-1)return r}for(let r=0;r<e.length;r++){const n=e[r];if(fi(a,n,t))return r}return-1}function fi(a,e,t){const{groupId:r,name:n,lang:i,assocLang:s,default:u}=a,f=a.forced;return(r===void 0||e.groupId===r)&&(n===void 0||e.name===n)&&(i===void 0||e.lang===i)&&(i===void 0||e.assocLang===s)&&(u===void 0||e.default===u)&&(f===void 0||e.forced===f)&&(!("characteristics"in a)||Ma(a.characteristics||"",e.characteristics))&&(t===void 0||t(a,e))}function Ma(a,e=""){const t=a.split(","),r=e.split(",");return t.length===r.length&&!t.some(n=>r.indexOf(n)===-1)}function Ai(a,e){const{audioCodec:t,channels:r}=a;return(t===void 0||(e.audioCodec||"").substring(0,4)===t.substring(0,4))&&(r===void 0||r===(e.channels||"2"))}function Ba(a,e,t,r,n){const i=e[r],u=e.reduce((C,U,F)=>{const j=U.uri;return(C[j]||(C[j]=[])).push(F),C},{})[i.uri];u.length>1&&(r=Math.max.apply(Math,u));const f=i.videoRange,m=i.frameRate,_=i.codecSet.substring(0,4),b=Os(e,r,C=>{if(C.videoRange!==f||C.frameRate!==m||C.codecSet.substring(0,4)!==_)return!1;const U=C.audioGroups,F=t.filter(j=>!U||U.indexOf(j.groupId)!==-1);return Gn(a,F,n)>-1});return b>-1?b:Os(e,r,C=>{const U=C.audioGroups,F=t.filter(j=>!U||U.indexOf(j.groupId)!==-1);return Gn(a,F,n)>-1})}function Os(a,e,t){for(let r=e;r>-1;r--)if(t(a[r]))return r;for(let r=e+1;r<a.length;r++)if(t(a[r]))return r;return-1}class us{constructor(e){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.bwEstimator=void 0,this._abandonRulesCheck=()=>{const{fragCurrent:t,partCurrent:r,hls:n}=this,{autoLevelEnabled:i,media:s}=n;if(!t||!s)return;const u=performance.now(),f=r?r.stats:t.stats,m=r?r.duration:t.duration,_=u-f.loading.start,b=n.minAutoLevel;if(f.aborted||f.loaded&&f.loaded===f.total||t.level<=b){this.clearTimer(),this._nextAutoLevel=-1;return}if(!i||s.paused||!s.playbackRate||!s.readyState)return;const C=n.mainForwardBufferInfo;if(C===null)return;const U=this.bwEstimator.getEstimateTTFB(),F=Math.abs(s.playbackRate);if(_<=Math.max(U,1e3*(m/(F*2))))return;const j=C.len/F,re=f.loading.first?f.loading.first-f.loading.start:-1,De=f.loaded&&re>-1,Xe=this.getBwEstimate(),Ze=n.levels,dt=Ze[t.level],et=f.total||Math.max(f.loaded,Math.round(m*dt.averageBitrate/8));let yt=De?_-re:_;yt<1&&De&&(yt=Math.min(_,f.loaded*8/Xe));const ct=De?f.loaded*1e3/yt:0,St=ct?(et-f.loaded)/ct:et*8/Xe+U/1e3;if(St<=j)return;const Ft=ct?ct*8:Xe;let _t=Number.POSITIVE_INFINITY,At;for(At=t.level-1;At>b;At--){const $t=Ze[At].maxBitrate;if(_t=this.getTimeToLoadFrag(U/1e3,Ft,m*$t,!Ze[At].details),_t<j)break}if(_t>=St||_t>m*10)return;n.nextLoadLevel=n.nextAutoLevel=At,De?this.bwEstimator.sample(_-Math.min(U,re),f.loaded):this.bwEstimator.sampleTTFB(_);const ar=Ze[At].maxBitrate;this.getBwEstimate()*this.hls.config.abrBandWidthUpFactor>ar&&this.resetEstimator(ar),this.clearTimer(),R.warn(`[abr] Fragment ${t.sn}${r?" part "+r.index:""} of level ${t.level} is loading too slowly;
Time to underbuffer: ${j.toFixed(3)} s
Estimated load time for current fragment: ${St.toFixed(3)} s
Estimated load time for down switch fragment: ${_t.toFixed(3)} s
TTFB estimate: ${re|0} ms
Current BW estimate: ${Y(Xe)?Xe|0:"Unknown"} bps
New BW estimate: ${this.getBwEstimate()|0} bps
Switching to level ${At} @ ${ar|0} bps`),n.trigger(d.FRAG_LOAD_EMERGENCY_ABORTED,{frag:t,part:r,stats:f})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(R.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 Hi(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.FRAG_LOADING,this.onFragLoading,this),e.on(d.FRAG_LOADED,this.onFragLoaded,this),e.on(d.FRAG_BUFFERED,this.onFragBuffered,this),e.on(d.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(d.LEVEL_LOADED,this.onLevelLoaded,this),e.on(d.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(d.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(d.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.FRAG_LOADING,this.onFragLoading,this),e.off(d.FRAG_LOADED,this.onFragLoaded,this),e.off(d.FRAG_BUFFERED,this.onFragBuffered,this),e.off(d.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(d.LEVEL_LOADED,this.onLevelLoaded,this),e.off(d.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(d.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(d.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 r=t.frag;if(!this.ignoreFragment(r)){if(!r.bitrateTest){var n;this.fragCurrent=r,this.partCurrent=(n=t.part)!=null?n: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 y.BUFFER_ADD_CODEC_ERROR:case y.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case y.FRAG_LOAD_TIMEOUT:{const r=t.frag,{fragCurrent:n,partCurrent:i}=this;if(r&&n&&r.sn===n.sn&&r.level===n.level){const s=performance.now(),u=i?i.stats:r.stats,f=s-u.loading.start,m=u.loading.first?u.loading.first-u.loading.start:-1;if(u.loaded&&m>-1){const b=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(f-Math.min(b,m),u.loaded)}else this.bwEstimator.sampleTTFB(f)}break}}}getTimeToLoadFrag(e,t,r,n){const i=e+r/t,s=n?this.lastLevelLoadSec:0;return i+s}onLevelLoaded(e,t){const r=this.hls.config,{loading:n}=t.stats,i=n.end-n.start;Y(i)&&(this.lastLevelLoadSec=i/1e3),t.details.live?this.bwEstimator.update(r.abrEwmaSlowLive,r.abrEwmaFastLive):this.bwEstimator.update(r.abrEwmaSlowVoD,r.abrEwmaFastVoD)}onFragLoaded(e,{frag:t,part:r}){const n=r?r.stats:t.stats;if(t.type===Ve.MAIN&&this.bwEstimator.sampleTTFB(n.loading.first-n.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),t.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){const i=r?r.duration:t.duration,s=this.hls.levels[t.level],u=(s.loaded?s.loaded.bytes:0)+n.loaded,f=(s.loaded?s.loaded.duration:0)+i;s.loaded={bytes:u,duration:f},s.realBitrate=Math.round(8*u/f)}if(t.bitrateTest){const i={stats:n,frag:t,part:r,id:t.type};this.onFragBuffered(d.FRAG_BUFFERED,i),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:r,part:n}=t,i=n!=null&&n.stats.loaded?n.stats:r.stats;if(i.aborted||this.ignoreFragment(r))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(),r.bitrateTest?this.bitrateTestDelay=s/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==Ve.MAIN||e.sn==="initSegment"}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){const{maxAutoLevel:e,minAutoLevel:t}=this.hls,r=this.getBwEstimate(),n=this.hls.config.maxStarvationDelay,i=this.findBestLevel(r,t,e,0,n,1,1);if(i>-1)return i;const s=this.hls.firstLevel,u=Math.min(Math.max(s,t),e);return R.warn(`[abr] Could not find best starting auto level. Defaulting to first in playlist ${s} clamped to ${u}`),u}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const e=this.forcedAutoLevel,r=this.bwEstimator.canEstimate(),n=this.lastLoadedFragLevel>-1;if(e!==-1&&(!r||!n||this.nextAutoLevelKey===this.getAutoLevelKey()))return e;const i=r&&n?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:r}=this,{maxAutoLevel:n,config:i,minAutoLevel:s}=r,u=t?t.duration:e?e.duration:0,f=this.getBwEstimate(),m=this.getStarvationDelay();let _=i.abrBandWidthFactor,b=i.abrBandWidthUpFactor;if(m){const re=this.findBestLevel(f,s,n,m,0,_,b);if(re>=0)return re}let C=u?Math.min(u,i.maxStarvationDelay):i.maxStarvationDelay;if(!m){const re=this.bitrateTestDelay;re&&(C=(u?Math.min(u,i.maxLoadingDelay):i.maxLoadingDelay)-re,R.info(`[abr] bitrate test took ${Math.round(1e3*re)}ms, set first fragment max fetchDuration to ${Math.round(1e3*C)} ms`),_=b=1)}const U=this.findBestLevel(f,s,n,m,C,_,b);if(R.info(`[abr] ${m?"rebuffering expected":"buffer is empty"}, optimal quality level ${U}`),U>-1)return U;const F=r.levels[s],j=r.levels[r.loadLevel];return(F==null?void 0:F.bitrate)<(j==null?void 0:j.bitrate)?s:r.loadLevel}getStarvationDelay(){const e=this.hls,t=e.media;if(!t)return 1/0;const r=t&&t.playbackRate!==0?Math.abs(t.playbackRate):1,n=e.mainForwardBufferInfo;return(n?n.len:0)/r}getBwEstimate(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}findBestLevel(e,t,r,n,i,s,u){var f;const m=n+i,_=this.lastLoadedFragLevel,b=_===-1?this.hls.firstLevel:_,{fragCurrent:C,partCurrent:U}=this,{levels:F,allAudioTracks:j,loadLevel:re,config:De}=this.hls;if(F.length===1)return 0;const Xe=F[b],Ze=!!(Xe!=null&&(f=Xe.details)!=null&&f.live),dt=re===-1||_===-1;let et,yt="SDR",ct=(Xe==null?void 0:Xe.frameRate)||0;const{audioPreference:St,videoPreference:Ft}=De,_t=this.audioTracksByGroup||(this.audioTracksByGroup=ia(j));if(dt){if(this.firstSelection!==-1)return this.firstSelection;const ir=this.codecTiers||(this.codecTiers=Is(F,_t,t,r)),Jt=Si(ir,yt,e,St,Ft),{codecSet:Ar,videoRanges:Ur,minFramerate:Yt,minBitrate:Gt,preferHDR:Cr}=Jt;et=Ar,yt=Cr?Ur[Ur.length-1]:Ur[0],ct=Yt,e=Math.max(e,Gt),R.log(`[abr] picked start tier ${JSON.stringify(Jt)}`)}else et=Xe==null?void 0:Xe.codecSet,yt=Xe==null?void 0:Xe.videoRange;const At=U?U.duration:C?C.duration:0,ar=this.bwEstimator.getEstimateTTFB()/1e3,$t=[];for(let ir=r;ir>=t;ir--){var sr;const Jt=F[ir],Ar=ir>b;if(!Jt)continue;if(De.useMediaCapabilities&&!Jt.supportedResult&&!Jt.supportedPromise){const un=navigator.mediaCapabilities;typeof(un==null?void 0:un.decodingInfo)=="function"&&Ls(Jt,_t,yt,ct,e,St)?(Jt.supportedPromise=ra(Jt,_t,un),Jt.supportedPromise.then(xn=>{if(!this.hls)return;Jt.supportedResult=xn;const Tn=this.hls.levels,si=Tn.indexOf(Jt);xn.error?R.warn(`[abr] MediaCapabilities decodingInfo error: "${xn.error}" for level ${si} ${JSON.stringify(xn)}`):xn.supported||(R.warn(`[abr] Unsupported MediaCapabilities decodingInfo result for level ${si} ${JSON.stringify(xn)}`),si>-1&&Tn.length>1&&(R.log(`[abr] Removing unsupported level ${si}`),this.hls.removeLevel(si)))})):Jt.supportedResult=Wi}if(et&&Jt.codecSet!==et||yt&&Jt.videoRange!==yt||Ar&&ct>Jt.frameRate||!Ar&&ct>0&&ct<Jt.frameRate||Jt.supportedResult&&!((sr=Jt.supportedResult.decodingInfoResults)!=null&&sr[0].smooth)){$t.push(ir);continue}const Ur=Jt.details,Yt=(U?Ur==null?void 0:Ur.partTarget:Ur==null?void 0:Ur.averagetargetduration)||At;let Gt;Ar?Gt=u*e:Gt=s*e;const Cr=At&&n>=At*2&&i===0?F[ir].averageBitrate:F[ir].maxBitrate,pr=this.getTimeToLoadFrag(ar,Gt,Cr*Yt,Ur===void 0);if(Gt>=Cr&&(ir===_||Jt.loadError===0&&Jt.fragmentError===0)&&(pr<=ar||!Y(pr)||Ze&&!this.bitrateTestDelay||pr<m)){const un=this.forcedAutoLevel;return ir!==re&&(un===-1||un!==re)&&($t.length&&R.trace(`[abr] Skipped level(s) ${$t.join(",")} of ${r} max with CODECS and VIDEO-RANGE:"${F[$t[0]].codecs}" ${F[$t[0]].videoRange}; not compatible with "${Xe.codecs}" ${yt}`),R.info(`[abr] switch candidate:${b}->${ir} adjustedbw(${Math.round(Gt)})-bitrate=${Math.round(Gt-Cr)} ttfb:${ar.toFixed(1)} avgDuration:${Yt.toFixed(1)} maxFetchDuration:${m.toFixed(1)} fetchDuration:${pr.toFixed(1)} firstSelection:${dt} codecSet:${et} videoRange:${yt} hls.loadLevel:${re}`)),dt&&(this.firstSelection=ir),ir}}return-1}set nextAutoLevel(e){const{maxAutoLevel:t,minAutoLevel:r}=this.hls,n=Math.min(Math.max(e,r),t);this._nextAutoLevel!==n&&(this.nextAutoLevelKey="",this._nextAutoLevel=n)}}class Na{constructor(){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(){}}var on={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class Ua{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(d.BUFFER_APPENDED,this.onBufferAppended,this),e.on(d.FRAG_BUFFERED,this.onFragBuffered,this),e.on(d.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:e}=this;e.off(d.BUFFER_APPENDED,this.onBufferAppended,this),e.off(d.FRAG_BUFFERED,this.onFragBuffered,this),e.off(d.FRAG_LOADED,this.onFragLoaded,this)}destroy(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,t){const r=this.activePartLists[t];if(r)for(let n=r.length;n--;){const i=r[n];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){const{fragments:r}=this,n=Object.keys(r);for(let i=n.length;i--;){const s=r[n[i]];if((s==null?void 0:s.body.type)===t&&s.buffered){const u=s.body;if(u.start<=e&&e<=u.end)return u}}return null}detectEvictedFragments(e,t,r,n){this.timeRanges&&(this.timeRanges[e]=t);const i=(n==null?void 0:n.fragment.sn)||-1;Object.keys(this.fragments).forEach(s=>{const u=this.fragments[s];if(!u||i>=u.body.sn)return;if(!u.buffered&&!u.loaded){u.body.type===r&&this.removeFragment(u.body);return}const f=u.range[e];f&&f.time.some(m=>{const _=!this.isTimeBuffered(m.startPTS,m.endPTS,t);return _&&this.removeFragment(u.body),_})})}detectPartialFragments(e){const t=this.timeRanges,{frag:r,part:n}=e;if(!t||r.sn==="initSegment")return;const i=Vi(r),s=this.fragments[i];if(!s||s.buffered&&r.gap)return;const u=!r.relurl;Object.keys(t).forEach(f=>{const m=r.elementaryStreams[f];if(!m)return;const _=t[f],b=u||m.partial===!0;s.range[f]=this.getBufferedTimes(r,n,b,_)}),s.loaded=null,Object.keys(s.range).length?(s.buffered=!0,(s.body.endList=r.endList||s.body.endList)&&(this.endListFragments[s.body.type]=s),rs(s)||this.removeParts(r.sn-1,r.type)):this.removeFragment(s.body)}removeParts(e,t){const r=this.activePartLists[t];r&&(this.activePartLists[t]=r.filter(n=>n.fragment.sn>=e))}fragBuffered(e,t){const r=Vi(e);let n=this.fragments[r];!n&&t&&(n=this.fragments[r]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),n&&(n.loaded=null,n.buffered=!0)}getBufferedTimes(e,t,r,n){const i={time:[],partial:r},s=e.start,u=e.end,f=e.minEndPTS||u,m=e.maxStartPTS||s;for(let _=0;_<n.length;_++){const b=n.start(_)-this.bufferPadding,C=n.end(_)+this.bufferPadding;if(m>=b&&f<=C){i.time.push({startPTS:Math.max(s,n.start(_)),endPTS:Math.min(u,n.end(_))});break}else if(s<C&&u>b){const U=Math.max(s,n.start(_)),F=Math.min(u,n.end(_));F>U&&(i.partial=!0,i.time.push({startPTS:U,endPTS:F}))}else if(u<=b)break}return i}getPartialFragment(e){let t=null,r,n,i,s=0;const{bufferPadding:u,fragments:f}=this;return Object.keys(f).forEach(m=>{const _=f[m];_&&rs(_)&&(n=_.body.start-u,i=_.body.end+u,e>=n&&e<=i&&(r=Math.min(e-n,i-e),s<=r&&(t=_.body,s=r)))}),t}isEndListAppended(e){const t=this.endListFragments[e];return t!==void 0&&(t.buffered||rs(t))}getState(e){const t=Vi(e),r=this.fragments[t];return r?r.buffered?rs(r)?on.PARTIAL:on.OK:on.APPENDING:on.NOT_LOADED}isTimeBuffered(e,t,r){let n,i;for(let s=0;s<r.length;s++){if(n=r.start(s)-this.bufferPadding,i=r.end(s)+this.bufferPadding,e>=n&&t<=i)return!0;if(t<=n)return!1}return!1}onFragLoaded(e,t){const{frag:r,part:n}=t;if(r.sn==="initSegment"||r.bitrateTest)return;const i=n?null:t,s=Vi(r);this.fragments[s]={body:r,appendedPTS:null,loaded:i,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:r,part:n,timeRanges:i}=t;if(r.sn==="initSegment")return;const s=r.type;if(n){let u=this.activePartLists[s];u||(this.activePartLists[s]=u=[]),u.push(n)}this.timeRanges=i,Object.keys(i).forEach(u=>{const f=i[u];this.detectEvictedFragments(u,f,s,n)})}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=Vi(e);return!!this.fragments[t]}hasParts(e){var t;return!!((t=this.activePartLists[e])!=null&&t.length)}removeFragmentsInRange(e,t,r,n,i){n&&!this.hasGaps||Object.keys(this.fragments).forEach(s=>{const u=this.fragments[s];if(!u)return;const f=u.body;f.type!==r||n&&!f.gap||f.start<t&&f.end>e&&(u.buffered||i)&&this.removeFragment(f)})}removeFragment(e){const t=Vi(e);e.stats.loaded=0,e.clearElementaryStreamInfo();const r=this.activePartLists[e.type];if(r){const n=e.sn;this.activePartLists[e.type]=r.filter(i=>i.fragment.sn!==n)}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1}}function rs(a){var e,t,r;return a.buffered&&(a.body.gap||((e=a.range.video)==null?void 0:e.partial)||((t=a.range.audio)==null?void 0:t.partial)||((r=a.range.audiovideo)==null?void 0:r.partial))}function Vi(a){return`${a.type}_${a.level}_${a.sn}`}const sa={length:0,start:()=>0,end:()=>0};class Mr{static isBuffered(e,t){try{if(e){const r=Mr.getBuffered(e);for(let n=0;n<r.length;n++)if(t>=r.start(n)&&t<=r.end(n))return!0}}catch(r){}return!1}static bufferInfo(e,t,r){try{if(e){const n=Mr.getBuffered(e),i=[];let s;for(s=0;s<n.length;s++)i.push({start:n.start(s),end:n.end(s)});return this.bufferedInfo(i,t,r)}}catch(n){}return{len:0,start:t,end:t,nextStart:void 0}}static bufferedInfo(e,t,r){t=Math.max(0,t),e.sort(function(m,_){const b=m.start-_.start;return b||_.end-m.end});let n=[];if(r)for(let m=0;m<e.length;m++){const _=n.length;if(_){const b=n[_-1].end;e[m].start-b<r?e[m].end>b&&(n[_-1].end=e[m].end):n.push(e[m])}else n.push(e[m])}else n=e;let i=0,s,u=t,f=t;for(let m=0;m<n.length;m++){const _=n[m].start,b=n[m].end;if(t+r>=_&&t<b)u=_,f=b,i=f-t;else if(t+r<_){s=_;break}}return{len:i,start:u||0,end:f||0,nextStart:s}}static getBuffered(e){try{return e.buffered}catch(t){return R.log("failed to get media.buffered",t),sa}}}class Ps{constructor(e,t,r,n=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=qn(),this.buffering={audio:qn(),video:qn(),audiovideo:qn()},this.level=e,this.sn=t,this.id=r,this.size=n,this.part=i,this.partial=s}}function qn(){return{start:0,executeStart:0,executeEnd:0,end:0}}function ns(a,e){for(let r=0,n=a.length;r<n;r++){var t;if(((t=a[r])==null?void 0:t.cc)===e)return a[r]}return null}function za(a,e,t){return!!(e&&(t.endCC>t.startCC||a&&a.cc<t.startCC))}function cs(a,e){const t=a.fragments,r=e.fragments;if(!r.length||!t.length){R.log("No fragments to align");return}const n=ns(t,r[0].cc);if(!n||n&&!n.startPTS){R.log("No frag in previous level to align on");return}return n}function Fs(a,e){if(a){const t=a.start+e;a.start=a.startPTS=t,a.endPTS=t+a.duration}}function hs(a,e){const t=e.fragments;for(let r=0,n=t.length;r<n;r++)Fs(t[r],a);e.fragmentHint&&Fs(e.fragmentHint,a),e.alignedSliding=!0}function Ms(a,e,t){e&&(aa(a,t,e),!t.alignedSliding&&e&&Zn(t,e),!t.alignedSliding&&e&&!t.skippedSegments&&ji(e,t))}function aa(a,e,t){if(za(a,t,e)){const r=cs(t,e);r&&Y(r.start)&&(R.log(`Adjusting PTS using last level due to CC increase within current level ${e.url}`),hs(r.start,e))}}function Zn(a,e){if(!a.hasProgramDateTime||!e.hasProgramDateTime)return;const t=a.fragments,r=e.fragments;if(!t.length||!r.length)return;let n,i;const s=Math.min(e.endCC,a.endCC);e.startCC<s&&a.startCC<s&&(n=ns(r,s),i=ns(t,s)),(!n||!i)&&(n=r[Math.floor(r.length/2)],i=ns(t,n.cc)||t[Math.floor(t.length/2)]);const u=n.programDateTime,f=i.programDateTime;if(!u||!f)return;const m=(f-u)/1e3-(i.start-n.start);hs(m,a)}const Bs=Math.pow(2,17);class Bi{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 r=e.url;if(!r)return Promise.reject(new pi({type:w.NETWORK_ERROR,details:y.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error(`Fragment does not have a ${r?"part list":"url"}`),networkDetails:null}));this.abort();const n=this.config,i=n.fLoader,s=n.loader;return new Promise((u,f)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(U=>U[0]==="GAP")){f(di(e));return}else e.gap=!1;const m=this.loader=e.loader=i?new i(n):new s(n),_=fs(e),b=ri(n.fragLoadPolicy.default),C={loadPolicy:b,timeout:b.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:Bs};e.stats=m.stats,m.load(_,C,{onSuccess:(U,F,j,re)=>{this.resetLoader(e,m);let De=U.data;j.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(De.slice(0,16)),De=De.slice(16)),u({frag:e,part:null,payload:De,networkDetails:re})},onError:(U,F,j,re)=>{this.resetLoader(e,m),f(new pi({type:w.NETWORK_ERROR,details:y.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:$e({url:r,data:void 0},U),error:new Error(`HTTP Error ${U.code} ${U.text}`),networkDetails:j,stats:re}))},onAbort:(U,F,j)=>{this.resetLoader(e,m),f(new pi({type:w.NETWORK_ERROR,details:y.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:j,stats:U}))},onTimeout:(U,F,j)=>{this.resetLoader(e,m),f(new pi({type:w.NETWORK_ERROR,details:y.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${C.timeout}ms`),networkDetails:j,stats:U}))},onProgress:(U,F,j,re)=>{t&&t({frag:e,part:null,payload:j,networkDetails:re})}})})}loadPart(e,t,r){this.abort();const n=this.config,i=n.fLoader,s=n.loader;return new Promise((u,f)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap){f(di(e,t));return}const m=this.loader=e.loader=i?new i(n):new s(n),_=fs(e,t),b=ri(n.fragLoadPolicy.default),C={loadPolicy:b,timeout:b.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:Bs};t.stats=m.stats,m.load(_,C,{onSuccess:(U,F,j,re)=>{this.resetLoader(e,m),this.updateStatsFromPart(e,t);const De={frag:e,part:t,payload:U.data,networkDetails:re};r(De),u(De)},onError:(U,F,j,re)=>{this.resetLoader(e,m),f(new pi({type:w.NETWORK_ERROR,details:y.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:$e({url:_.url,data:void 0},U),error:new Error(`HTTP Error ${U.code} ${U.text}`),networkDetails:j,stats:re}))},onAbort:(U,F,j)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,m),f(new pi({type:w.NETWORK_ERROR,details:y.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:j,stats:U}))},onTimeout:(U,F,j)=>{this.resetLoader(e,m),f(new pi({type:w.NETWORK_ERROR,details:y.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${C.timeout}ms`),networkDetails:j,stats:U}))}})})}updateStatsFromPart(e,t){const r=e.stats,n=t.stats,i=n.total;if(r.loaded+=n.loaded,i){const f=Math.round(e.duration/t.duration),m=Math.min(Math.round(r.loaded/i),f),b=(f-m)*Math.round(r.loaded/m);r.total=r.loaded+b}else r.total=Math.max(r.loaded,r.total);const s=r.loading,u=n.loading;s.start?s.first+=u.first-u.start:(s.start=u.start,s.first=u.first),s.end=u.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function fs(a,e=null){const t=e||a,r={frag:a,part:e,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},n=t.byteRangeStartOffset,i=t.byteRangeEndOffset;if(Y(n)&&Y(i)){var s;let u=n,f=i;if(a.sn==="initSegment"&&((s=a.decryptdata)==null?void 0:s.method)==="AES-128"){const m=i-n;m%16&&(f=i+(16-m%16)),n!==0&&(r.resetIV=!0,u=n-16)}r.rangeStart=u,r.rangeEnd=f}return r}function di(a,e){const t=new Error(`GAP ${a.gap?"tag":"attribute"} found`),r={type:w.MEDIA_ERROR,details:y.FRAG_GAP,fatal:!1,frag:a,error:t,networkDetails:null};return e&&(r.part=e),(e||a).stats.aborted=!0,new pi(r)}class pi extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class Ti{constructor(e,t){this.subtle=void 0,this.aesIV=void 0,this.subtle=e,this.aesIV=t}decrypt(e,t){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e)}}class oa{constructor(e,t){this.subtle=void 0,this.key=void 0,this.subtle=e,this.key=t}expandKey(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])}}function $a(a){const e=a.byteLength,t=e&&new DataView(a.buffer).getUint8(e-1);return t?Me(a,0,e-t):a}class la{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),r=new Uint32Array(4);for(let n=0;n<4;n++)r[n]=t.getUint32(n*4);return r}initTable(){const e=this.sBox,t=this.invSBox,r=this.subMix,n=r[0],i=r[1],s=r[2],u=r[3],f=this.invSubMix,m=f[0],_=f[1],b=f[2],C=f[3],U=new Uint32Array(256);let F=0,j=0,re=0;for(re=0;re<256;re++)re<128?U[re]=re<<1:U[re]=re<<1^283;for(re=0;re<256;re++){let De=j^j<<1^j<<2^j<<3^j<<4;De=De>>>8^De&255^99,e[F]=De,t[De]=F;const Xe=U[F],Ze=U[Xe],dt=U[Ze];let et=U[De]*257^De*16843008;n[F]=et<<24|et>>>8,i[F]=et<<16|et>>>16,s[F]=et<<8|et>>>24,u[F]=et,et=dt*16843009^Ze*65537^Xe*257^F*16843008,m[De]=et<<24|et>>>8,_[De]=et<<16|et>>>16,b[De]=et<<8|et>>>24,C[De]=et,F?(F=Xe^U[U[U[dt^Xe]]],j^=U[U[j]]):F=j=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let r=!0,n=0;for(;n<t.length&&r;)r=t[n]===this.key[n],n++;if(r)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 u,f;const m=this.keySchedule=new Uint32Array(s),_=this.invKeySchedule=new Uint32Array(s),b=this.sBox,C=this.rcon,U=this.invSubMix,F=U[0],j=U[1],re=U[2],De=U[3];let Xe,Ze;for(u=0;u<s;u++){if(u<i){Xe=m[u]=t[u];continue}Ze=Xe,u%i===0?(Ze=Ze<<8|Ze>>>24,Ze=b[Ze>>>24]<<24|b[Ze>>>16&255]<<16|b[Ze>>>8&255]<<8|b[Ze&255],Ze^=C[u/i|0]<<24):i>6&&u%i===4&&(Ze=b[Ze>>>24]<<24|b[Ze>>>16&255]<<16|b[Ze>>>8&255]<<8|b[Ze&255]),m[u]=Xe=(m[u-i]^Ze)>>>0}for(f=0;f<s;f++)u=s-f,f&3?Ze=m[u]:Ze=m[u-4],f<4||u<=4?_[f]=Ze:_[f]=F[b[Ze>>>24]]^j[b[Ze>>>16&255]]^re[b[Ze>>>8&255]]^De[b[Ze&255]],_[f]=_[f]>>>0}networkToHostOrderSwap(e){return e<<24|(e&65280)<<8|(e&16711680)>>8|e>>>24}decrypt(e,t,r){const n=this.keySize+6,i=this.invKeySchedule,s=this.invSBox,u=this.invSubMix,f=u[0],m=u[1],_=u[2],b=u[3],C=this.uint8ArrayToUint32Array_(r);let U=C[0],F=C[1],j=C[2],re=C[3];const De=new Int32Array(e),Xe=new Int32Array(De.length);let Ze,dt,et,yt,ct,St,Ft,_t,At,ar,$t,sr,ir,Jt;const Ar=this.networkToHostOrderSwap;for(;t<De.length;){for(At=Ar(De[t]),ar=Ar(De[t+1]),$t=Ar(De[t+2]),sr=Ar(De[t+3]),ct=At^i[0],St=sr^i[1],Ft=$t^i[2],_t=ar^i[3],ir=4,Jt=1;Jt<n;Jt++)Ze=f[ct>>>24]^m[St>>16&255]^_[Ft>>8&255]^b[_t&255]^i[ir],dt=f[St>>>24]^m[Ft>>16&255]^_[_t>>8&255]^b[ct&255]^i[ir+1],et=f[Ft>>>24]^m[_t>>16&255]^_[ct>>8&255]^b[St&255]^i[ir+2],yt=f[_t>>>24]^m[ct>>16&255]^_[St>>8&255]^b[Ft&255]^i[ir+3],ct=Ze,St=dt,Ft=et,_t=yt,ir=ir+4;Ze=s[ct>>>24]<<24^s[St>>16&255]<<16^s[Ft>>8&255]<<8^s[_t&255]^i[ir],dt=s[St>>>24]<<24^s[Ft>>16&255]<<16^s[_t>>8&255]<<8^s[ct&255]^i[ir+1],et=s[Ft>>>24]<<24^s[_t>>16&255]<<16^s[ct>>8&255]<<8^s[St&255]^i[ir+2],yt=s[_t>>>24]<<24^s[ct>>16&255]<<16^s[St>>8&255]<<8^s[Ft&255]^i[ir+3],Xe[t]=Ar(Ze^U),Xe[t+1]=Ar(yt^F),Xe[t+2]=Ar(et^j),Xe[t+3]=Ar(dt^re),U=At,F=ar,j=$t,re=sr,t=t+4}return Xe.buffer}}const Ga=16;class ds{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.useSoftware=e.enableSoftwareAES,this.removePKCS7Padding=t,t)try{const r=self.crypto;r&&(this.subtle=r.subtle||r.webkitSubtle)}catch(r){}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 r=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?$a(r):r}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,t,r){return this.useSoftware?new Promise((n,i)=>{this.softwareDecrypt(new Uint8Array(e),t,r);const s=this.flush();s?n(s.buffer):i(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(e),t,r)}softwareDecrypt(e,t,r){const{currentIV:n,currentResult:i,remainderData:s}=this;this.logOnce("JS AES decrypt"),s&&(e=Kt(s,e),this.remainderData=null);const u=this.getValidChunk(e);if(!u.length)return null;n&&(r=n);let f=this.softwareDecrypter;f||(f=this.softwareDecrypter=new la),f.expandKey(t);const m=i;return this.currentResult=f.decrypt(u.buffer,0,r),this.currentIV=Me(u,-16).buffer,m||null}webCryptoDecrypt(e,t,r){if(this.key!==t||!this.fastAesKey){if(!this.subtle)return Promise.resolve(this.onWebCryptoError(e,t,r));this.key=t,this.fastAesKey=new oa(this.subtle,t)}return this.fastAesKey.expandKey().then(n=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new Ti(this.subtle,new Uint8Array(r)).decrypt(e.buffer,n)):Promise.reject(new Error("web crypto not initialized"))).catch(n=>(R.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${n.name}: ${n.message}`),this.onWebCryptoError(e,t,r)))}onWebCryptoError(e,t,r){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,r);const n=this.flush();if(n)return n.buffer;throw new Error("WebCrypto and softwareDecrypt: failed to decrypt data")}getValidChunk(e){let t=e;const r=e.length-e.length%Ga;return r!==e.length&&(t=Me(e,0,r),this.remainderData=Me(e,r)),t}logOnce(e){this.logEnabled&&(R.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const ua={toString:function(a){let e="";const t=a.length;for(let r=0;r<t;r++)e+=`[${a.start(r).toFixed(3)}-${a.end(r).toFixed(3)}]`;return e}},vt={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 ps extends Na{constructor(e,t,r,n,i){super(),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=vt.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.loadedmetadata=!1,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.onvseeking=null,this.onvended=null,this.logPrefix="",this.log=void 0,this.warn=void 0,this.playlistType=i,this.logPrefix=n,this.log=R.log.bind(R,`${n}:`),this.warn=R.warn.bind(R,`${n}:`),this.hls=e,this.fragmentLoader=new Bi(e.config),this.keyLoader=r,this.fragmentTracker=t,this.config=e.config,this.decrypter=new ds(e.config),e.on(d.MANIFEST_LOADED,this.onManifestLoaded,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){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=vt.STOPPED}pauseBuffering(){this.buffering=!1}resumeBuffering(){this.buffering=!0}_streamEnded(e,t){if(t.live||e.nextStart||!e.end||!this.media)return!1;const r=t.partList;if(r!=null&&r.length){const i=r[r.length-1];return Mr.isBuffered(this.media,i.start+i.duration/2)}const n=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(n)}getLevelDetails(){if(this.levels&&this.levelLastLoaded!==null){var e;return(e=this.levelLastLoaded)==null?void 0:e.details}}onMediaAttached(e,t){const r=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvended=this.onMediaEnded.bind(this),r.addEventListener("seeking",this.onvseeking),r.addEventListener("ended",this.onvended);const n=this.config;this.levels&&n.autoStartLoad&&this.state===vt.STOPPED&&this.startLoad(n.startPosition)}onMediaDetaching(){const e=this.media;e!=null&&e.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&this.onvseeking&&this.onvended&&(e.removeEventListener("seeking",this.onvseeking),e.removeEventListener("ended",this.onvended),this.onvseeking=this.onvended=null),this.keyLoader&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}onMediaSeeking(){const{config:e,fragCurrent:t,media:r,mediaBuffer:n,state:i}=this,s=r?r.currentTime:0,u=Mr.bufferInfo(n||r,s,e.maxBufferHole);if(this.log(`media seeking to ${Y(s)?s.toFixed(3):s}, state: ${i}`),this.state===vt.ENDED)this.resetLoadingState();else if(t){const f=e.maxFragLookUpTolerance,m=t.start-f,_=t.start+t.duration+f;if(!u.len||_<u.start||m>u.end){const b=s>_;(s<m||b)&&(b&&t.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),t.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}r&&(this.fragmentTracker.removeFragmentsInRange(s,1/0,this.playlistType,!0),this.lastCurrentTime=s),!this.loadedmetadata&&!u.len&&(this.nextLoadPosition=this.startPosition=s),this.tickImmediate()}onMediaEnded(){this.startPosition=this.lastCurrentTime=0}onManifestLoaded(e,t){this.startTimeOffset=t.startTimeOffset,this.initPTS=[]}onHandlerDestroying(){this.hls.off(d.MANIFEST_LOADED,this.onManifestLoaded,this),this.stopLoad(),super.onHandlerDestroying(),this.hls=null}onHandlerDestroyed(){this.state=vt.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,r){this._loadFragForPlayback(e,t,r)}_loadFragForPlayback(e,t,r){const n=i=>{if(this.fragContextChanged(e)){this.warn(`Fragment ${e.sn}${i.part?" p: "+i.part.index:""} of level ${e.level} was dropped during download.`),this.fragmentTracker.removeFragment(e);return}e.stats.chunkCount++,this._handleFragmentLoadProgress(i)};this._doFragLoad(e,t,r,n).then(i=>{if(!i)return;const s=this.state;if(this.fragContextChanged(e)){(s===vt.FRAG_LOADING||!this.fragCurrent&&s===vt.PARSING)&&(this.fragmentTracker.removeFragment(e),this.state=vt.IDLE);return}"payload"in i&&(this.log(`Loaded fragment ${e.sn} of level ${e.level}`),this.hls.trigger(d.FRAG_LOADED,i)),this._handleFragmentLoadComplete(i)}).catch(i=>{this.state===vt.STOPPED||this.state===vt.ERROR||(this.warn(`Frag error: ${(i==null?void 0:i.message)||i}`),this.resetFragmentLoading(e))})}clearTrackerIfNeeded(e){var t;const{fragmentTracker:r}=this;if(r.getState(e)===on.APPENDING){const i=e.type,s=this.getFwdBufferInfo(this.mediaBuffer,i),u=Math.max(e.duration,s?s.len:this.config.maxBufferLength),f=this.backtrackFragment;((f?e.sn-f.sn:0)===1||this.reduceMaxBufferLength(u,e.duration))&&r.removeFragment(e)}else((t=this.mediaBuffer)==null?void 0:t.buffered.length)===0?r.removeAllFragments():r.hasParts(e.type)&&(r.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),r.getState(e)===on.PARTIAL&&r.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)}flushMainBuffer(e,t,r=null){if(!(e-t))return;const n={startOffset:e,endOffset:t,type:r};this.hls.trigger(d.BUFFER_FLUSHING,n)}_loadInitSegment(e,t){this._doFragLoad(e,t).then(r=>{if(!r||this.fragContextChanged(e)||!this.levels)throw new Error("init load aborted");return r}).then(r=>{const{hls:n}=this,{payload:i}=r,s=e.decryptdata;if(i&&i.byteLength>0&&s!=null&&s.key&&s.iv&&s.method==="AES-128"){const u=self.performance.now();return this.decrypter.decrypt(new Uint8Array(i),s.key.buffer,s.iv.buffer).catch(f=>{throw n.trigger(d.ERROR,{type:w.MEDIA_ERROR,details:y.FRAG_DECRYPT_ERROR,fatal:!1,error:f,reason:f.message,frag:e}),f}).then(f=>{const m=self.performance.now();return n.trigger(d.FRAG_DECRYPTED,{frag:e,payload:f,stats:{tstart:u,tdecrypt:m}}),r.payload=f,this.completeInitSegmentLoad(r)})}return this.completeInitSegmentLoad(r)}).catch(r=>{this.state===vt.STOPPED||this.state===vt.ERROR||(this.warn(r),this.resetFragmentLoading(e))})}completeInitSegmentLoad(e){const{levels:t}=this;if(!t)throw new Error("init load aborted, missing levels");const r=e.frag.stats;this.state=vt.IDLE,e.frag.data=new Uint8Array(e.payload),r.parsing.start=r.buffering.start=self.performance.now(),r.parsing.end=r.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){var r,n,i,s;const u=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.playlistType===Ve.MAIN?"level":"track"} ${e.level} (frag:[${((r=e.startPTS)!=null?r:NaN).toFixed(3)}-${((n=e.endPTS)!=null?n:NaN).toFixed(3)}] > buffer:${u?ua.toString(Mr.getBuffered(u)):"(detached)"})`),e.sn!=="initSegment"){var f;if(e.type!==Ve.SUBTITLE){const _=e.elementaryStreams;if(!Object.keys(_).some(b=>!!_[b])){this.state=vt.IDLE;return}}const m=(f=this.levels)==null?void 0:f[e.level];m!=null&&m.fragmentError&&(this.log(`Resetting level fragment error count of ${m.fragmentError} on frag buffered`),m.fragmentError=0)}this.state=vt.IDLE,u&&(!this.loadedmetadata&&e.type==Ve.MAIN&&u.buffered.length&&((i=this.fragCurrent)==null?void 0:i.sn)===((s=this.fragPrevious)==null?void 0:s.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())}seekToStartPos(){}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:r,part:n,partsLoaded:i}=e,s=!i||i.length===0||i.some(f=>!f),u=new Ps(r.level,r.sn,r.stats.chunkCount+1,0,n?n.index:-1,!s);t.flush(u)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,r=null,n){var i;const s=t==null?void 0:t.details;if(!this.levels||!s)throw new Error(`frag load aborted, missing level${s?"":" detail"}s`);let u=null;if(e.encrypted&&!((i=e.decryptdata)!=null&&i.key)?(this.log(`Loading key for ${e.sn} of [${s.startSN}-${s.endSN}], ${this.logPrefix==="[stream-controller]"?"level":"track"} ${e.level}`),this.state=vt.KEY_LOADING,this.fragCurrent=e,u=this.keyLoader.load(e).then(_=>{if(!this.fragContextChanged(_.frag))return this.hls.trigger(d.KEY_LOADED,_),this.state===vt.KEY_LOADING&&(this.state=vt.IDLE),_}),this.hls.trigger(d.KEY_LOADING,{frag:e}),this.fragCurrent===null&&(u=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))):!e.encrypted&&s.encryptedFragments.length&&this.keyLoader.loadClear(e,s.encryptedFragments),r=Math.max(e.start,r||0),this.config.lowLatencyMode&&e.sn!=="initSegment"){const _=s.partList;if(_&&n){r>e.end&&s.fragmentHint&&(e=s.fragmentHint);const b=this.getNextPart(_,e,r);if(b>-1){const C=_[b];this.log(`Loading part sn: ${e.sn} p: ${C.index} cc: ${e.cc} of playlist [${s.startSN}-${s.endSN}] parts [0-${b}-${_.length-1}] ${this.logPrefix==="[stream-controller]"?"level":"track"}: ${e.level}, target: ${parseFloat(r.toFixed(3))}`),this.nextLoadPosition=C.start+C.duration,this.state=vt.FRAG_LOADING;let U;return u?U=u.then(F=>!F||this.fragContextChanged(F.frag)?null:this.doFragPartsLoad(e,C,t,n)).catch(F=>this.handleFragLoadError(F)):U=this.doFragPartsLoad(e,C,t,n).catch(F=>this.handleFragLoadError(F)),this.hls.trigger(d.FRAG_LOADING,{frag:e,part:C,targetBufferTime:r}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):U}else if(!e.url||this.loadedEndOfParts(_,r))return Promise.resolve(null)}}this.log(`Loading fragment ${e.sn} cc: ${e.cc} ${s?"of ["+s.startSN+"-"+s.endSN+"] ":""}${this.logPrefix==="[stream-controller]"?"level":"track"}: ${e.level}, target: ${parseFloat(r.toFixed(3))}`),Y(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=vt.FRAG_LOADING;const f=this.config.progressive;let m;return f&&u?m=u.then(_=>!_||this.fragContextChanged(_==null?void 0:_.frag)?null:this.fragmentLoader.load(e,n)).catch(_=>this.handleFragLoadError(_)):m=Promise.all([this.fragmentLoader.load(e,f?n:void 0),u]).then(([_])=>(!f&&_&&n&&n(_),_)).catch(_=>this.handleFragLoadError(_)),this.hls.trigger(d.FRAG_LOADING,{frag:e,targetBufferTime:r}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):m}doFragPartsLoad(e,t,r,n){return new Promise((i,s)=>{var u;const f=[],m=(u=r.details)==null?void 0:u.partList,_=b=>{this.fragmentLoader.loadPart(e,b,n).then(C=>{f[b.index]=C;const U=C.part;this.hls.trigger(d.FRAG_LOADED,C);const F=hi(r,e.sn,b.index+1)||cn(m,e.sn,b.index+1);if(F)_(F);else return i({frag:e,part:U,partsLoaded:f})}).catch(s)};_(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;e.data&&t.details===y.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(d.ERROR,t)}else this.hls.trigger(d.ERROR,{type:w.OTHER_ERROR,details:y.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==vt.PARSING){!this.fragCurrent&&this.state!==vt.STOPPED&&this.state!==vt.ERROR&&(this.state=vt.IDLE);return}const{frag:r,part:n,level:i}=t,s=self.performance.now();r.stats.parsing.end=s,n&&(n.stats.parsing.end=s),this.updateLevelTiming(r,n,i,e.partial)}getCurrentContext(e){const{levels:t,fragCurrent:r}=this,{level:n,sn:i,part:s}=e;if(!(t!=null&&t[n]))return this.warn(`Levels object was unset while buffering fragment ${i} of level ${n}. The current chunk will not be buffered.`),null;const u=t[n],f=s>-1?hi(u,i,s):null,m=f?f.fragment:Oi(u,i,r);return m?(r&&r!==m&&(m.stats=r.stats),{frag:m,part:f,level:u}):null}bufferFragmentData(e,t,r,n,i){var s;if(!e||this.state!==vt.PARSING)return;const{data1:u,data2:f}=e;let m=u;if(u&&f&&(m=Kt(u,f)),!((s=m)!=null&&s.length))return;const _={type:e.type,frag:t,part:r,chunkMeta:n,parent:t.type,data:m};if(this.hls.trigger(d.BUFFER_APPENDING,_),e.dropped&&e.independent&&!r){if(i)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!Mr.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const r=t.currentTime,n=Mr.bufferInfo(t,r,0),i=e.duration,s=Math.min(this.config.maxFragLookUpTolerance*2,i*.25),u=Math.max(Math.min(e.start-s,n.end-s),r+s);e.start-u>s&&this.flushMainBuffer(u,e.start)}getFwdBufferInfo(e,t){const r=this.getLoadPosition();return Y(r)?this.getFwdBufferInfoAtPos(e,r,t):null}getFwdBufferInfoAtPos(e,t,r){const{config:{maxBufferHole:n}}=this,i=Mr.bufferInfo(e,t,n);if(i.len===0&&i.nextStart!==void 0){const s=this.fragmentTracker.getBufferedFrag(t,r);if(s&&i.nextStart<s.end)return Mr.bufferInfo(e,t,Math.max(i.nextStart,n))}return i}getMaxBufferLength(e){const{config:t}=this;let r;return e?r=Math.max(8*t.maxBufferSize/e,t.maxBufferLength):r=t.maxBufferLength,Math.min(r,t.maxMaxBufferLength)}reduceMaxBufferLength(e,t){const r=this.config,n=Math.max(Math.min(e-t,r.maxBufferLength),t),i=Math.max(e-t*3,r.maxMaxBufferLength/2,n);return i>=n?(r.maxMaxBufferLength=i,this.warn(`Reduce max buffer length to ${i}s`),!0):!1}getAppendedFrag(e,t=Ve.MAIN){const r=this.fragmentTracker.getAppendedFrag(e,Ve.MAIN);return r&&"fragment"in r?r.fragment:r}getNextFragment(e,t){const r=t.fragments,n=r.length;if(!n)return null;const{config:i}=this,s=r[0].start;let u;if(t.live){const f=i.initialLiveManifestSize;if(n<f)return this.warn(`Not enough fragments to start playback (have: ${n}, need: ${f})`),null;(!t.PTSKnown&&!this.startFragRequested&&this.startPosition===-1||e<s)&&(u=this.getInitialLiveFragment(t,r),this.startPosition=this.nextLoadPosition=u?this.hls.liveSyncPosition||u.start:e)}else e<=s&&(u=r[0]);if(!u){const f=i.lowLatencyMode?t.partEnd:t.fragmentEnd;u=this.getFragmentAtPosition(e,f,t)}return this.mapToInitFragWhenRequired(u)}isLoopLoading(e,t){const r=this.fragmentTracker.getState(e);return(r===on.OK||r===on.PARTIAL&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,r,n,i){const s=e.gap,u=this.getNextFragment(this.nextLoadPosition,t);if(u===null)return u;if(e=u,s&&e&&!e.gap&&r.nextStart){const f=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,r.nextStart,n);if(f!==null&&r.len+f.len>=i)return this.log(`buffer full after gaps in "${n}" playlist starting at sn: ${e.sn}`),null}return e}mapToInitFragWhenRequired(e){return e!=null&&e.initSegment&&!(e!=null&&e.initSegment.data)&&!this.bitrateTest?e.initSegment:e}getNextPart(e,t,r){let n=-1,i=!1,s=!0;for(let u=0,f=e.length;u<f;u++){const m=e[u];if(s=s&&!m.independent,n>-1&&r<m.start)break;const _=m.loaded;_?n=-1:(i||m.independent||s)&&m.fragment===t&&(n=u),i=_}return n}loadedEndOfParts(e,t){const r=e[e.length-1];return r&&t>r.start&&r.loaded}getInitialLiveFragment(e,t){const r=this.fragPrevious;let n=null;if(r){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${r.programDateTime}`),n=Ki(t,r.endProgramDateTime,this.config.maxFragLookUpTolerance)),!n){const i=r.sn+1;if(i>=e.startSN&&i<=e.endSN){const s=t[i-e.startSN];r.cc===s.cc&&(n=s,this.log(`Live playlist, switching playlist, load frag with next SN: ${n.sn}`))}n||(n=Wt(t,r.cc),n&&this.log(`Live playlist, switching playlist, load frag with same CC: ${n.sn}`))}}else{const i=this.hls.liveSyncPosition;i!==null&&(n=this.getFragmentAtPosition(i,this.bitrateTest?e.fragmentEnd:e.edge,e))}return n}getFragmentAtPosition(e,t,r){const{config:n}=this;let{fragPrevious:i}=this,{fragments:s,endSN:u}=r;const{fragmentHint:f}=r,{maxFragLookUpTolerance:m}=n,_=r.partList,b=!!(n.lowLatencyMode&&_!=null&&_.length&&f);b&&f&&!this.bitrateTest&&(s=s.concat(f),u=f.sn);let C;if(e<t){const U=e>t-m?0:m;C=Ei(i,s,e,U)}else C=s[s.length-1];if(C){const U=C.sn-r.startSN,F=this.fragmentTracker.getState(C);if((F===on.OK||F===on.PARTIAL&&C.gap)&&(i=C),i&&C.sn===i.sn&&(!b||_[0].fragment.sn>C.sn)&&i&&C.level===i.level){const re=s[U+1];C.sn<u&&this.fragmentTracker.getState(re)!==on.OK?C=re:C=null}}return C}synchronizeToLiveEdge(e){const{config:t,media:r}=this;if(!r)return;const n=this.hls.liveSyncPosition,i=r.currentTime,s=e.fragments[0].start,u=e.edge,f=i>=s-t.maxFragLookUpTolerance&&i<=u;if(n!==null&&r.duration>n&&(i<n||!f)){const m=t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;(!f&&r.readyState<4||i<u-m)&&(this.loadedmetadata||(this.nextLoadPosition=n),r.readyState&&(this.warn(`Playback: ${i.toFixed(3)} is located too far from the end of live sliding playlist: ${u}, reset currentTime to : ${n.toFixed(3)}`),r.currentTime=n))}}alignPlaylists(e,t,r){const n=e.fragments.length;if(!n)return this.warn("No fragments in live playlist"),0;const i=e.fragments[0].start,s=!t,u=e.alignedSliding&&Y(i);if(s||!u&&!i){const{fragPrevious:f}=this;Ms(f,r,e);const m=e.fragments[0].start;return this.log(`Live playlist sliding: ${m.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} prev-sn: ${f?f.sn:"na"} fragments: ${n}`),m}return i}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*3)}setStartPosition(e,t){let r=this.startPosition;if(r<t&&(r=-1),r===-1||this.lastCurrentTime===-1){const n=this.startTimeOffset!==null,i=n?this.startTimeOffset:e.startTimeOffset;i!==null&&Y(i)?(r=t+i,i<0&&(r+=e.totalduration),r=Math.min(Math.max(t,r),t+e.totalduration),this.log(`Start time offset ${i} found in ${n?"multivariant":"media"} playlist, adjust startPosition to ${r}`),this.startPosition=r):e.live?r=this.hls.liveSyncPosition||t:this.startPosition=r=0,this.lastCurrentTime=r}this.nextLoadPosition=r}getLoadPosition(){const{media:e}=this;let t=0;return this.loadedmetadata&&e?t=e.currentTime:this.nextLoadPosition&&(t=this.nextLoadPosition),t}handleFragLoadAborted(e,t){this.transmuxer&&e.sn!=="initSegment"&&e.stats.aborted&&(this.warn(`Fragment ${e.sn}${t?" part "+t.index:""} of level ${e.level} was aborted`),this.resetFragmentLoading(e))}resetFragmentLoading(e){(!this.fragCurrent||!this.fragContextChanged(e)&&this.state!==vt.FRAG_LOADING_WAITING_RETRY)&&(this.state=vt.IDLE)}onFragmentOrKeyLoadError(e,t){if(t.chunkMeta&&!t.frag){const _=this.getCurrentContext(t.chunkMeta);_&&(t.frag=_.frag)}const r=t.frag;if(!r||r.type!==e||!this.levels)return;if(this.fragContextChanged(r)){var n;this.warn(`Frag load error must match current frag to retry ${r.url} > ${(n=this.fragCurrent)==null?void 0:n.url}`);return}const i=t.details===y.FRAG_GAP;i&&this.fragmentTracker.fragBuffered(r,!0);const s=t.errorAction,{action:u,retryCount:f=0,retryConfig:m}=s||{};if(s&&u===Ot.RetryRequest&&m){this.resetStartWhenNotLoaded(this.levelLastLoaded);const _=zn(m,f);this.warn(`Fragment ${r.sn} of ${e} ${r.level} errored with ${t.details}, retrying loading ${f+1}/${m.maxNumRetry} in ${_}ms`),s.resolved=!0,this.retryDate=self.performance.now()+_,this.state=vt.FRAG_LOADING_WAITING_RETRY}else if(m&&s)if(this.resetFragmentErrors(e),f<m.maxNumRetry)!i&&u!==Ot.RemoveAlternatePermanently&&(s.resolved=!0);else{R.warn(`${t.details} reached or exceeded max retry (${f})`);return}else(s==null?void 0:s.action)===Ot.SendAlternateToPenaltyBox?this.state=vt.WAITING_LEVEL:this.state=vt.ERROR;this.tickImmediate()}reduceLengthAndFlushBuffer(e){if(this.state===vt.PARSING||this.state===vt.PARSED){const t=e.frag,r=e.parent,n=this.getFwdBufferInfo(this.mediaBuffer,r),i=n&&n.len>.5;i&&this.reduceMaxBufferLength(n.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 ${r} buffer`),t&&(this.fragmentTracker.removeFragment(t),this.nextLoadPosition=t.start),this.resetLoadingState(),s}return!1}resetFragmentErrors(e){e===Ve.AUDIO&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==vt.STOPPED&&(this.state=vt.IDLE)}afterBufferFlushed(e,t,r){if(!e)return;const n=Mr.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,n,r),this.state===vt.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=vt.IDLE}resetStartWhenNotLoaded(e){if(!this.loadedmetadata){this.startFragRequested=!1;const t=e?e.details:null;t!=null&&t.live?(this.startPosition=-1,this.setStartPosition(t,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){this.warn(`The loading context changed while buffering fragment ${e.sn} of level ${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,r,n){var i;const s=r.details;if(!s){this.warn("level.details undefined");return}if(!Object.keys(e.elementaryStreams).reduce((f,m)=>{const _=e.elementaryStreams[m];if(_){const b=_.endPTS-_.startPTS;if(b<=0)return this.warn(`Could not parse fragment ${e.sn} ${m} duration reliably (${b})`),f||!1;const C=n?0:ui(s,e,_.startPTS,_.endPTS,_.startDTS,_.endDTS);return this.hls.trigger(d.LEVEL_PTS_UPDATED,{details:s,level:r,drift:C,type:m,frag:e,start:_.startPTS,end:_.endPTS}),!0}return f},!1)&&((i=this.transmuxer)==null?void 0:i.error)===null){const f=new Error(`Found no media in fragment ${e.sn} of level ${e.level} resetting transmuxer to fallback to playlist timing`);if(r.fragmentError===0&&(r.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)),this.warn(f.message),this.hls.trigger(d.ERROR,{type:w.MEDIA_ERROR,details:y.FRAG_PARSING_ERROR,fatal:!1,error:f,frag:e,reason:`Found no media in msn ${e.sn} of level "${r.url}"`}),!this.hls)return;this.resetTransmuxer()}this.state=vt.PARSED,this.hls.trigger(d.FRAG_PARSED,{frag:e,part:t})}resetTransmuxer(){this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null)}recoverWorkerError(e){e.event==="demuxerWorker"&&(this.fragmentTracker.removeAllFragments(),this.resetTransmuxer(),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}}class Ns{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:t}=this;let r;if(e.length)e.length===1?r=e[0]:r=ca(e,t);else return new Uint8Array(0);return this.reset(),r}reset(){this.chunks.length=0,this.dataLength=0}}function ca(a,e){const t=new Uint8Array(e);let r=0;for(let n=0;n<a.length;n++){const i=a[n];t.set(i,r),r+=i.length}return t}function ha(){return typeof __HLS_WORKER_BUNDLE__=="function"}function Us(){const a=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),e=self.URL.createObjectURL(a);return{worker:new self.Worker(e),objectURL:e}}function zs(a){const e=new self.URL(a,self.location.href).href;return{worker:new self.Worker(e),scriptURL:e}}function Xn(a="",e=9e4){return{type:a,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class ms{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,r,n){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,r){}demux(e,t){this.cachedData&&(e=Kt(this.cachedData,e),this.cachedData=null);let r=Pe(e,0),n=r?r.length:0,i;const s=this._audioTrack,u=this._id3Track,f=r?K(r):void 0,m=e.length;for((this.basePTS===null||this.frameIndex===0&&Y(f))&&(this.basePTS=fa(f,t,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),r&&r.length>0&&u.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:pn.audioId3,duration:Number.POSITIVE_INFINITY});n<m;){if(this.canParse(e,n)){const _=this.appendFrame(s,e,n);_?(this.frameIndex++,this.lastPTS=_.sample.pts,n+=_.length,i=n):n=m}else T(e,n)?(r=Pe(e,n),u.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:pn.audioId3,duration:Number.POSITIVE_INFINITY}),n+=r.length,i=n):n++;if(n===m&&i!==m){const _=Me(e,i);this.cachedData?this.cachedData=Kt(this.cachedData,_):this.cachedData=_}}return{audioTrack:s,videoTrack:Xn(),id3Track:u,textTrack:Xn()}}demuxSampleAes(e,t,r){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:Xn(),id3Track:this._id3Track,textTrack:Xn()}}destroy(){}}const fa=(a,e,t)=>{if(Y(a))return a*90;const r=t?t.baseTime*9e4/t.timescale:0;return e*9e4+r};function ja(a,e,t,r){let n,i,s,u;const f=navigator.userAgent.toLowerCase(),m=r,_=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];n=((e[t+2]&192)>>>6)+1;const b=(e[t+2]&60)>>>2;if(b>_.length-1){const C=new Error(`invalid ADTS sampling index:${b}`);a.emit(d.ERROR,d.ERROR,{type:w.MEDIA_ERROR,details:y.FRAG_PARSING_ERROR,fatal:!0,error:C,reason:C.message});return}return s=(e[t+2]&1)<<2,s|=(e[t+3]&192)>>>6,R.log(`manifest codec:${r}, ADTS type:${n}, samplingIndex:${b}`),/firefox/i.test(f)?b>=6?(n=5,u=new Array(4),i=b-3):(n=2,u=new Array(2),i=b):f.indexOf("android")!==-1?(n=2,u=new Array(2),i=b):(n=5,u=new Array(4),r&&(r.indexOf("mp4a.40.29")!==-1||r.indexOf("mp4a.40.5")!==-1)||!r&&b>=6?i=b-3:((r&&r.indexOf("mp4a.40.2")!==-1&&(b>=6&&s===1||/vivaldi/i.test(f))||!r&&s===1)&&(n=2,u=new Array(2)),i=b)),u[0]=n<<3,u[0]|=(b&14)>>1,u[1]|=(b&1)<<7,u[1]|=s<<3,n===5&&(u[1]|=(i&14)>>1,u[2]=(i&1)<<7,u[2]|=8,u[3]=0),{config:u,samplerate:_[b],channelCount:s,codec:"mp4a.40."+n,manifestCodec:m}}function gs(a,e){return a[e]===255&&(a[e+1]&246)===240}function $s(a,e){return a[e+1]&1?7:9}function _s(a,e){return(a[e+3]&3)<<11|a[e+4]<<3|(a[e+5]&224)>>>5}function da(a,e){return e+5<a.length}function mi(a,e){return e+1<a.length&&gs(a,e)}function is(a,e){return da(a,e)&&gs(a,e)&&_s(a,e)<=a.length-e}function Ka(a,e){if(mi(a,e)){const t=$s(a,e);if(e+t>=a.length)return!1;const r=_s(a,e);if(r<=t)return!1;const n=e+r;return n===a.length||mi(a,n)}return!1}function pa(a,e,t,r,n){if(!a.samplerate){const i=ja(e,t,r,n);if(!i)return;a.config=i.config,a.samplerate=i.samplerate,a.channelCount=i.channelCount,a.codec=i.codec,a.manifestCodec=i.manifestCodec,R.log(`parsed codec:${a.codec}, rate:${i.samplerate}, channels:${i.channelCount}`)}}function Gs(a){return 1024*9e4/a}function Ha(a,e){const t=$s(a,e);if(e+t<=a.length){const r=_s(a,e)-t;if(r>0)return{headerLength:t,frameLength:r}}}function js(a,e,t,r,n){const i=Gs(a.samplerate),s=r+n*i,u=Ha(e,t);let f;if(u){const{frameLength:b,headerLength:C}=u,U=C+b,F=Math.max(0,t+U-e.length);F?(f=new Uint8Array(U-C),f.set(e.subarray(t+C,e.length),0)):f=e.subarray(t+C,t+U);const j={unit:f,pts:s};return F||a.samples.push(j),{sample:j,length:U,missing:F}}const m=e.length-t;return f=new Uint8Array(m),f.set(e.subarray(t,e.length),0),{sample:{unit:f,pts:s},length:m,missing:-1}}let ss=null;const Wa=[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],ma=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Va=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],ga=[0,1,1,4];function vs(a,e,t,r,n){if(t+24>e.length)return;const i=ys(e,t);if(i&&t+i.frameLength<=e.length){const s=i.samplesPerFrame*9e4/i.sampleRate,u=r+n*s,f={unit:e.subarray(t,t+i.frameLength),pts:u,dts:u};return a.config=[],a.channelCount=i.channelCount,a.samplerate=i.sampleRate,a.samples.push(f),{sample:f,length:i.frameLength,missing:0}}}function ys(a,e){const t=a[e+1]>>3&3,r=a[e+1]>>1&3,n=a[e+2]>>4&15,i=a[e+2]>>2&3;if(t!==1&&n!==0&&n!==15&&i!==3){const s=a[e+2]>>1&1,u=a[e+3]>>6,f=t===3?3-r:r===3?3:4,m=Wa[f*14+n-1]*1e3,b=ma[(t===3?0:t===2?1:2)*3+i],C=u===3?1:2,U=Va[t][r],F=ga[r],j=U*8*F,re=Math.floor(U*m/b+s)*F;if(ss===null){const Ze=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);ss=Ze?parseInt(Ze[1]):0}return!!ss&&ss<=87&&r===2&&m>=224e3&&u===0&&(a[e+3]=a[e+3]|128),{sampleRate:b,channelCount:C,frameLength:re,samplesPerFrame:j}}}function bs(a,e){return a[e]===255&&(a[e+1]&224)===224&&(a[e+1]&6)!==0}function Ks(a,e){return e+1<a.length&&bs(a,e)}function _a(a,e){return bs(a,e)&&4<=a.length-e}function va(a,e){if(e+1<a.length&&bs(a,e)){const r=ys(a,e);let n=4;r!=null&&r.frameLength&&(n=r.frameLength);const i=e+n;return i===a.length||Ks(a,i)}return!1}class ya extends ms{constructor(e,t){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=t}resetInitSegment(e,t,r,n){super.resetInitSegment(e,t,r,n),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:n,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=Pe(e,0);let r=(t==null?void 0:t.length)||0;if(va(e,r))return!1;for(let n=e.length;r<n;r++)if(Ka(e,r))return R.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return is(e,t)}appendFrame(e,t,r){pa(e,this.observer,t,r,e.manifestCodec);const n=js(e,t,r,this.basePTS,this.frameIndex);if(n&&n.missing===0)return n}}const ba=/\/emsg[-/]ID3/i;class Ya{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,r,n){const i=this.videoTrack=Xn("video",1),s=this.audioTrack=Xn("audio",1),u=this.txtTrack=Xn("text",1);if(this.id3Track=Xn("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const f=Ue(e);if(f.video){const{id:m,timescale:_,codec:b}=f.video;i.id=m,i.timescale=u.timescale=_,i.codec=b}if(f.audio){const{id:m,timescale:_,codec:b}=f.audio;s.id=m,s.timescale=_,s.codec=b}u.id=ft.text,i.sampleDuration=0,i.duration=s.duration=n}resetContiguity(){this.remainderData=null}static probe(e){return bt(e)}demux(e,t){this.timeOffset=t;let r=e;const n=this.videoTrack,i=this.txtTrack;if(this.config.progressive){this.remainderData&&(r=Kt(this.remainderData,e));const u=yr(r);this.remainderData=u.remainder,n.samples=u.valid||new Uint8Array}else n.samples=r;const s=this.extractID3Track(n,t);return i.samples=Pt(t,n),{videoTrack:n,audioTrack:this.audioTrack,id3Track:s,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,r=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const n=this.extractID3Track(t,this.timeOffset);return r.samples=Pt(e,t),{videoTrack:t,audioTrack:Xn(),id3Track:n,textTrack:Xn()}}extractID3Track(e,t){const r=this.id3Track;if(e.samples.length){const n=ce(e.samples,["emsg"]);n&&n.forEach(i=>{const s=kt(i);if(ba.test(s.schemeIdUri)){const u=Y(s.presentationTime)?s.presentationTime/s.timeScale:t+s.presentationTimeDelta/s.timeScale;let f=s.eventDuration===4294967295?Number.POSITIVE_INFINITY:s.eventDuration/s.timeScale;f<=.001&&(f=Number.POSITIVE_INFINITY);const m=s.payload;r.samples.push({data:m,len:m.byteLength,dts:u,pts:u,type:pn.emsg,duration:f})}})}return r}demuxSampleAes(e,t,r){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){}}const Yi=(a,e)=>{let t=0,r=5;e+=r;const n=new Uint32Array(1),i=new Uint32Array(1),s=new Uint8Array(1);for(;r>0;){s[0]=a[e];const u=Math.min(r,8),f=8-u;i[0]=4278190080>>>24+f<<f,n[0]=(s[0]&i[0])>>f,t=t?t<<u|n[0]:n[0],e+=1,r-=u}return t};class Hs extends ms{constructor(e){super(),this.observer=void 0,this.observer=e}resetInitSegment(e,t,r,n){super.resetInitSegment(e,t,r,n),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:t,duration:n,inputTimeScale:9e4,dropped:0}}canParse(e,t){return t+64<e.length}appendFrame(e,t,r){const n=Ws(e,t,r,this.basePTS,this.frameIndex);if(n!==-1)return{sample:e.samples[e.samples.length-1],length:n,missing:0}}static probe(e){if(!e)return!1;const t=Pe(e,0);if(!t)return!1;const r=t.length;return e[r]===11&&e[r+1]===119&&K(t)!==void 0&&Yi(e,r)<16}}function Ws(a,e,t,r,n){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 u=[48e3,44100,32e3][i],f=e[t+4]&63,_=[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][f*3+i]*2;if(t+_>e.length)return-1;const b=e[t+6]>>5;let C=0;b===2?C+=2:(b&1&&b!==1&&(C+=2),b&4&&(C+=2));const U=(e[t+6]<<8|e[t+7])>>12-C&1,j=[2,1,2,3,3,4,4,5][b]+U,re=e[t+5]>>3,De=e[t+5]&7,Xe=new Uint8Array([i<<6|re<<1|De>>2,(De&3)<<6|b<<3|U<<2|f>>4,f<<4&224]),Ze=1536/u*9e4,dt=r+n*Ze,et=e.subarray(t,t+_);return a.config=Xe,a.channelCount=j,a.samplerate=u,a.samples.push({unit:et,pts:dt}),_}class qa{constructor(){this.VideoSample=null}createVideoSample(e,t,r,n){return{key:e,frame:!1,pts:t,dts:r,units:[],debug:n,length:0}}getLastNalUnit(e){var t;let r=this.VideoSample,n;if((!r||r.units.length===0)&&(r=e[e.length-1]),(t=r)!=null&&t.units){const i=r.units;n=i[i.length-1]}return n}pushAccessUnit(e,t){if(e.units.length&&e.frame){if(e.pts===void 0){const r=t.samples,n=r.length;if(n){const i=r[n-1];e.pts=i.pts,e.dts=i.dts}else{t.dropped++;return}}t.samples.push(e)}e.debug.length&&R.log(e.pts+"/"+e.dts+":"+e.debug)}}class xa{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,r=e.byteLength-t,n=new Uint8Array(4),i=Math.min(4,t);if(i===0)throw new Error("no bytes available");n.set(e.subarray(r,r+i)),this.word=new DataView(n.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 r=this.word>>>32-t;if(e>32&&R.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?r<<t|this.readBits(t):r}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)}skipScalingList(e){let t=8,r=8,n;for(let i=0;i<e;i++)r!==0&&(n=this.readEG(),r=(t+n+256)%256),t=r===0?t:r}readSPS(){let e=0,t=0,r=0,n=0,i,s,u;const f=this.readUByte.bind(this),m=this.readBits.bind(this),_=this.readUEG.bind(this),b=this.readBoolean.bind(this),C=this.skipBits.bind(this),U=this.skipEG.bind(this),F=this.skipUEG.bind(this),j=this.skipScalingList.bind(this);f();const re=f();if(m(5),C(3),f(),F(),re===100||re===110||re===122||re===244||re===44||re===83||re===86||re===118||re===128){const yt=_();if(yt===3&&C(1),F(),F(),C(1),b())for(s=yt!==3?8:12,u=0;u<s;u++)b()&&(u<6?j(16):j(64))}F();const De=_();if(De===0)_();else if(De===1)for(C(1),U(),U(),i=_(),u=0;u<i;u++)U();F(),C(1);const Xe=_(),Ze=_(),dt=m(1);dt===0&&C(1),C(1),b()&&(e=_(),t=_(),r=_(),n=_());let et=[1,1];if(b()&&b())switch(f()){case 1:et=[1,1];break;case 2:et=[12,11];break;case 3:et=[10,11];break;case 4:et=[16,11];break;case 5:et=[40,33];break;case 6:et=[24,11];break;case 7:et=[20,11];break;case 8:et=[32,11];break;case 9:et=[80,33];break;case 10:et=[18,11];break;case 11:et=[15,11];break;case 12:et=[64,33];break;case 13:et=[160,99];break;case 14:et=[4,3];break;case 15:et=[3,2];break;case 16:et=[2,1];break;case 255:{et=[f()<<8|f(),f()<<8|f()];break}}return{width:Math.ceil((Xe+1)*16-e*2-t*2),height:(2-dt)*(Ze+1)*16-(dt?2:4)*(r+n),pixelRatio:et}}readSliceType(){return this.readUByte(),this.readUEG(),this.readUEG()}}class Za extends qa{parseAVCPES(e,t,r,n,i){const s=this.parseAVCNALu(e,r.data);let u=this.VideoSample,f,m=!1;r.data=null,u&&s.length&&!e.audFound&&(this.pushAccessUnit(u,e),u=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts,"")),s.forEach(_=>{var b;switch(_.type){case 1:{let j=!1;f=!0;const re=_.data;if(m&&re.length>4){const De=new xa(re).readSliceType();(De===2||De===4||De===7||De===9)&&(j=!0)}if(j){var C;(C=u)!=null&&C.frame&&!u.key&&(this.pushAccessUnit(u,e),u=this.VideoSample=null)}u||(u=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts,"")),u.frame=!0,u.key=j;break}case 5:f=!0,(b=u)!=null&&b.frame&&!u.key&&(this.pushAccessUnit(u,e),u=this.VideoSample=null),u||(u=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts,"")),u.key=!0,u.frame=!0;break;case 6:{f=!0,Gr(_.data,1,r.pts,t.samples);break}case 7:{var U,F;f=!0,m=!0;const j=_.data,De=new xa(j).readSPS();if(!e.sps||e.width!==De.width||e.height!==De.height||((U=e.pixelRatio)==null?void 0:U[0])!==De.pixelRatio[0]||((F=e.pixelRatio)==null?void 0:F[1])!==De.pixelRatio[1]){e.width=De.width,e.height=De.height,e.pixelRatio=De.pixelRatio,e.sps=[j],e.duration=i;const Xe=j.subarray(1,4);let Ze="avc1.";for(let dt=0;dt<3;dt++){let et=Xe[dt].toString(16);et.length<2&&(et="0"+et),Ze+=et}e.codec=Ze}break}case 8:f=!0,e.pps=[_.data];break;case 9:f=!0,e.audFound=!0,u&&this.pushAccessUnit(u,e),u=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts,"");break;case 12:f=!0;break;default:f=!1,u&&(u.debug+="unknown NAL "+_.type+" ");break}u&&f&&u.units.push(_)}),n&&u&&(this.pushAccessUnit(u,e),this.VideoSample=null)}parseAVCNALu(e,t){const r=t.byteLength;let n=e.naluState||0;const i=n,s=[];let u=0,f,m,_,b=-1,C=0;for(n===-1&&(b=0,C=t[0]&31,n=0,u=1);u<r;){if(f=t[u++],!n){n=f?0:1;continue}if(n===1){n=f?0:2;continue}if(!f)n=3;else if(f===1){if(m=u-n-1,b>=0){const U={data:t.subarray(b,m),type:C};s.push(U)}else{const U=this.getLastNalUnit(e.samples);U&&(i&&u<=4-i&&U.state&&(U.data=U.data.subarray(0,U.data.byteLength-i)),m>0&&(U.data=Kt(U.data,t.subarray(0,m)),U.state=0))}u<r?(_=t[u]&31,b=u,C=_,n=0):n=-1}else n=0}if(b>=0&&n>=0){const U={data:t.subarray(b,r),type:C,state:n};s.push(U)}if(s.length===0){const U=this.getLastNalUnit(e.samples);U&&(U.data=Kt(U.data,t))}return e.naluState=n,s}}class Vs{constructor(e,t,r){this.keyData=void 0,this.decrypter=void 0,this.keyData=r,this.decrypter=new ds(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer)}decryptAacSample(e,t,r){const n=e[t].unit;if(n.length<=16)return;const i=n.subarray(16,n.length-n.length%16),s=i.buffer.slice(i.byteOffset,i.byteOffset+i.length);this.decryptBuffer(s).then(u=>{const f=new Uint8Array(u);n.set(f,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,r)})}decryptAacSamples(e,t,r){for(;;t++){if(t>=e.length){r();return}if(!(e[t].unit.length<32)&&(this.decryptAacSample(e,t,r),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const t=Math.floor((e.length-48)/160)*16+16,r=new Int8Array(t);let n=0;for(let i=32;i<e.length-16;i+=160,n+=16)r.set(e.subarray(i,i+16),n);return r}getAvcDecryptedUnit(e,t){const r=new Uint8Array(t);let n=0;for(let i=32;i<e.length-16;i+=160,n+=16)e.set(r.subarray(n,n+16),i);return e}decryptAvcSample(e,t,r,n,i){const s=zr(i.data),u=this.getAvcEncryptedData(s);this.decryptBuffer(u.buffer).then(f=>{i.data=this.getAvcDecryptedUnit(s,f),this.decrypter.isSync()||this.decryptAvcSamples(e,t,r+1,n)})}decryptAvcSamples(e,t,r,n){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,r=0){if(t>=e.length){n();return}const i=e[t].units;for(;!(r>=i.length);r++){const s=i[r];if(!(s.data.length<=48||s.type!==1&&s.type!==5)&&(this.decryptAvcSample(e,t,r,n,s),!this.decrypter.isSync()))return}}}}const ln=188;class Di{constructor(e,t,r){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._duration=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=r,this.videoParser=new Za}static probe(e){const t=Di.syncOffset(e);return t>0&&R.warn(`MPEG2-TS detected but first sync word found @ offset ${t}`),t!==-1}static syncOffset(e){const t=e.length;let r=Math.min(ln*5,t-ln)+1,n=0;for(;n<r;){let i=!1,s=-1,u=0;for(let f=n;f<t;f+=ln)if(e[f]===71&&(t-f===ln||e[f+ln]===71)){if(u++,s===-1&&(s=f,s!==0&&(r=Math.min(s+ln*99,e.length-ln)+1)),i||(i=xs(e,f)===0),i&&u>1&&(s===0&&u>2||f+ln>r))return s}else{if(u)return-1;break}n++}return-1}static createTrack(e,t){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:ft[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:e==="audio"?t:void 0}}resetInitSegment(e,t,r,n){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=Di.createTrack("video"),this._audioTrack=Di.createTrack("audio",n),this._id3Track=Di.createTrack("id3"),this._txtTrack=Di.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=r,this._duration=n}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_videoTrack:t,_id3Track:r}=this;e&&(e.pesData=null),t&&(t.pesData=null),r&&(r.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(e,t,r=!1,n=!1){r||(this.sampleAes=null);let i;const s=this._videoTrack,u=this._audioTrack,f=this._id3Track,m=this._txtTrack;let _=s.pid,b=s.pesData,C=u.pid,U=f.pid,F=u.pesData,j=f.pesData,re=null,De=this.pmtParsed,Xe=this._pmtId,Ze=e.length;if(this.remainderData&&(e=Kt(this.remainderData,e),Ze=e.length,this.remainderData=null),Ze<ln&&!n)return this.remainderData=e,{audioTrack:u,videoTrack:s,id3Track:f,textTrack:m};const dt=Math.max(0,Di.syncOffset(e));Ze-=(Ze-dt)%ln,Ze<e.byteLength&&!n&&(this.remainderData=new Uint8Array(e.buffer,Ze,e.buffer.byteLength-Ze));let et=0;for(let ct=dt;ct<Ze;ct+=ln)if(e[ct]===71){const St=!!(e[ct+1]&64),Ft=xs(e,ct),_t=(e[ct+3]&48)>>4;let At;if(_t>1){if(At=ct+5+e[ct+4],At===ct+ln)continue}else At=ct+4;switch(Ft){case _:St&&(b&&(i=Ni(b))&&this.videoParser.parseAVCPES(s,m,i,!1,this._duration),b={data:[],size:0}),b&&(b.data.push(e.subarray(At,ct+ln)),b.size+=ct+ln-At);break;case C:if(St){if(F&&(i=Ni(F)))switch(u.segmentCodec){case"aac":this.parseAACPES(u,i);break;case"mp3":this.parseMPEGPES(u,i);break;case"ac3":this.parseAC3PES(u,i);break}F={data:[],size:0}}F&&(F.data.push(e.subarray(At,ct+ln)),F.size+=ct+ln-At);break;case U:St&&(j&&(i=Ni(j))&&this.parseID3PES(f,i),j={data:[],size:0}),j&&(j.data.push(e.subarray(At,ct+ln)),j.size+=ct+ln-At);break;case 0:St&&(At+=e[At]+1),Xe=this._pmtId=Xa(e,At);break;case Xe:{St&&(At+=e[At]+1);const ar=wa(e,At,this.typeSupported,r,this.observer);_=ar.videoPid,_>0&&(s.pid=_,s.segmentCodec=ar.segmentVideoCodec),C=ar.audioPid,C>0&&(u.pid=C,u.segmentCodec=ar.segmentAudioCodec),U=ar.id3Pid,U>0&&(f.pid=U),re!==null&&!De&&(R.warn(`MPEG-TS PMT found at ${ct} after unknown PID '${re}'. Backtracking to sync byte @${dt} to parse all TS packets.`),re=null,ct=dt-188),De=this.pmtParsed=!0;break}case 17:case 8191:break;default:re=Ft;break}}else et++;et>0&&ws(this.observer,new Error(`Found ${et} TS packet/s that do not start with 0x47`)),s.pesData=b,u.pesData=F,f.pesData=j;const yt={audioTrack:u,videoTrack:s,id3Track:f,textTrack:m};return n&&this.extractRemainingSamples(yt),yt}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:r,id3Track:n,textTrack:i}=e,s=r.pesData,u=t.pesData,f=n.pesData;let m;if(s&&(m=Ni(s))?(this.videoParser.parseAVCPES(r,i,m,!0,this._duration),r.pesData=null):r.pesData=s,u&&(m=Ni(u))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,m);break;case"mp3":this.parseMPEGPES(t,m);break;case"ac3":this.parseAC3PES(t,m);break}t.pesData=null}else u!=null&&u.size&&R.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=u;f&&(m=Ni(f))?(this.parseID3PES(n,m),n.pesData=null):n.pesData=f}demuxSampleAes(e,t,r){const n=this.demux(e,r,!0,!this.config.progressive),i=this.sampleAes=new Vs(this.observer,this.config,t);return this.decrypt(n,i)}decrypt(e,t){return new Promise(r=>{const{audioTrack:n,videoTrack:i}=e;n.samples&&n.segmentCodec==="aac"?t.decryptAacSamples(n.samples,0,()=>{i.samples?t.decryptAvcSamples(i.samples,0,0,()=>{r(e)}):r(e)}):i.samples&&t.decryptAvcSamples(i.samples,0,0,()=>{r(e)})})}destroy(){this._duration=0}parseAACPES(e,t){let r=0;const n=this.aacOverFlow;let i=t.data;if(n){this.aacOverFlow=null;const b=n.missing,C=n.sample.unit.byteLength;if(b===-1)i=Kt(n.sample.unit,i);else{const U=C-b;n.sample.unit.set(i.subarray(0,b),U),e.samples.push(n.sample),r=n.missing}}let s,u;for(s=r,u=i.length;s<u-1&&!mi(i,s);s++);if(s!==r){let b;const C=s<u-1;if(C?b=`AAC PES did not start with ADTS header,offset:${s}`:b="No ADTS header found in AAC PES",ws(this.observer,new Error(b),C),!C)return}pa(e,this.observer,i,s,this.audioCodec);let f;if(t.pts!==void 0)f=t.pts;else if(n){const b=Gs(e.samplerate);f=n.sample.pts+b}else{R.warn("[tsdemuxer]: AAC PES unknown PTS");return}let m=0,_;for(;s<u;)if(_=js(e,i,s,f,m),s+=_.length,_.missing){this.aacOverFlow=_;break}else for(m++;s<u-1&&!mi(i,s);s++);}parseMPEGPES(e,t){const r=t.data,n=r.length;let i=0,s=0;const u=t.pts;if(u===void 0){R.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;s<n;)if(Ks(r,s)){const f=vs(e,r,s,u,i);if(f)s+=f.length,i++;else break}else s++}parseAC3PES(e,t){{const r=t.data,n=t.pts;if(n===void 0){R.warn("[tsdemuxer]: AC3 PES unknown PTS");return}const i=r.length;let s=0,u=0,f;for(;u<i&&(f=Ws(e,r,u,n,s++))>0;)u+=f}}parseID3PES(e,t){if(t.pts===void 0){R.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const r=l({},t,{type:this._videoTrack?pn.emsg:pn.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(r)}}function xs(a,e){return((a[e+1]&31)<<8)+a[e+2]}function Xa(a,e){return(a[e+10]&31)<<8|a[e+11]}function wa(a,e,t,r,n){const i={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},s=(a[e+1]&15)<<8|a[e+2],u=e+3+s-4,f=(a[e+10]&15)<<8|a[e+11];for(e+=12+f;e<u;){const m=xs(a,e),_=(a[e+3]&15)<<8|a[e+4];switch(a[e]){case 207:if(!r){pe("ADTS AAC");break}case 15:i.audioPid===-1&&(i.audioPid=m);break;case 21:i.id3Pid===-1&&(i.id3Pid=m);break;case 219:if(!r){pe("H.264");break}case 27:i.videoPid===-1&&(i.videoPid=m,i.segmentVideoCodec="avc");break;case 3:case 4:!t.mpeg&&!t.mp3?R.log("MPEG audio found, not supported in this browser"):i.audioPid===-1&&(i.audioPid=m,i.segmentAudioCodec="mp3");break;case 193:if(!r){pe("AC-3");break}case 129:t.ac3?i.audioPid===-1&&(i.audioPid=m,i.segmentAudioCodec="ac3"):R.log("AC-3 audio found, not supported in this browser");break;case 6:if(i.audioPid===-1&&_>0){let b=e+5,C=_;for(;C>2;){switch(a[b]){case 106:t.ac3!==!0?R.log("AC-3 audio found, not supported in this browser for now"):(i.audioPid=m,i.segmentAudioCodec="ac3");break}const F=a[b+1]+2;b+=F,C-=F}}break;case 194:case 135:return ws(n,new Error("Unsupported EC-3 in M2TS found")),i;case 36:return ws(n,new Error("Unsupported HEVC in M2TS found")),i}e+=_+5}return i}function ws(a,e,t){R.warn(`parsing error: ${e.message}`),a.emit(d.ERROR,d.ERROR,{type:w.MEDIA_ERROR,details:y.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function pe(a){R.log(`${a} with AES-128-CBC encryption found in unencrypted stream`)}function Ni(a){let e=0,t,r,n,i,s;const u=a.data;if(!a||a.size===0)return null;for(;u[0].length<19&&u.length>1;)u[0]=Kt(u[0],u[1]),u.splice(1,1);if(t=u[0],(t[0]<<16)+(t[1]<<8)+t[2]===1){if(r=(t[4]<<8)+t[5],r&&r>a.size-6)return null;const m=t[7];m&192&&(i=(t[9]&14)*536870912+(t[10]&255)*4194304+(t[11]&254)*16384+(t[12]&255)*128+(t[13]&254)/2,m&64?(s=(t[14]&14)*536870912+(t[15]&255)*4194304+(t[16]&254)*16384+(t[17]&255)*128+(t[18]&254)/2,i-s>60*9e4&&(R.warn(`${Math.round((i-s)/9e4)}s delta between PTS and DTS, align them`),i=s)):s=i),n=t[8];let _=n+9;if(a.size<=_)return null;a.size-=_;const b=new Uint8Array(a.size);for(let C=0,U=u.length;C<U;C++){t=u[C];let F=t.byteLength;if(_)if(_>F){_-=F;continue}else t=t.subarray(_),F-=_,_=0;b.set(t,e),e+=F}return r&&(r-=n+3),{data:b,pts:i,dts:s,len:r}}return null}class Ys extends ms{resetInitSegment(e,t,r,n){super.resetInitSegment(e,t,r,n),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:t,duration:n,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=Pe(e,0);let r=(t==null?void 0:t.length)||0;if(t&&e[r]===11&&e[r+1]===119&&K(t)!==void 0&&Yi(e,r)<=16)return!1;for(let n=e.length;r<n;r++)if(va(e,r))return R.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return _a(e,t)}appendFrame(e,t,r){if(this.basePTS!==null)return vs(e,t,r,this.basePTS,this.frameIndex)}}class Es{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 gi=Math.pow(2,32)-1;class nt{static init(){nt.types={avc1:[],avcC:[],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 nt.types)nt.types.hasOwnProperty(e)&&(nt.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]),r=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]);nt.HDLR_TYPES={video:t,audio:r};const n=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]);nt.STTS=nt.STSC=nt.STCO=i,nt.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),nt.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),nt.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),nt.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const s=new Uint8Array([105,115,111,109]),u=new Uint8Array([97,118,99,49]),f=new Uint8Array([0,0,0,1]);nt.FTYP=nt.box(nt.types.ftyp,s,f,s,u),nt.DINF=nt.box(nt.types.dinf,nt.box(nt.types.dref,n))}static box(e,...t){let r=8,n=t.length;const i=n;for(;n--;)r+=t[n].byteLength;const s=new Uint8Array(r);for(s[0]=r>>24&255,s[1]=r>>16&255,s[2]=r>>8&255,s[3]=r&255,s.set(e,4),n=0,r=8;n<i;n++)s.set(t[n],r),r+=t[n].byteLength;return s}static hdlr(e){return nt.box(nt.types.hdlr,nt.HDLR_TYPES[e])}static mdat(e){return nt.box(nt.types.mdat,e)}static mdhd(e,t){t*=e;const r=Math.floor(t/(gi+1)),n=Math.floor(t%(gi+1));return nt.box(nt.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,r>>24,r>>16&255,r>>8&255,r&255,n>>24,n>>16&255,n>>8&255,n&255,85,196,0,0]))}static mdia(e){return nt.box(nt.types.mdia,nt.mdhd(e.timescale,e.duration),nt.hdlr(e.type),nt.minf(e))}static mfhd(e){return nt.box(nt.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"?nt.box(nt.types.minf,nt.box(nt.types.smhd,nt.SMHD),nt.DINF,nt.stbl(e)):nt.box(nt.types.minf,nt.box(nt.types.vmhd,nt.VMHD),nt.DINF,nt.stbl(e))}static moof(e,t,r){return nt.box(nt.types.moof,nt.mfhd(e),nt.traf(r,t))}static moov(e){let t=e.length;const r=[];for(;t--;)r[t]=nt.trak(e[t]);return nt.box.apply(null,[nt.types.moov,nt.mvhd(e[0].timescale,e[0].duration)].concat(r).concat(nt.mvex(e)))}static mvex(e){let t=e.length;const r=[];for(;t--;)r[t]=nt.trex(e[t]);return nt.box.apply(null,[nt.types.mvex,...r])}static mvhd(e,t){t*=e;const r=Math.floor(t/(gi+1)),n=Math.floor(t%(gi+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,r>>24,r>>16&255,r>>8&255,r&255,n>>24,n>>16&255,n>>8&255,n&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 nt.box(nt.types.mvhd,i)}static sdtp(e){const t=e.samples||[],r=new Uint8Array(4+t.length);let n,i;for(n=0;n<t.length;n++)i=t[n].flags,r[n+4]=i.dependsOn<<4|i.isDependedOn<<2|i.hasRedundancy;return nt.box(nt.types.sdtp,r)}static stbl(e){return nt.box(nt.types.stbl,nt.stsd(e),nt.box(nt.types.stts,nt.STTS),nt.box(nt.types.stsc,nt.STSC),nt.box(nt.types.stsz,nt.STSZ),nt.box(nt.types.stco,nt.STCO))}static avc1(e){let t=[],r=[],n,i,s;for(n=0;n<e.sps.length;n++)i=e.sps[n],s=i.byteLength,t.push(s>>>8&255),t.push(s&255),t=t.concat(Array.prototype.slice.call(i));for(n=0;n<e.pps.length;n++)i=e.pps[n],s=i.byteLength,r.push(s>>>8&255),r.push(s&255),r=r.concat(Array.prototype.slice.call(i));const u=nt.box(nt.types.avcC,new Uint8Array([1,t[3],t[4],t[5],255,224|e.sps.length].concat(t).concat([e.pps.length]).concat(r))),f=e.width,m=e.height,_=e.pixelRatio[0],b=e.pixelRatio[1];return nt.box(nt.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,f>>8&255,f&255,m>>8&255,m&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,nt.box(nt.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),nt.box(nt.types.pasp,new Uint8Array([_>>24,_>>16&255,_>>8&255,_&255,b>>24,b>>16&255,b>>8&255,b&255])))}static esds(e){const t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))}static audioStsd(e){const t=e.samplerate;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,t>>8&255,t&255,0,0])}static mp4a(e){return nt.box(nt.types.mp4a,nt.audioStsd(e),nt.box(nt.types.esds,nt.esds(e)))}static mp3(e){return nt.box(nt.types[".mp3"],nt.audioStsd(e))}static ac3(e){return nt.box(nt.types["ac-3"],nt.audioStsd(e),nt.box(nt.types.dac3,e.config))}static stsd(e){return e.type==="audio"?e.segmentCodec==="mp3"&&e.codec==="mp3"?nt.box(nt.types.stsd,nt.STSD,nt.mp3(e)):e.segmentCodec==="ac3"?nt.box(nt.types.stsd,nt.STSD,nt.ac3(e)):nt.box(nt.types.stsd,nt.STSD,nt.mp4a(e)):nt.box(nt.types.stsd,nt.STSD,nt.avc1(e))}static tkhd(e){const t=e.id,r=e.duration*e.timescale,n=e.width,i=e.height,s=Math.floor(r/(gi+1)),u=Math.floor(r%(gi+1));return nt.box(nt.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,u>>24,u>>16&255,u>>8&255,u&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,n>>8&255,n&255,0,0,i>>8&255,i&255,0,0]))}static traf(e,t){const r=nt.sdtp(e),n=e.id,i=Math.floor(t/(gi+1)),s=Math.floor(t%(gi+1));return nt.box(nt.types.traf,nt.box(nt.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255])),nt.box(nt.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])),nt.trun(e,r.length+16+20+8+16+8+8),r)}static trak(e){return e.duration=e.duration||4294967295,nt.box(nt.types.trak,nt.tkhd(e),nt.mdia(e))}static trex(e){const t=e.id;return nt.box(nt.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 r=e.samples||[],n=r.length,i=12+16*n,s=new Uint8Array(i);let u,f,m,_,b,C;for(t+=8+i,s.set([e.type==="video"?1:0,0,15,1,n>>>24&255,n>>>16&255,n>>>8&255,n&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),u=0;u<n;u++)f=r[u],m=f.duration,_=f.size,b=f.flags,C=f.cts,s.set([m>>>24&255,m>>>16&255,m>>>8&255,m&255,_>>>24&255,_>>>16&255,_>>>8&255,_&255,b.isLeading<<2|b.dependsOn,b.isDependedOn<<6|b.hasRedundancy<<4|b.paddingValue<<1|b.isNonSync,b.degradPrio&61440,b.degradPrio&15,C>>>24&255,C>>>16&255,C>>>8&255,C&255],12+16*u);return nt.box(nt.types.trun,s)}static initSegment(e){nt.types||nt.init();const t=nt.moov(e);return Kt(nt.FTYP,t)}}nt.types=void 0,nt.HDLR_TYPES=void 0,nt.STTS=void 0,nt.STSC=void 0,nt.STCO=void 0,nt.STSZ=void 0,nt.VMHD=void 0,nt.SMHD=void 0,nt.STSD=void 0,nt.FTYP=void 0,nt.DINF=void 0;const qs=9e4;function Ss(a,e,t=1,r=!1){const n=a*e*t;return r?Math.round(n):n}function Ja(a,e,t=1,r=!1){return Ss(a,e,1/t,r)}function qi(a,e=!1){return Ss(a,1e3,1/qs,e)}function Ea(a,e=1){return Ss(a,qs,1/e)}const As=10*1e3,Sa=1024,Zs=1152,Aa=1536;let Zi=null,Xs=null;class as{constructor(e,t,r,n=""){if(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=r,this.ISGenerated=!1,Zi===null){const s=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Zi=s?parseInt(s[1]):0}if(Xs===null){const i=navigator.userAgent.match(/Safari\/(\d+)/i);Xs=i?parseInt(i[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){R.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){R.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){R.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}getVideoStartPts(e){let t=!1;const r=e[0].pts,n=e.reduce((i,s)=>{let u=s.pts,f=u-i;return f<-4294967296&&(t=!0,u=Cn(u,r),f=u-i),f>0?i:u},r);return t&&R.debug("PTS rollover detected"),n}remux(e,t,r,n,i,s,u,f){let m,_,b,C,U,F,j=i,re=i;const De=e.pid>-1,Xe=t.pid>-1,Ze=t.samples.length,dt=e.samples.length>0,et=u&&Ze>0||Ze>1;if((!De||dt)&&(!Xe||et)||this.ISGenerated||u){if(this.ISGenerated){var ct,St,Ft,_t;const sr=this.videoTrackConfig;sr&&(t.width!==sr.width||t.height!==sr.height||((ct=t.pixelRatio)==null?void 0:ct[0])!==((St=sr.pixelRatio)==null?void 0:St[0])||((Ft=t.pixelRatio)==null?void 0:Ft[1])!==((_t=sr.pixelRatio)==null?void 0:_t[1]))&&this.resetInitSegment()}else b=this.generateIS(e,t,i,s);const At=this.isVideoContiguous;let ar=-1,$t;if(et&&(ar=Qa(t.samples),!At&&this.config.forceKeyFrameOnDiscontinuity))if(F=!0,ar>0){R.warn(`[mp4-remuxer]: Dropped ${ar} out of ${Ze} video samples due to a missing keyframe`);const sr=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(ar),t.dropped+=ar,re+=(t.samples[0].pts-sr)/t.inputTimeScale,$t=re}else ar===-1&&(R.warn(`[mp4-remuxer]: No keyframe found out of ${Ze} video samples`),F=!1);if(this.ISGenerated){if(dt&&et){const sr=this.getVideoStartPts(t.samples),Jt=(Cn(e.samples[0].pts,sr)-sr)/t.inputTimeScale;j+=Math.max(0,Jt),re+=Math.max(0,-Jt)}if(dt){if(e.samplerate||(R.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),b=this.generateIS(e,t,i,s)),_=this.remuxAudio(e,j,this.isAudioContiguous,s,Xe||et||f===Ve.AUDIO?re:void 0),et){const sr=_?_.endPTS-_.startPTS:0;t.inputTimeScale||(R.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),b=this.generateIS(e,t,i,s)),m=this.remuxVideo(t,re,At,sr)}}else et&&(m=this.remuxVideo(t,re,At,0));m&&(m.firstKeyFrame=ar,m.independent=ar!==-1,m.firstKeyFramePTS=$t)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(r.samples.length&&(U=Ta(r,i,this._initPTS,this._initDTS)),n.samples.length&&(C=eo(n,i,this._initPTS))),{audio:_,video:m,initSegment:b,independent:F,text:C,id3:U}}generateIS(e,t,r,n){const i=e.samples,s=t.samples,u=this.typeSupported,f={},m=this._initPTS;let _=!m||n,b="audio/mp4",C,U,F;if(_&&(C=U=1/0),e.config&&i.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":u.mpeg?(b="audio/mpeg",e.codec=""):u.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}f.audio={id:"audio",container:b,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&u.mpeg?new Uint8Array(0):nt.initSegment([e]),metadata:{channelCount:e.channelCount}},_&&(F=e.inputTimeScale,!m||F!==m.timescale?C=U=i[0].pts-Math.round(F*r):_=!1)}if(t.sps&&t.pps&&s.length){if(t.timescale=t.inputTimeScale,f.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:nt.initSegment([t]),metadata:{width:t.width,height:t.height}},_)if(F=t.inputTimeScale,!m||F!==m.timescale){const j=this.getVideoStartPts(s),re=Math.round(F*r);U=Math.min(U,Cn(s[0].dts,j)-re),C=Math.min(C,j-re)}else _=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(f).length)return this.ISGenerated=!0,_?(this._initPTS={baseTime:C,timescale:F},this._initDTS={baseTime:U,timescale:F}):C=F=void 0,{tracks:f,initPTS:C,timescale:F}}remuxVideo(e,t,r,n){const i=e.inputTimeScale,s=e.samples,u=[],f=s.length,m=this._initPTS;let _=this.nextAvcDts,b=8,C=this.videoSampleDuration,U,F,j=Number.POSITIVE_INFINITY,re=Number.NEGATIVE_INFINITY,De=!1;if(!r||_===null){const Yt=t*i,Gt=s[0].pts-Cn(s[0].dts,s[0].pts);Zi&&_!==null&&Math.abs(Yt-Gt-_)<15e3?r=!0:_=Yt-Gt}const Xe=m.baseTime*i/m.timescale;for(let Yt=0;Yt<f;Yt++){const Gt=s[Yt];Gt.pts=Cn(Gt.pts-Xe,_),Gt.dts=Cn(Gt.dts-Xe,_),Gt.dts<s[Yt>0?Yt-1:Yt].dts&&(De=!0)}De&&s.sort(function(Yt,Gt){const Cr=Yt.dts-Gt.dts,pr=Yt.pts-Gt.pts;return Cr||pr}),U=s[0].dts,F=s[s.length-1].dts;const Ze=F-U,dt=Ze?Math.round(Ze/(f-1)):C||e.inputTimeScale/30;if(r){const Yt=U-_,Gt=Yt>dt,Cr=Yt<-1;if((Gt||Cr)&&(Gt?R.warn(`AVC: ${qi(Yt,!0)} ms (${Yt}dts) hole between fragments detected at ${t.toFixed(3)}`):R.warn(`AVC: ${qi(-Yt,!0)} ms (${Yt}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!Cr||_>=s[0].pts||Zi)){U=_;const pr=s[0].pts-Yt;if(Gt)s[0].dts=U,s[0].pts=pr;else for(let Br=0;Br<s.length&&!(s[Br].dts>pr);Br++)s[Br].dts-=Yt,s[Br].pts-=Yt;R.log(`Video: Initial PTS/DTS adjusted: ${qi(pr,!0)}/${qi(U,!0)}, delta: ${qi(Yt,!0)} ms`)}}U=Math.max(0,U);let et=0,yt=0,ct=U;for(let Yt=0;Yt<f;Yt++){const Gt=s[Yt],Cr=Gt.units,pr=Cr.length;let Br=0;for(let un=0;un<pr;un++)Br+=Cr[un].data.length;yt+=Br,et+=pr,Gt.length=Br,Gt.dts<ct?(Gt.dts=ct,ct+=dt/4|0||1):ct=Gt.dts,j=Math.min(Gt.pts,j),re=Math.max(Gt.pts,re)}F=s[f-1].dts;const St=yt+4*et+8;let Ft;try{Ft=new Uint8Array(St)}catch(Yt){this.observer.emit(d.ERROR,d.ERROR,{type:w.MUX_ERROR,details:y.REMUX_ALLOC_ERROR,fatal:!1,error:Yt,bytes:St,reason:`fail allocating video mdat ${St}`});return}const _t=new DataView(Ft.buffer);_t.setUint32(0,St),Ft.set(nt.types.mdat,4);let At=!1,ar=Number.POSITIVE_INFINITY,$t=Number.POSITIVE_INFINITY,sr=Number.NEGATIVE_INFINITY,ir=Number.NEGATIVE_INFINITY;for(let Yt=0;Yt<f;Yt++){const Gt=s[Yt],Cr=Gt.units;let pr=0;for(let xn=0,Tn=Cr.length;xn<Tn;xn++){const si=Cr[xn],ta=si.data,bo=si.data.byteLength;_t.setUint32(b,bo),b+=4,Ft.set(ta,b),b+=bo,pr+=4+bo}let Br;if(Yt<f-1)C=s[Yt+1].dts-Gt.dts,Br=s[Yt+1].pts-Gt.pts;else{const xn=this.config,Tn=Yt>0?Gt.dts-s[Yt-1].dts:dt;if(Br=Yt>0?Gt.pts-s[Yt-1].pts:dt,xn.stretchShortVideoTrack&&this.nextAudioPts!==null){const si=Math.floor(xn.maxBufferHole*i),ta=(n?j+n*i:this.nextAudioPts)-Gt.pts;ta>si?(C=ta-Tn,C<0?C=Tn:At=!0,R.log(`[mp4-remuxer]: It is approximately ${ta/90} ms to the next segment; using duration ${C/90} ms for the last video frame.`)):C=Tn}else C=Tn}const un=Math.round(Gt.pts-Gt.dts);ar=Math.min(ar,C),sr=Math.max(sr,C),$t=Math.min($t,Br),ir=Math.max(ir,Br),u.push(new k(Gt.key,C,pr,un))}if(u.length){if(Zi){if(Zi<70){const Yt=u[0].flags;Yt.dependsOn=2,Yt.isNonSync=0}}else if(Xs&&ir-$t<sr-ar&&dt/sr<.025&&u[0].cts===0){R.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let Yt=U;for(let Gt=0,Cr=u.length;Gt<Cr;Gt++){const pr=Yt+u[Gt].duration,Br=Yt+u[Gt].cts;if(Gt<Cr-1){const un=pr+u[Gt+1].cts;u[Gt].duration=un-Br}else u[Gt].duration=Gt?u[Gt-1].duration:dt;u[Gt].cts=0,Yt=pr}}}C=At||!C?dt:C,this.nextAvcDts=_=F+C,this.videoSampleDuration=C,this.isVideoContiguous=!0;const Ur={data1:nt.moof(e.sequenceNumber++,U,l({},e,{samples:u})),data2:Ft,startPTS:j/i,endPTS:(re+C)/i,startDTS:U/i,endDTS:_/i,type:"video",hasAudio:!1,hasVideo:!0,nb:u.length,dropped:e.dropped};return e.samples=[],e.dropped=0,Ur}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return Zs;case"ac3":return Aa;default:return Sa}}remuxAudio(e,t,r,n,i){const s=e.inputTimeScale,u=e.samplerate?e.samplerate:s,f=s/u,m=this.getSamplesPerFrame(e),_=m*f,b=this._initPTS,C=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,U=[],F=i!==void 0;let j=e.samples,re=C?0:8,De=this.nextAudioPts||-1;const Xe=t*s,Ze=b.baseTime*s/b.timescale;if(this.isAudioContiguous=r=r||j.length&&De>0&&(n&&Math.abs(Xe-De)<9e3||Math.abs(Cn(j[0].pts-Ze,Xe)-De)<20*_),j.forEach(function(Jt){Jt.pts=Cn(Jt.pts-Ze,Xe)}),!r||De<0){if(j=j.filter(Jt=>Jt.pts>=0),!j.length)return;i===0?De=0:n&&!F?De=Math.max(0,Xe):De=j[0].pts}if(e.segmentCodec==="aac"){const Jt=this.config.maxAudioFramesDrift;for(let Ar=0,Ur=De;Ar<j.length;Ar++){const Yt=j[Ar],Gt=Yt.pts,Cr=Gt-Ur,pr=Math.abs(1e3*Cr/s);if(Cr<=-Jt*_&&F)Ar===0&&(R.warn(`Audio frame @ ${(Gt/s).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3*Cr/s)} ms.`),this.nextAudioPts=De=Ur=Gt);else if(Cr>=Jt*_&&pr<As&&F){let Br=Math.round(Cr/_);Ur=Gt-Br*_,Ur<0&&(Br--,Ur+=_),Ar===0&&(this.nextAudioPts=De=Ur),R.warn(`[mp4-remuxer]: Injecting ${Br} audio frame @ ${(Ur/s).toFixed(3)}s due to ${Math.round(1e3*Cr/s)} ms gap.`);for(let un=0;un<Br;un++){const xn=Math.max(Ur,0);let Tn=Es.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);Tn||(R.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),Tn=Yt.unit.subarray()),j.splice(Ar,0,{unit:Tn,pts:xn}),Ur+=_,Ar++}}Yt.pts=Ur,Ur+=_}}let dt=null,et=null,yt,ct=0,St=j.length;for(;St--;)ct+=j[St].unit.byteLength;for(let Jt=0,Ar=j.length;Jt<Ar;Jt++){const Ur=j[Jt],Yt=Ur.unit;let Gt=Ur.pts;if(et!==null){const pr=U[Jt-1];pr.duration=Math.round((Gt-et)/f)}else if(r&&e.segmentCodec==="aac"&&(Gt=De),dt=Gt,ct>0){ct+=re;try{yt=new Uint8Array(ct)}catch(pr){this.observer.emit(d.ERROR,d.ERROR,{type:w.MUX_ERROR,details:y.REMUX_ALLOC_ERROR,fatal:!1,error:pr,bytes:ct,reason:`fail allocating audio mdat ${ct}`});return}C||(new DataView(yt.buffer).setUint32(0,ct),yt.set(nt.types.mdat,4))}else return;yt.set(Yt,re);const Cr=Yt.byteLength;re+=Cr,U.push(new k(!0,m,Cr,0)),et=Gt}const Ft=U.length;if(!Ft)return;const _t=U[U.length-1];this.nextAudioPts=De=et+f*_t.duration;const At=C?new Uint8Array(0):nt.moof(e.sequenceNumber++,dt/f,l({},e,{samples:U}));e.samples=[];const ar=dt/s,$t=De/s,ir={data1:At,data2:yt,startPTS:ar,endPTS:$t,startDTS:ar,endDTS:$t,type:"audio",hasAudio:!0,hasVideo:!1,nb:Ft};return this.isAudioContiguous=!0,ir}remuxEmptyAudio(e,t,r,n){const i=e.inputTimeScale,s=e.samplerate?e.samplerate:i,u=i/s,f=this.nextAudioPts,m=this._initDTS,_=m.baseTime*9e4/m.timescale,b=(f!==null?f:n.startDTS*i)+_,C=n.endDTS*i+_,U=u*Sa,F=Math.ceil((C-b)/U),j=Es.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(R.warn("[mp4-remuxer]: remux empty Audio"),!j){R.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}const re=[];for(let De=0;De<F;De++){const Xe=b+De*U;re.push({unit:j,pts:Xe,dts:Xe})}return e.samples=re,this.remuxAudio(e,t,r,!1)}}function Cn(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 Qa(a){for(let e=0;e<a.length;e++)if(a[e].key)return e;return-1}function Ta(a,e,t,r){const n=a.samples.length;if(!n)return;const i=a.inputTimeScale;for(let u=0;u<n;u++){const f=a.samples[u];f.pts=Cn(f.pts-t.baseTime*i/t.timescale,e*i)/i,f.dts=Cn(f.dts-r.baseTime*i/r.timescale,e*i)/i}const s=a.samples;return a.samples=[],{samples:s}}function eo(a,e,t){const r=a.samples.length;if(!r)return;const n=a.inputTimeScale;for(let s=0;s<r;s++){const u=a.samples[s];u.pts=Cn(u.pts-t.baseTime*n/t.timescale,e*n)/n}a.samples.sort((s,u)=>s.pts-u.pts);const i=a.samples;return a.samples=[],{samples:i}}class k{constructor(e,t,r,n){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=r,this.cts=n,this.flags={isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:e?2:1,isNonSync:e?0:1}}}class o{constructor(){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}destroy(){}resetTimeStamp(e){this.initPTS=e,this.lastEndTime=null}resetNextTimestamp(){this.lastEndTime=null}resetInitSegment(e,t,r,n){this.audioCodec=t,this.videoCodec=r,this.generateInitSegment(L(e,n)),this.emitInitSegment=!0}generateInitSegment(e){let{audioCodec:t,videoCodec:r}=this;if(!(e!=null&&e.byteLength)){this.initTracks=void 0,this.initData=void 0;return}const n=this.initData=Ue(e);n.audio&&(t=h(n.audio,H.AUDIO)),n.video&&(r=h(n.video,H.VIDEO));const i={};n.audio&&n.video?i.audiovideo={container:"video/mp4",codec:t+","+r,initSegment:e,id:"main"}:n.audio?i.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:n.video?i.video={container:"video/mp4",codec:r,initSegment:e,id:"main"}:R.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=i}remux(e,t,r,n,i,s){var u,f;let{initPTS:m,lastEndTime:_}=this;const b={audio:void 0,video:void 0,text:n,id3:r,initSegment:void 0};Y(_)||(_=this.lastEndTime=i||0);const C=t.samples;if(!(C!=null&&C.length))return b;const U={initPTS:void 0,timescale:1};let F=this.initData;if((u=F)!=null&&u.length||(this.generateInitSegment(C),F=this.initData),!((f=F)!=null&&f.length))return R.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),b;this.emitInitSegment&&(U.tracks=this.initTracks,this.emitInitSegment=!1);const j=Et(C,F),re=fe(F,C),De=re===null?i:re;(c(m,De,i,j)||U.timescale!==m.timescale&&s)&&(U.initPTS=De-i,m&&m.timescale===1&&R.warn(`Adjusting initPTS by ${U.initPTS-m.baseTime}`),this.initPTS=m={baseTime:U.initPTS,timescale:1});const Xe=e?De-m.baseTime/m.timescale:_,Ze=Xe+j;Ut(F,C,m.baseTime/m.timescale),j>0?this.lastEndTime=Ze:(R.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const dt=!!F.audio,et=!!F.video;let yt="";dt&&(yt+="audio"),et&&(yt+="video");const ct={data1:C,startPTS:Xe,startDTS:Xe,endPTS:Ze,endDTS:Ze,type:yt,hasAudio:dt,hasVideo:et,nb:1,dropped:0};return b.audio=ct.type==="audio"?ct:void 0,b.video=ct.type!=="audio"?ct:void 0,b.initSegment=U,b.id3=Ta(r,i,m,m),n.samples.length&&(b.text=eo(n,i,m)),b}}function c(a,e,t,r){if(a===null)return!0;const n=Math.max(r,1),i=e-a.baseTime/a.timescale;return Math.abs(i-t)>n}function h(a,e){const t=a==null?void 0:a.codec;if(t&&t.length>4)return t;if(e===H.AUDIO){if(t==="ec-3"||t==="ac-3"||t==="alac")return t;if(t==="fLaC"||t==="Opus")return Rr(t,!1);const r="mp4a.40.5";return R.info(`Parsed audio codec "${t}" or audio object type not handled. Using "${r}"`),r}return R.warn(`Unhandled video codec "${t}"`),t==="hvc1"||t==="hev1"?"hvc1.1.6.L120.90":t==="av01"?"av01.0.04M.08":"avc1.42e01e"}let p;try{p=self.performance.now.bind(self.performance)}catch(a){R.debug("Unable to use Performance API on this environment"),p=qe==null?void 0:qe.Date.now}const E=[{demux:Ya,remux:o},{demux:Di,remux:as},{demux:ya,remux:as},{demux:Ys,remux:as}];E.splice(2,0,{demux:Hs,remux:as});class D{constructor(e,t,r,n,i){this.async=!1,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.vendor=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=r,this.vendor=n,this.id=i}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,r,n){const i=r.transmuxing;i.executeStart=p();let s=new Uint8Array(e);const{currentTransmuxState:u,transmuxConfig:f}=this;n&&(this.currentTransmuxState=n);const{contiguous:m,discontinuity:_,trackSwitch:b,accurateTimeOffset:C,timeOffset:U,initSegmentChange:F}=n||u,{audioCodec:j,videoCodec:re,defaultInitPts:De,duration:Xe,initSegmentData:Ze}=f,dt=J(s,t);if(dt&&dt.method==="AES-128"){const St=this.getDecrypter();if(St.isSync()){let Ft=St.softwareDecrypt(s,dt.key.buffer,dt.iv.buffer);if(r.part>-1&&(Ft=St.flush()),!Ft)return i.executeEnd=p(),le(r);s=new Uint8Array(Ft)}else return this.decryptionPromise=St.webCryptoDecrypt(s,dt.key.buffer,dt.iv.buffer).then(Ft=>{const _t=this.push(Ft,null,r);return this.decryptionPromise=null,_t}),this.decryptionPromise}const et=this.needsProbing(_,b);if(et){const St=this.configureTransmuxer(s);if(St)return R.warn(`[transmuxer] ${St.message}`),this.observer.emit(d.ERROR,d.ERROR,{type:w.MEDIA_ERROR,details:y.FRAG_PARSING_ERROR,fatal:!1,error:St,reason:St.message}),i.executeEnd=p(),le(r)}(_||b||F||et)&&this.resetInitSegment(Ze,j,re,Xe,t),(_||F||et)&&this.resetInitialTimestamp(De),m||this.resetContiguity();const yt=this.transmux(s,dt,U,C,r),ct=this.currentTransmuxState;return ct.contiguous=!0,ct.discontinuity=!1,ct.trackSwitch=!1,i.executeEnd=p(),yt}flush(e){const t=e.transmuxing;t.executeStart=p();const{decrypter:r,currentTransmuxState:n,decryptionPromise:i}=this;if(i)return i.then(()=>this.flush(e));const s=[],{timeOffset:u}=n;if(r){const b=r.flush();b&&s.push(this.push(b,null,e))}const{demuxer:f,remuxer:m}=this;if(!f||!m)return t.executeEnd=p(),[le(e)];const _=f.flush(u);return _e(_)?_.then(b=>(this.flushRemux(s,b,e),s)):(this.flushRemux(s,_,e),s)}flushRemux(e,t,r){const{audioTrack:n,videoTrack:i,id3Track:s,textTrack:u}=t,{accurateTimeOffset:f,timeOffset:m}=this.currentTransmuxState;R.log(`[transmuxer.ts]: Flushed fragment ${r.sn}${r.part>-1?" p: "+r.part:""} of level ${r.level}`);const _=this.remuxer.remux(n,i,s,u,m,f,!0,this.id);e.push({remuxResult:_,chunkMeta:r}),r.transmuxing.executeEnd=p()}resetInitialTimestamp(e){const{demuxer:t,remuxer:r}=this;!t||!r||(t.resetTimeStamp(e),r.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;!e||!t||(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,r,n,i){const{demuxer:s,remuxer:u}=this;!s||!u||(s.resetInitSegment(e,t,r,n),u.resetInitSegment(e,t,r,i))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,r,n,i){let s;return t&&t.method==="SAMPLE-AES"?s=this.transmuxSampleAes(e,t,r,n,i):s=this.transmuxUnencrypted(e,r,n,i),s}transmuxUnencrypted(e,t,r,n){const{audioTrack:i,videoTrack:s,id3Track:u,textTrack:f}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(i,s,u,f,t,r,!1,this.id),chunkMeta:n}}transmuxSampleAes(e,t,r,n,i){return this.demuxer.demuxSampleAes(e,t,r).then(s=>({remuxResult:this.remuxer.remux(s.audioTrack,s.videoTrack,s.id3Track,s.textTrack,r,n,!1,this.id),chunkMeta:i}))}configureTransmuxer(e){const{config:t,observer:r,typeSupported:n,vendor:i}=this;let s;for(let C=0,U=E.length;C<U;C++){var u;if((u=E[C].demux)!=null&&u.probe(e)){s=E[C];break}}if(!s)return new Error("Failed to find demuxer by probing fragment data");const f=this.demuxer,m=this.remuxer,_=s.remux,b=s.demux;(!m||!(m instanceof _))&&(this.remuxer=new _(r,t,n,i)),(!f||!(f instanceof b))&&(this.demuxer=new b(r,t,n),this.probe=b.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new ds(this.config)),e}}function J(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 le=a=>({remuxResult:{},chunkMeta:a});function _e(a){return"then"in a&&a.then instanceof Function}class Ke{constructor(e,t,r,n,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=r,this.duration=n,this.defaultInitPts=i||null}}class Je{constructor(e,t,r,n,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=r,this.trackSwitch=n,this.timeOffset=i,this.initSegmentChange=s}}var lt={exports:{}};(function(a){var e=Object.prototype.hasOwnProperty,t="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(t=!1));function n(f,m,_){this.fn=f,this.context=m,this.once=_||!1}function i(f,m,_,b,C){if(typeof _!="function")throw new TypeError("The listener must be a function");var U=new n(_,b||f,C),F=t?t+m:m;return f._events[F]?f._events[F].fn?f._events[F]=[f._events[F],U]:f._events[F].push(U):(f._events[F]=U,f._eventsCount++),f}function s(f,m){--f._eventsCount===0?f._events=new r:delete f._events[m]}function u(){this._events=new r,this._eventsCount=0}u.prototype.eventNames=function(){var m=[],_,b;if(this._eventsCount===0)return m;for(b in _=this._events)e.call(_,b)&&m.push(t?b.slice(1):b);return Object.getOwnPropertySymbols?m.concat(Object.getOwnPropertySymbols(_)):m},u.prototype.listeners=function(m){var _=t?t+m:m,b=this._events[_];if(!b)return[];if(b.fn)return[b.fn];for(var C=0,U=b.length,F=new Array(U);C<U;C++)F[C]=b[C].fn;return F},u.prototype.listenerCount=function(m){var _=t?t+m:m,b=this._events[_];return b?b.fn?1:b.length:0},u.prototype.emit=function(m,_,b,C,U,F){var j=t?t+m:m;if(!this._events[j])return!1;var re=this._events[j],De=arguments.length,Xe,Ze;if(re.fn){switch(re.once&&this.removeListener(m,re.fn,void 0,!0),De){case 1:return re.fn.call(re.context),!0;case 2:return re.fn.call(re.context,_),!0;case 3:return re.fn.call(re.context,_,b),!0;case 4:return re.fn.call(re.context,_,b,C),!0;case 5:return re.fn.call(re.context,_,b,C,U),!0;case 6:return re.fn.call(re.context,_,b,C,U,F),!0}for(Ze=1,Xe=new Array(De-1);Ze<De;Ze++)Xe[Ze-1]=arguments[Ze];re.fn.apply(re.context,Xe)}else{var dt=re.length,et;for(Ze=0;Ze<dt;Ze++)switch(re[Ze].once&&this.removeListener(m,re[Ze].fn,void 0,!0),De){case 1:re[Ze].fn.call(re[Ze].context);break;case 2:re[Ze].fn.call(re[Ze].context,_);break;case 3:re[Ze].fn.call(re[Ze].context,_,b);break;case 4:re[Ze].fn.call(re[Ze].context,_,b,C);break;default:if(!Xe)for(et=1,Xe=new Array(De-1);et<De;et++)Xe[et-1]=arguments[et];re[Ze].fn.apply(re[Ze].context,Xe)}}return!0},u.prototype.on=function(m,_,b){return i(this,m,_,b,!1)},u.prototype.once=function(m,_,b){return i(this,m,_,b,!0)},u.prototype.removeListener=function(m,_,b,C){var U=t?t+m:m;if(!this._events[U])return this;if(!_)return s(this,U),this;var F=this._events[U];if(F.fn)F.fn===_&&(!C||F.once)&&(!b||F.context===b)&&s(this,U);else{for(var j=0,re=[],De=F.length;j<De;j++)(F[j].fn!==_||C&&!F[j].once||b&&F[j].context!==b)&&re.push(F[j]);re.length?this._events[U]=re.length===1?re[0]:re:s(this,U)}return this},u.prototype.removeAllListeners=function(m){var _;return m?(_=t?t+m:m,this._events[_]&&s(this,_)):(this._events=new r,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=t,u.EventEmitter=u,a.exports=u})(lt);var gt=lt.exports,xt=V(gt);class Ct{constructor(e,t,r,n){this.error=null,this.hls=void 0,this.id=void 0,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.onwmsg=void 0,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0;const i=e.config;this.hls=e,this.id=t,this.useWorker=!!i.enableWorker,this.onTransmuxComplete=r,this.onFlush=n;const s=(m,_)=>{_=_||{},_.frag=this.frag,_.id=this.id,m===d.ERROR&&(this.error=_.error),this.hls.trigger(m,_)};this.observer=new xt,this.observer.on(d.FRAG_DECRYPTED,s),this.observer.on(d.ERROR,s);const u=Wr(i.preferManagedMediaSource)||{isTypeSupported:()=>!1},f={mpeg:u.isTypeSupported("audio/mpeg"),mp3:u.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:u.isTypeSupported('audio/mp4; codecs="ac-3"')};if(this.useWorker&&typeof Worker!="undefined"&&(i.workerPath||ha())){try{i.workerPath?(R.log(`loading Web Worker ${i.workerPath} for "${t}"`),this.workerContext=zs(i.workerPath)):(R.log(`injecting Web Worker for "${t}"`),this.workerContext=Us()),this.onwmsg=b=>this.onWorkerMessage(b);const{worker:_}=this.workerContext;_.addEventListener("message",this.onwmsg),_.onerror=b=>{const C=new Error(`${b.message} (${b.filename}:${b.lineno})`);i.enableWorker=!1,R.warn(`Error in "${t}" Web Worker, fallback to inline`),this.hls.trigger(d.ERROR,{type:w.OTHER_ERROR,details:y.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:C})},_.postMessage({cmd:"init",typeSupported:f,vendor:"",id:t,config:JSON.stringify(i)})}catch(_){R.warn(`Error setting up "${t}" Web Worker, fallback to inline`,_),this.resetWorker(),this.error=null,this.transmuxer=new D(this.observer,f,i,"",t)}return}this.transmuxer=new D(this.observer,f,i,"",t)}resetWorker(){if(this.workerContext){const{worker:e,objectURL:t}=this.workerContext;t&&self.URL.revokeObjectURL(t),e.removeEventListener("message",this.onwmsg),e.onerror=null,e.terminate(),this.workerContext=null}}destroy(){if(this.workerContext)this.resetWorker(),this.onwmsg=void 0;else{const t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.observer=null,this.hls=null}push(e,t,r,n,i,s,u,f,m,_){var b,C;m.transmuxing.start=self.performance.now();const{transmuxer:U}=this,F=s?s.start:i.start,j=i.decryptdata,re=this.frag,De=!(re&&i.cc===re.cc),Xe=!(re&&m.level===re.level),Ze=re?m.sn-re.sn:-1,dt=this.part?m.part-this.part.index:-1,et=Ze===0&&m.id>1&&m.id===(re==null?void 0:re.stats.chunkCount),yt=!Xe&&(Ze===1||Ze===0&&(dt===1||et&&dt<=0)),ct=self.performance.now();(Xe||Ze||i.stats.parsing.start===0)&&(i.stats.parsing.start=ct),s&&(dt||!yt)&&(s.stats.parsing.start=ct);const St=!(re&&((b=i.initSegment)==null?void 0:b.url)===((C=re.initSegment)==null?void 0:C.url)),Ft=new Je(De,yt,f,Xe,F,St);if(!yt||De||St){R.log(`[transmuxer-interface, ${i.type}]: Starting new transmux session for sn: ${m.sn} p: ${m.part} level: ${m.level} id: ${m.id}
discontinuity: ${De}
trackSwitch: ${Xe}
contiguous: ${yt}
accurateTimeOffset: ${f}
timeOffset: ${F}
initSegmentChange: ${St}`);const _t=new Ke(r,n,t,u,_);this.configureTransmuxer(_t)}if(this.frag=i,this.part=s,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:e,decryptdata:j,chunkMeta:m,state:Ft},e instanceof ArrayBuffer?[e]:[]);else if(U){const _t=U.push(e,j,m,Ft);_e(_t)?(U.async=!0,_t.then(At=>{this.handleTransmuxComplete(At)}).catch(At=>{this.transmuxerError(At,m,"transmuxer-interface push error")})):(U.async=!1,this.handleTransmuxComplete(_t))}}flush(e){e.transmuxing.start=self.performance.now();const{transmuxer:t}=this;if(this.workerContext)this.workerContext.worker.postMessage({cmd:"flush",chunkMeta:e});else if(t){let r=t.flush(e);_e(r)||t.async?(_e(r)||(r=Promise.resolve(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,r){this.hls&&(this.error=e,this.hls.trigger(d.ERROR,{type:w.MEDIA_ERROR,details:y.FRAG_PARSING_ERROR,chunkMeta:t,frag:this.frag||void 0,fatal:!1,error:e,err:e,reason:r}))}handleFlushResult(e,t){e.forEach(r=>{this.handleTransmuxComplete(r)}),this.onFlush(t)}onWorkerMessage(e){const t=e.data;if(!(t!=null&&t.event)){R.warn(`worker message received with no ${t?"event name":"data"}`);return}const r=this.hls;if(this.hls)switch(t.event){case"init":{var n;const i=(n=this.workerContext)==null?void 0:n.objectURL;i&&self.URL.revokeObjectURL(i);break}case"transmuxComplete":{this.handleTransmuxComplete(t.data);break}case"flush":{this.onFlush(t.data);break}case"workerLog":R[t.data.logType]&&R[t.data.logType](t.data.message);break;default:{t.data=t.data||{},t.data.frag=this.frag,t.data.id=this.id,r.trigger(t.event,t.data);break}}}configureTransmuxer(e){const{transmuxer:t}=this;this.workerContext?this.workerContext.worker.postMessage({cmd:"configure",config:e}):t&&t.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}const Ht=100;class er extends ps{constructor(e,t,r){super(e,t,r,"[audio-stream-controller]",Ve.AUDIO),this.videoBuffer=null,this.videoTrackCC=-1,this.waitingVideoCC=-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.mainDetails=null,this.bufferedTrack=null,this.switchingTrack=null}_registerListeners(){const{hls:e}=this;e.on(d.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.LEVEL_LOADED,this.onLevelLoaded,this),e.on(d.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(d.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(d.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(d.ERROR,this.onError,this),e.on(d.BUFFER_RESET,this.onBufferReset,this),e.on(d.BUFFER_CREATED,this.onBufferCreated,this),e.on(d.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(d.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(d.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(d.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(d.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.LEVEL_LOADED,this.onLevelLoaded,this),e.off(d.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(d.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(d.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(d.ERROR,this.onError,this),e.off(d.BUFFER_RESET,this.onBufferReset,this),e.off(d.BUFFER_CREATED,this.onBufferCreated,this),e.off(d.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(d.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(d.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(d.FRAG_BUFFERED,this.onFragBuffered,this)}onInitPtsFound(e,{frag:t,id:r,initPTS:n,timescale:i}){if(r==="main"){const s=t.cc;this.initPTS[t.cc]={baseTime:n,timescale:i},this.log(`InitPTS for cc: ${s} found from main: ${n}`),this.videoTrackCC=s,this.state===vt.WAITING_INIT_PTS&&this.tick()}}startLoad(e){if(!this.levels){this.startPosition=e,this.state=vt.STOPPED;return}const t=this.lastCurrentTime;this.stopLoad(),this.setInterval(Ht),t>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t,this.state=vt.IDLE):(this.loadedmetadata=!1,this.state=vt.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}doTick(){switch(this.state){case vt.IDLE:this.doTickIdle();break;case vt.WAITING_TRACK:{var e;const{levels:r,trackId:n}=this,i=r==null||(e=r[n])==null?void 0:e.details;if(i){if(this.waitForCdnTuneIn(i))break;this.state=vt.WAITING_INIT_PTS}break}case vt.FRAG_LOADING_WAITING_RETRY:{var t;const r=performance.now(),n=this.retryDate;if(!n||r>=n||(t=this.media)!=null&&t.seeking){const{levels:i,trackId:s}=this;this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded((i==null?void 0:i[s])||null),this.state=vt.IDLE}break}case vt.WAITING_INIT_PTS:{const r=this.waitingData;if(r){const{frag:n,part:i,cache:s,complete:u}=r;if(this.initPTS[n.cc]!==void 0){this.waitingData=null,this.waitingVideoCC=-1,this.state=vt.FRAG_LOADING;const f=s.flush(),m={frag:n,part:i,payload:f,networkDetails:null};this._handleFragmentLoadProgress(m),u&&super._handleFragmentLoadComplete(m)}else if(this.videoTrackCC!==this.waitingVideoCC)this.log(`Waiting fragment cc (${n.cc}) cancelled because video is at cc ${this.videoTrackCC}`),this.clearWaitingFragment();else{const f=this.getLoadPosition(),m=Mr.bufferInfo(this.mediaBuffer,f,this.config.maxBufferHole);Mi(m.end,this.config.maxFragLookUpTolerance,n)<0&&(this.log(`Waiting fragment cc (${n.cc}) @ ${n.start} cancelled because another fragment at ${m.end} is needed`),this.clearWaitingFragment())}}else this.state=vt.IDLE}}this.onTickEnd()}clearWaitingFragment(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=vt.IDLE)}resetLoadingState(){this.clearWaitingFragment(),super.resetLoadingState()}onTickEnd(){const{media:e}=this;e!=null&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){const{hls:e,levels:t,media:r,trackId:n}=this,i=e.config;if(!this.buffering||!r&&(this.startFragRequested||!i.startFragPrefetch)||!(t!=null&&t[n]))return;const s=t[n],u=s.details;if(!u||u.live&&this.levelLastLoaded!==s||this.waitForCdnTuneIn(u)){this.state=vt.WAITING_TRACK;return}const f=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&f&&(this.bufferFlushed=!1,this.afterBufferFlushed(f,H.AUDIO,Ve.AUDIO));const m=this.getFwdBufferInfo(f,Ve.AUDIO);if(m===null)return;if(!this.switchingTrack&&this._streamEnded(m,u)){e.trigger(d.BUFFER_EOS,{type:"audio"}),this.state=vt.ENDED;return}const _=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,Ve.MAIN),b=m.len,C=this.getMaxBufferLength(_==null?void 0:_.len),U=u.fragments,F=U[0].start,j=this.getLoadPosition(),re=this.flushing?j:m.end;if(this.switchingTrack&&r){const dt=j;u.PTSKnown&&dt<F&&(m.end>F||m.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),r.currentTime=F+.05)}if(b>=C&&!this.switchingTrack&&re<U[U.length-1].start)return;let De=this.getNextFragment(re,u),Xe=!1;if(De&&this.isLoopLoading(De,re)&&(Xe=!!De.gap,De=this.getNextFragmentLoopLoading(De,u,m,Ve.MAIN,C)),!De){this.bufferFlushed=!0;return}const Ze=_&&De.start>_.end+u.targetduration;if(Ze||!(_!=null&&_.len)&&m.len){const dt=this.getAppendedFrag(De.start,Ve.MAIN);if(dt===null||(Xe||(Xe=!!dt.gap||!!Ze&&_.len===0),Ze&&!Xe||Xe&&m.nextStart&&m.nextStart<dt.end))return}this.loadFragment(De,s,re)}getMaxBufferLength(e){const t=super.getMaxBufferLength();return e?Math.min(Math.max(t,e),this.config.maxMaxBufferLength):t}onMediaDetaching(){this.videoBuffer=null,this.bufferFlushed=this.flushing=!1,super.onMediaDetaching()}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(r=>new gn(r))}onAudioTrackSwitching(e,t){const r=!!t.url;this.trackId=t.id;const{fragCurrent:n}=this;n&&(n.abortRequests(),this.removeUnbufferedFrags(n.start)),this.resetLoadingState(),r?this.setInterval(Ht):this.resetTransmuxer(),r?(this.switchingTrack=t,this.state=vt.IDLE,this.flushAudioIfNeeded(t)):(this.switchingTrack=null,this.bufferedTrack=t,this.state=vt.STOPPED),this.tick()}onManifestLoading(){this.fragmentTracker.removeAllFragments(),this.startPosition=this.lastCurrentTime=0,this.bufferFlushed=this.flushing=!1,this.levels=this.mainDetails=this.waitingData=this.bufferedTrack=this.cachedTrackLoadedData=this.switchingTrack=null,this.startFragRequested=!1,this.trackId=this.videoTrackCC=this.waitingVideoCC=-1}onLevelLoaded(e,t){this.mainDetails=t.details,this.cachedTrackLoadedData!==null&&(this.hls.trigger(d.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)}onAudioTrackLoaded(e,t){var r;if(this.mainDetails==null){this.cachedTrackLoadedData=t;return}const{levels:n}=this,{details:i,id:s}=t;if(!n){this.warn(`Audio tracks were reset while loading level ${s}`);return}this.log(`Audio track ${s} loaded [${i.startSN},${i.endSN}]${i.lastPartSn?`[part-${i.lastPartSn}-${i.lastPartIndex}]`:""},duration:${i.totalduration}`);const u=n[s];let f=0;if(i.live||(r=u.details)!=null&&r.live){this.checkLiveUpdate(i);const _=this.mainDetails;if(i.deltaUpdateFailed||!_)return;if(!u.details&&i.hasProgramDateTime&&_.hasProgramDateTime)Zn(i,_),f=i.fragments[0].start;else{var m;f=this.alignPlaylists(i,u.details,(m=this.levelLastLoaded)==null?void 0:m.details)}}u.details=i,this.levelLastLoaded=u,!this.startFragRequested&&(this.mainDetails||!i.live)&&this.setStartPosition(this.mainDetails||i,f),this.state===vt.WAITING_TRACK&&!this.waitForCdnTuneIn(i)&&(this.state=vt.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:r,part:n,payload:i}=e,{config:s,trackId:u,levels:f}=this;if(!f){this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${r.sn} of level ${r.level} will not be buffered`);return}const m=f[u];if(!m){this.warn("Audio track is undefined on fragment load progress");return}const _=m.details;if(!_){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(r.start);return}const b=s.defaultAudioCodec||m.audioCodec||"mp4a.40.2";let C=this.transmuxer;C||(C=this.transmuxer=new Ct(this.hls,Ve.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const U=this.initPTS[r.cc],F=(t=r.initSegment)==null?void 0:t.data;if(U!==void 0){const re=n?n.index:-1,De=re!==-1,Xe=new Ps(r.level,r.sn,r.stats.chunkCount,i.byteLength,re,De);C.push(i,F,b,"",r,n,_.totalduration,!1,Xe,U)}else{this.log(`Unknown video PTS for cc ${r.cc}, waiting for video PTS before demuxing audio frag ${r.sn} of [${_.startSN} ,${_.endSN}],track ${u}`);const{cache:j}=this.waitingData=this.waitingData||{frag:r,part:n,cache:new Ns,complete:!1};j.push(new Uint8Array(i)),this.waitingVideoCC=this.videoTrackCC,this.state=vt.WAITING_INIT_PTS}}_handleFragmentLoadComplete(e){if(this.waitingData){this.waitingData.complete=!0;return}super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=this.videoBuffer=null,this.loadedmetadata=!1}onBufferCreated(e,t){const r=t.tracks.audio;r&&(this.mediaBuffer=r.buffer||null),t.tracks.video&&(this.videoBuffer=t.tracks.video.buffer||null)}onFragBuffered(e,t){const{frag:r,part:n}=t;if(r.type!==Ve.AUDIO){if(!this.loadedmetadata&&r.type===Ve.MAIN){const i=this.videoBuffer||this.media;i&&Mr.getBuffered(i).length&&(this.loadedmetadata=!0)}return}if(this.fragContextChanged(r)){this.warn(`Fragment ${r.sn}${n?" p: "+n.index:""} of level ${r.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);return}if(r.sn!=="initSegment"){this.fragPrevious=r;const i=this.switchingTrack;i&&(this.bufferedTrack=i,this.switchingTrack=null,this.hls.trigger(d.AUDIO_TRACK_SWITCHED,$e({},i)))}this.fragBufferedComplete(r,n)}onError(e,t){var r;if(t.fatal){this.state=vt.ERROR;return}switch(t.details){case y.FRAG_GAP:case y.FRAG_PARSING_ERROR:case y.FRAG_DECRYPT_ERROR:case y.FRAG_LOAD_ERROR:case y.FRAG_LOAD_TIMEOUT:case y.KEY_LOAD_ERROR:case y.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(Ve.AUDIO,t);break;case y.AUDIO_TRACK_LOAD_ERROR:case y.AUDIO_TRACK_LOAD_TIMEOUT:case y.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===vt.WAITING_TRACK&&((r=t.context)==null?void 0:r.type)===or.AUDIO_TRACK&&(this.state=vt.IDLE);break;case y.BUFFER_APPEND_ERROR:case y.BUFFER_FULL_ERROR:if(!t.parent||t.parent!=="audio")return;if(t.details===y.BUFFER_APPEND_ERROR){this.resetLoadingState();return}this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case y.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==H.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==H.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===vt.ENDED&&(this.state=vt.IDLE);const r=this.mediaBuffer||this.media;r&&(this.afterBufferFlushed(r,t,Ve.AUDIO),this.tick())}}_handleTransmuxComplete(e){var t;const r="audio",{hls:n}=this,{remuxResult:i,chunkMeta:s}=e,u=this.getCurrentContext(s);if(!u){this.resetWhenMissingContext(s);return}const{frag:f,part:m,level:_}=u,{details:b}=_,{audio:C,text:U,id3:F,initSegment:j}=i;if(this.fragContextChanged(f)||!b){this.fragmentTracker.removeFragment(f);return}if(this.state=vt.PARSING,this.switchingTrack&&C&&this.completeAudioSwitch(this.switchingTrack),j!=null&&j.tracks){const re=f.initSegment||f;this._bufferInitSegment(_,j.tracks,re,s),n.trigger(d.FRAG_PARSING_INIT_SEGMENT,{frag:re,id:r,tracks:j.tracks})}if(C){const{startPTS:re,endPTS:De,startDTS:Xe,endDTS:Ze}=C;m&&(m.elementaryStreams[H.AUDIO]={startPTS:re,endPTS:De,startDTS:Xe,endDTS:Ze}),f.setElementaryStreamInfo(H.AUDIO,re,De,Xe,Ze),this.bufferFragmentData(C,f,m,s)}if(F!=null&&(t=F.samples)!=null&&t.length){const re=l({id:r,frag:f,details:b},F);n.trigger(d.FRAG_PARSING_METADATA,re)}if(U){const re=l({id:r,frag:f,details:b},U);n.trigger(d.FRAG_PARSING_USERDATA,re)}}_bufferInitSegment(e,t,r,n){if(this.state!==vt.PARSING)return;t.video&&delete t.video;const i=t.audio;if(!i)return;i.id="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(d.BUFFER_CODECS,t);const u=i.initSegment;if(u!=null&&u.byteLength){const f={type:"audio",frag:r,part:null,chunkMeta:n,parent:r.type,data:u};this.hls.trigger(d.BUFFER_APPENDING,f)}this.tickImmediate()}loadFragment(e,t,r){const n=this.fragmentTracker.getState(e);if(this.fragCurrent=e,this.switchingTrack||n===on.NOT_LOADED||n===on.PARTIAL){var i;if(e.sn==="initSegment")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=vt.WAITING_INIT_PTS;const s=this.mainDetails;s&&s.fragments[0].start!==t.details.fragments[0].start&&Zn(t.details,s)}else this.startFragRequested=!0,super.loadFragment(e,t,r)}else this.clearTrackerIfNeeded(e)}flushAudioIfNeeded(e){if(this.media&&this.bufferedTrack){const{name:t,lang:r,assocLang:n,characteristics:i,audioCodec:s,channels:u}=this.bufferedTrack;fi({name:t,lang:r,assocLang:n,characteristics:i,audioCodec:s,channels:u},e,Ai)||(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null)}}completeAudioSwitch(e){const{hls:t}=this;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(d.AUDIO_TRACK_SWITCHED,$e({},e))}}function nr(a,e){if(a.length!==e.length)return!1;for(let t=0;t<a.length;t++)if(!tr(a[t].attrs,e[t].attrs))return!1;return!0}function tr(a,e,t){const r=a["STABLE-RENDITION-ID"];return r&&!t?r===e["STABLE-RENDITION-ID"]:!(t||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some(n=>a[n]!==e[n])}function Lr(a,e){return e.label.toLowerCase()===a.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(a.lang||"").toLowerCase())}class Ir extends Nr{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(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.MANIFEST_PARSED,this.onManifestParsed,this),e.on(d.LEVEL_LOADING,this.onLevelLoading,this),e.on(d.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(d.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(d.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.MANIFEST_PARSED,this.onManifestParsed,this),e.off(d.LEVEL_LOADING,this.onLevelLoading,this),e.off(d.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(d.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(d.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:r,groupId:n,details:i}=t,s=this.tracksInGroup[r];if(!s||s.groupId!==n){this.warn(`Audio track with id:${r} and group:${n} not found in active group ${s==null?void 0:s.groupId}`);return}const u=s.details;s.details=t.details,this.log(`Audio track ${r} "${s.name}" lang:${s.lang} group:${n} loaded [${i.startSN}-${i.endSN}]`),r===this.trackId&&this.playlistLoaded(r,t,u)}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 r=t.audioGroups||null,n=this.groupIds;let i=this.currentTrack;if(!r||(n==null?void 0:n.length)!==(r==null?void 0:r.length)||r!=null&&r.some(u=>(n==null?void 0:n.indexOf(u))===-1)){this.groupIds=r,this.trackId=-1,this.currentTrack=null;const u=this.tracks.filter(C=>!r||r.indexOf(C.groupId)!==-1);if(u.length)this.selectDefaultTrack&&!u.some(C=>C.default)&&(this.selectDefaultTrack=!1),u.forEach((C,U)=>{C.id=U});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=u;const f=this.hls.config.audioPreference;if(!i&&f){const C=Gn(f,u,Ai);if(C>-1)i=u[C];else{const U=Gn(f,this.tracks);i=this.tracks[U]}}let m=this.findTrackId(i);m===-1&&i&&(m=this.findTrackId(null));const _={audioTracks:u};this.log(`Updating audio tracks, ${u.length} track(s) found in group(s): ${r==null?void 0:r.join(",")}`),this.hls.trigger(d.AUDIO_TRACKS_UPDATED,_);const b=this.trackId;if(m!==-1&&b===-1)this.setAudioTrack(m);else if(u.length&&b===-1){var s;const C=new Error(`No audio track selected for current audio group-ID(s): ${(s=this.groupIds)==null?void 0:s.join(",")} track count: ${u.length}`);this.warn(C.message),this.hls.trigger(d.ERROR,{type:w.MEDIA_ERROR,details:y.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:C})}}else this.shouldReloadPlaylist(i)&&this.setAudioTrack(this.trackId)}onError(e,t){t.fatal||!t.context||t.context.type===or.AUDIO_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&(this.requestScheduled=-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 r=this.allAudioTracks;if(this.selectDefaultTrack=!1,r.length){const n=this.currentTrack;if(n&&fi(e,n,Ai))return n;const i=Gn(e,this.tracksInGroup,Ai);if(i>-1){const s=this.tracksInGroup[i];return this.setAudioTrack(i),s}else if(n){let s=t.loadLevel;s===-1&&(s=t.firstAutoLevel);const u=Ba(e,t.levels,r,s,Ai);if(u===-1)return null;t.nextLoadLevel=u}if(e.channels||e.audioCodec){const s=Gn(e,r);if(s>-1)return r[s]}}}return null}setAudioTrack(e){const t=this.tracksInGroup;if(e<0||e>=t.length){this.warn(`Invalid audio track id: ${e}`);return}this.clearTimer(),this.selectDefaultTrack=!1;const r=this.currentTrack,n=t[e],i=n.details&&!n.details.live;if(e===this.trackId&&n===r&&i||(this.log(`Switching to audio-track ${e} "${n.name}" lang:${n.lang} group:${n.groupId} channels:${n.channels}`),this.trackId=e,this.currentTrack=n,this.hls.trigger(d.AUDIO_TRACK_SWITCHING,$e({},n)),i))return;const s=this.switchParams(n.url,r==null?void 0:r.details,n.details);this.loadPlaylist(s)}findTrackId(e){const t=this.tracksInGroup;for(let r=0;r<t.length;r++){const n=t[r];if(!(this.selectDefaultTrack&&!n.default)&&(!e||fi(e,n,Ai)))return r}if(e){const{name:r,lang:n,assocLang:i,characteristics:s,audioCodec:u,channels:f}=e;for(let m=0;m<t.length;m++){const _=t[m];if(fi({name:r,lang:n,assocLang:i,characteristics:s,audioCodec:u,channels:f},_,Ai))return m}for(let m=0;m<t.length;m++){const _=t[m];if(tr(e.attrs,_.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return m}for(let m=0;m<t.length;m++){const _=t[m];if(tr(e.attrs,_.attrs,["LANGUAGE"]))return m}}return-1}loadPlaylist(e){const t=this.currentTrack;if(this.shouldLoadPlaylist(t)&&t){super.loadPlaylist();const r=t.id,n=t.groupId;let i=t.url;if(e)try{i=e.addDirectives(i)}catch(s){this.warn(`Could not construct new URL with HLS Delivery Directives: ${s}`)}this.log(`loading audio-track playlist ${r} "${t.name}" lang:${t.lang} group:${n}`),this.clearTimer(),this.hls.trigger(d.AUDIO_TRACK_LOADING,{url:i,id:r,groupId:n,deliveryDirectives:e||null})}}}const $r=500;class Hr extends ps{constructor(e,t,r){super(e,t,r,"[subtitle-stream-controller]",Ve.SUBTITLE),this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this._registerListeners()}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null}_registerListeners(){const{hls:e}=this;e.on(d.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.LEVEL_LOADED,this.onLevelLoaded,this),e.on(d.ERROR,this.onError,this),e.on(d.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(d.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(d.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(d.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(d.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(d.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(d.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.LEVEL_LOADED,this.onLevelLoaded,this),e.off(d.ERROR,this.onError,this),e.off(d.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(d.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(d.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(d.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(d.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(d.FRAG_BUFFERED,this.onFragBuffered,this)}startLoad(e){this.stopLoad(),this.state=vt.IDLE,this.setInterval($r),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}onManifestLoading(){this.mainDetails=null,this.fragmentTracker.removeAllFragments()}onMediaDetaching(){this.tracksBuffered=[],super.onMediaDetaching()}onLevelLoaded(e,t){this.mainDetails=t.details}onSubtitleFragProcessed(e,t){const{frag:r,success:n}=t;if(this.fragPrevious=r,this.state=vt.IDLE,!n)return;const i=this.tracksBuffered[this.currentTrackId];if(!i)return;let s;const u=r.start;for(let m=0;m<i.length;m++)if(u>=i[m].start&&u<=i[m].end){s=i[m];break}const f=r.start+r.duration;s?s.end=f:(s={start:u,end:f},i.push(s)),this.fragmentTracker.fragBuffered(r),this.fragBufferedComplete(r,null)}onBufferFlushing(e,t){const{startOffset:r,endOffset:n}=t;if(r===0&&n!==Number.POSITIVE_INFINITY){const i=n-1;if(i<=0)return;t.endOffsetSubtitles=Math.max(0,i),this.tracksBuffered.forEach(s=>{for(let u=0;u<s.length;){if(s[u].end<=i){s.shift();continue}else if(s[u].start<i)s[u].start=i;else break;u++}}),this.fragmentTracker.removeFragmentsInRange(r,i,Ve.SUBTITLE)}}onFragBuffered(e,t){if(!this.loadedmetadata&&t.frag.type===Ve.MAIN){var r;(r=this.media)!=null&&r.buffered.length&&(this.loadedmetadata=!0)}}onError(e,t){const r=t.frag;(r==null?void 0:r.type)===Ve.SUBTITLE&&(t.details===y.FRAG_GAP&&this.fragmentTracker.fragBuffered(r,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==vt.STOPPED&&(this.state=vt.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&nr(this.levels,t)){this.levels=t.map(r=>new gn(r));return}this.tracksBuffered=[],this.levels=t.map(r=>{const n=new gn(r);return this.tracksBuffered[n.id]=[],n}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,Ve.SUBTITLE),this.fragPrevious=null,this.mediaBuffer=null}onSubtitleTrackSwitch(e,t){var r;if(this.currentTrackId=t.id,!((r=this.levels)!=null&&r.length)||this.currentTrackId===-1){this.clearInterval();return}const n=this.levels[this.currentTrackId];n!=null&&n.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,n&&this.setInterval($r)}onSubtitleTrackLoaded(e,t){var r;const{currentTrackId:n,levels:i}=this,{details:s,id:u}=t;if(!i){this.warn(`Subtitle tracks were reset while loading level ${u}`);return}const f=i[u];if(u>=i.length||!f)return;this.log(`Subtitle track ${u} loaded [${s.startSN},${s.endSN}]${s.lastPartSn?`[part-${s.lastPartSn}-${s.lastPartIndex}]`:""},duration:${s.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let m=0;if(s.live||(r=f.details)!=null&&r.live){const b=this.mainDetails;if(s.deltaUpdateFailed||!b)return;const C=b.fragments[0];if(!f.details)s.hasProgramDateTime&&b.hasProgramDateTime?(Zn(s,b),m=s.fragments[0].start):C&&(m=C.start,wt(s,m));else{var _;m=this.alignPlaylists(s,f.details,(_=this.levelLastLoaded)==null?void 0:_.details),m===0&&C&&(m=C.start,wt(s,m))}}f.details=s,this.levelLastLoaded=f,u===n&&(!this.startFragRequested&&(this.mainDetails||!s.live)&&this.setStartPosition(this.mainDetails||s,m),this.tick(),s.live&&!this.fragCurrent&&this.media&&this.state===vt.IDLE&&(Ei(null,s.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),f.details=void 0)))}_handleFragmentLoadComplete(e){const{frag:t,payload:r}=e,n=t.decryptdata,i=this.hls;if(!this.fragContextChanged(t)&&r&&r.byteLength>0&&n!=null&&n.key&&n.iv&&n.method==="AES-128"){const s=performance.now();this.decrypter.decrypt(new Uint8Array(r),n.key.buffer,n.iv.buffer).catch(u=>{throw i.trigger(d.ERROR,{type:w.MEDIA_ERROR,details:y.FRAG_DECRYPT_ERROR,fatal:!1,error:u,reason:u.message,frag:t}),u}).then(u=>{const f=performance.now();i.trigger(d.FRAG_DECRYPTED,{frag:t,payload:u,stats:{tstart:s,tdecrypt:f}})}).catch(u=>{this.warn(`${u.name}: ${u.message}`),this.state=vt.IDLE})}}doTick(){if(!this.media){this.state=vt.IDLE;return}if(this.state===vt.IDLE){const{currentTrackId:e,levels:t}=this,r=t==null?void 0:t[e];if(!r||!t.length||!r.details)return;const{config:n}=this,i=this.getLoadPosition(),s=Mr.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],i,n.maxBufferHole),{end:u,len:f}=s,m=this.getFwdBufferInfo(this.media,Ve.MAIN),_=r.details,b=this.getMaxBufferLength(m==null?void 0:m.len)+_.levelTargetDuration;if(f>b)return;const C=_.fragments,U=C.length,F=_.edge;let j=null;const re=this.fragPrevious;if(u<F){const De=n.maxFragLookUpTolerance,Xe=u>F-De?0:De;j=Ei(re,C,Math.max(C[0].start,u),Xe),!j&&re&&re.start<C[0].start&&(j=C[0])}else j=C[U-1];if(!j)return;if(j=this.mapToInitFragWhenRequired(j),j.sn!=="initSegment"){const De=j.sn-_.startSN,Xe=C[De-1];Xe&&Xe.cc===j.cc&&this.fragmentTracker.getState(Xe)===on.NOT_LOADED&&(j=Xe)}this.fragmentTracker.getState(j)===on.NOT_LOADED&&this.loadFragment(j,r,u)}}getMaxBufferLength(e){const t=super.getMaxBufferLength();return e?Math.max(t,e):t}loadFragment(e,t,r){this.fragCurrent=e,e.sn==="initSegment"?this._loadInitSegment(e,t):(this.startFragRequested=!0,super.loadFragment(e,t,r))}get mediaBufferTimeRanges(){return new Xr(this.tracksBuffered[this.currentTrackId]||[])}}class Xr{constructor(e){this.buffered=void 0;const t=(r,n,i)=>{if(n=n>>>0,n>i-1)throw new DOMException(`Failed to execute '${r}' on 'TimeRanges': The index provided (${n}) is greater than the maximum bound (${i})`);return e[n][r]};this.buffered={get length(){return e.length},end(r){return t("end",r,e.length)},start(r){return t("start",r,e.length)}}}}class yn extends Nr{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.asyncPollTrackChange=()=>this.pollTrackChange(0),this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.onTextTracksChanged=()=>{if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let t=null;const r=Yr(this.media.textTracks);for(let i=0;i<r.length;i++)if(r[i].mode==="hidden")t=r[i];else if(r[i].mode==="showing"){t=r[i];break}const n=this.findTrackForTextTrack(t);this.subtitleTrack!==n&&this.setSubtitleTrack(n)},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(d.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.MANIFEST_PARSED,this.onManifestParsed,this),e.on(d.LEVEL_LOADING,this.onLevelLoading,this),e.on(d.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(d.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(d.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(d.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.MANIFEST_PARSED,this.onManifestParsed,this),e.off(d.LEVEL_LOADING,this.onLevelLoading,this),e.off(d.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(d.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(d.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(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),Yr(this.media.textTracks).forEach(t=>{En(t)}),this.subtitleTrack=-1,this.media=null}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:r,groupId:n,details:i}=t,s=this.tracksInGroup[r];if(!s||s.groupId!==n){this.warn(`Subtitle track with id:${r} and group:${n} not found in active group ${s==null?void 0:s.groupId}`);return}const u=s.details;s.details=t.details,this.log(`Subtitle track ${r} "${s.name}" lang:${s.lang} group:${n} loaded [${i.startSN}-${i.endSN}]`),r===this.trackId&&this.playlistLoaded(r,t,u)}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 r=t.subtitleGroups||null,n=this.groupIds;let i=this.currentTrack;if(!r||(n==null?void 0:n.length)!==(r==null?void 0:r.length)||r!=null&&r.some(s=>(n==null?void 0:n.indexOf(s))===-1)){this.groupIds=r,this.trackId=-1,this.currentTrack=null;const s=this.tracks.filter(_=>!r||r.indexOf(_.groupId)!==-1);if(s.length)this.selectDefaultTrack&&!s.some(_=>_.default)&&(this.selectDefaultTrack=!1),s.forEach((_,b)=>{_.id=b});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=s;const u=this.hls.config.subtitlePreference;if(!i&&u){this.selectDefaultTrack=!1;const _=Gn(u,s);if(_>-1)i=s[_];else{const b=Gn(u,this.tracks);i=this.tracks[b]}}let f=this.findTrackId(i);f===-1&&i&&(f=this.findTrackId(null));const m={subtitleTracks:s};this.log(`Updating subtitle tracks, ${s.length} track(s) found in "${r==null?void 0:r.join(",")}" group-id`),this.hls.trigger(d.SUBTITLE_TRACKS_UPDATED,m),f!==-1&&this.trackId===-1&&this.setSubtitleTrack(f)}else this.shouldReloadPlaylist(i)&&this.setSubtitleTrack(this.trackId)}findTrackId(e){const t=this.tracksInGroup,r=this.selectDefaultTrack;for(let n=0;n<t.length;n++){const i=t[n];if(!(r&&!i.default||!r&&!e)&&(!e||fi(i,e)))return n}if(e){for(let n=0;n<t.length;n++){const i=t[n];if(tr(e.attrs,i.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return n}for(let n=0;n<t.length;n++){const i=t[n];if(tr(e.attrs,i.attrs,["LANGUAGE"]))return n}}return-1}findTrackForTextTrack(e){if(e){const t=this.tracksInGroup;for(let r=0;r<t.length;r++){const n=t[r];if(Lr(n,e))return r}}return-1}onError(e,t){t.fatal||!t.context||t.context.type===or.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){const t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){const r=this.currentTrack;if(r&&fi(e,r))return r;const n=Gn(e,this.tracksInGroup);if(n>-1){const i=this.tracksInGroup[n];return this.setSubtitleTrack(n),i}else{if(r)return null;{const i=Gn(e,t);if(i>-1)return t[i]}}}}return null}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;if(this.shouldLoadPlaylist(t)&&t){const r=t.id,n=t.groupId;let i=t.url;if(e)try{i=e.addDirectives(i)}catch(s){this.warn(`Could not construct new URL with HLS Delivery Directives: ${s}`)}this.log(`Loading subtitle playlist for id ${r}`),this.hls.trigger(d.SUBTITLE_TRACK_LOADING,{url:i,id:r,groupId:n,deliveryDirectives:e||null})}}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=Yr(e.textTracks),r=this.currentTrack;let n;if(r&&(n=t.filter(i=>Lr(r,i))[0],n||this.warn(`Unable to find subtitle TextTrack with name "${r.name}" and language "${r.lang}"`)),[].slice.call(t).forEach(i=>{i.mode!=="disabled"&&i!==n&&(i.mode="disabled")}),n){const i=this.subtitleDisplay?"showing":"hidden";n.mode!==i&&(n.mode=i)}}setSubtitleTrack(e){const t=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=e;return}if(e<-1||e>=t.length||!Y(e)){this.warn(`Invalid subtitle track id: ${e}`);return}this.clearTimer(),this.selectDefaultTrack=!1;const r=this.currentTrack,n=t[e]||null;if(this.trackId=e,this.currentTrack=n,this.toggleTrackModes(),!n){this.hls.trigger(d.SUBTITLE_TRACK_SWITCH,{id:e});return}const i=!!n.details&&!n.details.live;if(e===this.trackId&&n===r&&i)return;this.log(`Switching to subtitle-track ${e}`+(n?` "${n.name}" lang:${n.lang} group:${n.groupId}`:""));const{id:s,groupId:u="",name:f,type:m,url:_}=n;this.hls.trigger(d.SUBTITLE_TRACK_SWITCH,{id:s,groupId:u,name:f,type:m,url:_});const b=this.switchParams(n.url,r==null?void 0:r.details,n.details);this.loadPlaylist(b)}}class hn{constructor(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}append(e,t,r){const n=this.queues[t];n.push(e),n.length===1&&!r&&this.executeNext(t)}insertAbort(e,t){this.queues[t].unshift(e),this.executeNext(t)}appendBlocker(e){let t;const r=new Promise(i=>{t=i}),n={execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};return this.append(n,e),r}executeNext(e){const t=this.queues[e];if(t.length){const r=t[0];try{r.execute()}catch(n){R.warn(`[buffer-operation-queue]: Exception executing "${e}" SourceBuffer operation: ${n}`),r.onError(n);const i=this.buffers[e];i!=null&&i.updating||this.shiftAndExecuteNext(e)}}}shiftAndExecuteNext(e){this.queues[e].shift(),this.executeNext(e)}current(e){return this.queues[e][0]}}const kr=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/;class jn{constructor(e){this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.appendSource=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this.log=void 0,this.warn=void 0,this.error=void 0,this._onEndStreaming=r=>{this.hls&&this.hls.pauseBuffering()},this._onStartStreaming=r=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=()=>{const{media:r,mediaSource:n}=this;this.log("Media source opened"),r&&(r.removeEventListener("emptied",this._onMediaEmptied),this.updateMediaElementDuration(),this.hls.trigger(d.MEDIA_ATTACHED,{media:r,mediaSource:n})),n&&n.removeEventListener("sourceopen",this._onMediaSourceOpen),this.checkPendingTracks()},this._onMediaSourceClose=()=>{this.log("Media source closed")},this._onMediaSourceEnded=()=>{this.log("Media source ended")},this._onMediaEmptied=()=>{const{mediaSrc:r,_objectUrl:n}=this;r!==n&&R.error(`Media element src was set while attaching MediaSource (${n} > ${r})`)},this.hls=e;const t="[buffer-controller]";this.appendSource=Mn(Wr(e.config.preferManagedMediaSource)),this.log=R.log.bind(R,t),this.warn=R.warn.bind(R,t),this.error=R.error.bind(R,t),this._initSourceBuffer(),this.registerListeners()}hasSourceTypes(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null,this.hls=null}registerListeners(){const{hls:e}=this;e.on(d.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.MANIFEST_PARSED,this.onManifestParsed,this),e.on(d.BUFFER_RESET,this.onBufferReset,this),e.on(d.BUFFER_APPENDING,this.onBufferAppending,this),e.on(d.BUFFER_CODECS,this.onBufferCodecs,this),e.on(d.BUFFER_EOS,this.onBufferEos,this),e.on(d.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(d.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(d.FRAG_PARSED,this.onFragParsed,this),e.on(d.FRAG_CHANGED,this.onFragChanged,this)}unregisterListeners(){const{hls:e}=this;e.off(d.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.MANIFEST_PARSED,this.onManifestParsed,this),e.off(d.BUFFER_RESET,this.onBufferReset,this),e.off(d.BUFFER_APPENDING,this.onBufferAppending,this),e.off(d.BUFFER_CODECS,this.onBufferCodecs,this),e.off(d.BUFFER_EOS,this.onBufferEos,this),e.off(d.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(d.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(d.FRAG_PARSED,this.onFragParsed,this),e.off(d.FRAG_CHANGED,this.onFragChanged,this)}_initSourceBuffer(){this.sourceBuffer={},this.operationQueue=new hn(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.appendErrors={audio:0,video:0,audiovideo:0},this.lastMpegAudioChunk=null}onManifestLoading(){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){let r=2;(t.audio&&!t.video||!t.altAudio)&&(r=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=r,this.log(`${this.bufferCodecEventsExpected} bufferCodec event(s) expected`)}onMediaAttaching(e,t){const r=this.media=t.media,n=Wr(this.appendSource);if(r&&n){var i;const s=this.mediaSource=new n;this.log(`created media source: ${(i=s.constructor)==null?void 0:i.name}`),s.addEventListener("sourceopen",this._onMediaSourceOpen),s.addEventListener("sourceended",this._onMediaSourceEnded),s.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(s.addEventListener("startstreaming",this._onStartStreaming),s.addEventListener("endstreaming",this._onEndStreaming));const u=this._objectUrl=self.URL.createObjectURL(s);if(this.appendSource)try{r.removeAttribute("src");const f=self.ManagedMediaSource;r.disableRemotePlayback=r.disableRemotePlayback||f&&s instanceof f,_i(r),Jn(r,u),r.load()}catch(f){r.src=u}else r.src=u;r.addEventListener("emptied",this._onMediaEmptied)}}onMediaDetaching(){const{media:e,mediaSource:t,_objectUrl:r}=this;if(t){if(this.log("media source detaching"),t.readyState==="open")try{t.endOfStream()}catch(n){this.warn(`onMediaDetaching: ${n.message} while calling endOfStream`)}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(t.removeEventListener("startstreaming",this._onStartStreaming),t.removeEventListener("endstreaming",this._onEndStreaming)),e&&(e.removeEventListener("emptied",this._onMediaEmptied),r&&self.URL.revokeObjectURL(r),this.mediaSrc===r?(e.removeAttribute("src"),this.appendSource&&_i(e),e.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this._objectUrl=null,this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={}}this.hls.trigger(d.MEDIA_DETACHED,void 0)}onBufferReset(){this.getSourceBufferTypes().forEach(e=>{this.resetBuffer(e)}),this._initSourceBuffer(),this.hls.resumeBuffering()}resetBuffer(e){const t=this.sourceBuffer[e];try{if(t){var r;this.removeBufferListeners(e),this.sourceBuffer[e]=void 0,(r=this.mediaSource)!=null&&r.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(t)}}catch(n){this.warn(`onBufferReset ${e}`,n)}}onBufferCodecs(e,t){const r=this.getSourceBufferTypes().length,n=Object.keys(t);if(n.forEach(s=>{if(r){const f=this.tracks[s];if(f&&typeof f.buffer.changeType=="function"){var u;const{id:m,codec:_,levelCodec:b,container:C,metadata:U}=t[s],F=Sr(f.codec,f.levelCodec),j=F==null?void 0:F.replace(kr,"$1");let re=Sr(_,b);const De=(u=re)==null?void 0:u.replace(kr,"$1");if(re&&j!==De){s.slice(0,5)==="audio"&&(re=Rr(re,this.appendSource));const Xe=`${C};codecs=${re}`;this.appendChangeType(s,Xe),this.log(`switching codec ${F} to ${re}`),this.tracks[s]={buffer:f.buffer,codec:_,container:C,levelCodec:b,metadata:U,id:m}}}}else this.pendingTracks[s]=t[s]}),r)return;const i=Math.max(this.bufferCodecEventsExpected-1,0);this.bufferCodecEventsExpected!==i&&(this.log(`${i} bufferCodec event(s) expected ${n.join(",")}`),this.bufferCodecEventsExpected=i),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()}appendChangeType(e,t){const{operationQueue:r}=this,n={execute:()=>{const i=this.sourceBuffer[e];i&&(this.log(`changing ${e} sourceBuffer type to ${t}`),i.changeType(t)),r.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:i=>{this.warn(`Failed to change ${e} SourceBuffer type`,i)}};r.append(n,e,!!this.pendingTracks[e])}onBufferAppending(e,t){const{hls:r,operationQueue:n,tracks:i}=this,{data:s,type:u,frag:f,part:m,chunkMeta:_}=t,b=_.buffering[u],C=self.performance.now();b.start=C;const U=f.stats.buffering,F=m?m.stats.buffering:null;U.start===0&&(U.start=C),F&&F.start===0&&(F.start=C);const j=i.audio;let re=!1;u==="audio"&&(j==null?void 0:j.container)==="audio/mpeg"&&(re=!this.lastMpegAudioChunk||_.id===1||this.lastMpegAudioChunk.sn!==_.sn,this.lastMpegAudioChunk=_);const De=f.start,Xe={execute:()=>{if(b.executeStart=self.performance.now(),re){const Ze=this.sourceBuffer[u];if(Ze){const dt=De-Ze.timestampOffset;Math.abs(dt)>=.1&&(this.log(`Updating audio SourceBuffer timestampOffset to ${De} (delta: ${dt}) sn: ${f.sn})`),Ze.timestampOffset=De)}}this.appendExecutor(s,u)},onStart:()=>{},onComplete:()=>{const Ze=self.performance.now();b.executeEnd=b.end=Ze,U.first===0&&(U.first=Ze),F&&F.first===0&&(F.first=Ze);const{sourceBuffer:dt}=this,et={};for(const yt in dt)et[yt]=Mr.getBuffered(dt[yt]);this.appendErrors[u]=0,u==="audio"||u==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(d.BUFFER_APPENDED,{type:u,frag:f,part:m,chunkMeta:_,parent:f.type,timeRanges:et})},onError:Ze=>{const dt={type:w.MEDIA_ERROR,parent:f.type,details:y.BUFFER_APPEND_ERROR,sourceBufferName:u,frag:f,part:m,chunkMeta:_,error:Ze,err:Ze,fatal:!1};if(Ze.code===DOMException.QUOTA_EXCEEDED_ERR)dt.details=y.BUFFER_FULL_ERROR;else{const et=++this.appendErrors[u];dt.details=y.BUFFER_APPEND_ERROR,this.warn(`Failed ${et}/${r.config.appendErrorMaxRetry} times to append segment in "${u}" sourceBuffer`),et>=r.config.appendErrorMaxRetry&&(dt.fatal=!0)}r.trigger(d.ERROR,dt)}};n.append(Xe,u,!!this.pendingTracks[u])}onBufferFlushing(e,t){const{operationQueue:r}=this,n=i=>({execute:this.removeExecutor.bind(this,i,t.startOffset,t.endOffset),onStart:()=>{},onComplete:()=>{this.hls.trigger(d.BUFFER_FLUSHED,{type:i})},onError:s=>{this.warn(`Failed to remove from ${i} SourceBuffer`,s)}});t.type?r.append(n(t.type),t.type):this.getSourceBufferTypes().forEach(i=>{r.append(n(i),i)})}onFragParsed(e,t){const{frag:r,part:n}=t,i=[],s=n?n.elementaryStreams:r.elementaryStreams;s[H.AUDIOVIDEO]?i.push("audiovideo"):(s[H.AUDIO]&&i.push("audio"),s[H.VIDEO]&&i.push("video"));const u=()=>{const f=self.performance.now();r.stats.buffering.end=f,n&&(n.stats.buffering.end=f);const m=n?n.stats:r.stats;this.hls.trigger(d.FRAG_BUFFERED,{frag:r,part:n,stats:m,id:r.type})};i.length===0&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${r.type} level: ${r.level} sn: ${r.sn}`),this.blockBuffers(u,i)}onFragChanged(e,t){this.trimBuffers()}onBufferEos(e,t){this.getSourceBufferTypes().reduce((n,i)=>{const s=this.sourceBuffer[i];return s&&(!t.type||t.type===i)&&(s.ending=!0,s.ended||(s.ended=!0,this.log(`${i} sourceBuffer now EOS`))),n&&!!(!s||s.ended)},!0)&&(this.log("Queueing mediaSource.endOfStream()"),this.blockBuffers(()=>{this.getSourceBufferTypes().forEach(i=>{const s=this.sourceBuffer[i];s&&(s.ending=!1)});const{mediaSource:n}=this;if(!n||n.readyState!=="open"){n&&this.log(`Could not call mediaSource.endOfStream(). mediaSource.readyState: ${n.readyState}`);return}this.log("Calling mediaSource.endOfStream()"),n.endOfStream()}))}onLevelUpdated(e,{details:t}){t.fragments.length&&(this.details=t,this.getSourceBufferTypes().length?this.blockBuffers(this.updateMediaElementDuration.bind(this)):this.updateMediaElementDuration())}trimBuffers(){const{hls:e,details:t,media:r}=this;if(!r||t===null||!this.getSourceBufferTypes().length)return;const i=e.config,s=r.currentTime,u=t.levelTargetDuration,f=t.live&&i.liveBackBufferLength!==null?i.liveBackBufferLength:i.backBufferLength;if(Y(f)&&f>0){const m=Math.max(f,u),_=Math.floor(s/u)*u-m;this.flushBackBuffer(s,u,_)}if(Y(i.frontBufferFlushThreshold)&&i.frontBufferFlushThreshold>0){const m=Math.max(i.maxBufferLength,i.frontBufferFlushThreshold),_=Math.max(m,u),b=Math.floor(s/u)*u+_;this.flushFrontBuffer(s,u,b)}}flushBackBuffer(e,t,r){const{details:n,sourceBuffer:i}=this;this.getSourceBufferTypes().forEach(u=>{const f=i[u];if(f){const m=Mr.getBuffered(f);if(m.length>0&&r>m.start(0)){if(this.hls.trigger(d.BACK_BUFFER_REACHED,{bufferEnd:r}),n!=null&&n.live)this.hls.trigger(d.LIVE_BACK_BUFFER_REACHED,{bufferEnd:r});else if(f.ended&&m.end(m.length-1)-e<t*2){this.log(`Cannot flush ${u} back buffer while SourceBuffer is in ended state`);return}this.hls.trigger(d.BUFFER_FLUSHING,{startOffset:0,endOffset:r,type:u})}}})}flushFrontBuffer(e,t,r){const{sourceBuffer:n}=this;this.getSourceBufferTypes().forEach(s=>{const u=n[s];if(u){const f=Mr.getBuffered(u),m=f.length;if(m<2)return;const _=f.start(m-1),b=f.end(m-1);if(r>_||e>=_&&e<=b)return;if(u.ended&&e-b<2*t){this.log(`Cannot flush ${s} front buffer while SourceBuffer is in ended state`);return}this.hls.trigger(d.BUFFER_FLUSHING,{startOffset:_,endOffset:1/0,type:s})}})}updateMediaElementDuration(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return;const{details:e,hls:t,media:r,mediaSource:n}=this,i=e.fragments[0].start+e.totalduration,s=r.duration,u=Y(n.duration)?n.duration:0;e.live&&t.config.liveDurationInfinity?(n.duration=1/0,this.updateSeekableRange(e)):(i>u&&i>s||!Y(s))&&(this.log(`Updating Media Source duration to ${i.toFixed(3)}`),n.duration=i)}updateSeekableRange(e){const t=this.mediaSource,r=e.fragments;if(r.length&&e.live&&t!=null&&t.setLiveSeekableRange){const i=Math.max(0,r[0].start),s=Math.max(i,i+e.totalduration);this.log(`Media Source duration is set to ${t.duration}. Setting seekable range to ${i}-${s}.`),t.setLiveSeekableRange(i,s)}}checkPendingTracks(){const{bufferCodecEventsExpected:e,operationQueue:t,pendingTracks:r}=this,n=Object.keys(r).length;if(n&&(!e||n===2||"audiovideo"in r)){this.createSourceBuffers(r),this.pendingTracks={};const i=this.getSourceBufferTypes();if(i.length)this.hls.trigger(d.BUFFER_CREATED,{tracks:this.tracks}),i.forEach(s=>{t.executeNext(s)});else{const s=new Error("could not create source buffer for media codec(s)");this.hls.trigger(d.ERROR,{type:w.MEDIA_ERROR,details:y.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:s,reason:s.message})}}}createSourceBuffers(e){const{sourceBuffer:t,mediaSource:r}=this;if(!r)throw Error("createSourceBuffers called when mediaSource was null");for(const i in e)if(!t[i]){var n;const s=e[i];if(!s)throw Error(`source buffer exists for track ${i}, however track does not`);let u=((n=s.levelCodec)==null?void 0:n.indexOf(","))===-1?s.levelCodec:s.codec;u&&i.slice(0,5)==="audio"&&(u=Rr(u,this.appendSource));const f=`${s.container};codecs=${u}`;this.log(`creating sourceBuffer(${f})`);try{const m=t[i]=r.addSourceBuffer(f),_=i;this.addBufferListener(_,"updatestart",this._onSBUpdateStart),this.addBufferListener(_,"updateend",this._onSBUpdateEnd),this.addBufferListener(_,"error",this._onSBUpdateError),this.appendSource&&this.addBufferListener(_,"bufferedchange",(b,C)=>{const U=C.removedRanges;U!=null&&U.length&&this.hls.trigger(d.BUFFER_FLUSHED,{type:i})}),this.tracks[i]={buffer:m,codec:u,container:s.container,levelCodec:s.levelCodec,metadata:s.metadata,id:s.id}}catch(m){this.error(`error while trying to add sourceBuffer: ${m.message}`),this.hls.trigger(d.ERROR,{type:w.MEDIA_ERROR,details:y.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:m,sourceBufferName:i,mimeType:f})}}}get mediaSrc(){var e,t;const r=((e=this.media)==null||(t=e.querySelector)==null?void 0:t.call(e,"source"))||this.media;return r==null?void 0:r.src}_onSBUpdateStart(e){const{operationQueue:t}=this;t.current(e).onStart()}_onSBUpdateEnd(e){var t;if(((t=this.mediaSource)==null?void 0:t.readyState)==="closed"){this.resetBuffer(e);return}const{operationQueue:r}=this;r.current(e).onComplete(),r.shiftAndExecuteNext(e)}_onSBUpdateError(e,t){var r;const n=new Error(`${e} SourceBuffer error. MediaSource readyState: ${(r=this.mediaSource)==null?void 0:r.readyState}`);this.error(`${n}`,t),this.hls.trigger(d.ERROR,{type:w.MEDIA_ERROR,details:y.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:n,fatal:!1});const i=this.operationQueue.current(e);i&&i.onError(n)}removeExecutor(e,t,r){const{media:n,mediaSource:i,operationQueue:s,sourceBuffer:u}=this,f=u[e];if(!n||!i||!f){this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),s.shiftAndExecuteNext(e);return}const m=Y(n.duration)?n.duration:1/0,_=Y(i.duration)?i.duration:1/0,b=Math.max(0,t),C=Math.min(r,m,_);C>b&&(!f.ending||f.ended)?(f.ended=!1,this.log(`Removing [${b},${C}] from the ${e} SourceBuffer`),f.remove(b,C)):s.shiftAndExecuteNext(e)}appendExecutor(e,t){const r=this.sourceBuffer[t];if(!r){if(!this.pendingTracks[t])throw new Error(`Attempting to append to the ${t} SourceBuffer, but it does not exist`);return}r.ended=!1,r.appendBuffer(e)}blockBuffers(e,t=this.getSourceBufferTypes()){if(!t.length){this.log("Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e);return}const{operationQueue:r}=this,n=t.map(i=>r.appendBlocker(i));Promise.all(n).then(()=>{e(),t.forEach(i=>{const s=this.sourceBuffer[i];s!=null&&s.updating||r.shiftAndExecuteNext(i)})})}getSourceBufferTypes(){return Object.keys(this.sourceBuffer)}addBufferListener(e,t,r){const n=this.sourceBuffer[e];if(!n)return;const i=r.bind(this,e);this.listeners[e].push({event:t,listener:i}),n.addEventListener(t,i)}removeBufferListeners(e){const t=this.sourceBuffer[e];t&&this.listeners[e].forEach(r=>{t.removeEventListener(r.event,r.listener)})}}function _i(a){const e=a.querySelectorAll("source");[].slice.call(e).forEach(t=>{a.removeChild(t)})}function Jn(a,e){const t=self.document.createElement("source");t.type="video/mp4",t.src=e,a.appendChild(t)}const bn={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},vi=a=>String.fromCharCode(bn[a]||a),sn=15,ni=100,to={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Xi={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Ji={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Qi={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Ts=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class Ds{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const r=typeof t=="function"?t():t;R.log(`${this.time} [${e}] ${r}`)}}}const Ui=function(e){const t=[];for(let r=0;r<e.length;r++)t.push(e[r].toString(16));return t};class Da{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 r=0;r<t.length;r++){const n=t[r];e.hasOwnProperty(n)&&(this[n]=e[n])}}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 ro{constructor(){this.uchar=" ",this.penState=new Da}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 Js{constructor(e){this.chars=[],this.pos=0,this.currPenState=new Da,this.cueStartTime=null,this.logger=void 0;for(let t=0;t<ni;t++)this.chars.push(new ro);this.logger=e}equals(e){for(let t=0;t<ni;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<ni;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<ni;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>ni&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=ni)}moveCursor(e){const t=this.pos+e;if(e>1)for(let r=this.pos+1;r<t+1;r++)this.chars[r].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=vi(e);if(this.pos>=ni){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<ni;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 r=0;r<ni;r++){const n=this.chars[r].uchar;n!==" "&&(t=!1),e.push(n)}return t?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}}class ks{constructor(e){this.rows=[],this.currRow=sn-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<sn;t++)this.rows.push(new Js(e));this.logger=e}reset(){for(let e=0;e<sn;e++)this.rows[e].clear();this.currRow=sn-1}equals(e){let t=!0;for(let r=0;r<sn;r++)if(!this.rows[r].equals(e.rows[r])){t=!1;break}return t}copy(e){for(let t=0;t<sn;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<sn;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 = "+JSON.stringify(e));let t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(let u=0;u<sn;u++)this.rows[u].clear();const i=this.currRow+1-this.nrRollUpRows,s=this.lastOutputScreen;if(s){const u=s.rows[i].cueStartTime,f=this.logger.time;if(u!==null&&f!==null&&u<f)for(let m=0;m<this.nrRollUpRows;m++)this.rows[t-this.nrRollUpRows+m+1].copy(s.rows[i+m])}}this.currRow=t;const r=this.rows[this.currRow];if(e.indent!==null){const i=e.indent,s=Math.max(i-1,0);r.setCursor(e.indent),e.color=r.chars[s].penState.foreground}const n={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(n)}setBkgData(e){this.logger.log(2,()=>"bkgData = "+JSON.stringify(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 r="",n=-1;for(let i=0;i<sn;i++){const s=this.rows[i].getTextString();s&&(n=i+1,e?t.push("Row "+n+": '"+s+"'"):t.push(s.trim()))}return t.length>0&&(e?r="["+t.join(" | ")+"]":r=t.join(`
`)),r}getTextAndFormat(){return this.rows}}class Qs{constructor(e,t,r){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 ks(r),this.nonDisplayedMemory=new ks(r),this.lastOutputScreen=new ks(r),this.currRollUpRow=this.displayedMemory.rows[sn-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=r}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[sn-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 r=0;r<e.length;r++)this.writeScreen.insertChar(e[r]);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 r=Math.floor(e/2)-16,n=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=n[r]}this.logger.log(2,"MIDROW: "+JSON.stringify(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 ea{constructor(e,t,r){this.channels=void 0,this.currentChannel=0,this.cmdHistory=Qo(),this.logger=void 0;const n=this.logger=new Ds;this.channels=[null,new Qs(e,t,n),new Qs(e+1,r,n)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){this.logger.time=e;for(let r=0;r<t.length;r+=2){const n=t[r]&127,i=t[r+1]&127;let s=!1,u=null;if(n===0&&i===0)continue;this.logger.log(3,()=>"["+Ui([t[r],t[r+1]])+"] -> ("+Ui([n,i])+")");const f=this.cmdHistory;if(n>=16&&n<=31){if(Jo(n,i,f)){zi(null,null,f),this.logger.log(3,()=>"Repeated command ("+Ui([n,i])+") is dropped");continue}zi(n,i,this.cmdHistory),s=this.parseCmd(n,i),s||(s=this.parseMidrow(n,i)),s||(s=this.parsePAC(n,i)),s||(s=this.parseBackgroundAttributes(n,i))}else zi(null,null,f);if(!s&&(u=this.parseChars(n,i),u)){const _=this.currentChannel;_&&_>0?this.channels[_].insertChars(u):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!s&&!u&&this.logger.log(2,()=>"Couldn't parse cleaned data "+Ui([n,i])+" orig: "+Ui([t[r],t[r+1]]))}}parseCmd(e,t){const r=(e===20||e===28||e===21||e===29)&&t>=32&&t<=47,n=(e===23||e===31)&&t>=33&&t<=35;if(!(r||n))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 r=0;if((e===17||e===25)&&t>=32&&t<=47){if(e===17?r=1:r=2,r!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const n=this.channels[r];return n?(n.ccMIDROW(t),this.logger.log(3,()=>"MIDROW ("+Ui([e,t])+")"),!0):!1}return!1}parsePAC(e,t){let r;const n=(e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127,i=(e===16||e===24)&&t>=64&&t<=95;if(!(n||i))return!1;const s=e<=23?1:2;t>=64&&t<=95?r=s===1?to[e]:Ji[e]:r=s===1?Xi[e]:Qi[e];const u=this.channels[s];return u?(u.setPAC(this.interpretPAC(r,t)),this.currentChannel=s,!0):!1}interpretPAC(e,t){let r;const n={color:null,italics:!1,indent:null,underline:!1,row:e};return t>95?r=t-96:r=t-64,n.underline=(r&1)===1,r<=13?n.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(r/2)]:r<=15?(n.italics=!0,n.color="white"):n.indent=Math.floor((r-16)/2)*4,n}parseChars(e,t){let r,n=null,i=null;if(e>=25?(r=2,i=e-8):(r=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 '"+vi(s)+"' in channel "+r),n=[s]}else e>=32&&e<=127&&(n=t===0?[e]:[e,t]);return n&&this.logger.log(3,()=>"Char codes = "+Ui(n).join(",")),n}parseBackgroundAttributes(e,t){const r=(e===16||e===24)&&t>=32&&t<=47,n=(e===23||e===31)&&t>=45&&t<=47;if(!(r||n))return!1;let i;const s={};e===16||e===24?(i=Math.floor((t-32)/2),s.background=Ts[i],t%2===1&&(s.background=s.background+"_semi")):t===45?s.background="transparent":(s.foreground="black",t===47&&(s.underline=!0));const u=e<=23?1:2;return this.channels[u].setBkgData(s),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}zi(null,null,this.cmdHistory)}cueSplitAtTime(e){for(let t=0;t<this.channels.length;t++){const r=this.channels[t];r&&r.cueSplitAtTime(e)}}}function zi(a,e,t){t.a=a,t.b=e}function Jo(a,e,t){return t.a===a&&t.b===e}function Qo(){return{a:null,b:null}}class ka{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,r){(this.startTime===null||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=r,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}var no=function(){if(qe!=null&&qe.VTTCue)return self.VTTCue;const a=["","lr","rl"],e=["start","middle","end","left","right"];function t(u,f){if(typeof f!="string"||!Array.isArray(u))return!1;const m=f.toLowerCase();return~u.indexOf(m)?m:!1}function r(u){return t(a,u)}function n(u){return t(e,u)}function i(u,...f){let m=1;for(;m<arguments.length;m++){const _=arguments[m];for(const b in _)u[b]=_[b]}return u}function s(u,f,m){const _=this,b={enumerable:!0};_.hasBeenReset=!1;let C="",U=!1,F=u,j=f,re=m,De=null,Xe="",Ze=!0,dt="auto",et="start",yt=50,ct="middle",St=50,Ft="middle";Object.defineProperty(_,"id",i({},b,{get:function(){return C},set:function(_t){C=""+_t}})),Object.defineProperty(_,"pauseOnExit",i({},b,{get:function(){return U},set:function(_t){U=!!_t}})),Object.defineProperty(_,"startTime",i({},b,{get:function(){return F},set:function(_t){if(typeof _t!="number")throw new TypeError("Start time must be set to a number.");F=_t,this.hasBeenReset=!0}})),Object.defineProperty(_,"endTime",i({},b,{get:function(){return j},set:function(_t){if(typeof _t!="number")throw new TypeError("End time must be set to a number.");j=_t,this.hasBeenReset=!0}})),Object.defineProperty(_,"text",i({},b,{get:function(){return re},set:function(_t){re=""+_t,this.hasBeenReset=!0}})),Object.defineProperty(_,"region",i({},b,{get:function(){return De},set:function(_t){De=_t,this.hasBeenReset=!0}})),Object.defineProperty(_,"vertical",i({},b,{get:function(){return Xe},set:function(_t){const At=r(_t);if(At===!1)throw new SyntaxError("An invalid or illegal string was specified.");Xe=At,this.hasBeenReset=!0}})),Object.defineProperty(_,"snapToLines",i({},b,{get:function(){return Ze},set:function(_t){Ze=!!_t,this.hasBeenReset=!0}})),Object.defineProperty(_,"line",i({},b,{get:function(){return dt},set:function(_t){if(typeof _t!="number"&&_t!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");dt=_t,this.hasBeenReset=!0}})),Object.defineProperty(_,"lineAlign",i({},b,{get:function(){return et},set:function(_t){const At=n(_t);if(!At)throw new SyntaxError("An invalid or illegal string was specified.");et=At,this.hasBeenReset=!0}})),Object.defineProperty(_,"position",i({},b,{get:function(){return yt},set:function(_t){if(_t<0||_t>100)throw new Error("Position must be between 0 and 100.");yt=_t,this.hasBeenReset=!0}})),Object.defineProperty(_,"positionAlign",i({},b,{get:function(){return ct},set:function(_t){const At=n(_t);if(!At)throw new SyntaxError("An invalid or illegal string was specified.");ct=At,this.hasBeenReset=!0}})),Object.defineProperty(_,"size",i({},b,{get:function(){return St},set:function(_t){if(_t<0||_t>100)throw new Error("Size must be between 0 and 100.");St=_t,this.hasBeenReset=!0}})),Object.defineProperty(_,"align",i({},b,{get:function(){return Ft},set:function(_t){const At=n(_t);if(!At)throw new SyntaxError("An invalid or illegal string was specified.");Ft=At,this.hasBeenReset=!0}})),_.displayState=void 0}return s.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},s}();class el{decode(e,t){if(!e)return"";if(typeof e!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function xo(a){function e(r,n,i,s){return(r|0)*3600+(n|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 tl{constructor(){this.values=Object.create(null)}set(e,t){!this.get(e)&&t!==""&&(this.values[e]=t)}get(e,t,r){return r?this.has(e)?this.values[e]:t[r]:this.has(e)?this.values[e]:t}has(e){return e in this.values}alt(e,t,r){for(let n=0;n<r.length;++n)if(t===r[n]){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 r=parseFloat(t);if(r>=0&&r<=100)return this.set(e,r),!0}return!1}}function wo(a,e,t,r){const n=r?a.split(r):[a];for(const i in n){if(typeof n[i]!="string")continue;const s=n[i].split(t);if(s.length!==2)continue;const u=s[0],f=s[1];e(u,f)}}const io=new no(0,0,""),Ca=io.align==="middle"?"middle":"center";function rl(a,e,t){const r=a;function n(){const u=xo(a);if(u===null)throw new Error("Malformed timestamp: "+r);return a=a.replace(/^[^\sa-zA-Z-]+/,""),u}function i(u,f){const m=new tl;wo(u,function(C,U){let F;switch(C){case"region":for(let j=t.length-1;j>=0;j--)if(t[j].id===U){m.set(C,t[j].region);break}break;case"vertical":m.alt(C,U,["rl","lr"]);break;case"line":F=U.split(","),m.integer(C,F[0]),m.percent(C,F[0])&&m.set("snapToLines",!1),m.alt(C,F[0],["auto"]),F.length===2&&m.alt("lineAlign",F[1],["start",Ca,"end"]);break;case"position":F=U.split(","),m.percent(C,F[0]),F.length===2&&m.alt("positionAlign",F[1],["start",Ca,"end","line-left","line-right","auto"]);break;case"size":m.percent(C,U);break;case"align":m.alt(C,U,["start",Ca,"end","left","right"]);break}},/:/,/\s/),f.region=m.get("region",null),f.vertical=m.get("vertical","");let _=m.get("line","auto");_==="auto"&&io.line===-1&&(_=-1),f.line=_,f.lineAlign=m.get("lineAlign","start"),f.snapToLines=m.get("snapToLines",!0),f.size=m.get("size",100),f.align=m.get("align",Ca);let b=m.get("position","auto");b==="auto"&&io.position===50&&(b=f.align==="start"||f.align==="left"?0:f.align==="end"||f.align==="right"?100:50),f.position=b}function s(){a=a.replace(/^\s+/,"")}if(s(),e.startTime=n(),s(),a.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+r);a=a.slice(3),s(),e.endTime=n(),s(),i(a,e)}function Eo(a){return a.replace(/<br(?: \/)?>/gi,`
`)}class nl{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new el,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 r(){let i=t.buffer,s=0;for(i=Eo(i);s<i.length&&i[s]!=="\r"&&i[s]!==`
`;)++s;const u=i.slice(0,s);return i[s]==="\r"&&++s,i[s]===`
`&&++s,t.buffer=i.slice(s),u}function n(i){wo(i,function(s,u){},/:/)}try{let i="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;i=r();const u=i.match(/^()?WEBVTT([ \t].*)?$/);if(!(u!=null&&u[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=r(),t.state){case"HEADER":/:/.test(i)?n(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 no(0,0,""),t.state="CUE",i.indexOf("-->")===-1){t.cue.id=i;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{rl(i,t.cue,t.regionList)}catch(u){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const u=i.indexOf("-->")!==-1;if(!i||u&&(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 il=/\r\n|\n\r|\n|\r/g,so=function(e,t,r=0){return e.slice(r,r+t.length)===t},sl=function(e){let t=parseInt(e.slice(-3));const r=parseInt(e.slice(-6,-4)),n=parseInt(e.slice(-9,-7)),i=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!Y(t)||!Y(r)||!Y(n)||!Y(i))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*r,t+=60*1e3*n,t+=60*60*1e3*i,t},ao=function(e){let t=5381,r=e.length;for(;r;)t=t*33^e.charCodeAt(--r);return(t>>>0).toString()};function oo(a,e,t){return ao(a.toString())+ao(e.toString())+ao(t)}const al=function(e,t,r){let n=e[t],i=e[n.prevCC];if(!i||!i.new&&n.new){e.ccOffset=e.presentationOffset=n.start,n.new=!1;return}for(;(s=i)!=null&&s.new;){var s;e.ccOffset+=n.start-i.start,n.new=!1,n=i,i=e[n.prevCC]}e.presentationOffset=r};function ol(a,e,t,r,n,i,s){const u=new nl,f=ze(new Uint8Array(a)).trim().replace(il,`
`).split(`
`),m=[],_=e?Ea(e.baseTime,e.timescale):0;let b="00:00.000",C=0,U=0,F,j=!0;u.oncue=function(re){const De=t[r];let Xe=t.ccOffset;const Ze=(C-_)/9e4;if(De!=null&&De.new&&(U!==void 0?Xe=t.ccOffset=De.start:al(t,r,Ze)),Ze){if(!e){F=new Error("Missing initPTS for VTT MPEGTS");return}Xe=Ze-t.presentationOffset}const dt=re.endTime-re.startTime,et=Cn((re.startTime+Xe-U)*9e4,n*9e4)/9e4;re.startTime=Math.max(et,0),re.endTime=Math.max(et+dt,0);const yt=re.text.trim();re.text=decodeURIComponent(encodeURIComponent(yt)),re.id||(re.id=oo(re.startTime,re.endTime,yt)),re.endTime>0&&m.push(re)},u.onparsingerror=function(re){F=re},u.onflush=function(){if(F){s(F);return}i(m)},f.forEach(re=>{if(j)if(so(re,"X-TIMESTAMP-MAP=")){j=!1,re.slice(16).split(",").forEach(De=>{so(De,"LOCAL:")?b=De.slice(6):so(De,"MPEGTS:")&&(C=parseInt(De.slice(7)))});try{U=sl(b)/1e3}catch(De){F=De}return}else re===""&&(j=!1);u.parse(re+`
`)}),u.flush()}const lo="stpp.ttml.im1t",So=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,Ao=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,ll={left:"start",center:"center",right:"end",start:"start",end:"end"};function To(a,e,t,r){const n=ce(new Uint8Array(a),["mdat"]);if(n.length===0){r(new Error("Could not parse IMSC1 mdat"));return}const i=n.map(u=>ze(u)),s=Ja(e.baseTime,1,e.timescale);try{i.forEach(u=>t(ul(u,s)))}catch(u){r(u)}}function ul(a,e){const n=new DOMParser().parseFromString(a,"text/xml").getElementsByTagName("tt")[0];if(!n)throw new Error("Invalid ttml");const i={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},s=Object.keys(i).reduce((b,C)=>(b[C]=n.getAttribute(`ttp:${C}`)||i[C],b),{}),u=n.getAttribute("xml:space")!=="preserve",f=Do(uo(n,"styling","style")),m=Do(uo(n,"layout","region")),_=uo(n,"body","[begin]");return[].map.call(_,b=>{const C=ko(b,u);if(!C||!b.hasAttribute("begin"))return null;const U=ho(b.getAttribute("begin"),s),F=ho(b.getAttribute("dur"),s);let j=ho(b.getAttribute("end"),s);if(U===null)throw Co(b);if(j===null){if(F===null)throw Co(b);j=U+F}const re=new no(U-e,j-e,C);re.id=oo(re.startTime,re.endTime,re.text);const De=m[b.getAttribute("region")],Xe=f[b.getAttribute("style")],Ze=cl(De,Xe,f),{textAlign:dt}=Ze;if(dt){const et=ll[dt];et&&(re.lineAlign=et),re.align=dt}return l(re,Ze),re}).filter(b=>b!==null)}function uo(a,e,t){const r=a.getElementsByTagName(e)[0];return r?[].slice.call(r.querySelectorAll(t)):[]}function Do(a){return a.reduce((e,t)=>{const r=t.getAttribute("xml:id");return r&&(e[r]=t),e},{})}function ko(a,e){return[].slice.call(a.childNodes).reduce((t,r,n)=>{var i;return r.nodeName==="br"&&n?t+`
`:(i=r.childNodes)!=null&&i.length?ko(r,e):e?t+r.textContent.trim().replace(/\s+/g," "):t+r.textContent},"")}function cl(a,e,t){const r="http://www.w3.org/ns/ttml#styling";let n=null;const i=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],s=a!=null&&a.hasAttribute("style")?a.getAttribute("style"):null;return s&&t.hasOwnProperty(s)&&(n=t[s]),i.reduce((u,f)=>{const m=co(e,r,f)||co(a,r,f)||co(n,r,f);return m&&(u[f]=m),u},{})}function co(a,e,t){return a&&a.hasAttributeNS(e,t)?a.getAttributeNS(e,t):null}function Co(a){return new Error(`Could not parse ttml timestamp ${a}`)}function ho(a,e){if(!a)return null;let t=xo(a);return t===null&&(So.test(a)?t=hl(a,e):Ao.test(a)&&(t=fl(a,e))),t}function hl(a,e){const t=So.exec(a),r=(t[4]|0)+(t[5]|0)/e.subFrameRate;return(t[1]|0)*3600+(t[2]|0)*60+(t[3]|0)+r/e.frameRate}function fl(a,e){const t=Ao.exec(a),r=Number(t[1]);switch(t[2]){case"h":return r*3600;case"m":return r*60;case"ms":return r*1e3;case"f":return r/e.frameRate;case"t":return r/e.tickRate}return r}class dl{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=Io(),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(d.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(d.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(d.FRAG_LOADING,this.onFragLoading,this),e.on(d.FRAG_LOADED,this.onFragLoaded,this),e.on(d.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(d.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(d.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(d.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(d.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(d.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(d.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(d.FRAG_LOADING,this.onFragLoading,this),e.off(d.FRAG_LOADED,this.onFragLoaded,this),e.off(d.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(d.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(d.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(d.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(d.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){if(this.config.enableCEA708Captions&&(!this.cea608Parser1||!this.cea608Parser2)){const e=new ka(this,"textTrack1"),t=new ka(this,"textTrack2"),r=new ka(this,"textTrack3"),n=new ka(this,"textTrack4");this.cea608Parser1=new ea(1,e,t),this.cea608Parser2=new ea(3,r,n)}}addCues(e,t,r,n,i){let s=!1;for(let u=i.length;u--;){const f=i[u],m=pl(f[0],f[1],t,r);if(m>=0&&(f[0]=Math.min(f[0],t),f[1]=Math.max(f[1],r),s=!0,m/(r-t)>.5))return}if(s||i.push([t,r]),this.config.renderTextTracksNatively){const u=this.captionsTracks[e];this.Cues.newCue(u,t,r,n)}else{const u=this.Cues.newCue(null,t,r,n);this.hls.trigger(d.CUES_PARSED,{type:"captions",cues:u,track:e})}}onInitPtsFound(e,{frag:t,id:r,initPTS:n,timescale:i}){const{unparsedVttFrags:s}=this;r==="main"&&(this.initPTS[t.cc]={baseTime:n,timescale:i}),s.length&&(this.unparsedVttFrags=[],s.forEach(u=>{this.onFragLoaded(d.FRAG_LOADED,u)}))}getExistingTrack(e,t){const{media:r}=this;if(r)for(let n=0;n<r.textTracks.length;n++){const i=r.textTracks[n];if(Lo(i,{name:e,lang:t,attrs:{}}))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:r,media:n}=this,{label:i,languageCode:s}=t[e],u=this.getExistingTrack(i,s);if(u)r[e]=u,En(r[e]),oi(r[e],n);else{const f=this.createTextTrack("captions",i,s);f&&(f[e]=!0,r[e]=f)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const r=t.label,n={_id:e,label:r,kind:"captions",default:t.media?!!t.media.default:!1,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=n,this.hls.trigger(d.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[n]})}createTextTrack(e,t,r){const n=this.media;if(n)return n.addTextTrack(e,t,r)}onMediaAttaching(e,t){this.media=t.media,this._cleanTracks()}onMediaDetaching(){const{captionsTracks:e}=this;Object.keys(e).forEach(t=>{En(e[t]),delete e[t]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=Io(),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 r=0;r<t.length;r++)En(t[r])}onSubtitleTracksUpdated(e,t){const r=t.subtitleTracks||[],n=r.some(i=>i.textCodec===lo);if(this.config.enableWebVTT||n&&this.config.enableIMSC1){if(nr(this.tracks,r)){this.tracks=r;return}if(this.textTracks=[],this.tracks=r,this.config.renderTextTracksNatively){const s=this.media,u=s?Yr(s.textTracks):null;if(this.tracks.forEach((f,m)=>{let _;if(u){let b=null;for(let C=0;C<u.length;C++)if(u[C]&&Lo(u[C],f)){b=u[C],u[C]=null;break}b&&(_=b)}if(_)En(_);else{const b=Ro(f);_=this.createTextTrack(b,f.name,f.lang),_&&(_.mode="disabled")}_&&this.textTracks.push(_)}),u!=null&&u.length){const f=u.filter(m=>m!==null).map(m=>m.label);f.length&&R.warn(`Media element contains unused subtitle tracks: ${f.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const s=this.tracks.map(u=>({label:u.name,kind:u.type.toLowerCase(),default:u.default,subtitleTrack:u}));this.hls.trigger(d.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:s})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach(r=>{const n=/(?:CC|SERVICE)([1-4])/.exec(r.instreamId);if(!n)return;const i=`textTrack${n[1]}`,s=this.captionsProperties[i];s&&(s.label=r.name,r.lang&&(s.languageCode=r.lang),s.media=r)})}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===Ve.MAIN){var r,n;const{cea608Parser1:i,cea608Parser2:s,lastSn:u}=this,{cc:f,sn:m}=t.frag,_=(r=(n=t.part)==null?void 0:n.index)!=null?r:-1;i&&s&&(m!==u+1||m===u&&_!==this.lastPartIndex+1||f!==this.lastCc)&&(i.reset(),s.reset()),this.lastCc=f,this.lastSn=m,this.lastPartIndex=_}}onFragLoaded(e,t){const{frag:r,payload:n}=t;if(r.type===Ve.SUBTITLE)if(n.byteLength){const i=r.decryptdata,s="stats"in t;if(i==null||!i.encrypted||s){const u=this.tracks[r.level],f=this.vttCCs;f[r.cc]||(f[r.cc]={start:r.start,prevCC:this.prevCC,new:!0},this.prevCC=r.cc),u&&u.textCodec===lo?this._parseIMSC1(r,n):this._parseVTTs(t)}}else this.hls.trigger(d.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const r=this.hls;To(t,this.initPTS[e.cc],n=>{this._appendCues(n,e.level),r.trigger(d.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},n=>{R.log(`Failed to parse IMSC1: ${n}`),r.trigger(d.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:n})})}_parseVTTs(e){var t;const{frag:r,payload:n}=e,{initPTS:i,unparsedVttFrags:s}=this,u=i.length-1;if(!i[r.cc]&&u===-1){s.push(e);return}const f=this.hls,m=(t=r.initSegment)!=null&&t.data?Kt(r.initSegment.data,new Uint8Array(n)):n;ol(m,this.initPTS[r.cc],this.vttCCs,r.cc,r.start,_=>{this._appendCues(_,r.level),f.trigger(d.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:r})},_=>{const b=_.message==="Missing initPTS for VTT MPEGTS";b?s.push(e):this._fallbackToIMSC1(r,n),R.log(`Failed to parse VTT cue: ${_}`),!(b&&u>r.cc)&&f.trigger(d.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:_})})}_fallbackToIMSC1(e,t){const r=this.tracks[e.level];r.textCodec||To(t,this.initPTS[e.cc],()=>{r.textCodec=lo,this._parseIMSC1(e,t)},()=>{r.textCodec="wvtt"})}_appendCues(e,t){const r=this.hls;if(this.config.renderTextTracksNatively){const n=this.textTracks[t];if(!n||n.mode==="disabled")return;e.forEach(i=>li(n,i))}else{const n=this.tracks[t];if(!n)return;const i=n.default?"default":"subtitles"+t;r.trigger(d.CUES_PARSED,{type:"subtitles",cues:e,track:i})}}onFragDecrypted(e,t){const{frag:r}=t;r.type===Ve.SUBTITLE&&this.onFragLoaded(d.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){this.initCea608Parsers();const{cea608Parser1:r,cea608Parser2:n}=this;if(!this.enabled||!r||!n)return;const{frag:i,samples:s}=t;if(!(i.type===Ve.MAIN&&this.closedCaptionsForLevel(i)==="NONE"))for(let u=0;u<s.length;u++){const f=s[u].bytes;if(f){const m=this.extractCea608Data(f);r.addData(s[u].pts,m[0]),n.addData(s[u].pts,m[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:r,endOffsetSubtitles:n,type:i}){const{media:s}=this;if(!(!s||s.currentTime<r)){if(!i||i==="video"){const{captionsTracks:u}=this;Object.keys(u).forEach(f=>vr(u[f],t,r))}if(this.config.renderTextTracksNatively&&t===0&&n!==void 0){const{textTracks:u}=this;Object.keys(u).forEach(f=>vr(u[f],t,n))}}}extractCea608Data(e){const t=[[],[]],r=e[0]&31;let n=2;for(let i=0;i<r;i++){const s=e[n++],u=127&e[n++],f=127&e[n++];if(u===0&&f===0)continue;if((4&s)!==0){const _=3&s;(_===0||_===1)&&(t[_].push(u),t[_].push(f))}}return t}}function Ro(a){return a.characteristics&&/transcribes-spoken-dialog/gi.test(a.characteristics)&&/describes-music-and-sound/gi.test(a.characteristics)?"captions":"subtitles"}function Lo(a,e){return!!a&&a.kind===Ro(e)&&Lr(e,a)}function pl(a,e,t,r){return Math.min(e,r)-Math.max(a,t)}function Io(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}class fo{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(d.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(d.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(d.MANIFEST_PARSED,this.onManifestParsed,this),e.on(d.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(d.BUFFER_CODECS,this.onBufferCodecs,this),e.on(d.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(d.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(d.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(d.MANIFEST_PARSED,this.onManifestParsed,this),e.off(d.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(d.BUFFER_CODECS,this.onBufferCodecs,this),e.off(d.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const r=this.hls.levels[t.droppedLevel];this.isLevelAllowed(r)&&this.restrictedLevels.push({bitrate:r.bitrate,height:r.height,width:r.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 r=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,r.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&Y(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping()}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,r=this.getMaxLevel(e.length-1);r!==this.autoLevelCapping&&R.log(`Setting autoLevelCapping to ${r}: ${e[r].height}p@${e[r].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=r,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 r=t.filter((n,i)=>this.isLevelAllowed(n)&&i<=e);return this.clientRect=null,fo.getMaxLevelByMediaSize(r,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 r=e.getBoundingClientRect();t.width=r.width,t.height=r.height,!t.width&&!t.height&&(t.width=r.right-r.left||e.width||0,t.height=r.bottom-r.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 e}isLevelAllowed(e){return!this.restrictedLevels.some(r=>e.bitrate===r.bitrate&&e.width===r.width&&e.height===r.height)}static getMaxLevelByMediaSize(e,t,r){if(!(e!=null&&e.length))return-1;const n=(u,f)=>f?u.width!==f.width||u.height!==f.height:!0;let i=e.length-1;const s=Math.max(t,r);for(let u=0;u<e.length;u+=1){const f=e[u];if((f.width>=s||f.height>=s)&&n(f,e[u+1])){i=u;break}}return i}}class ml{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(d.MEDIA_ATTACHING,this.onMediaAttaching,this)}unregisterListeners(){this.hls.off(d.MEDIA_ATTACHING,this.onMediaAttaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const r=this.hls.config;if(r.capLevelOnFPSDrop){const n=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=n,n&&typeof n.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),r.fpsDroppedMonitoringPeriod)}}checkFPS(e,t,r){const n=performance.now();if(t){if(this.lastTime){const i=n-this.lastTime,s=r-this.lastDroppedFrames,u=t-this.lastDecodedFrames,f=1e3*s/i,m=this.hls;if(m.trigger(d.FPS_DROP,{currentDropped:s,currentDecoded:u,totalDroppedFrames:r}),f>0&&s>m.config.fpsDroppedMonitoringThreshold*u){let _=m.currentLevel;R.warn("drop FPS ratio greater than max allowed value for currentLevel: "+_),_>0&&(m.autoLevelCapping===-1||m.autoLevelCapping>=_)&&(_=_-1,m.trigger(d.FPS_DROP_LEVEL_CAPPING,{level:_,droppedLevel:m.currentLevel}),m.autoLevelCapping=_,this.streamController.nextLevelSwitch())}}this.lastTime=n,this.lastDroppedFrames=r,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)}}const Ra="[eme]";class Cs{constructor(e){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=Cs.CDMCleanupPromise?[Cs.CDMCleanupPromise]:[],this.debug=R.debug.bind(R,Ra),this.log=R.log.bind(R,Ra),this.warn=R.warn.bind(R,Ra),this.error=R.error.bind(R,Ra),this.onMediaEncrypted=t=>{const{initDataType:r,initData:n}=t,i=`"${t.type}" event: init data type: "${r}"`;if(this.debug(i),n!==null){if(!this.keyFormatPromise){let s=Object.keys(this.keySystemAccessPromises);s.length||(s=jt(this.config));const u=s.map(Lt).filter(f=>!!f);this.keyFormatPromise=this.getKeyFormatPromise(u)}this.keyFormatPromise.then(s=>{const u=Dt(s);let f,m;if(r==="sinf"){if(u!==Ge.FAIRPLAY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${r}" for selected key-system ${u}`);return}const F=rt(new Uint8Array(n));try{const j=x(JSON.parse(F).sinf),re=pt(j);if(!re)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");f=re.subarray(8,24),m=Ge.FAIRPLAY}catch(j){this.warn(`${i} Failed to parse sinf: ${j}`);return}}else{if(u!==Ge.WIDEVINE&&u!==Ge.PLAYREADY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${r}" for selected key-system ${u}`);return}const F=jr(n),j=F.filter(De=>!!De.systemId&&it(De.systemId)===u);j.length>1&&this.warn(`${i} Using first of ${j.length} pssh found for selected key-system ${u}`);const re=j[0];if(!re){F.length===0||F.some(De=>!De.systemId)?this.warn(`${i} contains incomplete or invalid pssh data`):this.log(`ignoring ${i} for ${F.map(De=>it(De.systemId)).join(",")} pssh data in favor of playlist keys`);return}if(m=it(re.systemId),re.version===0&&re.data)if(m===Ge.WIDEVINE){const De=re.data.length-22;f=re.data.subarray(De,De+16)}else m===Ge.PLAYREADY&&(f=Rt(re.data))}if(!m||!f){this.log(`Unable to handle ${i} with key-system ${u}`);return}const _=st.hexDump(f),{keyIdToKeySessionPromise:b,mediaKeySessions:C}=this;let U=b[_];for(let F=0;F<C.length;F++){const j=C[F],re=j.decryptdata;if(!re.keyId)continue;const De=st.hexDump(re.keyId);if(_===De||re.uri.replace(/-/g,"").indexOf(_)!==-1){if(U=b[De],re.pssh)break;delete b[De],re.pssh=new Uint8Array(n),re.keyId=f,U=b[_]=U.then(()=>this.generateRequestWithPreferredKeySession(j,r,n,"encrypted-event-key-match")),U.catch(Xe=>this.handleError(Xe));break}}if(!U){if(m!==u){this.log(`Ignoring "${i}" with ${m} init data for selected key-system ${u}`);return}U=b[_]=this.getKeySystemSelectionPromise([m]).then(({keySystem:F,mediaKeys:j})=>{var re;this.throwIfDestroyed();const De=new lr("ISO-23001-7",_,(re=Lt(F))!=null?re:"");return De.pssh=new Uint8Array(n),De.keyId=f,this.attemptSetMediaKeys(F,j).then(()=>{this.throwIfDestroyed();const Xe=this.createMediaKeySessionContext({decryptdata:De,keySystem:F,mediaKeys:j});return this.generateRequestWithPreferredKeySession(Xe,r,n,"encrypted-event-no-match")})}),U.catch(F=>this.handleError(F))}})}},this.onWaitingForKey=t=>{this.log(`"${t.type}" event`)},this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.unregisterListeners(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.config=this.keyIdToKeySessionPromise=null,this.onMediaEncrypted=this.onWaitingForKey=null}registerListeners(){this.hls.on(d.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(d.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(d.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(d.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(d.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(d.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(d.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(d.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:r}=this.config,n=t[e];if(n)return n.licenseUrl;if(e===Ge.WIDEVINE&&r)return r}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,r=t[e];if(r)return r.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,r=(s,u,f)=>!!s&&f.indexOf(s)===u,n=t.map(s=>s.audioCodec).filter(r),i=t.map(s=>s.videoCodec).filter(r);return n.length+i.length===0&&i.push("avc1.42e01e"),new Promise((s,u)=>{const f=m=>{const _=m.shift();this.getMediaKeysPromise(_,n,i).then(b=>s({keySystem:_,mediaKeys:b})).catch(b=>{m.length?f(m):b instanceof ii?u(b):u(new ii({type:w.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_NO_ACCESS,error:b,fatal:!0},b.message))})};f(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:r}=this.config;if(typeof r!="function"){let n=`Configured requestMediaKeySystemAccess is not a function ${r}`;return Xt===null&&self.location.protocol==="http:"&&(n=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(n))}return r(e,t)}getMediaKeysPromise(e,t,r){const n=Vt(e,t,r,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: ${JSON.stringify(n)}`),s=this.requestMediaKeySystemAccess(e,n);const u=this.keySystemAccessPromises[e]={keySystemAccess:s};return s.catch(f=>{this.log(`Failed to obtain access to key-system "${e}": ${f}`)}),s.then(f=>{this.log(`Access for key-system "${f.keySystem}" obtained`);const m=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),u.mediaKeys=f.createMediaKeys().then(_=>(this.log(`Media-keys created for "${e}"`),m.then(b=>b?this.setMediaKeysServerCertificate(_,e,b):_))),u.mediaKeys.catch(_=>{this.error(`Failed to create media-keys for "${e}"}: ${_}`)}),u.mediaKeys})}return s.then(()=>i.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:r}){this.log(`Creating key-system session "${t}" keyId: ${st.hexDump(e.keyId||[])}`);const n=r.createSession(),i={decryptdata:e,keySystem:t,mediaKeys:r,mediaKeysSession:n,keyStatus:"status-pending"};return this.mediaKeySessions.push(i),i}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const r=this.createMediaKeySessionContext(e),n=this.getKeyIdString(t),i="cenc";this.keyIdToKeySessionPromise[n]=this.generateRequestWithPreferredKeySession(r,i,t.pssh,"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 st.hexDump(e.keyId)}updateKeySession(e,t){var r;const n=e.mediaKeysSession;return this.log(`Updating key-session "${n.sessionId}" for keyID ${st.hexDump(((r=e.decryptdata)==null?void 0:r.keyId)||[])}
} (data length: ${t&&t.byteLength})`),n.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,r)=>{const n=jt(this.config),i=e.map(Dt).filter(s=>!!s&&n.indexOf(s)!==-1);return this.getKeySystemSelectionPromise(i).then(({keySystem:s})=>{const u=Lt(s);u?t(u):r(new Error(`Unable to find format for key-system "${s}"`))}).catch(r)})}loadKey(e){const t=e.keyInfo.decryptdata,r=this.getKeyIdString(t),n=`(keyId: ${r} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${n}`);let i=this.keyIdToKeySessionPromise[r];return i||(i=this.keyIdToKeySessionPromise[r]=this.getKeySystemForKeyPromise(t).then(({keySystem:s,mediaKeys:u})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${n}`),this.attemptSetMediaKeys(s,u).then(()=>{this.throwIfDestroyed();const f=this.createMediaKeySessionContext({keySystem:s,mediaKeys:u,decryptdata:t});return this.generateRequestWithPreferredKeySession(f,"cenc",t.pssh,"playlist-key")}))),i.catch(s=>this.handleError(s))),i}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof ii?this.hls.trigger(d.ERROR,e.data):this.hls.trigger(d.ERROR,{type:w.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),r=this.keyIdToKeySessionPromise[t];if(!r){const n=Dt(e.keyFormat),i=n?[n]:jt(this.config);return this.attemptKeySystemAccess(i)}return r}getKeySystemSelectionPromise(e){if(e.length||(e=jt(this.config)),e.length===0)throw new ii({type:w.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${JSON.stringify({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}attemptSetMediaKeys(e,t){const r=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const n=Promise.all(r).then(()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)});return this.setMediaKeysQueue.push(n),n.then(()=>{this.log(`Media-keys set for "${e}"`),r.push(n),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(i=>r.indexOf(i)===-1)})}generateRequestWithPreferredKeySession(e,t,r,n){var i,s;const u=(i=this.config.drmSystems)==null||(s=i[e.keySystem])==null?void 0:s.generateRequest;if(u)try{const F=u.call(this.hls,t,r,e);if(!F)throw new Error("Invalid response from configured generateRequest filter");t=F.initDataType,r=e.decryptdata.pssh=F.initData?new Uint8Array(F.initData):null}catch(F){var f;if(this.warn(F.message),(f=this.hls)!=null&&f.config.debug)throw F}if(r===null)return this.log(`Skipping key-session request for "${n}" (no initData)`),Promise.resolve(e);const m=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${n}": ${m} (init data type: ${t} length: ${r?r.byteLength:null})`);const _=new xt,b=e._onmessage=F=>{const j=e.mediaKeysSession;if(!j){_.emit("error",new Error("invalid state"));return}const{messageType:re,message:De}=F;this.log(`"${re}" message event for session "${j.sessionId}" message size: ${De.byteLength}`),re==="license-request"||re==="license-renewal"?this.renewLicense(e,De).catch(Xe=>{this.handleError(Xe),_.emit("error",Xe)}):re==="license-release"?e.keySystem===Ge.FAIRPLAY&&(this.updateKeySession(e,We("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${re}"`)},C=e._onkeystatuseschange=F=>{if(!e.mediaKeysSession){_.emit("error",new Error("invalid state"));return}this.onKeyStatusChange(e);const re=e.keyStatus;_.emit("keyStatus",re),re==="expired"&&(this.warn(`${e.keySystem} expired for key ${m}`),this.renewKeySession(e))};e.mediaKeysSession.addEventListener("message",b),e.mediaKeysSession.addEventListener("keystatuseschange",C);const U=new Promise((F,j)=>{_.on("error",j),_.on("keyStatus",re=>{re.startsWith("usable")?F():re==="output-restricted"?j(new ii({type:w.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):re==="internal-error"?j(new ii({type:w.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${re}"`)):re==="expired"?j(new Error("key expired while generating request")):this.warn(`unhandled key status change "${re}"`)})});return e.mediaKeysSession.generateRequest(t,r).then(()=>{var F;this.log(`Request generated for key-session "${(F=e.mediaKeysSession)==null?void 0:F.sessionId}" keyId: ${m}`)}).catch(F=>{throw new ii({type:w.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_NO_SESSION,error:F,fatal:!1},`Error generating key-session request: ${F}`)}).then(()=>U).catch(F=>{throw _.removeAllListeners(),this.removeSession(e),F}).then(()=>(_.removeAllListeners(),e))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach((t,r)=>{this.log(`key status change "${t}" for keyStatuses keyId: ${st.hexDump("buffer"in r?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new Uint8Array(r))} session keyId: ${st.hexDump(new Uint8Array(e.decryptdata.keyId||[]))} uri: ${e.decryptdata.uri}`),e.keyStatus=t})}fetchServerCertificate(e){const t=this.config,r=t.loader,n=new r(t),i=this.getServerCertificateUrl(e);return i?(this.log(`Fetching server certificate for "${e}"`),new Promise((s,u)=>{const f={responseType:"arraybuffer",url:i},m=t.certLoadPolicy.default,_={loadPolicy:m,timeout:m.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},b={onSuccess:(C,U,F,j)=>{s(C.data)},onError:(C,U,F,j)=>{u(new ii({type:w.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:F,response:$e({url:f.url,data:void 0},C)},`"${e}" certificate request failed (${i}). Status: ${C.code} (${C.text})`))},onTimeout:(C,U,F)=>{u(new ii({type:w.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:F,response:{url:f.url,data:void 0}},`"${e}" certificate request timed out (${i})`))},onAbort:(C,U,F)=>{u(new Error("aborted"))}};n.load(f,_,b)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,r){return new Promise((n,i)=>{e.setServerCertificate(r).then(s=>{this.log(`setServerCertificate ${s?"success":"not supported by CDM"} (${r==null?void 0:r.byteLength}) on "${t}"`),n(e)}).catch(s=>{i(new ii({type:w.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:s,fatal:!0},s.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(r=>this.updateKeySession(e,new Uint8Array(r)).catch(n=>{throw new ii({type:w.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:n,fatal:!0},n.message)}))}unpackPlayReadyKeyMessage(e,t){const r=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!r.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const n=new DOMParser().parseFromString(r,"application/xml"),i=n.querySelectorAll("HttpHeader");if(i.length>0){let _;for(let b=0,C=i.length;b<C;b++){var s,u;_=i[b];const U=(s=_.querySelector("name"))==null?void 0:s.textContent,F=(u=_.querySelector("value"))==null?void 0:u.textContent;U&&F&&e.setRequestHeader(U,F)}}const f=n.querySelector("Challenge"),m=f==null?void 0:f.textContent;if(!m)throw new Error("Cannot find <Challenge> in key message");return We(atob(m))}setupLicenseXHR(e,t,r,n){const i=this.config.licenseXhrSetup;return i?Promise.resolve().then(()=>{if(!r.decryptdata)throw new Error("Key removed");return i.call(this.hls,e,t,r,n)}).catch(s=>{if(!r.decryptdata)throw s;return e.open("POST",t,!0),i.call(this.hls,e,t,r,n)}).then(s=>(e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:s||n})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:n}))}requestLicense(e,t){const r=this.config.keyLoadPolicy.default;return new Promise((n,i)=>{const s=this.getLicenseServerUrlOrThrow(e.keySystem);this.log(`Sending license request to URL: ${s}`);const u=new XMLHttpRequest;u.responseType="arraybuffer",u.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return i(new Error("invalid state"));if(u.readyState===4)if(u.status===200){this._requestLicenseFailureCount=0;let f=u.response;this.log(`License received ${f instanceof ArrayBuffer?f.byteLength:f}`);const m=this.config.licenseResponseCallback;if(m)try{f=m.call(this.hls,u,s,e)}catch(_){this.error(_)}n(f)}else{const f=r.errorRetry,m=f?f.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>m||u.status>=400&&u.status<500)i(new ii({type:w.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:u,response:{url:s,data:void 0,code:u.status,text:u.statusText}},`License Request XHR failed (${s}). Status: ${u.status} (${u.statusText})`));else{const _=m-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${_} attempts left`),this.requestLicense(e,t).then(n,i)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=u,this.setupLicenseXHR(u,s,e,t).then(({xhr:f,licenseChallenge:m})=>{e.keySystem==Ge.PLAYREADY&&(m=this.unpackPlayReadyKeyMessage(f,m)),f.send(m)})})}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const r=t.media;this.media=r,r.removeEventListener("encrypted",this.onMediaEncrypted),r.removeEventListener("waitingforkey",this.onWaitingForKey),r.addEventListener("encrypted",this.onMediaEncrypted),r.addEventListener("waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media,t=this.mediaKeySessions;e&&(e.removeEventListener("encrypted",this.onMediaEncrypted),e.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},lr.clearKeyUriToKeyIdMap();const r=t.length;Cs.CDMCleanupPromise=Promise.all(t.map(n=>this.removeSession(n)).concat(e==null?void 0:e.setMediaKeys(null).catch(n=>{this.log(`Could not clear media keys: ${n}`)}))).then(()=>{r&&(this.log("finished closing key sessions and clearing media keys"),t.length=0)}).catch(n=>{this.log(`Could not close sessions and clear media keys: ${n}`)})}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:t}){if(!(!t||!this.config.emeEnabled)&&!this.keyFormatPromise){const r=t.reduce((n,i)=>(n.indexOf(i.keyFormat)===-1&&n.push(i.keyFormat),n),[]);this.log(`Selecting key-system from session-keys ${r.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(r)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:r}=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),r&&r.readyState!==XMLHttpRequest.DONE&&r.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const n=this.mediaKeySessions.indexOf(e);return n>-1&&this.mediaKeySessions.splice(n,1),t.remove().catch(i=>{this.log(`Could not remove session: ${i}`)}).then(()=>t.close()).catch(i=>{this.log(`Could not close session: ${i}`)})}}}Cs.CDMCleanupPromise=void 0;class ii 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}}var Rn;(function(a){a.MANIFEST="m",a.AUDIO="a",a.VIDEO="v",a.MUXED="av",a.INIT="i",a.CAPTION="c",a.TIMED_TEXT="tt",a.KEY="k",a.OTHER="o"})(Rn||(Rn={}));var po;(function(a){a.DASH="d",a.HLS="h",a.SMOOTH="s",a.OTHER="o"})(po||(po={}));var os;(function(a){a.OBJECT="CMCD-Object",a.REQUEST="CMCD-Request",a.SESSION="CMCD-Session",a.STATUS="CMCD-Status"})(os||(os={}));const gl={[os.OBJECT]:["br","d","ot","tb"],[os.REQUEST]:["bl","dl","mtp","nor","nrr","su"],[os.SESSION]:["cid","pr","sf","sid","st","v"],[os.STATUS]:["bs","rtp"]};class Rs{constructor(e,t){this.value=void 0,this.params=void 0,Array.isArray(e)&&(e=e.map(r=>r instanceof Rs?r:new Rs(r))),this.value=e,this.params=t}}class Oo{constructor(e){this.description=void 0,this.description=e}}const _l="Dict";function vl(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 yl(a,e,t,r){return new Error(`failed to ${a} "${vl(e)}" as ${t}`,{cause:r})}const Po="Bare Item",bl="Boolean",xl="Byte Sequence",wl="Decimal",El="Integer";function Sl(a){return a<-999999999999999||999999999999999<a}const Al=/[\x00-\x1f\x7f]+/,Tl="Token",Dl="Key";function ki(a,e,t){return yl("serialize",a,e,t)}function kl(a){if(typeof a!="boolean")throw ki(a,bl);return a?"?1":"?0"}function Cl(a){return btoa(String.fromCharCode(...a))}function Rl(a){if(ArrayBuffer.isView(a)===!1)throw ki(a,xl);return`:${Cl(a)}:`}function Fo(a){if(Sl(a))throw ki(a,El);return a.toString()}function Ll(a){return`@${Fo(a.getTime()/1e3)}`}function Mo(a,e){if(a<0)return-Mo(-a,e);const t=Math.pow(10,e);if(Math.abs(a*t%1-.5)<Number.EPSILON){const n=Math.floor(a*t);return(n%2===0?n:n+1)/t}else return Math.round(a*t)/t}function Il(a){const e=Mo(a,3);if(Math.floor(Math.abs(e)).toString().length>12)throw ki(a,wl);const t=e.toString();return t.includes(".")?t:`${t}.0`}const Ol="String";function Pl(a){if(Al.test(a))throw ki(a,Ol);return`"${a.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Fl(a){return a.description||a.toString().slice(7,-1)}function Bo(a){const e=Fl(a);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw ki(e,Tl);return e}function mo(a){switch(typeof a){case"number":if(!Y(a))throw ki(a,Po);return Number.isInteger(a)?Fo(a):Il(a);case"string":return Pl(a);case"symbol":return Bo(a);case"boolean":return kl(a);case"object":if(a instanceof Date)return Ll(a);if(a instanceof Uint8Array)return Rl(a);if(a instanceof Oo)return Bo(a);default:throw ki(a,Po)}}function go(a){if(/^[a-z*][a-z0-9\-_.*]*$/.test(a)===!1)throw ki(a,Dl);return a}function _o(a){return a==null?"":Object.entries(a).map(([e,t])=>t===!0?`;${go(e)}`:`;${go(e)}=${mo(t)}`).join("")}function No(a){return a instanceof Rs?`${mo(a.value)}${_o(a.params)}`:mo(a)}function Ml(a){return`(${a.value.map(No).join(" ")})${_o(a.params)}`}function Bl(a,e={whitespace:!0}){if(typeof a!="object")throw ki(a,_l);const t=a instanceof Map?a.entries():Object.entries(a),r=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([n,i])=>{i instanceof Rs||(i=new Rs(i));let s=go(n);return i.value===!0?s+=_o(i.params):(s+="=",Array.isArray(i.value)?s+=Ml(i):s+=No(i)),s}).join(`,${r}`)}function Nl(a,e){return Bl(a,e)}const Ul=a=>a==="ot"||a==="sf"||a==="st",zl=a=>typeof a=="number"?Y(a):a!=null&&a!==""&&a!==!1;function $l(a,e){const t=new URL(a),r=new URL(e);if(t.origin!==r.origin)return a;const n=t.pathname.split("/").slice(1),i=r.pathname.split("/").slice(1,-1);for(;n[0]===i[0];)n.shift(),i.shift();for(;i.length;)i.shift(),n.unshift("..");return n.join("/")}function Gl(){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,n=>{const i=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(n=="x"?i:i&3|8).toString(16)})}}}const La=a=>Math.round(a),jl=(a,e)=>(e!=null&&e.baseUrl&&(a=$l(a,e.baseUrl)),encodeURIComponent(a)),Ia=a=>La(a/100)*100,Kl={br:La,d:La,bl:Ia,dl:Ia,mtp:Ia,nor:jl,rtp:Ia,tb:La};function Hl(a,e){const t={};if(a==null||typeof a!="object")return t;const r=Object.keys(a).sort(),n=l({},Kl,e==null?void 0:e.formatters),i=e==null?void 0:e.filter;return r.forEach(s=>{if(i!=null&&i(s))return;let u=a[s];const f=n[s];f&&(u=f(u,e)),!(s==="v"&&u===1)&&(s=="pr"&&u===1||zl(u)&&(Ul(s)&&typeof u=="string"&&(u=new Oo(u)),t[s]=u))}),t}function Uo(a,e={}){return a?Nl(Hl(a,e),l({whitespace:!1},e)):""}function Wl(a,e={}){if(!a)return{};const t=Object.entries(a),r=Object.entries(gl).concat(Object.entries((e==null?void 0:e.customHeaderMap)||{})),n=t.reduce((i,s)=>{var u,f;const[m,_]=s,b=((u=r.find(C=>C[1].includes(m)))==null?void 0:u[0])||os.REQUEST;return(f=i[b])!=null||(i[b]={}),i[b][m]=_,i},{});return Object.entries(n).reduce((i,[s,u])=>(i[s]=Uo(u,e),i),{})}function Vl(a,e,t){return l(a,Wl(e,t))}const Yl="CMCD";function ql(a,e={}){if(!a)return"";const t=Uo(a,e);return`${Yl}=${encodeURIComponent(t)}`}const zo=/CMCD=[^&#]+/;function Zl(a,e,t){const r=ql(e,t);if(!r)return a;if(zo.test(a))return a.replace(zo,r);const n=a.includes("?")?"&":"?";return`${a}${n}${r}`}class Xl{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=n=>{try{this.apply(n,{ot:Rn.MANIFEST,su:!this.initialized})}catch(i){R.warn("Could not generate manifest CMCD data.",i)}},this.applyFragmentData=n=>{try{const i=n.frag,s=this.hls.levels[i.level],u=this.getObjectType(i),f={d:i.duration*1e3,ot:u};(u===Rn.VIDEO||u===Rn.AUDIO||u==Rn.MUXED)&&(f.br=s.bitrate/1e3,f.tb=this.getTopBandwidth(u)/1e3,f.bl=this.getBufferLength(u)),this.apply(n,f)}catch(i){R.warn("Could not generate segment CMCD data.",i)}},this.hls=e;const t=this.config=e.config,{cmcd:r}=t;r!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=r.sessionId||Gl(),this.cid=r.contentId,this.useHeaders=r.useHeaders===!0,this.includeKeys=r.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(d.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(d.MEDIA_DETACHED,this.onMediaDetached,this),e.on(d.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(d.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(d.MEDIA_DETACHED,this.onMediaDetached,this),e.off(d.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=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 r,n;this.audioBuffer=(r=t.tracks.audio)==null?void 0:r.buffer,this.videoBuffer=(n=t.tracks.video)==null?void 0:n.buffer}createData(){var e;return{v:1,sf:po.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){l(t,this.createData());const r=t.ot===Rn.INIT||t.ot===Rn.VIDEO||t.ot===Rn.MUXED;this.starved&&r&&(t.bs=!0,t.su=!0,this.starved=!1),t.su==null&&(t.su=this.buffering);const{includeKeys:n}=this;n&&(t=Object.keys(t).reduce((i,s)=>(n.includes(s)&&(i[s]=t[s]),i),{})),this.useHeaders?(e.headers||(e.headers={}),Vl(e.headers,t)):e.url=Zl(e.url,t)}getObjectType(e){const{type:t}=e;if(t==="subtitle")return Rn.TIMED_TEXT;if(e.sn==="initSegment")return Rn.INIT;if(t==="audio")return Rn.AUDIO;if(t==="main")return this.hls.audioTracks.length?Rn.VIDEO:Rn.MUXED}getTopBandwidth(e){let t=0,r;const n=this.hls;if(e===Rn.AUDIO)r=n.audioTracks;else{const i=n.maxAutoLevel,s=i>-1?i+1:n.levels.length;r=n.levels.slice(0,s)}for(const i of r)i.bitrate>t&&(t=i.bitrate);return t>0?t:NaN}getBufferLength(e){const t=this.hls.media,r=e===Rn.AUDIO?this.audioBuffer:this.videoBuffer;return!r||!t?NaN:Mr.bufferInfo(r,t.currentTime,this.config.maxBufferHole).len*1e3}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,r=e||this.config.loader;return class{constructor(i){this.loader=void 0,this.loader=new r(i)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(i,s,u){t(i),this.loader.load(i,s,u)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,r=e||this.config.loader;return class{constructor(i){this.loader=void 0,this.loader=new r(i)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(i,s,u){t(i),this.loader.load(i,s,u)}}}}const Jl=3e5;class Ql{constructor(e){this.hls=void 0,this.log=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.log=R.log.bind(R,"[content-steering]:"),this.registerListeners()}registerListeners(){const e=this.hls;e.on(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(d.MANIFEST_PARSED,this.onManifestParsed,this),e.on(d.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(d.MANIFEST_PARSED,this.onManifestParsed,this),e.off(d.ERROR,this.onError,this))}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(r=>r!==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:r}=t;r!==null&&(this.pathwayId=r.pathwayId,this.uri=r.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:r}=t;if((r==null?void 0:r.action)===Ot.SendAlternateToPenaltyBox&&r.flags===dr.MoveAllAlternatesMatchingHost){const n=this.levels;let i=this.pathwayPriority,s=this.pathwayId;if(t.context){const{groupId:u,pathwayId:f,type:m}=t.context;u&&n?s=this.getPathwayForGroupId(u,m,s):f&&(s=f)}s in this.penalizedPathways||(this.penalizedPathways[s]=performance.now()),!i&&n&&(i=n.reduce((u,f)=>(u.indexOf(f.pathwayId)===-1&&u.push(f.pathwayId),u),[])),i&&i.length>1&&(this.updatePathwayPriority(i),r.resolved=this.pathwayId!==s),r.resolved||R.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${s} levels: ${n&&n.length} priorities: ${JSON.stringify(i)} penalized: ${JSON.stringify(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(t.length===0){const r=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${r}"`),t=this.getLevelsForPathway(r),this.pathwayId=r}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 r=this.penalizedPathways,n=performance.now();Object.keys(r).forEach(i=>{n-r[i]>Jl&&delete r[i]});for(let i=0;i<e.length;i++){const s=e[i];if(s in r)continue;if(s===this.pathwayId)return;const u=this.hls.nextLoadLevel,f=this.hls.levels[u];if(t=this.getLevelsForPathway(s),t.length>0){this.log(`Setting Pathway to "${s}"`),this.pathwayId=s,en(t),this.hls.trigger(d.LEVELS_UPDATED,{levels:t});const m=this.hls.levels[u];f&&m&&this.levels&&(m.attrs["STABLE-VARIANT-ID"]!==f.attrs["STABLE-VARIANT-ID"]&&m.bitrate!==f.bitrate&&this.log(`Unstable Pathways change from bitrate ${f.bitrate} to ${m.bitrate}`),this.hls.nextLoadLevel=u);break}}}getPathwayForGroupId(e,t,r){const n=this.getLevelsForPathway(r).concat(this.levels||[]);for(let i=0;i<n.length;i++)if(t===or.AUDIO_TRACK&&n[i].hasAudioGroup(e)||t===or.SUBTITLE_TRACK&&n[i].hasSubtitleGroup(e))return n[i].pathwayId;return r}clonePathways(e){const t=this.levels;if(!t)return;const r={},n={};e.forEach(i=>{const{ID:s,"BASE-ID":u,"URI-REPLACEMENT":f}=i;if(t.some(_=>_.pathwayId===s))return;const m=this.getLevelsForPathway(u).map(_=>{const b=new ge(_.attrs);b["PATHWAY-ID"]=s;const C=b.AUDIO&&`${b.AUDIO}_clone_${s}`,U=b.SUBTITLES&&`${b.SUBTITLES}_clone_${s}`;C&&(r[b.AUDIO]=C,b.AUDIO=C),U&&(n[b.SUBTITLES]=U,b.SUBTITLES=U);const F=Go(_.uri,b["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",f),j=new gn({attrs:b,audioCodec:_.audioCodec,bitrate:_.bitrate,height:_.height,name:_.name,url:F,videoCodec:_.videoCodec,width:_.width});if(_.audioGroups)for(let re=1;re<_.audioGroups.length;re++)j.addGroupId("audio",`${_.audioGroups[re]}_clone_${s}`);if(_.subtitleGroups)for(let re=1;re<_.subtitleGroups.length;re++)j.addGroupId("text",`${_.subtitleGroups[re]}_clone_${s}`);return j});t.push(...m),$o(this.audioTracks,r,f,s),$o(this.subtitleTracks,n,f,s)})}loadSteeringManifest(e){const t=this.hls.config,r=t.loader;this.loader&&this.loader.destroy(),this.loader=new r(t);let n;try{n=new self.URL(e)}catch(_){this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(n.protocol!=="data:"){const _=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;n.searchParams.set("_HLS_pathway",this.pathwayId),n.searchParams.set("_HLS_throughput",""+_)}const i={responseType:"json",url:n.href},s=t.steeringManifestLoadPolicy.default,u=s.errorRetry||s.timeoutRetry||{},f={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:u.maxNumRetry||0,retryDelay:u.retryDelayMs||0,maxRetryDelay:u.maxRetryDelayMs||0},m={onSuccess:(_,b,C,U)=>{this.log(`Loaded steering manifest: "${n}"`);const F=_.data;if(F.VERSION!==1){this.log(`Steering VERSION ${F.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=F.TTL;const{"RELOAD-URI":j,"PATHWAY-CLONES":re,"PATHWAY-PRIORITY":De}=F;if(j)try{this.uri=new self.URL(j,n).href}catch(Ze){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${j}`);return}this.scheduleRefresh(this.uri||C.url),re&&this.clonePathways(re);const Xe={steeringManifest:F,url:n.toString()};this.hls.trigger(d.STEERING_MANIFEST_LOADED,Xe),De&&this.updatePathwayPriority(De)},onError:(_,b,C,U)=>{if(this.log(`Error loading steering manifest: ${_.code} ${_.text} (${b.url})`),this.stopLoad(),_.code===410){this.enabled=!1,this.log(`Steering manifest ${b.url} no longer available`);return}let F=this.timeToLoad*1e3;if(_.code===429){const j=this.loader;if(typeof(j==null?void 0:j.getResponseHeader)=="function"){const re=j.getResponseHeader("Retry-After");re&&(F=parseFloat(re)*1e3)}this.log(`Steering manifest ${b.url} rate limited`);return}this.scheduleRefresh(this.uri||b.url,F)},onTimeout:(_,b,C)=>{this.log(`Timeout loading steering manifest (${b.url})`),this.scheduleRefresh(this.uri||b.url)}};this.log(`Requesting steering manifest: ${n}`),this.loader.load(i,f,m)}scheduleRefresh(e,t=this.timeToLoad*1e3){this.clearTimeout(),this.reloadTimer=self.setTimeout(()=>{var r;const n=(r=this.hls)==null?void 0:r.media;if(n&&!n.ended){this.loadSteeringManifest(e);return}this.scheduleRefresh(e,this.timeToLoad*1e3)},t)}}function $o(a,e,t,r){a&&Object.keys(e).forEach(n=>{const i=a.filter(s=>s.groupId===n).map(s=>{const u=l({},s);return u.details=void 0,u.attrs=new ge(u.attrs),u.url=u.attrs.URI=Go(s.url,s.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),u.groupId=u.attrs["GROUP-ID"]=e[n],u.attrs["PATHWAY-ID"]=r,u});a.push(...i)})}function Go(a,e,t,r){const{HOST:n,PARAMS:i,[t]:s}=r;let u;e&&(u=s==null?void 0:s[e],u&&(a=u));const f=new self.URL(a);return n&&!u&&(f.host=n),i&&Object.keys(i).sort().forEach(m=>{m&&f.searchParams.set(m,i[m])}),f.href}const e0=/^age:\s*[\d.]+\s*$/im;class jo{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 je,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,r){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=r,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const r=this.loader=new self.XMLHttpRequest,n=this.stats;n.loading.first=0,n.loaded=0,n.aborted=!1;const i=this.xhrSetup;i?Promise.resolve().then(()=>{if(!(this.loader!==r||this.stats.aborted))return i(r,t.url)}).catch(s=>{if(!(this.loader!==r||this.stats.aborted))return r.open("GET",t.url,!0),i(r,t.url)}).then(()=>{this.loader!==r||this.stats.aborted||this.openAndSendXhr(r,t,e)}).catch(s=>{this.callbacks.onError({code:r.status,text:s.message},t,r,n)}):this.openAndSendXhr(r,t,e)}openAndSendXhr(e,t,r){e.readyState||e.open("GET",t.url,!0);const n=t.headers,{maxTimeToFirstByteMs:i,maxLoadTimeMs:s}=r.loadPolicy;if(n)for(const u in n)e.setRequestHeader(u,n[u]);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),r.timeout=i&&Y(i)?i:s,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),r.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:r}=this;if(!e||!t)return;const n=t.readyState,i=this.config;if(!r.aborted&&n>=2&&(r.loading.first===0&&(r.loading.first=Math.max(self.performance.now(),r.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-(r.loading.first-r.loading.start)))),n===4)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const s=t.status,u=t.responseType==="text"?t.responseText:null;if(s>=200&&s<300){const b=u!=null?u:t.response;if(b!=null){r.loading.end=Math.max(self.performance.now(),r.loading.first);const C=t.responseType==="arraybuffer"?b.byteLength:b.length;if(r.loaded=r.total=C,r.bwEstimate=r.total*8e3/(r.loading.end-r.loading.first),!this.callbacks)return;const U=this.callbacks.onProgress;if(U&&U(r,e,b,t),!this.callbacks)return;const F={url:t.responseURL,data:b,code:s};this.callbacks.onSuccess(F,r,e,t);return}}const f=i.loadPolicy.errorRetry,m=r.retry,_={url:e.url,data:void 0,code:s};$n(f,m,!1,_)?this.retry(f):(R.error(`${s} while loading ${e.url}`),this.callbacks.onError({code:s,text:t.statusText},e,t,r))}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,t=this.stats.retry;if($n(e,t,!0))this.retry(e);else{var r;R.warn(`timeout while loading ${(r=this.context)==null?void 0:r.url}`);const n=this.callbacks;n&&(this.abortInternal(),n.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:r}=this;this.retryDelay=zn(e,r.retry),r.retry++,R.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${t==null?void 0:t.url}, retrying ${r.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&&e0.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}}function t0(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(a){}return!1}const r0=/(\d+)-(\d+)\/(\d+)/;class Ko{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||a0,this.controller=new self.AbortController,this.stats=new je}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,r){const n=this.stats;if(n.loading.start)throw new Error("Loader can only be used once.");n.loading.start=self.performance.now();const i=n0(e,this.controller.signal),s=r.onProgress,u=e.responseType==="arraybuffer",f=u?"byteLength":"length",{maxTimeToFirstByteMs:m,maxLoadTimeMs:_}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=r,this.request=this.fetchSetup(e,i),self.clearTimeout(this.requestTimeout),t.timeout=m&&Y(m)?m:_,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),r.onTimeout(n,e,this.response)},t.timeout),self.fetch(this.request).then(b=>{this.response=this.loader=b;const C=Math.max(self.performance.now(),n.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=_,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),r.onTimeout(n,e,this.response)},_-(C-n.loading.start)),!b.ok){const{status:U,statusText:F}=b;throw new o0(F||"fetch, bad network response",U,b)}return n.loading.first=C,n.total=s0(b.headers)||n.total,s&&Y(t.highWaterMark)?this.loadProgressively(b,n,e,t.highWaterMark,s):u?b.arrayBuffer():e.responseType==="json"?b.json():b.text()}).then(b=>{const C=this.response;if(!C)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),n.loading.end=Math.max(self.performance.now(),n.loading.first);const U=b[f];U&&(n.loaded=n.total=U);const F={url:C.url,data:b,code:C.status};s&&!Y(t.highWaterMark)&&s(n,e,b,C),r.onSuccess(F,n,e,C)}).catch(b=>{if(self.clearTimeout(this.requestTimeout),n.aborted)return;const C=b&&b.code||0,U=b?b.message:null;r.onError({code:C,text:U},e,b?b.details:null,n)})}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,r,n=0,i){const s=new Ns,u=e.body.getReader(),f=()=>u.read().then(m=>{if(m.done)return s.dataLength&&i(t,r,s.flush(),e),Promise.resolve(new ArrayBuffer(0));const _=m.value,b=_.length;return t.loaded+=b,b<n||s.dataLength?(s.push(_),s.dataLength>=n&&i(t,r,s.flush(),e)):i(t,r,_,e),f()}).catch(()=>Promise.reject());return f()}}function n0(a,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(l({},a.headers))};return a.rangeEnd&&t.headers.set("Range","bytes="+a.rangeStart+"-"+String(a.rangeEnd-1)),t}function i0(a){const e=r0.exec(a);if(e)return parseInt(e[2])-parseInt(e[1])+1}function s0(a){const e=a.get("Content-Range");if(e){const r=i0(e);if(Y(r))return r}const t=a.get("Content-Length");if(t)return parseInt(t)}function a0(a,e){return new self.Request(a.url,e)}class o0 extends Error{constructor(e,t,r){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=r}}const l0=/\s/,u0={newCue(a,e,t,r){const n=[];let i,s,u,f,m;const _=self.VTTCue||self.TextTrackCue;for(let C=0;C<r.rows.length;C++)if(i=r.rows[C],u=!0,f=0,m="",!i.isEmpty()){var b;for(let j=0;j<i.chars.length;j++)l0.test(i.chars[j].uchar)&&u?f++:(m+=i.chars[j].uchar,u=!1);i.cueStartTime=e,e===t&&(t+=1e-4),f>=16?f--:f++;const U=Eo(m.trim()),F=oo(e,t,U);a!=null&&(b=a.cues)!=null&&b.getCueById(F)||(s=new _(e,t,U),s.id=F,s.line=C+1,s.align="left",s.position=10+Math.min(80,Math.floor(f*8/32)*10),n.push(s))}return a&&n.length&&(n.sort((C,U)=>C.line==="auto"||U.line==="auto"?0:C.line>8&&U.line>8?U.line-C.line:C.line-U.line),n.forEach(C=>li(a,C))),n}},c0={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},Ho=$e($e({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,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,loader:jo,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:us,bufferController:jn,capLevelController:fo,errorController:Zr,fpsController:ml,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:Xt,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,useMediaCapabilities:!0,certLoadPolicy:{default:c0},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}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},h0()),{},{subtitleStreamController:Hr,subtitleTrackController:yn,timelineController:dl,audioStreamController:er,audioTrackController:Ir,emeController:Cs,cmcdController:Xl,contentSteeringController:Ql});function h0(){return{cueHandler:u0,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 f0(a,e){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 t=vo(a),r=["manifest","level","frag"],n=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return r.forEach(i=>{const s=`${i==="level"?"playlist":i}LoadPolicy`,u=e[s]===void 0,f=[];n.forEach(m=>{const _=`${i}Loading${m}`,b=e[_];if(b!==void 0&&u){f.push(_);const C=t[s].default;switch(e[s]={default:C},m){case"TimeOut":C.maxLoadTimeMs=b,C.maxTimeToFirstByteMs=b;break;case"MaxRetry":C.errorRetry.maxNumRetry=b,C.timeoutRetry.maxNumRetry=b;break;case"RetryDelay":C.errorRetry.retryDelayMs=b,C.timeoutRetry.retryDelayMs=b;break;case"MaxRetryTimeout":C.errorRetry.maxRetryDelayMs=b,C.timeoutRetry.maxRetryDelayMs=b;break}}}),f.length&&R.warn(`hls.js config: "${f.join('", "')}" setting(s) are deprecated, use "${s}": ${JSON.stringify(e[s])}`)}),$e($e({},t),e)}function vo(a){return a&&typeof a=="object"?Array.isArray(a)?a.map(vo):Object.keys(a).reduce((e,t)=>(e[t]=vo(a[t]),e),{}):a}function d0(a){const e=a.loader;e!==Ko&&e!==jo?(R.log("[config]: Custom loader detected, cannot enable progressive streaming"),a.progressive=!1):t0()&&(a.loader=Ko,a.progressive=!0,a.enableSoftwareAES=!0,R.log("[config]: Progressive streaming enabled, using FetchLoader"))}let yo;class p0 extends Nr{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(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(d.LEVEL_LOADED,this.onLevelLoaded,this),e.on(d.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(d.FRAG_BUFFERED,this.onFragBuffered,this),e.on(d.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(d.LEVEL_LOADED,this.onLevelLoaded,this),e.off(d.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(d.FRAG_BUFFERED,this.onFragBuffered,this),e.off(d.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 r=this.hls.config.preferManagedMediaSource,n=[],i={},s={};let u=!1,f=!1,m=!1;t.levels.forEach(_=>{var b,C;const U=_.attrs;let{audioCodec:F,videoCodec:j}=_;((b=F)==null?void 0:b.indexOf("mp4a.40.34"))!==-1&&(yo||(yo=/chrome|firefox/i.test(navigator.userAgent)),yo&&(_.audioCodec=F=void 0)),F&&(_.audioCodec=F=Rr(F,r)),((C=j)==null?void 0:C.indexOf("avc1"))===0&&(j=_.videoCodec=an(j));const{width:re,height:De,unknownCodecs:Xe}=_;if(u||(u=!!(re&&De)),f||(f=!!j),m||(m=!!F),Xe!=null&&Xe.length||F&&!Pr(F,"audio",r)||j&&!Pr(j,"video",r))return;const{CODECS:Ze,"FRAME-RATE":dt,"HDCP-LEVEL":et,"PATHWAY-ID":yt,RESOLUTION:ct,"VIDEO-RANGE":St}=U,_t=`${`${yt||"."}-`}${_.bitrate}-${ct}-${dt}-${Ze}-${St}-${et}`;if(i[_t])if(i[_t].uri!==_.url&&!_.attrs["PATHWAY-ID"]){const At=s[_t]+=1;_.attrs["PATHWAY-ID"]=new Array(At+1).join(".");const ar=new gn(_);i[_t]=ar,n.push(ar)}else i[_t].addGroupId("audio",U.AUDIO),i[_t].addGroupId("text",U.SUBTITLES);else{const At=new gn(_);i[_t]=At,s[_t]=1,n.push(At)}}),this.filterAndSortMediaOptions(n,t,u,f,m)}filterAndSortMediaOptions(e,t,r,n,i){let s=[],u=[],f=e;if((r||n)&&i&&(f=f.filter(({videoCodec:F,videoRange:j,width:re,height:De})=>(!!F||!!(re&&De))&&qr(j))),f.length===0){Promise.resolve().then(()=>{if(this.hls){t.levels.length&&this.warn(`One or more CODECS in variant not supported: ${JSON.stringify(t.levels[0].attrs)}`);const F=new Error("no level with compatible codecs found in manifest");this.hls.trigger(d.ERROR,{type:w.MEDIA_ERROR,details:y.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:F,reason:F.message})}});return}if(t.audioTracks){const{preferManagedMediaSource:F}=this.hls.config;s=t.audioTracks.filter(j=>!j.audioCodec||Pr(j.audioCodec,"audio",F)),Wo(s)}t.subtitles&&(u=t.subtitles,Wo(u));const m=f.slice(0);f.sort((F,j)=>{if(F.attrs["HDCP-LEVEL"]!==j.attrs["HDCP-LEVEL"])return(F.attrs["HDCP-LEVEL"]||"")>(j.attrs["HDCP-LEVEL"]||"")?1:-1;if(r&&F.height!==j.height)return F.height-j.height;if(F.frameRate!==j.frameRate)return F.frameRate-j.frameRate;if(F.videoRange!==j.videoRange)return Nn.indexOf(F.videoRange)-Nn.indexOf(j.videoRange);if(F.videoCodec!==j.videoCodec){const re=fn(F.videoCodec),De=fn(j.videoCodec);if(re!==De)return De-re}if(F.uri===j.uri&&F.codecSet!==j.codecSet){const re=Kr(F.codecSet),De=Kr(j.codecSet);if(re!==De)return De-re}return F.averageBitrate!==j.averageBitrate?F.averageBitrate-j.averageBitrate:0});let _=m[0];if(this.steering&&(f=this.steering.filterParsedLevels(f),f.length!==m.length)){for(let F=0;F<m.length;F++)if(m[F].pathwayId===f[0].pathwayId){_=m[F];break}}this._levels=f;for(let F=0;F<f.length;F++)if(f[F]===_){var b;this._firstLevel=F;const j=_.bitrate,re=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${f.length} level(s) found, first bitrate: ${j}`),((b=this.hls.userConfig)==null?void 0:b.abrEwmaDefaultEstimate)===void 0){const De=Math.min(j,this.hls.config.abrEwmaDefaultEstimateMax);De>re&&re===Ho.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=De)}break}const C=i&&!n,U={levels:f,audioTracks:s,subtitleTracks:u,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:i,video:n,altAudio:!C&&s.some(F=>!!F.url)};this.hls.trigger(d.MANIFEST_PARSED,U),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}get levels(){return this._levels.length===0?null:this._levels}get level(){return this.currentLevelIndex}set level(e){const t=this._levels;if(t.length===0)return;if(e<0||e>=t.length){const _=new Error("invalid level idx"),b=e<0;if(this.hls.trigger(d.ERROR,{type:w.OTHER_ERROR,details:y.LEVEL_SWITCH_ERROR,level:e,fatal:b,error:_,reason:_.message}),b)return;e=Math.min(e,t.length-1)}const r=this.currentLevelIndex,n=this.currentLevel,i=n?n.attrs["PATHWAY-ID"]:void 0,s=t[e],u=s.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=s,r===e&&s.details&&n&&i===u)return;this.log(`Switching to level ${e} (${s.height?s.height+"p ":""}${s.videoRange?s.videoRange+" ":""}${s.codecSet?s.codecSet+" ":""}@${s.bitrate})${u?" with Pathway "+u:""} from level ${r}${i?" with Pathway "+i:""}`);const f={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(d.LEVEL_SWITCHING,f);const m=s.details;if(!m||m.live){const _=this.switchParams(s.uri,n==null?void 0:n.details,m);this.loadPlaylist(_)}}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}onError(e,t){t.fatal||!t.context||t.context.type===or.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===Ve.MAIN){const r=t.elementaryStreams;if(!Object.keys(r).some(i=>!!r[i]))return;const n=this._levels[t.level];n!=null&&n.loadError&&(this.log(`Resetting level error count of ${n.loadError} on frag buffered`),n.loadError=0)}}onLevelLoaded(e,t){var r;const{level:n,details:i}=t,s=this._levels[n];if(!s){var u;this.warn(`Invalid level index ${n}`),(u=t.deliveryDirectives)!=null&&u.skip&&(i.deltaUpdateFailed=!0);return}n===this.currentLevelIndex?(s.fragmentError===0&&(s.loadError=0),this.playlistLoaded(n,t,s.details)):(r=t.deliveryDirectives)!=null&&r.skip&&(i.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist();const t=this.currentLevelIndex,r=this.currentLevel;if(r&&this.shouldLoadPlaylist(r)){let n=r.uri;if(e)try{n=e.addDirectives(n)}catch(s){this.warn(`Could not construct new URL with HLS Delivery Directives: ${s}`)}const i=r.attrs["PATHWAY-ID"];this.log(`Loading level index ${t}${(e==null?void 0:e.msn)!==void 0?" at sn "+e.msn+" part "+e.part:""} with${i?" Pathway "+i:""} ${n}`),this.clearTimer(),this.hls.trigger(d.LEVEL_LOADING,{url:n,level:t,pathwayId:r.attrs["PATHWAY-ID"],id:0,deliveryDirectives:e||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;const r=this._levels.filter((n,i)=>i!==e?!0:(this.steering&&this.steering.removeLevel(n),n===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,n.details&&n.details.fragments.forEach(s=>s.level=-1)),!1));en(r),this._levels=r,this.currentLevelIndex>-1&&(t=this.currentLevel)!=null&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.hls.trigger(d.LEVELS_UPDATED,{levels:r})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:r}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(d.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:r}))}}function Wo(a){const e={};a.forEach(t=>{const r=t.groupId||"";t.id=e[r]=e[r]||0,e[r]++})}class m0{constructor(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const r in this.keyUriToKeyInfo){const n=this.keyUriToKeyInfo[r].loader;if(n){var t;if(e&&e!==((t=n.context)==null?void 0:t.frag.type))return;n.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=y.KEY_LOAD_ERROR,r,n,i){return new pi({type:w.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:i,error:r,networkDetails:n})}loadClear(e,t){if(this.emeController&&this.config.emeEnabled){const{sn:r,cc:n}=e;for(let i=0;i<t.length;i++){const s=t[i];if(n<=s.cc&&(r==="initSegment"||s.sn==="initSegment"||r<s.sn)){this.emeController.selectKeySystemFormat(s).then(u=>{s.setKeyFormat(u)});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 r,n;t&&e.setKeyFormat(t);const i=e.decryptdata;if(!i){const m=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,y.KEY_LOAD_ERROR,m))}const s=i.uri;if(!s)return Promise.reject(this.createKeyLoadError(e,y.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${s}"`)));let u=this.keyUriToKeyInfo[s];if((r=u)!=null&&r.decryptdata.key)return i.key=u.decryptdata.key,Promise.resolve({frag:e,keyInfo:u});if((n=u)!=null&&n.keyLoadPromise){var f;switch((f=u.mediaKeySessionContext)==null?void 0:f.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return u.keyLoadPromise.then(m=>(i.key=m.keyInfo.decryptdata.key,{frag:e,keyInfo:u}))}}switch(u=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(u,e):this.loadKeyEME(u,e);case"AES-128":return this.loadKeyHTTP(u,e);default:return Promise.reject(this.createKeyLoadError(e,y.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${i.method}"`)))}}loadKeyEME(e,t){const r={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const n=this.emeController.loadKey(r);if(n)return(e.keyLoadPromise=n.then(i=>(e.mediaKeySessionContext=i,r))).catch(i=>{throw e.keyLoadPromise=null,i})}return Promise.resolve(r)}loadKeyHTTP(e,t){const r=this.config,n=r.loader,i=new n(r);return t.keyLoader=e.loader=i,e.keyLoadPromise=new Promise((s,u)=>{const f={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},m=r.keyLoadPolicy.default,_={loadPolicy:m,timeout:m.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},b={onSuccess:(C,U,F,j)=>{const{frag:re,keyInfo:De,url:Xe}=F;if(!re.decryptdata||De!==this.keyUriToKeyInfo[Xe])return u(this.createKeyLoadError(re,y.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),j));De.decryptdata.key=re.decryptdata.key=new Uint8Array(C.data),re.keyLoader=null,De.loader=null,s({frag:re,keyInfo:De})},onError:(C,U,F,j)=>{this.resetLoader(U),u(this.createKeyLoadError(t,y.KEY_LOAD_ERROR,new Error(`HTTP Error ${C.code} loading key ${C.text}`),F,$e({url:f.url,data:void 0},C)))},onTimeout:(C,U,F)=>{this.resetLoader(U),u(this.createKeyLoadError(t,y.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),F))},onAbort:(C,U,F)=>{this.resetLoader(U),u(this.createKeyLoadError(t,y.INTERNAL_ABORTED,new Error("key loading aborted"),F))}};i.load(f,_,b)})}resetLoader(e){const{frag:t,keyInfo:r,url:n}=e,i=r.loader;t.keyLoader===i&&(t.keyLoader=null,r.loader=null),delete this.keyUriToKeyInfo[n],i&&i.destroy()}}function Vo(){return self.SourceBuffer||self.WebKitSourceBuffer}function Yo(){if(!Wr())return!1;const e=Vo();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function g0(){if(!Yo())return!1;const a=Wr();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(nn(e,"video")))||["mp4a.40.2","fLaC"].some(e=>a.isTypeSupported(nn(e,"audio"))))}function _0(){var a;const e=Vo();return typeof(e==null||(a=e.prototype)==null?void 0:a.changeType)=="function"}const v0=250,Oa=2,y0=.1,b0=.05;class x0{constructor(e,t,r,n){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=t,this.fragmentTracker=r,this.hls=n}destroy(){this.media=null,this.hls=this.fragmentTracker=null}poll(e,t){const{config:r,media:n,stalled:i}=this;if(n===null)return;const{currentTime:s,seeking:u}=n,f=this.seeking&&!u,m=!this.seeking&&u;if(this.seeking=u,s!==e){if(this.moved=!0,u||(this.nudgeRetry=0),i!==null){if(this.stallReported){const re=self.performance.now()-i;R.warn(`playback not stuck anymore @${s}, after ${Math.round(re)}ms`),this.stallReported=!1}this.stalled=null}return}if(m||f){this.stalled=null;return}if(n.paused&&!u||n.ended||n.playbackRate===0||!Mr.getBuffered(n).length){this.nudgeRetry=0;return}const _=Mr.bufferInfo(n,s,0),b=_.nextStart||0;if(u){const re=_.len>Oa,De=!b||t&&t.start<=s||b-s>Oa&&!this.fragmentTracker.getPartialFragment(s);if(re||De)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var C;if(!(_.len>0)&&!b)return;const De=Math.max(b,_.start||0)-s,Xe=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,dt=(Xe==null||(C=Xe.details)==null?void 0:C.live)?Xe.details.targetduration*2:Oa,et=this.fragmentTracker.getPartialFragment(s);if(De>0&&(De<=dt||et)){n.paused||this._trySkipBufferHole(et);return}}const U=self.performance.now();if(i===null){this.stalled=U;return}const F=U-i;if(!u&&F>=v0&&(this._reportStall(_),!this.media))return;const j=Mr.bufferInfo(n,s,r.maxBufferHole);this._tryFixBufferStall(j,F)}_tryFixBufferStall(e,t){const{config:r,fragmentTracker:n,media:i}=this;if(i===null)return;const s=i.currentTime,u=n.getPartialFragment(s);u&&(this._trySkipBufferHole(u)||!this.media)||(e.len>r.maxBufferHole||e.nextStart&&e.nextStart-s<r.maxBufferHole)&&t>r.highBufferWatchdogPeriod*1e3&&(R.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}_reportStall(e){const{hls:t,media:r,stallReported:n}=this;if(!n&&r){this.stallReported=!0;const i=new Error(`Playback stalling at @${r.currentTime} due to low buffer (${JSON.stringify(e)})`);R.warn(i.message),t.trigger(d.ERROR,{type:w.MEDIA_ERROR,details:y.BUFFER_STALLED_ERROR,fatal:!1,error:i,buffer:e.len})}}_trySkipBufferHole(e){const{config:t,hls:r,media:n}=this;if(n===null)return 0;const i=n.currentTime,s=Mr.bufferInfo(n,i,0),u=i<s.start?s.start:s.nextStart;if(u){const f=s.len<=t.maxBufferHole,m=s.len>0&&s.len<1&&n.readyState<3,_=u-i;if(_>0&&(f||m)){if(_>t.maxBufferHole){const{fragmentTracker:C}=this;let U=!1;if(i===0){const F=C.getAppendedFrag(0,Ve.MAIN);F&&u<F.end&&(U=!0)}if(!U){const F=e||C.getAppendedFrag(i,Ve.MAIN);if(F){let j=!1,re=F.end;for(;re<u;){const De=C.getPartialFragment(re);if(De)re+=De.duration;else{j=!0;break}}if(j)return 0}}}const b=Math.max(u+b0,i+y0);if(R.warn(`skipping hole, adjusting currentTime from ${i} to ${b}`),this.moved=!0,this.stalled=null,n.currentTime=b,e&&!e.gap){const C=new Error(`fragment loaded with buffer holes, seeking from ${i} to ${b}`);r.trigger(d.ERROR,{type:w.MEDIA_ERROR,details:y.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:C,reason:C.message,frag:e})}return b}}return 0}_tryNudgeBuffer(){const{config:e,hls:t,media:r,nudgeRetry:n}=this;if(r===null)return;const i=r.currentTime;if(this.nudgeRetry++,n<e.nudgeMaxRetry){const s=i+(n+1)*e.nudgeOffset,u=new Error(`Nudging 'currentTime' from ${i} to ${s}`);R.warn(u.message),r.currentTime=s,t.trigger(d.ERROR,{type:w.MEDIA_ERROR,details:y.BUFFER_NUDGE_ON_STALL,error:u,fatal:!1})}else{const s=new Error(`Playhead still not moving while enough data buffered @${i} after ${e.nudgeMaxRetry} nudges`);R.error(s.message),t.trigger(d.ERROR,{type:w.MEDIA_ERROR,details:y.BUFFER_STALLED_ERROR,error:s,fatal:!0})}}}const w0=100;class E0 extends ps{constructor(e,t,r){super(e,t,r,"[stream-controller]",Ve.MAIN),this.audioCodecSwap=!1,this.gapController=null,this.level=-1,this._forceStartLoad=!1,this.altAudio=!1,this.audioOnly=!1,this.fragPlaying=null,this.onvplaying=null,this.onvseeked=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(d.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.MANIFEST_PARSED,this.onManifestParsed,this),e.on(d.LEVEL_LOADING,this.onLevelLoading,this),e.on(d.LEVEL_LOADED,this.onLevelLoaded,this),e.on(d.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(d.ERROR,this.onError,this),e.on(d.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(d.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(d.BUFFER_CREATED,this.onBufferCreated,this),e.on(d.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(d.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(d.FRAG_BUFFERED,this.onFragBuffered,this)}_unregisterListeners(){const{hls:e}=this;e.off(d.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(d.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.MANIFEST_PARSED,this.onManifestParsed,this),e.off(d.LEVEL_LOADED,this.onLevelLoaded,this),e.off(d.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(d.ERROR,this.onError,this),e.off(d.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(d.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(d.BUFFER_CREATED,this.onBufferCreated,this),e.off(d.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(d.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(d.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this._unregisterListeners(),super.onHandlerDestroying()}startLoad(e){if(this.levels){const{lastCurrentTime:t,hls:r}=this;if(this.stopLoad(),this.setInterval(w0),this.level=-1,!this.startFragRequested){let n=r.startLevel;n===-1&&(r.config.testBandwidth&&this.levels.length>1?(n=0,this.bitrateTest=!0):n=r.firstAutoLevel),r.nextLoadLevel=n,this.level=r.loadLevel,this.loadedmetadata=!1}t>0&&e===-1&&(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t),this.state=vt.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=vt.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case vt.WAITING_LEVEL:{const{levels:t,level:r}=this,n=t==null?void 0:t[r],i=n==null?void 0:n.details;if(i&&(!i.live||this.levelLastLoaded===n)){if(this.waitForCdnTuneIn(i))break;this.state=vt.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=vt.IDLE;break}break}case vt.FRAG_LOADING_WAITING_RETRY:{var e;const t=self.performance.now(),r=this.retryDate;if(!r||t>=r||(e=this.media)!=null&&e.seeking){const{levels:n,level:i}=this,s=n==null?void 0:n[i];this.resetStartWhenNotLoaded(s||null),this.state=vt.IDLE}}break}this.state===vt.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){super.onTickEnd(),this.checkBuffer(),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:r,media:n}=this;if(t===null||!n&&(this.startFragRequested||!e.config.startFragPrefetch)||this.altAudio&&this.audioOnly)return;const i=this.buffering?e.nextLoadLevel:e.loadLevel;if(!(r!=null&&r[i]))return;const s=r[i],u=this.getMainFwdBufferInfo();if(u===null)return;const f=this.getLevelDetails();if(f&&this._streamEnded(u,f)){const j={};this.altAudio&&(j.type="video"),this.hls.trigger(d.BUFFER_EOS,j),this.state=vt.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 m=s.details;if(!m||this.state===vt.WAITING_LEVEL||m.live&&this.levelLastLoaded!==s){this.level=i,this.state=vt.WAITING_LEVEL;return}const _=u.len,b=this.getMaxBufferLength(s.maxBitrate);if(_>=b)return;this.backtrackFragment&&this.backtrackFragment.start>u.end&&(this.backtrackFragment=null);const C=this.backtrackFragment?this.backtrackFragment.start:u.end;let U=this.getNextFragment(C,m);if(this.couldBacktrack&&!this.fragPrevious&&U&&U.sn!=="initSegment"&&this.fragmentTracker.getState(U)!==on.OK){var F;const re=((F=this.backtrackFragment)!=null?F:U).sn-m.startSN,De=m.fragments[re-1];De&&U.cc===De.cc&&(U=De,this.fragmentTracker.removeFragment(De))}else this.backtrackFragment&&u.len&&(this.backtrackFragment=null);if(U&&this.isLoopLoading(U,C)){if(!U.gap){const re=this.audioOnly&&!this.altAudio?H.AUDIO:H.VIDEO,De=(re===H.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;De&&this.afterBufferFlushed(De,re,Ve.MAIN)}U=this.getNextFragmentLoopLoading(U,m,u,Ve.MAIN,b)}U&&(U.initSegment&&!U.initSegment.data&&!this.bitrateTest&&(U=U.initSegment),this.loadFragment(U,s,C))}loadFragment(e,t,r){const n=this.fragmentTracker.getState(e);this.fragCurrent=e,n===on.NOT_LOADED||n===on.PARTIAL?e.sn==="initSegment"?this._loadInitSegment(e,t):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)):(this.startFragRequested=!0,super.loadFragment(e,t,r)):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,Ve.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 r;const n=this.getAppendedFrag(t.currentTime);n&&n.start>1&&this.flushMainBuffer(0,n.start-1);const i=this.getLevelDetails();if(i!=null&&i.live){const u=this.getMainFwdBufferInfo();if(!u||u.len<i.targetduration*2)return}if(!t.paused&&e){const u=this.hls.nextLoadLevel,f=e[u],m=this.fragLastKbps;m&&this.fragCurrent?r=this.fragCurrent.duration*f.maxBitrate/(1e3*m)+1:r=0}else r=0;const s=this.getBufferedFrag(t.currentTime+r);if(s){const u=this.followingBufferedFrag(s);if(u){this.abortCurrentFrag();const f=u.maxStartPTS?u.maxStartPTS:u.start,m=u.duration,_=Math.max(s.end,f+Math.min(Math.max(m-this.config.maxFragLookUpTolerance,m*(this.couldBacktrack?.5:.125)),m*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(_,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 vt.KEY_LOADING:case vt.FRAG_LOADING:case vt.FRAG_LOADING_WAITING_RETRY:case vt.PARSING:case vt.PARSED:this.state=vt.IDLE;break}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,this.altAudio?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const r=t.media;this.onvplaying=this.onMediaPlaying.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),r.addEventListener("playing",this.onvplaying),r.addEventListener("seeked",this.onvseeked),this.gapController=new x0(this.config,r,this.fragmentTracker,this.hls)}onMediaDetaching(){const{media:e}=this;e&&this.onvplaying&&this.onvseeked&&(e.removeEventListener("playing",this.onvplaying),e.removeEventListener("seeked",this.onvseeked),this.onvplaying=this.onvseeked=null,this.videoBuffer=null),this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),super.onMediaDetaching()}onMediaPlaying(){this.tick()}onMediaSeeked(){const e=this.media,t=e?e.currentTime:null;Y(t)&&this.log(`Media seeked to ${t.toFixed(3)}`);const r=this.getMainFwdBufferInfo();if(r===null||r.len===0){this.warn(`Main forward buffer length on "seeked" event ${r?r.len:"empty"})`);return}this.tick()}onManifestLoading(){this.log("Trigger BUFFER_RESET"),this.hls.trigger(d.BUFFER_RESET,void 0),this.fragmentTracker.removeAllFragments(),this.couldBacktrack=!1,this.startPosition=this.lastCurrentTime=this.fragLastKbps=0,this.levels=this.fragPlaying=this.backtrackFragment=this.levelLastLoaded=null,this.altAudio=this.audioOnly=this.startFragRequested=!1}onManifestParsed(e,t){let r=!1,n=!1;t.levels.forEach(i=>{const s=i.audioCodec;s&&(r=r||s.indexOf("mp4a.40.2")!==-1,n=n||s.indexOf("mp4a.40.5")!==-1)}),this.audioCodecSwitch=r&&n&&!_0(),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:r}=this;if(!r||this.state!==vt.IDLE)return;const n=r[t.level];(!n.details||n.details.live&&this.levelLastLoaded!==n||this.waitForCdnTuneIn(n.details))&&(this.state=vt.WAITING_LEVEL)}onLevelLoaded(e,t){var r;const{levels:n}=this,i=t.level,s=t.details,u=s.totalduration;if(!n){this.warn(`Levels were reset while loading level ${i}`);return}this.log(`Level ${i} loaded [${s.startSN},${s.endSN}]${s.lastPartSn?`[part-${s.lastPartSn}-${s.lastPartIndex}]`:""}, cc [${s.startCC}, ${s.endCC}] duration:${u}`);const f=n[i],m=this.fragCurrent;m&&(this.state===vt.FRAG_LOADING||this.state===vt.FRAG_LOADING_WAITING_RETRY)&&m.level!==t.level&&m.loader&&this.abortCurrentFrag();let _=0;if(s.live||(r=f.details)!=null&&r.live){var b;if(this.checkLiveUpdate(s),s.deltaUpdateFailed)return;_=this.alignPlaylists(s,f.details,(b=this.levelLastLoaded)==null?void 0:b.details)}if(f.details=s,this.levelLastLoaded=f,this.hls.trigger(d.LEVEL_UPDATED,{details:s,level:i}),this.state===vt.WAITING_LEVEL){if(this.waitForCdnTuneIn(s))return;this.state=vt.IDLE}this.startFragRequested?s.live&&this.synchronizeToLiveEdge(s):this.setStartPosition(s,_),this.tick()}_handleFragmentLoadProgress(e){var t;const{frag:r,part:n,payload:i}=e,{levels:s}=this;if(!s){this.warn(`Levels were reset while fragment load was in progress. Fragment ${r.sn} of level ${r.level} will not be buffered`);return}const u=s[r.level],f=u.details;if(!f){this.warn(`Dropping fragment ${r.sn} of level ${r.level} after level details were reset`),this.fragmentTracker.removeFragment(r);return}const m=u.videoCodec,_=f.PTSKnown||!f.live,b=(t=r.initSegment)==null?void 0:t.data,C=this._getAudioCodec(u),U=this.transmuxer=this.transmuxer||new Ct(this.hls,Ve.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),F=n?n.index:-1,j=F!==-1,re=new Ps(r.level,r.sn,r.stats.chunkCount,i.byteLength,F,j),De=this.initPTS[r.cc];U.push(i,b,C,m,r,n,f.totalduration,_,re,De)}onAudioTrackSwitching(e,t){const r=this.altAudio;if(!!!t.url){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();const i=this.hls;r&&(i.trigger(d.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),i.trigger(d.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const r=t.id,n=!!this.hls.audioTracks[r].url;if(n){const i=this.videoBuffer;i&&this.mediaBuffer!==i&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=i)}this.altAudio=n,this.tick()}onBufferCreated(e,t){const r=t.tracks;let n,i,s=!1;for(const u in r){const f=r[u];if(f.id==="main"){if(i=u,n=f,u==="video"){const m=r[u];m&&(this.videoBuffer=m.buffer)}}else s=!0}s&&n?(this.log(`Alternate track found, use ${i}.buffered to schedule main fragment loading`),this.mediaBuffer=n.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:r,part:n}=t;if(r&&r.type!==Ve.MAIN)return;if(this.fragContextChanged(r)){this.warn(`Fragment ${r.sn}${n?" p: "+n.index:""} of level ${r.level} finished buffering, but was aborted. state: ${this.state}`),this.state===vt.PARSED&&(this.state=vt.IDLE);return}const i=n?n.stats:r.stats;this.fragLastKbps=Math.round(8*i.total/(i.buffering.end-i.loading.first)),r.sn!=="initSegment"&&(this.fragPrevious=r),this.fragBufferedComplete(r,n)}onError(e,t){var r;if(t.fatal){this.state=vt.ERROR;return}switch(t.details){case y.FRAG_GAP:case y.FRAG_PARSING_ERROR:case y.FRAG_DECRYPT_ERROR:case y.FRAG_LOAD_ERROR:case y.FRAG_LOAD_TIMEOUT:case y.KEY_LOAD_ERROR:case y.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(Ve.MAIN,t);break;case y.LEVEL_LOAD_ERROR:case y.LEVEL_LOAD_TIMEOUT:case y.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===vt.WAITING_LEVEL&&((r=t.context)==null?void 0:r.type)===or.LEVEL&&(this.state=vt.IDLE);break;case y.BUFFER_APPEND_ERROR:case y.BUFFER_FULL_ERROR:if(!t.parent||t.parent!=="main")return;if(t.details===y.BUFFER_APPEND_ERROR){this.resetLoadingState();return}this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case y.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}checkBuffer(){const{media:e,gapController:t}=this;if(!(!e||!t||!e.readyState)){if(this.loadedmetadata||!Mr.getBuffered(e).length){const r=this.state!==vt.IDLE?this.fragCurrent:null;t.poll(this.lastCurrentTime,r)}this.lastCurrentTime=e.currentTime}}onFragLoadEmergencyAborted(){this.state=vt.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==H.AUDIO||this.audioOnly&&!this.altAudio){const r=(t===H.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(r,t,Ve.MAIN),this.tick()}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let r=this.startPosition;if(r>=0&&t<r){if(e.seeking){this.log(`could not seek to ${r}, already seeking at ${t}`);return}const n=Mr.getBuffered(e),s=(n.length?n.start(0):0)-r;s>0&&(s<this.config.maxBufferHole||s<this.config.maxFragLookUpTolerance)&&(this.log(`adjusting start position by ${s} to match buffer start`),r+=s,this.startPosition=r),this.log(`seek to target start position ${r} from current time ${t}`),e.currentTime=r}}_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(r=>{const{hls:n}=this;if(!r||this.fragContextChanged(e))return;t.fragmentError=0,this.state=vt.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const i=e.stats;i.parsing.start=i.parsing.end=i.buffering.start=i.buffering.end=self.performance.now(),n.trigger(d.FRAG_LOADED,r),e.bitrateTest=!1})}_handleTransmuxComplete(e){var t;const r="main",{hls:n}=this,{remuxResult:i,chunkMeta:s}=e,u=this.getCurrentContext(s);if(!u){this.resetWhenMissingContext(s);return}const{frag:f,part:m,level:_}=u,{video:b,text:C,id3:U,initSegment:F}=i,{details:j}=_,re=this.altAudio?void 0:i.audio;if(this.fragContextChanged(f)){this.fragmentTracker.removeFragment(f);return}if(this.state=vt.PARSING,F){if(F!=null&&F.tracks){const Ze=f.initSegment||f;this._bufferInitSegment(_,F.tracks,Ze,s),n.trigger(d.FRAG_PARSING_INIT_SEGMENT,{frag:Ze,id:r,tracks:F.tracks})}const De=F.initPTS,Xe=F.timescale;Y(De)&&(this.initPTS[f.cc]={baseTime:De,timescale:Xe},n.trigger(d.INIT_PTS_FOUND,{frag:f,id:r,initPTS:De,timescale:Xe}))}if(b&&j&&f.sn!=="initSegment"){const De=j.fragments[f.sn-1-j.startSN],Xe=f.sn===j.startSN,Ze=!De||f.cc>De.cc;if(i.independent!==!1){const{startPTS:dt,endPTS:et,startDTS:yt,endDTS:ct}=b;if(m)m.elementaryStreams[b.type]={startPTS:dt,endPTS:et,startDTS:yt,endDTS:ct};else if(b.firstKeyFrame&&b.independent&&s.id===1&&!Ze&&(this.couldBacktrack=!0),b.dropped&&b.independent){const St=this.getMainFwdBufferInfo(),Ft=(St?St.end:this.getLoadPosition())+this.config.maxBufferHole,_t=b.firstKeyFramePTS?b.firstKeyFramePTS:dt;if(!Xe&&Ft<_t-this.config.maxBufferHole&&!Ze){this.backtrack(f);return}else Ze&&(f.gap=!0);f.setElementaryStreamInfo(b.type,f.start,et,f.start,ct,!0)}else Xe&&dt>Oa&&(f.gap=!0);f.setElementaryStreamInfo(b.type,dt,et,yt,ct),this.backtrackFragment&&(this.backtrackFragment=f),this.bufferFragmentData(b,f,m,s,Xe||Ze)}else if(Xe||Ze)f.gap=!0;else{this.backtrack(f);return}}if(re){const{startPTS:De,endPTS:Xe,startDTS:Ze,endDTS:dt}=re;m&&(m.elementaryStreams[H.AUDIO]={startPTS:De,endPTS:Xe,startDTS:Ze,endDTS:dt}),f.setElementaryStreamInfo(H.AUDIO,De,Xe,Ze,dt),this.bufferFragmentData(re,f,m,s)}if(j&&U!=null&&(t=U.samples)!=null&&t.length){const De={id:r,frag:f,details:j,samples:U.samples};n.trigger(d.FRAG_PARSING_METADATA,De)}if(j&&C){const De={id:r,frag:f,details:j,samples:C.samples};n.trigger(d.FRAG_PARSING_USERDATA,De)}}_bufferInitSegment(e,t,r,n){if(this.state!==vt.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&delete t.audio;const{audio:i,video:s,audiovideo:u}=t;if(i){let f=e.audioCodec;const m=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){f&&(f.indexOf("mp4a.40.5")!==-1?f="mp4a.40.2":f="mp4a.40.5");const _=i.metadata;_&&"channelCount"in _&&(_.channelCount||1)!==1&&m.indexOf("firefox")===-1&&(f="mp4a.40.5")}f&&f.indexOf("mp4a.40.5")!==-1&&m.indexOf("android")!==-1&&i.container!=="audio/mpeg"&&(f="mp4a.40.2",this.log(`Android: force audio codec to ${f}`)),e.audioCodec&&e.audioCodec!==f&&this.log(`Swapping manifest audio codec "${e.audioCodec}" for "${f}"`),i.levelCodec=f,i.id="main",this.log(`Init audio buffer, container:${i.container}, codecs[selected/level/parsed]=[${f||""}/${e.audioCodec||""}/${i.codec}]`)}s&&(s.levelCodec=e.videoCodec,s.id="main",this.log(`Init video buffer, container:${s.container}, codecs[level/parsed]=[${e.videoCodec||""}/${s.codec}]`)),u&&this.log(`Init audiovideo buffer, container:${u.container}, codecs[level/parsed]=[${e.codecs}/${u.codec}]`),this.hls.trigger(d.BUFFER_CODECS,t),Object.keys(t).forEach(f=>{const _=t[f].initSegment;_!=null&&_.byteLength&&this.hls.trigger(d.BUFFER_APPENDING,{type:f,data:_,frag:r,part:null,chunkMeta:n,parent:r.type})}),this.tickImmediate()}getMainFwdBufferInfo(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,Ve.MAIN)}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=vt.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const r=e.currentTime;if(Mr.isBuffered(e,r)?t=this.getAppendedFrag(r):Mr.isBuffered(e,r+.1)&&(t=this.getAppendedFrag(r+.1)),t){this.backtrackFragment=null;const n=this.fragPlaying,i=t.level;(!n||t.sn!==n.sn||n.level!==i)&&(this.fragPlaying=t,this.hls.trigger(d.FRAG_CHANGED,{frag:t}),(!n||n.level!==i)&&this.hls.trigger(d.LEVEL_SWITCHED,{level:i}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){const e=this.media;return e?this.fragPlaying||this.getAppendedFrag(e.currentTime):null}get currentProgramDateTime(){const e=this.media;if(e){const t=e.currentTime,r=this.currentFrag;if(r&&Y(t)&&Y(r.programDateTime)){const n=r.programDateTime+(t-r.start)*1e3;return new Date(n)}}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 ls{static get version(){return"1.5.20"}static isMSESupported(){return Yo()}static isSupported(){return g0()}static getMediaSource(){return Wr()}static get Events(){return d}static get ErrorTypes(){return w}static get ErrorDetails(){return y}static get DefaultConfig(){return ls.defaultConfig?ls.defaultConfig:Ho}static set DefaultConfig(e){ls.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this.started=!1,this._emitter=new xt,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.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this.url=null,this.triggeringException=void 0,he(e.debug||!1,"Hls instance");const t=this.config=f0(ls.DefaultConfig,e);this.userConfig=e,t.progressive&&d0(t);const{abrController:r,bufferController:n,capLevelController:i,errorController:s,fpsController:u}=t,f=new s(this),m=this.abrController=new r(this),_=this.bufferController=new n(this),b=this.capLevelController=new i(this),C=new u(this),U=new Hn(this),F=new mn(this),j=t.contentSteeringController,re=j?new j(this):null,De=this.levelController=new p0(this,re),Xe=new Ua(this),Ze=new m0(this.config),dt=this.streamController=new E0(this,Xe,Ze);b.setStreamController(dt),C.setStreamController(dt);const et=[U,De,dt];re&&et.splice(1,0,re),this.networkControllers=et;const yt=[m,_,b,C,F,Xe];this.audioTrackController=this.createController(t.audioTrackController,et);const ct=t.audioStreamController;ct&&et.push(new ct(this,Xe,Ze)),this.subtitleTrackController=this.createController(t.subtitleTrackController,et);const St=t.subtitleStreamController;St&&et.push(new St(this,Xe,Ze)),this.createController(t.timelineController,yt),Ze.emeController=this.emeController=this.createController(t.emeController,yt),this.cmcdController=this.createController(t.cmcdController,yt),this.latencyController=this.createController(Gi,yt),this.coreComponents=yt,et.push(f);const Ft=f.onErrorOut;typeof Ft=="function"&&this.on(d.ERROR,Ft,f)}createController(e,t){if(e){const r=new e(this);return t&&t.push(r),r}return null}on(e,t,r=this){this._emitter.on(e,t,r)}once(e,t,r=this){this._emitter.once(e,t,r)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,r=this,n){this._emitter.off(e,t,r,n)}listeners(e){return this._emitter.listeners(e)}emit(e,t,r){return this._emitter.emit(e,t,r)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(r){if(R.error("An internal error happened while handling event "+e+'. Error message: "'+r.message+'". Here is a stacktrace:',r),!this.triggeringException){this.triggeringException=!0;const n=e===d.ERROR;this.trigger(d.ERROR,{type:w.OTHER_ERROR,details:y.INTERNAL_EXCEPTION,fatal:n,event:e,error:r}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){R.log("destroy"),this.trigger(d.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){R.log("attachMedia"),this._media=e,this.trigger(d.MEDIA_ATTACHING,{media:e})}detachMedia(){R.log("detachMedia"),this.trigger(d.MEDIA_DETACHING,void 0),this._media=null}loadSource(e){this.stopLoad();const t=this.media,r=this.url,n=this.url=He.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,R.log(`loadSource:${n}`),t&&r&&(r!==n||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(d.MANIFEST_LOADING,{url:e})}startLoad(e=-1){R.log(`startLoad(${e})`),this.started=!0,this.resumeBuffering();for(let t=0;t<this.networkControllers.length&&(this.networkControllers[t].startLoad(e),!(!this.started||!this.networkControllers));t++);}stopLoad(){R.log("stopLoad"),this.started=!1;for(let e=0;e<this.networkControllers.length&&(this.networkControllers[e].stopLoad(),!(this.started||!this.networkControllers));e++);}resumeBuffering(){R.log("resume buffering"),this.networkControllers.forEach(e=>{e.resumeBuffering&&e.resumeBuffering()})}pauseBuffering(){R.log("pause buffering"),this.networkControllers.forEach(e=>{e.pauseBuffering&&e.pauseBuffering()})}swapAudioCodec(){R.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){R.log("recoverMediaError");const e=this._media;this.detachMedia(),e&&this.attachMedia(e)}removeLevel(e){this.levelController.removeLevel(e)}get levels(){const e=this.levelController.levels;return e||[]}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){R.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){R.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){R.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){R.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){R.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 ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(R.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){Vn(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 r=e.length;for(let n=0;n<r;n++)if(e[n].maxBitrate>=t)return n;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:r}=this;let n;if(t===-1&&e!=null&&e.length?n=e.length-1:n=t,r)for(let i=n;i--;){const s=e[i].attrs["HDCP-LEVEL"];if(s&&s<=r)return i}return n}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()}setAudioOption(e){var t;return(t=this.audioTrackController)==null?void 0:t.setAudioOption(e)}setSubtitleOption(e){var t;return(t=this.subtitleTrackController)==null||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}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}}ls.defaultConfig=void 0}}]);
}());