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__MoopCases__InfoPanel__in...

1238 lines
1.1 MiB

!(function(){var qo=Math.pow;(self.webpackChunk=self.webpackChunk||[]).push([[1855],{70557:function(Ot,Xe,J){"use strict";J.d(Xe,{Z:function(){return xe}});var te=J(96663),we=J(59301),Me={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"},De=Me,Fe=J(7657),de=function(H,P){return we.createElement(Fe.Z,(0,te.Z)({},H,{ref:P,icon:De}))},Se=we.forwardRef(de),xe=Se},35593:function(Ot,Xe,J){"use strict";J.d(Xe,{Z:function(){return It}});var te=J(44127),we=J(72071),Me=J(6620),De=J(43403),Fe=J(92310),de=J.n(Fe),Se=J(29301),xe=J(76846),l=J(96452),H=J(6089),P=J(80402),x=J(34280),d=J(49658),y=J(59301),v=J(96663),U=J(77900),W=J(8654);function I(Te){var qe=Te.prefixCls,Ie=Te.align,rt=Te.arrow,st=Te.arrowPos,z=rt||{},oe=z.className,Ae=z.content,ye=st.x,Pe=ye===void 0?0:ye,ze=st.y,Ve=ze===void 0?0:ze,Je=y.useRef();if(!Ie||!Ie.points)return null;var je={position:"absolute"};if(Ie.autoArrow!==!1){var Ke=Ie.points[0],_t=Ie.points[1],xt=Ke[0],ht=Ke[1],gt=_t[0],Et=_t[1];xt===gt||!["t","b"].includes(xt)?je.top=Ve:xt==="t"?je.top=0:je.bottom=0,ht===Et||!["l","r"].includes(ht)?je.left=Pe:ht==="l"?je.left=0:je.right=0}return y.createElement("div",{ref:Je,className:de()("".concat(qe,"-arrow"),oe),style:je},Ae)}function L(Te){var qe=Te.prefixCls,Ie=Te.open,rt=Te.zIndex,st=Te.mask,z=Te.motion;return st?y.createElement(U.default,(0,v.Z)({},z,{motionAppear:!0,visible:Ie,removeOnLeave:!0}),function(oe){var Ae=oe.className;return y.createElement("div",{style:{zIndex:rt},className:de()("".concat(qe,"-mask"),Ae)})}):null}var V=y.memo(function(Te){var qe=Te.children;return qe},function(Te,qe){return qe.cache}),re=V,C=y.forwardRef(function(Te,qe){var Ie=Te.popup,rt=Te.className,st=Te.prefixCls,z=Te.style,oe=Te.target,Ae=Te.onVisibleChanged,ye=Te.open,Pe=Te.keepDom,ze=Te.fresh,Ve=Te.onClick,Je=Te.mask,je=Te.arrow,Ke=Te.arrowPos,_t=Te.align,xt=Te.motion,ht=Te.maskMotion,gt=Te.forceRender,Et=Te.getPopupContainer,pt=Te.autoDestroy,kt=Te.portal,wt=Te.zIndex,_=Te.onMouseEnter,T=Te.onMouseLeave,We=Te.onPointerEnter,O=Te.ready,ne=Te.offsetX,Kt=Te.offsetY,ue=Te.offsetR,Ee=Te.offsetB,Oe=Te.onAlign,N=Te.onPrepare,Y=Te.stretch,le=Te.targetWidth,be=Te.targetHeight,R=typeof Ie=="function"?Ie():Ie,ft=ye||Pe,se=(Et==null?void 0:Et.length)>0,Tt=y.useState(!Et||!se),Ct=(0,we.Z)(Tt,2),Nt=Ct[0],br=Ct[1];if((0,x.Z)(function(){!Nt&&se&&oe&&br(!0)},[Nt,se,oe]),!Nt)return null;var Ht="auto",Mt={left:"-1000vw",top:"-1000vh",right:Ht,bottom:Ht};if(O||!ye){var Tr,Br=_t.points,Gr=_t.dynamicInset||((Tr=_t._experimental)===null||Tr===void 0?void 0:Tr.dynamicInset),zr=Gr&&Br[0][1]==="r",At=Gr&&Br[0][0]==="b";zr?(Mt.right=ue,Mt.left=Ht):(Mt.left=ne,Mt.right=Ht),At?(Mt.bottom=Ee,Mt.top=Ht):(Mt.top=Kt,Mt.bottom=Ht)}var Wt={};return Y&&(Y.includes("height")&&be?Wt.height=be:Y.includes("minHeight")&&be&&(Wt.minHeight=be),Y.includes("width")&&le?Wt.width=le:Y.includes("minWidth")&&le&&(Wt.minWidth=le)),ye||(Wt.pointerEvents="none"),y.createElement(kt,{open:gt||ft,getContainer:Et&&function(){return Et(oe)},autoDestroy:pt},y.createElement(L,{prefixCls:st,open:ye,zIndex:wt,mask:Je,motion:ht}),y.createElement(Se.Z,{onResize:Oe,disabled:!ye},function(pr){return y.createElement(U.default,(0,v.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:gt,leavedClassName:"".concat(st,"-hidden")},xt,{onAppearPrepare:N,onEnterPrepare:N,visible:ye,onVisibleChanged:function(Ir){var tn;xt==null||(tn=xt.onVisibleChanged)===null||tn===void 0||tn.call(xt,Ir),Ae(Ir)}}),function(Kr,Ir){var tn=Kr.className,or=Kr.style,wn=de()(st,tn,rt);return y.createElement("div",{ref:(0,W.sQ)(pr,qe,Ir),className:wn,style:(0,te.Z)((0,te.Z)((0,te.Z)((0,te.Z)({"--arrow-x":"".concat(Ke.x||0,"px"),"--arrow-y":"".concat(Ke.y||0,"px")},Mt),Wt),or),{},{boxSizing:"border-box",zIndex:wt},z),onMouseEnter:_,onMouseLeave:T,onPointerEnter:We,onClick:Ve},je&&y.createElement(I,{prefixCls:st,arrow:je,arrowPos:Ke,align:_t}),y.createElement(re,{cache:!ye&&!ze},R))})}))}),_e=C,pe=y.forwardRef(function(Te,qe){var Ie=Te.children,rt=Te.getTriggerDOMNode,st=(0,W.Yr)(Ie),z=y.useCallback(function(Ae){(0,W.mH)(qe,rt?rt(Ae):Ae)},[rt]),oe=(0,W.x1)(z,Ie.ref);return st?y.cloneElement(Ie,{ref:oe}):Ie}),ce=pe,ge=y.createContext(null),ke=ge;function ve(Te){return Te?Array.isArray(Te)?Te:[Te]:[]}function Ce(Te,qe,Ie,rt){return y.useMemo(function(){var st=ve(Ie!=null?Ie:qe),z=ve(rt!=null?rt:qe),oe=new Set(st),Ae=new Set(z);return Te&&(oe.has("hover")&&(oe.delete("hover"),oe.add("click")),Ae.has("hover")&&(Ae.delete("hover"),Ae.add("click"))),[oe,Ae]},[Te,qe,Ie,rt])}var K=J(29194);function F(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ie=arguments.length>2?arguments[2]:void 0;return Ie?Te[0]===qe[0]:Te[0]===qe[0]&&Te[1]===qe[1]}function $(Te,qe,Ie,rt){for(var st=Ie.points,z=Object.keys(Te),oe=0;oe<z.length;oe+=1){var Ae,ye=z[oe];if(F((Ae=Te[ye])===null||Ae===void 0?void 0:Ae.points,st,rt))return"".concat(qe,"-placement-").concat(ye)}return""}function q(Te,qe,Ie,rt){return qe||(Ie?{motionName:"".concat(Te,"-").concat(Ie)}:rt?{motionName:rt}:null)}function ae(Te){return Te.ownerDocument.defaultView}function Z(Te){for(var qe=[],Ie=Te==null?void 0:Te.parentElement,rt=["hidden","scroll","clip","auto"];Ie;){var st=ae(Ie).getComputedStyle(Ie),z=st.overflowX,oe=st.overflowY,Ae=st.overflow;[z,oe,Ae].some(function(ye){return rt.includes(ye)})&&qe.push(Ie),Ie=Ie.parentElement}return qe}function E(Te){var qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(Te)?qe:Te}function A(Te){return E(parseFloat(Te),0)}function Q(Te,qe){var Ie=(0,te.Z)({},Te);return(qe||[]).forEach(function(rt){if(!(rt instanceof HTMLBodyElement||rt instanceof HTMLHtmlElement)){var st=ae(rt).getComputedStyle(rt),z=st.overflow,oe=st.overflowClipMargin,Ae=st.borderTopWidth,ye=st.borderBottomWidth,Pe=st.borderLeftWidth,ze=st.borderRightWidth,Ve=rt.getBoundingClientRect(),Je=rt.offsetHeight,je=rt.clientHeight,Ke=rt.offsetWidth,_t=rt.clientWidth,xt=A(Ae),ht=A(ye),gt=A(Pe),Et=A(ze),pt=E(Math.round(Ve.width/Ke*1e3)/1e3),kt=E(Math.round(Ve.height/Je*1e3)/1e3),wt=(Ke-_t-gt-Et)*pt,_=(Je-je-xt-ht)*kt,T=xt*kt,We=ht*kt,O=gt*pt,ne=Et*pt,Kt=0,ue=0;if(z==="clip"){var Ee=A(oe);Kt=Ee*pt,ue=Ee*kt}var Oe=Ve.x+O-Kt,N=Ve.y+T-ue,Y=Oe+Ve.width+2*Kt-O-ne-wt,le=N+Ve.height+2*ue-T-We-_;Ie.left=Math.max(Ie.left,Oe),Ie.top=Math.max(Ie.top,N),Ie.right=Math.min(Ie.right,Y),Ie.bottom=Math.min(Ie.bottom,le)}}),Ie}function fe(Te){var qe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Ie="".concat(qe),rt=Ie.match(/^(.*)\%$/);return rt?Te*(parseFloat(rt[1])/100):parseFloat(Ie)}function $e(Te,qe){var Ie=qe||[],rt=(0,we.Z)(Ie,2),st=rt[0],z=rt[1];return[fe(Te.width,st),fe(Te.height,z)]}function Ze(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[Te[0],Te[1]]}function it(Te,qe){var Ie=qe[0],rt=qe[1],st,z;return Ie==="t"?z=Te.y:Ie==="b"?z=Te.y+Te.height:z=Te.y+Te.height/2,rt==="l"?st=Te.x:rt==="r"?st=Te.x+Te.width:st=Te.x+Te.width/2,{x:st,y:z}}function tt(Te,qe){var Ie={t:"b",b:"t",l:"r",r:"l"};return Te.map(function(rt,st){return st===qe?Ie[rt]||"c":rt}).join("")}function $t(Te,qe,Ie,rt,st,z,oe){var Ae=y.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:st[rt]||{}}),ye=(0,we.Z)(Ae,2),Pe=ye[0],ze=ye[1],Ve=y.useRef(0),Je=y.useMemo(function(){return qe?Z(qe):[]},[qe]),je=y.useRef({}),Ke=function(){je.current={}};Te||Ke();var _t=(0,H.Z)(function(){if(qe&&Ie&&Te){let en=function(Pn,zn){var ri=arguments.length>2&&arguments[2]!==void 0?arguments[2]:wn,$n=R.x+Pn,Pi=R.y+zn,Mi=$n+Tr,Hi=Pi+Mt,Ei=Math.max($n,ri.left),es=Math.max(Pi,ri.top),Fi=Math.min(Mi,ri.right),ts=Math.min(Hi,ri.bottom);return Math.max(0,(Fi-Ei)*(ts-es))},yr=function(){jt=R.y+mr,Pr=jt+Mt,Wn=R.x+hr,oi=Wn+Tr};var gt,Et,pt=qe,kt=pt.ownerDocument,wt=ae(pt),_=wt.getComputedStyle(pt),T=_.width,We=_.height,O=_.position,ne=pt.style.left,Kt=pt.style.top,ue=pt.style.right,Ee=pt.style.bottom,Oe=pt.style.overflow,N=(0,te.Z)((0,te.Z)({},st[rt]),z),Y=kt.createElement("div");(gt=pt.parentElement)===null||gt===void 0||gt.appendChild(Y),Y.style.left="".concat(pt.offsetLeft,"px"),Y.style.top="".concat(pt.offsetTop,"px"),Y.style.position=O,Y.style.height="".concat(pt.offsetHeight,"px"),Y.style.width="".concat(pt.offsetWidth,"px"),pt.style.left="0",pt.style.top="0",pt.style.right="auto",pt.style.bottom="auto",pt.style.overflow="hidden";var le;if(Array.isArray(Ie))le={x:Ie[0],y:Ie[1],width:0,height:0};else{var be=Ie.getBoundingClientRect();le={x:be.x,y:be.y,width:be.width,height:be.height}}var R=pt.getBoundingClientRect(),ft=kt.documentElement,se=ft.clientWidth,Tt=ft.clientHeight,Ct=ft.scrollWidth,Nt=ft.scrollHeight,br=ft.scrollTop,Ht=ft.scrollLeft,Mt=R.height,Tr=R.width,Br=le.height,Gr=le.width,zr={left:0,top:0,right:se,bottom:Tt},At={left:-Ht,top:-br,right:Ct-Ht,bottom:Nt-br},Wt=N.htmlRegion,pr="visible",Kr="visibleFirst";Wt!=="scroll"&&Wt!==Kr&&(Wt=pr);var Ir=Wt===Kr,tn=Q(At,Je),or=Q(zr,Je),wn=Wt===pr?or:tn,rn=Ir?or:wn;pt.style.left="auto",pt.style.top="auto",pt.style.right="0",pt.style.bottom="0";var Pt=pt.getBoundingClientRect();pt.style.left=ne,pt.style.top=Kt,pt.style.right=ue,pt.style.bottom=Ee,pt.style.overflow=Oe,(Et=pt.parentElement)===null||Et===void 0||Et.removeChild(Y);var bt=E(Math.round(Tr/parseFloat(T)*1e3)/1e3),qt=E(Math.round(Mt/parseFloat(We)*1e3)/1e3);if(bt===0||qt===0||(0,xe.Sh)(Ie)&&!(0,K.Z)(Ie))return;var xr=N.offset,gr=N.targetOffset,jr=$e(R,xr),Fn=(0,we.Z)(jr,2),Vr=Fn[0],Ar=Fn[1],Or=$e(le,gr),cr=(0,we.Z)(Or,2),nn=cr[0],fn=cr[1];le.x-=nn,le.y-=fn;var Hr=N.points||[],Qt=(0,we.Z)(Hr,2),lr=Qt[0],Sr=Qt[1],Cr=Ze(Sr),wr=Ze(lr),an=it(le,Cr),yi=it(R,wr),Ln=(0,te.Z)({},N),hr=an.x-yi.x+Vr,mr=an.y-yi.y+Ar,Bn=en(hr,mr),Qr=en(hr,mr,or),Hn=it(le,["t","l"]),bi=it(R,["t","l"]),Ci=it(le,["b","r"]),xi=it(R,["b","r"]),dn=N.overflow||{},ai=dn.adjustX,wi=dn.adjustY,Jn=dn.shiftX,ir=dn.shiftY,Le=function(zn){return typeof zn=="boolean"?zn:zn>=0},jt,Pr,Wn,oi;yr();var li=Le(wi),En=wr[0]===Cr[0];if(li&&wr[0]==="t"&&(Pr>rn.bottom||je.current.bt)){var vr=mr;En?vr-=Mt-Br:vr=Hn.y-xi.y-Ar;var Tn=en(hr,vr),In=en(hr,vr,or);Tn>Bn||Tn===Bn&&(!Ir||In>=Qr)?(je.current.bt=!0,mr=vr,Ar=-Ar,Ln.points=[tt(wr,0),tt(Cr,0)]):je.current.bt=!1}if(li&&wr[0]==="b"&&(jt<rn.top||je.current.tb)){var Yr=mr;En?Yr+=Mt-Br:Yr=Ci.y-bi.y-Ar;var pn=en(hr,Yr),$i=en(hr,Yr,or);pn>Bn||pn===Bn&&(!Ir||$i>=Qr)?(je.current.tb=!0,mr=Yr,Ar=-Ar,Ln.points=[tt(wr,0),tt(Cr,0)]):je.current.tb=!1}var jn=Le(ai),ei=wr[1]===Cr[1];if(jn&&wr[1]==="l"&&(oi>rn.right||je.current.rl)){var Lt=hr;ei?Lt-=Tr-Gr:Lt=Hn.x-xi.x-Vr;var Dn=en(Lt,mr),Jr=en(Lt,mr,or);Dn>Bn||Dn===Bn&&(!Ir||Jr>=Qr)?(je.current.rl=!0,hr=Lt,Vr=-Vr,Ln.points=[tt(wr,1),tt(Cr,1)]):je.current.rl=!1}if(jn&&wr[1]==="r"&&(Wn<rn.left||je.current.lr)){var mn=hr;ei?mn+=Tr-Gr:mn=Ci.x-bi.x-Vr;var Gi=en(mn,mr),ti=en(mn,mr,or);Gi>Bn||Gi===Bn&&(!Ir||ti>=Qr)?(je.current.lr=!0,hr=mn,Vr=-Vr,Ln.points=[tt(wr,1),tt(Cr,1)]):je.current.lr=!1}yr();var Vn=Jn===!0?0:Jn;typeof Vn=="number"&&(Wn<or.left&&(hr-=Wn-or.left-Vr,le.x+Gr<or.left+Vn&&(hr+=le.x-or.left+Gr-Vn)),oi>or.right&&(hr-=oi-or.right-Vr,le.x>or.right-Vn&&(hr+=le.x-or.right+Vn)));var Nn=ir===!0?0:ir;typeof Nn=="number"&&(jt<or.top&&(mr-=jt-or.top-Ar,le.y+Br<or.top+Nn&&(mr+=le.y-or.top+Br-Nn)),Pr>or.bottom&&(mr-=Pr-or.bottom-Ar,le.y>or.bottom-Nn&&(mr+=le.y-or.bottom+Nn)));var qr=R.x+hr,Un=qr+Tr,On=R.y+mr,Ri=On+Mt,gn=le.x,An=gn+Gr,ur=le.y,ui=ur+Br,Li=Math.max(qr,gn),Ii=Math.min(Un,An),_n=(Li+Ii)/2,ci=_n-qr,Ki=Math.max(On,ur),mt=Math.min(Ri,ui),vn=(Ki+mt)/2,Oi=vn-On;oe==null||oe(qe,Ln);var hi=Pt.right-R.x-(hr+R.width),cn=Pt.bottom-R.y-(mr+R.height);ze({ready:!0,offsetX:hr/bt,offsetY:mr/qt,offsetR:hi/bt,offsetB:cn/qt,arrowX:ci/bt,arrowY:Oi/qt,scaleX:bt,scaleY:qt,align:Ln})}}),xt=function(){Ve.current+=1;var Et=Ve.current;Promise.resolve().then(function(){Ve.current===Et&&_t()})},ht=function(){ze(function(Et){return(0,te.Z)((0,te.Z)({},Et),{},{ready:!1})})};return(0,x.Z)(ht,[rt]),(0,x.Z)(function(){Te||ht()},[Te]),[Pe.ready,Pe.offsetX,Pe.offsetY,Pe.offsetR,Pe.offsetB,Pe.arrowX,Pe.arrowY,Pe.scaleX,Pe.scaleY,Pe.align,xt]}var ut=J(19127);function nt(Te,qe,Ie,rt,st){(0,x.Z)(function(){if(Te&&qe&&Ie){let Ve=function(){rt(),st()};var z=qe,oe=Ie,Ae=Z(z),ye=Z(oe),Pe=ae(oe),ze=new Set([Pe].concat((0,ut.Z)(Ae),(0,ut.Z)(ye)));return ze.forEach(function(Je){Je.addEventListener("scroll",Ve,{passive:!0})}),Pe.addEventListener("resize",Ve,{passive:!0}),rt(),function(){ze.forEach(function(Je){Je.removeEventListener("scroll",Ve),Pe.removeEventListener("resize",Ve)})}}},[Te,qe,Ie])}var tr=J(48736),sr=J(16089);function _r(Te,qe,Ie,rt,st,z,oe,Ae){var ye=y.useRef(Te),Pe=y.useRef(!1);ye.current!==Te&&(Pe.current=!0,ye.current=Te),y.useEffect(function(){var ze=(0,sr.Z)(function(){Pe.current=!1});return function(){sr.Z.cancel(ze)}},[Te]),y.useEffect(function(){if(qe&&rt&&(!st||z)){var ze=function(){var O=!1,ne=function(Ee){var Oe=Ee.target;O=oe(Oe)},Kt=function(Ee){var Oe=Ee.target;!Pe.current&&ye.current&&!O&&!oe(Oe)&&Ae(!1)};return[ne,Kt]},Ve=ze(),Je=(0,we.Z)(Ve,2),je=Je[0],Ke=Je[1],_t=ze(),xt=(0,we.Z)(_t,2),ht=xt[0],gt=xt[1],Et=ae(rt);Et.addEventListener("mousedown",je,!0),Et.addEventListener("click",Ke,!0),Et.addEventListener("contextmenu",Ke,!0);var pt=(0,l.A)(Ie);if(pt&&(pt.addEventListener("mousedown",ht,!0),pt.addEventListener("click",gt,!0),pt.addEventListener("contextmenu",gt,!0)),0)var kt,wt,_,T;return function(){Et.removeEventListener("mousedown",je,!0),Et.removeEventListener("click",Ke,!0),Et.removeEventListener("contextmenu",Ke,!0),pt&&(pt.removeEventListener("mousedown",ht,!0),pt.removeEventListener("click",gt,!0),pt.removeEventListener("contextmenu",gt,!0))}}},[qe,Ie,rt,st,z])}var ar=["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 Yt(){var Te=arguments.length>0&&arguments[0]!==void 0?arguments[0]:De.Z,qe=y.forwardRef(function(Ie,rt){var st=Ie.prefixCls,z=st===void 0?"rc-trigger-popup":st,oe=Ie.children,Ae=Ie.action,ye=Ae===void 0?"hover":Ae,Pe=Ie.showAction,ze=Ie.hideAction,Ve=Ie.popupVisible,Je=Ie.defaultPopupVisible,je=Ie.onPopupVisibleChange,Ke=Ie.afterPopupVisibleChange,_t=Ie.mouseEnterDelay,xt=Ie.mouseLeaveDelay,ht=xt===void 0?.1:xt,gt=Ie.focusDelay,Et=Ie.blurDelay,pt=Ie.mask,kt=Ie.maskClosable,wt=kt===void 0?!0:kt,_=Ie.getPopupContainer,T=Ie.forceRender,We=Ie.autoDestroy,O=Ie.destroyPopupOnHide,ne=Ie.popup,Kt=Ie.popupClassName,ue=Ie.popupStyle,Ee=Ie.popupPlacement,Oe=Ie.builtinPlacements,N=Oe===void 0?{}:Oe,Y=Ie.popupAlign,le=Ie.zIndex,be=Ie.stretch,R=Ie.getPopupClassNameFromAlign,ft=Ie.fresh,se=Ie.alignPoint,Tt=Ie.onPopupClick,Ct=Ie.onPopupAlign,Nt=Ie.arrow,br=Ie.popupMotion,Ht=Ie.maskMotion,Mt=Ie.popupTransitionName,Tr=Ie.popupAnimation,Br=Ie.maskTransitionName,Gr=Ie.maskAnimation,zr=Ie.className,At=Ie.getTriggerDOMNode,Wt=(0,Me.Z)(Ie,ar),pr=We||O||!1,Kr=y.useState(!1),Ir=(0,we.Z)(Kr,2),tn=Ir[0],or=Ir[1];(0,x.Z)(function(){or((0,d.Z)())},[]);var wn=y.useRef({}),rn=y.useContext(ke),Pt=y.useMemo(function(){return{registerSubPopup:function(Dt,fr){wn.current[Dt]=fr,rn==null||rn.registerSubPopup(Dt,fr)}}},[rn]),bt=(0,P.Z)(),qt=y.useState(null),xr=(0,we.Z)(qt,2),gr=xr[0],jr=xr[1],Fn=(0,H.Z)(function(zt){(0,xe.Sh)(zt)&&gr!==zt&&jr(zt),rn==null||rn.registerSubPopup(bt,zt)}),Vr=y.useState(null),Ar=(0,we.Z)(Vr,2),Or=Ar[0],cr=Ar[1],nn=y.useRef(null),fn=(0,H.Z)(function(zt){(0,xe.Sh)(zt)&&Or!==zt&&(cr(zt),nn.current=zt)}),Hr=y.Children.only(oe),Qt=(Hr==null?void 0:Hr.props)||{},lr={},Sr=(0,H.Z)(function(zt){var Dt,fr,Zr=Or;return(Zr==null?void 0:Zr.contains(zt))||((Dt=(0,l.A)(Zr))===null||Dt===void 0?void 0:Dt.host)===zt||zt===Zr||(gr==null?void 0:gr.contains(zt))||((fr=(0,l.A)(gr))===null||fr===void 0?void 0:fr.host)===zt||zt===gr||Object.values(wn.current).some(function(Nr){return(Nr==null?void 0:Nr.contains(zt))||zt===Nr})}),Cr=q(z,br,Tr,Mt),wr=q(z,Ht,Gr,Br),an=y.useState(Je||!1),yi=(0,we.Z)(an,2),Ln=yi[0],hr=yi[1],mr=Ve!=null?Ve:Ln,Bn=(0,H.Z)(function(zt){Ve===void 0&&hr(zt)});(0,x.Z)(function(){hr(Ve||!1)},[Ve]);var Qr=y.useRef(mr);Qr.current=mr;var Hn=y.useRef([]);Hn.current=[];var bi=(0,H.Z)(function(zt){var Dt;Bn(zt),((Dt=Hn.current[Hn.current.length-1])!==null&&Dt!==void 0?Dt:mr)!==zt&&(Hn.current.push(zt),je==null||je(zt))}),Ci=y.useRef(),xi=function(){clearTimeout(Ci.current)},dn=function(Dt){var fr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;xi(),fr===0?bi(Dt):Ci.current=setTimeout(function(){bi(Dt)},fr*1e3)};y.useEffect(function(){return xi},[]);var ai=y.useState(!1),wi=(0,we.Z)(ai,2),Jn=wi[0],ir=wi[1];(0,x.Z)(function(zt){(!zt||mr)&&ir(!0)},[mr]);var Le=y.useState(null),jt=(0,we.Z)(Le,2),Pr=jt[0],Wn=jt[1],oi=y.useState([0,0]),li=(0,we.Z)(oi,2),En=li[0],vr=li[1],Tn=function(Dt){vr([Dt.clientX,Dt.clientY])},In=$t(mr,gr,se?En:Or,Ee,N,Y,Ct),Yr=(0,we.Z)(In,11),pn=Yr[0],$i=Yr[1],jn=Yr[2],ei=Yr[3],Lt=Yr[4],Dn=Yr[5],Jr=Yr[6],mn=Yr[7],Gi=Yr[8],ti=Yr[9],Vn=Yr[10],Nn=Ce(tn,ye,Pe,ze),qr=(0,we.Z)(Nn,2),Un=qr[0],On=qr[1],Ri=Un.has("click"),gn=On.has("click")||On.has("contextMenu"),An=(0,H.Z)(function(){Jn||Vn()}),ur=function(){Qr.current&&se&&gn&&dn(!1)};nt(mr,Or,gr,An,ur),(0,x.Z)(function(){An()},[En,Ee]),(0,x.Z)(function(){mr&&!(N!=null&&N[Ee])&&An()},[JSON.stringify(Y)]);var ui=y.useMemo(function(){var zt=$(N,z,ti,se);return de()(zt,R==null?void 0:R(ti))},[ti,R,N,z,se]);y.useImperativeHandle(rt,function(){return{nativeElement:nn.current,forceAlign:An}});var Li=y.useState(0),Ii=(0,we.Z)(Li,2),_n=Ii[0],ci=Ii[1],Ki=y.useState(0),mt=(0,we.Z)(Ki,2),vn=mt[0],Oi=mt[1],hi=function(){if(be&&Or){var Dt=Or.getBoundingClientRect();ci(Dt.width),Oi(Dt.height)}},cn=function(){hi(),An()},en=function(Dt){ir(!1),Vn(),Ke==null||Ke(Dt)},yr=function(){return new Promise(function(Dt){hi(),Wn(function(){return Dt})})};(0,x.Z)(function(){Pr&&(Vn(),Pr(),Wn(null))},[Pr]);function Pn(zt,Dt,fr,Zr){lr[zt]=function(Nr){var kn;Zr==null||Zr(Nr),dn(Dt,fr);for(var Wi=arguments.length,ji=new Array(Wi>1?Wi-1:0),Yn=1;Yn<Wi;Yn++)ji[Yn-1]=arguments[Yn];(kn=Qt[zt])===null||kn===void 0||kn.call.apply(kn,[Qt,Nr].concat(ji))}}(Ri||gn)&&(lr.onClick=function(zt){var Dt;Qr.current&&gn?dn(!1):!Qr.current&&Ri&&(Tn(zt),dn(!0));for(var fr=arguments.length,Zr=new Array(fr>1?fr-1:0),Nr=1;Nr<fr;Nr++)Zr[Nr-1]=arguments[Nr];(Dt=Qt.onClick)===null||Dt===void 0||Dt.call.apply(Dt,[Qt,zt].concat(Zr))}),_r(mr,gn,Or,gr,pt,wt,Sr,dn);var zn=Un.has("hover"),ri=On.has("hover"),$n,Pi;zn&&(Pn("onMouseEnter",!0,_t,function(zt){Tn(zt)}),Pn("onPointerEnter",!0,_t,function(zt){Tn(zt)}),$n=function(Dt){(mr||Jn)&&gr!==null&&gr!==void 0&&gr.contains(Dt.target)&&dn(!0,_t)},se&&(lr.onMouseMove=function(zt){var Dt;(Dt=Qt.onMouseMove)===null||Dt===void 0||Dt.call(Qt,zt)})),ri&&(Pn("onMouseLeave",!1,ht),Pn("onPointerLeave",!1,ht),Pi=function(){dn(!1,ht)}),Un.has("focus")&&Pn("onFocus",!0,gt),On.has("focus")&&Pn("onBlur",!1,Et),Un.has("contextMenu")&&(lr.onContextMenu=function(zt){var Dt;Qr.current&&On.has("contextMenu")?dn(!1):(Tn(zt),dn(!0)),zt.preventDefault();for(var fr=arguments.length,Zr=new Array(fr>1?fr-1:0),Nr=1;Nr<fr;Nr++)Zr[Nr-1]=arguments[Nr];(Dt=Qt.onContextMenu)===null||Dt===void 0||Dt.call.apply(Dt,[Qt,zt].concat(Zr))}),zr&&(lr.className=de()(Qt.className,zr));var Mi=(0,te.Z)((0,te.Z)({},Qt),lr),Hi={},Ei=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Ei.forEach(function(zt){Wt[zt]&&(Hi[zt]=function(){for(var Dt,fr=arguments.length,Zr=new Array(fr),Nr=0;Nr<fr;Nr++)Zr[Nr]=arguments[Nr];(Dt=Mi[zt])===null||Dt===void 0||Dt.call.apply(Dt,[Mi].concat(Zr)),Wt[zt].apply(Wt,Zr)})});var es=y.cloneElement(Hr,(0,te.Z)((0,te.Z)({},Mi),Hi)),Fi={x:Dn,y:Jr},ts=Nt?(0,te.Z)({},Nt!==!0?Nt:{}):null;return y.createElement(y.Fragment,null,y.createElement(Se.Z,{disabled:!mr,ref:fn,onResize:cn},y.createElement(ce,{getTriggerDOMNode:At},es)),y.createElement(ke.Provider,{value:Pt},y.createElement(_e,{portal:Te,ref:Fn,prefixCls:z,popup:ne,className:de()(Kt,ui),style:ue,target:Or,onMouseEnter:$n,onMouseLeave:Pi,onPointerEnter:$n,zIndex:le,open:mr,keepDom:Jn,fresh:ft,onClick:Tt,mask:pt,motion:Cr,maskMotion:wr,onVisibleChanged:en,onPrepare:yr,forceRender:T,autoDestroy:pr,getPopupContainer:_,align:ti,arrow:ts,arrowPos:Fi,ready:pn,offsetX:$i,offsetY:jn,offsetR:ei,offsetB:Lt,onAlign:An,stretch:be,targetWidth:_n/mn,targetHeight:vn/Gi})))});return qe}var It=Yt(De.Z)},50304:function(){"use strict"},52336:function(){"use strict"},48922:function(){"use strict"},8797:function(Ot,Xe,J){"use strict";var te=J(59301),we=J(93314),Me=J(3113),De=Object.defineProperty,Fe=Object.defineProperties,de=Object.getOwnPropertyDescriptors,Se=Object.getOwnPropertySymbols,xe=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,H=(y,v,U)=>v in y?De(y,v,{enumerable:!0,configurable:!0,writable:!0,value:U}):y[v]=U,P=(y,v)=>{for(var U in v||(v={}))xe.call(v,U)&&H(y,U,v[U]);if(Se)for(var U of Se(v))l.call(v,U)&&H(y,U,v[U]);return y},x=(y,v)=>Fe(y,de(v));const d=({img:y,buttonProps:v={},styles:U={},customText:W,ButtonText:I,ButtonClick:L,Buttonclass:V,ButtonTwo:re,imgStyles:C,loading:_e=!1})=>te.createElement("section",{className:"tc animated fadeIn",style:P(P({},{color:"#999",margin:"100px auto",visibility:_e?"hidden":"visible"}),U)},te.createElement("img",{src:y||we,style:x(P({},C),{pointerEvents:"none",userSelect:"none"})}),te.createElement("p",{className:"mt20 font14"},W||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),I&&te.createElement(Me.ZP,P({className:V,onClick:L},v),I),re&&re);Xe.Z=d},23210:function(Ot,Xe,J){"use strict";J.d(Xe,{Z:function(){return V}});var te=J(59301),we={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Me=J(3113),De=J(70557),Fe=J(23954),de=J(6848),Se=J(955),xe=J(94941),l=J(8797),H=J(3294),P=J(19381),x=J(59301),d=Object.defineProperty,y=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable,W=(re,C,_e)=>C in re?d(re,C,{enumerable:!0,configurable:!0,writable:!0,value:_e}):re[C]=_e,I=(re,C)=>{for(var _e in C||(C={}))v.call(C,_e)&&W(re,_e,C[_e]);if(y)for(var _e of y(C))U.call(C,_e)&&W(re,_e,C[_e]);return re},L=(re,C,_e)=>new Promise((pe,ce)=>{var ge=Ce=>{try{ve(_e.next(Ce))}catch(K){ce(K)}},ke=Ce=>{try{ve(_e.throw(Ce))}catch(K){ce(K)}},ve=Ce=>Ce.done?pe(Ce.value):Promise.resolve(Ce.value).then(ge,ke);ve((_e=_e.apply(re,C)).next())}),V=({editOffice:re="view",data:C,theme:_e,type:pe,filename:ce,monacoEditor:ge,className:ke,style:ve,close:Ce,onClose:K,hasMask:F,disabledDownload:$,onImgDimensions:q,showNodata:ae,recordInfo:Z})=>{const[E,A]=(0,te.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[Q,fe]=(0,te.useState)(""),[$e,Ze]=(0,te.useState)(),it=window.ENV==="build"?"/react/build":"",tt=location.host.startsWith("localhost")?H.Z.PROXY_SERVER:H.Z.API_SERVER,ut=10*(1024*1024),nt=(0,te.useRef)();C!=null&&C.startsWith("/api")&&pe!=="txt"&&(C=H.Z.API_SERVER+C);const tr=Yt=>Yt.substring(Yt.lastIndexOf("/")+1).split(".").pop();ce&&ge&&(ge.filename=ce),(0,te.useEffect)(()=>{var Yt,It;const Te=(It=(Yt=document.cookie)==null?void 0:Yt.replace(/\s/g,""))==null?void 0:It.split(";");Te==null||Te.map(qe=>{let Ie=qe.split("=");Ie[0]==="_educoder_session"&&fe(Ie[1])})},[]),(0,te.useEffect)(()=>{pe==="office"&&(C.indexOf("bigfilescdn.")>-1||C.indexOf("bigfiles1")>-1?Ze({url:C,fileType:tr(C),model:C.indexOf("model=edit")?"edit":"view"}):sr())},[pe,C]);const sr=()=>L(void 0,null,function*(){console.log("data:",C);let Yt=C;C.startsWith("http")||(Yt=location.origin+Yt);let It=new URL(Yt).pathname.split("/").pop();const Te=yield(0,xe.gJ)({attachment_id:It});Te.url=tt+Te.url,Ze(Te)}),_r=()=>{if(C.startsWith("http")||C.startsWith("blob:")){ar();return}(0,Se.Sv)(ce||"educoder",C,ce)},ar=()=>{Z&&(0,P.fc)({id:Z==null?void 0:Z.id,watch_type:1,course_id:Z==null?void 0:Z.course_id}),(0,Se.Nd)(ce||"educoder",decodeURIComponent(C))};return x.createElement("div",{style:I({},ve||{}),className:`${F&&we.bgBlack} ${pe?we.wrp:"hide"}`},Ce&&x.createElement("div",{className:we.close,ref:nt},!!q&&x.createElement(de.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>nt.current},x.createElement("span",{onClick:()=>{K(),q()}},x.createElement("i",{className:"icon-yulanpizhu"}))),!$&&x.createElement(de.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>nt.current},x.createElement("span",{onClick:ar},x.createElement("i",{className:"icon-quxiaozhiding"}))),x.createElement(de.Z,{title:"\u5173\u95ED",getPopupContainer:()=>nt.current},x.createElement("span",{className:"",onClick:K},x.createElement("i",{className:"icon-guanbi1"})))),x.createElement("div",{className:`${we[ke]} ${ke} ${we.monaco} ${pe==="txt"?"show":"hide"}`},pe==="txt"&&x.createElement(x.Fragment,null,x.createElement(Fe.ZP,I({},ge)))),pe==="audio"&&x.createElement("audio",{src:`${(C==null?void 0:C.indexOf("http://"))>-1||(C==null?void 0:C.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${C}`,autoPlay:!0}),pe==="video"&&x.createElement(x.Fragment,null,(C==null?void 0:C.indexOf("http"))>-1?x.createElement("video",{controls:!0,src:`${C}`,autoPlay:!0}):x.createElement("video",{controls:!0,src:`data:video/mp4;base64,${C}`,autoPlay:!0})),pe==="office"&&$e&&x.createElement("iframe",{src:`${it}/office.html?key=${$e.key}&url=${btoa($e.url)}&callbackUrl=${tt+($e.callbackUrl||"")}&fileType=${$e.fileType}&title=${$e.title||""}&model=${re}&officeServer=${H.Z.ONLYOFFICE}&disabledDownload=${!!$}`}),pe==="html"&&x.createElement("iframe",{src:C+"&disposition=inline"}),pe==="pdf"&&x.createElement("iframe",{src:`${it}/js/pdfview/index.html?filename=${ce||"educoder.pdf"}&url=${encodeURIComponent(C)}&disabledDownload=${!!$}`}),pe==="image"&&x.createElement("img",{src:`${(C==null?void 0:C.indexOf("http://"))>-1||(C==null?void 0:C.indexOf("https://"))>-1?"":"data:image/png;base64,"}${C}`}),(pe==="other"||pe==="download")&&x.createElement(x.Fragment,null,ae?x.createElement(l.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:x.createElement(Me.ZP,{icon:x.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:_r,disabled:$},"\u4E0B\u8F7D")}):x.createElement(Me.ZP,{type:"primary",size:"middle",onClick:_r,disabled:$},x.createElement(De.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},85149:function(Ot,Xe,J){"use strict";J.d(Xe,{z:function(){return pe},Z:function(){return ce}});var te=J(59301),we=J(50304),Me=J(24768),De=J(64018),Fe=J(40846),de=J(3294),Se=J(955),xe=J(15342),l=J(1012),H=J(23210),P=J(59301),d=({html:ge})=>{const ke=(0,te.useRef)(null),ve=(0,te.useRef)(null),Ce=`.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,te.useEffect)(()=>{const K=ke.current.attachShadow({mode:"open"});ve.current=document.createElement("div"),ve.current.className="markdown-body",ve.current.innerHTML=ge,K.appendChild(ve.current);const F=document.createElement("style");return F.textContent=Ce,K.appendChild(F),()=>{K.innerHTML=""}},[]),(0,te.useEffect)(()=>{ve.current&&(ve.current.innerHTML=ge)},[ge]),P.createElement("div",{ref:ke})},y=Object.defineProperty,v=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,W=Object.prototype.propertyIsEnumerable,I=(ge,ke,ve)=>ke in ge?y(ge,ke,{enumerable:!0,configurable:!0,writable:!0,value:ve}):ge[ke]=ve,L=(ge,ke)=>{for(var ve in ke||(ke={}))U.call(ke,ve)&&I(ge,ve,ke[ve]);if(v)for(var ve of v(ke))W.call(ke,ve)&&I(ge,ve,ke[ve]);return ge};const V="@\u2581\u2581@",re="@\u2581@",C=/<pre[^>]*>/g;function _e(ge){let ke=document.createElement("div");return ke.innerHTML=ge,ke.childNodes.length===0?"":ke.childNodes[0].nodeValue}const pe=(ge,ke)=>{ge=ge||"";const ve=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ce=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,K=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,F=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return ke?ge.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(ve,($,q,ae,Z,E,A,Q)=>{const fe=q||Z||A,$e=ae||E||Q||"?";return de.Z.API_SERVER+"/api/attachments/"+fe+$e+"&t="+(0,Se.Jn)(fe,Date.now())+($.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(ge=ge.replace(F,($,q,ae,Z,E,A,Q)=>{const fe=q||Z||A,$e=ae||E||Q||"?";return de.Z.API_SERVER+"/attachments/download/"+fe+$e+"&t="+(0,Se.Jn)(fe,Date.now())+($.indexOf(")")>-1?")":"&")}).replace(ve,($,q,ae,Z,E,A,Q)=>{const fe=q||Z||A,$e=ae||E||Q||"?";return de.Z.API_SERVER+"/api/attachments/"+fe+$e+"&t="+(0,Se.Jn)(fe,Date.now())+($.indexOf(")")>-1?")":"&")}).replace(Ce,($,q,ae,Z,E)=>{const A=q||Z,Q=ae||E||"";return'"'+de.Z.API_SERVER+"/api/attachments/"+A+Q+A+Q+"&t="+(0,Se.Jn)(A,Date.now())}).replace(K,($,q,ae,Z,E)=>{const A=q||Z,Q=ae||E||"";return"("+de.Z.API_SERVER+"/files/uploads/"+A+Q+A+Q+"&t="+(0,Se.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,`
`),ge)};var ce=({value:ge="",className:ke,showTextOnly:ve,showLines:Ce,style:K={},stylesPrev:F={},highlightKeywords:$,showProgramFill:q,isProgramFill:ae,disabledFill:Z=!1,programFillValue:E,onFillChange:A=$e=>{},onFillBlur:Q=()=>{},onFillFocus:fe=()=>{}})=>{let $e=String(ge);const[Ze,it]=(0,te.useState)(""),[tt,$t]=(0,te.useState)("office"),[ut,nt]=(0,te.useState)([]),tr=(0,te.useRef)("a"+(0,l.Z)()),sr={},_r=(ye,Pe,ze)=>{const Ve=document.createElement(ye===re?"input":"textarea");Ve.style.width="100%",Ve.style.height=ye===re?"40px":"151px",Ve.rows=5,Ve.spellcheck=!1,Ve.name="edu-program-fill",Ve.placeholder="\u8BF7\u8F93\u5165",Ve.dataset.id=Pe;const Je=Object.keys(sr).length;return sr[Je]=Ve,`<span class="edu-program-fill-wrap ${ye===re?"":"show"}" style="width:${ye===re?"400px":"100%"}" title=${ze||""}><span>${Ve.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function ar(ye){return ye=ye.replace(/!\[.*?\]\(.*?\)/g,""),ye=ye.replace(/\[.*?\]\(.*?\)/g,""),ye=ye.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),ye=ye.replace(/<embed.*?>/g,""),ye=ye.replace(/<img.*?>/g,""),ye=ye.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),ye=ye.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),ye=ye.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),ye=ye.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),ye}const Yt=ye=>ye.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Pe,ze){let Ve=ze.replace(/(\n|\r)/g,"").split("}"),Je=[];return Ve.map(je=>{je!=""&&Je.push(`.${tr.current} ${je}`)}),`<style>${Je.join("}")}</style>`}),It=(0,te.useMemo)(()=>{try{const Ve=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Je=/\"\/api\/attachments\/|\"\/attachments\/download\//g,je=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Ke=/\(\/attachments\/download\//g;$e=$e.replace(Ke,"("+de.Z.API_SERVER+"/attachments/download/").replace(Ve,"("+de.Z.API_SERVER+"/api/attachments/").replace(Je,'"'+de.Z.API_SERVER+"/api/attachments/").replace(je,'"'+de.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(Ve){}if(q){let Ve=-1;return $e=$e.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,function(Je,je,Ke){var _t;return++Ve,_r(Je,Ve,(_t=E==null?void 0:E[Ve])==null?void 0:_t.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))}),`<pre style="background:#fff;padding:4px">${Yt($e||"")}</pre>`}let ye=Yt($e);ye=(0,Me.ZP)(ye);const Pe=(0,Me.ez)();$e.match(/\[TOC\]/)&&(ye=ye.replace("<p>[TOC]</p>",(0,Me.Qv)()),(0,Me.Iy)()),ye=ye.replace(/(__special_katext_id_\d+__)/g,(Ve,Je)=>{const{type:je,expression:Ke}=Pe[Je];return(0,xe.renderToString)(_e(Ke)||"",{displayMode:je==="block",throwOnError:!1,output:"html"})}),ye=ye.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Me.AL)();const ze=document.createElement("div");if(ze.innerHTML=ye,ve)return ze.innerText;if($){const Ve=$.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return rt(ze,Ve),ze.innerHTML}return setTimeout(()=>oe(),500),ze.innerHTML},[$e,$]);(0,te.useEffect)(()=>{st.current&&st.current.querySelectorAll(["input","textarea"]).forEach(Pe=>{Pe.oninput=Te,Pe.onblur=qe,Pe.onfocus=Ie})},[ut]),(0,te.useEffect)(()=>{var ye,Pe,ze,Ve,Je;if(E!=null&&E.length)try{const je=st.current.querySelectorAll(".edu-program-fill-score"),Ke=st.current.querySelectorAll('[name="edu-program-fill"]');for(const[_t,xt]of Ke.entries())xt.value=((ye=E==null?void 0:E[_t])==null?void 0:ye.value)||"",((Pe=E==null?void 0:E[_t])==null?void 0:Pe.type)==="warning"?xt.className="program-fill-warning":((ze=E==null?void 0:E[_t])==null?void 0:ze.type)==="success"?xt.className="program-fill-success":xt.className="";for(const[_t,xt]of je.entries())xt.innerHTML=(Ve=E==null?void 0:E[_t])!=null&&Ve.score?`${(Je=E==null?void 0:E[_t])==null?void 0:Je.score}\u5206`:"";nt(E)}catch(je){console.log(je,"error")}},[E]);const Te=ye=>{ut[ye.target.dataset.id]=ut[ye.target.dataset.id]||{},ut[ye.target.dataset.id].value=ye.target.value,nt([...ut]),A(ut,ye.target.dataset.id)},qe=ye=>{ut[ye.target.dataset.id]=ut[ye.target.dataset.id]||{},ut[ye.target.dataset.id].value=ye.target.value,nt([...ut]),Q(ut,ye.target.dataset.id)},Ie=ye=>{ut[ye.target.dataset.id]=ut[ye.target.dataset.id]||{},ut[ye.target.dataset.id].value=ye.target.value,nt([...ut]),fe(ut,ye.target.dataset.id)};function rt(ye,Pe){return ye.childNodes.forEach(ze=>{var Ve;if(ze.childNodes.length>0)rt(ze,Pe);else if(ze.nodeName!=="IMG")if(ze.innerHTML)ze.innerHTML=(Ve=ze.innerHTML)==null?void 0:Ve.replace(new RegExp(Pe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Je=document.createElement("span");Je.innerHTML=ze.textContent.replace(new RegExp(Pe,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),ze.replaceWith(Je)}})}const st=(0,te.useRef)();Me.jb.WebkitLineClamp=Ce,Ce&&(K=L(L({},K),Me.jb));function z(ye){let Pe=ye.target;if(Pe.tagName.toUpperCase()==="A"){let ze=Pe.getAttribute("href");if(ze.indexOf("office")>-1)ye.preventDefault(),it(ze),$t("office");else if(ze.indexOf("application/pdf")>-1)ye.preventDefault(),it(ze),$t("pdf");else if(ze.indexOf("text/html")>-1)ye.preventDefault(),it(ze),$t("html");else if(ze.startsWith("#")){ye.preventDefault();let Ve=document.getElementById(ze.replace("#",""));Ve&&Ve.scrollIntoView(!0)}}}const oe=()=>{var ye;const Pe=(ye=st.current)==null?void 0:ye.querySelectorAll("video");Pe==null||Pe.forEach(ze=>{if(ze.oncontextmenu=()=>!1,ze.src.indexOf(".m3u8")>-1&&!ze.canPlayType("application/vnd.apple.mpegurl")){if(Fe.ZP.isSupported()){var Ve=new Fe.ZP;Ve.loadSource(ze.src),Ve.attachMedia(ze)}}})};(0,te.useEffect)(()=>{if(st.current&&It&&It.match(C)&&window.PR.prettyPrint(),st.current)return st.current.addEventListener("click",z),()=>{var ye;(ye=st.current)==null||ye.removeEventListener("click",z),(0,Me.AL)(),(0,Me.Iy)()}},[It,st.current,z]),(0,te.useEffect)(()=>{var ye;const Pe=ze=>{ze.preventDefault(),ze.clipboardData.setData("text",window.getSelection().toString())};return(ye=st.current)==null||ye.addEventListener("copy",Pe),()=>{var ze;(ze=st.current)==null||ze.removeEventListener("copy",Pe)}},[st.current]);const Ae=ye=>/<style[\s\S]*?>/i.test(ye||"");return te.createElement(te.Fragment,null,ve&&te.createElement("div",{ref:st},It),!ve&&!Ae(It)&&te.createElement("div",{ref:st,style:L({},K),className:`${ke||""} ${Z?"disabled-fill":""} markdown-body ${tr.current}`,dangerouslySetInnerHTML:{__html:It}}),!ve&&Ae(It)&&te.createElement(d,{html:It}),te.createElement(H.Z,{close:!0,data:Ze,type:Ze!=null&&Ze.length?tt:"",style:L({},F),onClose:()=>it("")}))}},23954:function(Ot,Xe,J){"use strict";J.d(Xe,{SV:function(){return st},ZP:function(){return rt}});var te=J(59301),we=J(76374);const Me={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"]},De={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"]},Fe={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(`
`)}]},de={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(`
`)}]},Se={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 xe=J(53184),l=J.n(xe),H=Object.defineProperty,P=Object.defineProperties,x=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,v=Object.prototype.propertyIsEnumerable,U=(z,oe,Ae)=>oe in z?H(z,oe,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):z[oe]=Ae,W=(z,oe)=>{for(var Ae in oe||(oe={}))y.call(oe,Ae)&&U(z,Ae,oe[Ae]);if(d)for(var Ae of d(oe))v.call(oe,Ae)&&U(z,Ae,oe[Ae]);return z},I=(z,oe)=>P(z,x(oe)),L=(z,oe,Ae)=>new Promise((ye,Pe)=>{var ze=je=>{try{Je(Ae.next(je))}catch(Ke){Pe(Ke)}},Ve=je=>{try{Je(Ae.throw(je))}catch(Ke){Pe(Ke)}},Je=je=>je.done?ye(je.value):Promise.resolve(je.value).then(ze,Ve);Je((Ae=Ae.apply(z,oe)).next())});const V={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"]}},re=(z,oe)=>oe.map(Ae=>({label:Ae,kind:z.languages.CompletionItemKind.Keyword,insertText:Ae})),C=z=>Object.keys(V.tables).map(oe=>({label:oe,kind:z.languages.CompletionItemKind.Variable,insertText:oe})),_e=(z,oe)=>{const Ae=V.tables[z];return Ae?Ae.map(ye=>({label:ye,kind:oe.languages.CompletionItemKind.Field,insertText:ye})):[]};function pe(z,oe,Ae,ye,Pe){let ze=oe.getWordUntilPosition(Ae),Ve={startLineNumber:Ae.lineNumber,endLineNumber:Ae.lineNumber,startColumn:ze.startColumn,endColumn:ze.endColumn},Je=ye.map(je=>({label:je,kind:z.languages.CompletionItemKind.Keyword,insertText:je,insertTextRules:z.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ve}));return Pe.map(je=>{Je.push(I(W({},je),{range:Ve}))}),Je}var ce=z=>{V.languages.map(Pe=>(z.languages.registerDocumentFormattingEditProvider(Pe,{provideDocumentFormattingEdits(ze,Ve,Je){return L(this,null,function*(){const je=l()(ze.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:ze.getFullModelRange(),text:je}]})}}),Pe));const oe=Fe.quickKey.map(Pe=>({label:Pe.label,kind:z.languages.CompletionItemKind.Method,insertText:Pe.content,insertTextRules:z.languages.CompletionItemInsertTextRule.InsertAsSnippet})),Ae=de.quickKey.map(Pe=>({label:Pe.label,kind:z.languages.CompletionItemKind.Method,insertText:Pe.content,insertTextRules:z.languages.CompletionItemInsertTextRule.InsertAsSnippet})),ye=De.quickKey.map(Pe=>({label:Pe.label,kind:z.languages.CompletionItemKind.Method,insertText:Pe.content,insertTextRules:z.languages.CompletionItemInsertTextRule.InsertAsSnippet}));z.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Pe,ze){var Ve=Pe.getWordUntilPosition(ze),Je={startLineNumber:ze.lineNumber,endLineNumber:ze.lineNumber,startColumn:Ve.startColumn,endColumn:Ve.endColumn},je=Pe.getLineContent(ze.lineNumber).substring(Ve.startColumn-2,Ve.endColumn);return{suggestions:[...Fe.keywords.map(Ke=>({label:Ke,kind:z.languages.CompletionItemKind.Function,documentation:Ke,insertText:Ke,insertTextRules:z.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Je})),...Fe.quickKey.map(Ke=>({label:Ke.label,kind:z.languages.CompletionItemKind.Function,documentation:Ke.content,insertText:je.startsWith("#")?Ke.content.replace(/#/,""):Ke.content,insertTextRules:z.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Je}))]}}}),z.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Pe,ze){var Ve=Pe.getWordUntilPosition(ze),Je={startLineNumber:ze.lineNumber,endLineNumber:ze.lineNumber,startColumn:Ve.startColumn,endColumn:Ve.endColumn};return{suggestions:[...Me.keywords.map(je=>({label:je,kind:z.languages.CompletionItemKind.Function,documentation:je,insertText:je,insertTextRules:z.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Je}))]}}}),z.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Pe,ze){var Ve=Pe.getWordUntilPosition(ze),Je={startLineNumber:ze.lineNumber,endLineNumber:ze.lineNumber,startColumn:Ve.startColumn,endColumn:Ve.endColumn},je=Pe.getLineContent(ze.lineNumber).substring(Ve.startColumn-2,Ve.endColumn);return{suggestions:[...De.keywords.map(Ke=>({label:Ke,kind:z.languages.CompletionItemKind.Function,documentation:Ke,insertText:Ke,insertTextRules:z.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Je})),...De.quickKey.map(Ke=>({label:Ke.label,kind:z.languages.CompletionItemKind.Function,documentation:Ke.content,insertText:je.startsWith("#")?Ke.content.replace(/#/,""):Ke.content,insertTextRules:z.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Je}))]}}}),z.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Pe,ze){var Ve=Pe.getWordUntilPosition(ze),Je={startLineNumber:ze.lineNumber,endLineNumber:ze.lineNumber,startColumn:Ve.startColumn,endColumn:Ve.endColumn},je=Pe.getLineContent(ze.lineNumber).substring(Ve.startColumn-2,Ve.endColumn);return{suggestions:[...Se.keywords.map(Ke=>({label:Ke,kind:z.languages.CompletionItemKind.Function,documentation:Ke,insertText:Ke,insertTextRules:z.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Je})),...Se.quickKey.map(Ke=>({label:Ke.label,kind:z.languages.CompletionItemKind.Function,documentation:Ke.content,insertText:je.startsWith("#")?Ke.content.replace(/#/,""):Ke.content,insertTextRules:z.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Je}))]}}}),z.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Pe,ze){var Ve=Pe.getWordUntilPosition(ze),Je={startLineNumber:ze.lineNumber,endLineNumber:ze.lineNumber,startColumn:Ve.startColumn,endColumn:Ve.endColumn},je=Pe.getLineContent(ze.lineNumber).substring(Ve.startColumn-2,Ve.endColumn);return{suggestions:[...de.keywords.map(Ke=>({label:Ke,kind:z.languages.CompletionItemKind.Function,documentation:Ke,insertText:Ke,insertTextRules:z.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Je})),...de.quickKey.map(Ke=>({label:Ke.label,kind:z.languages.CompletionItemKind.Function,documentation:Ke.content,insertText:je.startsWith("#")?Ke.content.replace(/#/,""):Ke.content,insertTextRules:z.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Je}))]}}})};const ge="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var ke=Object.defineProperty,ve=(z,oe,Ae)=>oe in z?ke(z,oe,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):z[oe]=Ae,Ce=(z,oe,Ae)=>ve(z,typeof oe!="symbol"?oe+"":oe,Ae);const K=class Zo{constructor(oe,Ae,ye){this.placeholder=oe,this.editor=Ae,this.monaco=ye,Ae.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)}};Ce(K,"ID","editor.widget.placeholderHint");var $=K,q=J(96236),ae=J(8591),Z=J(6848),E=J(89392),A=J(34604),Q=J(56102),fe=Object.defineProperty,$e=Object.defineProperties,Ze=Object.getOwnPropertyDescriptors,it=Object.getOwnPropertySymbols,tt=Object.prototype.hasOwnProperty,$t=Object.prototype.propertyIsEnumerable,ut=(z,oe,Ae)=>oe in z?fe(z,oe,{enumerable:!0,configurable:!0,writable:!0,value:Ae}):z[oe]=Ae,nt=(z,oe)=>{for(var Ae in oe||(oe={}))tt.call(oe,Ae)&&ut(z,Ae,oe[Ae]);if(it)for(var Ae of it(oe))$t.call(oe,Ae)&&ut(z,Ae,oe[Ae]);return z},tr=(z,oe)=>$e(z,Ze(oe)),sr=(z,oe)=>{var Ae={};for(var ye in z)tt.call(z,ye)&&oe.indexOf(ye)<0&&(Ae[ye]=z[ye]);if(z!=null&&it)for(var ye of it(z))oe.indexOf(ye)<0&&$t.call(z,ye)&&(Ae[ye]=z[ye]);return Ae},_r=(z,oe,Ae)=>new Promise((ye,Pe)=>{var ze=je=>{try{Je(Ae.next(je))}catch(Ke){Pe(Ke)}},Ve=je=>{try{Je(Ae.throw(je))}catch(Ke){Pe(Ke)}},Je=je=>je.done?ye(je.value):Promise.resolve(je.value).then(ze,Ve);Je((Ae=Ae.apply(z,oe)).next())});function ar(z){return/^\d+$/.test(z)?`${z}px`:z}function Yt(){}let It=!1;const Te={"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(z=[]){let oe=z;if(Array.isArray(z)){for(let Ae=0;Ae<z.length;Ae++){let ye=Te[z[Ae]];if(ye)return ye}return oe[0]}return Te[oe]||oe}let Ie=null;var rt=z=>{var oe=z,{width:Ae="100%",height:ye="100%",value:Pe,language:ze="javascript",style:Ve={},options:Je={},overrideServices:je={},theme:Ke="vs-dark",onEditBlur:_t,isCopy:xt=!1,onSave:ht,autoHeight:gt=!1,forbidCopy:Et=!1,onChange:pt=Yt,editorDidMount:kt=Yt,onFocus:wt=Yt,onBreakPoint:_=Yt,breakPointValue:T=[],filename:We="educoder.txt",errorLine:O,errorContent:ne="",highlightLine:Kt,openBreakPoint:ue=!1,placeholder:Ee=""}=oe,Oe=sr(oe,["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 N=(0,te.useRef)(),Y=(0,te.useRef)({}),le=(0,te.useRef)(),be=(0,te.useRef)(),R=(0,te.useRef)([]),ft=(0,te.useRef)(!1),se=(0,te.useRef)(),Tt=(0,te.useRef)(),Ct=(0,te.useRef)(!1),[Nt,br]=(0,te.useState)(!1);function Ht(){let Pt;return N.current&&(Pt=new we.Z(bt=>{for(let qt of bt)(qt.target.offsetHeight>0||qt.target.offsetWidth>0)&&Y.current.instance.layout()}),Pt.observe(N.current)),Pt}function Mt(){ae.ZP.warning({content:decodeURIComponent(ge),key:"monaco-editor-tip"})}const Tr=()=>{let Pt=Y.current.instance;if(Pe!=null&&Pt&&Nt){const bt=Pt.getModel();bt&&Pe!==bt.getValue()&&(It=!0,bt.setValue(Pe),Pt.layout(),It=!1)}};(0,te.useEffect)(()=>{const Pt=A.Z.subscribe("formatDocument",bt=>{var qt;let xr=Y.current.instance;(qt=xr==null?void 0:xr.getAction)==null||qt.call(xr,"editor.action.formatDocument").run()});return window.updateMonacoValue=bt=>{pt(bt)},Pt},[]),(0,te.useEffect)(()=>{var Pt;let bt=Y.current.instance;be.current&&clearTimeout(be.current),be.current=setTimeout(()=>{Tr()},500),Pe&&(Pe!=null&&Pe.length)&&((Pt=bt==null?void 0:bt.updateOptions)==null||Pt.call(bt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Pe.split(/\r\n|\r|\n/g).length))+3,5)}))},[Pe,Nt,Y.current]),(0,te.useEffect)(()=>{if(O&&Y.current&&Y.current.instance){let bt=Y.current.instance;bt.changeViewZones(function(qt){var xr=document.createElement("div");xr.style.padding="10px 20px",xr.style.width="calc(100% - 20px)",xr.className="my-error-line-wrp",xr.innerHTML=ne,qt.addZone({afterLineNumber:O||11,heightInLines:3,domNode:xr})});var Pt={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}};bt.addOverlayWidget(Pt),bt.revealPositionInCenter({lineNumber:20,column:1})}},[O,Y.current,Nt]);const Br=(Pt="",bt)=>{if(!Pt||Pt.trim()==="")return!0;const xr=Y.current.instance.getModel().getLineTokens(bt);let gr=!1;for(let jr=0;jr<2;jr++)xr.getStandardTokenType(jr)===1&&(gr=!0);return gr};(0,te.useEffect)(()=>{var Pt;const bt=(Pt=Y.current)==null?void 0:Pt.instance;if(bt&&Nt&&Et){const qt=bt.onDidBlurEditorWidget(()=>{Ct.current=!1}),xr=bt.onDidFocusEditorText(()=>{Ct.current=!0});return()=>{qt.dispose(),xr.dispose()}}},[Y.current,Nt,Et]),(0,te.useEffect)(()=>{var Pt;if((Pt=Y.current)!=null&&Pt.instance&&Nt&&ue){let bt=Y.current.instance,qt=bt.getModel();if(!qt)return;(()=>{var Qt;let lr=[],Sr=[];const Cr=qt.getAllDecorations();for(let an of Cr)an.options.className==="highlighted-line"&&(lr.push((Qt=an==null?void 0:an.range)==null?void 0:Qt.startLineNumber),Sr.push(an==null?void 0:an.id));if(Kt===lr[0])return;qt.deltaDecorations(Sr,[]);const wr=qt.getLineCount();Kt&&Kt<=wr&&(bt.deltaDecorations([],[{range:new Ie.Range(Kt,1,Kt,qt.getLineMaxColumn(Kt)),options:{isWholeLine:!0,className:"highlighted-line"}}]),bt.revealLineInCenter(Kt))})();const gr=(Qt=!1)=>{var lr;let Sr=[],Cr=[];const wr=qt.getAllDecorations();for(let an of wr)an.options.linesDecorationsClassName==="breakpoints-select"&&(Sr.push((lr=an==null?void 0:an.range)==null?void 0:lr.startLineNumber),Cr.push(an==null?void 0:an.id));if(Qt)return{lines:Sr,ids:Cr};_(Sr)},jr=Qt=>_r(void 0,null,function*(){let lr={range:new Ie.Range(Qt,1,Qt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield qt.deltaDecorations([],[lr]),gr()}),Fn=Qt=>_r(void 0,null,function*(){let lr=[];const Sr=bt.getLineDecorations(Qt);for(let Cr of Sr)Cr.options.linesDecorationsClassName==="breakpoints-select"&&lr.push(Cr.id);yield qt.deltaDecorations(lr,[]),gr()}),Vr=Qt=>{let lr=bt.getLineDecorations(Qt);for(let Sr of lr)if(Sr.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,E.isEqual)(T,gr(!0).lines)){qt.deltaDecorations(gr(!0).ids,[]);const Qt=T.map(lr=>({range:new Ie.Range(lr,1,lr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));qt.deltaDecorations([],Qt)}const Ar=bt.onDidChangeModelContent(Qt=>{let lr=bt.getPosition();if(lr){let Sr=lr.lineNumber;clearTimeout(Tt.current),Tt.current=setTimeout(()=>{Br(qt.getLineContent(Sr),Sr)?Fn(Sr):Vr(Sr)?(Fn(Sr),jr(Sr)):gr()},100)}}),Or=bt.onMouseDown(Qt=>{var lr,Sr,Cr;if(Qt.target.detail&&((Cr=(Sr=(lr=Qt.target)==null?void 0:lr.element)==null?void 0:Sr.className)!=null&&Cr.includes("line-numbers"))){let wr=Qt.target.position.lineNumber;if(Br(qt.getLineContent(wr),wr))return;Vr(wr)?Fn(wr):jr(wr)}}),cr=Qt=>{let lr={range:new Ie.Range(Qt,1,Qt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};R.current=bt.deltaDecorations(R.current,[lr])},nn=()=>{R.current=bt.deltaDecorations(R.current,[])},fn=bt.onMouseMove(Qt=>{var lr,Sr,Cr;if(nn(),Qt.target.detail&&((Cr=(Sr=(lr=Qt.target)==null?void 0:lr.element)==null?void 0:Sr.className)!=null&&Cr.includes("line-numbers"))){let wr=Qt.target.position.lineNumber;if(Br(qt.getLineContent(wr),wr))return;cr(wr)}}),Hr=bt.onMouseLeave(()=>{nn()});return()=>{Ar.dispose(),Or.dispose(),fn.dispose(),Hr.dispose()}}},[Y.current,Nt,T,Kt,ue,ze]),(0,te.useEffect)(()=>{var Pt;(Pt=Y.current)!=null&&Pt.instance&&ue&&Y.current.instance.setPosition({lineNumber:0,column:0})},[Kt]);function Gr(){let Pt=Y.current.instance;if(Pt){const bt=Pt.getSelection(),qt=Y.current.pastePos||{},xr=new Ie.Range(qt.startLineNumber||bt.endLineNumber,qt.startColumn||bt.endColumn,qt.endLineNumber||bt.endLineNumber,qt.endColumn||bt.endColumn);setTimeout(()=>{Pt.executeEdits("",[{range:xr,text:""}])},300)}}function zr(Pt){(window.navigator.platform.match("Mac")?Pt.metaKey:Pt.ctrlKey)&&Pt.keyCode==83&&(Pt.preventDefault(),ht())}const At=()=>{if(gt&&Y.current.instance){const Pt=Y.current.instance.getContentHeight();wn(Pt<ye?ye:Pt)}else wn(ye)};function Wt(Pt){var bt=document.createEvent("MouseEvents");bt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),Pt.dispatchEvent(bt)}const pr=Pt=>{if(!Ct.current)return;const{keyCode:bt,ctrlKey:qt,metaKey:xr,target:gr,type:jr}=Pt;return(jr==="paste"||(bt===67||bt===86)&&(xr||qt))&&gr.nodeName==="TEXTAREA"&&(Mt(),Pt.preventDefault()),!1};function Kr(Pt,bt){var qt=window.URL||window.webkitURL||window,xr=new Blob([bt]),gr=document.createElementNS("http://www.w3.org/1999/xhtml","a");gr.href=qt.createObjectURL(xr),gr.download=Pt,Wt(gr)}(0,te.useEffect)(()=>{At()},[At]),(0,te.useEffect)(()=>{N.current&&!Nt&&Promise.all([J.e(8909),J.e(3267)]).then(J.bind(J,71448)).then(Pt=>{try{Ie=Pt,Y.current.instance=Ie.editor.create(N.current,{value:Pe,language:qe(ze),theme:Ke,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},je);const bt=Y.current.instance;let gr=[...q.BH._menuItems].find(Ar=>Ar[0]._debugName=="EditorContext")[1],jr=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Fn=(Ar,Or)=>{var cr,nn;let fn=Ar._first;do Or.includes((nn=(cr=fn.element)==null?void 0:cr.command)==null?void 0:nn.id)&&Ar._remove(fn);while(fn=fn.next)};if(kt(bt,Ie),setTimeout(()=>{At(),Y.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Kr(We||"educoder.txt",bt.getValue())}})},500),Y.current.subscription=bt.onDidChangeModelContent(Ar=>{ft.current?clearTimeout(se.current):(At(),pt(bt.getValue(),Ar)),se.current=setTimeout(()=>{ft.current=!1},500)}),window.Monaco||ce(Ie,qe(ze)),Et&&(Fn(gr,jr),N.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",pr),window.removeEventListener("paste",pr),window.addEventListener("keydown",pr),window.addEventListener("paste",pr)),window.Monaco=Ie,_t&&bt.onDidBlurEditorWidget(()=>{_t(bt.getValue())}),wt&&bt.onDidFocusEditorText(()=>{wt(bt.getValue())}),Et)try{bt.onDidPaste(Ar=>{const Or=bt.getSelection(),cr=Y.current.pastePos||{},nn=new Ie.Range(cr.startLineNumber||Or.endLineNumber,cr.startColumn||Or.endColumn,cr.endLineNumber||Or.endLineNumber,cr.endColumn||Or.endColumn);bt.executeEdits("",[{range:Ar.range,text:""}])})}catch(Ar){}let Vr=Ht();return Ee&&typeof Ee=="string"&&new $(Ee,bt,Ie),br(!0),()=>{const Ar=Y.current.instance;Ar.dispose();const Or=Ar.getModel();Or&&Or.dispose(),Y.current.subscription&&Y.current.subscription.dispose(),Vr.unobserve(N.current)}}catch(bt){}})},[]),(0,te.useEffect)(()=>{if(Y.current.instance&&Nt)return document.addEventListener("keydown",zr,!1),()=>{document.removeEventListener("keydown",zr)}},[ht,Nt]),(0,te.useEffect)(()=>{let Pt=Y.current.instance;if(Pt&&Nt){let bt=qe(ze);Ie.editor.setModelLanguage(Pt.getModel(),bt)}},[ze,Nt]),(0,te.useEffect)(()=>{Y.current.instance&&Nt&&Ie.editor.setTheme(Ke)},[Ke,Nt]),(0,te.useEffect)(()=>{let Pt=Y.current.instance;le.current=Je,Pt&&Nt&&(Pt.updateOptions(nt({},Je)),setTimeout(()=>{Pt.getModel().updateOptions(nt({},Je))},200))},[JSON.stringify(Je),Nt]),(0,te.useEffect)(()=>{let Pt=Y.current.instance;Pt&&Nt&&Pt.layout()},[Ae,ye,Nt]);const[Ir,tn]=(0,te.useState)(ar(Ae)),[or,wn]=(0,te.useState)(ar(ye)),rn=tr(nt({},Ve),{width:Ir,height:or,position:"relative"});return te.createElement("div",{className:"my-monaco-editor",ref:N,style:rn},xt&&te.createElement(Q.CopyToClipboard,{text:Pe,onCopy:()=>ae.ZP.success("\u590D\u5236\u6210\u529F")},te.createElement(Z.Z,{title:"\u590D\u5236\u4EE3\u7801"},te.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},te.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function st({width:z="100%",height:oe="100%",original:Ae,modified:ye,language:Pe,options:ze={}}){const Ve=(0,te.useRef)(),[Je,je]=(0,te.useState)(null);function Ke(gt){let Et;return Ve.current&&(Et=new we.Z(pt=>{for(let kt of pt)(kt.target.offsetHeight>0||kt.target.offsetWidth>0)&&gt.layout()}),Et.observe(Ve.current)),Et}(0,te.useEffect)(()=>(Ve.current&&Promise.all([J.e(8909),J.e(9404)]).then(J.bind(J,2550)).then(gt=>{Ie=gt;const Et=Ie.editor.createDiffEditor(Ve.current,tr(nt({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},ze),{wordWrap:!0}));je(Et);let pt=Ke(Et);return()=>{Et.dispose();const kt=Et.getModel();kt&&kt.dispose(),pt.unobserve(Ve.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,te.useEffect)(()=>{Je&&Je.setModel({original:Ie.editor.createModel(Ae,Pe),modified:Ie.editor.createModel(ye,Pe)})},[Ae,ye,Pe,Je]);const _t=ar(z),xt=ar(oe),ht={width:_t,height:xt};return te.createElement("div",{className:"my-diff-editor",ref:Ve,style:ht})}},65128:function(Ot,Xe,J){"use strict";J.r(Xe),J.d(Xe,{Types:function(){return C}});var te=J(59301),we=J(71418),Me=J(3113),De=J(14478),Fe=J(89070),de=J(99064),Se=J(3294),xe=J(85149),l=J(48922),H=J(52336),P=Object.defineProperty,x=Object.defineProperties,d=Object.getOwnPropertyDescriptors,y=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,U=Object.prototype.propertyIsEnumerable,W=(pe,ce,ge)=>ce in pe?P(pe,ce,{enumerable:!0,configurable:!0,writable:!0,value:ge}):pe[ce]=ge,I=(pe,ce)=>{for(var ge in ce||(ce={}))v.call(ce,ge)&&W(pe,ge,ce[ge]);if(y)for(var ge of y(ce))U.call(ce,ge)&&W(pe,ge,ce[ge]);return pe},L=(pe,ce)=>x(pe,d(ce)),V=(pe,ce,ge)=>new Promise((ke,ve)=>{var Ce=$=>{try{F(ge.next($))}catch(q){ve(q)}},K=$=>{try{F(ge.throw($))}catch(q){ve(q)}},F=$=>$.done?ke($.value):Promise.resolve($.value).then(Ce,K);F((ge=ge.apply(pe,ce)).next())});const re={data:void 0};var C=(pe=>(pe.GET_DATA="get-data",pe.PRAISE="on-praise",pe))(C||{});function _e(pe,ce){switch(ce.type){case"get-data":return L(I({},pe),{data:ce.payload});case"on-praise":return L(I({},pe),{data:ce.payload});default:throw new Error}}Xe.default=()=>{var pe,ce,ge,ke,ve,Ce,K,F,$;const[q,ae]=(0,te.useReducer)(_e,re),{data:Z}=q,{caseId:E}=(0,Fe.useParams)();(0,te.useEffect)(()=>{let fe=!1;function $e(){return V(this,null,function*(){const Ze=yield(0,de.U2)(`libraries/${E}.json`);fe||(Ze.status===404?Fe.history.push("/moop_cases"):ae({type:"get-data",payload:Ze}))})}return fe||$e(),()=>{fe=!0}},[E]);function A(){return V(this,null,function*(){yield(0,de.v_)("praise_tread/like.json",{object_id:E,object_type:"library"});let fe=I({},Z);fe.operation.user_praised=!0,fe.praise_count+=1,ae({type:"on-praise",payload:fe})})}function Q(){return V(this,null,function*(){yield(0,de.IV)(`/libraries/${E}.json`),Fe.history.push("/moop_cases")})}return te.createElement(we.Z,{spinning:!Z,delay:500},Z?te.createElement("section",{className:"moop-info"},te.createElement("div",{className:"crumb"},te.createElement(Fe.Link,{to:"/moop_cases"},"\u6559\u5B66\u6848\u4F8B > "),te.createElement("span",null,Z.title)),te.createElement("div",{className:"title"},te.createElement("h2",null,Z.title,(pe=Z.tags)==null?void 0:pe.map((fe,$e)=>te.createElement("span",{className:"label-"+$e,key:fe.id},fe.name))),te.createElement(Fe.Link,{to:"/moop_cases"},"\u8FD4\u56DE")),te.createElement("div",{className:"moop-info-body"},te.createElement("div",{className:"moop-sub-title"},te.createElement("img",{src:`${Se.Z.IMG_SERVER}/images/${(ce=Z.creator)==null?void 0:ce.image_url}`,alt:"cover",width:50}),te.createElement("div",{className:"desc"},te.createElement("div",{className:"flex-container"},te.createElement("span",null,(ge=Z.creator)==null?void 0:ge.name),(ke=Z.operation)!=null&&ke.can_editable?te.createElement(Fe.Link,{to:`/moop_cases/${Z.id}/edit`,style:{marginRight:10}},te.createElement(Me.ZP,{type:"ghost"},"\u7F16\u8F91")):null,(ve=Z.operation)!=null&&ve.can_deletable?te.createElement(De.Z,{placement:"bottomRight",title:"\u662F\u5426\u786E\u8BA4\u5220\u9664\uFF1F",onConfirm:Q},te.createElement(Me.ZP,{type:"dashed"},"\u5220\u9664")):null),te.createElement("div",{className:"sum"},te.createElement("span",null,(Ce=Z.creator)==null?void 0:Ce.school_name),te.createElement("span",null,"\u7F16\u7801\uFF1A",Z.uuid),te.createElement("span",null,"\u53D1\u5E03\u65F6\u95F4\uFF1A",Z.published_at)))),te.createElement("p",null,"\u4F5C\u8005\uFF1A",`${Z.author_name} / ${Z.author_school_name}`),te.createElement(xe.Z,{value:Z.content}),te.createElement("ul",{className:"attachment"},(K=Z.attachments)==null?void 0:K.map(fe=>te.createElement("li",{key:fe.id},te.createElement("a",{href:fe.url},te.createElement("i",{className:"iconfont icon-fujian"}),te.createElement("span",null,fe.title),te.createElement("span",null,fe.filesize))))),te.createElement("button",{className:"praise",disabled:(F=Z.operation)==null?void 0:F.user_praised,onClick:A},($=Z.operation)!=null&&$.user_praised?te.createElement("span",null,"\u5DF2\u8D5E"):te.createElement("span",null,te.createElement("i",{className:"iconfont icon-dianzan"})),te.createElement("span",null,Z.praise_count)))):null)}},24768:function(Ot,Xe,J){"use strict";J.d(Xe,{AL:function(){return re},Iy:function(){return P},Qv:function(){return y},ez:function(){return V},jb:function(){return x}});var te=J(32834),we=J.n(te),Me=J(11690),De=J.n(Me);let Fe=1;function de(ge,ke){const ve=ge.match(/^(\s+)(?:```)/);if(ve===null)return ke;const Ce=ve[1];return ke.split(`
`).map(K=>{const F=K.match(/^\s+/);if(F===null)return K;const[$]=F;return $.length>=Ce.length?K.slice(Ce.length):K}).join(`
`)}let Se=[],xe=["<ul>"];const l=new(we()).Renderer,H=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function P(){Se.length=0,xe=["<ul>"]}const x={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function d(ge,ke,ve,Ce){if(ke>=ge.length||ge[ke].level<=ve)return ke;var K=ge[ke];Ce.push("<li><a href='#"+Fe+K.anchor+"'>"+K.text+"</a>"),ke++;var F=[];return ke=d(ge,ke,K.level,F),F.length>0&&(Ce.push("<ul>"),F.forEach(function($){Ce.push($)}),Ce.push("</ul>")),Ce.push("</li>"),ke=d(ge,ke,ve,Ce),ke}function y(){return d(Se,0,0,xe),xe.push("</ul>"),xe.join("")}const v={heading(ge){const ke=H.exec(ge);if(Fe+=1,ke)return{type:"heading",raw:ke[0],depth:ke[1].length,text:ke[2]}},fences(ge){const ke=this.rules.block.fences.exec(ge);if(ke){const ve=ke[0];let Ce=de(ve,ke[3]||"");const K=ke[2]?ke[2].trim():ke[2];if(["latex","katex","math"].indexOf(K)>=0){const F=I(),$=Ce;Ce=F,L[F]={type:"block",expression:$}}return{type:"code",raw:ve,lang:K,text:Ce}}}},U=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let W=0;const I=()=>`__special_katext_id_${W++}__`;let L={};function V(){return L}function re(){W=0,L={}}function C(ge){return ge=ge.replace(U,(ke,ve)=>{const Ce=I();return L[Ce]={type:"inline",expression:ve},Ce}),ge}const _e=l.listitem;l.listitem=function(ge){return _e(C(ge))};const pe=l.paragraph;l.paragraph=function(ge){return pe(C(ge))};const ce=l.tablecell;l.tablecell=function(ge,ke){return ce(C(ge),ke)},l.code=function(ge,ke,ve){const Ce=(ke||"").match(/\S*/)[0];return Ce?["latex","katex","math"].indexOf(Ce)>=0?`<p class='editormd-tex'>${ge}</p>`:`<pre class="prettyprint linenums"><code class="language-${ke}">${ve?ge:(0,Me.escape)(ge,!0)}</code></pre>
`:'<pre class="prettyprint linenums"><code>'+(ve?ge:(0,Me.escape)(ge,!0))+"</code></pre>"},l.heading=function(ge,ke,ve){let Ce=this.options.headerPrefix+ve.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Se.push({anchor:Ce,level:ke,text:ge}),"<h"+ke+' id="'+Fe+Ce+'">'+ge+"</h"+ke+">"},we().setOptions({silent:!0,gfm:!0,pedantic:!1}),we().use({tokenizer:v,renderer:l}),Xe.ZP=we()},36785:function(Ot,Xe,J){"use strict";J.d(Xe,{o2:function(){return Fe},yT:function(){return de}});var te=J(19127),we=J(33166);const Me=we.i.map(Se=>`${Se}-inverse`),De=["success","processing","error","default","warning"];function Fe(Se){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat((0,te.Z)(Me),(0,te.Z)(we.i)).includes(Se):we.i.includes(Se)}function de(Se){return De.includes(Se)}},77578:function(Ot,Xe,J){"use strict";J.d(Xe,{Z:function(){return te}});const te=we=>we?typeof we=="function"?we():we:null},79676:function(Ot,Xe,J){"use strict";J.d(Xe,{Z:function(){return de}});var te=J(19447);function we(Se,xe,l,H){if(H===!1)return{adjustX:!1,adjustY:!1};const P=H&&typeof H=="object"?H:{},x={};switch(Se){case"top":case"bottom":x.shiftX=xe.dropdownArrowOffset*2+l;break;case"left":case"right":x.shiftY=xe.dropdownArrowOffsetVertical*2+l;break}const d=Object.assign(Object.assign({},x),P);return d.shiftX||(d.adjustX=!0),d.shiftY||(d.adjustY=!0),d}const Me={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"]}},De={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"]}},Fe=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function de(Se){const{arrowWidth:xe,autoAdjustOverflow:l,arrowPointAtCenter:H,offset:P,borderRadius:x,visibleFirst:d}=Se,y=xe/2,v={};return Object.keys(Me).forEach(U=>{const W=H&&De[U]||Me[U],I=Object.assign(Object.assign({},W),{offset:[0,0]});switch(v[U]=I,Fe.has(U)&&(I.autoArrow=!1),U){case"top":case"topLeft":case"topRight":I.offset[1]=-y-P;break;case"bottom":case"bottomLeft":case"bottomRight":I.offset[1]=y+P;break;case"left":case"leftTop":case"leftBottom":I.offset[0]=-y-P;break;case"right":case"rightTop":case"rightBottom":I.offset[0]=y+P;break}const L=(0,te.fS)({contentRadius:x,limitVerticalRadius:!0});if(H)switch(U){case"topLeft":case"bottomLeft":I.offset[0]=-L.dropdownArrowOffset-y;break;case"topRight":case"bottomRight":I.offset[0]=L.dropdownArrowOffset+y;break;case"leftTop":case"rightTop":I.offset[1]=-L.dropdownArrowOffset-y;break;case"leftBottom":case"rightBottom":I.offset[1]=L.dropdownArrowOffset+y;break}I.overflow=we(U,L,xe,l),d&&(I.htmlRegion="visibleFirst")}),v}},14478:function(Ot,Xe,J){"use strict";J.d(Xe,{Z:function(){return ke}});var te=J(96512),we=J(92310),Me=J.n(we),De=J(10228),Fe=J(18929),de=J(2738),Se=J(59301),xe=J(92343),l=J(36355),H=J(60324),P=J(92806),x=J(77578),d=J(3113),y=J(67797),v=J(9763),U=J(31724),W=J(39722),I=J(83116);const L=ve=>{const{componentCls:Ce,iconCls:K,antCls:F,zIndexPopup:$,colorText:q,colorWarning:ae,marginXXS:Z,marginXS:E,fontSize:A,fontWeightStrong:Q,colorTextHeading:fe}=ve;return{[Ce]:{zIndex:$,[`&${F}-popover`]:{fontSize:A},[`${Ce}-message`]:{marginBottom:E,display:"flex",flexWrap:"nowrap",alignItems:"start",[`> ${Ce}-message-icon ${K}`]:{color:ae,fontSize:A,lineHeight:1,marginInlineEnd:E},[`${Ce}-title`]:{fontWeight:Q,color:fe,"&:only-child":{fontWeight:"normal"}},[`${Ce}-description`]:{marginTop:Z,color:q}},[`${Ce}-buttons`]:{textAlign:"end",whiteSpace:"nowrap",button:{marginInlineStart:E}}}}};var V=(0,I.Z)("Popconfirm",ve=>L(ve),ve=>{const{zIndexPopupBase:Ce}=ve;return{zIndexPopup:Ce+60}},{resetStyle:!1}),re=function(ve,Ce){var K={};for(var F in ve)Object.prototype.hasOwnProperty.call(ve,F)&&Ce.indexOf(F)<0&&(K[F]=ve[F]);if(ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $=0,F=Object.getOwnPropertySymbols(ve);$<F.length;$++)Ce.indexOf(F[$])<0&&Object.prototype.propertyIsEnumerable.call(ve,F[$])&&(K[F[$]]=ve[F[$]]);return K};const C=ve=>{const{prefixCls:Ce,okButtonProps:K,cancelButtonProps:F,title:$,description:q,cancelText:ae,okText:Z,okType:E="primary",icon:A=Se.createElement(te.Z,null),showCancel:Q=!0,close:fe,onConfirm:$e,onCancel:Ze,onPopupClick:it}=ve,{getPrefixCls:tt}=Se.useContext(l.E_),[$t]=(0,v.Z)("Popconfirm",U.Z.Popconfirm),ut=(0,x.Z)($),nt=(0,x.Z)(q);return Se.createElement("div",{className:`${Ce}-inner-content`,onClick:it},Se.createElement("div",{className:`${Ce}-message`},A&&Se.createElement("span",{className:`${Ce}-message-icon`},A),Se.createElement("div",{className:`${Ce}-message-text`},ut&&Se.createElement("div",{className:Me()(`${Ce}-title`)},ut),nt&&Se.createElement("div",{className:`${Ce}-description`},nt))),Se.createElement("div",{className:`${Ce}-buttons`},Q&&Se.createElement(d.ZP,Object.assign({onClick:Ze,size:"small"},F),ae!=null?ae:$t==null?void 0:$t.cancelText),Se.createElement(P.Z,{buttonProps:Object.assign(Object.assign({size:"small"},(0,y.n)(E)),K),actionFn:$e,close:fe,prefixCls:tt("btn"),quitOnNullishReturnValue:!0,emitEvent:!0},Z!=null?Z:$t==null?void 0:$t.okText)))};var pe=ve=>{const{prefixCls:Ce,placement:K,className:F,style:$}=ve,q=re(ve,["prefixCls","placement","className","style"]),{getPrefixCls:ae}=Se.useContext(l.E_),Z=ae("popconfirm",Ce),[E]=V(Z);return E(Se.createElement(W.ZP,{placement:K,className:Me()(Z,F),style:$,content:Se.createElement(C,Object.assign({prefixCls:Z},q))}))},ce=function(ve,Ce){var K={};for(var F in ve)Object.prototype.hasOwnProperty.call(ve,F)&&Ce.indexOf(F)<0&&(K[F]=ve[F]);if(ve!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $=0,F=Object.getOwnPropertySymbols(ve);$<F.length;$++)Ce.indexOf(F[$])<0&&Object.prototype.propertyIsEnumerable.call(ve,F[$])&&(K[F[$]]=ve[F[$]]);return K};const ge=Se.forwardRef((ve,Ce)=>{const{prefixCls:K,placement:F="top",trigger:$="click",okType:q="primary",icon:ae=Se.createElement(te.Z,null),children:Z,overlayClassName:E,onOpenChange:A,onVisibleChange:Q}=ve,fe=ce(ve,["prefixCls","placement","trigger","okType","icon","children","overlayClassName","onOpenChange","onVisibleChange"]),{getPrefixCls:$e}=Se.useContext(l.E_),[Ze,it]=(0,Fe.Z)(!1,{value:ve.open,defaultValue:ve.defaultOpen}),tt=(It,Te)=>{it(It,!0),Q==null||Q(It),A==null||A(It,Te)},$t=It=>{tt(!1,It)},ut=It=>{var Te;return(Te=ve.onConfirm)===null||Te===void 0?void 0:Te.call(void 0,It)},nt=It=>{var Te;tt(!1,It),(Te=ve.onCancel)===null||Te===void 0||Te.call(void 0,It)},tr=It=>{It.keyCode===De.Z.ESC&&Ze&&tt(!1,It)},sr=It=>{const{disabled:Te=!1}=ve;Te||tt(It)},_r=$e("popconfirm",K),ar=Me()(_r,E),[Yt]=V(_r);return Yt(Se.createElement(H.Z,Object.assign({},(0,de.Z)(fe,["title"]),{trigger:$,placement:F,onOpenChange:sr,open:Ze,ref:Ce,overlayClassName:ar,content:Se.createElement(C,Object.assign({okType:q,icon:ae},ve,{prefixCls:_r,close:$t,onConfirm:ut,onCancel:nt})),"data-popover-inject":!0}),(0,xe.Tm)(Z,{onKeyDown:It=>{var Te,qe;Se.isValidElement(Z)&&((qe=Z==null?void 0:(Te=Z.props).onKeyDown)===null||qe===void 0||qe.call(Te,It)),tr(It)}})))});ge._InternalPanelDoNotUseOrYouWillBeFired=pe;var ke=ge},39722:function(Ot,Xe,J){"use strict";J.d(Xe,{t5:function(){return H}});var te=J(92310),we=J.n(te),Me=J(55477),De=J(59301),Fe=J(36355),de=J(77578),Se=J(17356),xe=function(x,d){var y={};for(var v in x)Object.prototype.hasOwnProperty.call(x,v)&&d.indexOf(v)<0&&(y[v]=x[v]);if(x!=null&&typeof Object.getOwnPropertySymbols=="function")for(var U=0,v=Object.getOwnPropertySymbols(x);U<v.length;U++)d.indexOf(v[U])<0&&Object.prototype.propertyIsEnumerable.call(x,v[U])&&(y[v[U]]=x[v[U]]);return y};const l=(x,d,y)=>{if(!(!d&&!y))return De.createElement(De.Fragment,null,d&&De.createElement("div",{className:`${x}-title`},(0,de.Z)(d)),De.createElement("div",{className:`${x}-inner-content`},(0,de.Z)(y)))},H=x=>{const{hashId:d,prefixCls:y,className:v,style:U,placement:W="top",title:I,content:L,children:V}=x;return De.createElement("div",{className:we()(d,y,`${y}-pure`,`${y}-placement-${W}`,v),style:U},De.createElement("div",{className:`${y}-arrow`}),De.createElement(Me.G,Object.assign({},x,{className:d,prefixCls:y}),V||l(y,I,L)))},P=x=>{const{prefixCls:d}=x,y=xe(x,["prefixCls"]),{getPrefixCls:v}=De.useContext(Fe.E_),U=v("popover",d),[W,I]=(0,Se.Z)(U);return W(De.createElement(H,Object.assign({},y,{prefixCls:U,hashId:I})))};Xe.ZP=P},60324:function(Ot,Xe,J){"use strict";var te=J(92310),we=J.n(te),Me=J(59301),De=J(77578),Fe=J(62892),de=J(36355),Se=J(6848),xe=J(39722),l=J(17356),H=function(d,y){var v={};for(var U in d)Object.prototype.hasOwnProperty.call(d,U)&&y.indexOf(U)<0&&(v[U]=d[U]);if(d!=null&&typeof Object.getOwnPropertySymbols=="function")for(var W=0,U=Object.getOwnPropertySymbols(d);W<U.length;W++)y.indexOf(U[W])<0&&Object.prototype.propertyIsEnumerable.call(d,U[W])&&(v[U[W]]=d[U[W]]);return v};const P=d=>{let{title:y,content:v,prefixCls:U}=d;return Me.createElement(Me.Fragment,null,y&&Me.createElement("div",{className:`${U}-title`},(0,De.Z)(y)),Me.createElement("div",{className:`${U}-inner-content`},(0,De.Z)(v)))},x=Me.forwardRef((d,y)=>{const{prefixCls:v,title:U,content:W,overlayClassName:I,placement:L="top",trigger:V="hover",mouseEnterDelay:re=.1,mouseLeaveDelay:C=.1,overlayStyle:_e={}}=d,pe=H(d,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:ce}=Me.useContext(de.E_),ge=ce("popover",v),[ke,ve]=(0,l.Z)(ge),Ce=ce(),K=we()(I,ve);return ke(Me.createElement(Se.Z,Object.assign({placement:L,trigger:V,mouseEnterDelay:re,mouseLeaveDelay:C,overlayStyle:_e},pe,{prefixCls:ge,overlayClassName:K,ref:y,overlay:U||W?Me.createElement(P,{prefixCls:ge,title:U,content:W}):null,transitionName:(0,Fe.m)(Ce,"zoom-big",pe.transitionName),"data-popover-inject":!0})))});x._InternalPanelDoNotUseOrYouWillBeFired=xe.ZP,Xe.Z=x},17356:function(Ot,Xe,J){"use strict";var te=J(17313),we=J(29878),Me=J(19447),De=J(33166),Fe=J(83116),de=J(37613);const Se=H=>{const{componentCls:P,popoverColor:x,minWidth:d,fontWeightStrong:y,popoverPadding:v,boxShadowSecondary:U,colorTextHeading:W,borderRadiusLG:I,zIndexPopup:L,marginXS:V,colorBgElevated:re,popoverBg:C}=H;return[{[P]:Object.assign(Object.assign({},(0,te.Wf)(H)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:L,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":re,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${P}-content`]:{position:"relative"},[`${P}-inner`]:{backgroundColor:C,backgroundClip:"padding-box",borderRadius:I,boxShadow:U,padding:v},[`${P}-title`]:{minWidth:d,marginBottom:V,color:W,fontWeight:y},[`${P}-inner-content`]:{color:x}})},(0,Me.ZP)(H,{colorBg:"var(--antd-arrow-background-color)"}),{[`${P}-pure`]:{position:"relative",maxWidth:"none",margin:H.sizePopupArrow,display:"inline-block",[`${P}-content`]:{display:"inline-block"}}}]},xe=H=>{const{componentCls:P}=H;return{[P]:De.i.map(x=>{const d=H[`${x}6`];return{[`&${P}-${x}`]:{"--antd-arrow-background-color":d,[`${P}-inner`]:{backgroundColor:d},[`${P}-arrow`]:{background:"transparent"}}}})}},l=H=>{const{componentCls:P,lineWidth:x,lineType:d,colorSplit:y,paddingSM:v,controlHeight:U,fontSize:W,lineHeight:I,padding:L}=H,V=U-Math.round(W*I),re=V/2,C=V/2-x,_e=L;return{[P]:{[`${P}-inner`]:{padding:0},[`${P}-title`]:{margin:0,padding:`${re}px ${_e}px ${C}px`,borderBottom:`${x}px ${d} ${y}`},[`${P}-inner-content`]:{padding:`${v}px ${_e}px`}}}};Xe.Z=(0,Fe.Z)("Popover",H=>{const{colorBgElevated:P,colorText:x,wireframe:d}=H,y=(0,de.TS)(H,{popoverPadding:12,popoverBg:P,popoverColor:x});return[Se(y),xe(y),d&&l(y),(0,we._y)(y,"zoom-big")]},H=>({width:177,minWidth:177,zIndexPopup:H.zIndexPopupBase+30}),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})},19447:function(Ot,Xe,J){"use strict";J.d(Xe,{ZP:function(){return Fe},fS:function(){return Me},qN:function(){return we}});var te=J(47585);const we=8;function Me(de){const Se=we,{contentRadius:xe,limitVerticalRadius:l}=de,H=xe>12?xe+2:12;return{dropdownArrowOffset:H,dropdownArrowOffsetVertical:l?Se:H}}function De(de,Se){return de?Se:{}}function Fe(de,Se){const{componentCls:xe,sizePopupArrow:l,borderRadiusXS:H,borderRadiusOuter:P,boxShadowPopoverArrow:x}=de,{colorBg:d,contentRadius:y=de.borderRadiusLG,limitVerticalRadius:v,arrowDistance:U=0,arrowPlacement:W={left:!0,right:!0,top:!0,bottom:!0}}=Se,{dropdownArrowOffsetVertical:I,dropdownArrowOffset:L}=Me({contentRadius:y,limitVerticalRadius:v});return{[xe]:Object.assign(Object.assign(Object.assign(Object.assign({[`${xe}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},(0,te.r)(l,H,P,d,x)),{"&:before":{background:d}})]},De(!!W.top,{[[`&-placement-top ${xe}-arrow`,`&-placement-topLeft ${xe}-arrow`,`&-placement-topRight ${xe}-arrow`].join(",")]:{bottom:U,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top ${xe}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},[`&-placement-topLeft ${xe}-arrow`]:{left:{_skip_check_:!0,value:L}},[`&-placement-topRight ${xe}-arrow`]:{right:{_skip_check_:!0,value:L}}})),De(!!W.bottom,{[[`&-placement-bottom ${xe}-arrow`,`&-placement-bottomLeft ${xe}-arrow`,`&-placement-bottomRight ${xe}-arrow`].join(",")]:{top:U,transform:"translateY(-100%)"},[`&-placement-bottom ${xe}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},[`&-placement-bottomLeft ${xe}-arrow`]:{left:{_skip_check_:!0,value:L}},[`&-placement-bottomRight ${xe}-arrow`]:{right:{_skip_check_:!0,value:L}}})),De(!!W.left,{[[`&-placement-left ${xe}-arrow`,`&-placement-leftTop ${xe}-arrow`,`&-placement-leftBottom ${xe}-arrow`].join(",")]:{right:{_skip_check_:!0,value:U},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left ${xe}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop ${xe}-arrow`]:{top:I},[`&-placement-leftBottom ${xe}-arrow`]:{bottom:I}})),De(!!W.right,{[[`&-placement-right ${xe}-arrow`,`&-placement-rightTop ${xe}-arrow`,`&-placement-rightBottom ${xe}-arrow`].join(",")]:{left:{_skip_check_:!0,value:U},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right ${xe}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop ${xe}-arrow`]:{top:I},[`&-placement-rightBottom ${xe}-arrow`]:{bottom:I}}))}}},47585:function(Ot,Xe,J){"use strict";J.d(Xe,{r:function(){return te}});const te=(we,Me,De,Fe,de)=>{const Se=we/2,xe=0,l=Se,H=De*1/Math.sqrt(2),P=Se-De*(1-1/Math.sqrt(2)),x=Se-Me*(1/Math.sqrt(2)),d=De*(Math.sqrt(2)-1)+Me*(1/Math.sqrt(2)),y=2*Se-x,v=d,U=2*Se-H,W=P,I=2*Se-xe,L=l,V=Se*Math.sqrt(2)+De*(Math.sqrt(2)-2),re=De*(Math.sqrt(2)-1);return{pointerEvents:"none",width:we,height:we,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:we,height:we/2,background:Fe,clipPath:{_multi_value_:!0,value:[`polygon(${re}px 100%, 50% ${re}px, ${2*Se-re}px 100%, ${re}px 100%)`,`path('M ${xe} ${l} A ${De} ${De} 0 0 0 ${H} ${P} L ${x} ${d} A ${Me} ${Me} 0 0 1 ${y} ${v} L ${U} ${W} A ${De} ${De} 0 0 0 ${I} ${L} Z')`]},content:'""'},"&::after":{content:'""',position:"absolute",width:V,height:V,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${Me}px 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:de,zIndex:0,background:"transparent"}}}},33166:function(Ot,Xe,J){"use strict";J.d(Xe,{i:function(){return te}});const te=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"]},45157:function(Ot,Xe,J){"use strict";J.d(Xe,{Z:function(){return we}});var te=J(33166);function we(Me,De){return te.i.reduce((Fe,de)=>{const Se=Me[`${de}1`],xe=Me[`${de}3`],l=Me[`${de}6`],H=Me[`${de}7`];return Object.assign(Object.assign({},Fe),De(de,{lightColor:Se,lightBorderColor:xe,darkColor:l,textColor:H}))},{})}},6848:function(Ot,Xe,J){"use strict";J.d(Xe,{Z:function(){return ve}});var te=J(59301),we=J(92310),Me=J.n(we),De=J(55477),Fe=J(18929),de=J(62892),Se=J(79676),xe=J(92343),l=J(36355),H=J(33234),P=J(88088),x=J(17313),d=J(29878),y=J(19447),v=J(45157),U=J(37613),W=J(83116);const I=Ce=>{const{componentCls:K,tooltipMaxWidth:F,tooltipColor:$,tooltipBg:q,tooltipBorderRadius:ae,zIndexPopup:Z,controlHeight:E,boxShadowSecondary:A,paddingSM:Q,paddingXS:fe,tooltipRadiusOuter:$e}=Ce;return[{[K]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,x.Wf)(Ce)),{position:"absolute",zIndex:Z,display:"block",width:"max-content",maxWidth:F,visibility:"visible",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","&-hidden":{display:"none"},"--antd-arrow-background-color":q,[`${K}-inner`]:{minWidth:E,minHeight:E,padding:`${Q/2}px ${fe}px`,color:$,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:q,borderRadius:ae,boxShadow:A,boxSizing:"border-box"},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${K}-inner`]:{borderRadius:Math.min(ae,y.qN)}},[`${K}-content`]:{position:"relative"}}),(0,v.Z)(Ce,(Ze,it)=>{let{darkColor:tt}=it;return{[`&${K}-${Ze}`]:{[`${K}-inner`]:{backgroundColor:tt},[`${K}-arrow`]:{"--antd-arrow-background-color":tt}}}})),{"&-rtl":{direction:"rtl"}})},(0,y.ZP)((0,U.TS)(Ce,{borderRadiusOuter:$e}),{colorBg:"var(--antd-arrow-background-color)",contentRadius:ae,limitVerticalRadius:!0}),{[`${K}-pure`]:{position:"relative",maxWidth:"none",margin:Ce.sizePopupArrow}}]};var L=(Ce,K)=>(0,W.Z)("Tooltip",$=>{if(K===!1)return[];const{borderRadius:q,colorTextLightSolid:ae,colorBgDefault:Z,borderRadiusOuter:E}=$,A=(0,U.TS)($,{tooltipMaxWidth:250,tooltipColor:ae,tooltipBorderRadius:q,tooltipBg:Z,tooltipRadiusOuter:E>4?4:E});return[I(A),(0,d._y)($,"zoom-big-fast")]},$=>{let{zIndexPopupBase:q,colorBgSpotlight:ae}=$;return{zIndexPopup:q+70,colorBgDefault:ae}},{resetStyle:!1})(Ce),V=J(36785);function re(Ce,K){const F=(0,V.o2)(K),$=Me()({[`${Ce}-${K}`]:K&&F}),q={},ae={};return K&&!F&&(q.background=K,ae["--antd-arrow-background-color"]=K),{className:$,overlayStyle:q,arrowStyle:ae}}var _e=Ce=>{const{prefixCls:K,className:F,placement:$="top",title:q,color:ae,overlayInnerStyle:Z}=Ce,{getPrefixCls:E}=te.useContext(l.E_),A=E("tooltip",K),[Q,fe]=L(A,!0),$e=re(A,ae),Ze=$e.arrowStyle,it=Object.assign(Object.assign({},Z),$e.overlayStyle),tt=Me()(fe,A,`${A}-pure`,`${A}-placement-${$}`,F,$e.className);return Q(te.createElement("div",{className:tt,style:Ze},te.createElement("div",{className:`${A}-arrow`}),te.createElement(De.G,Object.assign({},Ce,{className:fe,prefixCls:A,overlayInnerStyle:it}),q)))},pe=function(Ce,K){var F={};for(var $ in Ce)Object.prototype.hasOwnProperty.call(Ce,$)&&K.indexOf($)<0&&(F[$]=Ce[$]);if(Ce!=null&&typeof Object.getOwnPropertySymbols=="function")for(var q=0,$=Object.getOwnPropertySymbols(Ce);q<$.length;q++)K.indexOf($[q])<0&&Object.prototype.propertyIsEnumerable.call(Ce,$[q])&&(F[$[q]]=Ce[$[q]]);return F};const ce=(Ce,K)=>{const F={},$=Object.assign({},Ce);return K.forEach(q=>{Ce&&q in Ce&&(F[q]=Ce[q],delete $[q])}),{picked:F,omitted:$}};function ge(Ce,K){const F=Ce.type;if((F.__ANT_BUTTON===!0||Ce.type==="button")&&Ce.props.disabled||F.__ANT_SWITCH===!0&&(Ce.props.disabled||Ce.props.loading)||F.__ANT_RADIO===!0&&Ce.props.disabled){const{picked:$,omitted:q}=ce(Ce.props.style,["position","left","right","top","bottom","float","display","zIndex"]),ae=Object.assign(Object.assign({display:"inline-block"},$),{cursor:"not-allowed",width:Ce.props.block?"100%":void 0}),Z=Object.assign(Object.assign({},q),{pointerEvents:"none"}),E=(0,xe.Tm)(Ce,{style:Z,className:null});return te.createElement("span",{style:ae,className:Me()(Ce.props.className,`${K}-disabled-compatible-wrapper`)},E)}return Ce}const ke=te.forwardRef((Ce,K)=>{var F,$;const{prefixCls:q,openClassName:ae,getTooltipContainer:Z,overlayClassName:E,color:A,overlayInnerStyle:Q,children:fe,afterOpenChange:$e,afterVisibleChange:Ze,destroyTooltipOnHide:it,arrow:tt=!0,title:$t,overlay:ut,builtinPlacements:nt,arrowPointAtCenter:tr=!1,autoAdjustOverflow:sr=!0}=Ce,_r=!!tt,[,ar]=(0,P.Z)(),{getPopupContainer:Yt,getPrefixCls:It,direction:Te}=te.useContext(l.E_),qe=te.useRef(null),Ie=()=>{var Ee;(Ee=qe.current)===null||Ee===void 0||Ee.forceAlign()};te.useImperativeHandle(K,()=>({forceAlign:Ie,forcePopupAlign:()=>{Ie()}}));const[rt,st]=(0,Fe.Z)(!1,{value:(F=Ce.open)!==null&&F!==void 0?F:Ce.visible,defaultValue:($=Ce.defaultOpen)!==null&&$!==void 0?$:Ce.defaultVisible}),z=!$t&&!ut&&$t!==0,oe=Ee=>{var Oe,N;st(z?!1:Ee),z||((Oe=Ce.onOpenChange)===null||Oe===void 0||Oe.call(Ce,Ee),(N=Ce.onVisibleChange)===null||N===void 0||N.call(Ce,Ee))},Ae=te.useMemo(()=>{var Ee,Oe;let N=tr;return typeof tt=="object"&&(N=(Oe=(Ee=tt.pointAtCenter)!==null&&Ee!==void 0?Ee:tt.arrowPointAtCenter)!==null&&Oe!==void 0?Oe:tr),nt||(0,Se.Z)({arrowPointAtCenter:N,autoAdjustOverflow:sr,arrowWidth:_r?ar.sizePopupArrow:0,borderRadius:ar.borderRadius,offset:ar.marginXXS,visibleFirst:!0})},[tr,tt,nt,ar]),ye=te.useMemo(()=>$t===0?$t:ut||$t||"",[ut,$t]),Pe=te.createElement(H.BR,null,typeof ye=="function"?ye():ye),{getPopupContainer:ze,placement:Ve="top",mouseEnterDelay:Je=.1,mouseLeaveDelay:je=.1,overlayStyle:Ke,rootClassName:_t}=Ce,xt=pe(Ce,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName"]),ht=It("tooltip",q),gt=It(),Et=Ce["data-popover-inject"];let pt=rt;!("open"in Ce)&&!("visible"in Ce)&&z&&(pt=!1);const kt=ge((0,xe.l$)(fe)&&!(0,xe.M2)(fe)?fe:te.createElement("span",null,fe),ht),wt=kt.props,_=!wt.className||typeof wt.className=="string"?Me()(wt.className,ae||`${ht}-open`):wt.className,[T,We]=L(ht,!Et),O=re(ht,A),ne=O.arrowStyle,Kt=Object.assign(Object.assign({},Q),O.overlayStyle),ue=Me()(E,{[`${ht}-rtl`]:Te==="rtl"},O.className,_t,We);return T(te.createElement(De.Z,Object.assign({},xt,{showArrow:_r,placement:Ve,mouseEnterDelay:Je,mouseLeaveDelay:je,prefixCls:ht,overlayClassName:ue,overlayStyle:Object.assign(Object.assign({},ne),Ke),getTooltipContainer:ze||Z||Yt,ref:qe,builtinPlacements:Ae,overlay:Pe,visible:pt,onVisibleChange:oe,afterVisibleChange:$e!=null?$e:Ze,overlayInnerStyle:Kt,arrowContent:te.createElement("span",{className:`${ht}-arrow-content`}),motion:{motionName:(0,de.m)(gt,"zoom-big-fast",Ce.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!it}),pt?(0,xe.Tm)(kt,{className:_}):kt))});ke._InternalPanelDoNotUseOrYouWillBeFired=_e;var ve=ke},64018:function(){var Ot,Xe,J,te=!1,we,Me;window.PR_SHOULD_USE_CONTINUATION=!0;var De,Fe;(function(){var de=window,Se=["break,continue,do,else,for,if,return,while"],xe=[Se,"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=[xe,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],H=[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"],x=[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",y=[l,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],v="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",U=[Se,"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"],W=[Se,"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"],I=[Se,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],L=[H,x,P,y,v,U,W,I],V=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,re="str",C="kwd",_e="com",pe="typ",ce="lit",ge="pun",ke="pln",ve="tag",Ce="dec",K="src",F="atn",$="atv",q="nocode",ae="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function Z(Te){for(var qe=0,Ie=!1,rt=!1,st=0,z=Te.length;st<z;++st){var oe=Te[st];if(oe.ignoreCase)rt=!0;else if(/[a-z]/i.test(oe.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){Ie=!0,rt=!1;break}}var Ae={b:8,t:9,n:10,v:11,f:12,r:13};function ye(je){var Ke=je.charCodeAt(0);if(Ke!==92)return Ke;var _t=je.charAt(1);return Ke=Ae[_t],Ke||("0"<=_t&&_t<="7"?parseInt(je.substring(1),8):_t==="u"||_t==="x"?parseInt(je.substring(2),16):je.charCodeAt(1))}function Pe(je){if(je<32)return(je<16?"\\x0":"\\x")+je.toString(16);var Ke=String.fromCharCode(je);return Ke==="\\"||Ke==="-"||Ke==="]"||Ke==="^"?"\\"+Ke:Ke}function ze(je){var Ke=je.substring(1,je.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")),_t=[],xt=Ke[0]==="^",ht=["["];xt&&ht.push("^");for(var gt=xt?1:0,Et=Ke.length;gt<Et;++gt){var pt=Ke[gt];if(/\\[bdsw]/i.test(pt))ht.push(pt);else{var kt=ye(pt),wt;gt+2<Et&&Ke[gt+1]==="-"?(wt=ye(Ke[gt+2]),gt+=2):wt=kt,_t.push([kt,wt]),wt<65||kt>122||(wt<65||kt>90||_t.push([Math.max(65,kt)|32,Math.min(wt,90)|32]),wt<97||kt>122||_t.push([Math.max(97,kt)&-33,Math.min(wt,122)&-33]))}}_t.sort(function(O,ne){return O[0]-ne[0]||ne[1]-O[1]});for(var _=[],T=[],gt=0;gt<_t.length;++gt){var We=_t[gt];We[0]<=T[1]+1?T[1]=Math.max(T[1],We[1]):_.push(T=We)}for(var gt=0;gt<_.length;++gt){var We=_[gt];ht.push(Pe(We[0])),We[1]>We[0]&&(We[1]+1>We[0]&&ht.push("-"),ht.push(Pe(We[1])))}return ht.push("]"),ht.join("")}function Ve(je){for(var Ke=je.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")),_t=Ke.length,xt=[],ht=0,gt=0;ht<_t;++ht){var Et=Ke[ht];if(Et==="(")++gt;else if(Et.charAt(0)==="\\"){var pt=+Et.substring(1);pt&&(pt<=gt?xt[pt]=-1:Ke[ht]=Pe(pt))}}for(var ht=1;ht<xt.length;++ht)xt[ht]===-1&&(xt[ht]=++qe);for(var ht=0,gt=0;ht<_t;++ht){var Et=Ke[ht];if(Et==="(")++gt,xt[gt]||(Ke[ht]="(?:");else if(Et.charAt(0)==="\\"){var pt=+Et.substring(1);pt&&pt<=gt&&(Ke[ht]="\\"+xt[pt])}}for(var ht=0;ht<_t;++ht)Ke[ht]==="^"&&Ke[ht+1]!=="^"&&(Ke[ht]="");if(je.ignoreCase&&Ie)for(var ht=0;ht<_t;++ht){var Et=Ke[ht],kt=Et.charAt(0);Et.length>=2&&kt==="["?Ke[ht]=ze(Et):kt!=="\\"&&(Ke[ht]=Et.replace(/[a-zA-Z]/g,function(T){var We=T.charCodeAt(0);return"["+String.fromCharCode(We&-33,We|32)+"]"}))}return Ke.join("")}for(var Je=[],st=0,z=Te.length;st<z;++st){var oe=Te[st];if(oe.global||oe.multiline)throw new Error(""+oe);Je.push("(?:"+Ve(oe)+")")}return new RegExp(Je.join("|"),rt?"gi":"g")}function E(Te,qe){var Ie=/(?:^|\s)nocode(?:\s|$)/,rt=[],st=0,z=[],oe=0;function Ae(ye){var Pe=ye.nodeType;if(Pe==1){if(Ie.test(ye.className))return;for(var ze=ye.firstChild;ze;ze=ze.nextSibling)Ae(ze);var Ve=ye.nodeName.toLowerCase();(Ve==="br"||Ve==="li")&&(rt[oe]=`
`,z[oe<<1]=st++,z[oe++<<1|1]=ye)}else if(Pe==3||Pe==4){var Je=ye.nodeValue;Je.length&&(qe?Je=Je.replace(/\r\n?/g,`
`):Je=Je.replace(/[ \t\r\n]+/g," "),rt[oe]=Je,z[oe<<1]=st,st+=Je.length,z[oe++<<1|1]=ye)}}return Ae(Te),{sourceCode:rt.join("").replace(/\n$/,""),spans:z}}function A(Te,qe,Ie,rt,st){if(Ie){var z={sourceNode:Te,pre:1,langExtension:null,numberLines:null,sourceCode:Ie,spans:null,basePos:qe,decorations:null};rt(z),st.push.apply(st,z.decorations)}}var Q=/\S/;function fe(Te){for(var qe=void 0,Ie=Te.firstChild;Ie;Ie=Ie.nextSibling){var rt=Ie.nodeType;qe=rt===1?qe?Te:Ie:rt===3&&Q.test(Ie.nodeValue)?Te:qe}return qe===Te?void 0:qe}function $e(Te,qe){var Ie={},rt;(function(){for(var oe=Te.concat(qe),Ae=[],ye={},Pe=0,ze=oe.length;Pe<ze;++Pe){var Ve=oe[Pe],Je=Ve[3];if(Je)for(var je=Je.length;--je>=0;)Ie[Je.charAt(je)]=Ve;var Ke=Ve[1],_t=""+Ke;ye.hasOwnProperty(_t)||(Ae.push(Ke),ye[_t]=null)}Ae.push(/[\0-\uffff]/),rt=Z(Ae)})();var st=qe.length,z=function(oe){for(var Ae=oe.sourceCode,ye=oe.basePos,Pe=oe.sourceNode,ze=[ye,ke],Ve=0,Je=Ae.match(rt)||[],je={},Ke=0,_t=Je.length;Ke<_t;++Ke){var xt=Je[Ke],ht=je[xt],gt=void 0,Et;if(typeof ht=="string")Et=!1;else{var pt=Ie[xt.charAt(0)];if(pt)gt=xt.match(pt[1]),ht=pt[0];else{for(var kt=0;kt<st;++kt)if(pt=qe[kt],gt=xt.match(pt[1]),gt){ht=pt[0];break}gt||(ht=ke)}Et=ht.length>=5&&ht.substring(0,5)==="lang-",Et&&!(gt&&typeof gt[1]=="string")&&(Et=!1,ht=K),Et||(je[xt]=ht)}var wt=Ve;if(Ve+=xt.length,!Et)ze.push(ye+wt,ht);else{var _=gt[1],T=xt.indexOf(_),We=T+_.length;gt[2]&&(We=xt.length-gt[2].length,T=We-_.length);var O=ht.substring(5);A(Pe,ye+wt,xt.substring(0,T),z,ze),A(Pe,ye+wt+T,_,tr(O,_),ze),A(Pe,ye+wt+We,xt.substring(We),z,ze)}}oe.decorations=ze};return z}function Ze(Te){var qe=[],Ie=[];Te.tripleQuotedStrings?qe.push([re,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):Te.multiLineStrings?qe.push([re,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):qe.push([re,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),Te.verbatimStrings&&Ie.push([re,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var rt=Te.hashComments;rt&&(Te.cStyleComments?(rt>1?qe.push([_e,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):qe.push([_e,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),Ie.push([re,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):qe.push([_e,/^#[^\r\n]*/,null,"#"])),Te.cStyleComments&&(Ie.push([_e,/^\/\/[^\r\n]*/,null]),Ie.push([_e,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var st=Te.regexLiterals;if(st){var z=st>1?"":`
\r`,oe=z?".":"[\\S\\s]",Ae="/(?=[^/*"+z+"])(?:[^/\\x5B\\x5C"+z+"]|\\x5C"+oe+"|\\x5B(?:[^\\x5C\\x5D"+z+"]|\\x5C"+oe+")*(?:\\x5D|$))+/";Ie.push(["lang-regex",RegExp("^"+ae+"("+Ae+")")])}var ye=Te.types;ye&&Ie.push([pe,ye]);var Pe=(""+Te.keywords).replace(/^ | $/g,"");Pe.length&&Ie.push([C,new RegExp("^(?:"+Pe.replace(/[\s,]+/g,"|")+")\\b"),null]),qe.push([ke,/^\s+/,null,` \r
\xA0`]);var ze="^.[^\\s\\w.$@'\"`/\\\\]*";return Te.regexLiterals&&(ze+="(?!s*/)"),Ie.push([ce,/^@[a-z_$][a-z_$@0-9]*/i,null],[pe,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[ke,/^[a-z_$][a-z_$@0-9]*/i,null],[ce,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[ke,/^\\[\s\S]?/,null],[ge,new RegExp(ze),null]),$e(qe,Ie)}var it=Ze({keywords:L,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function tt(Te,qe,Ie){for(var rt=/(?:^|\s)nocode(?:\s|$)/,st=/\r\n?|\n/,z=Te.ownerDocument,oe=z.createElement("li");Te.firstChild;)oe.appendChild(Te.firstChild);var Ae=[oe];function ye(Ke){var _t=Ke.nodeType;if(_t==1&&!rt.test(Ke.className))if(Ke.nodeName==="br")Pe(Ke),Ke.parentNode&&Ke.parentNode.removeChild(Ke);else for(var xt=Ke.firstChild;xt;xt=xt.nextSibling)ye(xt);else if((_t==3||_t==4)&&Ie){var ht=Ke.nodeValue,gt=ht.match(st);if(gt){var Et=ht.substring(0,gt.index);Ke.nodeValue=Et;var pt=ht.substring(gt.index+gt[0].length);if(pt){var kt=Ke.parentNode;kt.insertBefore(z.createTextNode(pt),Ke.nextSibling)}Pe(Ke),Et||Ke.parentNode.removeChild(Ke)}}}function Pe(Ke){for(;!Ke.nextSibling;)if(Ke=Ke.parentNode,!Ke)return;function _t(gt,Et){var pt=Et?gt.cloneNode(!1):gt,kt=gt.parentNode;if(kt){var wt=_t(kt,1),_=gt.nextSibling;wt.appendChild(pt);for(var T=_;T;T=_)_=T.nextSibling,wt.appendChild(T)}return pt}for(var xt=_t(Ke.nextSibling,0),ht;(ht=xt.parentNode)&&ht.nodeType===1;)xt=ht;Ae.push(xt)}for(var ze=0;ze<Ae.length;++ze)ye(Ae[ze]);qe===(qe|0)&&Ae[0].setAttribute("value",qe);var Ve=z.createElement("ol");Ve.className="linenums";for(var Je=Math.max(0,qe-1|0)||0,ze=0,je=Ae.length;ze<je;++ze)oe=Ae[ze],oe.className="L"+(ze+Je)%10,oe.firstChild||oe.appendChild(z.createTextNode("\xA0")),Ve.appendChild(oe);Te.appendChild(Ve)}function $t(Te){var qe=/\bMSIE\s(\d+)/.exec(navigator.userAgent);qe=qe&&+qe[1]<=8;var Ie=/\n/g,rt=Te.sourceCode,st=rt.length,z=0,oe=Te.spans,Ae=oe.length,ye=0,Pe=Te.decorations,ze=Pe.length,Ve=0;Pe[ze]=st;var Je,je;for(je=Je=0;je<ze;)Pe[je]!==Pe[je+2]?(Pe[Je++]=Pe[je++],Pe[Je++]=Pe[je++]):je+=2;for(ze=Je,je=Je=0;je<ze;){for(var Ke=Pe[je],_t=Pe[je+1],xt=je+2;xt+2<=ze&&Pe[xt+1]===_t;)xt+=2;Pe[Je++]=Ke,Pe[Je++]=_t,je=xt}ze=Pe.length=Je;var ht=Te.sourceNode,gt="";ht&&(gt=ht.style.display,ht.style.display="none");try{for(var Et=null;ye<Ae;){var pt=oe[ye],kt=oe[ye+2]||st,wt=Pe[Ve+2]||st,xt=Math.min(kt,wt),_=oe[ye+1],T;if(_.nodeType!==1&&(T=rt.substring(z,xt))){qe&&(T=T.replace(Ie,"\r")),_.nodeValue=T;var We=_.ownerDocument,O=We.createElement("span");O.className=Pe[Ve+1];var ne=_.parentNode;ne.replaceChild(O,_),O.appendChild(_),z<kt&&(oe[ye+1]=_=We.createTextNode(rt.substring(xt,kt)),ne.insertBefore(_,O.nextSibling))}z=xt,z>=kt&&(ye+=2),z>=wt&&(Ve+=2)}}finally{ht&&(ht.style.display=gt)}}var ut={};function nt(Te,qe){for(var Ie=qe.length;--Ie>=0;){var rt=qe[Ie];ut.hasOwnProperty(rt)?de.console&&console.warn("cannot override language handler %s",rt):ut[rt]=Te}}function tr(Te,qe){return Te&&ut.hasOwnProperty(Te)||(Te=/^\s*</.test(qe)?"default-markup":"default-code"),ut[Te]}nt(it,["default-code"]),nt($e([],[[ke,/^[^<?]+/],[Ce,/^<!\w[^>]*(?:>|$)/],[_e,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[ge,/^(?:<[%?]|[%?]>)/],["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"]),nt($e([[ke,/^[\s]+/,null,` \r
`],[$,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[ve,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[F,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[ge,/^[=<>\/]+/],["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"]),nt($e([],[[$,/^[\s\S]+/]]),["uq.val"]),nt(Ze({keywords:H,hashComments:!0,cStyleComments:!0,types:V}),["c","cc","cpp","cxx","cyc","m"]),nt(Ze({keywords:"null,true,false"}),["json"]),nt(Ze({keywords:x,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:V}),["cs"]),nt(Ze({keywords:P,cStyleComments:!0}),["java"]),nt(Ze({keywords:I,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),nt(Ze({keywords:U,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),nt(Ze({keywords:v,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),nt(Ze({keywords:W,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),nt(Ze({keywords:y,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),nt(Ze({keywords:d,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),nt($e([],[[re,/^[\s\S]+/]]),["regex"]);function sr(Te){var qe=Te.langExtension;try{var Ie=E(Te.sourceNode,Te.pre),rt=Ie.sourceCode;Te.sourceCode=rt,Te.spans=Ie.spans,Te.basePos=0,tr(qe,rt)(Te),$t(Te)}catch(st){de.console&&console.log(st&&st.stack||st)}}function _r(Te,qe,Ie){var rt=Ie||!1,st=qe||null,z=document.createElement("div");z.innerHTML="<pre>"+Te+"</pre>",z=z.firstChild,rt&&tt(z,rt,!0);var oe={langExtension:st,numberLines:rt,sourceNode:z,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return sr(oe),z.innerHTML}function ar(Te,qe){var Ie=qe||document.body,rt=Ie.ownerDocument||document;function st(pt){return Ie.getElementsByTagName(pt)}for(var z=[st("pre"),st("code"),st("xmp")],oe=[],Ae=0;Ae<z.length;++Ae)for(var ye=0,Pe=z[Ae].length;ye<Pe;++ye)oe.push(z[Ae][ye]);z=null;var ze=Date;ze.now||(ze={now:function(){return+new Date}});var Ve=0,Je=/\blang(?:uage)?-([\w.]+)(?!\S)/,je=/\bprettyprint\b/,Ke=/\bprettyprinted\b/,_t=/pre|xmp/i,xt=/^code$/i,ht=/^(?:pre|code|xmp)$/i,gt={};function Et(){for(var pt=de.PR_SHOULD_USE_CONTINUATION?ze.now()+250:1/0;Ve<oe.length&&ze.now()<pt;Ve++){for(var kt=oe[Ve],wt=gt,_=kt;_=_.previousSibling;){var T=_.nodeType,We=(T===7||T===8)&&_.nodeValue;if(We?!/^\??prettify\b/.test(We):T!==3||/\S/.test(_.nodeValue))break;if(We){wt={},We.replace(/\b(\w+)=([\w:.%+-]+)/g,function(se,Tt,Ct){wt[Tt]=Ct});break}}var O=kt.className;if((wt!==gt||je.test(O))&&!Ke.test(O)){for(var ne=!1,Kt=kt.parentNode;Kt;Kt=Kt.parentNode){var ue=Kt.tagName;if(ht.test(ue)&&Kt.className&&je.test(Kt.className)){ne=!0;break}}if(!ne){kt.className+=" prettyprinted";var Ee=wt.lang;if(!Ee){Ee=O.match(Je);var Oe;!Ee&&(Oe=fe(kt))&&xt.test(Oe.tagName)&&(Ee=Oe.className.match(Je)),Ee&&(Ee=Ee[1])}var N;if(_t.test(kt.tagName))N=1;else{var Y=kt.currentStyle,le=rt.defaultView,be=Y?Y.whiteSpace:le&&le.getComputedStyle?le.getComputedStyle(kt,null).getPropertyValue("white-space"):0;N=be&&be.substring(0,3)==="pre"}var R=wt.linenums;(R=R==="true"||+R)||(R=O.match(/\blinenums\b(?::(\d+))?/),R=R?R[1]&&R[1].length?+R[1]:!0:!1),R&&tt(kt,R,N);var ft={langExtension:Ee,sourceNode:kt,numberLines:R,pre:N,sourceCode:null,basePos:null,spans:null,decorations:null};sr(ft)}}}Ve<oe.length?de.setTimeout(Et,250):typeof Te=="function"&&Te()}Et()}var Yt=de.PR={createSimpleLexer:$e,registerLangHandler:nt,sourceDecorator:Ze,PR_ATTRIB_NAME:F,PR_ATTRIB_VALUE:$,PR_COMMENT:_e,PR_DECLARATION:Ce,PR_KEYWORD:C,PR_LITERAL:ce,PR_NOCODE:q,PR_PLAIN:ke,PR_PUNCTUATION:ge,PR_SOURCE:K,PR_STRING:re,PR_TAG:ve,PR_TYPE:pe,prettyPrintOne:te?de.prettyPrintOne=_r:De=_r,prettyPrint:Fe=te?de.prettyPrint=ar:Fe=ar},It=de.define;typeof It=="function"&&It.amd&&It("google-code-prettify",[],function(){return Yt})})()},25769:function(Ot,Xe,J){"use strict";var te=J(98040),we={"text/plain":"Text","text/html":"Url",default:"Text"},Me="Copy to clipboard: #{key}, Enter";function De(de){var Se=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return de.replace(/#{\s*key\s*}/g,Se)}function Fe(de,Se){var xe,l,H,P,x,d,y=!1;Se||(Se={}),xe=Se.debug||!1;try{H=te(),P=document.createRange(),x=document.getSelection(),d=document.createElement("span"),d.textContent=de,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(U){if(U.stopPropagation(),Se.format)if(U.preventDefault(),typeof U.clipboardData=="undefined"){xe&&console.warn("unable to use e.clipboardData"),xe&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var W=we[Se.format]||we.default;window.clipboardData.setData(W,de)}else U.clipboardData.clearData(),U.clipboardData.setData(Se.format,de);Se.onCopy&&(U.preventDefault(),Se.onCopy(U.clipboardData))}),document.body.appendChild(d),P.selectNodeContents(d),x.addRange(P);var v=document.execCommand("copy");if(!v)throw new Error("copy command was unsuccessful");y=!0}catch(U){xe&&console.error("unable to copy using execCommand: ",U),xe&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(Se.format||"text",de),Se.onCopy&&Se.onCopy(window.clipboardData),y=!0}catch(W){xe&&console.error("unable to copy using clipboardData: ",W),xe&&console.error("falling back to prompt"),l=De("message"in Se?Se.message:Me),window.prompt(l,de)}}finally{x&&(typeof x.removeRange=="function"?x.removeRange(P):x.removeAllRanges()),d&&document.body.removeChild(d),H()}return y}Ot.exports=Fe},53184:function(Ot,Xe,J){"use strict";var te,we;function Me(De,Fe,de){var Se=function(xe,l){return De.js_beautify(xe,l)};return Se.js=De.js_beautify,Se.css=Fe.css_beautify,Se.html=de.html_beautify,Se.js_beautify=De.js_beautify,Se.css_beautify=Fe.css_beautify,Se.html_beautify=de.html_beautify,Se}te=[J(58553),J(87804),J(40998)],we=function(De,Fe,de){return Me(De,Fe,de)}.apply(Xe,te),we!==void 0&&(Ot.exports=we)},87804:function(Ot,Xe){var J,te;(function(){var we;(function(){"use strict";var De=[,,function(xe){function l(x){this.__parent=x,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 x=new l(this.__parent);return x.set_indent(this.__indent_count,this.__alignment_count),x},l.prototype.item=function(x){return x<0?this.__items[this.__items.length+x]:this.__items[x]},l.prototype.has_match=function(x){for(var d=this.__items.length-1;d>=0;d--)if(this.__items[d].match(x))return!0;return!1},l.prototype.set_indent=function(x,d){this.is_empty()&&(this.__indent_count=x||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 x=this.__parent.current_line;return x.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),x.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),x.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,x.__items[0]===" "&&(x.__items.splice(0,1),x.__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(x){this.__items.push(x);var d=x.lastIndexOf(`
`);d!==-1?this.__character_count=x.length-d:this.__character_count+=x.length},l.prototype.pop=function(){var x=null;return this.is_empty()||(x=this.__items.pop(),this.__character_count-=x.length),x},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 x="";return this.is_empty()?this.__parent.indent_empty_lines&&(x=this.__parent.get_indent_string(this.__indent_count)):(x=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),x+=this.__items.join("")),x};function H(x,d){this.__cache=[""],this.__indent_size=x.indent_size,this.__indent_string=x.indent_char,x.indent_with_tabs||(this.__indent_string=new Array(x.indent_size+1).join(x.indent_char)),d=d||"",x.indent_level>0&&(d=new Array(x.indent_level+1).join(this.__indent_string)),this.__base_string=d,this.__base_string_length=d.length}H.prototype.get_indent_size=function(x,d){var y=this.__base_string_length;return d=d||0,x<0&&(y=0),y+=x*this.__indent_size,y+=d,y},H.prototype.get_indent_string=function(x,d){var y=this.__base_string;return d=d||0,x<0&&(x=0,y=""),d+=x*this.__indent_size,this.__ensure_cache(d),y+=this.__cache[d],y},H.prototype.__ensure_cache=function(x){for(;x>=this.__cache.length;)this.__add_column()},H.prototype.__add_column=function(){var x=this.__cache.length,d=0,y="";this.__indent_size&&x>=this.__indent_size&&(d=Math.floor(x/this.__indent_size),x-=d*this.__indent_size,y=new Array(d+1).join(this.__indent_string)),x&&(y+=new Array(x+1).join(" ")),this.__cache.push(y)};function P(x,d){this.__indent_cache=new H(x,d),this.raw=!1,this._end_with_newline=x.end_with_newline,this.indent_size=x.indent_size,this.wrap_line_length=x.wrap_line_length,this.indent_empty_lines=x.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(x,d){return this.__indent_cache.get_indent_string(x,d)},P.prototype.get_indent_size=function(x,d){return this.__indent_cache.get_indent_size(x,d)},P.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},P.prototype.add_new_line=function(x){return this.is_empty()||!x&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},P.prototype.get_code=function(x){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 y=this.__lines.join(`
`);return x!==`
`&&(y=y.replace(/[\n]/g,x)),y},P.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},P.prototype.set_indent=function(x,d){return x=x||0,d=d||0,this.next_line.set_indent(x,d),this.__lines.length>1?(this.current_line.set_indent(x,d),!0):(this.current_line.set_indent(),!1)},P.prototype.add_raw_token=function(x){for(var d=0;d<x.newlines;d++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(x.whitespace_before),this.current_line.push(x.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},P.prototype.add_token=function(x){this.__add_space_before_token(),this.current_line.push(x),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(x){for(var d=this.__lines.length;x<d;)this.__lines[x]._remove_indent(),x++;this.current_line._remove_wrap_indent()},P.prototype.trim=function(x){for(x=x===void 0?!1:x,this.current_line.trim();x&&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(x,d){for(var y=this.__lines.length-2;y>=0;){var v=this.__lines[y];if(v.is_empty())break;if(v.item(0).indexOf(x)!==0&&v.item(-1)!==d){this.__lines.splice(y+1,0,new l(this)),this.previous_line=this.__lines[this.__lines.length-2];break}y--}},xe.exports.Output=P},,,,function(xe){function l(x,d){this.raw_options=H(x,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(x,d){var y=this.raw_options[x],v=d||[];return typeof y=="object"?y!==null&&typeof y.concat=="function"&&(v=y.concat()):typeof y=="string"&&(v=y.split(/[^a-zA-Z0-9_\/\-]+/)),v},l.prototype._get_boolean=function(x,d){var y=this.raw_options[x],v=y===void 0?!!d:!!y;return v},l.prototype._get_characters=function(x,d){var y=this.raw_options[x],v=d||"";return typeof y=="string"&&(v=y.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),v},l.prototype._get_number=function(x,d){var y=this.raw_options[x];d=parseInt(d,10),isNaN(d)&&(d=0);var v=parseInt(y,10);return isNaN(v)&&(v=d),v},l.prototype._get_selection=function(x,d,y){var v=this._get_selection_list(x,d,y);if(v.length!==1)throw new Error("Invalid Option Value: The option '"+x+`' can only be one of the following values:
`+d+`
You passed in: '`+this.raw_options[x]+"'");return v[0]},l.prototype._get_selection_list=function(x,d,y){if(!d||d.length===0)throw new Error("Selection list cannot be empty.");if(y=y||[d[0]],!this._is_valid_selection(y,d))throw new Error("Invalid Default Value!");var v=this._get_array(x,y);if(!this._is_valid_selection(v,d))throw new Error("Invalid Option Value: The option '"+x+`' can contain only the following values:
`+d+`
You passed in: '`+this.raw_options[x]+"'");return v},l.prototype._is_valid_selection=function(x,d){return x.length&&d.length&&!x.some(function(y){return d.indexOf(y)===-1})};function H(x,d){var y={};x=P(x);var v;for(v in x)v!==d&&(y[v]=x[v]);if(d&&x[d])for(v in x[d])y[v]=x[d][v];return y}function P(x){var d={},y;for(y in x){var v=y.replace(/-/g,"_");d[v]=x[y]}return d}xe.exports.Options=l,xe.exports.normalizeOpts=P,xe.exports.mergeOpts=H},,function(xe){var l=RegExp.prototype.hasOwnProperty("sticky");function H(P){this.__input=P||"",this.__input_length=this.__input.length,this.__position=0}H.prototype.restart=function(){this.__position=0},H.prototype.back=function(){this.__position>0&&(this.__position-=1)},H.prototype.hasNext=function(){return this.__position<this.__input_length},H.prototype.next=function(){var P=null;return this.hasNext()&&(P=this.__input.charAt(this.__position),this.__position+=1),P},H.prototype.peek=function(P){var x=null;return P=P||0,P+=this.__position,P>=0&&P<this.__input_length&&(x=this.__input.charAt(P)),x},H.prototype.__match=function(P,x){P.lastIndex=x;var d=P.exec(this.__input);return d&&!(l&&P.sticky)&&d.index!==x&&(d=null),d},H.prototype.test=function(P,x){return x=x||0,x+=this.__position,x>=0&&x<this.__input_length?!!this.__match(P,x):!1},H.prototype.testChar=function(P,x){var d=this.peek(x);return P.lastIndex=0,d!==null&&P.test(d)},H.prototype.match=function(P){var x=this.__match(P,this.__position);return x?this.__position+=x[0].length:x=null,x},H.prototype.read=function(P,x,d){var y="",v;return P&&(v=this.match(P),v&&(y+=v[0])),x&&(v||!P)&&(y+=this.readUntil(x,d)),y},H.prototype.readUntil=function(P,x){var d="",y=this.__position;P.lastIndex=this.__position;var v=P.exec(this.__input);return v?(y=v.index,x&&(y+=v[0].length)):y=this.__input_length,d=this.__input.substring(this.__position,y),this.__position=y,d},H.prototype.readUntilAfter=function(P){return this.readUntil(P,!0)},H.prototype.get_regexp=function(P,x){var d=null,y="g";return x&&l&&(y="y"),typeof P=="string"&&P!==""?d=new RegExp(P,y):P&&(d=new RegExp(P.source,y)),d},H.prototype.get_literal_regexp=function(P){return RegExp(P.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},H.prototype.peekUntilAfter=function(P){var x=this.__position,d=this.readUntilAfter(P);return this.__position=x,d},H.prototype.lookBack=function(P){var x=this.__position-1;return x>=P.length&&this.__input.substring(x-P.length,x).toLowerCase()===P},xe.exports.InputScanner=H},,,,,function(xe){function l(H,P){H=typeof H=="string"?H:H.source,P=typeof P=="string"?P:P.source,this.__directives_block_pattern=new RegExp(H+/ beautify( \w+[:]\w+)+ /.source+P,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(H+/\sbeautify\signore:end\s/.source+P,"g")}l.prototype.get_directives=function(H){if(!H.match(this.__directives_block_pattern))return null;var P={};this.__directive_pattern.lastIndex=0;for(var x=this.__directive_pattern.exec(H);x;)P[x[1]]=x[2],x=this.__directive_pattern.exec(H);return P},l.prototype.readIgnored=function(H){return H.readUntilAfter(this.__directives_end_ignore_pattern)},xe.exports.Directives=l},,function(xe,l,H){var P=H(16).Beautifier,x=H(17).Options;function d(y,v){var U=new P(y,v);return U.beautify()}xe.exports=d,xe.exports.defaultOptions=function(){return new x}},function(xe,l,H){var P=H(17).Options,x=H(2).Output,d=H(8).InputScanner,y=H(13).Directives,v=new y(/\/\*/,/\*\//),U=/\r\n|[\r\n]/,W=/\r\n|[\r\n]/g,I=/\s/,L=/(?:\s|\n)+/g,V=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,re=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function C(_e,pe){this._source_text=_e||"",this._options=new P(pe),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"]}C.prototype.eatString=function(_e){var pe="";for(this._ch=this._input.next();this._ch;){if(pe+=this._ch,this._ch==="\\")pe+=this._input.next();else if(_e.indexOf(this._ch)!==-1||this._ch===`
`)break;this._ch=this._input.next()}return pe},C.prototype.eatWhitespace=function(_e){for(var pe=I.test(this._input.peek()),ce=0;I.test(this._input.peek());)this._ch=this._input.next(),_e&&this._ch===`
`&&(ce===0||ce<this._options.max_preserve_newlines)&&(ce++,this._output.add_new_line(!0));return pe},C.prototype.foundNestedPseudoClass=function(){for(var _e=0,pe=1,ce=this._input.peek(pe);ce;){if(ce==="{")return!0;if(ce==="(")_e+=1;else if(ce===")"){if(_e===0)return!1;_e-=1}else if(ce===";"||ce==="}")return!1;pe++,ce=this._input.peek(pe)}return!1},C.prototype.print_string=function(_e){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(_e)},C.prototype.preserveSingleSpace=function(_e){_e&&(this._output.space_before_token=!0)},C.prototype.indent=function(){this._indentLevel++},C.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},C.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var _e=this._source_text,pe=this._options.eol;pe==="auto"&&(pe=`
`,_e&&U.test(_e||"")&&(pe=_e.match(U)[0])),_e=_e.replace(W,`
`);var ce=_e.match(/^[\t ]*/)[0];this._output=new x(this._options,ce),this._input=new d(_e),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var ge=0,ke=!1,ve=!1,Ce=!1,K=!1,F=!1,$=this._ch,q=!1,ae,Z,E;ae=this._input.read(L),Z=ae!=="",E=$,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),$=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var A=this._input.read(V),Q=v.get_directives(A);Q&&Q.ignore==="start"&&(A+=v.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(re)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(Z),this.print_string(this._ch);var fe=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);fe.match(/[ :]$/)&&(fe=this.eatString(": ").replace(/\s+$/,""),this.print_string(fe),this._output.space_before_token=!0),ge===0&&fe.indexOf(":")!==-1&&(ve=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(Z),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var $e=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);$e.match(/[ :]$/)&&($e=this.eatString(": ").replace(/\s+$/,""),this.print_string($e),this._output.space_before_token=!0),ge===0&&$e.indexOf(":")!==-1?(ve=!0,this.indent()):$e in this.NESTED_AT_RULE?(this._nestedLevel+=1,$e in this.CONDITIONAL_GROUP_RULE&&(Ce=!0)):ge===0&&!ve&&(K=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(Z),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")ve&&(ve=!1,this.outdent()),K=!1,Ce?(Ce=!1,ke=this._indentLevel>=this._nestedLevel):ke=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&ke&&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)):(E==="("?this._output.space_before_token=!1:E!==","&&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(),E==="{"&&this._output.trim(!0),ve&&(this.outdent(),ve=!1),this.print_string(this._ch),ke=!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 Ze=0;Ze<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;Ze++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[Ze])){q=!0;break}(ke||Ce)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!K&&ge===0?(this.print_string(":"),ve||(ve=!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 it=E==='"'||E==="'";this.preserveSingleSpace(it||Z),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")q=!1,ge===0?(ve&&(this.outdent(),ve=!1),K=!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(),ge++,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(")")),ge&&(ge--,this.outdent()));else{var tt=!1;this._input.lookBack("with")&&(tt=!0),this.preserveSingleSpace(Z||tt),this.print_string(this._ch),ve&&E==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),F=!0):(this.eatWhitespace(),ge++,this.indent())}else if(this._ch===")")ge&&(ge--,this.outdent()),F&&this._input.peek()===";"&&this._options.selector_separator_newline&&(F=!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&&(!ve||F)&&ge===0&&!K?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!ve&&ge===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&&I.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(Z),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),I.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 $t=E==='"'||E==="'";this.preserveSingleSpace($t||Z),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
`&&q&&this._output.add_new_line()}var ut=this._output.get_code(pe);return ut},xe.exports.Beautifier=C},function(xe,l,H){var P=H(6).Options;function x(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 y=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||y;var v=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var U=0;U<v.length;U++)v[U]!=="expand"?this.brace_style="collapse":this.brace_style=v[U]}x.prototype=new P,xe.exports.Options=x}],Fe={};function de(xe){var l=Fe[xe];if(l!==void 0)return l.exports;var H=Fe[xe]={exports:{}};return De[xe](H,H.exports,de),H.exports}var Se=de(15);we=Se})();var Me=we;J=[],te=function(){return{css_beautify:Me}}.apply(Xe,J),te!==void 0&&(Ot.exports=te)})()},40998:function(Ot,Xe,J){var te,we;(function(){var Me;(function(){"use strict";var Se=[,,function(P){function x(v){this.__parent=v,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=[]}x.prototype.clone_empty=function(){var v=new x(this.__parent);return v.set_indent(this.__indent_count,this.__alignment_count),v},x.prototype.item=function(v){return v<0?this.__items[this.__items.length+v]:this.__items[v]},x.prototype.has_match=function(v){for(var U=this.__items.length-1;U>=0;U--)if(this.__items[U].match(v))return!0;return!1},x.prototype.set_indent=function(v,U){this.is_empty()&&(this.__indent_count=v||0,this.__alignment_count=U||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},x.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)},x.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},x.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var v=this.__parent.current_line;return v.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),v.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),v.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,v.__items[0]===" "&&(v.__items.splice(0,1),v.__character_count-=1),!0}return!1},x.prototype.is_empty=function(){return this.__items.length===0},x.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},x.prototype.push=function(v){this.__items.push(v);var U=v.lastIndexOf(`
`);U!==-1?this.__character_count=v.length-U:this.__character_count+=v.length},x.prototype.pop=function(){var v=null;return this.is_empty()||(v=this.__items.pop(),this.__character_count-=v.length),v},x.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},x.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},x.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},x.prototype.toString=function(){var v="";return this.is_empty()?this.__parent.indent_empty_lines&&(v=this.__parent.get_indent_string(this.__indent_count)):(v=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),v+=this.__items.join("")),v};function d(v,U){this.__cache=[""],this.__indent_size=v.indent_size,this.__indent_string=v.indent_char,v.indent_with_tabs||(this.__indent_string=new Array(v.indent_size+1).join(v.indent_char)),U=U||"",v.indent_level>0&&(U=new Array(v.indent_level+1).join(this.__indent_string)),this.__base_string=U,this.__base_string_length=U.length}d.prototype.get_indent_size=function(v,U){var W=this.__base_string_length;return U=U||0,v<0&&(W=0),W+=v*this.__indent_size,W+=U,W},d.prototype.get_indent_string=function(v,U){var W=this.__base_string;return U=U||0,v<0&&(v=0,W=""),U+=v*this.__indent_size,this.__ensure_cache(U),W+=this.__cache[U],W},d.prototype.__ensure_cache=function(v){for(;v>=this.__cache.length;)this.__add_column()},d.prototype.__add_column=function(){var v=this.__cache.length,U=0,W="";this.__indent_size&&v>=this.__indent_size&&(U=Math.floor(v/this.__indent_size),v-=U*this.__indent_size,W=new Array(U+1).join(this.__indent_string)),v&&(W+=new Array(v+1).join(" ")),this.__cache.push(W)};function y(v,U){this.__indent_cache=new d(v,U),this.raw=!1,this._end_with_newline=v.end_with_newline,this.indent_size=v.indent_size,this.wrap_line_length=v.wrap_line_length,this.indent_empty_lines=v.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new x(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}y.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},y.prototype.get_line_number=function(){return this.__lines.length},y.prototype.get_indent_string=function(v,U){return this.__indent_cache.get_indent_string(v,U)},y.prototype.get_indent_size=function(v,U){return this.__indent_cache.get_indent_size(v,U)},y.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},y.prototype.add_new_line=function(v){return this.is_empty()||!v&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},y.prototype.get_code=function(v){this.trim(!0);var U=this.current_line.pop();U&&(U[U.length-1]===`
`&&(U=U.replace(/\n+$/g,"")),this.current_line.push(U)),this._end_with_newline&&this.__add_outputline();var W=this.__lines.join(`
`);return v!==`
`&&(W=W.replace(/[\n]/g,v)),W},y.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},y.prototype.set_indent=function(v,U){return v=v||0,U=U||0,this.next_line.set_indent(v,U),this.__lines.length>1?(this.current_line.set_indent(v,U),!0):(this.current_line.set_indent(),!1)},y.prototype.add_raw_token=function(v){for(var U=0;U<v.newlines;U++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(v.whitespace_before),this.current_line.push(v.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},y.prototype.add_token=function(v){this.__add_space_before_token(),this.current_line.push(v),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},y.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(" "))},y.prototype.remove_indent=function(v){for(var U=this.__lines.length;v<U;)this.__lines[v]._remove_indent(),v++;this.current_line._remove_wrap_indent()},y.prototype.trim=function(v){for(v=v===void 0?!1:v,this.current_line.trim();v&&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},y.prototype.just_added_newline=function(){return this.current_line.is_empty()},y.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},y.prototype.ensure_empty_line_above=function(v,U){for(var W=this.__lines.length-2;W>=0;){var I=this.__lines[W];if(I.is_empty())break;if(I.item(0).indexOf(v)!==0&&I.item(-1)!==U){this.__lines.splice(W+1,0,new x(this)),this.previous_line=this.__lines[this.__lines.length-2];break}W--}},P.exports.Output=y},function(P){function x(d,y,v,U){this.type=d,this.text=y,this.comments_before=null,this.newlines=v||0,this.whitespace_before=U||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}P.exports.Token=x},,,function(P){function x(v,U){this.raw_options=d(v,U),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"])}x.prototype._get_array=function(v,U){var W=this.raw_options[v],I=U||[];return typeof W=="object"?W!==null&&typeof W.concat=="function"&&(I=W.concat()):typeof W=="string"&&(I=W.split(/[^a-zA-Z0-9_\/\-]+/)),I},x.prototype._get_boolean=function(v,U){var W=this.raw_options[v],I=W===void 0?!!U:!!W;return I},x.prototype._get_characters=function(v,U){var W=this.raw_options[v],I=U||"";return typeof W=="string"&&(I=W.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),I},x.prototype._get_number=function(v,U){var W=this.raw_options[v];U=parseInt(U,10),isNaN(U)&&(U=0);var I=parseInt(W,10);return isNaN(I)&&(I=U),I},x.prototype._get_selection=function(v,U,W){var I=this._get_selection_list(v,U,W);if(I.length!==1)throw new Error("Invalid Option Value: The option '"+v+`' can only be one of the following values:
`+U+`
You passed in: '`+this.raw_options[v]+"'");return I[0]},x.prototype._get_selection_list=function(v,U,W){if(!U||U.length===0)throw new Error("Selection list cannot be empty.");if(W=W||[U[0]],!this._is_valid_selection(W,U))throw new Error("Invalid Default Value!");var I=this._get_array(v,W);if(!this._is_valid_selection(I,U))throw new Error("Invalid Option Value: The option '"+v+`' can contain only the following values:
`+U+`
You passed in: '`+this.raw_options[v]+"'");return I},x.prototype._is_valid_selection=function(v,U){return v.length&&U.length&&!v.some(function(W){return U.indexOf(W)===-1})};function d(v,U){var W={};v=y(v);var I;for(I in v)I!==U&&(W[I]=v[I]);if(U&&v[U])for(I in v[U])W[I]=v[U][I];return W}function y(v){var U={},W;for(W in v){var I=W.replace(/-/g,"_");U[I]=v[W]}return U}P.exports.Options=x,P.exports.normalizeOpts=y,P.exports.mergeOpts=d},,function(P){var x=RegExp.prototype.hasOwnProperty("sticky");function d(y){this.__input=y||"",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 y=null;return this.hasNext()&&(y=this.__input.charAt(this.__position),this.__position+=1),y},d.prototype.peek=function(y){var v=null;return y=y||0,y+=this.__position,y>=0&&y<this.__input_length&&(v=this.__input.charAt(y)),v},d.prototype.__match=function(y,v){y.lastIndex=v;var U=y.exec(this.__input);return U&&!(x&&y.sticky)&&U.index!==v&&(U=null),U},d.prototype.test=function(y,v){return v=v||0,v+=this.__position,v>=0&&v<this.__input_length?!!this.__match(y,v):!1},d.prototype.testChar=function(y,v){var U=this.peek(v);return y.lastIndex=0,U!==null&&y.test(U)},d.prototype.match=function(y){var v=this.__match(y,this.__position);return v?this.__position+=v[0].length:v=null,v},d.prototype.read=function(y,v,U){var W="",I;return y&&(I=this.match(y),I&&(W+=I[0])),v&&(I||!y)&&(W+=this.readUntil(v,U)),W},d.prototype.readUntil=function(y,v){var U="",W=this.__position;y.lastIndex=this.__position;var I=y.exec(this.__input);return I?(W=I.index,v&&(W+=I[0].length)):W=this.__input_length,U=this.__input.substring(this.__position,W),this.__position=W,U},d.prototype.readUntilAfter=function(y){return this.readUntil(y,!0)},d.prototype.get_regexp=function(y,v){var U=null,W="g";return v&&x&&(W="y"),typeof y=="string"&&y!==""?U=new RegExp(y,W):y&&(U=new RegExp(y.source,W)),U},d.prototype.get_literal_regexp=function(y){return RegExp(y.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},d.prototype.peekUntilAfter=function(y){var v=this.__position,U=this.readUntilAfter(y);return this.__position=v,U},d.prototype.lookBack=function(y){var v=this.__position-1;return v>=y.length&&this.__input.substring(v-y.length,v).toLowerCase()===y},P.exports.InputScanner=d},function(P,x,d){var y=d(8).InputScanner,v=d(3).Token,U=d(10).TokenStream,W=d(11).WhitespacePattern,I={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},L=function(V,re){this._input=new y(V),this._options=re||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new W(this._input)};L.prototype.tokenize=function(){this._input.restart(),this.__tokens=new U,this._reset();for(var V,re=new v(I.START,""),C=null,_e=[],pe=new U;re.type!==I.EOF;){for(V=this._get_next_token(re,C);this._is_comment(V);)pe.add(V),V=this._get_next_token(re,C);pe.isEmpty()||(V.comments_before=pe,pe=new U),V.parent=C,this._is_opening(V)?(_e.push(C),C=V):C&&this._is_closing(V,C)&&(V.opened=C,C.closed=V,C=_e.pop(),V.parent=C),V.previous=re,re.next=V,this.__tokens.add(V),re=V}return this.__tokens},L.prototype._is_first_token=function(){return this.__tokens.isEmpty()},L.prototype._reset=function(){},L.prototype._get_next_token=function(V,re){this._readWhitespace();var C=this._input.read(/.+/g);return C?this._create_token(I.RAW,C):this._create_token(I.EOF,"")},L.prototype._is_comment=function(V){return!1},L.prototype._is_opening=function(V){return!1},L.prototype._is_closing=function(V,re){return!1},L.prototype._create_token=function(V,re){var C=new v(V,re,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return C},L.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},P.exports.Tokenizer=L,P.exports.TOKEN=I},function(P){function x(d){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=d}x.prototype.restart=function(){this.__position=0},x.prototype.isEmpty=function(){return this.__tokens_length===0},x.prototype.hasNext=function(){return this.__position<this.__tokens_length},x.prototype.next=function(){var d=null;return this.hasNext()&&(d=this.__tokens[this.__position],this.__position+=1),d},x.prototype.peek=function(d){var y=null;return d=d||0,d+=this.__position,d>=0&&d<this.__tokens_length&&(y=this.__tokens[d]),y},x.prototype.add=function(d){this.__parent_token&&(d.parent=this.__parent_token),this.__tokens.push(d),this.__tokens_length+=1},P.exports.TokenStream=x},function(P,x,d){var y=d(12).Pattern;function v(U,W){y.call(this,U,W),W?this._line_regexp=this._input.get_regexp(W._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}v.prototype=new y,v.prototype.__set_whitespace_patterns=function(U,W){U+="\\t ",W+="\\n\\r",this._match_pattern=this._input.get_regexp("["+U+W+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+W+"]")},v.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var U=this._input.read(this._match_pattern);if(U===" ")this.whitespace_before_token=" ";else if(U){var W=this.__split(this._newline_regexp,U);this.newline_count=W.length-1,this.whitespace_before_token=W[this.newline_count]}return U},v.prototype.matching=function(U,W){var I=this._create();return I.__set_whitespace_patterns(U,W),I._update(),I},v.prototype._create=function(){return new v(this._input,this)},v.prototype.__split=function(U,W){U.lastIndex=0;for(var I=0,L=[],V=U.exec(W);V;)L.push(W.substring(I,V.index)),I=V.index+V[0].length,V=U.exec(W);return I<W.length?L.push(W.substring(I,W.length)):L.push(""),L},P.exports.WhitespacePattern=v},function(P){function x(d,y){this._input=d,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,y&&(this._starting_pattern=this._input.get_regexp(y._starting_pattern,!0),this._match_pattern=this._input.get_regexp(y._match_pattern,!0),this._until_pattern=this._input.get_regexp(y._until_pattern),this._until_after=y._until_after)}x.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},x.prototype.read_match=function(){return this._input.match(this._match_pattern)},x.prototype.until_after=function(d){var y=this._create();return y._until_after=!0,y._until_pattern=this._input.get_regexp(d),y._update(),y},x.prototype.until=function(d){var y=this._create();return y._until_after=!1,y._until_pattern=this._input.get_regexp(d),y._update(),y},x.prototype.starting_with=function(d){var y=this._create();return y._starting_pattern=this._input.get_regexp(d,!0),y._update(),y},x.prototype.matching=function(d){var y=this._create();return y._match_pattern=this._input.get_regexp(d,!0),y._update(),y},x.prototype._create=function(){return new x(this._input,this)},x.prototype._update=function(){},P.exports.Pattern=x},function(P){function x(d,y){d=typeof d=="string"?d:d.source,y=typeof y=="string"?y:y.source,this.__directives_block_pattern=new RegExp(d+/ beautify( \w+[:]\w+)+ /.source+y,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(d+/\sbeautify\signore:end\s/.source+y,"g")}x.prototype.get_directives=function(d){if(!d.match(this.__directives_block_pattern))return null;var y={};this.__directive_pattern.lastIndex=0;for(var v=this.__directive_pattern.exec(d);v;)y[v[1]]=v[2],v=this.__directive_pattern.exec(d);return y},x.prototype.readIgnored=function(d){return d.readUntilAfter(this.__directives_end_ignore_pattern)},P.exports.Directives=x},function(P,x,d){var y=d(12).Pattern,v={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function U(W,I){y.call(this,W,I),this.__template_pattern=null,this._disabled=Object.assign({},v),this._excluded=Object.assign({},v),I&&(this.__template_pattern=this._input.get_regexp(I.__template_pattern),this._excluded=Object.assign(this._excluded,I._excluded),this._disabled=Object.assign(this._disabled,I._disabled));var L=new y(W);this.__patterns={handlebars_comment:L.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:L.starting_with(/{{{/).until_after(/}}}/),handlebars:L.starting_with(/{{/).until_after(/}}/),php:L.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:L.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:L.starting_with(/{%/).until_after(/%}/),django_value:L.starting_with(/{{/).until_after(/}}/),django_comment:L.starting_with(/{#/).until_after(/#}/),smarty:L.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:L.starting_with(/{\*/).until_after(/\*}/),smarty_literal:L.starting_with(/{literal}/).until_after(/{\/literal}/)}}U.prototype=new y,U.prototype._create=function(){return new U(this._input,this)},U.prototype._update=function(){this.__set_templated_pattern()},U.prototype.disable=function(W){var I=this._create();return I._disabled[W]=!0,I._update(),I},U.prototype.read_options=function(W){var I=this._create();for(var L in v)I._disabled[L]=W.templating.indexOf(L)===-1;return I._update(),I},U.prototype.exclude=function(W){var I=this._create();return I._excluded[W]=!0,I._update(),I},U.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 I=this._read_template();I;)this._match_pattern?I+=this._input.read(this._match_pattern):I+=this._input.readUntil(this.__template_pattern),W+=I,I=this._read_template();return this._until_after&&(W+=this._input.readUntilAfter(this._until_pattern)),W},U.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("|")+")")},U.prototype._read_template=function(){var W="",I=this._input.peek();if(I==="<"){var L=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&L==="?"&&(W=W||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&L==="%"&&(W=W||this.__patterns.erb.read())}else I==="{"&&(!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},P.exports.TemplatablePattern=U},,,,function(P,x,d){var y=d(19).Beautifier,v=d(20).Options;function U(W,I,L,V){var re=new y(W,I,L,V);return re.beautify()}P.exports=U,P.exports.defaultOptions=function(){return new v}},function(P,x,d){var y=d(20).Options,v=d(2).Output,U=d(21).Tokenizer,W=d(21).TOKEN,I=/\r\n|[\r\n]/,L=/\r\n|[\r\n]/g,V=function(K,F){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=K.max_preserve_newlines,this.preserve_newlines=K.preserve_newlines,this._output=new v(K,F)};V.prototype.current_line_has_match=function(K){return this._output.current_line.has_match(K)},V.prototype.set_space_before_token=function(K,F){this._output.space_before_token=K,this._output.non_breaking_space=F},V.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},V.prototype.add_raw_token=function(K){this._output.add_raw_token(K)},V.prototype.print_preserved_newlines=function(K){var F=0;K.type!==W.TEXT&&K.previous.type!==W.TEXT&&(F=K.newlines?1:0),this.preserve_newlines&&(F=K.newlines<this.max_preserve_newlines+1?K.newlines:this.max_preserve_newlines+1);for(var $=0;$<F;$++)this.print_newline($>0);return F!==0},V.prototype.traverse_whitespace=function(K){return K.whitespace_before||K.newlines?(this.print_preserved_newlines(K)||(this._output.space_before_token=!0),!0):!1},V.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},V.prototype.print_newline=function(K){this._output.add_new_line(K)},V.prototype.print_token=function(K){K.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(K.text))},V.prototype.indent=function(){this.indent_level++},V.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},V.prototype.get_full_indent=function(K){return K=this.indent_level+(K||0),K<1?"":this._output.get_indent_string(K)};var re=function(K){for(var F=null,$=K.next;$.type!==W.EOF&&K.closed!==$;){if($.type===W.ATTRIBUTE&&$.text==="type"){$.next&&$.next.type===W.EQUALS&&$.next.next&&$.next.next.type===W.VALUE&&(F=$.next.next.text);break}$=$.next}return F},C=function(K,F){var $=null,q=null;return F.closed?(K==="script"?$="text/javascript":K==="style"&&($="text/css"),$=re(F)||$,$.search("text/css")>-1?q="css":$.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?q="javascript":$.search(/(text|application|dojo)\/(x-)?(html)/)>-1?q="html":$.search(/test\/null/)>-1&&(q="null"),q):null};function _e(K,F){return F.indexOf(K)!==-1}function pe(K,F,$){this.parent=K||null,this.tag=F?F.tag_name:"",this.indent_level=$||0,this.parser_token=F||null}function ce(K){this._printer=K,this._current_frame=null}ce.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},ce.prototype.record_tag=function(K){var F=new pe(this._current_frame,K,this._printer.indent_level);this._current_frame=F},ce.prototype._try_pop_frame=function(K){var F=null;return K&&(F=K.parser_token,this._printer.indent_level=K.indent_level,this._current_frame=K.parent),F},ce.prototype._get_frame=function(K,F){for(var $=this._current_frame;$&&K.indexOf($.tag)===-1;){if(F&&F.indexOf($.tag)!==-1){$=null;break}$=$.parent}return $},ce.prototype.try_pop=function(K,F){var $=this._get_frame([K],F);return this._try_pop_frame($)},ce.prototype.indent_to_tag=function(K){var F=this._get_frame(K);F&&(this._printer.indent_level=F.indent_level)};function ge(K,F,$,q){this._source_text=K||"",F=F||{},this._js_beautify=$,this._css_beautify=q,this._tag_stack=null;var ae=new y(F,"html");this._options=ae,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"}ge.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var K=this._source_text,F=this._options.eol;this._options.eol==="auto"&&(F=`
`,K&&I.test(K)&&(F=K.match(I)[0])),K=K.replace(L,`
`);var $=K.match(/^[\t ]*/)[0],q={text:"",type:""},ae=new ke(this._options),Z=new V(this._options,$),E=new U(K,this._options).tokenize();this._tag_stack=new ce(Z);for(var A=null,Q=E.next();Q.type!==W.EOF;)Q.type===W.TAG_OPEN||Q.type===W.COMMENT?(A=this._handle_tag_open(Z,Q,ae,q,E),ae=A):Q.type===W.ATTRIBUTE||Q.type===W.EQUALS||Q.type===W.VALUE||Q.type===W.TEXT&&!ae.tag_complete?A=this._handle_inside_tag(Z,Q,ae,q):Q.type===W.TAG_CLOSE?A=this._handle_tag_close(Z,Q,ae):Q.type===W.TEXT?A=this._handle_text(Z,Q,ae):Q.type===W.CONTROL_FLOW_OPEN?A=this._handle_control_flow_open(Z,Q):Q.type===W.CONTROL_FLOW_CLOSE?A=this._handle_control_flow_close(Z,Q):Z.add_raw_token(Q),q=A,Q=E.next();var fe=Z._output.get_code(F);return fe},ge.prototype._handle_control_flow_open=function(K,F){var $={text:F.text,type:F.type};return K.set_space_before_token(F.newlines||F.whitespace_before!=="",!0),F.newlines?K.print_preserved_newlines(F):K.set_space_before_token(F.newlines||F.whitespace_before!=="",!0),K.print_token(F),K.indent(),$},ge.prototype._handle_control_flow_close=function(K,F){var $={text:F.text,type:F.type};return K.deindent(),F.newlines?K.print_preserved_newlines(F):K.set_space_before_token(F.newlines||F.whitespace_before!=="",!0),K.print_token(F),$},ge.prototype._handle_tag_close=function(K,F,$){var q={text:F.text,type:F.type};return K.alignment_size=0,$.tag_complete=!0,K.set_space_before_token(F.newlines||F.whitespace_before!=="",!0),$.is_unformatted?K.add_raw_token(F):($.tag_start_char==="<"&&(K.set_space_before_token(F.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&$.has_wrapped_attrs&&K.print_newline(!1)),K.print_token(F)),$.indent_content&&!($.is_unformatted||$.is_content_unformatted)&&(K.indent(),$.indent_content=!1),!$.is_inline_element&&!($.is_unformatted||$.is_content_unformatted)&&K.set_wrap_point(),q},ge.prototype._handle_inside_tag=function(K,F,$,q){var ae=$.has_wrapped_attrs,Z={text:F.text,type:F.type};return K.set_space_before_token(F.newlines||F.whitespace_before!=="",!0),$.is_unformatted?K.add_raw_token(F):$.tag_start_char==="{"&&F.type===W.TEXT?K.print_preserved_newlines(F)?(F.newlines=0,K.add_raw_token(F)):K.print_token(F):(F.type===W.ATTRIBUTE?K.set_space_before_token(!0):(F.type===W.EQUALS||F.type===W.VALUE&&F.previous.type===W.EQUALS)&&K.set_space_before_token(!1),F.type===W.ATTRIBUTE&&$.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(K.traverse_whitespace(F),ae=ae||F.newlines!==0),this._is_wrap_attributes_force&&$.attr_count>=this._options.wrap_attributes_min_attrs&&(q.type!==W.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(K.print_newline(!1),ae=!0)),K.print_token(F),ae=ae||K.previous_token_wrapped(),$.has_wrapped_attrs=ae),Z},ge.prototype._handle_text=function(K,F,$){var q={text:F.text,type:"TK_CONTENT"};return $.custom_beautifier_name?this._print_custom_beatifier_text(K,F,$):$.is_unformatted||$.is_content_unformatted?K.add_raw_token(F):(K.traverse_whitespace(F),K.print_token(F)),q},ge.prototype._print_custom_beatifier_text=function(K,F,$){var q=this;if(F.text!==""){var ae=F.text,Z,E=1,A="",Q="";$.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?Z=this._js_beautify:$.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?Z=this._css_beautify:$.custom_beautifier_name==="html"&&(Z=function($t,ut){var nt=new ge($t,ut,q._js_beautify,q._css_beautify);return nt.beautify()}),this._options.indent_scripts==="keep"?E=0:this._options.indent_scripts==="separate"&&(E=-K.indent_level);var fe=K.get_full_indent(E);if(ae=ae.replace(/\n[ \t]*$/,""),$.custom_beautifier_name!=="html"&&ae[0]==="<"&&ae.match(/^(<!--|<!\[CDATA\[)/)){var $e=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(ae);if(!$e){K.add_raw_token(F);return}A=fe+$e[1]+`
`,ae=$e[4],$e[5]&&(Q=fe+$e[5]),ae=ae.replace(/\n[ \t]*$/,""),($e[2]||$e[3].indexOf(`
`)!==-1)&&($e=$e[3].match(/[ \t]+$/),$e&&(F.whitespace_before=$e[0]))}if(ae)if(Z){var Ze=function(){this.eol=`
`};Ze.prototype=this._options.raw_options;var it=new Ze;ae=Z(fe+ae,it)}else{var tt=F.whitespace_before;tt&&(ae=ae.replace(new RegExp(`
(`+tt+")?","g"),`
`)),ae=fe+ae.replace(/\n/g,`
`+fe)}A&&(ae?ae=A+ae+`
`+Q:ae=A+Q),K.print_newline(!1),ae&&(F.text=ae,F.whitespace_before="",F.newlines=0,K.add_raw_token(F),K.print_newline(!0))}},ge.prototype._handle_tag_open=function(K,F,$,q,ae){var Z=this._get_tag_open_token(F);if(($.is_unformatted||$.is_content_unformatted)&&!$.is_empty_element&&F.type===W.TAG_OPEN&&!Z.is_start_tag?(K.add_raw_token(F),Z.start_tag_token=this._tag_stack.try_pop(Z.tag_name)):(K.traverse_whitespace(F),this._set_tag_position(K,F,Z,$,q),Z.is_inline_element||K.set_wrap_point(),K.print_token(F)),Z.is_start_tag&&this._is_wrap_attributes_force){var E=0,A;do A=ae.peek(E),A.type===W.ATTRIBUTE&&(Z.attr_count+=1),E+=1;while(A.type!==W.EOF&&A.type!==W.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(Z.alignment_size=F.text.length+1),!Z.tag_complete&&!Z.is_unformatted&&(K.alignment_size=Z.alignment_size),Z};var ke=function(K,F,$){if(this.parent=F||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="",!$)this.tag_complete=!0;else{var q;this.tag_start_char=$.text[0],this.text=$.text,this.tag_start_char==="<"?(q=$.text.match(/^<([^\s>]*)/),this.tag_check=q?q[1]:""):(q=$.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=q?q[1]:"",($.text.startsWith("{{#>")||$.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&$.next!==null?this.tag_check=$.next.text.split(" ")[0]:this.tag_check=$.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),$.type===W.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||$.closed&&$.closed.text==="/>";var ae=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(ae=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!K.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(ae)))}};ge.prototype._get_tag_open_token=function(K){var F=new ke(this._options,this._tag_stack.get_parser_token(),K);return F.alignment_size=this._options.wrap_attributes_indent_size,F.is_end_tag=F.is_end_tag||_e(F.tag_check,this._options.void_elements),F.is_empty_element=F.tag_complete||F.is_start_tag&&F.is_end_tag,F.is_unformatted=!F.tag_complete&&_e(F.tag_check,this._options.unformatted),F.is_content_unformatted=!F.is_empty_element&&_e(F.tag_check,this._options.content_unformatted),F.is_inline_element=_e(F.tag_name,this._options.inline)||this._options.inline_custom_elements&&F.tag_name.includes("-")||F.tag_start_char==="{",F},ge.prototype._set_tag_position=function(K,F,$,q,ae){if($.is_empty_element||($.is_end_tag?$.start_tag_token=this._tag_stack.try_pop($.tag_name):(this._do_optional_end_element($)&&($.is_inline_element||K.print_newline(!1)),this._tag_stack.record_tag($),($.tag_name==="script"||$.tag_name==="style")&&!($.is_unformatted||$.is_content_unformatted)&&($.custom_beautifier_name=C($.tag_check,F)))),_e($.tag_check,this._options.extra_liners)&&(K.print_newline(!1),K._output.just_added_blankline()||K.print_newline(!0)),$.is_empty_element){if($.tag_start_char==="{"&&$.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),$.indent_content=!0;var Z=K.current_line_has_match(/{{#if/);Z||K.print_newline(!1)}$.tag_name==="!--"&&ae.type===W.TAG_CLOSE&&q.is_end_tag&&$.text.indexOf(`
`)===-1||($.is_inline_element||$.is_unformatted||K.print_newline(!1),this._calcluate_parent_multiline(K,$))}else if($.is_end_tag){var E=!1;E=$.start_tag_token&&$.start_tag_token.multiline_content,E=E||!$.is_inline_element&&!(q.is_inline_element||q.is_unformatted)&&!(ae.type===W.TAG_CLOSE&&$.start_tag_token===q)&&ae.type!=="TK_CONTENT",($.is_content_unformatted||$.is_unformatted)&&(E=!1),E&&K.print_newline(!1)}else $.indent_content=!$.custom_beautifier_name,$.tag_start_char==="<"&&($.tag_name==="html"?$.indent_content=this._options.indent_inner_html:$.tag_name==="head"?$.indent_content=this._options.indent_head_inner_html:$.tag_name==="body"&&($.indent_content=this._options.indent_body_inner_html)),!($.is_inline_element||$.is_unformatted)&&(ae.type!=="TK_CONTENT"||$.is_content_unformatted)&&K.print_newline(!1),this._calcluate_parent_multiline(K,$)},ge.prototype._calcluate_parent_multiline=function(K,F){F.parent&&K._output.just_added_newline()&&!((F.is_inline_element||F.is_unformatted)&&F.parent.is_inline_element)&&(F.parent.multiline_content=!0)};var ve=["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"],Ce=["a","audio","del","ins","map","noscript","video"];ge.prototype._do_optional_end_element=function(K){var F=null;if(!(K.is_empty_element||!K.is_start_tag||!K.parent)){if(K.tag_name==="body")F=F||this._tag_stack.try_pop("head");else if(K.tag_name==="li")F=F||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(K.tag_name==="dd"||K.tag_name==="dt")F=F||this._tag_stack.try_pop("dt",["dl"]),F=F||this._tag_stack.try_pop("dd",["dl"]);else if(K.parent.tag_name==="p"&&ve.indexOf(K.tag_name)!==-1){var $=K.parent.parent;(!$||Ce.indexOf($.tag_name)===-1)&&(F=F||this._tag_stack.try_pop("p"))}else K.tag_name==="rp"||K.tag_name==="rt"?(F=F||this._tag_stack.try_pop("rt",["ruby","rtc"]),F=F||this._tag_stack.try_pop("rp",["ruby","rtc"])):K.tag_name==="optgroup"?F=F||this._tag_stack.try_pop("optgroup",["select"]):K.tag_name==="option"?F=F||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):K.tag_name==="colgroup"?F=F||this._tag_stack.try_pop("caption",["table"]):K.tag_name==="thead"?(F=F||this._tag_stack.try_pop("caption",["table"]),F=F||this._tag_stack.try_pop("colgroup",["table"])):K.tag_name==="tbody"||K.tag_name==="tfoot"?(F=F||this._tag_stack.try_pop("caption",["table"]),F=F||this._tag_stack.try_pop("colgroup",["table"]),F=F||this._tag_stack.try_pop("thead",["table"]),F=F||this._tag_stack.try_pop("tbody",["table"])):K.tag_name==="tr"?(F=F||this._tag_stack.try_pop("caption",["table"]),F=F||this._tag_stack.try_pop("colgroup",["table"]),F=F||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(K.tag_name==="th"||K.tag_name==="td")&&(F=F||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),F=F||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return K.parent=this._tag_stack.get_parser_token(),F}},P.exports.Beautifier=ge},function(P,x,d){var y=d(6).Options;function v(U){y.call(this,U,"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"])}v.prototype=new y,P.exports.Options=v},function(P,x,d){var y=d(9).Tokenizer,v=d(9).TOKEN,U=d(13).Directives,W=d(14).TemplatablePattern,I=d(12).Pattern,L={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:v.START,RAW:v.RAW,EOF:v.EOF},V=new U(/<\!--/,/-->/),re=function(C,_e){y.call(this,C,_e),this._current_tag_name="";var pe=new W(this._input).read_options(this._options),ce=new I(this._input);if(this.__patterns={word:pe.until(/[\n\r\t <]/),word_control_flow_close_excluded:pe.until(/[\n\r\t <}]/),single_quote:pe.until_after(/'/),double_quote:pe.until_after(/"/),attribute:pe.until(/[\n\r\t =>]|\/>/),element_name:pe.until(/[\n\r\t >\/]/),angular_control_flow_start:ce.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:ce.starting_with(/{{!--/).until_after(/--}}/),handlebars:ce.starting_with(/{{/).until_after(/}}/),handlebars_open:ce.until(/[\n\r\t }]/),handlebars_raw_close:ce.until(/}}/),comment:ce.starting_with(/<!--/).until_after(/-->/),cdata:ce.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:ce.starting_with(/<!\[/).until_after(/]>/),processing:ce.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 ge=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=ce.matching(ge).until_after(ge)}};re.prototype=new y,re.prototype._is_comment=function(C){return!1},re.prototype._is_opening=function(C){return C.type===L.TAG_OPEN||C.type===L.CONTROL_FLOW_OPEN},re.prototype._is_closing=function(C,_e){return C.type===L.TAG_CLOSE&&_e&&((C.text===">"||C.text==="/>")&&_e.text[0]==="<"||C.text==="}}"&&_e.text[0]==="{"&&_e.text[1]==="{")||C.type===L.CONTROL_FLOW_CLOSE&&C.text==="}"&&_e.text.endsWith("{")},re.prototype._reset=function(){this._current_tag_name=""},re.prototype._get_next_token=function(C,_e){var pe=null;this._readWhitespace();var ce=this._input.peek();return ce===null?this._create_token(L.EOF,""):(pe=pe||this._read_open_handlebars(ce,_e),pe=pe||this._read_attribute(ce,C,_e),pe=pe||this._read_close(ce,_e),pe=pe||this._read_script_and_style(ce,C),pe=pe||this._read_control_flows(ce,_e),pe=pe||this._read_raw_content(ce,C,_e),pe=pe||this._read_content_word(ce,_e),pe=pe||this._read_comment_or_cdata(ce),pe=pe||this._read_processing(ce),pe=pe||this._read_open(ce,_e),pe=pe||this._create_token(L.UNKNOWN,this._input.next()),pe)},re.prototype._read_comment_or_cdata=function(C){var _e=null,pe=null,ce=null;if(C==="<"){var ge=this._input.peek(1);ge==="!"&&(pe=this.__patterns.comment.read(),pe?(ce=V.get_directives(pe),ce&&ce.ignore==="start"&&(pe+=V.readIgnored(this._input))):pe=this.__patterns.cdata.read()),pe&&(_e=this._create_token(L.COMMENT,pe),_e.directives=ce)}return _e},re.prototype._read_processing=function(C){var _e=null,pe=null,ce=null;if(C==="<"){var ge=this._input.peek(1);(ge==="!"||ge==="?")&&(pe=this.__patterns.conditional_comment.read(),pe=pe||this.__patterns.processing.read()),pe&&(_e=this._create_token(L.COMMENT,pe),_e.directives=ce)}return _e},re.prototype._read_open=function(C,_e){var pe=null,ce=null;return(!_e||_e.type===L.CONTROL_FLOW_OPEN)&&C==="<"&&(pe=this._input.next(),this._input.peek()==="/"&&(pe+=this._input.next()),pe+=this.__patterns.element_name.read(),ce=this._create_token(L.TAG_OPEN,pe)),ce},re.prototype._read_open_handlebars=function(C,_e){var pe=null,ce=null;return(!_e||_e.type===L.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&C==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(pe=this.__patterns.handlebars_comment.read(),pe=pe||this.__patterns.handlebars.read(),ce=this._create_token(L.COMMENT,pe)):(pe=this.__patterns.handlebars_open.read(),ce=this._create_token(L.TAG_OPEN,pe))),ce},re.prototype._read_control_flows=function(C,_e){var pe="",ce=null;if(!this._options.templating.includes("angular"))return ce;if(C==="@"){if(pe=this.__patterns.angular_control_flow_start.read(),pe==="")return ce;for(var ge=pe.endsWith("(")?1:0,ke=0;!(pe.endsWith("{")&&ge===ke);){var ve=this._input.next();if(ve===null)break;ve==="("?ge++:ve===")"&&ke++,pe+=ve}ce=this._create_token(L.CONTROL_FLOW_OPEN,pe)}else C==="}"&&_e&&_e.type===L.CONTROL_FLOW_OPEN&&(pe=this._input.next(),ce=this._create_token(L.CONTROL_FLOW_CLOSE,pe));return ce},re.prototype._read_close=function(C,_e){var pe=null,ce=null;return _e&&_e.type===L.TAG_OPEN&&(_e.text[0]==="<"&&(C===">"||C==="/"&&this._input.peek(1)===">")?(pe=this._input.next(),C==="/"&&(pe+=this._input.next()),ce=this._create_token(L.TAG_CLOSE,pe)):_e.text[0]==="{"&&C==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),ce=this._create_token(L.TAG_CLOSE,"}}"))),ce},re.prototype._read_attribute=function(C,_e,pe){var ce=null,ge="";if(pe&&pe.text[0]==="<")if(C==="=")ce=this._create_token(L.EQUALS,this._input.next());else if(C==='"'||C==="'"){var ke=this._input.next();C==='"'?ke+=this.__patterns.double_quote.read():ke+=this.__patterns.single_quote.read(),ce=this._create_token(L.VALUE,ke)}else ge=this.__patterns.attribute.read(),ge&&(_e.type===L.EQUALS?ce=this._create_token(L.VALUE,ge):ce=this._create_token(L.ATTRIBUTE,ge));return ce},re.prototype._is_content_unformatted=function(C){return this._options.void_elements.indexOf(C)===-1&&(this._options.content_unformatted.indexOf(C)!==-1||this._options.unformatted.indexOf(C)!==-1)},re.prototype._read_raw_content=function(C,_e,pe){var ce="";if(pe&&pe.text[0]==="{")ce=this.__patterns.handlebars_raw_close.read();else if(_e.type===L.TAG_CLOSE&&_e.opened.text[0]==="<"&&_e.text[0]!=="/"){var ge=_e.opened.text.substr(1).toLowerCase();this._is_content_unformatted(ge)&&(ce=this._input.readUntil(new RegExp("</"+ge+"[\\n\\r\\t ]*?>","ig")))}return ce?this._create_token(L.TEXT,ce):null},re.prototype._read_script_and_style=function(C,_e){if(_e.type===L.TAG_CLOSE&&_e.opened.text[0]==="<"&&_e.text[0]!=="/"){var pe=_e.opened.text.substr(1).toLowerCase();if(pe==="script"||pe==="style"){var ce=this._read_comment_or_cdata(C);if(ce)return ce.type=L.TEXT,ce;var ge=this._input.readUntil(new RegExp("</"+pe+"[\\n\\r\\t ]*?>","ig"));if(ge)return this._create_token(L.TEXT,ge)}}return null},re.prototype._read_content_word=function(C,_e){var pe="";return this._options.unformatted_content_delimiter&&C===this._options.unformatted_content_delimiter[0]&&(pe=this.__patterns.unformatted_content_delimiter.read()),pe||(pe=_e&&_e.type===L.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),pe?this._create_token(L.TEXT,pe):null},P.exports.Tokenizer=re,P.exports.TOKEN=L}],xe={};function l(P){var x=xe[P];if(x!==void 0)return x.exports;var d=xe[P]={exports:{}};return Se[P](d,d.exports,l),d.exports}var H=l(18);Me=H})();var De=Me;if(1)te=[J,J(58553),J(87804)],we=function(Se){var xe=J(58553),l=J(87804);return{html_beautify:function(H,P){return De(H,P,xe.js_beautify,l.css_beautify)}}}.apply(Xe,te),we!==void 0&&(Ot.exports=we);else var Fe,de})()},58553:function(Ot,Xe){var J,te;(function(){var we;(function(){"use strict";var De=[function(xe,l,H){var P=H(1).Beautifier,x=H(5).Options;function d(y,v){var U=new P(y,v);return U.beautify()}xe.exports=d,xe.exports.defaultOptions=function(){return new x}},function(xe,l,H){var P=H(2).Output,x=H(3).Token,d=H(4),y=H(5).Options,v=H(7).Tokenizer,U=H(7).line_starters,W=H(7).positionable_operators,I=H(7).TOKEN;function L(A,Q){return Q.indexOf(A)!==-1}function V(A){return A.replace(/^\s+/g,"")}function re(A){for(var Q={},fe=0;fe<A.length;fe++)Q[A[fe].replace(/-/g,"_")]=A[fe];return Q}function C(A,Q){return A&&A.type===I.RESERVED&&A.text===Q}function _e(A,Q){return A&&A.type===I.RESERVED&&L(A.text,Q)}var pe=["case","return","do","if","throw","else","await","break","continue","async"],ce=["before-newline","after-newline","preserve-newline"],ge=re(ce),ke=[ge.before_newline,ge.preserve_newline],ve={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function Ce(A,Q){Q.multiline_frame||Q.mode===ve.ForInitializer||Q.mode===ve.Conditional||A.remove_indent(Q.start_line_index)}function K(A){A=A.replace(d.allLineBreaks,`
`);for(var Q=[],fe=A.indexOf(`
`);fe!==-1;)Q.push(A.substring(0,fe)),A=A.substring(fe+1),fe=A.indexOf(`
`);return A.length&&Q.push(A),Q}function F(A){return A===ve.ArrayLiteral}function $(A){return L(A,[ve.Expression,ve.ForInitializer,ve.Conditional])}function q(A,Q){for(var fe=0;fe<A.length;fe++){var $e=A[fe].trim();if($e.charAt(0)!==Q)return!1}return!0}function ae(A,Q){for(var fe=0,$e=A.length,Ze;fe<$e;fe++)if(Ze=A[fe],Ze&&Ze.indexOf(Q)!==0)return!1;return!0}function Z(A,Q){Q=Q||{},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 y(Q)}Z.prototype.create_flags=function(A,Q){var fe=0;A&&(fe=A.indentation_level,!this._output.just_added_newline()&&A.line_indent_level>fe&&(fe=A.line_indent_level));var $e={mode:Q,parent:A,last_token:A?A.last_token:new x(I.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:fe,alignment:0,line_indent_level:A?A.line_indent_level:fe,start_line_index:this._output.get_line_number(),ternary_depth:0};return $e},Z.prototype._reset=function(A){var Q=A.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new P(this._options,Q),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(ve.BlockStatement);var fe=new v(A,this._options);return this._tokens=fe.tokenize(),A},Z.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var A,Q=this._reset(this._source_text),fe=this._options.eol;this._options.eol==="auto"&&(fe=`
`,Q&&d.lineBreak.test(Q||"")&&(fe=Q.match(d.lineBreak)[0]));for(var $e=this._tokens.next();$e;)this.handle_token($e),this._last_last_text=this._flags.last_token.text,this._flags.last_token=$e,$e=this._tokens.next();return A=this._output.get_code(fe),A},Z.prototype.handle_token=function(A,Q){A.type===I.START_EXPR?this.handle_start_expr(A):A.type===I.END_EXPR?this.handle_end_expr(A):A.type===I.START_BLOCK?this.handle_start_block(A):A.type===I.END_BLOCK?this.handle_end_block(A):A.type===I.WORD?this.handle_word(A):A.type===I.RESERVED?this.handle_word(A):A.type===I.SEMICOLON?this.handle_semicolon(A):A.type===I.STRING?this.handle_string(A):A.type===I.EQUALS?this.handle_equals(A):A.type===I.OPERATOR?this.handle_operator(A):A.type===I.COMMA?this.handle_comma(A):A.type===I.BLOCK_COMMENT?this.handle_block_comment(A,Q):A.type===I.COMMENT?this.handle_comment(A,Q):A.type===I.DOT?this.handle_dot(A):A.type===I.EOF?this.handle_eof(A):A.type===I.UNKNOWN?this.handle_unknown(A,Q):this.handle_unknown(A,Q)},Z.prototype.handle_whitespace_and_comments=function(A,Q){var fe=A.newlines,$e=this._options.keep_array_indentation&&F(this._flags.mode);if(A.comments_before)for(var Ze=A.comments_before.next();Ze;)this.handle_whitespace_and_comments(Ze,Q),this.handle_token(Ze,Q),Ze=A.comments_before.next();if($e)for(var it=0;it<fe;it+=1)this.print_newline(it>0,Q);else if(this._options.max_preserve_newlines&&fe>this._options.max_preserve_newlines&&(fe=this._options.max_preserve_newlines),this._options.preserve_newlines&&fe>1){this.print_newline(!1,Q);for(var tt=1;tt<fe;tt+=1)this.print_newline(!0,Q)}};var E=["async","break","continue","return","throw","yield"];Z.prototype.allow_wrap_or_preserved_newline=function(A,Q){if(Q=Q===void 0?!1:Q,!this._output.just_added_newline()){var fe=this._options.preserve_newlines&&A.newlines||Q,$e=L(this._flags.last_token.text,W)||L(A.text,W);if($e){var Ze=L(this._flags.last_token.text,W)&&L(this._options.operator_position,ke)||L(A.text,W);fe=fe&&Ze}if(fe)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(_e(this._flags.last_token,E))return;this._output.set_wrap_point()}}},Z.prototype.print_newline=function(A,Q){if(!Q&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==I.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var fe=this._tokens.peek();this._flags.mode===ve.Statement&&!(this._flags.if_block&&C(fe,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(A)&&(this._flags.multiline_frame=!0)},Z.prototype.print_token_line_indentation=function(A){this._output.just_added_newline()&&(this._options.keep_array_indentation&&A.newlines&&(A.text==="["||F(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))},Z.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===I.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var Q=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(Q),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)},Z.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},Z.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))},Z.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)},Z.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===ve.Statement&&Ce(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},Z.prototype.start_of_object_property=function(){return this._flags.parent.mode===ve.ObjectLiteral&&this._flags.mode===ve.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||_e(this._flags.last_token,["get","set"]))},Z.prototype.start_of_statement=function(A){var Q=!1;return Q=Q||_e(this._flags.last_token,["var","let","const"])&&A.type===I.WORD,Q=Q||C(this._flags.last_token,"do"),Q=Q||!(this._flags.parent.mode===ve.ObjectLiteral&&this._flags.mode===ve.Statement)&&_e(this._flags.last_token,E)&&!A.newlines,Q=Q||C(this._flags.last_token,"else")&&!(C(A,"if")&&!A.comments_before),Q=Q||this._flags.last_token.type===I.END_EXPR&&(this._previous_flags.mode===ve.ForInitializer||this._previous_flags.mode===ve.Conditional),Q=Q||this._flags.last_token.type===I.WORD&&this._flags.mode===ve.BlockStatement&&!this._flags.in_case&&!(A.text==="--"||A.text==="++")&&this._last_last_text!=="function"&&A.type!==I.WORD&&A.type!==I.RESERVED,Q=Q||this._flags.mode===ve.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||_e(this._flags.last_token,["get","set"])),Q?(this.set_mode(ve.Statement),this.indent(),this.handle_whitespace_and_comments(A,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(A,_e(A,["do","for","if","while"])),!0):!1},Z.prototype.handle_start_expr=function(A){this.start_of_statement(A)||this.handle_whitespace_and_comments(A);var Q=ve.Expression;if(A.text==="["){if(this._flags.last_token.type===I.WORD||this._flags.last_token.text===")"){_e(this._flags.last_token,U)&&(this._output.space_before_token=!0),this.print_token(A),this.set_mode(Q),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}Q=ve.ArrayLiteral,F(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()),L(this._flags.last_token.type,[I.START_EXPR,I.END_EXPR,I.WORD,I.OPERATOR,I.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===I.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,Q=ve.ForInitializer):L(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,Q=ve.Conditional):L(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:(L(this._flags.last_token.text,U)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===I.EQUALS||this._flags.last_token.type===I.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(A);else if(this._flags.last_token.type===I.WORD){this._output.space_before_token=!1;var fe=this._tokens.peek(-3);if(this._options.space_after_named_function&&fe){var $e=this._tokens.peek(-4);_e(fe,["async","function"])||fe.text==="*"&&_e($e,["async","function"])?this._output.space_before_token=!0:this._flags.mode===ve.ObjectLiteral?(fe.text==="{"||fe.text===","||fe.text==="*"&&($e.text==="{"||$e.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===I.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(L(this._last_last_text,["function","yield"])||this._flags.mode===ve.ObjectLiteral&&L(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===I.START_BLOCK?this.print_newline():(this._flags.last_token.type===I.END_EXPR||this._flags.last_token.type===I.START_EXPR||this._flags.last_token.type===I.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===I.COMMA)&&this.allow_wrap_or_preserved_newline(A,A.newlines),this.print_token(A),this.set_mode(Q),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},Z.prototype.handle_end_expr=function(A){for(;this._flags.mode===ve.Statement;)this.restore_mode();this.handle_whitespace_and_comments(A),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(A,A.text==="]"&&F(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===I.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(),Ce(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===ve.Conditional&&(this._previous_flags.mode=ve.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},Z.prototype.handle_start_block=function(A){this.handle_whitespace_and_comments(A);var Q=this._tokens.peek(),fe=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===I.END_EXPR?(this.set_mode(ve.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(ve.BlockStatement):fe&&(L(fe.text,[":",","])&&L(Q.type,[I.STRING,I.WORD,I.RESERVED])||L(Q.text,["get","set","..."])&&L(fe.type,[I.WORD,I.RESERVED]))?L(this._last_last_text,["class","interface"])&&!L(fe.text,[":",","])?this.set_mode(ve.BlockStatement):this.set_mode(ve.ObjectLiteral):this._flags.last_token.type===I.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(ve.BlockStatement):L(this._flags.last_token.type,[I.EQUALS,I.START_EXPR,I.COMMA,I.OPERATOR])||_e(this._flags.last_token,["return","throw","import","default"])?this.set_mode(ve.ObjectLiteral):this.set_mode(ve.BlockStatement),this._flags.last_token&&_e(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var $e=!Q.comments_before&&Q.text==="}",Ze=$e&&this._flags.last_word==="function"&&this._flags.last_token.type===I.END_EXPR;if(this._options.brace_preserve_inline){var it=0,tt=null;this._flags.inline_frame=!0;do if(it+=1,tt=this._tokens.peek(it-1),tt.newlines){this._flags.inline_frame=!1;break}while(tt.type!==I.EOF&&!(tt.type===I.END_BLOCK&&tt.opened===A))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&A.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==I.OPERATOR&&(Ze||this._flags.last_token.type===I.EQUALS||_e(this._flags.last_token,pe)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(F(this._previous_flags.mode)&&(this._flags.last_token.type===I.START_EXPR||this._flags.last_token.type===I.COMMA)&&((this._flags.last_token.type===I.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===I.COMMA||this._flags.last_token.type===I.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!==I.OPERATOR&&this._flags.last_token.type!==I.START_EXPR&&(L(this._flags.last_token.type,[I.START_BLOCK,I.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(A),this.indent(),!$e&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},Z.prototype.handle_end_block=function(A){for(this.handle_whitespace_and_comments(A);this._flags.mode===ve.Statement;)this.restore_mode();var Q=this._flags.last_token.type===I.START_BLOCK;this._flags.inline_frame&&!Q?this._output.space_before_token=!0:this._options.brace_style==="expand"?Q||this.print_newline():Q||(F(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)},Z.prototype.handle_word=function(A){if(A.type===I.RESERVED){if(L(A.text,["set","get"])&&this._flags.mode!==ve.ObjectLiteral)A.type=I.WORD;else if(A.text==="import"&&L(this._tokens.peek().text,["(","."]))A.type=I.WORD;else if(L(A.text,["as","from"])&&!this._flags.import_block)A.type=I.WORD;else if(this._flags.mode===ve.ObjectLiteral){var Q=this._tokens.peek();Q.text===":"&&(A.type=I.WORD)}}if(this.start_of_statement(A)?_e(this._flags.last_token,["var","let","const"])&&A.type===I.WORD&&(this._flags.declaration_statement=!0):A.newlines&&!$(this._flags.mode)&&(this._flags.last_token.type!==I.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==I.EQUALS&&(this._options.preserve_newlines||!_e(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(C(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&&C(A,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===ve.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&_e(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===I.COMMA||this._flags.last_token.type===I.START_EXPR||this._flags.last_token.type===I.EQUALS||this._flags.last_token.type===I.OPERATOR)&&!this.start_of_object_property()&&!(L(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===ve.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(A),C(A,"function")){(L(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(L(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===I.OPERATOR))&&!this._output.just_added_blankline()&&!A.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===I.RESERVED||this._flags.last_token.type===I.WORD?_e(this._flags.last_token,["get","set","new","export"])||_e(this._flags.last_token,E)?this._output.space_before_token=!0:C(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===I.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&($(this._flags.mode)||F(this._flags.mode))||this.print_newline(),this.print_token(A),this._flags.last_word=A.text;return}var fe="NONE";if(this._flags.last_token.type===I.END_BLOCK?this._previous_flags.inline_frame?fe="SPACE":_e(A,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&A.newlines?fe="NEWLINE":(fe="SPACE",this._output.space_before_token=!0):fe="NEWLINE":this._flags.last_token.type===I.SEMICOLON&&this._flags.mode===ve.BlockStatement?fe="NEWLINE":this._flags.last_token.type===I.SEMICOLON&&$(this._flags.mode)?fe="SPACE":this._flags.last_token.type===I.STRING?fe="NEWLINE":this._flags.last_token.type===I.RESERVED||this._flags.last_token.type===I.WORD||this._flags.last_token.text==="*"&&(L(this._last_last_text,["function","yield"])||this._flags.mode===ve.ObjectLiteral&&L(this._last_last_text,["{",","]))?fe="SPACE":this._flags.last_token.type===I.START_BLOCK?this._flags.inline_frame?fe="SPACE":fe="NEWLINE":this._flags.last_token.type===I.END_EXPR&&(this._output.space_before_token=!0,fe="NEWLINE"),_e(A,U)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?fe="SPACE":fe="NEWLINE"),_e(A,["else","catch","finally"]))if((!(this._flags.last_token.type===I.END_BLOCK&&this._previous_flags.mode===ve.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 $e=this._output.current_line;$e.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else fe==="NEWLINE"?_e(this._flags.last_token,pe)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&_e(A,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==I.END_EXPR?(this._flags.last_token.type!==I.START_EXPR||!_e(A,["var","let","const"]))&&this._flags.last_token.text!==":"&&(C(A,"if")&&C(A.previous,"else")?this._output.space_before_token=!0:this.print_newline()):_e(A,U)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&F(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():fe==="SPACE"&&(this._output.space_before_token=!0);A.previous&&(A.previous.type===I.WORD||A.previous.type===I.RESERVED)&&(this._output.space_before_token=!0),this.print_token(A),this._flags.last_word=A.text,A.type===I.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&&C(A,"from")&&(this._flags.import_block=!1))},Z.prototype.handle_semicolon=function(A){this.start_of_statement(A)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(A);for(var Q=this._tokens.peek();this._flags.mode===ve.Statement&&!(this._flags.if_block&&C(Q,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(A)},Z.prototype.handle_string=function(A){A.text.startsWith("`")&&A.newlines===0&&A.whitespace_before===""&&(A.previous.text===")"||this._flags.last_token.type===I.WORD)||(this.start_of_statement(A)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(A),this._flags.last_token.type===I.RESERVED||this._flags.last_token.type===I.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===I.COMMA||this._flags.last_token.type===I.START_EXPR||this._flags.last_token.type===I.EQUALS||this._flags.last_token.type===I.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(A):A.text.startsWith("`")&&this._flags.last_token.type===I.END_EXPR&&(A.previous.text==="]"||A.previous.text===")")&&A.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(A)},Z.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},Z.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?($(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===ve.ObjectLiteral||this._flags.mode===ve.Statement&&this._flags.parent.mode===ve.ObjectLiteral?(this._flags.mode===ve.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(A)},Z.prototype.handle_operator=function(A){var Q=A.text==="*"&&(_e(this._flags.last_token,["function","yield"])||L(this._flags.last_token.type,[I.START_BLOCK,I.COMMA,I.END_BLOCK,I.SEMICOLON])),fe=L(A.text,["-","+"])&&(L(this._flags.last_token.type,[I.START_BLOCK,I.START_EXPR,I.EQUALS,I.OPERATOR])||L(this._flags.last_token.text,U)||this._flags.last_token.text===",");if(!this.start_of_statement(A)){var $e=!Q;this.handle_whitespace_and_comments(A,$e)}if(A.text==="*"&&this._flags.last_token.type===I.DOT){this.print_token(A);return}if(A.text==="::"){this.print_token(A);return}if(L(A.text,["-","+"])&&this.start_of_object_property()){this.print_token(A);return}if(this._flags.last_token.type===I.OPERATOR&&L(this._options.operator_position,ke)&&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!==I.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 Ze=!0,it=!0,tt=!1;if(A.text===":"?this._flags.ternary_depth===0?Ze=!1:(this._flags.ternary_depth-=1,tt=!0):A.text==="?"&&(this._flags.ternary_depth+=1),!fe&&!Q&&this._options.preserve_newlines&&L(A.text,W)){var $t=A.text===":",ut=$t&&tt,nt=$t&&!tt;switch(this._options.operator_position){case ge.before_newline:this._output.space_before_token=!nt,this.print_token(A),(!$t||ut)&&this.allow_wrap_or_preserved_newline(A),this._output.space_before_token=!0;return;case ge.after_newline:this._output.space_before_token=!0,!$t||ut?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 ge.preserve_newline:nt||this.allow_wrap_or_preserved_newline(A),Ze=!(this._output.just_added_newline()||nt),this._output.space_before_token=Ze,this.print_token(A),this._output.space_before_token=!0;return}}if(Q){this.allow_wrap_or_preserved_newline(A),Ze=!1;var tr=this._tokens.peek();it=tr&&L(tr.type,[I.WORD,I.RESERVED])}else if(A.text==="...")this.allow_wrap_or_preserved_newline(A),Ze=this._flags.last_token.type===I.START_BLOCK,it=!1;else if(L(A.text,["--","++","!","~"])||fe){if((this._flags.last_token.type===I.COMMA||this._flags.last_token.type===I.START_EXPR)&&this.allow_wrap_or_preserved_newline(A),Ze=!1,it=!1,A.newlines&&(A.text==="--"||A.text==="++"||A.text==="~")){var sr=_e(this._flags.last_token,pe)&&A.newlines;sr&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(sr,!0)}this._flags.last_token.text===";"&&$(this._flags.mode)&&(Ze=!0),this._flags.last_token.type===I.RESERVED?Ze=!0:this._flags.last_token.type===I.END_EXPR?Ze=!(this._flags.last_token.text==="]"&&(A.text==="--"||A.text==="++")):this._flags.last_token.type===I.OPERATOR&&(Ze=L(A.text,["--","-","++","+"])&&L(this._flags.last_token.text,["--","-","++","+"]),L(A.text,["+","-"])&&L(this._flags.last_token.text,["--","++"])&&(it=!0)),(this._flags.mode===ve.BlockStatement&&!this._flags.inline_frame||this._flags.mode===ve.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||Ze,this.print_token(A),this._output.space_before_token=it},Z.prototype.handle_block_comment=function(A,Q){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,Q),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,Q)},Z.prototype.print_block_commment=function(A,Q){var fe=K(A.text),$e,Ze=!1,it=!1,tt=A.whitespace_before,$t=tt.length;if(this.print_newline(!1,Q),this.print_token_line_indentation(A),this._output.add_token(fe[0]),this.print_newline(!1,Q),fe.length>1){for(fe=fe.slice(1),Ze=q(fe,"*"),it=ae(fe,tt),Ze&&(this._flags.alignment=1),$e=0;$e<fe.length;$e++)Ze?(this.print_token_line_indentation(A),this._output.add_token(V(fe[$e]))):it&&fe[$e]?(this.print_token_line_indentation(A),this._output.add_token(fe[$e].substring($t))):(this._output.current_line.set_indent(-1),this._output.add_token(fe[$e])),this.print_newline(!1,Q);this._flags.alignment=0}},Z.prototype.handle_comment=function(A,Q){A.newlines?this.print_newline(!1,Q):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(A),this.print_newline(!1,Q)},Z.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),_e(this._flags.last_token,pe)?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)},Z.prototype.handle_unknown=function(A,Q){this.print_token(A),A.text[A.text.length-1]===`
`&&this.print_newline(!1,Q)},Z.prototype.handle_eof=function(A){for(;this._flags.mode===ve.Statement;)this.restore_mode();this.handle_whitespace_and_comments(A)},xe.exports.Beautifier=Z},function(xe){function l(x){this.__parent=x,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 x=new l(this.__parent);return x.set_indent(this.__indent_count,this.__alignment_count),x},l.prototype.item=function(x){return x<0?this.__items[this.__items.length+x]:this.__items[x]},l.prototype.has_match=function(x){for(var d=this.__items.length-1;d>=0;d--)if(this.__items[d].match(x))return!0;return!1},l.prototype.set_indent=function(x,d){this.is_empty()&&(this.__indent_count=x||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 x=this.__parent.current_line;return x.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),x.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),x.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,x.__items[0]===" "&&(x.__items.splice(0,1),x.__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(x){this.__items.push(x);var d=x.lastIndexOf(`
`);d!==-1?this.__character_count=x.length-d:this.__character_count+=x.length},l.prototype.pop=function(){var x=null;return this.is_empty()||(x=this.__items.pop(),this.__character_count-=x.length),x},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 x="";return this.is_empty()?this.__parent.indent_empty_lines&&(x=this.__parent.get_indent_string(this.__indent_count)):(x=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),x+=this.__items.join("")),x};function H(x,d){this.__cache=[""],this.__indent_size=x.indent_size,this.__indent_string=x.indent_char,x.indent_with_tabs||(this.__indent_string=new Array(x.indent_size+1).join(x.indent_char)),d=d||"",x.indent_level>0&&(d=new Array(x.indent_level+1).join(this.__indent_string)),this.__base_string=d,this.__base_string_length=d.length}H.prototype.get_indent_size=function(x,d){var y=this.__base_string_length;return d=d||0,x<0&&(y=0),y+=x*this.__indent_size,y+=d,y},H.prototype.get_indent_string=function(x,d){var y=this.__base_string;return d=d||0,x<0&&(x=0,y=""),d+=x*this.__indent_size,this.__ensure_cache(d),y+=this.__cache[d],y},H.prototype.__ensure_cache=function(x){for(;x>=this.__cache.length;)this.__add_column()},H.prototype.__add_column=function(){var x=this.__cache.length,d=0,y="";this.__indent_size&&x>=this.__indent_size&&(d=Math.floor(x/this.__indent_size),x-=d*this.__indent_size,y=new Array(d+1).join(this.__indent_string)),x&&(y+=new Array(x+1).join(" ")),this.__cache.push(y)};function P(x,d){this.__indent_cache=new H(x,d),this.raw=!1,this._end_with_newline=x.end_with_newline,this.indent_size=x.indent_size,this.wrap_line_length=x.wrap_line_length,this.indent_empty_lines=x.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(x,d){return this.__indent_cache.get_indent_string(x,d)},P.prototype.get_indent_size=function(x,d){return this.__indent_cache.get_indent_size(x,d)},P.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},P.prototype.add_new_line=function(x){return this.is_empty()||!x&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},P.prototype.get_code=function(x){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 y=this.__lines.join(`
`);return x!==`
`&&(y=y.replace(/[\n]/g,x)),y},P.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},P.prototype.set_indent=function(x,d){return x=x||0,d=d||0,this.next_line.set_indent(x,d),this.__lines.length>1?(this.current_line.set_indent(x,d),!0):(this.current_line.set_indent(),!1)},P.prototype.add_raw_token=function(x){for(var d=0;d<x.newlines;d++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(x.whitespace_before),this.current_line.push(x.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},P.prototype.add_token=function(x){this.__add_space_before_token(),this.current_line.push(x),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(x){for(var d=this.__lines.length;x<d;)this.__lines[x]._remove_indent(),x++;this.current_line._remove_wrap_indent()},P.prototype.trim=function(x){for(x=x===void 0?!1:x,this.current_line.trim();x&&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(x,d){for(var y=this.__lines.length-2;y>=0;){var v=this.__lines[y];if(v.is_empty())break;if(v.item(0).indexOf(x)!==0&&v.item(-1)!==d){this.__lines.splice(y+1,0,new l(this)),this.previous_line=this.__lines[this.__lines.length-2];break}y--}},xe.exports.Output=P},function(xe){function l(H,P,x,d){this.type=H,this.text=P,this.comments_before=null,this.newlines=x||0,this.whitespace_before=d||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}xe.exports.Token=l},function(xe,l){var H="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",P="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",x="\\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",y="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",v="(?:"+y+"|["+H+x+"])",U="(?:"+y+"|["+P+x+d+"])*";l.identifier=new RegExp(v+U,"g"),l.identifierStart=new RegExp(v),l.identifierMatch=new RegExp("(?:"+y+"|["+P+x+d+"])+");var W=/[\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(xe,l,H){var P=H(6).Options,x=["before-newline","after-newline","preserve-newline"];function d(y){P.call(this,y,"js");var v=this.raw_options.brace_style||null;v==="expand-strict"?this.raw_options.brace_style="expand":v==="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 U=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var W=0;W<U.length;W++)U[W]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=U[W];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",x),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}d.prototype=new P,xe.exports.Options=d},function(xe){function l(x,d){this.raw_options=H(x,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(x,d){var y=this.raw_options[x],v=d||[];return typeof y=="object"?y!==null&&typeof y.concat=="function"&&(v=y.concat()):typeof y=="string"&&(v=y.split(/[^a-zA-Z0-9_\/\-]+/)),v},l.prototype._get_boolean=function(x,d){var y=this.raw_options[x],v=y===void 0?!!d:!!y;return v},l.prototype._get_characters=function(x,d){var y=this.raw_options[x],v=d||"";return typeof y=="string"&&(v=y.replace(/\\r/,"\r").replace(/\\n/,`
`).replace(/\\t/," ")),v},l.prototype._get_number=function(x,d){var y=this.raw_options[x];d=parseInt(d,10),isNaN(d)&&(d=0);var v=parseInt(y,10);return isNaN(v)&&(v=d),v},l.prototype._get_selection=function(x,d,y){var v=this._get_selection_list(x,d,y);if(v.length!==1)throw new Error("Invalid Option Value: The option '"+x+`' can only be one of the following values:
`+d+`
You passed in: '`+this.raw_options[x]+"'");return v[0]},l.prototype._get_selection_list=function(x,d,y){if(!d||d.length===0)throw new Error("Selection list cannot be empty.");if(y=y||[d[0]],!this._is_valid_selection(y,d))throw new Error("Invalid Default Value!");var v=this._get_array(x,y);if(!this._is_valid_selection(v,d))throw new Error("Invalid Option Value: The option '"+x+`' can contain only the following values:
`+d+`
You passed in: '`+this.raw_options[x]+"'");return v},l.prototype._is_valid_selection=function(x,d){return x.length&&d.length&&!x.some(function(y){return d.indexOf(y)===-1})};function H(x,d){var y={};x=P(x);var v;for(v in x)v!==d&&(y[v]=x[v]);if(d&&x[d])for(v in x[d])y[v]=x[d][v];return y}function P(x){var d={},y;for(y in x){var v=y.replace(/-/g,"_");d[v]=x[y]}return d}xe.exports.Options=l,xe.exports.normalizeOpts=P,xe.exports.mergeOpts=H},function(xe,l,H){var P=H(8).InputScanner,x=H(9).Tokenizer,d=H(9).TOKEN,y=H(13).Directives,v=H(4),U=H(12).Pattern,W=H(14).TemplatablePattern;function I(q,ae){return ae.indexOf(q)!==-1}var L={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},V=new y(/\/\*/,/\*\//),re=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,C=/[0-9]/,_e=/[^\d\.]/,pe=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),ce=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";ce=ce.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),ce="\\?\\.(?!\\d) "+ce,ce=ce.replace(/ /g,"|");var ge=new RegExp(ce),ke="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),ve=ke.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),Ce=new RegExp("^(?:"+ve.join("|")+")$"),K,F=function(q,ae){x.call(this,q,ae),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var Z=new U(this._input),E=new W(this._input).read_options(this._options);this.__patterns={template:E,identifier:E.starting_with(v.identifier).matching(v.identifierMatch),number:Z.matching(re),punct:Z.matching(ge),comment:Z.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:Z.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:Z.matching(/<!--/),html_comment_end:Z.matching(/-->/),include:Z.starting_with(/#include/).until_after(v.lineBreak),shebang:Z.starting_with(/#!/).until_after(v.lineBreak),xml:Z.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:E.until(/['\\\n\r\u2028\u2029]/),double_quote:E.until(/["\\\n\r\u2028\u2029]/),template_text:E.until(/[`\\$]/),template_expression:E.until(/[`}\\]/)}};F.prototype=new x,F.prototype._is_comment=function(q){return q.type===L.COMMENT||q.type===L.BLOCK_COMMENT||q.type===L.UNKNOWN},F.prototype._is_opening=function(q){return q.type===L.START_BLOCK||q.type===L.START_EXPR},F.prototype._is_closing=function(q,ae){return(q.type===L.END_BLOCK||q.type===L.END_EXPR)&&ae&&(q.text==="]"&&ae.text==="["||q.text===")"&&ae.text==="("||q.text==="}"&&ae.text==="{")},F.prototype._reset=function(){K=!1},F.prototype._get_next_token=function(q,ae){var Z=null;this._readWhitespace();var E=this._input.peek();return E===null?this._create_token(L.EOF,""):(Z=Z||this._read_non_javascript(E),Z=Z||this._read_string(E),Z=Z||this._read_pair(E,this._input.peek(1)),Z=Z||this._read_word(q),Z=Z||this._read_singles(E),Z=Z||this._read_comment(E),Z=Z||this._read_regexp(E,q),Z=Z||this._read_xml(E,q),Z=Z||this._read_punctuation(),Z=Z||this._create_token(L.UNKNOWN,this._input.next()),Z)},F.prototype._read_word=function(q){var ae;if(ae=this.__patterns.identifier.read(),ae!=="")return ae=ae.replace(v.allLineBreaks,`
`),!(q.type===L.DOT||q.type===L.RESERVED&&(q.text==="set"||q.text==="get"))&&Ce.test(ae)?(ae==="in"||ae==="of")&&(q.type===L.WORD||q.type===L.STRING)?this._create_token(L.OPERATOR,ae):this._create_token(L.RESERVED,ae):this._create_token(L.WORD,ae);if(ae=this.__patterns.number.read(),ae!=="")return this._create_token(L.WORD,ae)},F.prototype._read_singles=function(q){var ae=null;return q==="("||q==="["?ae=this._create_token(L.START_EXPR,q):q===")"||q==="]"?ae=this._create_token(L.END_EXPR,q):q==="{"?ae=this._create_token(L.START_BLOCK,q):q==="}"?ae=this._create_token(L.END_BLOCK,q):q===";"?ae=this._create_token(L.SEMICOLON,q):q==="."&&_e.test(this._input.peek(1))?ae=this._create_token(L.DOT,q):q===","&&(ae=this._create_token(L.COMMA,q)),ae&&this._input.next(),ae},F.prototype._read_pair=function(q,ae){var Z=null;return q==="#"&&ae==="{"&&(Z=this._create_token(L.START_BLOCK,q+ae)),Z&&(this._input.next(),this._input.next()),Z},F.prototype._read_punctuation=function(){var q=this.__patterns.punct.read();if(q!=="")return q==="="?this._create_token(L.EQUALS,q):q==="?."?this._create_token(L.DOT,q):this._create_token(L.OPERATOR,q)},F.prototype._read_non_javascript=function(q){var ae="";if(q==="#"){if(this._is_first_token()&&(ae=this.__patterns.shebang.read(),ae))return this._create_token(L.UNKNOWN,ae.trim()+`
`);if(ae=this.__patterns.include.read(),ae)return this._create_token(L.UNKNOWN,ae.trim()+`
`);q=this._input.next();var Z="#";if(this._input.hasNext()&&this._input.testChar(C)){do q=this._input.next(),Z+=q;while(this._input.hasNext()&&q!=="#"&&q!=="=");return q==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(Z+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(Z+="{}",this._input.next(),this._input.next())),this._create_token(L.WORD,Z)}this._input.back()}else if(q==="<"&&this._is_first_token()){if(ae=this.__patterns.html_comment_start.read(),ae){for(;this._input.hasNext()&&!this._input.testChar(v.newline);)ae+=this._input.next();return K=!0,this._create_token(L.COMMENT,ae)}}else if(K&&q==="-"&&(ae=this.__patterns.html_comment_end.read(),ae))return K=!1,this._create_token(L.COMMENT,ae);return null},F.prototype._read_comment=function(q){var ae=null;if(q==="/"){var Z="";if(this._input.peek(1)==="*"){Z=this.__patterns.block_comment.read();var E=V.get_directives(Z);E&&E.ignore==="start"&&(Z+=V.readIgnored(this._input)),Z=Z.replace(v.allLineBreaks,`
`),ae=this._create_token(L.BLOCK_COMMENT,Z),ae.directives=E}else this._input.peek(1)==="/"&&(Z=this.__patterns.comment.read(),ae=this._create_token(L.COMMENT,Z))}return ae},F.prototype._read_string=function(q){if(q==="`"||q==="'"||q==='"'){var ae=this._input.next();return this.has_char_escapes=!1,q==="`"?ae+=this._read_string_recursive("`",!0,"${"):ae+=this._read_string_recursive(q),this.has_char_escapes&&this._options.unescape_strings&&(ae=$(ae)),this._input.peek()===q&&(ae+=this._input.next()),ae=ae.replace(v.allLineBreaks,`
`),this._create_token(L.STRING,ae)}return null},F.prototype._allow_regexp_or_xml=function(q){return q.type===L.RESERVED&&I(q.text,["return","case","throw","else","do","typeof","yield"])||q.type===L.END_EXPR&&q.text===")"&&q.opened.previous.type===L.RESERVED&&I(q.opened.previous.text,["if","while","for"])||I(q.type,[L.COMMENT,L.START_EXPR,L.START_BLOCK,L.START,L.END_BLOCK,L.OPERATOR,L.EQUALS,L.EOF,L.SEMICOLON,L.COMMA])},F.prototype._read_regexp=function(q,ae){if(q==="/"&&this._allow_regexp_or_xml(ae)){for(var Z=this._input.next(),E=!1,A=!1;this._input.hasNext()&&(E||A||this._input.peek()!==q)&&!this._input.testChar(v.newline);)Z+=this._input.peek(),E?E=!1:(E=this._input.peek()==="\\",this._input.peek()==="["?A=!0:this._input.peek()==="]"&&(A=!1)),this._input.next();return this._input.peek()===q&&(Z+=this._input.next(),Z+=this._input.read(v.identifier)),this._create_token(L.STRING,Z)}return null},F.prototype._read_xml=function(q,ae){if(this._options.e4x&&q==="<"&&this._allow_regexp_or_xml(ae)){var Z="",E=this.__patterns.xml.read_match();if(E){for(var A=E[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),Q=A.indexOf("{")===0,fe=0;E;){var $e=!!E[1],Ze=E[2],it=!!E[E.length-1]||Ze.slice(0,8)==="![CDATA[";if(!it&&(Ze===A||Q&&Ze.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&($e?--fe:++fe),Z+=E[0],fe<=0)break;E=this.__patterns.xml.read_match()}return E||(Z+=this._input.match(/[\s\S]*/g)[0]),Z=Z.replace(v.allLineBreaks,`
`),this._create_token(L.STRING,Z)}}return null};function $(q){for(var ae="",Z=0,E=new P(q),A=null;E.hasNext();)if(A=E.match(/([\s]|[^\\]|\\\\)+/g),A&&(ae+=A[0]),E.peek()==="\\"){if(E.next(),E.peek()==="x")A=E.match(/x([0-9A-Fa-f]{2})/g);else if(E.peek()==="u")A=E.match(/u([0-9A-Fa-f]{4})/g),A||(A=E.match(/u\{([0-9A-Fa-f]+)\}/g));else{ae+="\\",E.hasNext()&&(ae+=E.next());continue}if(!A||(Z=parseInt(A[1],16),Z>126&&Z<=255&&A[0].indexOf("x")===0))return q;Z>=0&&Z<32||Z>1114111?ae+="\\"+A[0]:Z===34||Z===39||Z===92?ae+="\\"+String.fromCharCode(Z):ae+=String.fromCharCode(Z)}return ae}F.prototype._read_string_recursive=function(q,ae,Z){var E,A;q==="'"?A=this.__patterns.single_quote:q==='"'?A=this.__patterns.double_quote:q==="`"?A=this.__patterns.template_text:q==="}"&&(A=this.__patterns.template_expression);for(var Q=A.read(),fe="";this._input.hasNext();){if(fe=this._input.next(),fe===q||!ae&&v.newline.test(fe)){this._input.back();break}else fe==="\\"&&this._input.hasNext()?(E=this._input.peek(),E==="x"||E==="u"?this.has_char_escapes=!0:E==="\r"&&this._input.peek(1)===`
`&&this._input.next(),fe+=this._input.next()):Z&&(Z==="${"&&fe==="$"&&this._input.peek()==="{"&&(fe+=this._input.next()),Z===fe&&(q==="`"?fe+=this._read_string_recursive("}",ae,"`"):fe+=this._read_string_recursive("`",ae,"${"),this._input.hasNext()&&(fe+=this._input.next())));fe+=A.read(),Q+=fe}return Q},xe.exports.Tokenizer=F,xe.exports.TOKEN=L,xe.exports.positionable_operators=pe.slice(),xe.exports.line_starters=ke.slice()},function(xe){var l=RegExp.prototype.hasOwnProperty("sticky");function H(P){this.__input=P||"",this.__input_length=this.__input.length,this.__position=0}H.prototype.restart=function(){this.__position=0},H.prototype.back=function(){this.__position>0&&(this.__position-=1)},H.prototype.hasNext=function(){return this.__position<this.__input_length},H.prototype.next=function(){var P=null;return this.hasNext()&&(P=this.__input.charAt(this.__position),this.__position+=1),P},H.prototype.peek=function(P){var x=null;return P=P||0,P+=this.__position,P>=0&&P<this.__input_length&&(x=this.__input.charAt(P)),x},H.prototype.__match=function(P,x){P.lastIndex=x;var d=P.exec(this.__input);return d&&!(l&&P.sticky)&&d.index!==x&&(d=null),d},H.prototype.test=function(P,x){return x=x||0,x+=this.__position,x>=0&&x<this.__input_length?!!this.__match(P,x):!1},H.prototype.testChar=function(P,x){var d=this.peek(x);return P.lastIndex=0,d!==null&&P.test(d)},H.prototype.match=function(P){var x=this.__match(P,this.__position);return x?this.__position+=x[0].length:x=null,x},H.prototype.read=function(P,x,d){var y="",v;return P&&(v=this.match(P),v&&(y+=v[0])),x&&(v||!P)&&(y+=this.readUntil(x,d)),y},H.prototype.readUntil=function(P,x){var d="",y=this.__position;P.lastIndex=this.__position;var v=P.exec(this.__input);return v?(y=v.index,x&&(y+=v[0].length)):y=this.__input_length,d=this.__input.substring(this.__position,y),this.__position=y,d},H.prototype.readUntilAfter=function(P){return this.readUntil(P,!0)},H.prototype.get_regexp=function(P,x){var d=null,y="g";return x&&l&&(y="y"),typeof P=="string"&&P!==""?d=new RegExp(P,y):P&&(d=new RegExp(P.source,y)),d},H.prototype.get_literal_regexp=function(P){return RegExp(P.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},H.prototype.peekUntilAfter=function(P){var x=this.__position,d=this.readUntilAfter(P);return this.__position=x,d},H.prototype.lookBack=function(P){var x=this.__position-1;return x>=P.length&&this.__input.substring(x-P.length,x).toLowerCase()===P},xe.exports.InputScanner=H},function(xe,l,H){var P=H(8).InputScanner,x=H(3).Token,d=H(10).TokenStream,y=H(11).WhitespacePattern,v={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},U=function(W,I){this._input=new P(W),this._options=I||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new y(this._input)};U.prototype.tokenize=function(){this._input.restart(),this.__tokens=new d,this._reset();for(var W,I=new x(v.START,""),L=null,V=[],re=new d;I.type!==v.EOF;){for(W=this._get_next_token(I,L);this._is_comment(W);)re.add(W),W=this._get_next_token(I,L);re.isEmpty()||(W.comments_before=re,re=new d),W.parent=L,this._is_opening(W)?(V.push(L),L=W):L&&this._is_closing(W,L)&&(W.opened=L,L.closed=W,L=V.pop(),W.parent=L),W.previous=I,I.next=W,this.__tokens.add(W),I=W}return this.__tokens},U.prototype._is_first_token=function(){return this.__tokens.isEmpty()},U.prototype._reset=function(){},U.prototype._get_next_token=function(W,I){this._readWhitespace();var L=this._input.read(/.+/g);return L?this._create_token(v.RAW,L):this._create_token(v.EOF,"")},U.prototype._is_comment=function(W){return!1},U.prototype._is_opening=function(W){return!1},U.prototype._is_closing=function(W,I){return!1},U.prototype._create_token=function(W,I){var L=new x(W,I,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return L},U.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},xe.exports.Tokenizer=U,xe.exports.TOKEN=v},function(xe){function l(H){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=H}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 H=null;return this.hasNext()&&(H=this.__tokens[this.__position],this.__position+=1),H},l.prototype.peek=function(H){var P=null;return H=H||0,H+=this.__position,H>=0&&H<this.__tokens_length&&(P=this.__tokens[H]),P},l.prototype.add=function(H){this.__parent_token&&(H.parent=this.__parent_token),this.__tokens.push(H),this.__tokens_length+=1},xe.exports.TokenStream=l},function(xe,l,H){var P=H(12).Pattern;function x(d,y){P.call(this,d,y),y?this._line_regexp=this._input.get_regexp(y._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}x.prototype=new P,x.prototype.__set_whitespace_patterns=function(d,y){d+="\\t ",y+="\\n\\r",this._match_pattern=this._input.get_regexp("["+d+y+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+y+"]")},x.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 y=this.__split(this._newline_regexp,d);this.newline_count=y.length-1,this.whitespace_before_token=y[this.newline_count]}return d},x.prototype.matching=function(d,y){var v=this._create();return v.__set_whitespace_patterns(d,y),v._update(),v},x.prototype._create=function(){return new x(this._input,this)},x.prototype.__split=function(d,y){d.lastIndex=0;for(var v=0,U=[],W=d.exec(y);W;)U.push(y.substring(v,W.index)),v=W.index+W[0].length,W=d.exec(y);return v<y.length?U.push(y.substring(v,y.length)):U.push(""),U},xe.exports.WhitespacePattern=x},function(xe){function l(H,P){this._input=H,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 H=this._input.read(this._starting_pattern);return(!this._starting_pattern||H)&&(H+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),H},l.prototype.read_match=function(){return this._input.match(this._match_pattern)},l.prototype.until_after=function(H){var P=this._create();return P._until_after=!0,P._until_pattern=this._input.get_regexp(H),P._update(),P},l.prototype.until=function(H){var P=this._create();return P._until_after=!1,P._until_pattern=this._input.get_regexp(H),P._update(),P},l.prototype.starting_with=function(H){var P=this._create();return P._starting_pattern=this._input.get_regexp(H,!0),P._update(),P},l.prototype.matching=function(H){var P=this._create();return P._match_pattern=this._input.get_regexp(H,!0),P._update(),P},l.prototype._create=function(){return new l(this._input,this)},l.prototype._update=function(){},xe.exports.Pattern=l},function(xe){function l(H,P){H=typeof H=="string"?H:H.source,P=typeof P=="string"?P:P.source,this.__directives_block_pattern=new RegExp(H+/ beautify( \w+[:]\w+)+ /.source+P,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(H+/\sbeautify\signore:end\s/.source+P,"g")}l.prototype.get_directives=function(H){if(!H.match(this.__directives_block_pattern))return null;var P={};this.__directive_pattern.lastIndex=0;for(var x=this.__directive_pattern.exec(H);x;)P[x[1]]=x[2],x=this.__directive_pattern.exec(H);return P},l.prototype.readIgnored=function(H){return H.readUntilAfter(this.__directives_end_ignore_pattern)},xe.exports.Directives=l},function(xe,l,H){var P=H(12).Pattern,x={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function d(y,v){P.call(this,y,v),this.__template_pattern=null,this._disabled=Object.assign({},x),this._excluded=Object.assign({},x),v&&(this.__template_pattern=this._input.get_regexp(v.__template_pattern),this._excluded=Object.assign(this._excluded,v._excluded),this._disabled=Object.assign(this._disabled,v._disabled));var U=new P(y);this.__patterns={handlebars_comment:U.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:U.starting_with(/{{{/).until_after(/}}}/),handlebars:U.starting_with(/{{/).until_after(/}}/),php:U.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:U.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:U.starting_with(/{%/).until_after(/%}/),django_value:U.starting_with(/{{/).until_after(/}}/),django_comment:U.starting_with(/{#/).until_after(/#}/),smarty:U.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:U.starting_with(/{\*/).until_after(/\*}/),smarty_literal:U.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(y){var v=this._create();return v._disabled[y]=!0,v._update(),v},d.prototype.read_options=function(y){var v=this._create();for(var U in x)v._disabled[U]=y.templating.indexOf(U)===-1;return v._update(),v},d.prototype.exclude=function(y){var v=this._create();return v._excluded[y]=!0,v._update(),v},d.prototype.read=function(){var y="";this._match_pattern?y=this._input.read(this._starting_pattern):y=this._input.read(this._starting_pattern,this.__template_pattern);for(var v=this._read_template();v;)this._match_pattern?v+=this._input.read(this._match_pattern):v+=this._input.readUntil(this.__template_pattern),y+=v,v=this._read_template();return this._until_after&&(y+=this._input.readUntilAfter(this._until_pattern)),y},d.prototype.__set_templated_pattern=function(){var y=[];this._disabled.php||y.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||y.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||y.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||y.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(y.push(this.__patterns.django._starting_pattern.source),y.push(this.__patterns.django_value._starting_pattern.source),y.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||y.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&y.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+y.join("|")+")")},d.prototype._read_template=function(){var y="",v=this._input.peek();if(v==="<"){var U=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&U==="?"&&(y=y||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&U==="%"&&(y=y||this.__patterns.erb.read())}else v==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(y=y||this.__patterns.handlebars_comment.read(),y=y||this.__patterns.handlebars_unescaped.read(),y=y||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(y=y||this.__patterns.django_value.read()),this._excluded.django||(y=y||this.__patterns.django_comment.read(),y=y||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(y=y||this.__patterns.smarty_comment.read(),y=y||this.__patterns.smarty_literal.read(),y=y||this.__patterns.smarty.read()));return y},xe.exports.TemplatablePattern=d}],Fe={};function de(xe){var l=Fe[xe];if(l!==void 0)return l.exports;var H=Fe[xe]={exports:{}};return De[xe](H,H.exports,de),H.exports}var Se=de(0);we=Se})();var Me=we;J=[],te=function(){return{js_beautify:Me}}.apply(Xe,J),te!==void 0&&(Ot.exports=te)})()},15342:function(Ot){(function(J,te){Ot.exports=te()})(typeof self!="undefined"?self:this,function(){return function(Xe){var J={};function te(we){if(J[we])return J[we].exports;var Me=J[we]={i:we,l:!1,exports:{}};return Xe[we].call(Me.exports,Me,Me.exports,te),Me.l=!0,Me.exports}return te.m=Xe,te.c=J,te.d=function(we,Me,De){te.o(we,Me)||Object.defineProperty(we,Me,{enumerable:!0,get:De})},te.r=function(we){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(we,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(we,"__esModule",{value:!0})},te.t=function(we,Me){if(Me&1&&(we=te(we)),Me&8||Me&4&&typeof we=="object"&&we&&we.__esModule)return we;var De=Object.create(null);if(te.r(De),Object.defineProperty(De,"default",{enumerable:!0,value:we}),Me&2&&typeof we!="string")for(var Fe in we)te.d(De,Fe,function(de){return we[de]}.bind(null,Fe));return De},te.n=function(we){var Me=we&&we.__esModule?function(){return we.default}:function(){return we};return te.d(Me,"a",Me),Me},te.o=function(we,Me){return Object.prototype.hasOwnProperty.call(we,Me)},te.p="",te(te.s=1)}([function(Xe,J,te){},function(Xe,J,te){"use strict";te.r(J);var we=te(0),Me=function(){function D(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 D.range=function(c,h){return h?!c||!c.loc||!h.loc||c.loc.lexer!==h.loc.lexer?null:new D(c.loc.lexer,c.loc.start,h.loc.end):c&&c.loc},D}(),De=function(){function D(c,h){this.text=void 0,this.loc=void 0,this.text=c,this.loc=h}var o=D.prototype;return o.range=function(h,p){return new D(p,Me.range(this,h))},D}(),Fe=function D(o,c){this.position=void 0;var h="KaTeX parse error: "+o,p,w=c&&c.loc;if(w&&w.start<=w.end){var S=w.lexer.input;p=w.start;var j=w.end;p===S.length?h+=" at end of input: ":h+=" at position "+(p+1)+": ";var ee=S.slice(p,j).replace(/[^]/g,"$&\u0332"),he;p>15?he="\u2026"+S.slice(p-15,p):he=S.slice(0,p);var Re;j+15<S.length?Re=S.slice(j,j+15)+"\u2026":Re=S.slice(j),h+=he+ee+Re}var Ue=new Error(h);return Ue.name="ParseError",Ue.__proto__=D.prototype,Ue.position=p,Ue};Fe.prototype.__proto__=Error.prototype;var de=Fe,Se=function(o,c){return o.indexOf(c)!==-1},xe=function(o,c){return o===void 0?c:o},l=/([A-Z])/g,H=function(o){return o.replace(l,"-$1").toLowerCase()},P={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"&#x27;"},x=/[&><"']/g;function d(D){return String(D).replace(x,function(o){return P[o]})}var y=function D(o){return o.type==="ordgroup"||o.type==="color"?o.body.length===1?D(o.body[0]):o:o.type==="font"?D(o.body):o},v=function(o){var c=y(o);return c.type==="mathord"||c.type==="textord"||c.type==="atom"},U=function(o){if(!o)throw new Error("Expected non-null, but got "+String(o));return o},W=function(o){var c=/^\s*([^\\/#]*?)(?::|&#0*58|&#x0*3a)/i.exec(o);return c!=null?c[1]:"_relative"},I={contains:Se,deflt:xe,escape:d,hyphenate:H,getBaseElem:y,isCharacterBox:v,protocolFromUrl:W},L=function(){function D(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=I.deflt(c.displayMode,!1),this.output=I.deflt(c.output,"htmlAndMathml"),this.leqno=I.deflt(c.leqno,!1),this.fleqn=I.deflt(c.fleqn,!1),this.throwOnError=I.deflt(c.throwOnError,!0),this.errorColor=I.deflt(c.errorColor,"#cc0000"),this.macros=c.macros||{},this.minRuleThickness=Math.max(0,I.deflt(c.minRuleThickness,0)),this.colorIsTextColor=I.deflt(c.colorIsTextColor,!1),this.strict=I.deflt(c.strict,"warn"),this.trust=I.deflt(c.trust,!1),this.maxSize=Math.max(0,I.deflt(c.maxSize,1/0)),this.maxExpand=Math.max(0,I.deflt(c.maxExpand,1e3))}var o=D.prototype;return o.reportNonstrict=function(h,p,w){var S=this.strict;if(typeof S=="function"&&(S=S(h,p,w)),!(!S||S==="ignore")){if(S===!0||S==="error")throw new de("LaTeX-incompatible input and strict mode is set to 'error': "+(p+" ["+h+"]"),w);S==="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 '"+S+"': "+p+" ["+h+"]"))}},o.useStrictBehavior=function(h,p,w){var S=this.strict;if(typeof S=="function")try{S=S(h,p,w)}catch(j){S="error"}return!S||S==="ignore"?!1:S===!0||S==="error"?!0:S==="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 '"+S+"': "+p+" ["+h+"]")),!1)},o.isTrusted=function(h){h.url&&!h.protocol&&(h.protocol=I.protocolFromUrl(h.url));var p=typeof this.trust=="function"?this.trust(h):this.trust;return!!p},D}(),V=function(){function D(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=D.prototype;return o.sup=function(){return Ce[K[this.id]]},o.sub=function(){return Ce[F[this.id]]},o.fracNum=function(){return Ce[$[this.id]]},o.fracDen=function(){return Ce[q[this.id]]},o.cramp=function(){return Ce[ae[this.id]]},o.text=function(){return Ce[Z[this.id]]},o.isTight=function(){return this.size>=2},D}(),re=0,C=1,_e=2,pe=3,ce=4,ge=5,ke=6,ve=7,Ce=[new V(re,0,!1),new V(C,0,!0),new V(_e,1,!1),new V(pe,1,!0),new V(ce,2,!1),new V(ge,2,!0),new V(ke,3,!1),new V(ve,3,!0)],K=[ce,ge,ce,ge,ke,ve,ke,ve],F=[ge,ge,ge,ge,ve,ve,ve,ve],$=[_e,pe,ce,ge,ke,ve,ke,ve],q=[pe,pe,ge,ge,ve,ve,ve,ve],ae=[C,C,pe,pe,ge,ge,ve,ve],Z=[re,C,_e,pe,_e,pe,_e,pe],E={DISPLAY:Ce[re],TEXT:Ce[_e],SCRIPT:Ce[ce],SCRIPTSCRIPT:Ce[ke]},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 Q(D){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(D>=p[0]&&D<=p[1])return c.name}return null}var fe=[];A.forEach(function(D){return D.blocks.forEach(function(o){return fe.push.apply(fe,o)})});function $e(D){for(var o=0;o<fe.length;o+=2)if(D>=fe[o]&&D<=fe[o+1])return!0;return!1}var Ze=80,it=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"},tt=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"},$t=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"},ut=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"},nt=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"},tr=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"},sr=function(o,c,h){c=1e3*c;var p="";switch(o){case"sqrtMain":p=it(c,Ze);break;case"sqrtSize1":p=tt(c,Ze);break;case"sqrtSize2":p=$t(c,Ze);break;case"sqrtSize3":p=ut(c,Ze);break;case"sqrtSize4":p=nt(c,Ze);break;case"sqrtTall":p=tr(c,Ze,h)}return p},_r={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`},ar=function(){function D(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=D.prototype;return o.hasClass=function(h){return I.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(w){return w.toText()};return this.children.map(h).join("")},D}(),Yt=function(o){return o.filter(function(c){return c}).join(" ")},It=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)}},Te=function(o){var c=document.createElement(o);c.className=Yt(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 w=0;w<this.children.length;w++)c.appendChild(this.children[w].toNode());return c},qe=function(o){var c="<"+o;this.classes.length&&(c+=' class="'+I.escape(Yt(this.classes))+'"');var h="";for(var p in this.style)this.style.hasOwnProperty(p)&&(h+=I.hyphenate(p)+":"+this.style[p]+";");h&&(c+=' style="'+I.escape(h)+'"');for(var w in this.attributes)this.attributes.hasOwnProperty(w)&&(c+=" "+w+'="'+I.escape(this.attributes[w])+'"');c+=">";for(var S=0;S<this.children.length;S++)c+=this.children[S].toMarkup();return c+="</"+o+">",c},Ie=function(){function D(c,h,p,w){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,It.call(this,c,p,w),this.children=h||[]}var o=D.prototype;return o.setAttribute=function(h,p){this.attributes[h]=p},o.hasClass=function(h){return I.contains(this.classes,h)},o.toNode=function(){return Te.call(this,"span")},o.toMarkup=function(){return qe.call(this,"span")},D}(),rt=function(){function D(c,h,p,w){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,It.call(this,h,w),this.children=p||[],this.setAttribute("href",c)}var o=D.prototype;return o.setAttribute=function(h,p){this.attributes[h]=p},o.hasClass=function(h){return I.contains(this.classes,h)},o.toNode=function(){return Te.call(this,"a")},o.toMarkup=function(){return qe.call(this,"a")},D}(),st=function(){function D(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=D.prototype;return o.hasClass=function(h){return I.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 w in this.style)this.style.hasOwnProperty(w)&&(p+=I.hyphenate(w)+":"+this.style[w]+";");return p&&(h+=' style="'+I.escape(p)+'"'),h+="'/>",h},D}(),z={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},oe=function(){function D(c,h,p,w,S,j,ee,he){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=w||0,this.skew=S||0,this.width=j||0,this.classes=ee||[],this.style=he||{},this.maxFontSize=0;var Re=Q(this.text.charCodeAt(0));Re&&this.classes.push(Re+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=z[this.text])}var o=D.prototype;return o.hasClass=function(h){return I.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=Yt(this.classes));for(var w in this.style)this.style.hasOwnProperty(w)&&(p=p||document.createElement("span"),p.style[w]=this.style[w]);return p?(p.appendChild(h),p):h},o.toMarkup=function(){var h=!1,p="<span";this.classes.length&&(h=!0,p+=' class="',p+=I.escape(Yt(this.classes)),p+='"');var w="";this.italic>0&&(w+="margin-right:"+this.italic+"em;");for(var S in this.style)this.style.hasOwnProperty(S)&&(w+=I.hyphenate(S)+":"+this.style[S]+";");w&&(h=!0,p+=' style="'+I.escape(w)+'"');var j=I.escape(this.text);return h?(p+=">",p+=j,p+="</span>",p):j},D}(),Ae=function(){function D(c,h){this.children=void 0,this.attributes=void 0,this.children=c||[],this.attributes=h||{}}var o=D.prototype;return o.toNode=function(){var h="http://www.w3.org/2000/svg",p=document.createElementNS(h,"svg");for(var w in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,w)&&p.setAttribute(w,this.attributes[w]);for(var S=0;S<this.children.length;S++)p.appendChild(this.children[S].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 w=0;w<this.children.length;w++)h+=this.children[w].toMarkup();return h+="</svg>",h},D}(),ye=function(){function D(c,h){this.pathName=void 0,this.alternate=void 0,this.pathName=c,this.alternate=h}var o=D.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",_r[this.pathName]),p},o.toMarkup=function(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+_r[this.pathName]+"'/>"},D}(),Pe=function(){function D(c){this.attributes=void 0,this.attributes=c||{}}var o=D.prototype;return o.toNode=function(){var h="http://www.w3.org/2000/svg",p=document.createElementNS(h,"line");for(var w in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,w)&&p.setAttribute(w,this.attributes[w]);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},D}();function ze(D){if(D instanceof oe)return D;throw new Error("Expected symbolNode but got "+String(D)+".")}function Ve(D){if(D instanceof Ie)return D;throw new Error("Expected span<HtmlDomNode> but got "+String(D)+".")}var Je={"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]}},je={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]},Ke={\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 _t(D,o){Je[D]=o}function xt(D,o,c){if(!Je[o])throw new Error("Font metrics not found for font: "+o+".");var h=D.charCodeAt(0),p=Je[o][h];if(!p&&D[0]in Ke&&(h=Ke[D[0]].charCodeAt(0),p=Je[o][h]),!p&&c==="text"&&$e(h)&&(p=Je[o][77]),p)return{depth:p[0],height:p[1],italic:p[2],skew:p[3],width:p[4]}}var ht={};function gt(D){var o;if(D>=5?o=0:D>=3?o=1:o=2,!ht[o]){var c=ht[o]={cssEmPerMu:je.quad[o]/18};for(var h in je)je.hasOwnProperty(h)&&(c[h]=je[h][o])}return ht[o]}var Et={bin:1,close:1,inner:1,open:1,punct:1,rel:1},pt={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},kt={math:{},text:{}},wt=kt;function _(D,o,c,h,p,w){kt[D][p]={font:o,group:c,replace:h},w&&h&&(kt[D][h]=kt[D][p])}var T="math",We="text",O="main",ne="ams",Kt="accent-token",ue="bin",Ee="close",Oe="inner",N="mathord",Y="op-token",le="open",be="punct",R="rel",ft="spacing",se="textord";_(T,O,R,"\u2261","\\equiv",!0),_(T,O,R,"\u227A","\\prec",!0),_(T,O,R,"\u227B","\\succ",!0),_(T,O,R,"\u223C","\\sim",!0),_(T,O,R,"\u22A5","\\perp"),_(T,O,R,"\u2AAF","\\preceq",!0),_(T,O,R,"\u2AB0","\\succeq",!0),_(T,O,R,"\u2243","\\simeq",!0),_(T,O,R,"\u2223","\\mid",!0),_(T,O,R,"\u226A","\\ll",!0),_(T,O,R,"\u226B","\\gg",!0),_(T,O,R,"\u224D","\\asymp",!0),_(T,O,R,"\u2225","\\parallel"),_(T,O,R,"\u22C8","\\bowtie",!0),_(T,O,R,"\u2323","\\smile",!0),_(T,O,R,"\u2291","\\sqsubseteq",!0),_(T,O,R,"\u2292","\\sqsupseteq",!0),_(T,O,R,"\u2250","\\doteq",!0),_(T,O,R,"\u2322","\\frown",!0),_(T,O,R,"\u220B","\\ni",!0),_(T,O,R,"\u221D","\\propto",!0),_(T,O,R,"\u22A2","\\vdash",!0),_(T,O,R,"\u22A3","\\dashv",!0),_(T,O,R,"\u220B","\\owns"),_(T,O,be,".","\\ldotp"),_(T,O,be,"\u22C5","\\cdotp"),_(T,O,se,"#","\\#"),_(We,O,se,"#","\\#"),_(T,O,se,"&","\\&"),_(We,O,se,"&","\\&"),_(T,O,se,"\u2135","\\aleph",!0),_(T,O,se,"\u2200","\\forall",!0),_(T,O,se,"\u210F","\\hbar",!0),_(T,O,se,"\u2203","\\exists",!0),_(T,O,se,"\u2207","\\nabla",!0),_(T,O,se,"\u266D","\\flat",!0),_(T,O,se,"\u2113","\\ell",!0),_(T,O,se,"\u266E","\\natural",!0),_(T,O,se,"\u2663","\\clubsuit",!0),_(T,O,se,"\u2118","\\wp",!0),_(T,O,se,"\u266F","\\sharp",!0),_(T,O,se,"\u2662","\\diamondsuit",!0),_(T,O,se,"\u211C","\\Re",!0),_(T,O,se,"\u2661","\\heartsuit",!0),_(T,O,se,"\u2111","\\Im",!0),_(T,O,se,"\u2660","\\spadesuit",!0),_(We,O,se,"\xA7","\\S",!0),_(We,O,se,"\xB6","\\P",!0),_(T,O,se,"\u2020","\\dag"),_(We,O,se,"\u2020","\\dag"),_(We,O,se,"\u2020","\\textdagger"),_(T,O,se,"\u2021","\\ddag"),_(We,O,se,"\u2021","\\ddag"),_(We,O,se,"\u2021","\\textdaggerdbl"),_(T,O,Ee,"\u23B1","\\rmoustache",!0),_(T,O,le,"\u23B0","\\lmoustache",!0),_(T,O,Ee,"\u27EF","\\rgroup",!0),_(T,O,le,"\u27EE","\\lgroup",!0),_(T,O,ue,"\u2213","\\mp",!0),_(T,O,ue,"\u2296","\\ominus",!0),_(T,O,ue,"\u228E","\\uplus",!0),_(T,O,ue,"\u2293","\\sqcap",!0),_(T,O,ue,"\u2217","\\ast"),_(T,O,ue,"\u2294","\\sqcup",!0),_(T,O,ue,"\u25EF","\\bigcirc"),_(T,O,ue,"\u2219","\\bullet"),_(T,O,ue,"\u2021","\\ddagger"),_(T,O,ue,"\u2240","\\wr",!0),_(T,O,ue,"\u2A3F","\\amalg"),_(T,O,ue,"&","\\And"),_(T,O,R,"\u27F5","\\longleftarrow",!0),_(T,O,R,"\u21D0","\\Leftarrow",!0),_(T,O,R,"\u27F8","\\Longleftarrow",!0),_(T,O,R,"\u27F6","\\longrightarrow",!0),_(T,O,R,"\u21D2","\\Rightarrow",!0),_(T,O,R,"\u27F9","\\Longrightarrow",!0),_(T,O,R,"\u2194","\\leftrightarrow",!0),_(T,O,R,"\u27F7","\\longleftrightarrow",!0),_(T,O,R,"\u21D4","\\Leftrightarrow",!0),_(T,O,R,"\u27FA","\\Longleftrightarrow",!0),_(T,O,R,"\u21A6","\\mapsto",!0),_(T,O,R,"\u27FC","\\longmapsto",!0),_(T,O,R,"\u2197","\\nearrow",!0),_(T,O,R,"\u21A9","\\hookleftarrow",!0),_(T,O,R,"\u21AA","\\hookrightarrow",!0),_(T,O,R,"\u2198","\\searrow",!0),_(T,O,R,"\u21BC","\\leftharpoonup",!0),_(T,O,R,"\u21C0","\\rightharpoonup",!0),_(T,O,R,"\u2199","\\swarrow",!0),_(T,O,R,"\u21BD","\\leftharpoondown",!0),_(T,O,R,"\u21C1","\\rightharpoondown",!0),_(T,O,R,"\u2196","\\nwarrow",!0),_(T,O,R,"\u21CC","\\rightleftharpoons",!0),_(T,ne,R,"\u226E","\\nless",!0),_(T,ne,R,"\uE010","\\@nleqslant"),_(T,ne,R,"\uE011","\\@nleqq"),_(T,ne,R,"\u2A87","\\lneq",!0),_(T,ne,R,"\u2268","\\lneqq",!0),_(T,ne,R,"\uE00C","\\@lvertneqq"),_(T,ne,R,"\u22E6","\\lnsim",!0),_(T,ne,R,"\u2A89","\\lnapprox",!0),_(T,ne,R,"\u2280","\\nprec",!0),_(T,ne,R,"\u22E0","\\npreceq",!0),_(T,ne,R,"\u22E8","\\precnsim",!0),_(T,ne,R,"\u2AB9","\\precnapprox",!0),_(T,ne,R,"\u2241","\\nsim",!0),_(T,ne,R,"\uE006","\\@nshortmid"),_(T,ne,R,"\u2224","\\nmid",!0),_(T,ne,R,"\u22AC","\\nvdash",!0),_(T,ne,R,"\u22AD","\\nvDash",!0),_(T,ne,R,"\u22EA","\\ntriangleleft"),_(T,ne,R,"\u22EC","\\ntrianglelefteq",!0),_(T,ne,R,"\u228A","\\subsetneq",!0),_(T,ne,R,"\uE01A","\\@varsubsetneq"),_(T,ne,R,"\u2ACB","\\subsetneqq",!0),_(T,ne,R,"\uE017","\\@varsubsetneqq"),_(T,ne,R,"\u226F","\\ngtr",!0),_(T,ne,R,"\uE00F","\\@ngeqslant"),_(T,ne,R,"\uE00E","\\@ngeqq"),_(T,ne,R,"\u2A88","\\gneq",!0),_(T,ne,R,"\u2269","\\gneqq",!0),_(T,ne,R,"\uE00D","\\@gvertneqq"),_(T,ne,R,"\u22E7","\\gnsim",!0),_(T,ne,R,"\u2A8A","\\gnapprox",!0),_(T,ne,R,"\u2281","\\nsucc",!0),_(T,ne,R,"\u22E1","\\nsucceq",!0),_(T,ne,R,"\u22E9","\\succnsim",!0),_(T,ne,R,"\u2ABA","\\succnapprox",!0),_(T,ne,R,"\u2246","\\ncong",!0),_(T,ne,R,"\uE007","\\@nshortparallel"),_(T,ne,R,"\u2226","\\nparallel",!0),_(T,ne,R,"\u22AF","\\nVDash",!0),_(T,ne,R,"\u22EB","\\ntriangleright"),_(T,ne,R,"\u22ED","\\ntrianglerighteq",!0),_(T,ne,R,"\uE018","\\@nsupseteqq"),_(T,ne,R,"\u228B","\\supsetneq",!0),_(T,ne,R,"\uE01B","\\@varsupsetneq"),_(T,ne,R,"\u2ACC","\\supsetneqq",!0),_(T,ne,R,"\uE019","\\@varsupsetneqq"),_(T,ne,R,"\u22AE","\\nVdash",!0),_(T,ne,R,"\u2AB5","\\precneqq",!0),_(T,ne,R,"\u2AB6","\\succneqq",!0),_(T,ne,R,"\uE016","\\@nsubseteqq"),_(T,ne,ue,"\u22B4","\\unlhd"),_(T,ne,ue,"\u22B5","\\unrhd"),_(T,ne,R,"\u219A","\\nleftarrow",!0),_(T,ne,R,"\u219B","\\nrightarrow",!0),_(T,ne,R,"\u21CD","\\nLeftarrow",!0),_(T,ne,R,"\u21CF","\\nRightarrow",!0),_(T,ne,R,"\u21AE","\\nleftrightarrow",!0),_(T,ne,R,"\u21CE","\\nLeftrightarrow",!0),_(T,ne,R,"\u25B3","\\vartriangle"),_(T,ne,se,"\u210F","\\hslash"),_(T,ne,se,"\u25BD","\\triangledown"),_(T,ne,se,"\u25CA","\\lozenge"),_(T,ne,se,"\u24C8","\\circledS"),_(T,ne,se,"\xAE","\\circledR"),_(We,ne,se,"\xAE","\\circledR"),_(T,ne,se,"\u2221","\\measuredangle",!0),_(T,ne,se,"\u2204","\\nexists"),_(T,ne,se,"\u2127","\\mho"),_(T,ne,se,"\u2132","\\Finv",!0),_(T,ne,se,"\u2141","\\Game",!0),_(T,ne,se,"\u2035","\\backprime"),_(T,ne,se,"\u25B2","\\blacktriangle"),_(T,ne,se,"\u25BC","\\blacktriangledown"),_(T,ne,se,"\u25A0","\\blacksquare"),_(T,ne,se,"\u29EB","\\blacklozenge"),_(T,ne,se,"\u2605","\\bigstar"),_(T,ne,se,"\u2222","\\sphericalangle",!0),_(T,ne,se,"\u2201","\\complement",!0),_(T,ne,se,"\xF0","\\eth",!0),_(T,ne,se,"\u2571","\\diagup"),_(T,ne,se,"\u2572","\\diagdown"),_(T,ne,se,"\u25A1","\\square"),_(T,ne,se,"\u25A1","\\Box"),_(T,ne,se,"\u25CA","\\Diamond"),_(T,ne,se,"\xA5","\\yen",!0),_(We,ne,se,"\xA5","\\yen",!0),_(T,ne,se,"\u2713","\\checkmark",!0),_(We,ne,se,"\u2713","\\checkmark"),_(T,ne,se,"\u2136","\\beth",!0),_(T,ne,se,"\u2138","\\daleth",!0),_(T,ne,se,"\u2137","\\gimel",!0),_(T,ne,se,"\u03DD","\\digamma",!0),_(T,ne,se,"\u03F0","\\varkappa"),_(T,ne,le,"\u250C","\\ulcorner",!0),_(T,ne,Ee,"\u2510","\\urcorner",!0),_(T,ne,le,"\u2514","\\llcorner",!0),_(T,ne,Ee,"\u2518","\\lrcorner",!0),_(T,ne,R,"\u2266","\\leqq",!0),_(T,ne,R,"\u2A7D","\\leqslant",!0),_(T,ne,R,"\u2A95","\\eqslantless",!0),_(T,ne,R,"\u2272","\\lesssim",!0),_(T,ne,R,"\u2A85","\\lessapprox",!0),_(T,ne,R,"\u224A","\\approxeq",!0),_(T,ne,ue,"\u22D6","\\lessdot"),_(T,ne,R,"\u22D8","\\lll",!0),_(T,ne,R,"\u2276","\\lessgtr",!0),_(T,ne,R,"\u22DA","\\lesseqgtr",!0),_(T,ne,R,"\u2A8B","\\lesseqqgtr",!0),_(T,ne,R,"\u2251","\\doteqdot"),_(T,ne,R,"\u2253","\\risingdotseq",!0),_(T,ne,R,"\u2252","\\fallingdotseq",!0),_(T,ne,R,"\u223D","\\backsim",!0),_(T,ne,R,"\u22CD","\\backsimeq",!0),_(T,ne,R,"\u2AC5","\\subseteqq",!0),_(T,ne,R,"\u22D0","\\Subset",!0),_(T,ne,R,"\u228F","\\sqsubset",!0),_(T,ne,R,"\u227C","\\preccurlyeq",!0),_(T,ne,R,"\u22DE","\\curlyeqprec",!0),_(T,ne,R,"\u227E","\\precsim",!0),_(T,ne,R,"\u2AB7","\\precapprox",!0),_(T,ne,R,"\u22B2","\\vartriangleleft"),_(T,ne,R,"\u22B4","\\trianglelefteq"),_(T,ne,R,"\u22A8","\\vDash",!0),_(T,ne,R,"\u22AA","\\Vvdash",!0),_(T,ne,R,"\u2323","\\smallsmile"),_(T,ne,R,"\u2322","\\smallfrown"),_(T,ne,R,"\u224F","\\bumpeq",!0),_(T,ne,R,"\u224E","\\Bumpeq",!0),_(T,ne,R,"\u2267","\\geqq",!0),_(T,ne,R,"\u2A7E","\\geqslant",!0),_(T,ne,R,"\u2A96","\\eqslantgtr",!0),_(T,ne,R,"\u2273","\\gtrsim",!0),_(T,ne,R,"\u2A86","\\gtrapprox",!0),_(T,ne,ue,"\u22D7","\\gtrdot"),_(T,ne,R,"\u22D9","\\ggg",!0),_(T,ne,R,"\u2277","\\gtrless",!0),_(T,ne,R,"\u22DB","\\gtreqless",!0),_(T,ne,R,"\u2A8C","\\gtreqqless",!0),_(T,ne,R,"\u2256","\\eqcirc",!0),_(T,ne,R,"\u2257","\\circeq",!0),_(T,ne,R,"\u225C","\\triangleq",!0),_(T,ne,R,"\u223C","\\thicksim"),_(T,ne,R,"\u2248","\\thickapprox"),_(T,ne,R,"\u2AC6","\\supseteqq",!0),_(T,ne,R,"\u22D1","\\Supset",!0),_(T,ne,R,"\u2290","\\sqsupset",!0),_(T,ne,R,"\u227D","\\succcurlyeq",!0),_(T,ne,R,"\u22DF","\\curlyeqsucc",!0),_(T,ne,R,"\u227F","\\succsim",!0),_(T,ne,R,"\u2AB8","\\succapprox",!0),_(T,ne,R,"\u22B3","\\vartriangleright"),_(T,ne,R,"\u22B5","\\trianglerighteq"),_(T,ne,R,"\u22A9","\\Vdash",!0),_(T,ne,R,"\u2223","\\shortmid"),_(T,ne,R,"\u2225","\\shortparallel"),_(T,ne,R,"\u226C","\\between",!0),_(T,ne,R,"\u22D4","\\pitchfork",!0),_(T,ne,R,"\u221D","\\varpropto"),_(T,ne,R,"\u25C0","\\blacktriangleleft"),_(T,ne,R,"\u2234","\\therefore",!0),_(T,ne,R,"\u220D","\\backepsilon"),_(T,ne,R,"\u25B6","\\blacktriangleright"),_(T,ne,R,"\u2235","\\because",!0),_(T,ne,R,"\u22D8","\\llless"),_(T,ne,R,"\u22D9","\\gggtr"),_(T,ne,ue,"\u22B2","\\lhd"),_(T,ne,ue,"\u22B3","\\rhd"),_(T,ne,R,"\u2242","\\eqsim",!0),_(T,O,R,"\u22C8","\\Join"),_(T,ne,R,"\u2251","\\Doteq",!0),_(T,ne,ue,"\u2214","\\dotplus",!0),_(T,ne,ue,"\u2216","\\smallsetminus"),_(T,ne,ue,"\u22D2","\\Cap",!0),_(T,ne,ue,"\u22D3","\\Cup",!0),_(T,ne,ue,"\u2A5E","\\doublebarwedge",!0),_(T,ne,ue,"\u229F","\\boxminus",!0),_(T,ne,ue,"\u229E","\\boxplus",!0),_(T,ne,ue,"\u22C7","\\divideontimes",!0),_(T,ne,ue,"\u22C9","\\ltimes",!0),_(T,ne,ue,"\u22CA","\\rtimes",!0),_(T,ne,ue,"\u22CB","\\leftthreetimes",!0),_(T,ne,ue,"\u22CC","\\rightthreetimes",!0),_(T,ne,ue,"\u22CF","\\curlywedge",!0),_(T,ne,ue,"\u22CE","\\curlyvee",!0),_(T,ne,ue,"\u229D","\\circleddash",!0),_(T,ne,ue,"\u229B","\\circledast",!0),_(T,ne,ue,"\u22C5","\\centerdot"),_(T,ne,ue,"\u22BA","\\intercal",!0),_(T,ne,ue,"\u22D2","\\doublecap"),_(T,ne,ue,"\u22D3","\\doublecup"),_(T,ne,ue,"\u22A0","\\boxtimes",!0),_(T,ne,R,"\u21E2","\\dashrightarrow",!0),_(T,ne,R,"\u21E0","\\dashleftarrow",!0),_(T,ne,R,"\u21C7","\\leftleftarrows",!0),_(T,ne,R,"\u21C6","\\leftrightarrows",!0),_(T,ne,R,"\u21DA","\\Lleftarrow",!0),_(T,ne,R,"\u219E","\\twoheadleftarrow",!0),_(T,ne,R,"\u21A2","\\leftarrowtail",!0),_(T,ne,R,"\u21AB","\\looparrowleft",!0),_(T,ne,R,"\u21CB","\\leftrightharpoons",!0),_(T,ne,R,"\u21B6","\\curvearrowleft",!0),_(T,ne,R,"\u21BA","\\circlearrowleft",!0),_(T,ne,R,"\u21B0","\\Lsh",!0),_(T,ne,R,"\u21C8","\\upuparrows",!0),_(T,ne,R,"\u21BF","\\upharpoonleft",!0),_(T,ne,R,"\u21C3","\\downharpoonleft",!0),_(T,ne,R,"\u22B8","\\multimap",!0),_(T,ne,R,"\u21AD","\\leftrightsquigarrow",!0),_(T,ne,R,"\u21C9","\\rightrightarrows",!0),_(T,ne,R,"\u21C4","\\rightleftarrows",!0),_(T,ne,R,"\u21A0","\\twoheadrightarrow",!0),_(T,ne,R,"\u21A3","\\rightarrowtail",!0),_(T,ne,R,"\u21AC","\\looparrowright",!0),_(T,ne,R,"\u21B7","\\curvearrowright",!0),_(T,ne,R,"\u21BB","\\circlearrowright",!0),_(T,ne,R,"\u21B1","\\Rsh",!0),_(T,ne,R,"\u21CA","\\downdownarrows",!0),_(T,ne,R,"\u21BE","\\upharpoonright",!0),_(T,ne,R,"\u21C2","\\downharpoonright",!0),_(T,ne,R,"\u21DD","\\rightsquigarrow",!0),_(T,ne,R,"\u21DD","\\leadsto"),_(T,ne,R,"\u21DB","\\Rrightarrow",!0),_(T,ne,R,"\u21BE","\\restriction"),_(T,O,se,"\u2018","`"),_(T,O,se,"$","\\$"),_(We,O,se,"$","\\$"),_(We,O,se,"$","\\textdollar"),_(T,O,se,"%","\\%"),_(We,O,se,"%","\\%"),_(T,O,se,"_","\\_"),_(We,O,se,"_","\\_"),_(We,O,se,"_","\\textunderscore"),_(T,O,se,"\u2220","\\angle",!0),_(T,O,se,"\u221E","\\infty",!0),_(T,O,se,"\u2032","\\prime"),_(T,O,se,"\u25B3","\\triangle"),_(T,O,se,"\u0393","\\Gamma",!0),_(T,O,se,"\u0394","\\Delta",!0),_(T,O,se,"\u0398","\\Theta",!0),_(T,O,se,"\u039B","\\Lambda",!0),_(T,O,se,"\u039E","\\Xi",!0),_(T,O,se,"\u03A0","\\Pi",!0),_(T,O,se,"\u03A3","\\Sigma",!0),_(T,O,se,"\u03A5","\\Upsilon",!0),_(T,O,se,"\u03A6","\\Phi",!0),_(T,O,se,"\u03A8","\\Psi",!0),_(T,O,se,"\u03A9","\\Omega",!0),_(T,O,se,"A","\u0391"),_(T,O,se,"B","\u0392"),_(T,O,se,"E","\u0395"),_(T,O,se,"Z","\u0396"),_(T,O,se,"H","\u0397"),_(T,O,se,"I","\u0399"),_(T,O,se,"K","\u039A"),_(T,O,se,"M","\u039C"),_(T,O,se,"N","\u039D"),_(T,O,se,"O","\u039F"),_(T,O,se,"P","\u03A1"),_(T,O,se,"T","\u03A4"),_(T,O,se,"X","\u03A7"),_(T,O,se,"\xAC","\\neg",!0),_(T,O,se,"\xAC","\\lnot"),_(T,O,se,"\u22A4","\\top"),_(T,O,se,"\u22A5","\\bot"),_(T,O,se,"\u2205","\\emptyset"),_(T,ne,se,"\u2205","\\varnothing"),_(T,O,N,"\u03B1","\\alpha",!0),_(T,O,N,"\u03B2","\\beta",!0),_(T,O,N,"\u03B3","\\gamma",!0),_(T,O,N,"\u03B4","\\delta",!0),_(T,O,N,"\u03F5","\\epsilon",!0),_(T,O,N,"\u03B6","\\zeta",!0),_(T,O,N,"\u03B7","\\eta",!0),_(T,O,N,"\u03B8","\\theta",!0),_(T,O,N,"\u03B9","\\iota",!0),_(T,O,N,"\u03BA","\\kappa",!0),_(T,O,N,"\u03BB","\\lambda",!0),_(T,O,N,"\u03BC","\\mu",!0),_(T,O,N,"\u03BD","\\nu",!0),_(T,O,N,"\u03BE","\\xi",!0),_(T,O,N,"\u03BF","\\omicron",!0),_(T,O,N,"\u03C0","\\pi",!0),_(T,O,N,"\u03C1","\\rho",!0),_(T,O,N,"\u03C3","\\sigma",!0),_(T,O,N,"\u03C4","\\tau",!0),_(T,O,N,"\u03C5","\\upsilon",!0),_(T,O,N,"\u03D5","\\phi",!0),_(T,O,N,"\u03C7","\\chi",!0),_(T,O,N,"\u03C8","\\psi",!0),_(T,O,N,"\u03C9","\\omega",!0),_(T,O,N,"\u03B5","\\varepsilon",!0),_(T,O,N,"\u03D1","\\vartheta",!0),_(T,O,N,"\u03D6","\\varpi",!0),_(T,O,N,"\u03F1","\\varrho",!0),_(T,O,N,"\u03C2","\\varsigma",!0),_(T,O,N,"\u03C6","\\varphi",!0),_(T,O,ue,"\u2217","*"),_(T,O,ue,"+","+"),_(T,O,ue,"\u2212","-"),_(T,O,ue,"\u22C5","\\cdot",!0),_(T,O,ue,"\u2218","\\circ"),_(T,O,ue,"\xF7","\\div",!0),_(T,O,ue,"\xB1","\\pm",!0),_(T,O,ue,"\xD7","\\times",!0),_(T,O,ue,"\u2229","\\cap",!0),_(T,O,ue,"\u222A","\\cup",!0),_(T,O,ue,"\u2216","\\setminus"),_(T,O,ue,"\u2227","\\land"),_(T,O,ue,"\u2228","\\lor"),_(T,O,ue,"\u2227","\\wedge",!0),_(T,O,ue,"\u2228","\\vee",!0),_(T,O,se,"\u221A","\\surd"),_(T,O,le,"(","("),_(T,O,le,"[","["),_(T,O,le,"\u27E8","\\langle",!0),_(T,O,le,"\u2223","\\lvert"),_(T,O,le,"\u2225","\\lVert"),_(T,O,Ee,")",")"),_(T,O,Ee,"]","]"),_(T,O,Ee,"?","?"),_(T,O,Ee,"!","!"),_(T,O,Ee,"\u27E9","\\rangle",!0),_(T,O,Ee,"\u2223","\\rvert"),_(T,O,Ee,"\u2225","\\rVert"),_(T,O,R,"=","="),_(T,O,R,"<","<"),_(T,O,R,">",">"),_(T,O,R,":",":"),_(T,O,R,"\u2248","\\approx",!0),_(T,O,R,"\u2245","\\cong",!0),_(T,O,R,"\u2265","\\ge"),_(T,O,R,"\u2265","\\geq",!0),_(T,O,R,"\u2190","\\gets"),_(T,O,R,">","\\gt"),_(T,O,R,"\u2208","\\in",!0),_(T,O,R,"\uE020","\\@not"),_(T,O,R,"\u2282","\\subset",!0),_(T,O,R,"\u2283","\\supset",!0),_(T,O,R,"\u2286","\\subseteq",!0),_(T,O,R,"\u2287","\\supseteq",!0),_(T,ne,R,"\u2288","\\nsubseteq",!0),_(T,ne,R,"\u2289","\\nsupseteq",!0),_(T,O,R,"\u22A8","\\models"),_(T,O,R,"\u2190","\\leftarrow",!0),_(T,O,R,"\u2264","\\le"),_(T,O,R,"\u2264","\\leq",!0),_(T,O,R,"<","\\lt"),_(T,O,R,"\u2192","\\rightarrow",!0),_(T,O,R,"\u2192","\\to"),_(T,ne,R,"\u2271","\\ngeq",!0),_(T,ne,R,"\u2270","\\nleq",!0),_(T,O,ft,"\xA0","\\ "),_(T,O,ft,"\xA0","~"),_(T,O,ft,"\xA0","\\space"),_(T,O,ft,"\xA0","\\nobreakspace"),_(We,O,ft,"\xA0","\\ "),_(We,O,ft,"\xA0","~"),_(We,O,ft,"\xA0","\\space"),_(We,O,ft,"\xA0","\\nobreakspace"),_(T,O,ft,null,"\\nobreak"),_(T,O,ft,null,"\\allowbreak"),_(T,O,be,",",","),_(T,O,be,";",";"),_(T,ne,ue,"\u22BC","\\barwedge",!0),_(T,ne,ue,"\u22BB","\\veebar",!0),_(T,O,ue,"\u2299","\\odot",!0),_(T,O,ue,"\u2295","\\oplus",!0),_(T,O,ue,"\u2297","\\otimes",!0),_(T,O,se,"\u2202","\\partial",!0),_(T,O,ue,"\u2298","\\oslash",!0),_(T,ne,ue,"\u229A","\\circledcirc",!0),_(T,ne,ue,"\u22A1","\\boxdot",!0),_(T,O,ue,"\u25B3","\\bigtriangleup"),_(T,O,ue,"\u25BD","\\bigtriangledown"),_(T,O,ue,"\u2020","\\dagger"),_(T,O,ue,"\u22C4","\\diamond"),_(T,O,ue,"\u22C6","\\star"),_(T,O,ue,"\u25C3","\\triangleleft"),_(T,O,ue,"\u25B9","\\triangleright"),_(T,O,le,"{","\\{"),_(We,O,se,"{","\\{"),_(We,O,se,"{","\\textbraceleft"),_(T,O,Ee,"}","\\}"),_(We,O,se,"}","\\}"),_(We,O,se,"}","\\textbraceright"),_(T,O,le,"{","\\lbrace"),_(T,O,Ee,"}","\\rbrace"),_(T,O,le,"[","\\lbrack"),_(We,O,se,"[","\\lbrack"),_(T,O,Ee,"]","\\rbrack"),_(We,O,se,"]","\\rbrack"),_(T,O,le,"(","\\lparen"),_(T,O,Ee,")","\\rparen"),_(We,O,se,"<","\\textless"),_(We,O,se,">","\\textgreater"),_(T,O,le,"\u230A","\\lfloor",!0),_(T,O,Ee,"\u230B","\\rfloor",!0),_(T,O,le,"\u2308","\\lceil",!0),_(T,O,Ee,"\u2309","\\rceil",!0),_(T,O,se,"\\","\\backslash"),_(T,O,se,"\u2223","|"),_(T,O,se,"\u2223","\\vert"),_(We,O,se,"|","\\textbar"),_(T,O,se,"\u2225","\\|"),_(T,O,se,"\u2225","\\Vert"),_(We,O,se,"\u2225","\\textbardbl"),_(We,O,se,"~","\\textasciitilde"),_(We,O,se,"\\","\\textbackslash"),_(We,O,se,"^","\\textasciicircum"),_(T,O,R,"\u2191","\\uparrow",!0),_(T,O,R,"\u21D1","\\Uparrow",!0),_(T,O,R,"\u2193","\\downarrow",!0),_(T,O,R,"\u21D3","\\Downarrow",!0),_(T,O,R,"\u2195","\\updownarrow",!0),_(T,O,R,"\u21D5","\\Updownarrow",!0),_(T,O,Y,"\u2210","\\coprod"),_(T,O,Y,"\u22C1","\\bigvee"),_(T,O,Y,"\u22C0","\\bigwedge"),_(T,O,Y,"\u2A04","\\biguplus"),_(T,O,Y,"\u22C2","\\bigcap"),_(T,O,Y,"\u22C3","\\bigcup"),_(T,O,Y,"\u222B","\\int"),_(T,O,Y,"\u222B","\\intop"),_(T,O,Y,"\u222C","\\iint"),_(T,O,Y,"\u222D","\\iiint"),_(T,O,Y,"\u220F","\\prod"),_(T,O,Y,"\u2211","\\sum"),_(T,O,Y,"\u2A02","\\bigotimes"),_(T,O,Y,"\u2A01","\\bigoplus"),_(T,O,Y,"\u2A00","\\bigodot"),_(T,O,Y,"\u222E","\\oint"),_(T,O,Y,"\u222F","\\oiint"),_(T,O,Y,"\u2230","\\oiiint"),_(T,O,Y,"\u2A06","\\bigsqcup"),_(T,O,Y,"\u222B","\\smallint"),_(We,O,Oe,"\u2026","\\textellipsis"),_(T,O,Oe,"\u2026","\\mathellipsis"),_(We,O,Oe,"\u2026","\\ldots",!0),_(T,O,Oe,"\u2026","\\ldots",!0),_(T,O,Oe,"\u22EF","\\@cdots",!0),_(T,O,Oe,"\u22F1","\\ddots",!0),_(T,O,se,"\u22EE","\\varvdots"),_(T,O,Kt,"\u02CA","\\acute"),_(T,O,Kt,"\u02CB","\\grave"),_(T,O,Kt,"\xA8","\\ddot"),_(T,O,Kt,"~","\\tilde"),_(T,O,Kt,"\u02C9","\\bar"),_(T,O,Kt,"\u02D8","\\breve"),_(T,O,Kt,"\u02C7","\\check"),_(T,O,Kt,"^","\\hat"),_(T,O,Kt,"\u20D7","\\vec"),_(T,O,Kt,"\u02D9","\\dot"),_(T,O,Kt,"\u02DA","\\mathring"),_(T,O,N,"\u0131","\\imath",!0),_(T,O,N,"\u0237","\\jmath",!0),_(We,O,se,"\u0131","\\i",!0),_(We,O,se,"\u0237","\\j",!0),_(We,O,se,"\xDF","\\ss",!0),_(We,O,se,"\xE6","\\ae",!0),_(We,O,se,"\xE6","\\ae",!0),_(We,O,se,"\u0153","\\oe",!0),_(We,O,se,"\xF8","\\o",!0),_(We,O,se,"\xC6","\\AE",!0),_(We,O,se,"\u0152","\\OE",!0),_(We,O,se,"\xD8","\\O",!0),_(We,O,Kt,"\u02CA","\\'"),_(We,O,Kt,"\u02CB","\\`"),_(We,O,Kt,"\u02C6","\\^"),_(We,O,Kt,"\u02DC","\\~"),_(We,O,Kt,"\u02C9","\\="),_(We,O,Kt,"\u02D8","\\u"),_(We,O,Kt,"\u02D9","\\."),_(We,O,Kt,"\u02DA","\\r"),_(We,O,Kt,"\u02C7","\\v"),_(We,O,Kt,"\xA8",'\\"'),_(We,O,Kt,"\u02DD","\\H"),_(We,O,Kt,"\u25EF","\\textcircled");var Tt={"--":!0,"---":!0,"``":!0,"''":!0};_(We,O,se,"\u2013","--"),_(We,O,se,"\u2013","\\textendash"),_(We,O,se,"\u2014","---"),_(We,O,se,"\u2014","\\textemdash"),_(We,O,se,"\u2018","`"),_(We,O,se,"\u2018","\\textquoteleft"),_(We,O,se,"\u2019","'"),_(We,O,se,"\u2019","\\textquoteright"),_(We,O,se,"\u201C","``"),_(We,O,se,"\u201C","\\textquotedblleft"),_(We,O,se,"\u201D","''"),_(We,O,se,"\u201D","\\textquotedblright"),_(T,O,se,"\xB0","\\degree",!0),_(We,O,se,"\xB0","\\degree"),_(We,O,se,"\xB0","\\textdegree",!0),_(T,O,N,"\xA3","\\pounds"),_(T,O,N,"\xA3","\\mathsterling",!0),_(We,O,N,"\xA3","\\pounds"),_(We,O,N,"\xA3","\\textsterling",!0),_(T,ne,se,"\u2720","\\maltese"),_(We,ne,se,"\u2720","\\maltese"),_(We,O,ft,"\xA0","\\ "),_(We,O,ft,"\xA0"," "),_(We,O,ft,"\xA0","~");for(var Ct='0123456789/@."',Nt=0;Nt<Ct.length;Nt++){var br=Ct.charAt(Nt);_(T,O,se,br,br)}for(var Ht='0123456789!@*()-=+[]<>|";:?/.,',Mt=0;Mt<Ht.length;Mt++){var Tr=Ht.charAt(Mt);_(We,O,se,Tr,Tr)}for(var Br="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Gr=0;Gr<Br.length;Gr++){var zr=Br.charAt(Gr);_(T,O,N,zr,zr),_(We,O,se,zr,zr)}_(T,ne,se,"C","\u2102"),_(We,ne,se,"C","\u2102"),_(T,ne,se,"H","\u210D"),_(We,ne,se,"H","\u210D"),_(T,ne,se,"N","\u2115"),_(We,ne,se,"N","\u2115"),_(T,ne,se,"P","\u2119"),_(We,ne,se,"P","\u2119"),_(T,ne,se,"Q","\u211A"),_(We,ne,se,"Q","\u211A"),_(T,ne,se,"R","\u211D"),_(We,ne,se,"R","\u211D"),_(T,ne,se,"Z","\u2124"),_(We,ne,se,"Z","\u2124"),_(T,O,N,"h","\u210E"),_(We,O,N,"h","\u210E");for(var At="",Wt=0;Wt<Br.length;Wt++){var pr=Br.charAt(Wt);At=String.fromCharCode(55349,56320+Wt),_(T,O,N,pr,At),_(We,O,se,pr,At),At=String.fromCharCode(55349,56372+Wt),_(T,O,N,pr,At),_(We,O,se,pr,At),At=String.fromCharCode(55349,56424+Wt),_(T,O,N,pr,At),_(We,O,se,pr,At),At=String.fromCharCode(55349,56580+Wt),_(T,O,N,pr,At),_(We,O,se,pr,At),At=String.fromCharCode(55349,56736+Wt),_(T,O,N,pr,At),_(We,O,se,pr,At),At=String.fromCharCode(55349,56788+Wt),_(T,O,N,pr,At),_(We,O,se,pr,At),At=String.fromCharCode(55349,56840+Wt),_(T,O,N,pr,At),_(We,O,se,pr,At),At=String.fromCharCode(55349,56944+Wt),_(T,O,N,pr,At),_(We,O,se,pr,At),Wt<26&&(At=String.fromCharCode(55349,56632+Wt),_(T,O,N,pr,At),_(We,O,se,pr,At),At=String.fromCharCode(55349,56476+Wt),_(T,O,N,pr,At),_(We,O,se,pr,At))}At="\u{1D55C}",_(T,O,N,"k",At),_(We,O,se,"k",At);for(var Kr=0;Kr<10;Kr++){var Ir=Kr.toString();At=String.fromCharCode(55349,57294+Kr),_(T,O,N,Ir,At),_(We,O,se,Ir,At),At=String.fromCharCode(55349,57314+Kr),_(T,O,N,Ir,At),_(We,O,se,Ir,At),At=String.fromCharCode(55349,57324+Kr),_(T,O,N,Ir,At),_(We,O,se,Ir,At),At=String.fromCharCode(55349,57334+Kr),_(T,O,N,Ir,At),_(We,O,se,Ir,At)}for(var tn="\xC7\xD0\xDE\xE7\xFE",or=0;or<tn.length;or++){var wn=tn.charAt(or);_(T,O,N,wn,wn),_(We,O,se,wn,wn)}_(We,O,se,"\xF0","\xF0"),_(We,O,se,"\u2013","\u2013"),_(We,O,se,"\u2014","\u2014"),_(We,O,se,"\u2018","\u2018"),_(We,O,se,"\u2019","\u2019"),_(We,O,se,"\u201C","\u201C"),_(We,O,se,"\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"]],Pt=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],bt=function(o,c){var h=o.charCodeAt(0),p=o.charCodeAt(1),w=(h-55296)*1024+(p-56320)+65536,S=c==="math"?0:1;if(119808<=w&&w<120484){var j=Math.floor((w-119808)/26);return[rn[j][2],rn[j][S]]}else if(120782<=w&&w<=120831){var ee=Math.floor((w-120782)/10);return[Pt[ee][2],Pt[ee][S]]}else{if(w===120485||w===120486)return[rn[0][2],rn[0][S]];if(120486<w&&w<120782)return["",""];throw new de("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]],xr=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],gr=function(o,c){return c.size<2?o:qt[o-1][c.size-1]},jr=function(){function D(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||D.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=xr[this.size-1],this.maxSize=c.maxSize,this.minRuleThickness=c.minRuleThickness,this._fontMetrics=void 0}var o=D.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 w in h)h.hasOwnProperty(w)&&(p[w]=h[w]);return new D(p)},o.havingStyle=function(h){return this.style===h?this:this.extend({style:h,size:gr(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:xr[h-1]})},o.havingBaseStyle=function(h){h=h||this.style.text();var p=gr(D.BASESIZE,h);return this.size===p&&this.textSize===D.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!==D.BASESIZE?["sizing","reset-size"+this.size,"size"+D.BASESIZE]:[]},o.fontMetrics=function(){return this._fontMetrics||(this._fontMetrics=gt(this.size)),this._fontMetrics},o.getColor=function(){return this.phantom?"transparent":this.color},D}();jr.BASESIZE=6;var Fn=jr,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},Ar={ex:!0,em:!0,mu:!0},Or=function(o){return typeof o!="string"&&(o=o.unit),o in Vr||o in Ar||o==="ex"},cr=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 de("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 wt[h][o]&&wt[h][o].replace&&(o=wt[h][o].replace),{value:o,metrics:xt(o,c,h)}},Hr=function(o,c,h,p,w){var S=fn(o,c,h),j=S.metrics;o=S.value;var ee;if(j){var he=j.italic;(h==="text"||p&&p.font==="mathit")&&(he=0),ee=new oe(o,j.height,j.depth,he,j.skew,j.width,w)}else typeof console!="undefined"&&console.warn("No character metrics "+("for '"+o+"' in style '"+c+"' and mode '"+h+"'")),ee=new oe(o,0,0,0,0,0,w);if(p){ee.maxFontSize=p.sizeMultiplier,p.style.isTight()&&ee.classes.push("mtight");var Re=p.getColor();Re&&(ee.style.color=Re)}return ee},Qt=function(o,c,h,p){return p===void 0&&(p=[]),h.font==="boldsymbol"&&fn(o,"Main-Bold",c).metrics?Hr(o,"Main-Bold",c,h,p.concat(["mathbf"])):o==="\\"||wt[c][o].font==="main"?Hr(o,"Main-Regular",c,h,p):Hr(o,"AMS-Regular",c,h,p.concat(["amsrm"]))},lr=function(o,c,h,p){return/[0-9]/.test(o.charAt(0))||I.contains(nn,o)?{fontName:"Main-Italic",fontClass:"mathit"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},Sr=function(o,c,h,p){return I.contains(nn,o)?{fontName:"Main-Italic",fontClass:"mathit"}:/[0-9]/.test(o.charAt(0))?{fontName:"Caligraphic-Regular",fontClass:"mathcal"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},Cr=function(o,c,h,p){return fn(o,"Math-BoldItalic",c).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},wr=function(o,c,h){var p=o.mode,w=o.text,S=["mord"],j=p==="math"||p==="text"&&c.font,ee=j?c.font:c.fontFamily;if(w.charCodeAt(0)===55349){var he=bt(w,p),Re=he[0],Ue=he[1];return Hr(w,Re,p,c,S.concat(Ue))}else if(ee){var Ye,at;if(ee==="boldsymbol"||ee==="mathnormal"){var dt=ee==="boldsymbol"?Cr(w,p,c,S):Sr(w,p,c,S);Ye=dt.fontName,at=[dt.fontClass]}else I.contains(nn,w)?(Ye="Main-Italic",at=["mathit"]):j?(Ye=wi[ee].fontName,at=[ee]):(Ye=ai(ee,c.fontWeight,c.fontShape),at=[ee,c.fontWeight,c.fontShape]);if(fn(w,Ye,p).metrics)return Hr(w,Ye,p,c,S.concat(at));if(Tt.hasOwnProperty(w)&&Ye.substr(0,10)==="Typewriter"){for(var St=[],Ut=0;Ut<w.length;Ut++)St.push(Hr(w[Ut],Ye,p,c,S.concat(at)));return Hn(St)}}if(h==="mathord"){var Zt=lr(w,p,c,S);return Hr(w,Zt.fontName,p,c,S.concat([Zt.fontClass]))}else if(h==="textord"){var Jt=wt[p][w]&&wt[p][w].font;if(Jt==="ams"){var Xt=ai("amsrm",c.fontWeight,c.fontShape);return Hr(w,Xt,p,c,S.concat("amsrm",c.fontWeight,c.fontShape))}else if(Jt==="main"||!Jt){var Rr=ai("textrm",c.fontWeight,c.fontShape);return Hr(w,Rr,p,c,S.concat(c.fontWeight,c.fontShape))}else{var Lr=ai(Jt,c.fontWeight,c.fontShape);return Hr(w,Lr,p,c,S.concat(Lr,c.fontWeight,c.fontShape))}}else throw new Error("unexpected type: "+h+" in makeOrd")},an=function(o,c){if(Yt(o.classes)!==Yt(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 oe&&p instanceof oe&&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,w=0;w<o.children.length;w++){var S=o.children[w];S.height>c&&(c=S.height),S.depth>h&&(h=S.depth),S.maxFontSize>p&&(p=S.maxFontSize)}o.height=c,o.depth=h,o.maxFontSize=p},hr=function(o,c,h,p){var w=new Ie(o,c,h,p);return Ln(w),w},mr=function(o,c,h,p){return new Ie(o,c,h,p)},Bn=function(o,c,h){var p=hr([o],[],c);return p.height=Math.max(h||c.fontMetrics().defaultRuleThickness,c.minRuleThickness),p.style.borderBottomWidth=p.height+"em",p.maxFontSize=1,p},Qr=function(o,c,h,p){var w=new rt(o,c,h,p);return Ln(w),w},Hn=function(o){var c=new ar(o);return Ln(c),c},bi=function(o,c){return o instanceof ar?hr([],[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,w=p,S=1;S<c.length;S++){var j=-c[S].shift-w-c[S].elem.depth,ee=j-(c[S-1].elem.height+c[S-1].elem.depth);w=w+j,h.push({type:"kern",size:ee}),h.push(c[S])}return{children:h,depth:p}}var he;if(o.positionType==="top"){for(var Re=o.positionData,Ue=0;Ue<o.children.length;Ue++){var Ye=o.children[Ue];Re-=Ye.type==="kern"?Ye.size:Ye.elem.height+Ye.elem.depth}he=Re}else if(o.positionType==="bottom")he=-o.positionData;else{var at=o.children[0];if(at.type!=="elem")throw new Error('First child must have type "elem".');if(o.positionType==="shift")he=-at.elem.depth-o.positionData;else if(o.positionType==="firstBaseline")he=-at.elem.depth;else throw new Error("Invalid positionType "+o.positionType+".")}return{children:o.children,depth:he}},xi=function(o,c){for(var h=Ci(o),p=h.children,w=h.depth,S=0,j=0;j<p.length;j++){var ee=p[j];if(ee.type==="elem"){var he=ee.elem;S=Math.max(S,he.maxFontSize,he.height)}}S+=2;var Re=hr(["pstrut"],[]);Re.style.height=S+"em";for(var Ue=[],Ye=w,at=w,dt=w,St=0;St<p.length;St++){var Ut=p[St];if(Ut.type==="kern")dt+=Ut.size;else{var Zt=Ut.elem,Jt=Ut.wrapperClasses||[],Xt=Ut.wrapperStyle||{},Rr=hr(Jt,[Re,Zt],void 0,Xt);Rr.style.top=-S-dt-Zt.depth+"em",Ut.marginLeft&&(Rr.style.marginLeft=Ut.marginLeft),Ut.marginRight&&(Rr.style.marginRight=Ut.marginRight),Ue.push(Rr),dt+=Zt.height+Zt.depth}Ye=Math.min(Ye,dt),at=Math.max(at,dt)}var Lr=hr(["vlist"],Ue);Lr.style.height=at+"em";var $r;if(Ye<0){var Wr=hr([],[]),Xr=hr(["vlist"],[Wr]);Xr.style.height=-Ye+"em";var yn=hr(["vlist-s"],[new oe("\u200B")]);$r=[hr(["vlist-r"],[Lr,yn]),hr(["vlist-r"],[Xr])]}else $r=[hr(["vlist-r"],[Lr])];var hn=hr(["vlist-t"],$r);return $r.length===2&&hn.classes.push("vlist-t2"),hn.height=at,hn.depth=-Ye,hn},dn=function(o,c){var h=hr(["mspace"],[],c),p=cr(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 w;return c==="textbf"&&h==="textit"?w="BoldItalic":c==="textbf"?w="Bold":c==="textit"?w="Italic":w="Regular",p+"-"+w},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"}},Jn={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},ir=function(o,c){var h=Jn[o],p=h[0],w=h[1],S=h[2],j=new ye(p),ee=new Ae([j],{width:w+"em",height:S+"em",style:"width:"+w+"em",viewBox:"0 0 "+1e3*w+" "+1e3*S,preserveAspectRatio:"xMinYMin"}),he=mr(["overlay"],[ee],c);return he.height=S,he.style.height=S+"em",he.style.width=w+"em",he},Le={fontMap:wi,makeSymbol:Hr,mathsym:Qt,makeSpan:hr,makeSvgSpan:mr,makeLineSpan:Bn,makeAnchor:Qr,makeFragment:Hn,wrapFragment:bi,makeVList:xi,makeOrd:wr,makeGlue:dn,staticSvg:ir,svgData:Jn,tryCombineChars:yi};function jt(D,o){var c=Pr(D,o);if(!c)throw new Error("Expected node of type "+o+", but got "+(D?"node of type "+D.type:String(D)));return c}function Pr(D,o){return D&&D.type===o?D:null}function Wn(D,o){var c=oi(D,o);if(!c)throw new Error('Expected node of type "atom" and family "'+o+'", but got '+(D?D.type==="atom"?"atom of family "+D.family:"node of type "+D.type:String(D)));return c}function oi(D,o){return D&&D.type==="atom"&&D.family===o?D:null}function li(D){var o=En(D);if(!o)throw new Error("Expected node of symbol group type, but got "+(D?"node of type "+D.type:String(D)));return o}function En(D){return D&&(D.type==="atom"||pt.hasOwnProperty(D.type))?D:null}var vr={number:3,unit:"mu"},Tn={number:4,unit:"mu"},In={number:5,unit:"mu"},Yr={mord:{mop:vr,mbin:Tn,mrel:In,minner:vr},mop:{mord:vr,mop:vr,mrel:In,minner:vr},mbin:{mord:Tn,mop:Tn,mopen:Tn,minner:Tn},mrel:{mord:In,mop:In,mopen:In,minner:In},mopen:{},mclose:{mop:vr,mbin:Tn,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:Tn,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={},jn={},ei={};function Lt(D){for(var o=D.type,c=D.names,h=D.props,p=D.handler,w=D.htmlBuilder,S=D.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},ee=0;ee<c.length;++ee)$i[c[ee]]=j;o&&(w&&(jn[o]=w),S&&(ei[o]=S))}function Dn(D){var o=D.type,c=D.htmlBuilder,h=D.mathmlBuilder;Lt({type:o,names:[],props:{numArgs:0},handler:function(){throw new Error("Should never be called.")},htmlBuilder:c,mathmlBuilder:h})}var Jr=function(o){var c=Pr(o,"ordgroup");return c?c.body:[o]},mn=Le.makeSpan,Gi=["leftmost","mbin","mopen","mrel","mop","mpunct"],ti=["rightmost","mrel","mclose","mpunct"],Vn={display:E.DISPLAY,text:E.TEXT,script:E.SCRIPT,scriptscript:E.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 w=[],S=0;S<o.length;S++){var j=ur(o[S],c);if(j instanceof ar){var ee=j.children;w.push.apply(w,ee)}else w.push(j)}if(!h)return w;var he=c;if(o.length===1){var Re=Pr(o[0],"sizing")||Pr(o[0],"styling");Re&&(Re.type==="sizing"?he=c.havingSize(Re.size):Re.type==="styling"&&(he=c.havingStyle(Vn[Re.style])))}var Ue=mn([p[0]||"leftmost"],[],c),Ye=mn([p[1]||"rightmost"],[],c);return Un(w,function(at,dt){var St=dt.classes[0],Ut=at.classes[0];St==="mbin"&&I.contains(ti,Ut)?dt.classes[0]="mord":Ut==="mbin"&&I.contains(Gi,St)&&(at.classes[0]="mord")},{node:Ue},Ye),Un(w,function(at,dt){var St=gn(dt),Ut=gn(at),Zt=St&&Ut?at.hasClass("mtight")?pn[St][Ut]:Yr[St][Ut]:null;if(Zt)return Le.makeGlue(Zt,he)},{node:Ue},Ye),w},Un=function D(o,c,h,p){p&&o.push(p);for(var w=0;w<o.length;w++){var S=o[w],j=On(S);if(j){D(j.children,c,h);continue}if(S.classes[0]!=="mspace"){var ee=c(S,h.node);ee&&(h.insertAfter?h.insertAfter(ee):(o.unshift(ee),w++)),h.node=S,h.insertAfter=function(he){return function(Re){o.splice(he+1,0,Re),w++}}(w)}}p&&o.pop()},On=function(o){return o instanceof ar||o instanceof rt?o:null},Ri=function D(o,c){var h=On(o);if(h){var p=h.children;if(p.length){if(c==="right")return D(p[p.length-1],"right");if(c==="left")return D(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))},ur=function(o,c,h){if(!o)return mn();if(jn[o.type]){var p=jn[o.type](o,c);if(h&&c.size!==h.size){p=mn(c.sizingClasses(h),[p],c);var w=c.sizeMultiplier/h.sizeMultiplier;p.height*=w,p.depth*=w}return p}else throw new de("Got group of unknown type: '"+o.type+"'")};function ui(D,o){var c=mn(["base"],D,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(D,o){var c=null;D.length===1&&D[0].type==="tag"&&(c=D[0].tag,D=D[0].body);for(var h=qr(D,o,!0),p=[],w=[],S=0;S<h.length;S++)if(w.push(h[S]),h[S].hasClass("mbin")||h[S].hasClass("mrel")||h[S].hasClass("allowbreak")){for(var j=!1;S<h.length-1&&h[S+1].hasClass("mspace")&&!h[S+1].hasClass("newline");)S++,w.push(h[S]),h[S].hasClass("nobreak")&&(j=!0);j||(p.push(ui(w,o)),w=[])}else h[S].hasClass("newline")&&(w.pop(),w.length>0&&(p.push(ui(w,o)),w=[]),p.push(h[S]));w.length>0&&p.push(ui(w,o));var ee;c&&(ee=ui(qr(c,o,!0)),ee.classes=["tag"],p.push(ee));var he=mn(["katex-html"],p);if(he.setAttribute("aria-hidden","true"),ee){var Re=ee.children[0];Re.style.height=he.height+he.depth+"em",Re.style.verticalAlign=-he.depth+"em"}return he}function Ii(D){return new ar(D)}var _n=function(){function D(c,h){this.type=void 0,this.attributes=void 0,this.children=void 0,this.type=c,this.attributes={},this.children=h||[]}var o=D.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 w=0;w<this.children.length;w++)h.appendChild(this.children[w].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+=I.escape(this.attributes[p]),h+='"');h+=">";for(var w=0;w<this.children.length;w++)h+=this.children[w].toMarkup();return h+="</"+this.type+">",h},o.toText=function(){return this.children.map(function(h){return h.toText()}).join("")},D}(),ci=function(){function D(c){this.text=void 0,this.text=c}var o=D.prototype;return o.toNode=function(){return document.createTextNode(this.text)},o.toMarkup=function(){return I.escape(this.toText())},o.toText=function(){return this.text},D}(),Ki=function(){function D(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=D.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:" "},D}(),mt={MathNode:_n,TextNode:ci,SpaceNode:Ki,newDocumentFragment:Ii},vn=function(o,c,h){return wt[c][o]&&wt[c][o].replace&&o.charCodeAt(0)!==55349&&!(Tt.hasOwnProperty(o)&&h&&(h.fontFamily&&h.fontFamily.substr(4,2)==="tt"||h.font&&h.font.substr(4,2)==="tt"))&&(o=wt[c][o].replace),new mt.TextNode(o)},Oi=function(o){return o.length===1?o[0]:new mt.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 w=o.text;if(I.contains(["\\imath","\\jmath"],w))return null;wt[p][w]&&wt[p][w].replace&&(w=wt[p][w].replace);var S=Le.fontMap[h].fontName;return xt(w,S,p)?Le.fontMap[h].variant:null},cn=function(o,c,h){if(o.length===1){var p=yr(o[0],c);return h&&p instanceof _n&&p.type==="mo"&&(p.setAttribute("lspace","0em"),p.setAttribute("rspace","0em")),[p]}for(var w=[],S,j=0;j<o.length;j++){var ee=yr(o[j],c);if(ee instanceof _n&&S instanceof _n){if(ee.type==="mtext"&&S.type==="mtext"&&ee.getAttribute("mathvariant")===S.getAttribute("mathvariant")){var he;(he=S.children).push.apply(he,ee.children);continue}else if(ee.type==="mn"&&S.type==="mn"){var Re;(Re=S.children).push.apply(Re,ee.children);continue}else if(ee.type==="mi"&&ee.children.length===1&&S.type==="mn"){var Ue=ee.children[0];if(Ue instanceof ci&&Ue.text==="."){var Ye;(Ye=S.children).push.apply(Ye,ee.children);continue}}else if(S.type==="mi"&&S.children.length===1){var at=S.children[0];if(at instanceof ci&&at.text==="\u0338"&&(ee.type==="mo"||ee.type==="mi"||ee.type==="mn")){var dt=ee.children[0];dt instanceof ci&&dt.text.length>0&&(dt.text=dt.text.slice(0,1)+"\u0338"+dt.text.slice(1),w.pop())}}}w.push(ee),S=ee}return w},en=function(o,c,h){return Oi(cn(o,c,h))},yr=function(o,c){if(!o)return new mt.MathNode("mrow");if(ei[o.type]){var h=ei[o.type](o,c);return h}else throw new de("Got group of unknown type: '"+o.type+"'")};function Pn(D,o,c,h){var p=cn(D,c),w;p.length===1&&p[0]instanceof _n&&I.contains(["mrow","mtable"],p[0].type)?w=p[0]:w=new mt.MathNode("mrow",p);var S=new mt.MathNode("annotation",[new mt.TextNode(o)]);S.setAttribute("encoding","application/x-tex");var j=new mt.MathNode("semantics",[w,S]),ee=new mt.MathNode("math",[j]);ee.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML");var he=h?"katex":"katex-mathml";return Le.makeSpan([he],[ee])}var zn=function(o){return new Fn({style:o.displayMode?E.DISPLAY:E.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=Le.makeSpan(h,[o])}return o},$n=function(o,c,h){var p=zn(h),w;if(h.output==="mathml")return Pn(o,c,p,!0);if(h.output==="html"){var S=Li(o,p);w=Le.makeSpan(["katex"],[S])}else{var j=Pn(o,c,p,!1),ee=Li(o,p);w=Le.makeSpan(["katex"],[j,ee])}return ri(w,h)},Pi=function(o,c,h){var p=zn(h),w=Li(o,p),S=Le.makeSpan(["katex"],[w]);return ri(S,h)},Mi=$n,Hi={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 mt.MathNode("mo",[new mt.TextNode(Hi[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]},Fi=function(o){return o.type==="ordgroup"?o.body.length:1},ts=function(o,c){function h(){var ee=4e5,he=o.label.substr(1);if(I.contains(["widehat","widecheck","widetilde","utilde"],he)){var Re=o,Ue=Fi(Re.base),Ye,at,dt;if(Ue>5)he==="widehat"||he==="widecheck"?(Ye=420,ee=2364,dt=.42,at=he+"4"):(Ye=312,ee=2340,dt=.34,at="tilde4");else{var St=[1,1,2,2,3,3][Ue];he==="widehat"||he==="widecheck"?(ee=[0,1062,2364,2364,2364][St],Ye=[0,239,300,360,420][St],dt=[0,.24,.3,.3,.36,.42][St],at=he+St):(ee=[0,600,1033,2339,2340][St],Ye=[0,260,286,306,312][St],dt=[0,.26,.286,.3,.306,.34][St],at="tilde"+St)}var Ut=new ye(at),Zt=new Ae([Ut],{width:"100%",height:dt+"em",viewBox:"0 0 "+ee+" "+Ye,preserveAspectRatio:"none"});return{span:Le.makeSvgSpan([],[Zt],c),minWidth:0,height:dt}}else{var Jt=[],Xt=es[he],Rr=Xt[0],Lr=Xt[1],$r=Xt[2],Wr=$r/1e3,Xr=Rr.length,yn,hn;if(Xr===1){var Dr=Xt[3];yn=["hide-tail"],hn=[Dr]}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 Kn=0;Kn<Xr;Kn++){var _i=new ye(Rr[Kn]),Qn=new Ae([_i],{width:"400em",height:Wr+"em",viewBox:"0 0 "+ee+" "+$r,preserveAspectRatio:hn[Kn]+" slice"}),bn=Le.makeSvgSpan([yn[Kn]],[Qn],c);if(Xr===1)return{span:bn,minWidth:Lr,height:Wr};bn.style.height=Wr+"em",Jt.push(bn)}return{span:Le.makeSpan(["stretchy"],Jt,c),minWidth:Lr,height:Wr}}}var p=h(),w=p.span,S=p.minWidth,j=p.height;return w.height=j,w.style.height=j+"em",S>0&&(w.style.minWidth=S+"em"),w},zt=function(o,c,h,p){var w,S=o.height+o.depth+2*h;if(/fbox|color/.test(c)){if(w=Le.makeSpan(["stretchy",c],[],p),c==="fbox"){var j=p.color&&p.getColor();j&&(w.style.borderColor=j)}}else{var ee=[];/^[bx]cancel$/.test(c)&&ee.push(new Pe({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(c)&&ee.push(new Pe({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var he=new Ae(ee,{width:"100%",height:S+"em"});w=Le.makeSvgSpan([],[he],p)}return w.height=S,w.style.height=S+"em",w},Dt={encloseSpan:zt,mathMLnode:Ei,svgSpan:ts},fr=function(o,c){var h,p,w=Pr(o,"supsub"),S;w?(p=jt(w.base,"accent"),h=p.base,w.base=h,S=Ve(ur(w,c)),w.base=p):(p=jt(o,"accent"),h=p.base);var j=ur(h,c.havingCrampedStyle()),ee=p.isShifty&&I.isCharacterBox(h),he=0;if(ee){var Re=I.getBaseElem(h),Ue=ur(Re,c.havingCrampedStyle());he=ze(Ue).skew}var Ye=Math.min(j.height,c.fontMetrics().xHeight),at;if(p.isStretchy)at=Dt.svgSpan(p,c),at=Le.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:j},{type:"elem",elem:at,wrapperClasses:["svg-align"],wrapperStyle:he>0?{width:"calc(100% - "+2*he+"em)",marginLeft:2*he+"em"}:void 0}]},c);else{var dt,St;p.label==="\\vec"?(dt=Le.staticSvg("vec",c),St=Le.svgData.vec[1]):(dt=Le.makeOrd({mode:p.mode,text:p.label},c,"textord"),dt=ze(dt),dt.italic=0,St=dt.width),at=Le.makeSpan(["accent-body"],[dt]);var Ut=p.label==="\\textcircled";Ut&&(at.classes.push("accent-full"),Ye=j.height);var Zt=he;Ut||(Zt-=St/2),at.style.left=Zt+"em",p.label==="\\textcircled"&&(at.style.top=".2em"),at=Le.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:j},{type:"kern",size:-Ye},{type:"elem",elem:at}]},c)}var Jt=Le.makeSpan(["mord","accent"],[at],c);return S?(S.children[0]=Jt,S.height=Math.max(Jt.height,S.height),S.classes[0]="mord",S):Jt},Zr=function(o,c){var h=o.isStretchy?Dt.mathMLnode(o.label):new mt.MathNode("mo",[vn(o.label,o.mode)]),p=new mt.MathNode("mover",[yr(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(D){return"\\"+D}).join("|"));Lt({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),w=!p||o.funcName==="\\widehat"||o.funcName==="\\widetilde"||o.funcName==="\\widecheck";return{type:"accent",mode:o.parser.mode,label:o.funcName,isStretchy:p,isShifty:w,base:h}},htmlBuilder:fr,mathmlBuilder:Zr}),Lt({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:fr,mathmlBuilder:Zr}),Lt({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(o,c){var h=o.parser,p=o.funcName,w=c[0];return{type:"accentUnder",mode:h.mode,label:p,base:w}},htmlBuilder:function(o,c){var h=ur(o.base,c),p=Dt.svgSpan(o,c),w=o.label==="\\utilde"?.12:0,S=Le.makeVList({positionType:"bottom",positionData:p.height+w,children:[{type:"elem",elem:p,wrapperClasses:["svg-align"]},{type:"kern",size:w},{type:"elem",elem:h}]},c);return Le.makeSpan(["mord","accentunder"],[S],c)},mathmlBuilder:function(o,c){var h=Dt.mathMLnode(o.label),p=new mt.MathNode("munder",[yr(o.base,c),h]);return p.setAttribute("accentunder","true"),p}});var kn=function(o){var c=new mt.MathNode("mpadded",o?[o]:[]);return c.setAttribute("width","+0.6em"),c.setAttribute("lspace","0.3em"),c};Lt({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,w=o.funcName;return{type:"xArrow",mode:p.mode,label:w,body:c[0],below:h[0]}},htmlBuilder:function(o,c){var h=c.style,p=c.havingStyle(h.sup()),w=Le.wrapFragment(ur(o.body,p,c),c);w.classes.push("x-arrow-pad");var S;o.below&&(p=c.havingStyle(h.sub()),S=Le.wrapFragment(ur(o.below,p,c),c),S.classes.push("x-arrow-pad"));var j=Dt.svgSpan(o,c),ee=-c.fontMetrics().axisHeight+.5*j.height,he=-c.fontMetrics().axisHeight-.5*j.height-.111;(w.depth>.25||o.label==="\\xleftequilibrium")&&(he-=w.depth);var Re;if(S){var Ue=-c.fontMetrics().axisHeight+S.height+.5*j.height+.111;Re=Le.makeVList({positionType:"individualShift",children:[{type:"elem",elem:w,shift:he},{type:"elem",elem:j,shift:ee},{type:"elem",elem:S,shift:Ue}]},c)}else Re=Le.makeVList({positionType:"individualShift",children:[{type:"elem",elem:w,shift:he},{type:"elem",elem:j,shift:ee}]},c);return Re.children[0].children[0].children[1].classes.push("svg-align"),Le.makeSpan(["mrel","x-arrow"],[Re],c)},mathmlBuilder:function(o,c){var h=Dt.mathMLnode(o.label),p;if(o.body){var w=kn(yr(o.body,c));if(o.below){var S=kn(yr(o.below,c));p=new mt.MathNode("munderover",[h,S,w])}else p=new mt.MathNode("mover",[h,w])}else if(o.below){var j=kn(yr(o.below,c));p=new mt.MathNode("munder",[h,j])}else p=kn(),p=new mt.MathNode("mover",[h,p]);return p}}),Lt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(o,c){for(var h=o.parser,p=jt(c[0],"ordgroup"),w=p.body,S="",j=0;j<w.length;j++){var ee=jt(w[j],"textord");S+=ee.text}var he=parseInt(S);if(isNaN(he))throw new de("\\@char has non-numeric argument "+S);return{type:"textord",mode:h.mode,text:String.fromCharCode(he)}}});var Wi=function(o,c){var h=qr(o.body,c.withColor(o.color),!1);return Le.makeFragment(h)},ji=function(o,c){var h=cn(o.body,c.withColor(o.color)),p=new mt.MathNode("mstyle",h);return p.setAttribute("mathcolor",o.color),p};Lt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","original"]},handler:function(o,c){var h=o.parser,p=jt(c[0],"color-token").color,w=c[1];return{type:"color",mode:h.mode,color:p,body:Jr(w)}},htmlBuilder:Wi,mathmlBuilder:ji}),Lt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,greediness:3,argTypes:["color"]},handler:function(o,c){var h=o.parser,p=o.breakOnTokenText,w=jt(c[0],"color-token").color;h.gullet.macros.set("\\current@color",w);var S=h.parseExpression(!0,p);return{type:"color",mode:h.mode,color:w,body:S}},htmlBuilder:Wi,mathmlBuilder:ji}),Lt({type:"cr",names:["\\cr","\\newline"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(o,c,h){var p=o.parser,w=o.funcName,S=h[0],j=w==="\\cr",ee=!1;return j||(p.settings.displayMode&&p.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode")?ee=!1:ee=!0),{type:"cr",mode:p.mode,newLine:ee,newRow:j,size:S&&jt(S,"size").value}},htmlBuilder:function(o,c){if(o.newRow)throw new de("\\cr valid only within a tabular/array environment");var h=Le.makeSpan(["mspace"],[],c);return o.newLine&&(h.classes.push("newline"),o.size&&(h.style.marginTop=cr(o.size,c)+"em")),h},mathmlBuilder:function(o,c){var h=new mt.MathNode("mspace");return o.newLine&&(h.setAttribute("linebreak","newline"),o.size&&h.setAttribute("height",cr(o.size,c)+"em")),h}});var Yn=function(o,c,h){var p=wt.math[o]&&wt.math[o].replace,w=xt(p||o,c,h);if(!w)throw new Error("Unsupported symbol "+o+" and font size "+c+".");return w},Ls=function(o,c,h,p){var w=h.havingBaseStyle(c),S=Le.makeSpan(p.concat(w.sizingClasses(h)),[o],h),j=w.sizeMultiplier/h.sizeMultiplier;return S.height*=j,S.depth*=j,S.maxFontSize=w.sizeMultiplier,S},ra=function(o,c,h){var p=c.havingBaseStyle(h),w=(1-c.sizeMultiplier/p.sizeMultiplier)*c.fontMetrics().axisHeight;o.classes.push("delimcenter"),o.style.top=w+"em",o.height-=w,o.depth+=w},Pa=function(o,c,h,p,w,S){var j=Le.makeSymbol(o,"Main-Regular",w,p),ee=Ls(j,c,p,S);return h&&ra(ee,p,c),ee},Ma=function(o,c,h,p){return Le.makeSymbol(o,"Size"+c+"-Regular",h,p)},na=function(o,c,h,p,w,S){var j=Ma(o,c,w,p),ee=Ls(Le.makeSpan(["delimsizing","size"+c],[j],p),E.TEXT,p,S);return h&&ra(ee,p,E.TEXT),ee},Ti=function(o,c,h){var p;c==="Size1-Regular"?p="delim-size1":p="delim-size4";var w=Le.makeSpan(["delimsizinginner",p],[Le.makeSpan([],[Le.makeSymbol(o,c,h)])]);return{type:"elem",elem:w}},Mn={type:"kern",size:-.005},ia=function(o,c,h,p,w,S){var j,ee,he,Re;j=he=Re=o,ee=null;var Ue="Size1-Regular";o==="\\uparrow"?he=Re="\u23D0":o==="\\Uparrow"?he=Re="\u2016":o==="\\downarrow"?j=he="\u23D0":o==="\\Downarrow"?j=he="\u2016":o==="\\updownarrow"?(j="\\uparrow",he="\u23D0",Re="\\downarrow"):o==="\\Updownarrow"?(j="\\Uparrow",he="\u2016",Re="\\Downarrow"):o==="["||o==="\\lbrack"?(j="\u23A1",he="\u23A2",Re="\u23A3",Ue="Size4-Regular"):o==="]"||o==="\\rbrack"?(j="\u23A4",he="\u23A5",Re="\u23A6",Ue="Size4-Regular"):o==="\\lfloor"||o==="\u230A"?(he=j="\u23A2",Re="\u23A3",Ue="Size4-Regular"):o==="\\lceil"||o==="\u2308"?(j="\u23A1",he=Re="\u23A2",Ue="Size4-Regular"):o==="\\rfloor"||o==="\u230B"?(he=j="\u23A5",Re="\u23A6",Ue="Size4-Regular"):o==="\\rceil"||o==="\u2309"?(j="\u23A4",he=Re="\u23A5",Ue="Size4-Regular"):o==="("||o==="\\lparen"?(j="\u239B",he="\u239C",Re="\u239D",Ue="Size4-Regular"):o===")"||o==="\\rparen"?(j="\u239E",he="\u239F",Re="\u23A0",Ue="Size4-Regular"):o==="\\{"||o==="\\lbrace"?(j="\u23A7",ee="\u23A8",Re="\u23A9",he="\u23AA",Ue="Size4-Regular"):o==="\\}"||o==="\\rbrace"?(j="\u23AB",ee="\u23AC",Re="\u23AD",he="\u23AA",Ue="Size4-Regular"):o==="\\lgroup"||o==="\u27EE"?(j="\u23A7",Re="\u23A9",he="\u23AA",Ue="Size4-Regular"):o==="\\rgroup"||o==="\u27EF"?(j="\u23AB",Re="\u23AD",he="\u23AA",Ue="Size4-Regular"):o==="\\lmoustache"||o==="\u23B0"?(j="\u23A7",Re="\u23AD",he="\u23AA",Ue="Size4-Regular"):(o==="\\rmoustache"||o==="\u23B1")&&(j="\u23AB",Re="\u23A9",he="\u23AA",Ue="Size4-Regular");var Ye=Yn(j,Ue,w),at=Ye.height+Ye.depth,dt=Yn(he,Ue,w),St=dt.height+dt.depth,Ut=Yn(Re,Ue,w),Zt=Ut.height+Ut.depth,Jt=0,Xt=1;if(ee!==null){var Rr=Yn(ee,Ue,w);Jt=Rr.height+Rr.depth,Xt=2}var Lr=at+Zt+Jt,$r=Math.max(0,Math.ceil((c-Lr)/(Xt*St))),Wr=Lr+$r*Xt*St,Xr=p.fontMetrics().axisHeight;h&&(Xr*=p.sizeMultiplier);var yn=Wr/2-Xr,hn=($r+1)*.005-St,Dr=[];if(Dr.push(Ti(Re,Ue,w)),ee===null)for(var Kn=0;Kn<$r;Kn++)Dr.push(Mn),Dr.push(Ti(he,Ue,w));else{for(var _i=0;_i<$r;_i++)Dr.push(Mn),Dr.push(Ti(he,Ue,w));Dr.push({type:"kern",size:hn}),Dr.push(Ti(he,Ue,w)),Dr.push(Mn),Dr.push(Ti(ee,Ue,w));for(var Qn=0;Qn<$r;Qn++)Dr.push(Mn),Dr.push(Ti(he,Ue,w))}Dr.push({type:"kern",size:hn}),Dr.push(Ti(he,Ue,w)),Dr.push(Mn),Dr.push(Ti(j,Ue,w));var bn=p.havingBaseStyle(E.TEXT),vi=Le.makeVList({positionType:"bottom",positionData:yn,children:Dr},bn);return Ls(Le.makeSpan(["delimsizing","mult"],[vi],bn),E.TEXT,p,S)},Is=80,Gn=.08,fi=function(o,c,h,p,w){var S=sr(o,p,h),j=new ye(o,S),ee=new Ae([j],{width:"400em",height:c+"em",viewBox:"0 0 400000 "+h,preserveAspectRatio:"xMinYMin slice"});return Le.makeSvgSpan(["hide-tail"],[ee],w)},Fa=function(o,c){var h=c.havingBaseSizing(),p=sa("\\surd",o*h.sizeMultiplier,rs,h),w=h.sizeMultiplier,S=Math.max(0,c.minRuleThickness-c.fontMetrics().sqrtRuleThickness),j,ee=0,he=0,Re=0,Ue;return p.type==="small"?(Re=1e3+1e3*S+Is,o<1?w=1:o<1.4&&(w=.7),ee=(1+S+Gn)/w,he=(1+S)/w,j=fi("sqrtMain",ee,Re,S,c),j.style.minWidth="0.853em",Ue=.833/w):p.type==="large"?(Re=(1e3+Is)*us[p.size],he=(us[p.size]+S)/w,ee=(us[p.size]+S+Gn)/w,j=fi("sqrtSize"+p.size,ee,Re,S,c),j.style.minWidth="1.02em",Ue=1/w):(ee=o+S+Gn,he=o+S,Re=Math.floor(1e3*o+S)+Is,j=fi("sqrtTall",ee,Re,S,c),j.style.minWidth="0.742em",Ue=1.056),j.height=he,j.style.height=ee+"em",{span:j,advanceWidth:Ue,ruleWidth:(c.fontMetrics().sqrtRuleThickness+S)*w}},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,w){if(o==="<"||o==="\\lt"||o==="\u27E8"?o="\\langle":(o===">"||o==="\\gt"||o==="\u27E9")&&(o="\\rangle"),I.contains(Ai,o)||I.contains(Os,o))return na(o,c,!1,h,p,w);if(I.contains(Ba,o))return ia(o,us[c],!1,h,p,w);throw new de("Illegal delimiter: '"+o+"'")},on=[{type:"small",style:E.SCRIPTSCRIPT},{type:"small",style:E.SCRIPT},{type:"small",style:E.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Ua=[{type:"small",style:E.SCRIPTSCRIPT},{type:"small",style:E.SCRIPT},{type:"small",style:E.TEXT},{type:"stack"}],rs=[{type:"small",style:E.SCRIPTSCRIPT},{type:"small",style:E.SCRIPT},{type:"small",style:E.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 w=Math.min(2,3-p.style.size),S=w;S<h.length&&h[S].type!=="stack";S++){var j=Yn(o,Vi(h[S]),"math"),ee=j.height+j.depth;if(h[S].type==="small"){var he=p.havingBaseStyle(h[S].style);ee*=he.sizeMultiplier}if(ee>c)return h[S]}return h[h.length-1]},Mr=function(o,c,h,p,w,S){o==="<"||o==="\\lt"||o==="\u27E8"?o="\\langle":(o===">"||o==="\\gt"||o==="\u27E9")&&(o="\\rangle");var j;I.contains(Os,o)?j=on:I.contains(Ai,o)?j=rs:j=Ua;var ee=sa(o,c,j,p);return ee.type==="small"?Pa(o,ee.style,h,p,w,S):ee.type==="large"?na(o,ee.size,h,p,w,S):ia(o,c,h,p,w,S)},Ps=function(o,c,h,p,w,S){var j=p.fontMetrics().axisHeight*p.sizeMultiplier,ee=901,he=5/p.fontMetrics().ptPerEm,Re=Math.max(c-j,h+j),Ue=Math.max(Re/500*ee,2*Re-he);return Mr(o,Ue,!0,p,w,S)},qn={sqrtImage:Fa,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(D,o){var c=En(D);if(c&&I.contains(za,c.text))return c;throw new de("Invalid delimiter: '"+(c?c.text:JSON.stringify(D))+"' after '"+o.funcName+"'",D)}Lt({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==="."?Le.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 mt.MathNode("mo",c);return o.mclass==="mopen"||o.mclass==="mclose"?h.setAttribute("fence","true"):h.setAttribute("fence","false"),h}});function Ms(D){if(!D.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}Lt({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 de("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:o.parser.mode,delim:cs(c[0],o).text,color:h}}}),Lt({type:"leftright",names:["\\left"],props:{numArgs:1},handler:function(o,c){var h=cs(c[0],o),p=o.parser;++p.leftrightDepth;var w=p.parseExpression(!1);--p.leftrightDepth,p.expect("\\right",!1);var S=jt(p.parseFunction(),"leftright-right");return{type:"leftright",mode:p.mode,body:w,left:h.text,right:S.delim,rightColor:S.color}},htmlBuilder:function(o,c){Ms(o);for(var h=qr(o.body,c,!0,["mopen","mclose"]),p=0,w=0,S=!1,j=0;j<h.length;j++)h[j].isMiddle?S=!0:(p=Math.max(h[j].height,p),w=Math.max(h[j].depth,w));p*=c.sizeMultiplier,w*=c.sizeMultiplier;var ee;if(o.left==="."?ee=An(c,["mopen"]):ee=qn.leftRightDelim(o.left,p,w,c,o.mode,["mopen"]),h.unshift(ee),S)for(var he=1;he<h.length;he++){var Re=h[he],Ue=Re.isMiddle;Ue&&(h[he]=qn.leftRightDelim(Ue.delim,p,w,Ue.options,o.mode,[]))}var Ye;if(o.right===".")Ye=An(c,["mclose"]);else{var at=o.rightColor?c.withColor(o.rightColor):c;Ye=qn.leftRightDelim(o.right,p,w,at,o.mode,["mclose"])}return h.push(Ye),Le.makeSpan(["minner"],h,c)},mathmlBuilder:function(o,c){Ms(o);var h=cn(o.body,c);if(o.left!=="."){var p=new mt.MathNode("mo",[vn(o.left,o.mode)]);p.setAttribute("fence","true"),h.unshift(p)}if(o.right!=="."){var w=new mt.MathNode("mo",[vn(o.right,o.mode)]);w.setAttribute("fence","true"),o.rightColor&&w.setAttribute("mathcolor",o.rightColor),h.push(w)}return Oi(h)}}),Lt({type:"middle",names:["\\middle"],props:{numArgs:1},handler:function(o,c){var h=cs(c[0],o);if(!o.parser.leftrightDepth)throw new de("\\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 mt.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=Le.wrapFragment(ur(o.body,c),c),p=o.label.substr(1),w=c.sizeMultiplier,S,j=0,ee=I.isCharacterBox(o.body);if(p==="sout")S=Le.makeSpan(["stretchy","sout"]),S.height=c.fontMetrics().defaultRuleThickness/w,j=-.5*c.fontMetrics().xHeight;else{/cancel/.test(p)?ee||h.classes.push("cancel-pad"):h.classes.push("boxpad");var he=0,Re=0;/box/.test(p)?(Re=Math.max(c.fontMetrics().fboxrule,c.minRuleThickness),he=c.fontMetrics().fboxsep+(p==="colorbox"?0:Re)):he=ee?.2:0,S=Dt.encloseSpan(h,p,he,c),/fbox|boxed|fcolorbox/.test(p)&&(S.style.borderStyle="solid",S.style.borderWidth=Re+"em"),j=h.depth+he,o.backgroundColor&&(S.style.backgroundColor=o.backgroundColor,o.borderColor&&(S.style.borderColor=o.borderColor))}var Ue;return o.backgroundColor?Ue=Le.makeVList({positionType:"individualShift",children:[{type:"elem",elem:S,shift:j},{type:"elem",elem:h,shift:0}]},c):Ue=Le.makeVList({positionType:"individualShift",children:[{type:"elem",elem:h,shift:0},{type:"elem",elem:S,shift:j,wrapperClasses:/cancel/.test(p)?["svg-align"]:[]}]},c),/cancel/.test(p)&&(Ue.height=h.height,Ue.depth=h.depth),/cancel/.test(p)&&!ee?Le.makeSpan(["mord","cancel-lap"],[Ue],c):Le.makeSpan(["mord"],[Ue],c)},Fs=function(o,c){var h=0,p=new mt.MathNode(o.label.indexOf("colorbox")>-1?"mpadded":"menclose",[yr(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 w=Math.max(c.fontMetrics().fboxrule,c.minRuleThickness);p.setAttribute("style","border: "+w+"em solid "+String(o.borderColor))}break;case"\\xcancel":p.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return o.backgroundColor&&p.setAttribute("mathbackground",o.backgroundColor),p};Lt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","text"]},handler:function(o,c,h){var p=o.parser,w=o.funcName,S=jt(c[0],"color-token").color,j=c[1];return{type:"enclose",mode:p.mode,label:w,backgroundColor:S,body:j}},htmlBuilder:hs,mathmlBuilder:Fs}),Lt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,greediness:3,argTypes:["color","color","text"]},handler:function(o,c,h){var p=o.parser,w=o.funcName,S=jt(c[0],"color-token").color,j=jt(c[1],"color-token").color,ee=c[2];return{type:"enclose",mode:p.mode,label:w,backgroundColor:j,borderColor:S,body:ee}},htmlBuilder:hs,mathmlBuilder:Fs}),Lt({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]}}}),Lt({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout"],props:{numArgs:1},handler:function(o,c,h){var p=o.parser,w=o.funcName,S=c[0];return{type:"enclose",mode:p.mode,label:w,body:S}},htmlBuilder:hs,mathmlBuilder:Fs});var aa={};function Zn(D){for(var o=D.type,c=D.names,h=D.props,p=D.handler,w=D.htmlBuilder,S=D.mathmlBuilder,j={type:o,numArgs:h.numArgs||0,greediness:1,allowedInText:!1,numOptionalArgs:0,handler:p},ee=0;ee<c.length;++ee)aa[c[ee]]=j;w&&(jn[o]=w),S&&(ei[o]=S)}function Bs(D){var o=[];D.consumeSpaces();for(var c=D.fetch().text;c==="\\hline"||c==="\\hdashline";)D.consume(),o.push(c==="\\hdashline"),D.consumeSpaces(),c=D.fetch().text;return o}function Bi(D,o,c){var h=o.hskipBeforeAndAfter,p=o.addJot,w=o.cols,S=o.arraystretch,j=o.colSeparationType;if(D.gullet.beginGroup(),D.gullet.macros.set("\\\\","\\cr"),!S){var ee=D.gullet.expandMacroAsText("\\arraystretch");if(ee==null)S=1;else if(S=parseFloat(ee),!S||S<0)throw new de("Invalid \\arraystretch: "+ee)}D.gullet.beginGroup();var he=[],Re=[he],Ue=[],Ye=[];for(Ye.push(Bs(D));;){var at=D.parseExpression(!1,"\\cr");D.gullet.endGroup(),D.gullet.beginGroup(),at={type:"ordgroup",mode:D.mode,body:at},c&&(at={type:"styling",mode:D.mode,style:c,body:[at]}),he.push(at);var dt=D.fetch().text;if(dt==="&")D.consume();else if(dt==="\\end"){he.length===1&&at.type==="styling"&&at.body[0].body.length===0&&Re.pop(),Ye.length<Re.length+1&&Ye.push([]);break}else if(dt==="\\cr"){var St=jt(D.parseFunction(),"cr");Ue.push(St.size),Ye.push(Bs(D)),he=[],Re.push(he)}else throw new de("Expected & or \\\\ or \\cr or \\end",D.nextToken)}return D.gullet.endGroup(),D.gullet.endGroup(),{type:"array",mode:D.mode,addJot:p,arraystretch:S,body:Re,cols:w,rowGaps:Ue,hskipBeforeAndAfter:h,hLinesBeforeRow:Ye,colSeparationType:j}}function fs(D){return D.substr(0,1)==="d"?"display":"text"}var di=function(o,c){var h,p,w=o.body.length,S=o.hLinesBeforeRow,j=0,ee=new Array(w),he=[],Re=Math.max(c.fontMetrics().arrayRuleWidth,c.minRuleThickness),Ue=1/c.fontMetrics().ptPerEm,Ye=5*Ue;if(o.colSeparationType&&o.colSeparationType==="small"){var at=c.havingStyle(E.SCRIPT).sizeMultiplier;Ye=.2778*(at/c.sizeMultiplier)}var dt=12*Ue,St=3*Ue,Ut=o.arraystretch*dt,Zt=.7*Ut,Jt=.3*Ut,Xt=0;function Rr(ea){for(var zi=0;zi<ea.length;++zi)zi>0&&(Xt+=.25),he.push({pos:Xt,isDashed:ea[zi]})}for(Rr(S[0]),h=0;h<o.body.length;++h){var Lr=o.body[h],$r=Zt,Wr=Jt;j<Lr.length&&(j=Lr.length);var Xr=new Array(Lr.length);for(p=0;p<Lr.length;++p){var yn=ur(Lr[p],c);Wr<yn.depth&&(Wr=yn.depth),$r<yn.height&&($r=yn.height),Xr[p]=yn}var hn=o.rowGaps[h],Dr=0;hn&&(Dr=cr(hn,c),Dr>0&&(Dr+=Jt,Wr<Dr&&(Wr=Dr),Dr=0)),o.addJot&&(Wr+=St),Xr.height=$r,Xr.depth=Wr,Xt+=$r,Xr.pos=Xt,Xt+=Wr+Dr,ee[h]=Xr,Rr(S[h+1])}var Kn=Xt/2+c.fontMetrics().axisHeight,_i=o.cols||[],Qn=[],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=Le.makeSpan(["arraycolsep"],[]),bn.style.width=c.fontMetrics().doubleRuleSep+"em",Qn.push(bn)),sn.separator==="|"||sn.separator===":"){var to=sn.separator==="|"?"solid":"dashed",Xi=Le.makeSpan(["vertical-separator"],[],c);Xi.style.height=Xt+"em",Xi.style.borderRightWidth=Re+"em",Xi.style.borderRightStyle=to,Xi.style.margin="0 -"+Re/2+"em",Xi.style.verticalAlign=-(Xt-Kn)+"em",Qn.push(Xi)}else throw new de("Invalid separator type: "+sn.separator);vi++,sn=_i[vi]||{},ni=!1}if(!(p>=j)){var Qi=void 0;(p>0||o.hskipBeforeAndAfter)&&(Qi=I.deflt(sn.pregap,Ye),Qi!==0&&(bn=Le.makeSpan(["arraycolsep"],[]),bn.style.width=Qi+"em",Qn.push(bn)));var Ji=[];for(h=0;h<w;++h){var Ss=ee[h],Ds=Ss[p];if(Ds){var Ui=Ss.pos-Kn;Ds.depth=Ss.depth,Ds.height=Ss.height,Ji.push({type:"elem",elem:Ds,shift:Ui})}}Ji=Le.makeVList({positionType:"individualShift",children:Ji},c),Ji=Le.makeSpan(["col-align-"+(sn.align||"c")],[Ji]),Qn.push(Ji),(p<j-1||o.hskipBeforeAndAfter)&&(Qi=I.deflt(sn.postgap,Ye),Qi!==0&&(bn=Le.makeSpan(["arraycolsep"],[]),bn.style.width=Qi+"em",Qn.push(bn)))}}if(ee=Le.makeSpan(["mtable"],Qn),he.length>0){for(var Da=Le.makeLineSpan("hline",c,Re),ro=Le.makeLineSpan("hdashline",c,Re),Qs=[{type:"elem",elem:ee,shift:0}];he.length>0;){var ks=he.pop(),Js=ks.pos-Kn;ks.isDashed?Qs.push({type:"elem",elem:ro,shift:Js}):Qs.push({type:"elem",elem:Da,shift:Js})}ee=Le.makeVList({positionType:"individualShift",children:Qs},c)}return Le.makeSpan(["mord"],[ee],c)},pi={c:"center ",l:"left ",r:"right "},Si=function(o,c){var h=new mt.MathNode("mtable",o.body.map(function(Xt){return new mt.MathNode("mtr",Xt.map(function(Rr){return new mt.MathNode("mtd",[yr(Rr,c)])}))})),p=o.arraystretch===.5?.1:.16+o.arraystretch-1+(o.addJot?.09:0);h.setAttribute("rowspacing",p+"em");var w="",S="";if(o.cols){var j=o.cols,ee="",he=!1,Re=0,Ue=j.length;j[0].type==="separator"&&(w+="top ",Re=1),j[j.length-1].type==="separator"&&(w+="bottom ",Ue-=1);for(var Ye=Re;Ye<Ue;Ye++)j[Ye].type==="align"?(S+=pi[j[Ye].align],he&&(ee+="none "),he=!0):j[Ye].type==="separator"&&he&&(ee+=j[Ye].separator==="|"?"solid ":"dashed ",he=!1);h.setAttribute("columnalign",S.trim()),/[sd]/.test(ee)&&h.setAttribute("columnlines",ee.trim())}if(o.colSeparationType==="align"){for(var at=o.cols||[],dt="",St=1;St<at.length;St++)dt+=St%2?"0em ":"1em ";h.setAttribute("columnspacing",dt.trim())}else o.colSeparationType==="alignat"?h.setAttribute("columnspacing","0em"):o.colSeparationType==="small"?h.setAttribute("columnspacing","0.2778em"):h.setAttribute("columnspacing","1em");var Ut="",Zt=o.hLinesBeforeRow;w+=Zt[0].length>0?"left ":"",w+=Zt[Zt.length-1].length>0?"right ":"";for(var Jt=1;Jt<Zt.length-1;Jt++)Ut+=Zt[Jt].length===0?"none ":Zt[Jt][0]?"dashed ":"solid ";return/[sd]/.test(Ut)&&h.setAttribute("rowlines",Ut.trim()),w!==""&&(h=new mt.MathNode("menclose",[h]),h.setAttribute("notation",w.trim())),o.arraystretch&&o.arraystretch<1&&(h=new mt.MathNode("mstyle",[h]),h.setAttribute("scriptlevel","1")),h},oa=function(o,c){var h=[],p=Bi(o.parser,{cols:h,addJot:!0},"display"),w,S=0,j={type:"ordgroup",mode:o.mode,body:[]},ee=Pr(c[0],"ordgroup");if(ee){for(var he="",Re=0;Re<ee.body.length;Re++){var Ue=jt(ee.body[Re],"textord");he+=Ue.text}w=Number(he),S=w*2}var Ye=!S;p.body.forEach(function(Ut){for(var Zt=1;Zt<Ut.length;Zt+=2){var Jt=jt(Ut[Zt],"styling"),Xt=jt(Jt.body[0],"ordgroup");Xt.body.unshift(j)}if(Ye)S<Ut.length&&(S=Ut.length);else{var Rr=Ut.length/2;if(w<Rr)throw new de("Too many math in a row: "+("expected "+w+", but got "+Rr),Ut[0])}});for(var at=0;at<S;++at){var dt="r",St=0;at%2===1?dt="l":at>0&&Ye&&(St=1),h[at]={type:"align",align:dt,pregap:St,postgap:0}}return p.colSeparationType=Ye?"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]]:jt(c[0],"ordgroup").body,w=p.map(function(j){var ee=li(j),he=ee.text;if("lcr".indexOf(he)!==-1)return{type:"align",align:he};if(he==="|")return{type:"separator",separator:"|"};if(he===":")return{type:"separator",separator:":"};throw new de("Unknown column alignment: "+he,j)}),S={cols:w,hskipBeforeAndAfter:!0};return Bi(o.parser,S,fs(o.envName))},htmlBuilder:di,mathmlBuilder:Si}),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:Si}),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:Si}),Zn({type:"array",names:["subarray"],props:{numArgs:1},handler:function(o,c){var h=En(c[0]),p=h?[c[0]]:jt(c[0],"ordgroup").body,w=p.map(function(j){var ee=li(j),he=ee.text;if("lc".indexOf(he)!==-1)return{type:"align",align:he};throw new de("Unknown column alignment: "+he,j)});if(w.length>1)throw new de("{subarray} can contain only one column");var S={cols:w,hskipBeforeAndAfter:!1,arraystretch:.5};if(S=Bi(o.parser,S,"script"),S.body[0].length>1)throw new de("{subarray} can contain only one column");return S},htmlBuilder:di,mathmlBuilder:Si}),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:Si}),Zn({type:"array",names:["aligned"],props:{numArgs:0},handler:oa,htmlBuilder:di,mathmlBuilder:Si}),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:Si}),Zn({type:"array",names:["alignedat"],props:{numArgs:1},handler:oa,htmlBuilder:di,mathmlBuilder:Si}),Lt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(o,c){throw new de(o.funcName+" valid only within array environment")}});var $a=aa,la=$a;Lt({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(o,c){var h=o.parser,p=o.funcName,w=c[0];if(w.type!=="ordgroup")throw new de("Invalid environment name",w);for(var S="",j=0;j<w.body.length;++j)S+=jt(w.body[j],"textord").text;if(p==="\\begin"){if(!la.hasOwnProperty(S))throw new de("No such environment: "+S,w);var ee=la[S],he=h.parseArguments("\\begin{"+S+"}",ee),Re=he.args,Ue=he.optArgs,Ye={mode:h.mode,envName:S,parser:h},at=ee.handler(Ye,Re,Ue);h.expect("\\end",!1);var dt=h.nextToken,St=jt(h.parseFunction(),"environment");if(St.name!==S)throw new de("Mismatch: \\begin{"+S+"} matched by \\end{"+St.name+"}",dt);return at}return{type:"environment",mode:h.mode,name:S,nameGroup:w}}});var Ga=Le.makeSpan;function ds(D,o){var c=qr(D.body,o,!0);return Ga([D.mclass],c,o)}function ua(D,o){var c,h=cn(D.body,o);return D.mclass==="minner"?mt.newDocumentFragment(h):(D.mclass==="mord"?D.isCharacterBox?(c=h[0],c.type="mi"):c=new mt.MathNode("mi",h):(D.isCharacterBox?(c=h[0],c.type="mo"):c=new mt.MathNode("mo",h),D.mclass==="mbin"?(c.attributes.lspace="0.22em",c.attributes.rspace="0.22em"):D.mclass==="mpunct"?(c.attributes.lspace="0em",c.attributes.rspace="0.17em"):(D.mclass==="mopen"||D.mclass==="mclose")&&(c.attributes.lspace="0em",c.attributes.rspace="0em")),c)}Lt({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1},handler:function(o,c){var h=o.parser,p=o.funcName,w=c[0];return{type:"mclass",mode:h.mode,mclass:"m"+p.substr(5),body:Jr(w),isCharacterBox:I.isCharacterBox(w)}},htmlBuilder:ds,mathmlBuilder:ua});var lt=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"};Lt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler:function(o,c){var h=o.parser;return{type:"mclass",mode:h.mode,mclass:lt(c[0]),body:[c[1]],isCharacterBox:I.isCharacterBox(c[1])}}}),Lt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(o,c){var h=o.parser,p=o.funcName,w=c[1],S=c[0],j;p!=="\\stackrel"?j=lt(w):j="mrel";var ee={type:"op",mode:w.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:p!=="\\stackrel",body:Jr(w)},he={type:"supsub",mode:S.mode,base:ee,sup:p==="\\underset"?null:S,sub:p==="\\underset"?S:null};return{type:"mclass",mode:h.mode,mclass:j,body:[he],isCharacterBox:I.isCharacterBox(he)}},htmlBuilder:ds,mathmlBuilder:ua});var ps=function(o,c){var h=o.font,p=c.withFont(h);return ur(o.body,p)},Ns=function(o,c){var h=o.font,p=c.withFont(h);return yr(o.body,p)},ca={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};Lt({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,w=c[0],S=p;return S in ca&&(S=ca[S]),{type:"font",mode:h.mode,font:S.slice(1),body:w}},htmlBuilder:ps,mathmlBuilder:Ns}),Lt({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1,greediness:2},handler:function(o,c){var h=o.parser,p=c[0],w=I.isCharacterBox(p);return{type:"mclass",mode:h.mode,mclass:lt(p),body:[{type:"font",mode:h.mode,font:"boldsymbol",body:p}],isCharacterBox:w}}}),Lt({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it"],props:{numArgs:0,allowedInText:!0},handler:function(o,c){var h=o.parser,p=o.funcName,w=o.breakOnTokenText,S=h.mode,j=h.parseExpression(!0,w),ee="math"+p.slice(1);return{type:"font",mode:S,font:ee,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>=E.SCRIPT.id?h.text():E.DISPLAY:o==="text"&&h.size===E.DISPLAY.size?h=E.TEXT:o==="script"?h=E.SCRIPT:o==="scriptscript"&&(h=E.SCRIPTSCRIPT),h},Us=function(o,c){var h=ha(o.size,c.style),p=h.fracNum(),w=h.fracDen(),S;S=c.havingStyle(p);var j=ur(o.numer,S,c);if(o.continued){var ee=8.5/c.fontMetrics().ptPerEm,he=3.5/c.fontMetrics().ptPerEm;j.height=j.height<ee?ee:j.height,j.depth=j.depth<he?he:j.depth}S=c.havingStyle(w);var Re=ur(o.denom,S,c),Ue,Ye,at;o.hasBarLine?(o.barSize?(Ye=cr(o.barSize,c),Ue=Le.makeLineSpan("frac-line",c,Ye)):Ue=Le.makeLineSpan("frac-line",c),Ye=Ue.height,at=Ue.height):(Ue=null,Ye=0,at=c.fontMetrics().defaultRuleThickness);var dt,St,Ut;h.size===E.DISPLAY.size||o.size==="display"?(dt=c.fontMetrics().num1,Ye>0?St=3*at:St=7*at,Ut=c.fontMetrics().denom1):(Ye>0?(dt=c.fontMetrics().num2,St=at):(dt=c.fontMetrics().num3,St=3*at),Ut=c.fontMetrics().denom2);var Zt;if(Ue){var Xt=c.fontMetrics().axisHeight;dt-j.depth-(Xt+.5*Ye)<St&&(dt+=St-(dt-j.depth-(Xt+.5*Ye))),Xt-.5*Ye-(Re.height-Ut)<St&&(Ut+=St-(Xt-.5*Ye-(Re.height-Ut)));var Rr=-(Xt-.5*Ye);Zt=Le.makeVList({positionType:"individualShift",children:[{type:"elem",elem:Re,shift:Ut},{type:"elem",elem:Ue,shift:Rr},{type:"elem",elem:j,shift:-dt}]},c)}else{var Jt=dt-j.depth-(Re.height-Ut);Jt<St&&(dt+=.5*(St-Jt),Ut+=.5*(St-Jt)),Zt=Le.makeVList({positionType:"individualShift",children:[{type:"elem",elem:Re,shift:Ut},{type:"elem",elem:j,shift:-dt}]},c)}S=c.havingStyle(h),Zt.height*=S.sizeMultiplier/c.sizeMultiplier,Zt.depth*=S.sizeMultiplier/c.sizeMultiplier;var Lr;h.size===E.DISPLAY.size?Lr=c.fontMetrics().delim1:Lr=c.fontMetrics().delim2;var $r,Wr;return o.leftDelim==null?$r=An(c,["mopen"]):$r=qn.customSizedDelim(o.leftDelim,Lr,!0,c.havingStyle(h),o.mode,["mopen"]),o.continued?Wr=Le.makeSpan([]):o.rightDelim==null?Wr=An(c,["mclose"]):Wr=qn.customSizedDelim(o.rightDelim,Lr,!0,c.havingStyle(h),o.mode,["mclose"]),Le.makeSpan(["mord"].concat(S.sizingClasses(c)),[$r,Le.makeSpan(["mfrac"],[Zt]),Wr],c)},zs=function(o,c){var h=new mt.MathNode("mfrac",[yr(o.numer,c),yr(o.denom,c)]);if(!o.hasBarLine)h.setAttribute("linethickness","0px");else if(o.barSize){var p=cr(o.barSize,c);h.setAttribute("linethickness",p+"em")}var w=ha(o.size,c.style);if(w.size!==c.style.size){h=new mt.MathNode("mstyle",[h]);var S=w.size===E.DISPLAY.size?"true":"false";h.setAttribute("displaystyle",S),h.setAttribute("scriptlevel","0")}if(o.leftDelim!=null||o.rightDelim!=null){var j=[];if(o.leftDelim!=null){var ee=new mt.MathNode("mo",[new mt.TextNode(o.leftDelim.replace("\\",""))]);ee.setAttribute("fence","true"),j.push(ee)}if(j.push(h),o.rightDelim!=null){var he=new mt.MathNode("mo",[new mt.TextNode(o.rightDelim.replace("\\",""))]);he.setAttribute("fence","true"),j.push(he)}return Oi(j)}return h};Lt({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,w=c[0],S=c[1],j,ee=null,he=null,Re="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,ee="(",he=")";break;case"\\\\bracefrac":j=!1,ee="\\{",he="\\}";break;case"\\\\brackfrac":j=!1,ee="[",he="]";break;default:throw new Error("Unrecognized genfrac command")}switch(p){case"\\cfrac":case"\\dfrac":case"\\dbinom":Re="display";break;case"\\tfrac":case"\\tbinom":Re="text";break}return{type:"genfrac",mode:h.mode,continued:p==="\\cfrac",numer:w,denom:S,hasBarLine:j,leftDelim:ee,rightDelim:he,size:Re,barSize:null}},htmlBuilder:Us,mathmlBuilder:zs}),Lt({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,w;switch(h){case"\\over":w="\\frac";break;case"\\choose":w="\\binom";break;case"\\atop":w="\\\\atopfrac";break;case"\\brace":w="\\\\bracefrac";break;case"\\brack":w="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:c.mode,replaceWith:w,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};Lt({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],w=c[5],S=Pr(c[0],"atom");S&&(S=Wn(c[0],"open"));var j=S?ms(S.text):null,ee=Pr(c[1],"atom");ee&&(ee=Wn(c[1],"close"));var he=ee?ms(ee.text):null,Re=jt(c[2],"size"),Ue,Ye=null;Re.isBlank?Ue=!0:(Ye=Re.value,Ue=Ye.number>0);var at="auto",dt=Pr(c[3],"ordgroup");if(dt){if(dt.body.length>0){var St=jt(dt.body[0],"textord");at=Xn[Number(St.text)]}}else dt=jt(c[3],"textord"),at=Xn[Number(dt.text)];return{type:"genfrac",mode:h.mode,numer:p,denom:w,continued:!1,hasBarLine:Ue,barSize:Ye,leftDelim:j,rightDelim:he,size:at}},htmlBuilder:Us,mathmlBuilder:zs}),Lt({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(o,c){var h=o.parser,p=o.funcName,w=o.token;return{type:"infix",mode:h.mode,replaceWith:"\\\\abovefrac",size:jt(c[0],"size").value,token:w}}}),Lt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(o,c){var h=o.parser,p=o.funcName,w=c[0],S=U(jt(c[1],"infix").size),j=c[2],ee=S.number>0;return{type:"genfrac",mode:h.mode,numer:w,denom:j,continued:!1,hasBarLine:ee,barSize:S,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Us,mathmlBuilder:zs});var fa=function(o,c){var h=c.style,p,w,S=Pr(o,"supsub");S?(p=S.sup?ur(S.sup,c.havingStyle(h.sup()),c):ur(S.sub,c.havingStyle(h.sub()),c),w=jt(S.base,"horizBrace")):w=jt(o,"horizBrace");var j=ur(w.base,c.havingBaseStyle(E.DISPLAY)),ee=Dt.svgSpan(w,c),he;if(w.isOver?(he=Le.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:j},{type:"kern",size:.1},{type:"elem",elem:ee}]},c),he.children[0].children[0].children[1].classes.push("svg-align")):(he=Le.makeVList({positionType:"bottom",positionData:j.depth+.1+ee.height,children:[{type:"elem",elem:ee},{type:"kern",size:.1},{type:"elem",elem:j}]},c),he.children[0].children[0].children[0].classes.push("svg-align")),p){var Re=Le.makeSpan(["mord",w.isOver?"mover":"munder"],[he],c);w.isOver?he=Le.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:Re},{type:"kern",size:.2},{type:"elem",elem:p}]},c):he=Le.makeVList({positionType:"bottom",positionData:Re.depth+.2+p.height+p.depth,children:[{type:"elem",elem:p},{type:"kern",size:.2},{type:"elem",elem:Re}]},c)}return Le.makeSpan(["mord",w.isOver?"mover":"munder"],[he],c)},Ka=function(o,c){var h=Dt.mathMLnode(o.label);return new mt.MathNode(o.isOver?"mover":"munder",[yr(o.base,c),h])};Lt({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:Ka}),Lt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(o,c){var h=o.parser,p=c[1],w=jt(c[0],"url").url;return h.settings.isTrusted({command:"\\href",url:w})?{type:"href",mode:h.mode,href:w,body:Jr(p)}:h.formatUnsupportedCmd("\\href")},htmlBuilder:function(o,c){var h=qr(o.body,c,!1);return Le.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}}),Lt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(o,c){var h=o.parser,p=jt(c[0],"url").url;if(!h.settings.isTrusted({command:"\\url",url:p}))return h.formatUnsupportedCmd("\\url");for(var w=[],S=0;S<p.length;S++){var j=p[S];j==="~"&&(j="\\textasciitilde"),w.push({type:"textord",mode:"text",text:j})}var ee={type:"text",mode:h.mode,font:"\\texttt",body:w};return{type:"href",mode:h.mode,href:p,body:Jr(ee)}}}),Lt({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:Jr(c[0]),mathml:Jr(c[1])}},htmlBuilder:function(o,c){var h=qr(o.html,c,!1);return Le.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 de("Invalid size: '"+o+"' in \\includegraphics");var h={number:+(c[1]+c[2]),unit:c[3]};if(!Or(h))throw new de("Invalid unit: '"+h.unit+"' in \\includegraphics.");return h};Lt({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:function(o,c,h){var p=o.parser,w={number:0,unit:"em"},S={number:.9,unit:"em"},j={number:0,unit:"em"},ee="";if(h[0])for(var he=jt(h[0],"raw").string,Re=he.split(","),Ue=0;Ue<Re.length;Ue++){var Ye=Re[Ue].split("=");if(Ye.length===2){var at=Ye[1].trim();switch(Ye[0].trim()){case"alt":ee=at;break;case"width":w=gs(at);break;case"height":S=gs(at);break;case"totalheight":j=gs(at);break;default:throw new de("Invalid key: '"+Ye[0]+"' in \\includegraphics.")}}}var dt=jt(c[0],"url").url;return ee===""&&(ee=dt,ee=ee.replace(/^.*[\\/]/,""),ee=ee.substring(0,ee.lastIndexOf("."))),p.settings.isTrusted({command:"\\includegraphics",url:dt})?{type:"includegraphics",mode:p.mode,alt:ee,width:w,height:S,totalheight:j,src:dt}:p.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:function(o,c){var h=cr(o.height,c),p=0;o.totalheight.number>0&&(p=cr(o.totalheight,c)-h,p=Number(p.toFixed(2)));var w=0;o.width.number>0&&(w=cr(o.width,c));var S={height:h+p+"em"};w>0&&(S.width=w+"em"),p>0&&(S.verticalAlign=-p+"em");var j=new st(o.src,o.alt,S);return j.height=h,j.depth=p,j},mathmlBuilder:function(o,c){var h=new mt.MathNode("mglyph",[]);h.setAttribute("alt",o.alt);var p=cr(o.height,c),w=0;if(o.totalheight.number>0&&(w=cr(o.totalheight,c)-p,w=w.toFixed(2),h.setAttribute("valign","-"+w+"em")),h.setAttribute("height",p+w+"em"),o.width.number>0){var S=cr(o.width,c);h.setAttribute("width",S+"em")}return h.setAttribute("src",o.src),h}}),Lt({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,w=jt(c[0],"size");if(h.settings.strict){var S=p[1]==="m",j=w.value.unit==="mu";S?(j||h.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+p+" supports only mu units, "+("not "+w.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:w.value}},htmlBuilder:function(o,c){return Le.makeGlue(o.dimension,c)},mathmlBuilder:function(o,c){var h=cr(o.dimension,c);return new mt.SpaceNode(h)}}),Lt({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(o,c){var h=o.parser,p=o.funcName,w=c[0];return{type:"lap",mode:h.mode,alignment:p.slice(5),body:w}},htmlBuilder:function(o,c){var h;o.alignment==="clap"?(h=Le.makeSpan([],[ur(o.body,c)]),h=Le.makeSpan(["inner"],[h],c)):h=Le.makeSpan(["inner"],[ur(o.body,c)]);var p=Le.makeSpan(["fix"],[]),w=Le.makeSpan([o.alignment],[h,p],c),S=Le.makeSpan(["strut"]);return S.style.height=w.height+w.depth+"em",S.style.verticalAlign=-w.depth+"em",w.children.unshift(S),w=Le.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:w}]},c),Le.makeSpan(["mord"],[w],c)},mathmlBuilder:function(o,c){var h=new mt.MathNode("mpadded",[yr(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}}),Lt({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(o,c){var h=o.funcName,p=o.parser,w=p.mode;p.switchMode("math");var S=h==="\\("?"\\)":"$",j=p.parseExpression(!1,S);return p.expect(S),p.switchMode(w),{type:"styling",mode:p.mode,style:"text",body:j}}}),Lt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(o,c){throw new de("Mismatched "+o.funcName)}});var $s=function(o,c){switch(c.style.size){case E.DISPLAY.size:return o.display;case E.TEXT.size:return o.text;case E.SCRIPT.size:return o.script;case E.SCRIPTSCRIPT.size:return o.scriptscript;default:return o.text}};Lt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4},handler:function(o,c){var h=o.parser;return{type:"mathchoice",mode:h.mode,display:Jr(c[0]),text:Jr(c[1]),script:Jr(c[2]),scriptscript:Jr(c[3])}},htmlBuilder:function(o,c){var h=$s(o,c),p=qr(h,c,!1);return Le.makeFragment(p)},mathmlBuilder:function(o,c){var h=$s(o,c);return en(h,c)}});var _s=function(o,c,h,p,w,S,j){o=Le.makeSpan([],[o]);var ee,he;if(c){var Re=ur(c,p.havingStyle(w.sup()),p);he={elem:Re,kern:Math.max(p.fontMetrics().bigOpSpacing1,p.fontMetrics().bigOpSpacing3-Re.depth)}}if(h){var Ue=ur(h,p.havingStyle(w.sub()),p);ee={elem:Ue,kern:Math.max(p.fontMetrics().bigOpSpacing2,p.fontMetrics().bigOpSpacing4-Ue.height)}}var Ye;if(he&&ee){var at=p.fontMetrics().bigOpSpacing5+ee.elem.height+ee.elem.depth+ee.kern+o.depth+j;Ye=Le.makeVList({positionType:"bottom",positionData:at,children:[{type:"kern",size:p.fontMetrics().bigOpSpacing5},{type:"elem",elem:ee.elem,marginLeft:-S+"em"},{type:"kern",size:ee.kern},{type:"elem",elem:o},{type:"kern",size:he.kern},{type:"elem",elem:he.elem,marginLeft:S+"em"},{type:"kern",size:p.fontMetrics().bigOpSpacing5}]},p)}else if(ee){var dt=o.height-j;Ye=Le.makeVList({positionType:"top",positionData:dt,children:[{type:"kern",size:p.fontMetrics().bigOpSpacing5},{type:"elem",elem:ee.elem,marginLeft:-S+"em"},{type:"kern",size:ee.kern},{type:"elem",elem:o}]},p)}else if(he){var St=o.depth+j;Ye=Le.makeVList({positionType:"bottom",positionData:St,children:[{type:"elem",elem:o},{type:"kern",size:he.kern},{type:"elem",elem:he.elem,marginLeft:S+"em"},{type:"kern",size:p.fontMetrics().bigOpSpacing5}]},p)}else return o;return Le.makeSpan(["mop","op-limits"],[Ye],p)},da=["\\smallint"],mi=function(o,c){var h,p,w=!1,S,j=Pr(o,"supsub");j?(h=j.sup,p=j.sub,S=jt(j.base,"op"),w=!0):S=jt(o,"op");var ee=c.style,he=!1;ee.size===E.DISPLAY.size&&S.symbol&&!I.contains(da,S.name)&&(he=!0);var Re;if(S.symbol){var Ue=he?"Size2-Regular":"Size1-Regular",Ye="";if((S.name==="\\oiint"||S.name==="\\oiiint")&&(Ye=S.name.substr(1),S.name=Ye==="oiint"?"\\iint":"\\iiint"),Re=Le.makeSymbol(S.name,Ue,"math",c,["mop","op-symbol",he?"large-op":"small-op"]),Ye.length>0){var at=Re.italic,dt=Le.staticSvg(Ye+"Size"+(he?"2":"1"),c);Re=Le.makeVList({positionType:"individualShift",children:[{type:"elem",elem:Re,shift:0},{type:"elem",elem:dt,shift:he?.08:0}]},c),S.name="\\"+Ye,Re.classes.unshift("mop"),Re.italic=at}}else if(S.body){var St=qr(S.body,c,!0);St.length===1&&St[0]instanceof oe?(Re=St[0],Re.classes[0]="mop"):Re=Le.makeSpan(["mop"],Le.tryCombineChars(St),c)}else{for(var Ut=[],Zt=1;Zt<S.name.length;Zt++)Ut.push(Le.mathsym(S.name[Zt],S.mode,c));Re=Le.makeSpan(["mop"],Ut,c)}var Jt=0,Xt=0;return(Re instanceof oe||S.name==="\\oiint"||S.name==="\\oiiint")&&!S.suppressBaseShift&&(Jt=(Re.height-Re.depth)/2-c.fontMetrics().axisHeight,Xt=Re.italic),w?_s(Re,h,p,c,ee,Xt,Jt):(Jt&&(Re.style.position="relative",Re.style.top=Jt+"em"),Re)},is=function(o,c){var h;if(o.symbol)h=new _n("mo",[vn(o.name,o.mode)]),I.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},Ha={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};Lt({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,w=p;return w.length===1&&(w=Ha[w]),{type:"op",mode:h.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:w}},htmlBuilder:mi,mathmlBuilder:is}),Lt({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:Jr(p)}},htmlBuilder:mi,mathmlBuilder:is});var pa={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};Lt({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}),Lt({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}),Lt({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,w=!1,S,j=Pr(o,"supsub");j?(h=j.sup,p=j.sub,S=jt(j.base,"operatorname"),w=!0):S=jt(o,"operatorname");var ee;if(S.body.length>0){for(var he=S.body.map(function(at){var dt=at.text;return typeof dt=="string"?{type:"textord",mode:at.mode,text:dt}:at}),Re=qr(he,c.withFont("mathrm"),!0),Ue=0;Ue<Re.length;Ue++){var Ye=Re[Ue];Ye instanceof oe&&(Ye.text=Ye.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}ee=Le.makeSpan(["mop"],Re,c)}else ee=Le.makeSpan(["mop"],[],c);return w?_s(ee,h,p,c,c.style,0,0):ee},Wa=function(o,c){for(var h=cn(o.body,c.withFont("mathrm")),p=!0,w=0;w<h.length;w++){var S=h[w];if(!(S instanceof mt.SpaceNode))if(S instanceof mt.MathNode)switch(S.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var j=S.children[0];S.children.length===1&&j instanceof mt.TextNode?j.text=j.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):p=!1;break}default:p=!1}else p=!1}if(p){var ee=h.map(function(Ue){return Ue.toText()}).join("");h=[new mt.TextNode(ee)]}var he=new mt.MathNode("mi",h);he.setAttribute("mathvariant","normal");var Re=new mt.MathNode("mo",[vn("\u2061","text")]);return o.parentIsSupSub?new mt.MathNode("mo",[he,Re]):mt.newDocumentFragment([he,Re])};Lt({type:"operatorname",names:["\\operatorname","\\operatorname*"],props:{numArgs:1},handler:function(o,c){var h=o.parser,p=o.funcName,w=c[0];return{type:"operatorname",mode:h.mode,body:Jr(w),alwaysHandleSupSub:p==="\\operatorname*",limits:!1,parentIsSupSub:!1}},htmlBuilder:Gs,mathmlBuilder:Wa}),Dn({type:"ordgroup",htmlBuilder:function(o,c){return o.semisimple?Le.makeFragment(qr(o.body,c,!1)):Le.makeSpan(["mord"],qr(o.body,c,!0),c)},mathmlBuilder:function(o,c){return en(o.body,c,!0)}}),Lt({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=ur(o.body,c.havingCrampedStyle()),p=Le.makeLineSpan("overline-line",c),w=c.fontMetrics().defaultRuleThickness,S=Le.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:h},{type:"kern",size:3*w},{type:"elem",elem:p},{type:"kern",size:w}]},c);return Le.makeSpan(["mord","overline"],[S],c)},mathmlBuilder:function(o,c){var h=new mt.MathNode("mo",[new mt.TextNode("\u203E")]);h.setAttribute("stretchy","true");var p=new mt.MathNode("mover",[yr(o.body,c),h]);return p.setAttribute("accent","true"),p}}),Lt({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:Jr(p)}},htmlBuilder:function(o,c){var h=qr(o.body,c.withPhantom(),!1);return Le.makeFragment(h)},mathmlBuilder:function(o,c){var h=cn(o.body,c);return new mt.MathNode("mphantom",h)}}),Lt({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=Le.makeSpan([],[ur(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=Le.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:h}]},c),Le.makeSpan(["mord"],[h],c)},mathmlBuilder:function(o,c){var h=cn(Jr(o.body),c),p=new mt.MathNode("mphantom",h),w=new mt.MathNode("mpadded",[p]);return w.setAttribute("height","0px"),w.setAttribute("depth","0px"),w}}),Lt({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=Le.makeSpan(["inner"],[ur(o.body,c.withPhantom())]),p=Le.makeSpan(["fix"],[]);return Le.makeSpan(["mord","rlap"],[h,p],c)},mathmlBuilder:function(o,c){var h=cn(Jr(o.body),c),p=new mt.MathNode("mphantom",h),w=new mt.MathNode("mpadded",[p]);return w.setAttribute("width","0px"),w}}),Lt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler:function(o,c){var h=o.parser,p=jt(c[0],"size").value,w=c[1];return{type:"raisebox",mode:h.mode,dy:p,body:w}},htmlBuilder:function(o,c){var h=ur(o.body,c),p=cr(o.dy,c);return Le.makeVList({positionType:"shift",positionData:-p,children:[{type:"elem",elem:h}]},c)},mathmlBuilder:function(o,c){var h=new mt.MathNode("mpadded",[yr(o.body,c)]),p=o.dy.number+o.dy.unit;return h.setAttribute("voffset",p),h}}),Lt({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler:function(o,c,h){var p=o.parser,w=h[0],S=jt(c[0],"size"),j=jt(c[1],"size");return{type:"rule",mode:p.mode,shift:w&&jt(w,"size").value,width:S.value,height:j.value}},htmlBuilder:function(o,c){var h=Le.makeSpan(["mord","rule"],[],c),p=cr(o.width,c),w=cr(o.height,c),S=o.shift?cr(o.shift,c):0;return h.style.borderRightWidth=p+"em",h.style.borderTopWidth=w+"em",h.style.bottom=S+"em",h.width=p,h.height=w+S,h.depth=-S,h.maxFontSize=w*1.125*c.sizeMultiplier,h},mathmlBuilder:function(o,c){var h=cr(o.width,c),p=cr(o.height,c),w=o.shift?cr(o.shift,c):0,S=c.color&&c.getColor()||"black",j=new mt.MathNode("mspace");j.setAttribute("mathbackground",S),j.setAttribute("width",h+"em"),j.setAttribute("height",p+"em");var ee=new mt.MathNode("mpadded",[j]);return w>=0?ee.setAttribute("height","+"+w+"em"):(ee.setAttribute("height",w+"em"),ee.setAttribute("depth","+"+-w+"em")),ee.setAttribute("voffset",w+"em"),ee}});function Ks(D,o,c){for(var h=qr(D,o,!1),p=o.sizeMultiplier/c.sizeMultiplier,w=0;w<h.length;w++){var S=h[w].classes.indexOf("sizing");S<0?Array.prototype.push.apply(h[w].classes,o.sizingClasses(c)):h[w].classes[S+1]==="reset-size"+o.size&&(h[w].classes[S+1]="reset-size"+c.size),h[w].height*=p,h[w].depth*=p}return Le.makeFragment(h)}var ss=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],ja=function(o,c){var h=c.havingSize(o.size);return Ks(o.body,h,c)};Lt({type:"sizing",names:ss,props:{numArgs:0,allowedInText:!0},handler:function(o,c){var h=o.breakOnTokenText,p=o.funcName,w=o.parser,S=w.parseExpression(!1,h);return{type:"sizing",mode:w.mode,size:ss.indexOf(p)+1,body:S}},htmlBuilder:ja,mathmlBuilder:function(o,c){var h=c.havingSize(o.size),p=cn(o.body,h),w=new mt.MathNode("mstyle",p);return w.setAttribute("mathsize",h.sizeMultiplier+"em"),w}}),Lt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(o,c,h){var p=o.parser,w=!1,S=!1,j=h[0]&&jt(h[0],"ordgroup");if(j)for(var ee="",he=0;he<j.body.length;++he){var Re=j.body[he];if(ee=Re.text,ee==="t")w=!0;else if(ee==="b")S=!0;else{w=!1,S=!1;break}}else w=!0,S=!0;var Ue=c[0];return{type:"smash",mode:p.mode,body:Ue,smashHeight:w,smashDepth:S}},htmlBuilder:function(o,c){var h=Le.makeSpan([],[ur(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 w=0;w<h.children.length;w++)h.children[w].depth=0;var S=Le.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:h}]},c);return Le.makeSpan(["mord"],[S],c)},mathmlBuilder:function(o,c){var h=new mt.MathNode("mpadded",[yr(o.body,c)]);return o.smashHeight&&h.setAttribute("height","0px"),o.smashDepth&&h.setAttribute("depth","0px"),h}}),Lt({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler:function(o,c,h){var p=o.parser,w=h[0],S=c[0];return{type:"sqrt",mode:p.mode,body:S,index:w}},htmlBuilder:function(o,c){var h=ur(o.body,c.havingCrampedStyle());h.height===0&&(h.height=c.fontMetrics().xHeight),h=Le.wrapFragment(h,c);var p=c.fontMetrics(),w=p.defaultRuleThickness,S=w;c.style.id<E.TEXT.id&&(S=c.fontMetrics().xHeight);var j=w+S/4,ee=h.height+h.depth+j+w,he=qn.sqrtImage(ee,c),Re=he.span,Ue=he.ruleWidth,Ye=he.advanceWidth,at=Re.height-Ue;at>h.height+h.depth+j&&(j=(j+at-h.height-h.depth)/2);var dt=Re.height-h.height-j-Ue;h.style.paddingLeft=Ye+"em";var St=Le.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:h,wrapperClasses:["svg-align"]},{type:"kern",size:-(h.height+dt)},{type:"elem",elem:Re},{type:"kern",size:Ue}]},c);if(o.index){var Ut=c.havingStyle(E.SCRIPTSCRIPT),Zt=ur(o.index,Ut,c),Jt=.6*(St.height-St.depth),Xt=Le.makeVList({positionType:"shift",positionData:-Jt,children:[{type:"elem",elem:Zt}]},c),Rr=Le.makeSpan(["root"],[Xt]);return Le.makeSpan(["mord","sqrt"],[Rr,St],c)}else return Le.makeSpan(["mord","sqrt"],[St],c)},mathmlBuilder:function(o,c){var h=o.body,p=o.index;return p?new mt.MathNode("mroot",[yr(h,c),yr(p,c)]):new mt.MathNode("msqrt",[yr(h,c)])}});var ma={display:E.DISPLAY,text:E.TEXT,script:E.SCRIPT,scriptscript:E.SCRIPTSCRIPT};Lt({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0},handler:function(o,c){var h=o.breakOnTokenText,p=o.funcName,w=o.parser,S=w.parseExpression(!0,h),j=p.slice(1,p.length-5);return{type:"styling",mode:w.mode,style:j,body:S}},htmlBuilder:function(o,c){var h=ma[o.style],p=c.havingStyle(h).withFont("");return Ks(o.body,p,c)},mathmlBuilder:function(o,c){var h=ma[o.style],p=c.havingStyle(h),w=cn(o.body,p),S=new mt.MathNode("mstyle",w),j={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},ee=j[o.style];return S.setAttribute("scriptlevel",ee[0]),S.setAttribute("displaystyle",ee[1]),S}});var Va=function(o,c){var h=o.base;if(h)if(h.type==="op"){var p=h.limits&&(c.style.size===E.DISPLAY.size||h.alwaysHandleSupSub);return p?mi:null}else if(h.type==="operatorname"){var w=h.alwaysHandleSupSub&&(c.style.size===E.DISPLAY.size||h.limits);return w?Gs:null}else{if(h.type==="accent")return I.isCharacterBox(h.base)?fr:null;if(h.type==="horizBrace"){var S=!o.sub;return S===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,w=o.sup,S=o.sub,j=ur(p,c),ee,he,Re=c.fontMetrics(),Ue=0,Ye=0,at=p&&I.isCharacterBox(p);if(w){var dt=c.havingStyle(c.style.sup());ee=ur(w,dt,c),at||(Ue=j.height-dt.fontMetrics().supDrop*dt.sizeMultiplier/c.sizeMultiplier)}if(S){var St=c.havingStyle(c.style.sub());he=ur(S,St,c),at||(Ye=j.depth+St.fontMetrics().subDrop*St.sizeMultiplier/c.sizeMultiplier)}var Ut;c.style===E.DISPLAY?Ut=Re.sup1:c.style.cramped?Ut=Re.sup3:Ut=Re.sup2;var Zt=c.sizeMultiplier,Jt=.5/Re.ptPerEm/Zt+"em",Xt=null;if(he){var Rr=o.base&&o.base.type==="op"&&o.base.name&&(o.base.name==="\\oiint"||o.base.name==="\\oiiint");(j instanceof oe||Rr)&&(Xt=-j.italic+"em")}var Lr;if(ee&&he){Ue=Math.max(Ue,Ut,ee.depth+.25*Re.xHeight),Ye=Math.max(Ye,Re.sub2);var $r=Re.defaultRuleThickness,Wr=4*$r;if(Ue-ee.depth-(he.height-Ye)<Wr){Ye=Wr-(Ue-ee.depth)+he.height;var Xr=.8*Re.xHeight-(Ue-ee.depth);Xr>0&&(Ue+=Xr,Ye-=Xr)}var yn=[{type:"elem",elem:he,shift:Ye,marginRight:Jt,marginLeft:Xt},{type:"elem",elem:ee,shift:-Ue,marginRight:Jt}];Lr=Le.makeVList({positionType:"individualShift",children:yn},c)}else if(he){Ye=Math.max(Ye,Re.sub1,he.height-.8*Re.xHeight);var hn=[{type:"elem",elem:he,marginLeft:Xt,marginRight:Jt}];Lr=Le.makeVList({positionType:"shift",positionData:Ye,children:hn},c)}else if(ee)Ue=Math.max(Ue,Ut,ee.depth+.25*Re.xHeight),Lr=Le.makeVList({positionType:"shift",positionData:-Ue,children:[{type:"elem",elem:ee,marginRight:Jt}]},c);else throw new Error("supsub must have either sup or sub.");var Dr=gn(j,"right")||"mord";return Le.makeSpan([Dr],[j,Le.makeSpan(["msupsub"],[Lr])],c)},mathmlBuilder:function(o,c){var h=!1,p,w,S=Pr(o.base,"horizBrace");S&&(w=!!o.sup,w===S.isOver&&(h=!0,p=S.isOver)),o.base&&(o.base.type==="op"||o.base.type==="operatorname")&&(o.base.parentIsSupSub=!0);var j=[yr(o.base,c)];o.sub&&j.push(yr(o.sub,c)),o.sup&&j.push(yr(o.sup,c));var ee;if(h)ee=p?"mover":"munder";else if(o.sub)if(o.sup){var Ue=o.base;Ue&&Ue.type==="op"&&Ue.limits&&c.style===E.DISPLAY||Ue&&Ue.type==="operatorname"&&Ue.alwaysHandleSupSub&&(c.style===E.DISPLAY||Ue.limits)?ee="munderover":ee="msubsup"}else{var Re=o.base;Re&&Re.type==="op"&&Re.limits&&(c.style===E.DISPLAY||Re.alwaysHandleSupSub)||Re&&Re.type==="operatorname"&&Re.alwaysHandleSupSub&&(Re.limits||c.style===E.DISPLAY)?ee="munder":ee="msub"}else{var he=o.base;he&&he.type==="op"&&he.limits&&(c.style===E.DISPLAY||he.alwaysHandleSupSub)||he&&he.type==="operatorname"&&he.alwaysHandleSupSub&&(he.limits||c.style===E.DISPLAY)?ee="mover":ee="msup"}var Ye=new mt.MathNode(ee,j);return Ye}}),Dn({type:"atom",htmlBuilder:function(o,c){return Le.mathsym(o.text,o.mode,c,["m"+o.family])},mathmlBuilder:function(o,c){var h=new mt.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 Le.makeOrd(o,c,"mathord")},mathmlBuilder:function(o,c){var h=new mt.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 Le.makeOrd(o,c,"textord")},mathmlBuilder:function(o,c){var h=vn(o.text,o.mode,c),p=hi(o,c)||"normal",w;return o.mode==="text"?w=new mt.MathNode("mtext",[h]):/[0-9]/.test(o.text)?w=new mt.MathNode("mn",[h]):o.text==="\\prime"?w=new mt.MathNode("mo",[h]):w=new mt.MathNode("mi",[h]),p!==ga[w.type]&&w.setAttribute("mathvariant",p),w}});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=Le.makeOrd(o,c,"textord");return p.classes.push(h),p}else return Le.makeSpan(["mspace",h],[Le.mathsym(o.text,o.mode,c)],c)}else{if(vs.hasOwnProperty(o.text))return Le.makeSpan(["mspace",vs[o.text]],[],c);throw new de('Unknown type of space "'+o.text+'"')}},mathmlBuilder:function(o,c){var h;if(ys.hasOwnProperty(o.text))h=new mt.MathNode("mtext",[new mt.TextNode("\xA0")]);else{if(vs.hasOwnProperty(o.text))return new mt.MathNode("mspace");throw new de('Unknown type of space "'+o.text+'"')}return h}});var bs=function(){var o=new mt.MathNode("mtd",[]);return o.setAttribute("width","50%"),o};Dn({type:"tag",mathmlBuilder:function(o,c){var h=new mt.MathNode("mtable",[new mt.MathNode("mtr",[bs(),new mt.MathNode("mtd",[en(o.body,c)]),bs(),new mt.MathNode("mtd",[en(o.tag,c)])])]);return h.setAttribute("width","100%"),h}});var Hs={"\\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?Hs[h]?c.withTextFontFamily(Hs[h]):_a[h]?c.withTextFontWeight(_a[h]):c.withTextFontShape(va[h]):c};Lt({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,w=c[0];return{type:"text",mode:h.mode,body:Jr(w),font:p}},htmlBuilder:function(o,c){var h=ya(o,c),p=qr(o.body,h,!0);return Le.makeSpan(["mord","text"],Le.tryCombineChars(p),h)},mathmlBuilder:function(o,c){var h=ya(o,c);return en(o.body,h)}}),Lt({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=ur(o.body,c),p=Le.makeLineSpan("underline-line",c),w=c.fontMetrics().defaultRuleThickness,S=Le.makeVList({positionType:"top",positionData:h.height,children:[{type:"kern",size:w},{type:"elem",elem:p},{type:"kern",size:3*w},{type:"elem",elem:h}]},c);return Le.makeSpan(["mord","underline"],[S],c)},mathmlBuilder:function(o,c){var h=new mt.MathNode("mo",[new mt.TextNode("\u203E")]);h.setAttribute("stretchy","true");var p=new mt.MathNode("munder",[yr(o.body,c),h]);return p.setAttribute("accentunder","true"),p}}),Lt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(o,c,h){throw new de("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(o,c){for(var h=ba(o),p=[],w=c.havingStyle(c.style.text()),S=0;S<h.length;S++){var j=h[S];j==="~"&&(j="\\textasciitilde"),p.push(Le.makeSymbol(j,"Typewriter-Regular",o.mode,w,["mord","texttt"]))}return Le.makeSpan(["mord","text"].concat(w.sizingClasses(c)),Le.tryCombineChars(p),w)},mathmlBuilder:function(o,c){var h=new mt.TextNode(ba(o)),p=new mt.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,Ws=`[ \r
]`,js="\\\\[a-zA-Z@]+",qa="\\\\[^\uD800-\uDFFF]",xa=""+js+Ws+"*",Za=new RegExp("^("+js+")"+Ws+"*$"),Vs="[\u0300-\u036F]",ln=new RegExp(Vs+"+$"),Di="("+Ws+"+)|([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(Vs+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Vs+"*")+"|\\\\verb\\*([^]).*?\\3|\\\\verb([^*a-zA-Z]).*?\\4|\\\\operatorname\\*"+("|"+xa)+("|"+qa+")"),xs=function(){function D(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=D.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 De("EOF",new Me(this,p,p));var w=this.tokenRegex.exec(h);if(w===null||w.index!==p)throw new de("Unexpected character: '"+h[p]+"'",new De(h[p],new Me(this,p,p+1)));var S=w[2]||" ";if(this.catcodes[S]===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 ee=S.match(Za);return ee&&(S=ee[1]),new De(S,new Me(this,p,this.tokenRegex.lastIndex))},D}(),Xa=function(){function D(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=D.prototype;return o.beginGroup=function(){this.undefStack.push({})},o.endGroup=function(){if(this.undefStack.length===0)throw new de("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,w){if(w===void 0&&(w=!1),w){for(var S=0;S<this.undefStack.length;S++)delete this.undefStack[S][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},D}(),wa={},ws=wa;function ie(D,o){wa[D]=o}ie("\\@firstoftwo",function(D){var o=D.consumeArgs(2);return{tokens:o[0],numArgs:0}}),ie("\\@secondoftwo",function(D){var o=D.consumeArgs(2);return{tokens:o[1],numArgs:0}}),ie("\\@ifnextchar",function(D){var o=D.consumeArgs(3),c=D.future();return o[0].length===1&&o[0][0].text===c.text?{tokens:o[1],numArgs:0}:{tokens:o[2],numArgs:0}}),ie("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),ie("\\TextOrMath",function(D){var o=D.consumeArgs(2);return D.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};ie("\\char",function(D){var o=D.popToken(),c,h="";if(o.text==="'")c=8,o=D.popToken();else if(o.text==='"')c=16,o=D.popToken();else if(o.text==="`")if(o=D.popToken(),o.text[0]==="\\")h=o.text.charCodeAt(1);else{if(o.text==="EOF")throw new de("\\char` missing argument");h=o.text.charCodeAt(0)}else c=10;if(c){if(h=Ni[o.text],h==null||h>=c)throw new de("Invalid base-"+c+" digit "+o.text);for(var p;(p=Ni[D.future().text])!=null&&p<c;)h*=c,h+=p,D.popToken()}return"\\@char{"+h+"}"});var Ys=function(o,c){var h=o.consumeArgs(1)[0];if(h.length!==1)throw new de("\\gdef's first argument must be a macro name");var p=h[0].text,w=0;for(h=o.consumeArgs(1)[0];h.length===1&&h[0].text==="#";){if(h=o.consumeArgs(1)[0],h.length!==1)throw new de('Invalid argument number length "'+h.length+'"');if(!/^[1-9]$/.test(h[0].text))throw new de('Invalid argument number "'+h[0].text+'"');if(w++,parseInt(h[0].text)!==w)throw new de('Argument number "'+h[0].text+'" out of order');h=o.consumeArgs(1)[0]}return o.macros.set(p,{tokens:h,numArgs:w},c),""};ie("\\gdef",function(D){return Ys(D,!0)}),ie("\\def",function(D){return Ys(D,!1)}),ie("\\global",function(D){var o=D.consumeArgs(1)[0];if(o.length!==1)throw new de("Invalid command after \\global");var c=o[0].text;if(c==="\\def")return Ys(D,!0);throw new de("Invalid command '"+c+"' after \\global")});var Es=function(o,c,h){var p=o.consumeArgs(1)[0];if(p.length!==1)throw new de("\\newcommand's first argument must be a macro name");var w=p[0].text,S=o.isDefined(w);if(S&&!c)throw new de("\\newcommand{"+w+"} attempting to redefine "+(w+"; use \\renewcommand"));if(!S&&!h)throw new de("\\renewcommand{"+w+"} when command "+w+" does not yet exist; use \\newcommand");var j=0;if(p=o.consumeArgs(1)[0],p.length===1&&p[0].text==="["){for(var ee="",he=o.expandNextToken();he.text!=="]"&&he.text!=="EOF";)ee+=he.text,he=o.expandNextToken();if(!ee.match(/^\s*[0-9]+\s*$/))throw new de("Invalid number of arguments: "+ee);j=parseInt(ee),p=o.consumeArgs(1)[0]}return o.macros.set(w,{tokens:p,numArgs:j}),""};ie("\\newcommand",function(D){return Es(D,!1,!0)}),ie("\\renewcommand",function(D){return Es(D,!0,!1)}),ie("\\providecommand",function(D){return Es(D,!0,!0)}),ie("\\bgroup","{"),ie("\\egroup","}"),ie("\\lq","`"),ie("\\rq","'"),ie("\\aa","\\r a"),ie("\\AA","\\r A"),ie("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}"),ie("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),ie("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}"),ie("\u212C","\\mathscr{B}"),ie("\u2130","\\mathscr{E}"),ie("\u2131","\\mathscr{F}"),ie("\u210B","\\mathscr{H}"),ie("\u2110","\\mathscr{I}"),ie("\u2112","\\mathscr{L}"),ie("\u2133","\\mathscr{M}"),ie("\u211B","\\mathscr{R}"),ie("\u212D","\\mathfrak{C}"),ie("\u210C","\\mathfrak{H}"),ie("\u2128","\\mathfrak{Z}"),ie("\\Bbbk","\\Bbb{k}"),ie("\xB7","\\cdotp"),ie("\\llap","\\mathllap{\\textrm{#1}}"),ie("\\rlap","\\mathrlap{\\textrm{#1}}"),ie("\\clap","\\mathclap{\\textrm{#1}}"),ie("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),ie("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),ie("\\ne","\\neq"),ie("\u2260","\\neq"),ie("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),ie("\u2209","\\notin"),ie("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),ie("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),ie("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}"),ie("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}"),ie("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}"),ie("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}"),ie("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"),ie("\u27C2","\\perp"),ie("\u203C","\\mathclose{!\\mkern-0.8mu!}"),ie("\u220C","\\notni"),ie("\u231C","\\ulcorner"),ie("\u231D","\\urcorner"),ie("\u231E","\\llcorner"),ie("\u231F","\\lrcorner"),ie("\xA9","\\copyright"),ie("\xAE","\\textregistered"),ie("\uFE0F","\\textregistered"),ie("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),ie("\u22EE","\\vdots"),ie("\\varGamma","\\mathit{\\Gamma}"),ie("\\varDelta","\\mathit{\\Delta}"),ie("\\varTheta","\\mathit{\\Theta}"),ie("\\varLambda","\\mathit{\\Lambda}"),ie("\\varXi","\\mathit{\\Xi}"),ie("\\varPi","\\mathit{\\Pi}"),ie("\\varSigma","\\mathit{\\Sigma}"),ie("\\varUpsilon","\\mathit{\\Upsilon}"),ie("\\varPhi","\\mathit{\\Phi}"),ie("\\varPsi","\\mathit{\\Psi}"),ie("\\varOmega","\\mathit{\\Omega}"),ie("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),ie("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu"),ie("\\boxed","\\fbox{$\\displaystyle{#1}$}"),ie("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),ie("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),ie("\\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"};ie("\\dots",function(D){var o="\\dotso",c=D.expandAfterFuture().text;return c in gi?o=gi[c]:(c.substr(0,4)==="\\not"||c in wt.math&&I.contains(["bin","rel"],wt.math[c].group))&&(o="\\dotsb"),o});var He={")":!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};ie("\\dotso",function(D){var o=D.future().text;return o in He?"\\ldots\\,":"\\ldots"}),ie("\\dotsc",function(D){var o=D.future().text;return o in He&&o!==","?"\\ldots\\,":"\\ldots"}),ie("\\cdots",function(D){var o=D.future().text;return o in He?"\\@cdots\\,":"\\@cdots"}),ie("\\dotsb","\\cdots"),ie("\\dotsm","\\cdots"),ie("\\dotsi","\\!\\cdots"),ie("\\dotsx","\\ldots\\,"),ie("\\DOTSI","\\relax"),ie("\\DOTSB","\\relax"),ie("\\DOTSX","\\relax"),ie("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),ie("\\,","\\tmspace+{3mu}{.1667em}"),ie("\\thinspace","\\,"),ie("\\>","\\mskip{4mu}"),ie("\\:","\\tmspace+{4mu}{.2222em}"),ie("\\medspace","\\:"),ie("\\;","\\tmspace+{5mu}{.2777em}"),ie("\\thickspace","\\;"),ie("\\!","\\tmspace-{3mu}{.1667em}"),ie("\\negthinspace","\\!"),ie("\\negmedspace","\\tmspace-{4mu}{.2222em}"),ie("\\negthickspace","\\tmspace-{5mu}{.277em}"),ie("\\enspace","\\kern.5em "),ie("\\enskip","\\hskip.5em\\relax"),ie("\\quad","\\hskip1em\\relax"),ie("\\qquad","\\hskip2em\\relax"),ie("\\tag","\\@ifstar\\tag@literal\\tag@paren"),ie("\\tag@paren","\\tag@literal{({#1})}"),ie("\\tag@literal",function(D){if(D.macros.get("\\df@tag"))throw new de("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),ie("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),ie("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),ie("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),ie("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),ie("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),ie("\\\\","\\newline"),ie("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var qs=Je["Main-Regular"][84][1]-.7*Je["Main-Regular"][65][1]+"em";ie("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+qs+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),ie("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+qs+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),ie("\\hspace","\\@ifstar\\@hspacer\\@hspace"),ie("\\@hspace","\\hskip #1\\relax"),ie("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),ie("\\ordinarycolon",":"),ie("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),ie("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),ie("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),ie("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),ie("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),ie("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),ie("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),ie("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),ie("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),ie("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),ie("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),ie("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),ie("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),ie("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),ie("\u2237","\\dblcolon"),ie("\u2239","\\eqcolon"),ie("\u2254","\\coloneqq"),ie("\u2255","\\eqqcolon"),ie("\u2A74","\\Coloneqq"),ie("\\ratio","\\vcentcolon"),ie("\\coloncolon","\\dblcolon"),ie("\\colonequals","\\coloneqq"),ie("\\coloncolonequals","\\Coloneqq"),ie("\\equalscolon","\\eqqcolon"),ie("\\equalscoloncolon","\\Eqqcolon"),ie("\\colonminus","\\coloneq"),ie("\\coloncolonminus","\\Coloneq"),ie("\\minuscolon","\\eqcolon"),ie("\\minuscoloncolon","\\Eqcolon"),ie("\\coloncolonapprox","\\Colonapprox"),ie("\\coloncolonsim","\\Colonsim"),ie("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),ie("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),ie("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),ie("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),ie("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}"),ie("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),ie("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),ie("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),ie("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),ie("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),ie("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),ie("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),ie("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),ie("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),ie("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),ie("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),ie("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),ie("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}"),ie("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}"),ie("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}"),ie("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}"),ie("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}"),ie("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}"),ie("\u27E6","\\llbracket"),ie("\u27E7","\\rrbracket"),ie("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),ie("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),ie("\u2983","\\lBrace"),ie("\u2984","\\rBrace"),ie("\\darr","\\downarrow"),ie("\\dArr","\\Downarrow"),ie("\\Darr","\\Downarrow"),ie("\\lang","\\langle"),ie("\\rang","\\rangle"),ie("\\uarr","\\uparrow"),ie("\\uArr","\\Uparrow"),ie("\\Uarr","\\Uparrow"),ie("\\N","\\mathbb{N}"),ie("\\R","\\mathbb{R}"),ie("\\Z","\\mathbb{Z}"),ie("\\alef","\\aleph"),ie("\\alefsym","\\aleph"),ie("\\Alpha","\\mathrm{A}"),ie("\\Beta","\\mathrm{B}"),ie("\\bull","\\bullet"),ie("\\Chi","\\mathrm{X}"),ie("\\clubs","\\clubsuit"),ie("\\cnums","\\mathbb{C}"),ie("\\Complex","\\mathbb{C}"),ie("\\Dagger","\\ddagger"),ie("\\diamonds","\\diamondsuit"),ie("\\empty","\\emptyset"),ie("\\Epsilon","\\mathrm{E}"),ie("\\Eta","\\mathrm{H}"),ie("\\exist","\\exists"),ie("\\harr","\\leftrightarrow"),ie("\\hArr","\\Leftrightarrow"),ie("\\Harr","\\Leftrightarrow"),ie("\\hearts","\\heartsuit"),ie("\\image","\\Im"),ie("\\infin","\\infty"),ie("\\Iota","\\mathrm{I}"),ie("\\isin","\\in"),ie("\\Kappa","\\mathrm{K}"),ie("\\larr","\\leftarrow"),ie("\\lArr","\\Leftarrow"),ie("\\Larr","\\Leftarrow"),ie("\\lrarr","\\leftrightarrow"),ie("\\lrArr","\\Leftrightarrow"),ie("\\Lrarr","\\Leftrightarrow"),ie("\\Mu","\\mathrm{M}"),ie("\\natnums","\\mathbb{N}"),ie("\\Nu","\\mathrm{N}"),ie("\\Omicron","\\mathrm{O}"),ie("\\plusmn","\\pm"),ie("\\rarr","\\rightarrow"),ie("\\rArr","\\Rightarrow"),ie("\\Rarr","\\Rightarrow"),ie("\\real","\\Re"),ie("\\reals","\\mathbb{R}"),ie("\\Reals","\\mathbb{R}"),ie("\\Rho","\\mathrm{P}"),ie("\\sdot","\\cdot"),ie("\\sect","\\S"),ie("\\spades","\\spadesuit"),ie("\\sub","\\subset"),ie("\\sube","\\subseteq"),ie("\\supe","\\supseteq"),ie("\\Tau","\\mathrm{T}"),ie("\\thetasym","\\vartheta"),ie("\\weierp","\\wp"),ie("\\Zeta","\\mathrm{Z}"),ie("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),ie("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),ie("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),ie("\\blue","\\textcolor{##6495ed}{#1}"),ie("\\orange","\\textcolor{##ffa500}{#1}"),ie("\\pink","\\textcolor{##ff00af}{#1}"),ie("\\red","\\textcolor{##df0030}{#1}"),ie("\\green","\\textcolor{##28ae7b}{#1}"),ie("\\gray","\\textcolor{gray}{#1}"),ie("\\purple","\\textcolor{##9d38bd}{#1}"),ie("\\blueA","\\textcolor{##ccfaff}{#1}"),ie("\\blueB","\\textcolor{##80f6ff}{#1}"),ie("\\blueC","\\textcolor{##63d9ea}{#1}"),ie("\\blueD","\\textcolor{##11accd}{#1}"),ie("\\blueE","\\textcolor{##0c7f99}{#1}"),ie("\\tealA","\\textcolor{##94fff5}{#1}"),ie("\\tealB","\\textcolor{##26edd5}{#1}"),ie("\\tealC","\\textcolor{##01d1c1}{#1}"),ie("\\tealD","\\textcolor{##01a995}{#1}"),ie("\\tealE","\\textcolor{##208170}{#1}"),ie("\\greenA","\\textcolor{##b6ffb0}{#1}"),ie("\\greenB","\\textcolor{##8af281}{#1}"),ie("\\greenC","\\textcolor{##74cf70}{#1}"),ie("\\greenD","\\textcolor{##1fab54}{#1}"),ie("\\greenE","\\textcolor{##0d923f}{#1}"),ie("\\goldA","\\textcolor{##ffd0a9}{#1}"),ie("\\goldB","\\textcolor{##ffbb71}{#1}"),ie("\\goldC","\\textcolor{##ff9c39}{#1}"),ie("\\goldD","\\textcolor{##e07d10}{#1}"),ie("\\goldE","\\textcolor{##a75a05}{#1}"),ie("\\redA","\\textcolor{##fca9a9}{#1}"),ie("\\redB","\\textcolor{##ff8482}{#1}"),ie("\\redC","\\textcolor{##f9685d}{#1}"),ie("\\redD","\\textcolor{##e84d39}{#1}"),ie("\\redE","\\textcolor{##bc2612}{#1}"),ie("\\maroonA","\\textcolor{##ffbde0}{#1}"),ie("\\maroonB","\\textcolor{##ff92c6}{#1}"),ie("\\maroonC","\\textcolor{##ed5fa6}{#1}"),ie("\\maroonD","\\textcolor{##ca337c}{#1}"),ie("\\maroonE","\\textcolor{##9e034e}{#1}"),ie("\\purpleA","\\textcolor{##ddd7ff}{#1}"),ie("\\purpleB","\\textcolor{##c6b9fc}{#1}"),ie("\\purpleC","\\textcolor{##aa87ff}{#1}"),ie("\\purpleD","\\textcolor{##7854ab}{#1}"),ie("\\purpleE","\\textcolor{##543b78}{#1}"),ie("\\mintA","\\textcolor{##f5f9e8}{#1}"),ie("\\mintB","\\textcolor{##edf2df}{#1}"),ie("\\mintC","\\textcolor{##e0e5cc}{#1}"),ie("\\grayA","\\textcolor{##f6f7f7}{#1}"),ie("\\grayB","\\textcolor{##f0f1f2}{#1}"),ie("\\grayC","\\textcolor{##e3e5e6}{#1}"),ie("\\grayD","\\textcolor{##d6d8da}{#1}"),ie("\\grayE","\\textcolor{##babec2}{#1}"),ie("\\grayF","\\textcolor{##888d93}{#1}"),ie("\\grayG","\\textcolor{##626569}{#1}"),ie("\\grayH","\\textcolor{##3b3e40}{#1}"),ie("\\grayI","\\textcolor{##21242c}{#1}"),ie("\\kaBlue","\\textcolor{##314453}{#1}"),ie("\\kaGreen","\\textcolor{##71B307}{#1}");var Ts={"\\relax":!0,"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Qa=function(){function D(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=D.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=[],w=0;w<h;++w){this.consumeSpaces();var S=this.popToken();if(S.text==="{"){for(var j=[],ee=1;ee!==0;){var he=this.popToken();if(j.push(he),he.text==="{")++ee;else if(he.text==="}")--ee;else if(he.text==="EOF")throw new de("End of input in macro argument",S)}j.pop(),j.reverse(),p[w]=j}else{if(S.text==="EOF")throw new de("End of input expecting macro argument");p[w]=[S]}}return p},o.expandOnce=function(){var h=this.popToken(),p=h.text,w=this._getExpansion(p);if(w==null)return this.pushToken(h),h;if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new de("Too many expansions: infinite loop or need to increase maxExpand setting");var S=w.tokens;if(w.numArgs){var j=this.consumeArgs(w.numArgs);S=S.slice();for(var ee=S.length-1;ee>=0;--ee){var he=S[ee];if(he.text==="#"){if(ee===0)throw new de("Incomplete placeholder at end of macro body",he);if(he=S[--ee],he.text==="#")S.splice(ee+1,1);else if(/^[1-9]$/.test(he.text)){var Re;(Re=S).splice.apply(Re,[ee,2].concat(j[+he.text-1]))}else throw new de("Not a valid argument number",he)}}}return this.pushTokens(S),S},o.expandAfterFuture=function(){return this.expandOnce(),this.future()},o.expandNextToken=function(){for(;;){var h=this.expandOnce();if(h instanceof De)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=[],w=this.stack.length;for(this.pushToken(new De(h));this.stack.length>w;){var S=this.expandOnce();S instanceof De&&p.push(this.stack.pop())}return p}},o.expandMacroAsText=function(h){var p=this.expandMacro(h);return p&&p.map(function(w){return w.text}).join("")},o._getExpansion=function(h){var p=this.macros.get(h);if(p==null)return p;var w=typeof p=="function"?p(this):p;if(typeof w=="string"){var S=0;if(w.indexOf("#")!==-1)for(var j=w.replace(/##/g,"");j.indexOf("#"+(S+1))!==-1;)++S;for(var ee=new xs(w,this.settings),he=[],Re=ee.lex();Re.text!=="EOF";)he.push(Re),Re=ee.lex();he.reverse();var Ue={tokens:he,numArgs:S};return Ue}return w},o.isDefined=function(h){return this.macros.has(h)||Yi.hasOwnProperty(h)||wt.math.hasOwnProperty(h)||wt.text.hasOwnProperty(h)||Ts.hasOwnProperty(h)},D}(),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 D(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 Qa(c,h,this.mode),this.settings=h,this.leftrightDepth=0}var o=D.prototype;return o.expect=function(h,p){if(p===void 0&&(p=!0),this.fetch().text!==h)throw new de("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 w=[];;){this.mode==="math"&&this.consumeSpaces();var S=this.fetch();if(D.endOfExpression.indexOf(S.text)!==-1||p&&S.text===p||h&&Yi[S.text]&&Yi[S.text].infix)break;var j=this.parseAtom(p);if(!j)break;w.push(j)}return this.mode==="text"&&this.formLigatures(w),this.handleInfixNodes(w)},o.handleInfixNodes=function(h){for(var p=-1,w,S=0;S<h.length;S++){var j=Pr(h[S],"infix");if(j){if(p!==-1)throw new de("only one infix operator per group",j.token);p=S,w=j.replaceWith}}if(p!==-1&&w){var ee,he,Re=h.slice(0,p),Ue=h.slice(p+1);Re.length===1&&Re[0].type==="ordgroup"?ee=Re[0]:ee={type:"ordgroup",mode:this.mode,body:Re},Ue.length===1&&Ue[0].type==="ordgroup"?he=Ue[0]:he={type:"ordgroup",mode:this.mode,body:Ue};var Ye;return w==="\\\\abovefrac"?Ye=this.callFunction(w,[ee,h[p],he],[]):Ye=this.callFunction(w,[ee,he],[]),[Ye]}else return h},o.handleSupSubscript=function(h){var p=this.fetch(),w=p.text;this.consume();var S=this.parseGroup(h,!1,D.SUPSUB_GREEDINESS,void 0,void 0,!0);if(!S)throw new de("Expected group after '"+w+"'",p);return S},o.formatUnsupportedCmd=function(h){for(var p=[],w=0;w<h.length;w++)p.push({type:"textord",mode:"text",text:h[w]});var S={type:"text",mode:this.mode,body:p},j={type:"color",mode:this.mode,color:this.settings.errorColor,body:[S]};return j},o.parseAtom=function(h){var p=this.parseGroup("atom",!1,null,h);if(this.mode==="text")return p;for(var w,S;;){this.consumeSpaces();var j=this.fetch();if(j.text==="\\limits"||j.text==="\\nolimits"){var ee=Pr(p,"op");if(ee){var he=j.text==="\\limits";ee.limits=he,ee.alwaysHandleSupSub=!0}else if(ee=Pr(p,"operatorname"),ee&&ee.alwaysHandleSupSub){var Re=j.text==="\\limits";ee.limits=Re}else throw new de("Limit controls must follow a math operator",j);this.consume()}else if(j.text==="^"){if(w)throw new de("Double superscript",j);w=this.handleSupSubscript("superscript")}else if(j.text==="_"){if(S)throw new de("Double subscript",j);S=this.handleSupSubscript("subscript")}else if(j.text==="'"){if(w)throw new de("Double superscript",j);var Ue={type:"textord",mode:this.mode,text:"\\prime"},Ye=[Ue];for(this.consume();this.fetch().text==="'";)Ye.push(Ue),this.consume();this.fetch().text==="^"&&Ye.push(this.handleSupSubscript("superscript")),w={type:"ordgroup",mode:this.mode,body:Ye}}else break}return w||S?{type:"supsub",mode:this.mode,base:p,sup:w,sub:S}:p},o.parseFunction=function(h,p,w){var S=this.fetch(),j=S.text,ee=Yi[j];if(!ee)return null;if(this.consume(),w!=null&&ee.greediness<=w)throw new de("Got function '"+j+"' with no arguments"+(p?" as "+p:""),S);if(this.mode==="text"&&!ee.allowedInText)throw new de("Can't use function '"+j+"' in text mode",S);if(this.mode==="math"&&ee.allowedInMath===!1)throw new de("Can't use function '"+j+"' in math mode",S);var he=this.parseArguments(j,ee),Re=he.args,Ue=he.optArgs;return this.callFunction(j,Re,Ue,S,h)},o.callFunction=function(h,p,w,S,j){var ee={funcName:h,parser:this,token:S,breakOnTokenText:j},he=Yi[h];if(he&&he.handler)return he.handler(ee,p,w);throw new de("No function handler for "+h)},o.parseArguments=function(h,p){var w=p.numArgs+p.numOptionalArgs;if(w===0)return{args:[],optArgs:[]};for(var S=p.greediness,j=[],ee=[],he=0;he<w;he++){var Re=p.argTypes&&p.argTypes[he],Ue=he<p.numOptionalArgs,Ye=he>0&&!Ue||he===0&&!Ue&&this.mode==="math",at=this.parseGroupOfType("argument to '"+h+"'",Re,Ue,S,Ye);if(!at){if(Ue){ee.push(null);continue}throw new de("Expected group after '"+h+"'",this.fetch())}(Ue?ee:j).push(at)}return{args:j,optArgs:ee}},o.parseGroupOfType=function(h,p,w,S,j){switch(p){case"color":return j&&this.consumeSpaces(),this.parseColorGroup(w);case"size":return j&&this.consumeSpaces(),this.parseSizeGroup(w);case"url":return this.parseUrlGroup(w,j);case"math":case"text":return this.parseGroup(h,w,S,void 0,p,j);case"hbox":{var ee=this.parseGroup(h,w,S,void 0,"text",j);if(!ee)return ee;var he={type:"styling",mode:ee.mode,body:[ee],style:"text"};return he}case"raw":{if(j&&this.consumeSpaces(),w&&this.fetch().text==="{")return null;var Re=this.parseStringGroup("raw",w,!0);if(Re)return{type:"raw",mode:"text",string:Re.text};throw new de("Expected raw group",this.fetch())}case"original":case null:case void 0:return this.parseGroup(h,w,S,void 0,void 0,j);default:throw new de("Unknown group type as "+h,this.fetch())}},o.consumeSpaces=function(){for(;this.fetch().text===" ";)this.consume()},o.parseStringGroup=function(h,p,w){var S=p?"[":"{",j=p?"]":"}",ee=this.fetch();if(ee.text!==S){if(p)return null;if(w&&ee.text!=="EOF"&&/[^{}[\]]/.test(ee.text))return this.consume(),ee}var he=this.mode;this.mode="text",this.expect(S);for(var Re="",Ue=this.fetch(),Ye=0,at=Ue,dt;(dt=this.fetch()).text!==j||w&&Ye>0;){switch(dt.text){case"EOF":throw new de("Unexpected end of input in "+h,Ue.range(at,Re));case S:Ye++;break;case j:Ye--;break}at=dt,Re+=at.text,this.consume()}return this.expect(j),this.mode=he,Ue.range(at,Re)},o.parseRegexGroup=function(h,p){var w=this.mode;this.mode="text";for(var S=this.fetch(),j=S,ee="",he;(he=this.fetch()).text!=="EOF"&&h.test(ee+he.text);)j=he,ee+=j.text,this.consume();if(ee==="")throw new de("Invalid "+p+": '"+S.text+"'",S);return this.mode=w,S.range(j,ee)},o.parseColorGroup=function(h){var p=this.parseStringGroup("color",h);if(!p)return null;var w=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(p.text);if(!w)throw new de("Invalid color: '"+p.text+"'",p);var S=w[0];return/^[0-9a-f]{6}$/i.test(S)&&(S="#"+S),{type:"color-token",mode:this.mode,color:S}},o.parseSizeGroup=function(h){var p,w=!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",w=!0);var S=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(p.text);if(!S)throw new de("Invalid size: '"+p.text+"'",p);var j={number:+(S[1]+S[2]),unit:S[3]};if(!Or(j))throw new de("Invalid unit: '"+j.unit+"'",p);return{type:"size",mode:this.mode,value:j,isBlank:w}},o.parseUrlGroup=function(h,p){this.gullet.lexer.setCatcode("%",13);var w=this.parseStringGroup("url",h,!0);if(this.gullet.lexer.setCatcode("%",14),!w)return null;var S=w.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:S}},o.parseGroup=function(h,p,w,S,j,ee){var he=this.mode;j&&this.switchMode(j),ee&&this.consumeSpaces();var Re=this.fetch(),Ue=Re.text,Ye;if(p?Ue==="[":Ue==="{"||Ue==="\\begingroup"){this.consume();var at=D.endOfGroup[Ue];this.gullet.beginGroup();var dt=this.parseExpression(!1,at),St=this.fetch();this.expect(at),this.gullet.endGroup(),Ye={type:"ordgroup",mode:this.mode,loc:Me.range(Re,St),body:dt,semisimple:Ue==="\\begingroup"||void 0}}else if(p)Ye=null;else if(Ye=this.parseFunction(S,h,w)||this.parseSymbol(),Ye==null&&Ue[0]==="\\"&&!Ts.hasOwnProperty(Ue)){if(this.settings.throwOnError)throw new de("Undefined control sequence: "+Ue,Re);Ye=this.formatUnsupportedCmd(Ue),this.consume()}return j&&this.switchMode(he),Ye},o.formLigatures=function(h){for(var p=h.length-1,w=0;w<p;++w){var S=h[w],j=S.text;j==="-"&&h[w+1].text==="-"&&(w+1<p&&h[w+2].text==="-"?(h.splice(w,3,{type:"textord",mode:"text",loc:Me.range(S,h[w+2]),text:"---"}),p-=2):(h.splice(w,2,{type:"textord",mode:"text",loc:Me.range(S,h[w+1]),text:"--"}),p-=1)),(j==="'"||j==="`")&&h[w+1].text===j&&(h.splice(w,2,{type:"textord",mode:"text",loc:Me.range(S,h[w+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 w=p.slice(5),S=w.charAt(0)==="*";if(S&&(w=w.slice(1)),w.length<2||w.charAt(0)!==w.slice(-1))throw new de(`\\verb assertion failed --
please report what input caused this bug`);return w=w.slice(1,-1),{type:"verb",mode:"text",body:w,star:S}}Ea.hasOwnProperty(p[0])&&!wt[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 ee;if(wt[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 he=wt[this.mode][p].group,Re=Me.range(h),Ue;if(Et.hasOwnProperty(he)){var Ye=he;Ue={type:"atom",mode:this.mode,family:Ye,loc:Re,text:p}}else Ue={type:he,mode:this.mode,loc:Re,text:p};ee=Ue}else if(p.charCodeAt(0)>=128)this.settings.strict&&($e(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)),ee={type:"textord",mode:"text",loc:Me.range(h),text:p};else return null;if(this.consume(),j)for(var at=0;at<j[0].length;at++){var dt=j[0][at];if(!qi[dt])throw new de("Unknown accent ' "+dt+"'",h);var St=qi[dt][this.mode];if(!St)throw new de("Accent "+dt+" unsupported in "+this.mode+" mode",h);ee={type:"accent",mode:this.mode,loc:Me.range(h),label:St,isStretchy:!1,isShifty:!0,base:ee}}return ee},D}();As.endOfExpression=["}","\\endgroup","\\end","\\right","&"],As.endOfGroup={"[":"]","{":"}","\\begingroup":"\\endgroup"},As.SUPSUB_GREEDINESS=1;var Ta=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 de("\\tag works only in display equations");h.gullet.feed("\\df@tag"),p=[{type:"tag",mode:"text",body:p,tag:h.parse()}]}return p},Zs=Ta,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 de("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 L(c);return Zs(o,h)},as=function(o,c,h){if(h.throwOnError||!(o instanceof de))throw o;var p=Le.makeSpan(["katex-error"],[new oe(c)]);return p.setAttribute("title",o.toString()),p.setAttribute("style","color:"+h.errorColor),p},Cn=function(o,c){var h=new L(c);try{var p=Zs(o,h);return $n(p,o,h)}catch(w){return as(w,o,h)}},Ja=function(o,c){var h=new L(c);try{var p=Zs(o,h);return Pi(p,o,h)}catch(w){return as(w,o,h)}},Sa={version:"0.11.1",render:Aa,renderToString:Zi,ParseError:de,__parse:Xs,__renderToDomTree:Cn,__renderToHTMLTree:Ja,__setFontMetrics:_t,__defineSymbol:_,__defineMacro:ie,__domTree:{Span:Ie,Anchor:rt,SymbolNode:oe,SvgNode:Ae,PathNode:ye,LineNode:Pe}},eo=J.default=Sa}]).default})},32834:function(Ot){(function(Xe,J){Ot.exports=J()})(this,function(){"use strict";function Xe(ue,Ee){for(var Oe=0;Oe<Ee.length;Oe++){var N=Ee[Oe];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(ue,N.key,N)}}function J(ue,Ee,Oe){return Ee&&Xe(ue.prototype,Ee),Oe&&Xe(ue,Oe),ue}function te(ue,Ee){if(ue){if(typeof ue=="string")return we(ue,Ee);var Oe=Object.prototype.toString.call(ue).slice(8,-1);if(Oe==="Object"&&ue.constructor&&(Oe=ue.constructor.name),Oe==="Map"||Oe==="Set")return Array.from(ue);if(Oe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Oe))return we(ue,Ee)}}function we(ue,Ee){(Ee==null||Ee>ue.length)&&(Ee=ue.length);for(var Oe=0,N=new Array(Ee);Oe<Ee;Oe++)N[Oe]=ue[Oe];return N}function Me(ue,Ee){var Oe=typeof Symbol!="undefined"&&ue[Symbol.iterator]||ue["@@iterator"];if(Oe)return(Oe=Oe.call(ue)).next.bind(Oe);if(Array.isArray(ue)||(Oe=te(ue))||Ee&&ue&&typeof ue.length=="number"){Oe&&(ue=Oe);var N=0;return function(){return N>=ue.length?{done:!0}:{done:!1,value:ue[N++]}}}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 De={exports:{}};function Fe(){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 de(ue){De.exports.defaults=ue}De.exports={defaults:Fe(),getDefaults:Fe,changeDefaults:de};var Se=/[&<>"']/,xe=/[&<>"']/g,l=/[<>"']|&(?!#?\w+;)/,H=/[<>"']|&(?!#?\w+;)/g,P={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},x=function(Ee){return P[Ee]};function d(ue,Ee){if(Ee){if(Se.test(ue))return ue.replace(xe,x)}else if(l.test(ue))return ue.replace(H,x);return ue}var y=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function v(ue){return ue.replace(y,function(Ee,Oe){return Oe=Oe.toLowerCase(),Oe==="colon"?":":Oe.charAt(0)==="#"?Oe.charAt(1)==="x"?String.fromCharCode(parseInt(Oe.substring(2),16)):String.fromCharCode(+Oe.substring(1)):""})}var U=/(^|[^\[])\^/g;function W(ue,Ee){ue=ue.source||ue,Ee=Ee||"";var Oe={replace:function(Y,le){return le=le.source||le,le=le.replace(U,"$1"),ue=ue.replace(Y,le),Oe},getRegex:function(){return new RegExp(ue,Ee)}};return Oe}var I=/[^\w:]/g,L=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function V(ue,Ee,Oe){if(ue){var N;try{N=decodeURIComponent(v(Oe)).replace(I,"").toLowerCase()}catch(Y){return null}if(N.indexOf("javascript:")===0||N.indexOf("vbscript:")===0||N.indexOf("data:")===0)return null}Ee&&!L.test(Oe)&&(Oe=ce(Ee,Oe));try{Oe=encodeURI(Oe).replace(/%25/g,"%")}catch(Y){return null}return Oe}var re={},C=/^[^:]+:\/*[^/]*$/,_e=/^([^:]+:)[\s\S]*$/,pe=/^([^:]+:\/*[^/]*)[\s\S]*$/;function ce(ue,Ee){re[" "+ue]||(C.test(ue)?re[" "+ue]=ue+"/":re[" "+ue]=Ce(ue,"/",!0)),ue=re[" "+ue];var Oe=ue.indexOf(":")===-1;return Ee.substring(0,2)==="//"?Oe?Ee:ue.replace(_e,"$1")+Ee:Ee.charAt(0)==="/"?Oe?Ee:ue.replace(pe,"$1")+Ee:ue+Ee}var ge={exec:function(){}};function ke(ue){for(var Ee=1,Oe,N;Ee<arguments.length;Ee++){Oe=arguments[Ee];for(N in Oe)Object.prototype.hasOwnProperty.call(Oe,N)&&(ue[N]=Oe[N])}return ue}function ve(ue,Ee){var Oe=ue.replace(/\|/g,function(le,be,R){for(var ft=!1,se=be;--se>=0&&R[se]==="\\";)ft=!ft;return ft?"|":" |"}),N=Oe.split(/ \|/),Y=0;if(N.length>Ee)N.splice(Ee);else for(;N.length<Ee;)N.push("");for(;Y<N.length;Y++)N[Y]=N[Y].trim().replace(/\\\|/g,"|");return N}function Ce(ue,Ee,Oe){var N=ue.length;if(N===0)return"";for(var Y=0;Y<N;){var le=ue.charAt(N-Y-1);if(le===Ee&&!Oe)Y++;else if(le!==Ee&&Oe)Y++;else break}return ue.substr(0,N-Y)}function K(ue,Ee){if(ue.indexOf(Ee[1])===-1)return-1;for(var Oe=ue.length,N=0,Y=0;Y<Oe;Y++)if(ue[Y]==="\\")Y++;else if(ue[Y]===Ee[0])N++;else if(ue[Y]===Ee[1]&&(N--,N<0))return Y;return-1}function F(ue){ue&&ue.sanitize&&!ue.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 $(ue,Ee){if(Ee<1)return"";for(var Oe="";Ee>1;)Ee&1&&(Oe+=ue),Ee>>=1,ue+=ue;return Oe+ue}var q={escape:d,unescape:v,edit:W,cleanUrl:V,resolveUrl:ce,noopTest:ge,merge:ke,splitCells:ve,rtrim:Ce,findClosingBracket:K,checkSanitizeDeprecation:F,repeatString:$},ae=De.exports.defaults,Z=q.rtrim,E=q.splitCells,A=q.escape,Q=q.findClosingBracket;function fe(ue,Ee,Oe){var N=Ee.href,Y=Ee.title?A(Ee.title):null,le=ue[1].replace(/\\([\[\]])/g,"$1");return ue[0].charAt(0)!=="!"?{type:"link",raw:Oe,href:N,title:Y,text:le}:{type:"image",raw:Oe,href:N,title:Y,text:A(le)}}function $e(ue,Ee){var Oe=ue.match(/^(\s+)(?:```)/);if(Oe===null)return Ee;var N=Oe[1];return Ee.split(`
`).map(function(Y){var le=Y.match(/^\s+/);if(le===null)return Y;var be=le[0];return be.length>=N.length?Y.slice(N.length):Y}).join(`
`)}var Ze=function(){function ue(Oe){this.options=Oe||ae}var Ee=ue.prototype;return Ee.space=function(N){var Y=this.rules.block.newline.exec(N);if(Y)return Y[0].length>1?{type:"space",raw:Y[0]}:{raw:`
`}},Ee.code=function(N){var Y=this.rules.block.code.exec(N);if(Y){var le=Y[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:Y[0],codeBlockStyle:"indented",text:this.options.pedantic?le:Z(le,`
`)}}},Ee.fences=function(N){var Y=this.rules.block.fences.exec(N);if(Y){var le=Y[0],be=$e(le,Y[3]||"");return{type:"code",raw:le,lang:Y[2]?Y[2].trim():Y[2],text:be}}},Ee.heading=function(N){var Y=this.rules.block.heading.exec(N);if(Y){var le=Y[2].trim();if(/#$/.test(le)){var be=Z(le,"#");(this.options.pedantic||!be||/ $/.test(be))&&(le=be.trim())}return{type:"heading",raw:Y[0],depth:Y[1].length,text:le}}},Ee.nptable=function(N){var Y=this.rules.block.nptable.exec(N);if(Y){var le={type:"table",header:E(Y[1].replace(/^ *| *\| *$/g,"")),align:Y[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Y[3]?Y[3].replace(/\n$/,"").split(`
`):[],raw:Y[0]};if(le.header.length===le.align.length){var be=le.align.length,R;for(R=0;R<be;R++)/^ *-+: *$/.test(le.align[R])?le.align[R]="right":/^ *:-+: *$/.test(le.align[R])?le.align[R]="center":/^ *:-+ *$/.test(le.align[R])?le.align[R]="left":le.align[R]=null;for(be=le.cells.length,R=0;R<be;R++)le.cells[R]=E(le.cells[R],le.header.length);return le}}},Ee.hr=function(N){var Y=this.rules.block.hr.exec(N);if(Y)return{type:"hr",raw:Y[0]}},Ee.blockquote=function(N){var Y=this.rules.block.blockquote.exec(N);if(Y){var le=Y[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:Y[0],text:le}}},Ee.list=function(N){var Y=this.rules.block.list.exec(N);if(Y){var le=Y[0],be=Y[2],R=be.length>1,ft={type:"list",raw:le,ordered:R,start:R?+be.slice(0,-1):"",loose:!1,items:[]},se=Y[0].match(this.rules.block.item),Tt=!1,Ct,Nt,br,Ht,Mt,Tr,Br,Gr,zr,At=se.length;br=this.rules.block.listItemStart.exec(se[0]);for(var Wt=0;Wt<At;Wt++){if(Ct=se[Wt],le=Ct,this.options.pedantic||(zr=Ct.match(new RegExp("\\n\\s*\\n {0,"+(br[0].length-1)+"}\\S")),zr&&(Mt=Ct.length-zr.index+se.slice(Wt+1).join(`
`).length,ft.raw=ft.raw.substring(0,ft.raw.length-Mt),Ct=Ct.substring(0,zr.index),le=Ct,At=Wt+1)),Wt!==At-1){if(Ht=this.rules.block.listItemStart.exec(se[Wt+1]),this.options.pedantic?Ht[1].length>br[1].length:Ht[1].length>=br[0].length||Ht[1].length>3){se.splice(Wt,2,se[Wt]+(!this.options.pedantic&&Ht[1].length<br[0].length&&!se[Wt].match(/\n$/)?"":`
`)+se[Wt+1]),Wt--,At--;continue}else(!this.options.pedantic||this.options.smartLists?Ht[2][Ht[2].length-1]!==be[be.length-1]:R===(Ht[2].length===1))&&(Mt=se.slice(Wt+1).join(`
`).length,ft.raw=ft.raw.substring(0,ft.raw.length-Mt),Wt=At-1);br=Ht}Nt=Ct.length,Ct=Ct.replace(/^ *([*+-]|\d+[.)]) ?/,""),~Ct.indexOf(`
`)&&(Nt-=Ct.length,Ct=this.options.pedantic?Ct.replace(/^ {1,4}/gm,""):Ct.replace(new RegExp("^ {1,"+Nt+"}","gm"),"")),Ct=Z(Ct,`
`),Wt!==At-1&&(le=le+`
`),Tr=Tt||/\n\n(?!\s*$)/.test(le),Wt!==At-1&&(Tt=le.slice(-2)===`
`,Tr||(Tr=Tt)),Tr&&(ft.loose=!0),this.options.gfm&&(Br=/^\[[ xX]\] /.test(Ct),Gr=void 0,Br&&(Gr=Ct[1]!==" ",Ct=Ct.replace(/^\[[ xX]\] +/,""))),ft.items.push({type:"list_item",raw:le,task:Br,checked:Gr,loose:Tr,text:Ct})}return ft}},Ee.html=function(N){var Y=this.rules.block.html.exec(N);if(Y)return{type:this.options.sanitize?"paragraph":"html",raw:Y[0],pre:!this.options.sanitizer&&(Y[1]==="pre"||Y[1]==="script"||Y[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Y[0]):A(Y[0]):Y[0]}},Ee.def=function(N){var Y=this.rules.block.def.exec(N);if(Y){Y[3]&&(Y[3]=Y[3].substring(1,Y[3].length-1));var le=Y[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:le,raw:Y[0],href:Y[2],title:Y[3]}}},Ee.table=function(N){var Y=this.rules.block.table.exec(N);if(Y){var le={type:"table",header:E(Y[1].replace(/^ *| *\| *$/g,"")),align:Y[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:Y[3]?Y[3].replace(/\n$/,"").split(`
`):[]};if(le.header.length===le.align.length){le.raw=Y[0];var be=le.align.length,R;for(R=0;R<be;R++)/^ *-+: *$/.test(le.align[R])?le.align[R]="right":/^ *:-+: *$/.test(le.align[R])?le.align[R]="center":/^ *:-+ *$/.test(le.align[R])?le.align[R]="left":le.align[R]=null;for(be=le.cells.length,R=0;R<be;R++)le.cells[R]=E(le.cells[R].replace(/^ *\| *| *\| *$/g,""),le.header.length);return le}}},Ee.lheading=function(N){var Y=this.rules.block.lheading.exec(N);if(Y)return{type:"heading",raw:Y[0],depth:Y[2].charAt(0)==="="?1:2,text:Y[1]}},Ee.paragraph=function(N){var Y=this.rules.block.paragraph.exec(N);if(Y)return{type:"paragraph",raw:Y[0],text:Y[1].charAt(Y[1].length-1)===`
`?Y[1].slice(0,-1):Y[1]}},Ee.text=function(N){var Y=this.rules.block.text.exec(N);if(Y)return{type:"text",raw:Y[0],text:Y[0]}},Ee.escape=function(N){var Y=this.rules.inline.escape.exec(N);if(Y)return{type:"escape",raw:Y[0],text:A(Y[1])}},Ee.tag=function(N,Y,le){var be=this.rules.inline.tag.exec(N);if(be)return!Y&&/^<a /i.test(be[0])?Y=!0:Y&&/^<\/a>/i.test(be[0])&&(Y=!1),!le&&/^<(pre|code|kbd|script)(\s|>)/i.test(be[0])?le=!0:le&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(be[0])&&(le=!1),{type:this.options.sanitize?"text":"html",raw:be[0],inLink:Y,inRawBlock:le,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(be[0]):A(be[0]):be[0]}},Ee.link=function(N){var Y=this.rules.inline.link.exec(N);if(Y){var le=Y[2].trim();if(!this.options.pedantic&&/^</.test(le)){if(!/>$/.test(le))return;var be=Z(le.slice(0,-1),"\\");if((le.length-be.length)%2===0)return}else{var R=Q(Y[2],"()");if(R>-1){var ft=Y[0].indexOf("!")===0?5:4,se=ft+Y[1].length+R;Y[2]=Y[2].substring(0,R),Y[0]=Y[0].substring(0,se).trim(),Y[3]=""}}var Tt=Y[2],Ct="";if(this.options.pedantic){var Nt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Tt);Nt&&(Tt=Nt[1],Ct=Nt[3])}else Ct=Y[3]?Y[3].slice(1,-1):"";return Tt=Tt.trim(),/^</.test(Tt)&&(this.options.pedantic&&!/>$/.test(le)?Tt=Tt.slice(1):Tt=Tt.slice(1,-1)),fe(Y,{href:Tt&&Tt.replace(this.rules.inline._escapes,"$1"),title:Ct&&Ct.replace(this.rules.inline._escapes,"$1")},Y[0])}},Ee.reflink=function(N,Y){var le;if((le=this.rules.inline.reflink.exec(N))||(le=this.rules.inline.nolink.exec(N))){var be=(le[2]||le[1]).replace(/\s+/g," ");if(be=Y[be.toLowerCase()],!be||!be.href){var R=le[0].charAt(0);return{type:"text",raw:R,text:R}}return fe(le,be,le[0])}},Ee.emStrong=function(N,Y,le){le===void 0&&(le="");var be=this.rules.inline.emStrong.lDelim.exec(N);if(be&&!(be[3]&&le.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 R=be[1]||be[2]||"";if(!R||R&&(le===""||this.rules.inline.punctuation.exec(le))){var ft=be[0].length-1,se,Tt,Ct=ft,Nt=0,br=be[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(br.lastIndex=0,Y=Y.slice(-1*N.length+ft);(be=br.exec(Y))!=null;)if(se=be[1]||be[2]||be[3]||be[4]||be[5]||be[6],!!se){if(Tt=se.length,be[3]||be[4]){Ct+=Tt;continue}else if((be[5]||be[6])&&ft%3&&!((ft+Tt)%3)){Nt+=Tt;continue}if(Ct-=Tt,!(Ct>0))return Tt=Math.min(Tt,Tt+Ct+Nt),Math.min(ft,Tt)%2?{type:"em",raw:N.slice(0,ft+be.index+Tt+1),text:N.slice(1,ft+be.index+Tt)}:{type:"strong",raw:N.slice(0,ft+be.index+Tt+1),text:N.slice(2,ft+be.index+Tt-1)}}}}},Ee.codespan=function(N){var Y=this.rules.inline.code.exec(N);if(Y){var le=Y[2].replace(/\n/g," "),be=/[^ ]/.test(le),R=/^ /.test(le)&&/ $/.test(le);return be&&R&&(le=le.substring(1,le.length-1)),le=A(le,!0),{type:"codespan",raw:Y[0],text:le}}},Ee.br=function(N){var Y=this.rules.inline.br.exec(N);if(Y)return{type:"br",raw:Y[0]}},Ee.del=function(N){var Y=this.rules.inline.del.exec(N);if(Y)return{type:"del",raw:Y[0],text:Y[2]}},Ee.autolink=function(N,Y){var le=this.rules.inline.autolink.exec(N);if(le){var be,R;return le[2]==="@"?(be=A(this.options.mangle?Y(le[1]):le[1]),R="mailto:"+be):(be=A(le[1]),R=be),{type:"link",raw:le[0],text:be,href:R,tokens:[{type:"text",raw:be,text:be}]}}},Ee.url=function(N,Y){var le;if(le=this.rules.inline.url.exec(N)){var be,R;if(le[2]==="@")be=A(this.options.mangle?Y(le[0]):le[0]),R="mailto:"+be;else{var ft;do ft=le[0],le[0]=this.rules.inline._backpedal.exec(le[0])[0];while(ft!==le[0]);be=A(le[0]),le[1]==="www."?R="http://"+be:R=be}return{type:"link",raw:le[0],text:be,href:R,tokens:[{type:"text",raw:be,text:be}]}}},Ee.inlineText=function(N,Y,le){var be=this.rules.inline.text.exec(N);if(be){var R;return Y?R=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(be[0]):A(be[0]):be[0]:R=A(this.options.smartypants?le(be[0]):be[0]),{type:"text",raw:be[0],text:R}}},ue}(),it=q.noopTest,tt=q.edit,$t=q.merge,ut={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:it,table:it,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};ut._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ut._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ut.def=tt(ut.def).replace("label",ut._label).replace("title",ut._title).getRegex(),ut.bullet=/(?:[*+-]|\d{1,9}[.)])/,ut.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,ut.item=tt(ut.item,"gm").replace(/bull/g,ut.bullet).getRegex(),ut.listItemStart=tt(/^( *)(bull) */).replace("bull",ut.bullet).getRegex(),ut.list=tt(ut.list).replace(/bull/g,ut.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ut.def.source+")").getRegex(),ut._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",ut._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,ut.html=tt(ut.html,"i").replace("comment",ut._comment).replace("tag",ut._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ut.paragraph=tt(ut._paragraph).replace("hr",ut.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",ut._tag).getRegex(),ut.blockquote=tt(ut.blockquote).replace("paragraph",ut.paragraph).getRegex(),ut.normal=$t({},ut),ut.gfm=$t({},ut.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*|$)"}),ut.gfm.nptable=tt(ut.gfm.nptable).replace("hr",ut.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",ut._tag).getRegex(),ut.gfm.table=tt(ut.gfm.table).replace("hr",ut.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",ut._tag).getRegex(),ut.pedantic=$t({},ut.normal,{html:tt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ut._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:it,paragraph:tt(ut.normal._paragraph).replace("hr",ut.hr).replace("heading",` *#{1,6} *[^
]`).replace("lheading",ut.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var nt={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:it,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:it,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};nt._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",nt.punctuation=tt(nt.punctuation).replace(/punctuation/g,nt._punctuation).getRegex(),nt.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,nt.escapedEmSt=/\\\*|\\_/g,nt._comment=tt(ut._comment).replace("(?:-->|$)","-->").getRegex(),nt.emStrong.lDelim=tt(nt.emStrong.lDelim).replace(/punct/g,nt._punctuation).getRegex(),nt.emStrong.rDelimAst=tt(nt.emStrong.rDelimAst,"g").replace(/punct/g,nt._punctuation).getRegex(),nt.emStrong.rDelimUnd=tt(nt.emStrong.rDelimUnd,"g").replace(/punct/g,nt._punctuation).getRegex(),nt._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,nt._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,nt._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])?)+(?![-_])/,nt.autolink=tt(nt.autolink).replace("scheme",nt._scheme).replace("email",nt._email).getRegex(),nt._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,nt.tag=tt(nt.tag).replace("comment",nt._comment).replace("attribute",nt._attribute).getRegex(),nt._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,nt._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,nt._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,nt.link=tt(nt.link).replace("label",nt._label).replace("href",nt._href).replace("title",nt._title).getRegex(),nt.reflink=tt(nt.reflink).replace("label",nt._label).getRegex(),nt.reflinkSearch=tt(nt.reflinkSearch,"g").replace("reflink",nt.reflink).replace("nolink",nt.nolink).getRegex(),nt.normal=$t({},nt),nt.pedantic=$t({},nt.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:tt(/^!?\[(label)\]\((.*?)\)/).replace("label",nt._label).getRegex(),reflink:tt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",nt._label).getRegex()}),nt.gfm=$t({},nt.normal,{escape:tt(nt.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),nt.gfm.url=tt(nt.gfm.url,"i").replace("email",nt.gfm._extended_email).getRegex(),nt.breaks=$t({},nt.gfm,{br:tt(nt.br).replace("{2,}","*").getRegex(),text:tt(nt.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var tr={block:ut,inline:nt},sr=Ze,_r=De.exports.defaults,ar=tr.block,Yt=tr.inline,It=q.repeatString;function Te(ue){return ue.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(ue){var Ee="",Oe,N,Y=ue.length;for(Oe=0;Oe<Y;Oe++)N=ue.charCodeAt(Oe),Math.random()>.5&&(N="x"+N.toString(16)),Ee+="&#"+N+";";return Ee}var Ie=function(){function ue(Oe){this.tokens=[],this.tokens.links=Object.create(null),this.options=Oe||_r,this.options.tokenizer=this.options.tokenizer||new sr,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var N={block:ar.normal,inline:Yt.normal};this.options.pedantic?(N.block=ar.pedantic,N.inline=Yt.pedantic):this.options.gfm&&(N.block=ar.gfm,this.options.breaks?N.inline=Yt.breaks:N.inline=Yt.gfm),this.tokenizer.rules=N}ue.lex=function(N,Y){var le=new ue(Y);return le.lex(N)},ue.lexInline=function(N,Y){var le=new ue(Y);return le.inlineTokens(N)};var Ee=ue.prototype;return Ee.lex=function(N){return N=N.replace(/\r\n|\r/g,`
`).replace(/\t/g," "),this.blockTokens(N,this.tokens,!0),this.inline(this.tokens),this.tokens},Ee.blockTokens=function(N,Y,le){Y===void 0&&(Y=[]),le===void 0&&(le=!0),this.options.pedantic&&(N=N.replace(/^ +$/gm,""));for(var be,R,ft,se;N;){if(be=this.tokenizer.space(N)){N=N.substring(be.raw.length),be.type&&Y.push(be);continue}if(be=this.tokenizer.code(N)){N=N.substring(be.raw.length),se=Y[Y.length-1],se&&se.type==="paragraph"?(se.raw+=`
`+be.raw,se.text+=`
`+be.text):Y.push(be);continue}if(be=this.tokenizer.fences(N)){N=N.substring(be.raw.length),Y.push(be);continue}if(be=this.tokenizer.heading(N)){N=N.substring(be.raw.length),Y.push(be);continue}if(be=this.tokenizer.nptable(N)){N=N.substring(be.raw.length),Y.push(be);continue}if(be=this.tokenizer.hr(N)){N=N.substring(be.raw.length),Y.push(be);continue}if(be=this.tokenizer.blockquote(N)){N=N.substring(be.raw.length),be.tokens=this.blockTokens(be.text,[],le),Y.push(be);continue}if(be=this.tokenizer.list(N)){for(N=N.substring(be.raw.length),ft=be.items.length,R=0;R<ft;R++)be.items[R].tokens=this.blockTokens(be.items[R].text,[],!1);Y.push(be);continue}if(be=this.tokenizer.html(N)){N=N.substring(be.raw.length),Y.push(be);continue}if(le&&(be=this.tokenizer.def(N))){N=N.substring(be.raw.length),this.tokens.links[be.tag]||(this.tokens.links[be.tag]={href:be.href,title:be.title});continue}if(be=this.tokenizer.table(N)){N=N.substring(be.raw.length),Y.push(be);continue}if(be=this.tokenizer.lheading(N)){N=N.substring(be.raw.length),Y.push(be);continue}if(le&&(be=this.tokenizer.paragraph(N))){N=N.substring(be.raw.length),Y.push(be);continue}if(be=this.tokenizer.text(N)){N=N.substring(be.raw.length),se=Y[Y.length-1],se&&se.type==="text"?(se.raw+=`
`+be.raw,se.text+=`
`+be.text):Y.push(be);continue}if(N){var Tt="Infinite loop on byte: "+N.charCodeAt(0);if(this.options.silent){console.error(Tt);break}else throw new Error(Tt)}}return Y},Ee.inline=function(N){var Y,le,be,R,ft,se,Tt=N.length;for(Y=0;Y<Tt;Y++)switch(se=N[Y],se.type){case"paragraph":case"text":case"heading":{se.tokens=[],this.inlineTokens(se.text,se.tokens);break}case"table":{for(se.tokens={header:[],cells:[]},R=se.header.length,le=0;le<R;le++)se.tokens.header[le]=[],this.inlineTokens(se.header[le],se.tokens.header[le]);for(R=se.cells.length,le=0;le<R;le++)for(ft=se.cells[le],se.tokens.cells[le]=[],be=0;be<ft.length;be++)se.tokens.cells[le][be]=[],this.inlineTokens(ft[be],se.tokens.cells[le][be]);break}case"blockquote":{this.inline(se.tokens);break}case"list":{for(R=se.items.length,le=0;le<R;le++)this.inline(se.items[le].tokens);break}}return N},Ee.inlineTokens=function(N,Y,le,be){Y===void 0&&(Y=[]),le===void 0&&(le=!1),be===void 0&&(be=!1);var R,ft,se=N,Tt,Ct,Nt;if(this.tokens.links){var br=Object.keys(this.tokens.links);if(br.length>0)for(;(Tt=this.tokenizer.rules.inline.reflinkSearch.exec(se))!=null;)br.includes(Tt[0].slice(Tt[0].lastIndexOf("[")+1,-1))&&(se=se.slice(0,Tt.index)+"["+It("a",Tt[0].length-2)+"]"+se.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Tt=this.tokenizer.rules.inline.blockSkip.exec(se))!=null;)se=se.slice(0,Tt.index)+"["+It("a",Tt[0].length-2)+"]"+se.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(Tt=this.tokenizer.rules.inline.escapedEmSt.exec(se))!=null;)se=se.slice(0,Tt.index)+"++"+se.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;N;){if(Ct||(Nt=""),Ct=!1,R=this.tokenizer.escape(N)){N=N.substring(R.raw.length),Y.push(R);continue}if(R=this.tokenizer.tag(N,le,be)){N=N.substring(R.raw.length),le=R.inLink,be=R.inRawBlock;var Ht=Y[Y.length-1];Ht&&R.type==="text"&&Ht.type==="text"?(Ht.raw+=R.raw,Ht.text+=R.text):Y.push(R);continue}if(R=this.tokenizer.link(N)){N=N.substring(R.raw.length),R.type==="link"&&(R.tokens=this.inlineTokens(R.text,[],!0,be)),Y.push(R);continue}if(R=this.tokenizer.reflink(N,this.tokens.links)){N=N.substring(R.raw.length);var Mt=Y[Y.length-1];R.type==="link"?(R.tokens=this.inlineTokens(R.text,[],!0,be),Y.push(R)):Mt&&R.type==="text"&&Mt.type==="text"?(Mt.raw+=R.raw,Mt.text+=R.text):Y.push(R);continue}if(R=this.tokenizer.emStrong(N,se,Nt)){N=N.substring(R.raw.length),R.tokens=this.inlineTokens(R.text,[],le,be),Y.push(R);continue}if(R=this.tokenizer.codespan(N)){N=N.substring(R.raw.length),Y.push(R);continue}if(R=this.tokenizer.br(N)){N=N.substring(R.raw.length),Y.push(R);continue}if(R=this.tokenizer.del(N)){N=N.substring(R.raw.length),R.tokens=this.inlineTokens(R.text,[],le,be),Y.push(R);continue}if(R=this.tokenizer.autolink(N,qe)){N=N.substring(R.raw.length),Y.push(R);continue}if(!le&&(R=this.tokenizer.url(N,qe))){N=N.substring(R.raw.length),Y.push(R);continue}if(R=this.tokenizer.inlineText(N,be,Te)){N=N.substring(R.raw.length),R.raw.slice(-1)!=="_"&&(Nt=R.raw.slice(-1)),Ct=!0,ft=Y[Y.length-1],ft&&ft.type==="text"?(ft.raw+=R.raw,ft.text+=R.text):Y.push(R);continue}if(N){var Tr="Infinite loop on byte: "+N.charCodeAt(0);if(this.options.silent){console.error(Tr);break}else throw new Error(Tr)}}return Y},J(ue,null,[{key:"rules",get:function(){return{block:ar,inline:Yt}}}]),ue}(),rt=De.exports.defaults,st=q.cleanUrl,z=q.escape,oe=function(){function ue(Oe){this.options=Oe||rt}var Ee=ue.prototype;return Ee.code=function(N,Y,le){var be=(Y||"").match(/\S*/)[0];if(this.options.highlight){var R=this.options.highlight(N,be);R!=null&&R!==N&&(le=!0,N=R)}return N=N.replace(/\n$/,"")+`
`,be?'<pre><code class="'+this.options.langPrefix+z(be,!0)+'">'+(le?N:z(N,!0))+`</code></pre>
`:"<pre><code>"+(le?N:z(N,!0))+`</code></pre>
`},Ee.blockquote=function(N){return`<blockquote>
`+N+`</blockquote>
`},Ee.html=function(N){return N},Ee.heading=function(N,Y,le,be){return this.options.headerIds?"<h"+Y+' id="'+this.options.headerPrefix+be.slug(le)+'">'+N+"</h"+Y+`>
`:"<h"+Y+">"+N+"</h"+Y+`>
`},Ee.hr=function(){return this.options.xhtml?`<hr/>
`:`<hr>
`},Ee.list=function(N,Y,le){var be=Y?"ol":"ul",R=Y&&le!==1?' start="'+le+'"':"";return"<"+be+R+`>
`+N+"</"+be+`>
`},Ee.listitem=function(N){return"<li>"+N+`</li>
`},Ee.checkbox=function(N){return"<input "+(N?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Ee.paragraph=function(N){return"<p>"+N+`</p>
`},Ee.table=function(N,Y){return Y&&(Y="<tbody>"+Y+"</tbody>"),`<table>
<thead>
`+N+`</thead>
`+Y+`</table>
`},Ee.tablerow=function(N){return`<tr>
`+N+`</tr>
`},Ee.tablecell=function(N,Y){var le=Y.header?"th":"td",be=Y.align?"<"+le+' align="'+Y.align+'">':"<"+le+">";return be+N+"</"+le+`>
`},Ee.strong=function(N){return"<strong>"+N+"</strong>"},Ee.em=function(N){return"<em>"+N+"</em>"},Ee.codespan=function(N){return"<code>"+N+"</code>"},Ee.br=function(){return this.options.xhtml?"<br/>":"<br>"},Ee.del=function(N){return"<del>"+N+"</del>"},Ee.link=function(N,Y,le){if(N=st(this.options.sanitize,this.options.baseUrl,N),N===null)return le;var be='<a href="'+z(N)+'"';return Y&&(be+=' title="'+Y+'"'),be+=">"+le+"</a>",be},Ee.image=function(N,Y,le){if(N=st(this.options.sanitize,this.options.baseUrl,N),N===null)return le;var be='<img src="'+N+'" alt="'+le+'"';return Y&&(be+=' title="'+Y+'"'),be+=this.options.xhtml?"/>":">",be},Ee.text=function(N){return N},ue}(),Ae=function(){function ue(){}var Ee=ue.prototype;return Ee.strong=function(N){return N},Ee.em=function(N){return N},Ee.codespan=function(N){return N},Ee.del=function(N){return N},Ee.html=function(N){return N},Ee.text=function(N){return N},Ee.link=function(N,Y,le){return""+le},Ee.image=function(N,Y,le){return""+le},Ee.br=function(){return""},ue}(),ye=function(){function ue(){this.seen={}}var Ee=ue.prototype;return Ee.serialize=function(N){return N.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},Ee.getNextSafeSlug=function(N,Y){var le=N,be=0;if(this.seen.hasOwnProperty(le)){be=this.seen[N];do be++,le=N+"-"+be;while(this.seen.hasOwnProperty(le))}return Y||(this.seen[N]=be,this.seen[le]=0),le},Ee.slug=function(N,Y){Y===void 0&&(Y={});var le=this.serialize(N);return this.getNextSafeSlug(le,Y.dryrun)},ue}(),Pe=oe,ze=Ae,Ve=ye,Je=De.exports.defaults,je=q.unescape,Ke=function(){function ue(Oe){this.options=Oe||Je,this.options.renderer=this.options.renderer||new Pe,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ze,this.slugger=new Ve}ue.parse=function(N,Y){var le=new ue(Y);return le.parse(N)},ue.parseInline=function(N,Y){var le=new ue(Y);return le.parseInline(N)};var Ee=ue.prototype;return Ee.parse=function(N,Y){Y===void 0&&(Y=!0);var le="",be,R,ft,se,Tt,Ct,Nt,br,Ht,Mt,Tr,Br,Gr,zr,At,Wt,pr,Kr,Ir=N.length;for(be=0;be<Ir;be++)switch(Mt=N[be],Mt.type){case"space":continue;case"hr":{le+=this.renderer.hr();continue}case"heading":{le+=this.renderer.heading(this.parseInline(Mt.tokens),Mt.depth,je(this.parseInline(Mt.tokens,this.textRenderer)),this.slugger);continue}case"code":{le+=this.renderer.code(Mt.text,Mt.lang,Mt.escaped);continue}case"table":{for(br="",Nt="",se=Mt.header.length,R=0;R<se;R++)Nt+=this.renderer.tablecell(this.parseInline(Mt.tokens.header[R]),{header:!0,align:Mt.align[R]});for(br+=this.renderer.tablerow(Nt),Ht="",se=Mt.cells.length,R=0;R<se;R++){for(Ct=Mt.tokens.cells[R],Nt="",Tt=Ct.length,ft=0;ft<Tt;ft++)Nt+=this.renderer.tablecell(this.parseInline(Ct[ft]),{header:!1,align:Mt.align[ft]});Ht+=this.renderer.tablerow(Nt)}le+=this.renderer.table(br,Ht);continue}case"blockquote":{Ht=this.parse(Mt.tokens),le+=this.renderer.blockquote(Ht);continue}case"list":{for(Tr=Mt.ordered,Br=Mt.start,Gr=Mt.loose,se=Mt.items.length,Ht="",R=0;R<se;R++)At=Mt.items[R],Wt=At.checked,pr=At.task,zr="",At.task&&(Kr=this.renderer.checkbox(Wt),Gr?At.tokens.length>0&&At.tokens[0].type==="text"?(At.tokens[0].text=Kr+" "+At.tokens[0].text,At.tokens[0].tokens&&At.tokens[0].tokens.length>0&&At.tokens[0].tokens[0].type==="text"&&(At.tokens[0].tokens[0].text=Kr+" "+At.tokens[0].tokens[0].text)):At.tokens.unshift({type:"text",text:Kr}):zr+=Kr),zr+=this.parse(At.tokens,Gr),Ht+=this.renderer.listitem(zr,pr,Wt);le+=this.renderer.list(Ht,Tr,Br);continue}case"html":{le+=this.renderer.html(Mt.text);continue}case"paragraph":{le+=this.renderer.paragraph(this.parseInline(Mt.tokens));continue}case"text":{for(Ht=Mt.tokens?this.parseInline(Mt.tokens):Mt.text;be+1<Ir&&N[be+1].type==="text";)Mt=N[++be],Ht+=`
`+(Mt.tokens?this.parseInline(Mt.tokens):Mt.text);le+=Y?this.renderer.paragraph(Ht):Ht;continue}default:{var tn='Token with "'+Mt.type+'" type was not found.';if(this.options.silent){console.error(tn);return}else throw new Error(tn)}}return le},Ee.parseInline=function(N,Y){Y=Y||this.renderer;var le="",be,R,ft=N.length;for(be=0;be<ft;be++)switch(R=N[be],R.type){case"escape":{le+=Y.text(R.text);break}case"html":{le+=Y.html(R.text);break}case"link":{le+=Y.link(R.href,R.title,this.parseInline(R.tokens,Y));break}case"image":{le+=Y.image(R.href,R.title,R.text);break}case"strong":{le+=Y.strong(this.parseInline(R.tokens,Y));break}case"em":{le+=Y.em(this.parseInline(R.tokens,Y));break}case"codespan":{le+=Y.codespan(R.text);break}case"br":{le+=Y.br();break}case"del":{le+=Y.del(this.parseInline(R.tokens,Y));break}case"text":{le+=Y.text(R.text);break}default:{var se='Token with "'+R.type+'" type was not found.';if(this.options.silent){console.error(se);return}else throw new Error(se)}}return le},ue}(),_t=Ie,xt=Ke,ht=Ze,gt=oe,Et=Ae,pt=ye,kt=q.merge,wt=q.checkSanitizeDeprecation,_=q.escape,T=De.exports.getDefaults,We=De.exports.changeDefaults,O=De.exports.defaults;function ne(ue,Ee,Oe){if(typeof ue=="undefined"||ue===null)throw new Error("marked(): input parameter is undefined or null");if(typeof ue!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(ue)+", string expected");if(typeof Ee=="function"&&(Oe=Ee,Ee=null),Ee=kt({},ne.defaults,Ee||{}),wt(Ee),Oe){var N=Ee.highlight,Y;try{Y=_t.lex(ue,Ee)}catch(ft){return Oe(ft)}var le=function(se){var Tt;if(!se)try{Ee.walkTokens&&ne.walkTokens(Y,Ee.walkTokens),Tt=xt.parse(Y,Ee)}catch(Ct){se=Ct}return Ee.highlight=N,se?Oe(se):Oe(null,Tt)};if(!N||N.length<3||(delete Ee.highlight,!Y.length))return le();var be=0;ne.walkTokens(Y,function(ft){ft.type==="code"&&(be++,setTimeout(function(){N(ft.text,ft.lang,function(se,Tt){if(se)return le(se);Tt!=null&&Tt!==ft.text&&(ft.text=Tt,ft.escaped=!0),be--,be===0&&le()})},0))}),be===0&&le();return}try{var R=_t.lex(ue,Ee);return Ee.walkTokens&&ne.walkTokens(R,Ee.walkTokens),xt.parse(R,Ee)}catch(ft){if(ft.message+=`
Please report this to https://github.com/markedjs/marked.`,Ee.silent)return"<p>An error occurred:</p><pre>"+_(ft.message+"",!0)+"</pre>";throw ft}}ne.options=ne.setOptions=function(ue){return kt(ne.defaults,ue),We(ne.defaults),ne},ne.getDefaults=T,ne.defaults=O,ne.use=function(ue){var Ee=kt({},ue);if(ue.renderer&&function(){var N=ne.defaults.renderer||new gt,Y=function(R){var ft=N[R];N[R]=function(){for(var se=arguments.length,Tt=new Array(se),Ct=0;Ct<se;Ct++)Tt[Ct]=arguments[Ct];var Nt=ue.renderer[R].apply(N,Tt);return Nt===!1&&(Nt=ft.apply(N,Tt)),Nt}};for(var le in ue.renderer)Y(le);Ee.renderer=N}(),ue.tokenizer&&function(){var N=ne.defaults.tokenizer||new ht,Y=function(R){var ft=N[R];N[R]=function(){for(var se=arguments.length,Tt=new Array(se),Ct=0;Ct<se;Ct++)Tt[Ct]=arguments[Ct];var Nt=ue.tokenizer[R].apply(N,Tt);return Nt===!1&&(Nt=ft.apply(N,Tt)),Nt}};for(var le in ue.tokenizer)Y(le);Ee.tokenizer=N}(),ue.walkTokens){var Oe=ne.defaults.walkTokens;Ee.walkTokens=function(N){ue.walkTokens(N),Oe&&Oe(N)}}ne.setOptions(Ee)},ne.walkTokens=function(ue,Ee){for(var Oe=Me(ue),N;!(N=Oe()).done;){var Y=N.value;switch(Ee(Y),Y.type){case"table":{for(var le=Me(Y.tokens.header),be;!(be=le()).done;){var R=be.value;ne.walkTokens(R,Ee)}for(var ft=Me(Y.tokens.cells),se;!(se=ft()).done;)for(var Tt=se.value,Ct=Me(Tt),Nt;!(Nt=Ct()).done;){var br=Nt.value;ne.walkTokens(br,Ee)}break}case"list":{ne.walkTokens(Y.items,Ee);break}default:Y.tokens&&ne.walkTokens(Y.tokens,Ee)}}},ne.parseInline=function(ue,Ee){if(typeof ue=="undefined"||ue===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof ue!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(ue)+", string expected");Ee=kt({},ne.defaults,Ee||{}),wt(Ee);try{var Oe=_t.lexInline(ue,Ee);return Ee.walkTokens&&ne.walkTokens(Oe,Ee.walkTokens),xt.parseInline(Oe,Ee)}catch(N){if(N.message+=`
Please report this to https://github.com/markedjs/marked.`,Ee.silent)return"<p>An error occurred:</p><pre>"+_(N.message+"",!0)+"</pre>";throw N}},ne.Parser=xt,ne.parser=xt.parse,ne.Renderer=gt,ne.TextRenderer=Et,ne.Lexer=_t,ne.lexer=_t.lex,ne.Tokenizer=ht,ne.Slugger=pt,ne.parse=ne;var Kt=ne;return Kt})},11690:function(Ot){const Xe=/[&<>"']/,J=/[&<>"']/g,te=/[<>"']|&(?!#?\w+;)/,we=/[<>"']|&(?!#?\w+;)/g,Me={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},De=ce=>Me[ce];function Fe(ce,ge){if(ge){if(Xe.test(ce))return ce.replace(J,De)}else if(te.test(ce))return ce.replace(we,De);return ce}const de=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Se(ce){return ce.replace(de,(ge,ke)=>(ke=ke.toLowerCase(),ke==="colon"?":":ke.charAt(0)==="#"?ke.charAt(1)==="x"?String.fromCharCode(parseInt(ke.substring(2),16)):String.fromCharCode(+ke.substring(1)):""))}const xe=/(^|[^\[])\^/g;function l(ce,ge){ce=ce.source||ce,ge=ge||"";const ke={replace:(ve,Ce)=>(Ce=Ce.source||Ce,Ce=Ce.replace(xe,"$1"),ce=ce.replace(ve,Ce),ke),getRegex:()=>new RegExp(ce,ge)};return ke}const H=/[^\w:]/g,P=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function x(ce,ge,ke){if(ce){let ve;try{ve=decodeURIComponent(Se(ke)).replace(H,"").toLowerCase()}catch(Ce){return null}if(ve.indexOf("javascript:")===0||ve.indexOf("vbscript:")===0||ve.indexOf("data:")===0)return null}ge&&!P.test(ke)&&(ke=W(ge,ke));try{ke=encodeURI(ke).replace(/%25/g,"%")}catch(ve){return null}return ke}const d={},y=/^[^:]+:\/*[^/]*$/,v=/^([^:]+:)[\s\S]*$/,U=/^([^:]+:\/*[^/]*)[\s\S]*$/;function W(ce,ge){d[" "+ce]||(y.test(ce)?d[" "+ce]=ce+"/":d[" "+ce]=re(ce,"/",!0)),ce=d[" "+ce];const ke=ce.indexOf(":")===-1;return ge.substring(0,2)==="//"?ke?ge:ce.replace(v,"$1")+ge:ge.charAt(0)==="/"?ke?ge:ce.replace(U,"$1")+ge:ce+ge}const I={exec:function(){}};function L(ce){let ge=1,ke,ve;for(;ge<arguments.length;ge++){ke=arguments[ge];for(ve in ke)Object.prototype.hasOwnProperty.call(ke,ve)&&(ce[ve]=ke[ve])}return ce}function V(ce,ge){const ke=ce.replace(/\|/g,(K,F,$)=>{let q=!1,ae=F;for(;--ae>=0&&$[ae]==="\\";)q=!q;return q?"|":" |"}),ve=ke.split(/ \|/);let Ce=0;if(ve.length>ge)ve.splice(ge);else for(;ve.length<ge;)ve.push("");for(;Ce<ve.length;Ce++)ve[Ce]=ve[Ce].trim().replace(/\\\|/g,"|");return ve}function re(ce,ge,ke){const ve=ce.length;if(ve===0)return"";let Ce=0;for(;Ce<ve;){const K=ce.charAt(ve-Ce-1);if(K===ge&&!ke)Ce++;else if(K!==ge&&ke)Ce++;else break}return ce.substr(0,ve-Ce)}function C(ce,ge){if(ce.indexOf(ge[1])===-1)return-1;const ke=ce.length;let ve=0,Ce=0;for(;Ce<ke;Ce++)if(ce[Ce]==="\\")Ce++;else if(ce[Ce]===ge[0])ve++;else if(ce[Ce]===ge[1]&&(ve--,ve<0))return Ce;return-1}function _e(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 pe(ce,ge){if(ge<1)return"";let ke="";for(;ge>1;)ge&1&&(ke+=ce),ge>>=1,ce+=ce;return ke+ce}Ot.exports={escape:Fe,unescape:Se,edit:l,cleanUrl:x,resolveUrl:W,noopTest:I,merge:L,splitCells:V,rtrim:re,findClosingBracket:C,checkSanitizeDeprecation:_e,repeatString:pe}},75918:function(Ot,Xe,J){"use strict";J.d(Xe,{Wi:function(){return de},Z0:function(){return Se},aU:function(){return Fe},eZ:function(){return l},wY:function(){return xe}});var te=J(4348),we=J(69323),Me=J(13268),De=function(H,P,x,d){function y(v){return v instanceof x?v:new x(function(U){U(v)})}return new(x||(x=Promise))(function(v,U){function W(V){try{L(d.next(V))}catch(re){U(re)}}function I(V){try{L(d.throw(V))}catch(re){U(re)}}function L(V){V.done?v(V.value):y(V.value).then(W,I)}L((d=d.apply(H,P||[])).next())})};class Fe extends we.JT{constructor(P,x="",d="",y=!0,v){super(),this._onDidChange=this._register(new te.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=P,this._label=x,this._cssClass=d,this._enabled=y,this._actionCallback=v}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,x){return De(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(P))})}}class de extends we.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new te.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new te.Q5),this.onDidRun=this._onDidRun.event}run(P,x){return De(this,void 0,void 0,function*(){if(!P.enabled)return;this._onBeforeRun.fire({action:P});let d;try{yield this.runAction(P,x)}catch(y){d=y}this._onDidRun.fire({action:P,error:d})})}runAction(P,x){return De(this,void 0,void 0,function*(){yield P.run(x)})}}class Se extends Fe{constructor(P){super(Se.ID,P,P?"separator text":"separator"),this.checked=!1,this.enabled=!1}}Se.ID="vs.actions.separator";class xe{constructor(P,x,d,y){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=P,this.label=x,this.class=y,this._actions=d}get actions(){return this._actions}dispose(){}run(){return De(this,void 0,void 0,function*(){})}}class l extends Fe{constructor(){super(l.ID,Me.N("submenu.empty","(empty)"),void 0,!1)}}l.ID="vs.actions.empty"},76068:function(Ot,Xe,J){"use strict";J.d(Xe,{ok:function(){return te}});function te(we,Me){if(!we)throw new Error(Me?`Assertion failed (${Me})`:"Assertion Failed")}},52615:function(Ot,Xe,J){"use strict";J.d(Xe,{CM:function(){return Fe},JL:function(){return de},dT:function(){return xe},fK:function(){return De},lA:function(){return Se}});var te=J(4348);class we{constructor(){this._icons=new Map,this._onDidRegister=new te.Q5}add(H){const P=this._icons.get(H.id);P?H.description?P.description=H.description:console.error(`Duplicate registration of codicon ${H.id}`):(this._icons.set(H.id,H),this._onDidRegister.fire(H))}get(H){return this._icons.get(H)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const Me=new we,De=Me;function Fe(l,H){return new Se(l,H)}function de(l){return l?l.replace(/\$\((.*?)\)/g,(H,P)=>` ${P} `).trim():""}class Se{constructor(H,P,x){this.id=H,this.definition=P,this.description=x,Me.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var xe;(function(l){l.iconNameSegment="[A-Za-z0-9]+",l.iconNameExpression="[A-Za-z0-9\\-]+",l.iconModifierExpression="~[A-Za-z]+";const H=new RegExp(`^(${l.iconNameExpression})(${l.iconModifierExpression})?$`);function P(y){if(y instanceof Se)return["codicon","codicon-"+y.id];const v=H.exec(y.id);if(!v)return P(Se.error);let[,U,W]=v;const I=["codicon","codicon-"+U];return W&&I.push("codicon-modifier-"+W.substr(1)),I}l.asClassNameArray=P;function x(y){return P(y).join(" ")}l.asClassName=x;function d(y){return"."+P(y).join(".")}l.asCSSSelector=d})(xe||(xe={})),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"})}(Se||(Se={}))},79881:function(Ot,Xe,J){"use strict";J.d(Xe,{B8:function(){return P},Cp:function(){return De},F0:function(){return xe},L6:function(){return H},VV:function(){return Se},b1:function(){return l},dL:function(){return Me},ri:function(){return Fe}});class te{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(d){setTimeout(()=>{throw d.stack?new Error(d.message+`
`+d.stack):d},0)}}emit(d){this.listeners.forEach(y=>{y(d)})}onUnexpectedError(d){this.unexpectedErrorHandler(d),this.emit(d)}onUnexpectedExternalError(d){this.unexpectedErrorHandler(d)}}const we=new te;function Me(x){Se(x)||we.onUnexpectedError(x)}function De(x){Se(x)||we.onUnexpectedExternalError(x)}function Fe(x){if(x instanceof Error){let{name:d,message:y}=x;const v=x.stacktrace||x.stack;return{$isError:!0,name:d,message:y,stack:v}}return x}const de="Canceled";function Se(x){return x instanceof Error&&x.name===de&&x.message===de}function xe(){const x=new Error(de);return x.name=x.message,x}function l(x){return x?new Error(`Illegal argument: ${x}`):new Error("Illegal argument")}function H(x){return x?new Error(`Illegal state: ${x}`):new Error("Illegal state")}class P extends Error{constructor(d){super("NotSupported"),d&&(this.message=d)}}},4348:function(Ot,Xe,J){"use strict";J.d(Xe,{D0:function(){return P},E7:function(){return x},K3:function(){return H},Q5:function(){return l},ZD:function(){return d},ju:function(){return Fe}});var te=J(79881),we=J(69323),Me=J(34502),De=J(95830),Fe;(function(y){y.None=()=>we.JT.None;function v($){return(q,ae=null,Z)=>{let E=!1,A;return A=$(Q=>{if(!E)return A?A.dispose():E=!0,q.call(ae,Q)},null,Z),E&&A.dispose(),A}}y.once=v;function U($,q){return C((ae,Z=null,E)=>$(A=>ae.call(Z,q(A)),null,E))}y.map=U;function W($,q){return C((ae,Z=null,E)=>$(A=>{q(A),ae.call(Z,A)},null,E))}y.forEach=W;function I($,q){return C((ae,Z=null,E)=>$(A=>q(A)&&ae.call(Z,A),null,E))}y.filter=I;function L($){return $}y.signal=L;function V(...$){return(q,ae=null,Z)=>(0,we.F8)(...$.map(E=>E(A=>q.call(ae,A),null,Z)))}y.any=V;function re($,q,ae){let Z=ae;return U($,E=>(Z=q(Z,E),Z))}y.reduce=re;function C($){let q;const ae=new l({onFirstListenerAdd(){q=$(ae.fire,ae)},onLastListenerRemove(){q.dispose()}});return ae.event}function _e($,q,ae=100,Z=!1,E){let A,Q,fe,$e=0;const Ze=new l({leakWarningThreshold:E,onFirstListenerAdd(){A=$(it=>{$e++,Q=q(Q,it),Z&&!fe&&(Ze.fire(Q),Q=void 0),clearTimeout(fe),fe=setTimeout(()=>{const tt=Q;Q=void 0,fe=void 0,(!Z||$e>1)&&Ze.fire(tt),$e=0},ae)})},onLastListenerRemove(){A.dispose()}});return Ze.event}y.debounce=_e;function pe($,q=(ae,Z)=>ae===Z){let ae=!0,Z;return I($,E=>{const A=ae||!q(E,Z);return ae=!1,Z=E,A})}y.latch=pe;function ce($,q){return[y.filter($,q),y.filter($,ae=>!q(ae))]}y.split=ce;function ge($,q=!1,ae=[]){let Z=ae.slice(),E=$(fe=>{Z?Z.push(fe):Q.fire(fe)});const A=()=>{Z&&Z.forEach(fe=>Q.fire(fe)),Z=null},Q=new l({onFirstListenerAdd(){E||(E=$(fe=>Q.fire(fe)))},onFirstListenerDidAdd(){Z&&(q?setTimeout(A):A())},onLastListenerRemove(){E&&E.dispose(),E=null}});return Q.event}y.buffer=ge;class ke{constructor(q){this.event=q}map(q){return new ke(U(this.event,q))}forEach(q){return new ke(W(this.event,q))}filter(q){return new ke(I(this.event,q))}reduce(q,ae){return new ke(re(this.event,q,ae))}latch(){return new ke(pe(this.event))}debounce(q,ae=100,Z=!1,E){return new ke(_e(this.event,q,ae,Z,E))}on(q,ae,Z){return this.event(q,ae,Z)}once(q,ae,Z){return v(this.event)(q,ae,Z)}}function ve($){return new ke($)}y.chain=ve;function Ce($,q,ae=Z=>Z){const Z=(...fe)=>Q.fire(ae(...fe)),E=()=>$.on(q,Z),A=()=>$.removeListener(q,Z),Q=new l({onFirstListenerAdd:E,onLastListenerRemove:A});return Q.event}y.fromNodeEventEmitter=Ce;function K($,q,ae=Z=>Z){const Z=(...fe)=>Q.fire(ae(...fe)),E=()=>$.addEventListener(q,Z),A=()=>$.removeEventListener(q,Z),Q=new l({onFirstListenerAdd:E,onLastListenerRemove:A});return Q.event}y.fromDOMEventEmitter=K;function F($){return new Promise(q=>v($)(q))}y.toPromise=F})(Fe||(Fe={}));class de{constructor(v){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${v}_${de._idPool++}`}start(v){this._stopWatch=new De.G(!0),this._listenerCount=v}stop(){if(this._stopWatch){const v=this._stopWatch.elapsed();this._elapsedOverall+=v,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${v.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}de._idPool=0;let Se=-1;class xe{constructor(v,U=Math.random().toString(18).slice(2,5)){this.customThreshold=v,this.name=U,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(v){let U=Se;if(typeof this.customThreshold=="number"&&(U=this.customThreshold),U<=0||v<U)return;this._stacks||(this._stacks=new Map);const W=new Error().stack.split(`
`).slice(3).join(`
`),I=this._stacks.get(W)||0;if(this._stacks.set(W,I+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=U*.5;let L,V=0;for(const[re,C]of this._stacks)(!L||V<C)&&(L=re,V=C);console.warn(`[${this.name}] potential listener LEAK detected, having ${v} listeners already. MOST frequent listener (${V}):`),console.warn(L)}return()=>{const L=this._stacks.get(W)||0;this._stacks.set(W,L-1)}}}class l{constructor(v){var U;this._disposed=!1,this._options=v,this._leakageMon=Se>0?new xe(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((U=this._options)===null||U===void 0)&&U._profName?new de(this._options._profName):void 0}get event(){return this._event||(this._event=(v,U,W)=>{var I;this._listeners||(this._listeners=new Me.S);const L=this._listeners.isEmpty();L&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const V=this._listeners.push(U?[v,U]:v);L&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,v,U);const re=(I=this._leakageMon)===null||I===void 0?void 0:I.check(this._listeners.size),C=(0,we.OF)(()=>{re&&re(),this._disposed||(V(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return W instanceof we.SL?W.add(C):Array.isArray(W)&&W.push(C),C}),this._event}fire(v){var U,W;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new Me.S);for(let I of this._listeners)this._deliveryQueue.push([I,v]);for((U=this._perfMon)===null||U===void 0||U.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[I,L]=this._deliveryQueue.shift();try{typeof I=="function"?I.call(void 0,L):I[0].call(I[1],L)}catch(V){(0,te.dL)(V)}}(W=this._perfMon)===null||W===void 0||W.stop()}}dispose(){var v,U,W,I,L;this._disposed||(this._disposed=!0,(v=this._listeners)===null||v===void 0||v.clear(),(U=this._deliveryQueue)===null||U===void 0||U.clear(),(I=(W=this._options)===null||W===void 0?void 0:W.onLastListenerRemove)===null||I===void 0||I.call(W),(L=this._leakageMon)===null||L===void 0||L.dispose())}}class H extends l{constructor(v){super(v),this._isPaused=0,this._eventQueue=new Me.S,this._mergeFn=v==null?void 0:v.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const v=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(v))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(v){this._listeners&&(this._isPaused!==0?this._eventQueue.push(v):super.fire(v))}}class P extends H{constructor(v){var U;super(v),this._delay=(U=v.delay)!==null&&U!==void 0?U:100}fire(v){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(v)}}class x{constructor(){this.buffers=[]}wrapEvent(v){return(U,W,I)=>v(L=>{const V=this.buffers[this.buffers.length-1];V?V.push(()=>U.call(W,L)):U.call(W,L)},void 0,I)}bufferEvents(v){const U=[];this.buffers.push(U);const W=v();return this.buffers.pop(),U.forEach(I=>I()),W}}class d{constructor(){this.listening=!1,this.inputEvent=Fe.None,this.inputEventListener=we.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(v){this.inputEvent=v,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=v(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},17845:function(Ot,Xe,J){"use strict";J.d(Xe,{I:function(){return te}});function te(we){const Me=this;let De=!1,Fe;return function(){return De||(De=!0,Fe=we.apply(Me,arguments)),Fe}}},88226:function(Ot,Xe,J){"use strict";J.d(Xe,{$:function(){return te}});var te;(function(we){function Me(V){return V&&typeof V=="object"&&typeof V[Symbol.iterator]=="function"}we.is=Me;const De=Object.freeze([]);function Fe(){return De}we.empty=Fe;function*de(V){yield V}we.single=de;function Se(V){return V||De}we.from=Se;function xe(V){return!V||V[Symbol.iterator]().next().done===!0}we.isEmpty=xe;function l(V){return V[Symbol.iterator]().next().value}we.first=l;function H(V,re){for(const C of V)if(re(C))return!0;return!1}we.some=H;function P(V,re){for(const C of V)if(re(C))return C}we.find=P;function*x(V,re){for(const C of V)re(C)&&(yield C)}we.filter=x;function*d(V,re){let C=0;for(const _e of V)yield re(_e,C++)}we.map=d;function*y(...V){for(const re of V)for(const C of re)yield C}we.concat=y;function*v(V){for(const re of V)for(const C of re)yield C}we.concatNested=v;function U(V,re,C){let _e=C;for(const pe of V)_e=re(_e,pe);return _e}we.reduce=U;function*W(V,re,C=V.length){for(re<0&&(re+=V.length),C<0?C+=V.length:C>V.length&&(C=V.length);re<C;re++)yield V[re]}we.slice=W;function I(V,re=Number.POSITIVE_INFINITY){const C=[];if(re===0)return[C,V];const _e=V[Symbol.iterator]();for(let pe=0;pe<re;pe++){const ce=_e.next();if(ce.done)return[C,we.empty()];C.push(ce.value)}return[C,{[Symbol.iterator](){return _e}}]}we.consume=I;function L(V,re,C=(_e,pe)=>_e===pe){const _e=V[Symbol.iterator](),pe=re[Symbol.iterator]();for(;;){const ce=_e.next(),ge=pe.next();if(ce.done!==ge.done)return!1;if(ce.done)return!0;if(!C(ce.value,ge.value))return!1}}we.equals=L})(te||(te={}))},69323:function(Ot,Xe,J){"use strict";J.d(Xe,{B9:function(){return d},F8:function(){return y},JT:function(){return W},Jz:function(){return L},OF:function(){return v},SL:function(){return U},Wf:function(){return x},XK:function(){return I},dk:function(){return H}});var te=J(17845),we=J(88226);const Me=!1;let De=null;function Fe(V){De=V}if(Me){const V="__is_disposable_tracked__";Fe(new class{trackDisposable(re){const C=new Error("Potentially leaked disposable").stack;setTimeout(()=>{re[V]||console.log(C)},3e3)}setParent(re,C){if(re&&re!==W.None)try{re[V]=!0}catch(_e){}}markAsDisposed(re){if(re&&re!==W.None)try{re[V]=!0}catch(C){}}markAsSingleton(re){}})}function de(V){return De==null||De.trackDisposable(V),V}function Se(V){De==null||De.markAsDisposed(V)}function xe(V,re){De==null||De.setParent(V,re)}function l(V,re){if(De)for(const C of V)De.setParent(C,re)}function H(V){return De==null||De.markAsSingleton(V),V}class P extends Error{constructor(re){super(`Encountered errors while disposing of store. Errors: [${re.join(", ")}]`),this.errors=re}}function x(V){return typeof V.dispose=="function"&&V.dispose.length===0}function d(V){if(we.$.is(V)){let re=[];for(const C of V)if(C)try{C.dispose()}catch(_e){re.push(_e)}if(re.length===1)throw re[0];if(re.length>1)throw new P(re);return Array.isArray(V)?[]:V}else if(V)return V.dispose(),V}function y(...V){const re=v(()=>d(V));return l(V,re),re}function v(V){const re=de({dispose:(0,te.I)(()=>{Se(re),V()})});return re}class U{constructor(){this._toDispose=new Set,this._isDisposed=!1,de(this)}dispose(){this._isDisposed||(Se(this),this._isDisposed=!0,this.clear())}clear(){try{d(this._toDispose.values())}finally{this._toDispose.clear()}}add(re){if(!re)return re;if(re===this)throw new Error("Cannot register a disposable on itself!");return xe(re,this),this._isDisposed?U.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(re),re}}U.DISABLE_DISPOSED_WARNING=!1;class W{constructor(){this._store=new U,de(this),xe(this._store,this)}dispose(){Se(this),this._store.dispose()}_register(re){if(re===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(re)}}W.None=Object.freeze({dispose(){}});class I{constructor(){this._isDisposed=!1,de(this)}get value(){return this._isDisposed?void 0:this._value}set value(re){var C;this._isDisposed||re===this._value||((C=this._value)===null||C===void 0||C.dispose(),re&&xe(re,this),this._value=re)}clear(){this.value=void 0}dispose(){var re;this._isDisposed=!0,Se(this),(re=this._value)===null||re===void 0||re.dispose(),this._value=void 0}clearAndLeak(){const re=this._value;return this._value=void 0,re&&xe(re,null),re}}class L{constructor(re){this.object=re}dispose(){}}},34502:function(Ot,Xe,J){"use strict";J.d(Xe,{S:function(){return we}});class te{constructor(De){this.element=De,this.next=te.Undefined,this.prev=te.Undefined}}te.Undefined=new te(void 0);class we{constructor(){this._first=te.Undefined,this._last=te.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===te.Undefined}clear(){let De=this._first;for(;De!==te.Undefined;){const Fe=De.next;De.prev=te.Undefined,De.next=te.Undefined,De=Fe}this._first=te.Undefined,this._last=te.Undefined,this._size=0}unshift(De){return this._insert(De,!1)}push(De){return this._insert(De,!0)}_insert(De,Fe){const de=new te(De);if(this._first===te.Undefined)this._first=de,this._last=de;else if(Fe){const xe=this._last;this._last=de,de.prev=xe,xe.next=de}else{const xe=this._first;this._first=de,de.next=xe,xe.prev=de}this._size+=1;let Se=!1;return()=>{Se||(Se=!0,this._remove(de))}}shift(){if(this._first!==te.Undefined){const De=this._first.element;return this._remove(this._first),De}}pop(){if(this._last!==te.Undefined){const De=this._last.element;return this._remove(this._last),De}}_remove(De){if(De.prev!==te.Undefined&&De.next!==te.Undefined){const Fe=De.prev;Fe.next=De.next,De.next.prev=Fe}else De.prev===te.Undefined&&De.next===te.Undefined?(this._first=te.Undefined,this._last=te.Undefined):De.next===te.Undefined?(this._last=this._last.prev,this._last.next=te.Undefined):De.prev===te.Undefined&&(this._first=this._first.next,this._first.prev=te.Undefined);this._size-=1}*[Symbol.iterator](){let De=this._first;for(;De!==te.Undefined;)yield De.element,De=De.next}}},23345:function(Ot,Xe,J){"use strict";J.d(Xe,{$L:function(){return _e},ED:function(){return L},IJ:function(){return re},OS:function(){return ke},WE:function(){return ce},dz:function(){return V},gn:function(){return pe},li:function(){return v},r:function(){return K},tY:function(){return C},xS:function(){return ge}});var te=J(97671),we;const Me="en";let De=!1,Fe=!1,de=!1,Se=!1,xe=!1,l=!1,H=!1,P,x=null,d=null,y;const v=typeof self=="object"?self:typeof J.g=="object"?J.g:{};let U;typeof v.vscode!="undefined"&&typeof v.vscode.process!="undefined"?U=v.vscode.process:typeof te!="undefined"&&(U=te);const W=typeof((we=U==null?void 0:U.versions)===null||we===void 0?void 0:we.electron)=="string"&&U.type==="renderer";if(typeof navigator=="object"&&!W)y=navigator.userAgent,De=y.indexOf("Windows")>=0,Fe=y.indexOf("Macintosh")>=0,H=(y.indexOf("Macintosh")>=0||y.indexOf("iPad")>=0||y.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,de=y.indexOf("Linux")>=0,l=!0,P=navigator.language,x=P;else if(typeof U=="object"){De=U.platform==="win32",Fe=U.platform==="darwin",de=U.platform==="linux",Se=de&&!!U.env.SNAP&&!!U.env.SNAP_REVISION,P=Me,x=Me;const F=U.env.VSCODE_NLS_CONFIG;if(F)try{const $=JSON.parse(F),q=$.availableLanguages["*"];P=$.locale,x=q||Me,d=$._translationsConfigFile}catch($){}xe=!0}else console.error("Unable to resolve platform.");let I=0;Fe?I=1:De?I=3:de&&(I=2);const L=De,V=Fe,re=de,C=xe,_e=l,pe=H,ce=y,ge=function(){if(v.setImmediate)return v.setImmediate.bind(v);if(typeof v.postMessage=="function"&&!v.importScripts){let q=[];v.addEventListener("message",Z=>{if(Z.data&&Z.data.vscodeSetImmediateId)for(let E=0,A=q.length;E<A;E++){const Q=q[E];if(Q.id===Z.data.vscodeSetImmediateId){q.splice(E,1),Q.callback();return}}});let ae=0;return Z=>{const E=++ae;q.push({id:E,callback:Z}),v.postMessage({vscodeSetImmediateId:E},"*")}}if(typeof(U==null?void 0:U.nextTick)=="function")return U.nextTick.bind(U);const $=Promise.resolve();return q=>$.then(q)}(),ke=Fe||H?2:De?1:3;let ve=!0,Ce=!1;function K(){if(!Ce){Ce=!0;const F=new Uint8Array(2);F[0]=1,F[1]=2,ve=new Uint16Array(F.buffer)[0]===513}return ve}},95830:function(Ot,Xe,J){"use strict";J.d(Xe,{G:function(){return Me}});var te=J(23345);const we=te.li.performance&&typeof te.li.performance.now=="function";class Me{constructor(Fe){this._highResolution=we&&Fe,this._startTime=this._now(),this._stopTime=-1}static create(Fe=!0){return new Me(Fe)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?te.li.performance.now():Date.now()}}},82983:function(Ot,Xe,J){"use strict";J.d(Xe,{$i:function(){return $e},C8:function(){return ut},GF:function(){return P},HO:function(){return ae},IO:function(){return x},K7:function(){return $t},Kw:function(){return sr},LC:function(){return v},Mh:function(){return ge},P1:function(){return ke},PJ:function(){return _r},Qe:function(){return Ze},R1:function(){return H},RP:function(){return Q},S6:function(){return ar},TT:function(){return L},Ut:function(){return E},V8:function(){return U},WU:function(){return Me},YK:function(){return Ce},YU:function(){return De},ZG:function(){return ve},ZH:function(){return F},ab:function(){return it},c1:function(){return nt},df:function(){return _e},ec:function(){return Fe},fi:function(){return Yt},fy:function(){return de},j3:function(){return Se},j_:function(){return re},m5:function(){return te},mK:function(){return C},mr:function(){return d},oH:function(){return qe},oL:function(){return xe},ok:function(){return ce},ow:function(){return W},qq:function(){return pe},qu:function(){return I},rL:function(){return K},uS:function(){return tr},un:function(){return l},uq:function(){return y},vH:function(){return q},xe:function(){return tt},zY:function(){return V}});function te(z){return!z||typeof z!="string"?!0:z.trim().length===0}const we=/{(\d+)}/g;function Me(z,...oe){return oe.length===0?z:z.replace(we,function(Ae,ye){const Pe=parseInt(ye,10);return isNaN(Pe)||Pe<0||Pe>=oe.length?Ae:oe[Pe]})}function De(z){return z.replace(/[<>&]/g,function(oe){switch(oe){case"<":return"&lt;";case">":return"&gt;";case"&":return"&amp;";default:return oe}})}function Fe(z){return z.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function de(z,oe=" "){const Ae=Se(z,oe);return xe(Ae,oe)}function Se(z,oe){if(!z||!oe)return z;const Ae=oe.length;if(Ae===0||z.length===0)return z;let ye=0;for(;z.indexOf(oe,ye)===ye;)ye=ye+Ae;return z.substring(ye)}function xe(z,oe){if(!z||!oe)return z;const Ae=oe.length,ye=z.length;if(Ae===0||ye===0)return z;let Pe=ye,ze=-1;for(;ze=z.lastIndexOf(oe,Pe-1),!(ze===-1||ze+Ae!==Pe);){if(ze===0)return"";Pe=ze}return z.substring(0,Pe)}function l(z){return z.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function H(z){return z.replace(/\*/g,"")}function P(z,oe,Ae={}){if(!z)throw new Error("Cannot create regex from empty string");oe||(z=Fe(z)),Ae.wholeWord&&(/\B/.test(z.charAt(0))||(z="\\b"+z),/\B/.test(z.charAt(z.length-1))||(z=z+"\\b"));let ye="";return Ae.global&&(ye+="g"),Ae.matchCase||(ye+="i"),Ae.multiline&&(ye+="m"),Ae.unicode&&(ye+="u"),new RegExp(z,ye)}function x(z){return z.source==="^"||z.source==="^$"||z.source==="$"||z.source==="^\\s*$"?!1:!!(z.exec("")&&z.lastIndex===0)}function d(z){return(z.global?"g":"")+(z.ignoreCase?"i":"")+(z.multiline?"m":"")+(z.unicode?"u":"")}function y(z){return z.split(/\r\n|\r|\n/)}function v(z){for(let oe=0,Ae=z.length;oe<Ae;oe++){const ye=z.charCodeAt(oe);if(ye!==32&&ye!==9)return oe}return-1}function U(z,oe=0,Ae=z.length){for(let ye=oe;ye<Ae;ye++){const Pe=z.charCodeAt(ye);if(Pe!==32&&Pe!==9)return z.substring(oe,ye)}return z.substring(oe,Ae)}function W(z,oe=z.length-1){for(let Ae=oe;Ae>=0;Ae--){const ye=z.charCodeAt(Ae);if(ye!==32&&ye!==9)return Ae}return-1}function I(z,oe){return z<oe?-1:z>oe?1:0}function L(z,oe,Ae=0,ye=z.length,Pe=0,ze=oe.length){for(;Ae<ye&&Pe<ze;Ae++,Pe++){let je=z.charCodeAt(Ae),Ke=oe.charCodeAt(Pe);if(je<Ke)return-1;if(je>Ke)return 1}const Ve=ye-Ae,Je=ze-Pe;return Ve<Je?-1:Ve>Je?1:0}function V(z,oe){return re(z,oe,0,z.length,0,oe.length)}function re(z,oe,Ae=0,ye=z.length,Pe=0,ze=oe.length){for(;Ae<ye&&Pe<ze;Ae++,Pe++){let je=z.charCodeAt(Ae),Ke=oe.charCodeAt(Pe);if(je===Ke)continue;if(je>=128||Ke>=128)return L(z.toLowerCase(),oe.toLowerCase(),Ae,ye,Pe,ze);C(je)&&(je-=32),C(Ke)&&(Ke-=32);const _t=je-Ke;if(_t!==0)return _t}const Ve=ye-Ae,Je=ze-Pe;return Ve<Je?-1:Ve>Je?1:0}function C(z){return z>=97&&z<=122}function _e(z){return z>=65&&z<=90}function pe(z,oe){return z.length===oe.length&&re(z,oe)===0}function ce(z,oe){const Ae=oe.length;return oe.length>z.length?!1:re(z,oe,0,Ae)===0}function ge(z,oe){let Ae,ye=Math.min(z.length,oe.length);for(Ae=0;Ae<ye;Ae++)if(z.charCodeAt(Ae)!==oe.charCodeAt(Ae))return Ae;return ye}function ke(z,oe){let Ae,ye=Math.min(z.length,oe.length);const Pe=z.length-1,ze=oe.length-1;for(Ae=0;Ae<ye;Ae++)if(z.charCodeAt(Pe-Ae)!==oe.charCodeAt(ze-Ae))return Ae;return ye}function ve(z){return 55296<=z&&z<=56319}function Ce(z){return 56320<=z&&z<=57343}function K(z,oe){return(z-55296<<10)+(oe-56320)+65536}function F(z,oe,Ae){const ye=z.charCodeAt(Ae);if(ve(ye)&&Ae+1<oe){const Pe=z.charCodeAt(Ae+1);if(Ce(Pe))return K(ye,Pe)}return ye}function $(z,oe){const Ae=z.charCodeAt(oe-1);if(Ce(Ae)&&oe>1){const ye=z.charCodeAt(oe-2);if(ve(ye))return K(ye,Ae)}return Ae}function q(z,oe){const Ae=It.getInstance(),ye=oe,Pe=z.length,ze=F(z,Pe,oe);oe+=ze>=65536?2:1;let Ve=Ae.getGraphemeBreakType(ze);for(;oe<Pe;){const Je=F(z,Pe,oe),je=Ae.getGraphemeBreakType(Je);if(Yt(Ve,je))break;oe+=Je>=65536?2:1,Ve=je}return oe-ye}function ae(z,oe){const Ae=It.getInstance(),ye=oe,Pe=$(z,oe);oe-=Pe>=65536?2:1;let ze=Ae.getGraphemeBreakType(Pe);for(;oe>0;){const Ve=$(z,oe),Je=Ae.getGraphemeBreakType(Ve);if(Yt(Je,ze))break;oe-=Ve>=65536?2:1,ze=Je}return ye-oe}const Z=/(?:[\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 E(z){return Z.test(z)}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 Q(z){return A.test(z)}const fe=/^[\t\n\r\x20-\x7E]*$/;function $e(z){return fe.test(z)}const Ze=/[\u2028\u2029]/;function it(z){return Ze.test(z)}function tt(z){for(let oe=0,Ae=z.length;oe<Ae;oe++)if($t(z.charCodeAt(oe)))return!0;return!1}function $t(z){return z=+z,z>=11904&&z<=55215||z>=63744&&z<=64255||z>=65281&&z<=65374}function ut(z){return z>=127462&&z<=127487||z===8986||z===8987||z===9200||z===9203||z>=9728&&z<=10175||z===11088||z===11093||z>=127744&&z<=128591||z>=128640&&z<=128764||z>=128992&&z<=129003||z>=129280&&z<=129535||z>=129648&&z<=129750}const nt="\uFEFF";function tr(z){return!!(z&&z.length>0&&z.charCodeAt(0)===65279)}function sr(z,oe=!1){return z?(oe&&(z=z.replace(/\\./g,"")),z.toLowerCase()!==z):!1}function _r(z){return z=z%(2*26),z<26?String.fromCharCode(97+z):String.fromCharCode(65+z-26)}function ar(z){return It.getInstance().getGraphemeBreakType(z)}function Yt(z,oe){return z===0?oe!==5&&oe!==7:z===2&&oe===3?!1:z===4||z===2||z===3||oe===4||oe===2||oe===3?!0:!(z===8&&(oe===8||oe===9||oe===11||oe===12)||(z===11||z===9)&&(oe===9||oe===10)||(z===12||z===10)&&oe===10||oe===5||oe===13||oe===7||z===1||z===13&&oe===14||z===6&&oe===6)}class It{constructor(){this._data=Te()}static getInstance(){return It._INSTANCE||(It._INSTANCE=new It),It._INSTANCE}getGraphemeBreakType(oe){if(oe<32)return oe===10?3:oe===13?2:4;if(oe<127)return 0;const Ae=this._data,ye=Ae.length/3;let Pe=1;for(;Pe<=ye;)if(oe<Ae[3*Pe])Pe=2*Pe;else if(oe>Ae[3*Pe+1])Pe=2*Pe+1;else return Ae[3*Pe+2];return 0}}It._INSTANCE=null;function Te(){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(z,oe){if(z===0)return 0;const Ae=Ie(z,oe);if(Ae!==void 0)return Ae;const ye=$(oe,z);return z-=rt(ye),z}function Ie(z,oe){let Ae=$(oe,z);for(z-=rt(Ae);st(Ae)||Ae===65039||Ae===8419;){if(z===0)return;Ae=$(oe,z),z-=rt(Ae)}if(ut(Ae)){if(z>=0){const ye=$(oe,z);ye===8205&&(z-=rt(ye))}return z}}function rt(z){return z>=65536?2:1}function st(z){return 127995<=z&&z<=127999}},72999:function(Ot,Xe,J){"use strict";J.d(Xe,{$E:function(){return v},$K:function(){return Se},D8:function(){return x},HD:function(){return we},IU:function(){return U},Jp:function(){return xe},Kn:function(){return Me},cW:function(){return H},f6:function(){return W},hj:function(){return De},jn:function(){return Fe},kJ:function(){return te},mf:function(){return P},o8:function(){return de},p_:function(){return l},vE:function(){return I}});function te(L){return Array.isArray(L)}function we(L){return typeof L=="string"}function Me(L){return typeof L=="object"&&L!==null&&!Array.isArray(L)&&!(L instanceof RegExp)&&!(L instanceof Date)}function De(L){return typeof L=="number"&&!isNaN(L)}function Fe(L){return L===!0||L===!1}function de(L){return typeof L=="undefined"}function Se(L){return!xe(L)}function xe(L){return de(L)||L===null}function l(L,V){if(!L)throw new Error(V?`Unexpected type, expected '${V}'`:"Unexpected type")}function H(L){if(xe(L))throw new Error("Assertion Failed: argument is undefined or null");return L}function P(L){return typeof L=="function"}function x(L,V){const re=Math.min(L.length,V.length);for(let C=0;C<re;C++)d(L[C],V[C])}function d(L,V){if(we(V)){if(typeof L!==V)throw new Error(`argument does not match constraint: typeof ${V}`)}else if(P(V)){try{if(L instanceof V)return}catch(re){}if(!xe(L)&&L.constructor===V||V.length===1&&V.call(void 0,L)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function y(L){let V=[],re=Object.getPrototypeOf(L);for(;Object.prototype!==re;)V=V.concat(Object.getOwnPropertyNames(re)),re=Object.getPrototypeOf(re);return V}function v(L){const V=[];for(const re of y(L))typeof L[re]=="function"&&V.push(re);return V}function U(L,V){const re=_e=>function(){const pe=Array.prototype.slice.call(arguments,0);return V(_e,pe)};let C={};for(const _e of L)C[_e]=re(_e);return C}function W(L){return L===null?void 0:L}function I(L,V="Unreachable"){throw new Error(V)}},13268:function(Ot,Xe,J){"use strict";J.d(Xe,{N:function(){return we}});function te(Me,De){let Fe;return De.length===0?Fe=Me:Fe=Me.replace(/\{(\d+)\}/g,function(de,Se){const xe=Se[0];return typeof De[xe]!="undefined"?De[xe]:de}),Fe}function we(Me,De,...Fe){return te(De,Fe)}},96236:function(Ot,Xe,J){"use strict";J.d(Xe,{BH:function(){return U},NZ:function(){return W},U8:function(){return I},co:function(){return v},eH:function(){return y},vr:function(){return d}});var te=J(75918),we=J(52615),Me=J(4348),De=J(88226),Fe=J(69323),de=J(34502),Se=J(35884),xe=J(90689),l=J(16925),H=J(49055),P=function(L,V,re,C){var _e=arguments.length,pe=_e<3?V:C===null?C=Object.getOwnPropertyDescriptor(V,re):C,ce;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")pe=Reflect.decorate(L,V,re,C);else for(var ge=L.length-1;ge>=0;ge--)(ce=L[ge])&&(pe=(_e<3?ce(pe):_e>3?ce(V,re,pe):ce(V,re))||pe);return _e>3&&pe&&Object.defineProperty(V,re,pe),pe},x=function(L,V){return function(re,C){V(re,C,L)}};function d(L){return L.command!==void 0}class y{constructor(V){this.id=y._idPool++,this._debugName=V}}y._idPool=0,y.CommandPalette=new y("CommandPalette"),y.EditorContext=new y("EditorContext"),y.SimpleEditorContext=new y("SimpleEditorContext"),y.EditorContextCopy=new y("EditorContextCopy"),y.EditorContextPeek=new y("EditorContextPeek"),y.MenubarEditMenu=new y("MenubarEditMenu"),y.MenubarCopy=new y("MenubarCopy"),y.MenubarGoMenu=new y("MenubarGoMenu"),y.MenubarSelectionMenu=new y("MenubarSelectionMenu"),y.InlineCompletionsActions=new y("InlineCompletionsActions");const v=(0,l.yh)("menuService"),U=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new Me.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:L=>L===y.CommandPalette}}addCommand(L){return this.addCommands(De.$.single(L))}addCommands(L){for(const V of L)this._commands.set(V.id,V);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,Fe.OF)(()=>{let V=!1;for(const re of L)V=this._commands.delete(re.id)||V;V&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(L){return this._commands.get(L)}getCommands(){const L=new Map;return this._commands.forEach((V,re)=>L.set(re,V)),L}appendMenuItem(L,V){return this.appendMenuItems(De.$.single({id:L,item:V}))}appendMenuItems(L){const V=new Set,re=new de.S;for(const{id:C,item:_e}of L){let pe=this._menuItems.get(C);pe||(pe=new de.S,this._menuItems.set(C,pe)),re.push(pe.push(_e)),V.add(C)}return this._onDidChangeMenu.fire(V),(0,Fe.OF)(()=>{if(re.size>0){for(let C of re)C();this._onDidChangeMenu.fire(V),re.clear()}})}getMenuItems(L){let V;return this._menuItems.has(L)?V=[...this._menuItems.get(L)]:V=[],L===y.CommandPalette&&this._appendImplicitItems(V),V}_appendImplicitItems(L){const V=new Set;for(const re of L)d(re)&&(V.add(re.command.id),re.alt&&V.add(re.alt.id));this._commands.forEach((re,C)=>{V.has(C)||L.push({command:re})})}};class W extends te.wY{constructor(V,re,C,_e){super(`submenuitem.${V.submenu.id}`,typeof V.title=="string"?V.title:V.title.value,[],"submenu"),this.item=V,this._menuService=re,this._contextKeyService=C,this._options=_e}get actions(){const V=[],re=this._menuService.createMenu(this.item.submenu,this._contextKeyService),C=re.getActions(this._options);re.dispose();for(const[,_e]of C)_e.length>0&&(V.push(..._e),V.push(new te.Z0));return V.length&&V.pop(),V}}let I=class Xo{constructor(V,re,C,_e,pe){var ce,ge;if(this._commandService=pe,this.id=V.id,this.label=C!=null&&C.renderShortTitle&&V.shortTitle?typeof V.shortTitle=="string"?V.shortTitle:V.shortTitle.value:typeof V.title=="string"?V.title:V.title.value,this.tooltip=(ge=typeof V.tooltip=="string"?V.tooltip:(ce=V.tooltip)===null||ce===void 0?void 0:ce.value)!==null&&ge!==void 0?ge:"",this.enabled=!V.precondition||_e.contextMatchesRules(V.precondition),this.checked=void 0,V.toggled){const ke=V.toggled.condition?V.toggled:{condition:V.toggled};this.checked=_e.contextMatchesRules(ke.condition),this.checked&&ke.tooltip&&(this.tooltip=typeof ke.tooltip=="string"?ke.tooltip:ke.tooltip.value),ke.title&&(this.label=typeof ke.title=="string"?ke.title:ke.title.value)}this.item=V,this.alt=re?new Xo(re,void 0,C,_e,pe):void 0,this._options=C,H.kS.isThemeIcon(V.icon)&&(this.class=we.dT.asClassName(V.icon))}dispose(){}run(...V){var re,C;let _e=[];return!((re=this._options)===null||re===void 0)&&re.arg&&(_e=[..._e,this._options.arg]),!((C=this._options)===null||C===void 0)&&C.shouldForwardArgs&&(_e=[..._e,...V]),this._commandService.executeCommand(this.id,..._e)}};I=P([x(3,xe.i6),x(4,Se.H)],I)},35884:function(Ot,Xe,J){"use strict";J.d(Xe,{H:function(){return Se},P:function(){return xe}});var te=J(4348),we=J(88226),Me=J(69323),De=J(34502),Fe=J(72999),de=J(16925);const Se=(0,de.yh)("commandService"),xe=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new te.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(l,H){if(!l)throw new Error("invalid command");if(typeof l=="string"){if(!H)throw new Error("invalid command");return this.registerCommand({id:l,handler:H})}if(l.description){const v=[];for(let W of l.description.args)v.push(W.constraint);const U=l.handler;l.handler=function(W,...I){return(0,Fe.D8)(I,v),U(W,...I)}}const{id:P}=l;let x=this._commands.get(P);x||(x=new De.S,this._commands.set(P,x));let d=x.unshift(l),y=(0,Me.OF)(()=>{d();const v=this._commands.get(P);v!=null&&v.isEmpty()&&this._commands.delete(P)});return this._onDidRegisterCommand.fire(P),y}registerCommandAlias(l,H){return xe.registerCommand(l,(P,...x)=>P.get(Se).executeCommand(H,...x))}getCommand(l){const H=this._commands.get(l);if(!(!H||H.isEmpty()))return we.$.first(H)}getCommands(){const l=new Map;for(const H of this._commands.keys()){const P=this.getCommand(H);P&&l.set(H,P)}return l}};xe.registerCommand("noop",()=>{})},90689:function(Ot,Xe,J){"use strict";J.d(Xe,{Ao:function(){return Se},Eq:function(){return K},Fb:function(){return xe},K8:function(){return q},i6:function(){return Ce},uy:function(){return ve}});var te=J(23345),we=J(82983),Me=J(16925);let De=te.WE||"";const Fe=new Map;Fe.set("false",!1),Fe.set("true",!0),Fe.set("isMac",te.dz),Fe.set("isLinux",te.IJ),Fe.set("isWindows",te.ED),Fe.set("isWeb",te.$L),Fe.set("isMacNative",te.dz&&!te.$L),Fe.set("isEdge",De.indexOf("Edg/")>=0),Fe.set("isFirefox",De.indexOf("Firefox")>=0),Fe.set("isChrome",De.indexOf("Chrome")>=0),Fe.set("isSafari",De.indexOf("Safari")>=0);const de=Object.prototype.hasOwnProperty;class Se{static has(E){return x.create(E)}static equals(E,A){return d.create(E,A)}static regex(E,A){return _e.create(E,A)}static not(E){return W.create(E)}static and(...E){return ge.create(E,null)}static or(...E){return ke.create(E,null,!0)}static deserialize(E,A=!1){if(E)return this._deserializeOrExpression(E,A)}static _deserializeOrExpression(E,A){let Q=E.split("||");return ke.create(Q.map(fe=>this._deserializeAndExpression(fe,A)),null,!0)}static _deserializeAndExpression(E,A){let Q=E.split("&&");return ge.create(Q.map(fe=>this._deserializeOne(fe,A)),null)}static _deserializeOne(E,A){if(E=E.trim(),E.indexOf("!=")>=0){let Q=E.split("!=");return U.create(Q[0].trim(),this._deserializeValue(Q[1],A))}if(E.indexOf("==")>=0){let Q=E.split("==");return d.create(Q[0].trim(),this._deserializeValue(Q[1],A))}if(E.indexOf("=~")>=0){let Q=E.split("=~");return _e.create(Q[0].trim(),this._deserializeRegexValue(Q[1],A))}if(E.indexOf(" in ")>=0){let Q=E.split(" in ");return y.create(Q[0].trim(),Q[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(E)){const Q=E.split(">=");return V.create(Q[0].trim(),Q[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(E)){const Q=E.split(">");return L.create(Q[0].trim(),Q[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(E)){const Q=E.split("<=");return C.create(Q[0].trim(),Q[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(E)){const Q=E.split("<");return re.create(Q[0].trim(),Q[1].trim())}return/^\!\s*/.test(E)?W.create(E.substr(1).trim()):x.create(E)}static _deserializeValue(E,A){if(E=E.trim(),E==="true")return!0;if(E==="false")return!1;let Q=/^'([^']*)'$/.exec(E);return Q?Q[1].trim():E}static _deserializeRegexValue(E,A){if((0,we.m5)(E)){if(A)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let Q=E.indexOf("/"),fe=E.lastIndexOf("/");if(Q===fe||Q<0){if(A)throw new Error(`bad regexp-value '${E}', missing /-enclosure`);return console.warn(`bad regexp-value '${E}', missing /-enclosure`),null}let $e=E.slice(Q+1,fe),Ze=E[fe+1]==="i"?"i":"";try{return new RegExp($e,Ze)}catch(it){if(A)throw new Error(`bad regexp-value '${E}', parse error: ${it}`);return console.warn(`bad regexp-value '${E}', parse error: ${it}`),null}}}function xe(Z,E){const A=Z?Z.substituteConstants():void 0,Q=E?E.substituteConstants():void 0;return!A&&!Q?!0:!A||!Q?!1:A.equals(Q)}function l(Z,E){return Z.cmp(E)}class H{constructor(){this.type=0}cmp(E){return this.type-E.type}equals(E){return E.type===this.type}substituteConstants(){return this}evaluate(E){return!1}serialize(){return"false"}keys(){return[]}negate(){return P.INSTANCE}}H.INSTANCE=new H;class P{constructor(){this.type=1}cmp(E){return this.type-E.type}equals(E){return E.type===this.type}substituteConstants(){return this}evaluate(E){return!0}serialize(){return"true"}keys(){return[]}negate(){return H.INSTANCE}}P.INSTANCE=new P;class x{constructor(E,A){this.key=E,this.negated=A,this.type=2}static create(E,A=null){const Q=Fe.get(E);return typeof Q=="boolean"?Q?P.INSTANCE:H.INSTANCE:new x(E,A)}cmp(E){return E.type!==this.type?this.type-E.type:F(this.key,E.key)}equals(E){return E.type===this.type?this.key===E.key:!1}substituteConstants(){const E=Fe.get(this.key);return typeof E=="boolean"?E?P.INSTANCE:H.INSTANCE:this}evaluate(E){return!!E.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=W.create(this.key,this)),this.negated}}class d{constructor(E,A,Q){this.key=E,this.value=A,this.negated=Q,this.type=4}static create(E,A,Q=null){if(typeof A=="boolean")return A?x.create(E,Q):W.create(E,Q);const fe=Fe.get(E);return typeof fe=="boolean"?A===(fe?"true":"false")?P.INSTANCE:H.INSTANCE:new d(E,A,Q)}cmp(E){return E.type!==this.type?this.type-E.type:$(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){const E=Fe.get(this.key);if(typeof E=="boolean"){const A=E?"true":"false";return this.value===A?P.INSTANCE:H.INSTANCE}return this}evaluate(E){return E.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=U.create(this.key,this.value,this)),this.negated}}class y{constructor(E,A){this.key=E,this.valueKey=A,this.type=10,this.negated=null}static create(E,A){return new y(E,A)}cmp(E){return E.type!==this.type?this.type-E.type:$(this.key,this.valueKey,E.key,E.valueKey)}equals(E){return E.type===this.type?this.key===E.key&&this.valueKey===E.valueKey:!1}substituteConstants(){return this}evaluate(E){const A=E.getValue(this.valueKey),Q=E.getValue(this.key);return Array.isArray(A)?A.indexOf(Q)>=0:typeof Q=="string"&&typeof A=="object"&&A!==null?de.call(A,Q):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=v.create(this)),this.negated}}class v{constructor(E){this._actual=E,this.type=11}static create(E){return new v(E)}cmp(E){return E.type!==this.type?this.type-E.type:this._actual.cmp(E._actual)}equals(E){return E.type===this.type?this._actual.equals(E._actual):!1}substituteConstants(){return this}evaluate(E){return!this._actual.evaluate(E)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class U{constructor(E,A,Q){this.key=E,this.value=A,this.negated=Q,this.type=5}static create(E,A,Q=null){if(typeof A=="boolean")return A?W.create(E,Q):x.create(E,Q);const fe=Fe.get(E);return typeof fe=="boolean"?A===(fe?"true":"false")?H.INSTANCE:P.INSTANCE:new U(E,A,Q)}cmp(E){return E.type!==this.type?this.type-E.type:$(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){const E=Fe.get(this.key);if(typeof E=="boolean"){const A=E?"true":"false";return this.value===A?H.INSTANCE:P.INSTANCE}return this}evaluate(E){return E.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 W{constructor(E,A){this.key=E,this.negated=A,this.type=3}static create(E,A=null){const Q=Fe.get(E);return typeof Q=="boolean"?Q?H.INSTANCE:P.INSTANCE:new W(E,A)}cmp(E){return E.type!==this.type?this.type-E.type:F(this.key,E.key)}equals(E){return E.type===this.type?this.key===E.key:!1}substituteConstants(){const E=Fe.get(this.key);return typeof E=="boolean"?E?H.INSTANCE:P.INSTANCE:this}evaluate(E){return!E.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=x.create(this.key,this)),this.negated}}function I(Z,E){if(typeof Z=="string"){const A=parseFloat(Z);isNaN(A)||(Z=A)}return typeof Z=="string"||typeof Z=="number"?E(Z):H.INSTANCE}class L{constructor(E,A,Q){this.key=E,this.value=A,this.negated=Q,this.type=12}static create(E,A,Q=null){return I(A,fe=>new L(E,fe,Q))}cmp(E){return E.type!==this.type?this.type-E.type:$(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){return this}evaluate(E){return typeof this.value=="string"?!1:parseFloat(E.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=C.create(this.key,this.value,this)),this.negated}}class V{constructor(E,A,Q){this.key=E,this.value=A,this.negated=Q,this.type=13}static create(E,A,Q=null){return I(A,fe=>new V(E,fe,Q))}cmp(E){return E.type!==this.type?this.type-E.type:$(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){return this}evaluate(E){return typeof this.value=="string"?!1:parseFloat(E.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=re.create(this.key,this.value,this)),this.negated}}class re{constructor(E,A,Q){this.key=E,this.value=A,this.negated=Q,this.type=14}static create(E,A,Q=null){return I(A,fe=>new re(E,fe,Q))}cmp(E){return E.type!==this.type?this.type-E.type:$(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){return this}evaluate(E){return typeof this.value=="string"?!1:parseFloat(E.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=V.create(this.key,this.value,this)),this.negated}}class C{constructor(E,A,Q){this.key=E,this.value=A,this.negated=Q,this.type=15}static create(E,A,Q=null){return I(A,fe=>new C(E,fe,Q))}cmp(E){return E.type!==this.type?this.type-E.type:$(this.key,this.value,E.key,E.value)}equals(E){return E.type===this.type?this.key===E.key&&this.value===E.value:!1}substituteConstants(){return this}evaluate(E){return typeof this.value=="string"?!1:parseFloat(E.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=L.create(this.key,this.value,this)),this.negated}}class _e{constructor(E,A){this.key=E,this.regexp=A,this.type=7,this.negated=null}static create(E,A){return new _e(E,A)}cmp(E){if(E.type!==this.type)return this.type-E.type;if(this.key<E.key)return-1;if(this.key>E.key)return 1;const A=this.regexp?this.regexp.source:"",Q=E.regexp?E.regexp.source:"";return A<Q?-1:A>Q?1:0}equals(E){if(E.type===this.type){const A=this.regexp?this.regexp.source:"",Q=E.regexp?E.regexp.source:"";return this.key===E.key&&A===Q}return!1}substituteConstants(){return this}evaluate(E){let A=E.getValue(this.key);return this.regexp?this.regexp.test(A):!1}serialize(){const E=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${E}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=pe.create(this)),this.negated}}class pe{constructor(E){this._actual=E,this.type=8}static create(E){return new pe(E)}cmp(E){return E.type!==this.type?this.type-E.type:this._actual.cmp(E._actual)}equals(E){return E.type===this.type?this._actual.equals(E._actual):!1}substituteConstants(){return this}evaluate(E){return!this._actual.evaluate(E)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function ce(Z){let E=null;for(let A=0,Q=Z.length;A<Q;A++){const fe=Z[A].substituteConstants();if(Z[A]!==fe&&E===null){E=[];for(let $e=0;$e<A;$e++)E[$e]=Z[$e]}E!==null&&(E[A]=fe)}return E===null?Z:E}class ge{constructor(E,A){this.expr=E,this.negated=A,this.type=6}static create(E,A){return ge._normalizeArr(E,A)}cmp(E){if(E.type!==this.type)return this.type-E.type;if(this.expr.length<E.expr.length)return-1;if(this.expr.length>E.expr.length)return 1;for(let A=0,Q=this.expr.length;A<Q;A++){const fe=l(this.expr[A],E.expr[A]);if(fe!==0)return fe}return 0}equals(E){if(E.type===this.type){if(this.expr.length!==E.expr.length)return!1;for(let A=0,Q=this.expr.length;A<Q;A++)if(!this.expr[A].equals(E.expr[A]))return!1;return!0}return!1}substituteConstants(){const E=ce(this.expr);return E===this.expr?this:ge.create(E,this.negated)}evaluate(E){for(let A=0,Q=this.expr.length;A<Q;A++)if(!this.expr[A].evaluate(E))return!1;return!0}static _normalizeArr(E,A){const Q=[];let fe=!1;for(const $e of E)if($e){if($e.type===1){fe=!0;continue}if($e.type===0)return H.INSTANCE;if($e.type===6){Q.push(...$e.expr);continue}Q.push($e)}if(Q.length===0&&fe)return P.INSTANCE;if(Q.length!==0){if(Q.length===1)return Q[0];Q.sort(l);for(let $e=1;$e<Q.length;$e++)Q[$e-1].equals(Q[$e])&&(Q.splice($e,1),$e--);if(Q.length===1)return Q[0];for(;Q.length>1;){const $e=Q[Q.length-1];if($e.type!==9)break;Q.pop();const Ze=Q.pop(),it=Q.length===0,tt=ke.create($e.expr.map($t=>ge.create([$t,Ze],null)),null,it);tt&&(Q.push(tt),Q.sort(l))}return Q.length===1?Q[0]:new ge(Q,A)}}serialize(){return this.expr.map(E=>E.serialize()).join(" && ")}keys(){const E=[];for(let A of this.expr)E.push(...A.keys());return E}negate(){if(!this.negated){const E=[];for(let A of this.expr)E.push(A.negate());this.negated=ke.create(E,this,!0)}return this.negated}}class ke{constructor(E,A){this.expr=E,this.negated=A,this.type=9}static create(E,A,Q){return ke._normalizeArr(E,A,Q)}cmp(E){if(E.type!==this.type)return this.type-E.type;if(this.expr.length<E.expr.length)return-1;if(this.expr.length>E.expr.length)return 1;for(let A=0,Q=this.expr.length;A<Q;A++){const fe=l(this.expr[A],E.expr[A]);if(fe!==0)return fe}return 0}equals(E){if(E.type===this.type){if(this.expr.length!==E.expr.length)return!1;for(let A=0,Q=this.expr.length;A<Q;A++)if(!this.expr[A].equals(E.expr[A]))return!1;return!0}return!1}substituteConstants(){const E=ce(this.expr);return E===this.expr?this:ke.create(E,this.negated,!1)}evaluate(E){for(let A=0,Q=this.expr.length;A<Q;A++)if(this.expr[A].evaluate(E))return!0;return!1}static _normalizeArr(E,A,Q){let fe=[],$e=!1;if(E){for(let Ze=0,it=E.length;Ze<it;Ze++){const tt=E[Ze];if(tt){if(tt.type===0){$e=!0;continue}if(tt.type===1)return P.INSTANCE;if(tt.type===9){fe=fe.concat(tt.expr);continue}fe.push(tt)}}if(fe.length===0&&$e)return H.INSTANCE;fe.sort(l)}if(fe.length!==0){if(fe.length===1)return fe[0];for(let Ze=1;Ze<fe.length;Ze++)fe[Ze-1].equals(fe[Ze])&&(fe.splice(Ze,1),Ze--);if(fe.length===1)return fe[0];if(Q){for(let Ze=0;Ze<fe.length;Ze++)for(let it=Ze+1;it<fe.length;it++)q(fe[Ze],fe[it])&&(fe.splice(it,1),it--);if(fe.length===1)return fe[0]}return new ke(fe,A)}}serialize(){return this.expr.map(E=>E.serialize()).join(" || ")}keys(){const E=[];for(let A of this.expr)E.push(...A.keys());return E}negate(){if(!this.negated){let E=[];for(let A of this.expr)E.push(A.negate());for(;E.length>1;){const A=E.shift(),Q=E.shift(),fe=[];for(const Ze of ae(A))for(const it of ae(Q))fe.push(ge.create([Ze,it],null));const $e=E.length===0;E.unshift(ke.create(fe,null,$e))}this.negated=E[0]}return this.negated}}class ve extends x{constructor(E,A,Q){super(E,null),this._defaultValue=A,typeof Q=="object"?ve._info.push(Object.assign(Object.assign({},Q),{key:E})):Q!==!0&&ve._info.push({key:E,description:Q,type:A!=null?typeof A:void 0})}static all(){return ve._info.values()}bindTo(E){return E.createKey(this.key,this._defaultValue)}getValue(E){return E.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(E){return d.create(this.key,E)}}ve._info=[];const Ce=(0,Me.yh)("contextKeyService"),K="setContext";function F(Z,E){return Z<E?-1:Z>E?1:0}function $(Z,E,A,Q){return Z<A?-1:Z>A?1:E<Q?-1:E>Q?1:0}function q(Z,E){if(E.type===6&&Z.type!==9&&Z.type!==6){for(const fe of E.expr)if(Z.equals(fe))return!0}const A=Z.negate(),Q=ae(A).concat(ae(E));Q.sort(l);for(let fe=0;fe<Q.length;fe++){const Ze=Q[fe].negate();for(let it=fe+1;it<Q.length;it++){const tt=Q[it];if(Ze.equals(tt))return!0}}return!1}function ae(Z){return Z.type===9?Z.expr:[Z]}},16925:function(Ot,Xe,J){"use strict";J.d(Xe,{I8:function(){return te},TG:function(){return we},jt:function(){return Fe},yh:function(){return De}});var te;(function(de){de.serviceIds=new Map,de.DI_TARGET="$di$target",de.DI_DEPENDENCIES="$di$dependencies";function Se(xe){return xe[de.DI_DEPENDENCIES]||[]}de.getServiceDependencies=Se})(te||(te={}));const we=De("instantiationService");function Me(de,Se,xe,l){Se[te.DI_TARGET]===Se?Se[te.DI_DEPENDENCIES].push({id:de,index:xe,optional:l}):(Se[te.DI_DEPENDENCIES]=[{id:de,index:xe,optional:l}],Se[te.DI_TARGET]=Se)}function De(de){if(te.serviceIds.has(de))return te.serviceIds.get(de);const Se=function(xe,l,H){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");Me(Se,xe,H,!1)};return Se.toString=()=>de,te.serviceIds.set(de,Se),Se}function Fe(de){return function(Se,xe,l){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");Me(de,Se,l,!0)}}},44650:function(Ot,Xe,J){"use strict";J.d(Xe,{B:function(){return De}});var te=J(76068),we=J(72999);class Me{constructor(){this.data=new Map}add(de,Se){te.ok(we.HD(de)),te.ok(we.Kn(Se)),te.ok(!this.data.has(de),"There is already an extension with this id"),this.data.set(de,Se)}as(de){return this.data.get(de)||null}}const De=new Me},66213:function(Ot,Xe,J){"use strict";J.d(Xe,{e:function(){return te}});var te;(function(we){we.DARK="dark",we.LIGHT="light",we.HIGH_CONTRAST="hc"})(te||(te={}))},49055:function(Ot,Xe,J){"use strict";J.d(Xe,{EN:function(){return l},IP:function(){return x},Ic:function(){return v},XE:function(){return Se},bB:function(){return U},kS:function(){return H},m6:function(){return P}});var te=J(52615),we=J(4348),Me=J(69323),De=J(16925),Fe=J(44650),de=J(66213);const Se=(0,De.yh)("themeService");var xe;(function(W){function I(L){return L&&typeof L=="object"&&typeof L.id=="string"}W.isThemeColor=I})(xe||(xe={}));function l(W){return{id:W}}var H;(function(W){function I(pe){return pe&&typeof pe=="object"&&typeof pe.id=="string"&&(typeof pe.color=="undefined"||xe.isThemeColor(pe.color))}W.isThemeIcon=I;const L=new RegExp(`^\\$\\((${te.dT.iconNameExpression}(?:${te.dT.iconModifierExpression})?)\\)$`);function V(pe){const ce=L.exec(pe);if(!ce)return;let[,ge]=ce;return{id:ge}}W.fromString=V;function re(pe,ce){let ge=pe.id;const ke=ge.lastIndexOf("~");return ke!==-1&&(ge=ge.substring(0,ke)),ce&&(ge=`${ge}~${ce}`),{id:ge}}W.modify=re;function C(pe,ce){var ge,ke;return pe.id===ce.id&&((ge=pe.color)===null||ge===void 0?void 0:ge.id)===((ke=ce.color)===null||ke===void 0?void 0:ke.id)}W.isEqual=C;function _e(pe,ce){return{id:pe.id,color:ce?l(ce):void 0}}W.asThemeIcon=_e,W.asClassNameArray=te.dT.asClassNameArray,W.asClassName=te.dT.asClassName,W.asCSSSelector=te.dT.asCSSSelector})(H||(H={}));function P(W){switch(W){case de.e.DARK:return"vs-dark";case de.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const x={ThemingContribution:"base.contributions.theming"};class d{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new we.Q5}onColorThemeChange(I){return this.themingParticipants.push(I),this.onThemingParticipantAddedEmitter.fire(I),(0,Me.OF)(()=>{const L=this.themingParticipants.indexOf(I);this.themingParticipants.splice(L,1)})}getThemingParticipants(){return this.themingParticipants}}let y=new d;Fe.B.add(x.ThemingContribution,y);function v(W){return y.onColorThemeChange(W)}class U extends Me.JT{constructor(I){super(),this.themeService=I,this.theme=I.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(L=>this.onThemeChange(L)))}onThemeChange(I){this.theme=I,this.updateStyles()}updateStyles(){}}},29301:function(Ot,Xe,J){"use strict";J.d(Xe,{Z:function(){return K}});var te=J(96663),we=J(59301),Me=J(11592),De=J(48736),Fe=J(44127),de=J(20135),Se=J(76846),xe=J(8654),l=we.createContext(null);function H(F){var $=F.children,q=F.onBatchResize,ae=we.useRef(0),Z=we.useRef([]),E=we.useContext(l),A=we.useCallback(function(Q,fe,$e){ae.current+=1;var Ze=ae.current;Z.current.push({size:Q,element:fe,data:$e}),Promise.resolve().then(function(){Ze===ae.current&&(q==null||q(Z.current),Z.current=[])}),E==null||E(Q,fe,$e)},[q,E]);return we.createElement(l.Provider,{value:A},$)}var P=J(76374),x=new Map;function d(F){F.forEach(function($){var q,ae=$.target;(q=x.get(ae))===null||q===void 0||q.forEach(function(Z){return Z(ae)})})}var y=new P.Z(d),v=null,U=null;function W(F,$){x.has(F)||(x.set(F,new Set),y.observe(F)),x.get(F).add($)}function I(F,$){x.has(F)&&(x.get(F).delete($),x.get(F).size||(y.unobserve(F),x.delete(F)))}var L=J(52884),V=J(95727),re=J(65711),C=J(85745),_e=function(F){(0,re.Z)(q,F);var $=(0,C.Z)(q);function q(){return(0,L.Z)(this,q),$.apply(this,arguments)}return(0,V.Z)(q,[{key:"render",value:function(){return this.props.children}}]),q}(we.Component);function pe(F,$){var q=F.children,ae=F.disabled,Z=we.useRef(null),E=we.useRef(null),A=we.useContext(l),Q=typeof q=="function",fe=Q?q(Z):q,$e=we.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Ze=!Q&&we.isValidElement(fe)&&(0,xe.Yr)(fe),it=Ze?(0,xe.C4)(fe):null,tt=(0,xe.x1)(it,Z),$t=function(){var sr;return(0,Se.ZP)(Z.current)||(Z.current&&(0,de.Z)(Z.current)==="object"?(0,Se.ZP)((sr=Z.current)===null||sr===void 0?void 0:sr.nativeElement):null)||(0,Se.ZP)(E.current)};we.useImperativeHandle($,function(){return $t()});var ut=we.useRef(F);ut.current=F;var nt=we.useCallback(function(tr){var sr=ut.current,_r=sr.onResize,ar=sr.data,Yt=tr.getBoundingClientRect(),It=Yt.width,Te=Yt.height,qe=tr.offsetWidth,Ie=tr.offsetHeight,rt=Math.floor(It),st=Math.floor(Te);if($e.current.width!==rt||$e.current.height!==st||$e.current.offsetWidth!==qe||$e.current.offsetHeight!==Ie){var z={width:rt,height:st,offsetWidth:qe,offsetHeight:Ie};$e.current=z;var oe=qe===Math.round(It)?It:qe,Ae=Ie===Math.round(Te)?Te:Ie,ye=(0,Fe.Z)((0,Fe.Z)({},z),{},{offsetWidth:oe,offsetHeight:Ae});A==null||A(ye,tr,ar),_r&&Promise.resolve().then(function(){_r(ye,tr)})}},[]);return we.useEffect(function(){var tr=$t();return tr&&!ae&&W(tr,nt),function(){return I(tr,nt)}},[Z.current,ae]),we.createElement(_e,{ref:E},Ze?we.cloneElement(fe,{ref:tt}):fe)}var ce=we.forwardRef(pe),ge=ce,ke="rc-observer-key";function ve(F,$){var q=F.children,ae=typeof q=="function"?[q]:(0,Me.Z)(q);return ae.map(function(Z,E){var A=(Z==null?void 0:Z.key)||"".concat(ke,"-").concat(E);return we.createElement(ge,(0,te.Z)({},F,{key:A,ref:E===0?$:void 0}),Z)})}var Ce=we.forwardRef(ve);Ce.Collection=H;var K=Ce},55477:function(Ot,Xe,J){"use strict";J.d(Xe,{G:function(){return d},Z:function(){return W}});var te=J(96663),we=J(44127),Me=J(6620),De=J(35593),Fe=J(59301),de={shiftX:64,adjustY:1},Se={adjustX:1,shiftY:!0},xe=[0,0],l={left:{points:["cr","cl"],overflow:Se,offset:[-4,0],targetOffset:xe},right:{points:["cl","cr"],overflow:Se,offset:[4,0],targetOffset:xe},top:{points:["bc","tc"],overflow:de,offset:[0,-4],targetOffset:xe},bottom:{points:["tc","bc"],overflow:de,offset:[0,4],targetOffset:xe},topLeft:{points:["bl","tl"],overflow:de,offset:[0,-4],targetOffset:xe},leftTop:{points:["tr","tl"],overflow:Se,offset:[-4,0],targetOffset:xe},topRight:{points:["br","tr"],overflow:de,offset:[0,-4],targetOffset:xe},rightTop:{points:["tl","tr"],overflow:Se,offset:[4,0],targetOffset:xe},bottomRight:{points:["tr","br"],overflow:de,offset:[0,4],targetOffset:xe},rightBottom:{points:["bl","br"],overflow:Se,offset:[4,0],targetOffset:xe},bottomLeft:{points:["tl","bl"],overflow:de,offset:[0,4],targetOffset:xe},leftBottom:{points:["br","bl"],overflow:Se,offset:[-4,0],targetOffset:xe}},H=null,P=J(92310),x=J.n(P);function d(I){var L=I.children,V=I.prefixCls,re=I.id,C=I.overlayInnerStyle,_e=I.className,pe=I.style;return Fe.createElement("div",{className:x()("".concat(V,"-content"),_e),style:pe},Fe.createElement("div",{className:"".concat(V,"-inner"),id:re,role:"tooltip",style:C},typeof L=="function"?L():L))}var y=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"],v=function(L,V){var re=L.overlayClassName,C=L.trigger,_e=C===void 0?["hover"]:C,pe=L.mouseEnterDelay,ce=pe===void 0?0:pe,ge=L.mouseLeaveDelay,ke=ge===void 0?.1:ge,ve=L.overlayStyle,Ce=L.prefixCls,K=Ce===void 0?"rc-tooltip":Ce,F=L.children,$=L.onVisibleChange,q=L.afterVisibleChange,ae=L.transitionName,Z=L.animation,E=L.motion,A=L.placement,Q=A===void 0?"right":A,fe=L.align,$e=fe===void 0?{}:fe,Ze=L.destroyTooltipOnHide,it=Ze===void 0?!1:Ze,tt=L.defaultVisible,$t=L.getTooltipContainer,ut=L.overlayInnerStyle,nt=L.arrowContent,tr=L.overlay,sr=L.id,_r=L.showArrow,ar=_r===void 0?!0:_r,Yt=(0,Me.Z)(L,y),It=(0,Fe.useRef)(null);(0,Fe.useImperativeHandle)(V,function(){return It.current});var Te=(0,we.Z)({},Yt);"visible"in L&&(Te.popupVisible=L.visible);var qe=function(){return Fe.createElement(d,{key:"content",prefixCls:K,id:sr,overlayInnerStyle:ut},tr)};return Fe.createElement(De.Z,(0,te.Z)({popupClassName:re,prefixCls:K,popup:qe,action:_e,builtinPlacements:l,popupPlacement:Q,ref:It,popupAlign:$e,getPopupContainer:$t,onPopupVisibleChange:$,afterPopupVisibleChange:q,popupTransitionName:ae,popupAnimation:Z,popupMotion:E,defaultPopupVisible:tt,autoDestroy:it,mouseLeaveDelay:ke,popupStyle:ve,mouseEnterDelay:ce,arrow:ar},Te),F)},U=(0,Fe.forwardRef)(v),W=U},49658:function(Ot,Xe){"use strict";Xe.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var J=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(J)||/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(J==null?void 0:J.substr(0,4))}},83145:function(Ot,Xe,J){"use strict";Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.CopyToClipboard=void 0;var te=Me(J(59301)),we=Me(J(25769));function Me(L){return L&&L.__esModule?L:{default:L}}function De(L){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?De=function(re){return typeof re}:De=function(re){return re&&typeof Symbol=="function"&&re.constructor===Symbol&&re!==Symbol.prototype?"symbol":typeof re},De(L)}function Fe(L,V){var re=Object.keys(L);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(L);V&&(C=C.filter(function(_e){return Object.getOwnPropertyDescriptor(L,_e).enumerable})),re.push.apply(re,C)}return re}function de(L){for(var V=1;V<arguments.length;V++){var re=arguments[V]!=null?arguments[V]:{};V%2?Fe(re,!0).forEach(function(C){W(L,C,re[C])}):Object.getOwnPropertyDescriptors?Object.defineProperties(L,Object.getOwnPropertyDescriptors(re)):Fe(re).forEach(function(C){Object.defineProperty(L,C,Object.getOwnPropertyDescriptor(re,C))})}return L}function Se(L,V){if(L==null)return{};var re=xe(L,V),C,_e;if(Object.getOwnPropertySymbols){var pe=Object.getOwnPropertySymbols(L);for(_e=0;_e<pe.length;_e++)C=pe[_e],!(V.indexOf(C)>=0)&&Object.prototype.propertyIsEnumerable.call(L,C)&&(re[C]=L[C])}return re}function xe(L,V){if(L==null)return{};var re={},C=Object.keys(L),_e,pe;for(pe=0;pe<C.length;pe++)_e=C[pe],!(V.indexOf(_e)>=0)&&(re[_e]=L[_e]);return re}function l(L,V){if(!(L instanceof V))throw new TypeError("Cannot call a class as a function")}function H(L,V){for(var re=0;re<V.length;re++){var C=V[re];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(L,C.key,C)}}function P(L,V,re){return V&&H(L.prototype,V),re&&H(L,re),L}function x(L,V){return V&&(De(V)==="object"||typeof V=="function")?V:y(L)}function d(L){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(re){return re.__proto__||Object.getPrototypeOf(re)},d(L)}function y(L){if(L===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return L}function v(L,V){if(typeof V!="function"&&V!==null)throw new TypeError("Super expression must either be null or a function");L.prototype=Object.create(V&&V.prototype,{constructor:{value:L,writable:!0,configurable:!0}}),V&&U(L,V)}function U(L,V){return U=Object.setPrototypeOf||function(C,_e){return C.__proto__=_e,C},U(L,V)}function W(L,V,re){return V in L?Object.defineProperty(L,V,{value:re,enumerable:!0,configurable:!0,writable:!0}):L[V]=re,L}var I=function(L){v(V,L);function V(){var re,C;l(this,V);for(var _e=arguments.length,pe=new Array(_e),ce=0;ce<_e;ce++)pe[ce]=arguments[ce];return C=x(this,(re=d(V)).call.apply(re,[this].concat(pe))),W(y(C),"onClick",function(ge){var ke=C.props,ve=ke.text,Ce=ke.onCopy,K=ke.children,F=ke.options,$=te.default.Children.only(K),q=(0,we.default)(ve,F);Ce&&Ce(ve,q),$&&$.props&&typeof $.props.onClick=="function"&&$.props.onClick(ge)}),C}return P(V,[{key:"render",value:function(){var C=this.props,_e=C.text,pe=C.onCopy,ce=C.options,ge=C.children,ke=Se(C,["text","onCopy","options","children"]),ve=te.default.Children.only(ge);return te.default.cloneElement(ve,de({},ke,{onClick:this.onClick}))}}]),V}(te.default.PureComponent);Xe.CopyToClipboard=I,W(I,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(Ot,Xe,J){"use strict";var te=J(83145),we=te.CopyToClipboard;we.CopyToClipboard=we,Ot.exports=we},76374:function(Ot,Xe,J){"use strict";var te=function(){if(typeof Map!="undefined")return Map;function K(F,$){var q=-1;return F.some(function(ae,Z){return ae[0]===$?(q=Z,!0):!1}),q}return function(){function F(){this.__entries__=[]}return Object.defineProperty(F.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),F.prototype.get=function($){var q=K(this.__entries__,$),ae=this.__entries__[q];return ae&&ae[1]},F.prototype.set=function($,q){var ae=K(this.__entries__,$);~ae?this.__entries__[ae][1]=q:this.__entries__.push([$,q])},F.prototype.delete=function($){var q=this.__entries__,ae=K(q,$);~ae&&q.splice(ae,1)},F.prototype.has=function($){return!!~K(this.__entries__,$)},F.prototype.clear=function(){this.__entries__.splice(0)},F.prototype.forEach=function($,q){q===void 0&&(q=null);for(var ae=0,Z=this.__entries__;ae<Z.length;ae++){var E=Z[ae];$.call(q,E[1],E[0])}},F}()}(),we=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,Me=function(){return typeof J.g!="undefined"&&J.g.Math===Math?J.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),De=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Me):function(K){return setTimeout(function(){return K(Date.now())},1e3/60)}}(),Fe=2;function de(K,F){var $=!1,q=!1,ae=0;function Z(){$&&($=!1,K()),q&&A()}function E(){De(Z)}function A(){var Q=Date.now();if($){if(Q-ae<Fe)return;q=!0}else $=!0,q=!1,setTimeout(E,F);ae=Q}return A}var Se=20,xe=["top","right","bottom","left","width","height","size","weight"],l=typeof MutationObserver!="undefined",H=function(){function K(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=de(this.refresh.bind(this),Se)}return K.prototype.addObserver=function(F){~this.observers_.indexOf(F)||this.observers_.push(F),this.connected_||this.connect_()},K.prototype.removeObserver=function(F){var $=this.observers_,q=$.indexOf(F);~q&&$.splice(q,1),!$.length&&this.connected_&&this.disconnect_()},K.prototype.refresh=function(){var F=this.updateObservers_();F&&this.refresh()},K.prototype.updateObservers_=function(){var F=this.observers_.filter(function($){return $.gatherActive(),$.hasActive()});return F.forEach(function($){return $.broadcastActive()}),F.length>0},K.prototype.connect_=function(){!we||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)},K.prototype.disconnect_=function(){!we||!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)},K.prototype.onTransitionEnd_=function(F){var $=F.propertyName,q=$===void 0?"":$,ae=xe.some(function(Z){return!!~q.indexOf(Z)});ae&&this.refresh()},K.getInstance=function(){return this.instance_||(this.instance_=new K),this.instance_},K.instance_=null,K}(),P=function(K,F){for(var $=0,q=Object.keys(F);$<q.length;$++){var ae=q[$];Object.defineProperty(K,ae,{value:F[ae],enumerable:!1,writable:!1,configurable:!0})}return K},x=function(K){var F=K&&K.ownerDocument&&K.ownerDocument.defaultView;return F||Me},d=_e(0,0,0,0);function y(K){return parseFloat(K)||0}function v(K){for(var F=[],$=1;$<arguments.length;$++)F[$-1]=arguments[$];return F.reduce(function(q,ae){var Z=K["border-"+ae+"-width"];return q+y(Z)},0)}function U(K){for(var F=["top","right","bottom","left"],$={},q=0,ae=F;q<ae.length;q++){var Z=ae[q],E=K["padding-"+Z];$[Z]=y(E)}return $}function W(K){var F=K.getBBox();return _e(0,0,F.width,F.height)}function I(K){var F=K.clientWidth,$=K.clientHeight;if(!F&&!$)return d;var q=x(K).getComputedStyle(K),ae=U(q),Z=ae.left+ae.right,E=ae.top+ae.bottom,A=y(q.width),Q=y(q.height);if(q.boxSizing==="border-box"&&(Math.round(A+Z)!==F&&(A-=v(q,"left","right")+Z),Math.round(Q+E)!==$&&(Q-=v(q,"top","bottom")+E)),!V(K)){var fe=Math.round(A+Z)-F,$e=Math.round(Q+E)-$;Math.abs(fe)!==1&&(A-=fe),Math.abs($e)!==1&&(Q-=$e)}return _e(ae.left,ae.top,A,Q)}var L=function(){return typeof SVGGraphicsElement!="undefined"?function(K){return K instanceof x(K).SVGGraphicsElement}:function(K){return K instanceof x(K).SVGElement&&typeof K.getBBox=="function"}}();function V(K){return K===x(K).document.documentElement}function re(K){return we?L(K)?W(K):I(K):d}function C(K){var F=K.x,$=K.y,q=K.width,ae=K.height,Z=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,E=Object.create(Z.prototype);return P(E,{x:F,y:$,width:q,height:ae,top:$,right:F+q,bottom:ae+$,left:F}),E}function _e(K,F,$,q){return{x:K,y:F,width:$,height:q}}var pe=function(){function K(F){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=_e(0,0,0,0),this.target=F}return K.prototype.isActive=function(){var F=re(this.target);return this.contentRect_=F,F.width!==this.broadcastWidth||F.height!==this.broadcastHeight},K.prototype.broadcastRect=function(){var F=this.contentRect_;return this.broadcastWidth=F.width,this.broadcastHeight=F.height,F},K}(),ce=function(){function K(F,$){var q=C($);P(this,{target:F,contentRect:q})}return K}(),ge=function(){function K(F,$,q){if(this.activeObservations_=[],this.observations_=new te,typeof F!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=F,this.controller_=$,this.callbackCtx_=q}return K.prototype.observe=function(F){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(F instanceof x(F).Element))throw new TypeError('parameter 1 is not of type "Element".');var $=this.observations_;$.has(F)||($.set(F,new pe(F)),this.controller_.addObserver(this),this.controller_.refresh())}},K.prototype.unobserve=function(F){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(F instanceof x(F).Element))throw new TypeError('parameter 1 is not of type "Element".');var $=this.observations_;$.has(F)&&($.delete(F),$.size||this.controller_.removeObserver(this))}},K.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},K.prototype.gatherActive=function(){var F=this;this.clearActive(),this.observations_.forEach(function($){$.isActive()&&F.activeObservations_.push($)})},K.prototype.broadcastActive=function(){if(this.hasActive()){var F=this.callbackCtx_,$=this.activeObservations_.map(function(q){return new ce(q.target,q.broadcastRect())});this.callback_.call(F,$,F),this.clearActive()}},K.prototype.clearActive=function(){this.activeObservations_.splice(0)},K.prototype.hasActive=function(){return this.activeObservations_.length>0},K}(),ke=typeof WeakMap!="undefined"?new WeakMap:new te,ve=function(){function K(F){if(!(this instanceof K))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var $=H.getInstance(),q=new ge(F,$,this);ke.set(this,q)}return K}();["observe","unobserve","disconnect"].forEach(function(K){ve.prototype[K]=function(){var F;return(F=ke.get(this))[K].apply(F,arguments)}});var Ce=function(){return typeof Me.ResizeObserver!="undefined"?Me.ResizeObserver:ve}();Xe.Z=Ce},98040:function(Ot){Ot.exports=function(){var Xe=document.getSelection();if(!Xe.rangeCount)return function(){};for(var J=document.activeElement,te=[],we=0;we<Xe.rangeCount;we++)te.push(Xe.getRangeAt(we));switch(J.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":J.blur();break;default:J=null;break}return Xe.removeAllRanges(),function(){Xe.type==="Caret"&&Xe.removeAllRanges(),Xe.rangeCount||te.forEach(function(Me){Xe.addRange(Me)}),J&&J.focus()}}},1012:function(Ot,Xe,J){"use strict";J.d(Xe,{Z:function(){return x}});var te=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),we=new Uint8Array(16);function Me(){if(!te)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return te(we)}var De=/^(?:[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 Fe(d){return typeof d=="string"&&De.test(d)}for(var de=Fe,Se=[],xe=0;xe<256;++xe)Se.push((xe+256).toString(16).substr(1));function l(d){var y=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,v=(Se[d[y+0]]+Se[d[y+1]]+Se[d[y+2]]+Se[d[y+3]]+"-"+Se[d[y+4]]+Se[d[y+5]]+"-"+Se[d[y+6]]+Se[d[y+7]]+"-"+Se[d[y+8]]+Se[d[y+9]]+"-"+Se[d[y+10]]+Se[d[y+11]]+Se[d[y+12]]+Se[d[y+13]]+Se[d[y+14]]+Se[d[y+15]]).toLowerCase();if(!de(v))throw TypeError("Stringified UUID is invalid");return v}var H=l;function P(d,y,v){d=d||{};var U=d.random||(d.rng||Me)();if(U[6]=U[6]&15|64,U[8]=U[8]&63|128,y){v=v||0;for(var W=0;W<16;++W)y[v+W]=U[W];return y}return H(U)}var x=P},93314:function(Ot){"use strict";Ot.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(Ot,Xe,J){"use strict";J.d(Xe,{ZP:function(){return ls}});function te(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var we={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,g){if(g=g||{},f=f.trim(),m=m.trim(),!m){if(!g.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 k=u.parseURL(m);if(!k)throw new Error("Error trying to parse relative URL.");if(k.scheme)return g.alwaysNormalize?(k.path=u.normalizePath(k.path),u.buildURLFromParts(k)):m;var B=u.parseURL(f);if(!B)throw new Error("Error trying to parse base URL.");if(!B.netLoc&&B.path&&B.path[0]!=="/"){var M=n.exec(B.path);B.netLoc=M[1],B.path=M[2]}B.netLoc&&!B.path&&(B.path="/");var G={scheme:B.scheme,netLoc:k.netLoc,path:null,params:k.params,query:k.query,fragment:k.fragment};if(!k.netLoc&&(G.netLoc=B.netLoc,k.path[0]!=="/"))if(!k.path)G.path=B.path,k.params||(G.params=B.params,k.query||(G.query=B.query));else{var X=B.path,me=X.substring(0,X.lastIndexOf("/")+1)+k.path;G.path=u.normalizePath(me)}return G.path===null&&(G.path=g.alwaysNormalize?u.normalizePath(k.path):k.path),u.buildURLFromParts(G)},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})()})(we);var Me=we.exports;function De(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 Fe(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?De(Object(t),!0).forEach(function(r){xe(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):De(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}function de(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 Se(a){var e=de(a,"string");return typeof e=="symbol"?e:String(e)}function xe(a,e,t){return e=Se(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 H=Number.isFinite||function(a){return typeof a=="number"&&isFinite(a)},P=Number.isSafeInteger||function(a){return typeof a=="number"&&Math.abs(a)<=x},x=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}({}),y=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}({}),v=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 U=function(){},W={trace:U,debug:U,log:U,warn:U,info:U,error:U};let I=W;function L(a){const e=self.console[a];return e?e.bind(self.console,`[${a}] >`):U}function V(a,...e){e.forEach(function(t){I[t]=a[t]?a[t].bind(a):L(t)})}function re(a,e){if(typeof console=="object"&&a===!0||typeof a=="object"){V(a,"debug","log","info","warn","error");try{I.log(`Debug logs enabled for "${e}" in hls.js version 1.5.20`)}catch(t){I=W}}else I=W}const C=I,_e=/^(\d+)x(\d+)$/,pe=/(.+?)=(".*?"|.*?)(?:,|$)/g;class ce{constructor(e){typeof e=="string"&&(e=ce.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=_e.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(pe.lastIndex=0;(t=pe.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 ge(a){return a!=="ID"&&a!=="CLASS"&&a!=="START-DATE"&&a!=="DURATION"&&a!=="END-DATE"&&a!=="END-ON-NEXT"}function ke(a){return a==="SCTE35-OUT"||a==="SCTE35-IN"}class ve{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]){C.warn(`DATERANGE tag attribute: "${n}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=n;break}e=l(new ce({}),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"]);H(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(H(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&&H(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)}}class Ce{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 K={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class F{constructor(e){this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams={[K.AUDIO]:null,[K.VIDEO]:null,[K.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=Me.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}}class $ extends F{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 Ce,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||!H(this.programDateTime))return null;const e=H(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[K.AUDIO]=null,e[K.VIDEO]=null,e[K.AUDIOVIDEO]=null}}class q extends F{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 Ce,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 ae=10;class Z{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?H(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||ae}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 E(a){return Uint8Array.from(atob(a),e=>e.charCodeAt(0))}function A(a){const e=$e(a).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function Q(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 fe(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=E(s)):t=A(s)}}return t}function $e(a){return Uint8Array.from(unescape(encodeURIComponent(a)),e=>e.charCodeAt(0))}const Ze=typeof self!="undefined"?self:void 0;var it={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},tt={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function $t(a){switch(a){case tt.FAIRPLAY:return it.FAIRPLAY;case tt.PLAYREADY:return it.PLAYREADY;case tt.WIDEVINE:return it.WIDEVINE;case tt.CLEARKEY:return it.CLEARKEY}}var ut={CENC:"1077efecc0b24d02ace33c1e52e2fb4b",CLEARKEY:"e2719d58a985b3c9781ab030af78d30e",FAIRPLAY:"94ce86fb07ff4f43adb893d2fa968ca2",PLAYREADY:"9a04f07998404286ab92e65be0885f95",WIDEVINE:"edef8ba979d64acea3c827dcd51d21ed"};function nt(a){if(a===ut.WIDEVINE)return it.WIDEVINE;if(a===ut.PLAYREADY)return it.PLAYREADY;if(a===ut.CENC||a===ut.CLEARKEY)return it.CLEARKEY}function tr(a){switch(a){case it.FAIRPLAY:return tt.FAIRPLAY;case it.PLAYREADY:return tt.PLAYREADY;case it.WIDEVINE:return tt.WIDEVINE;case it.CLEARKEY:return tt.CLEARKEY}}function sr(a){const{drmSystems:e,widevineLicenseUrl:t}=a,r=e?[it.FAIRPLAY,it.WIDEVINE,it.PLAYREADY,it.CLEARKEY].filter(n=>!!e[n]):[];return!r[it.WIDEVINE]&&t&&r.push(it.WIDEVINE),r}const _r=function(a){return Ze!=null&&(a=Ze.navigator)!=null&&a.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function ar(a,e,t,r){let n;switch(a){case it.FAIRPLAY:n=["cenc","sinf"];break;case it.WIDEVINE:case it.PLAYREADY:n=["cenc"];break;case it.CLEARKEY:n=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${a}`)}return Yt(n,e,t,r)}function Yt(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 It(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=E(u).subarray(0,16);return Q(f),f}}return null}function Te(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,Ie=(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,rt=(a,e)=>{const t=e;let r=0;for(;qe(a,e);){r+=10;const n=st(a,e+6);r+=n,Ie(a,e+10)&&(r+=10),e+=r}if(r>0)return a.subarray(t,t+r)},st=(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},z=(a,e)=>qe(a,e)&&st(a,e+6)+10<=a.length-e,oe=a=>{const e=Pe(a);for(let t=0;t<e.length;t++){const r=e[t];if(Ae(r))return Ke(r)}},Ae=a=>a&&a.key==="PRIV"&&a.info==="com.apple.streaming.transportStreamTimestamp",ye=a=>{const e=String.fromCharCode(a[0],a[1],a[2],a[3]),t=st(a,4),r=10;return{type:e,size:t,data:a.subarray(r,r+t)}},Pe=a=>{let e=0;const t=[];for(;qe(a,e);){const r=st(a,e+6);e+=10;const n=e+r;for(;e+8<n;){const i=ye(a.subarray(e)),s=ze(i);s&&t.push(s),e+=i.size+10}Ie(a,e)&&(e+=10)}return t},ze=a=>a.type==="PRIV"?Ve(a):a.type[0]==="W"?je(a):Je(a),Ve=a=>{if(a.size<2)return;const e=_t(a.data,!0),t=new Uint8Array(a.data.subarray(e.length+1));return{key:a.type,info:e,data:t.buffer}},Je=a=>{if(a.size<2)return;if(a.type==="TXXX"){let t=1;const r=_t(a.data.subarray(t),!0);t+=r.length+1;const n=_t(a.data.subarray(t));return{key:a.type,info:r,data:n}}const e=_t(a.data.subarray(1));return{key:a.type,data:e}},je=a=>{if(a.type==="WXXX"){if(a.size<2)return;let t=1;const r=_t(a.data.subarray(t),!0);t+=r.length+1;const n=_t(a.data.subarray(t));return{key:a.type,info:r,data:n}}const e=_t(a.data);return{key:a.type,data:e}},Ke=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)}},_t=(a,e=!1)=>{const t=ht();if(t){const m=t.decode(a);if(e){const g=m.indexOf("\0");return g!==-1?m.substring(0,g):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 xt;function ht(){if(!navigator.userAgent.includes("PlayStation 4"))return!xt&&typeof self.TextDecoder!="undefined"&&(xt=new self.TextDecoder("utf-8")),xt}const gt={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}},Et=Math.pow(2,32)-1,pt=[].push,kt={video:1,audio:2,id3:3,text:4};function wt(a){return String.fromCharCode.apply(null,a)}function _(a,e){const t=a[e]<<8|a[e+1];return t<0?65536+t:t}function T(a,e){const t=O(a,e);return t<0?4294967296+t:t}function We(a,e){let t=T(a,e);return t*=Math.pow(2,32),t+=T(a,e+4),t}function O(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 Kt(a){const e=a.byteLength;for(let t=0;t<e;){const r=T(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 ue(a,e){const t=[];if(!e.length)return t;const r=a.byteLength;for(let n=0;n<r;){const i=T(a,n),s=wt(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=ue(a.subarray(n+8,u),e.slice(1));f.length&&pt.apply(t,f)}n=u}return t}function Ee(a){const e=[],t=a[0];let r=8;const n=T(a,r);r+=4;let i=0,s=0;t===0?(i=T(a,r),s=T(a,r+4),r+=8):(i=We(a,r),s=We(a,r+8),r+=16),r+=2;let u=a.length+s;const f=_(a,r);r+=2;for(let m=0;m<f;m++){let g=r;const b=T(a,g);g+=4;const k=b&2147483647;if((b&2147483648)>>>31===1)return C.warn("SIDX has hierarchical references (not supported)"),null;const M=T(a,g);g+=4,e.push({referenceSize:k,subsegmentDuration:M,info:{duration:M/n,start:u,end:u+k-1}}),u+=k,g+=4,r=g}return{earliestPresentationTime:i,timescale:n,version:t,referencesCount:f,references:e}}function Oe(a){const e=[],t=ue(a,["moov","trak"]);for(let n=0;n<t.length;n++){const i=t[n],s=ue(i,["tkhd"])[0];if(s){let u=s[0];const f=T(s,u===0?12:20),m=ue(i,["mdia","mdhd"])[0];if(m){u=m[0];const g=T(m,u===0?12:20),b=ue(i,["mdia","hdlr"])[0];if(b){const k=wt(b.subarray(8,12)),B={soun:K.AUDIO,vide:K.VIDEO}[k];if(B){const M=ue(i,["mdia","minf","stbl","stsd"])[0],G=N(M);e[f]={timescale:g,type:B},e[B]=Fe({timescale:g,id:f},G)}}}}}return ue(a,["moov","mvex","trex"]).forEach(n=>{const i=T(n,4),s=e[i];s&&(s.default={duration:T(n,12),flags:T(n,20)})}),e}function N(a){const e=a.subarray(8),t=e.subarray(86),r=wt(e.subarray(4,8));let n=r;const i=r==="enca"||r==="encv";if(i){const u=ue(e,[r])[0].subarray(r==="enca"?28:78);ue(u,["sinf"]).forEach(m=>{const g=ue(m,["schm"])[0];if(g){const b=wt(g.subarray(4,8));if(b==="cbcs"||b==="cenc"){const k=ue(m,["frma"])[0];k&&(n=wt(k))}}})}switch(n){case"avc1":case"avc2":case"avc3":case"avc4":{const s=ue(t,["avcC"])[0];n+="."+le(s[1])+le(s[2])+le(s[3]);break}case"mp4a":{const s=ue(e,[r])[0],u=ue(s.subarray(28),["esds"])[0];if(u&&u.length>12){let f=4;if(u[f++]!==3)break;f=Y(u,f),f+=2;const m=u[f++];if(m&128&&(f+=2),m&64&&(f+=u[f++]),u[f++]!==4)break;f=Y(u,f);const g=u[f++];if(g===64)n+="."+le(g);else break;if(f+=12,u[f++]!==5)break;f=Y(u,f);const b=u[f++];let k=(b&248)>>3;k===31&&(k+=1+((b&7)<<3)+((u[f]&224)>>5)),n+="."+k}break}case"hvc1":case"hev1":{const s=ue(t,["hvcC"])[0],u=s[1],f=["","A","B","C"][u>>6],m=u&31,g=T(s,2),b=(u&32)>>5?"H":"L",k=s[12],B=s.subarray(6,12);n+="."+f+m,n+="."+g.toString(16).toUpperCase(),n+="."+b+k;let M="";for(let G=B.length;G--;){const X=B[G];(X||M)&&(M="."+X.toString(16).toUpperCase()+M)}n+=M;break}case"dvh1":case"dvhe":{const s=ue(t,["dvcC"])[0],u=s[2]>>1&127,f=s[2]<<5&32|s[3]>>3&31;n+="."+be(u)+"."+be(f);break}case"vp09":{const s=ue(t,["vpcC"])[0],u=s[4],f=s[5],m=s[6]>>4&15;n+="."+be(u)+"."+be(f)+"."+be(m);break}case"av01":{const s=ue(t,["av1C"])[0],u=s[1]>>>5,f=s[1]&31,m=s[2]>>>7?"H":"M",g=(s[2]&64)>>6,b=(s[2]&32)>>5,k=u===2&&g?b?12:10:g?10:8,B=(s[2]&16)>>4,M=(s[2]&8)>>3,G=(s[2]&4)>>2,X=s[2]&3;n+="."+u+"."+be(f)+m+"."+be(k)+"."+B+"."+M+G+X+"."+be(1)+"."+be(1)+"."+be(1)+"."+0;break}}return{codec:n,encrypted:i}}function Y(a,e){const t=e+5;for(;a[e++]&128&&e<t;);return e}function le(a){return("0"+a.toString(16).toUpperCase()).slice(-2)}function be(a){return(a<10?"0":"")+a}function R(a,e){if(!a||!e)return a;const t=e.keyId;return t&&e.isCommonEncryption&&ue(a,["moov","trak"]).forEach(n=>{const s=ue(n,["mdia","minf","stbl","stsd"])[0].subarray(8);let u=ue(s,["enca"]);const f=u.length>0;f||(u=ue(s,["encv"])),u.forEach(m=>{const g=f?m.subarray(28):m.subarray(78);ue(g,["sinf"]).forEach(k=>{const B=ft(k);if(B){const M=B.subarray(8,24);M.some(G=>G!==0)||(C.log(`[eme] Patching keyId in 'enc${f?"a":"v"}>sinf>>tenc' box: ${gt.hexDump(M)} -> ${gt.hexDump(t)}`),B.set(t,8))}})})}),a}function ft(a){const e=ue(a,["schm"])[0];if(e){const t=wt(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return ue(a,["schi","tenc"])[0]}return null}function se(a,e){return ue(e,["moof","traf"]).reduce((t,r)=>{const n=ue(r,["tfdt"])[0],i=n[0],s=ue(r,["tfhd"]).reduce((u,f)=>{const m=T(f,4),g=a[m];if(g){let b=T(n,4);if(i===1){if(b===Et)return C.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),u;b*=Et+1,b+=T(n,8)}const k=g.timescale||9e4,B=b/k;if(H(B)&&(u===null||B<u))return B}return u},null);return s!==null&&H(s)&&(t===null||s<t)?s:t},null)}function Tt(a,e){let t=0,r=0,n=0;const i=ue(a,["moof","traf"]);for(let s=0;s<i.length;s++){const u=i[s],f=ue(u,["tfhd"])[0],m=T(f,4),g=e[m];if(!g)continue;const b=g.default,k=T(f,0)|(b==null?void 0:b.flags);let B=b==null?void 0:b.duration;k&8&&(k&2?B=T(f,12):B=T(f,8));const M=g.timescale||9e4,G=ue(u,["trun"]);for(let X=0;X<G.length;X++){if(t=Ct(G[X]),!t&&B){const me=T(G[X],4);t=B*me}g.type===K.VIDEO?r+=t/M:g.type===K.AUDIO&&(n+=t/M)}}if(r===0&&n===0){let s=1/0,u=0,f=0;const m=ue(a,["sidx"]);for(let g=0;g<m.length;g++){const b=Ee(m[g]);if(b!=null&&b.references){s=Math.min(s,b.earliestPresentationTime/b.timescale);const k=b.references.reduce((B,M)=>B+M.info.duration||0,0);u=Math.max(u,k+b.earliestPresentationTime/b.timescale),f=u-s}}if(f&&H(f))return f}return r||n}function Ct(a){const e=T(a,0);let t=8;e&1&&(t+=4),e&4&&(t+=4);let r=0;const n=T(a,4);for(let i=0;i<n;i++){if(e&256){const s=T(a,t);r+=s,t+=4}e&512&&(t+=4),e&1024&&(t+=4),e&2048&&(t+=4)}return r}function Nt(a,e,t){ue(e,["moof","traf"]).forEach(r=>{ue(r,["tfhd"]).forEach(n=>{const i=T(n,4),s=a[i];if(!s)return;const u=s.timescale||9e4;ue(r,["tfdt"]).forEach(f=>{const m=f[0],g=t*u;if(g){let b=T(f,4);if(m===0)b-=g,b=Math.max(b,0),ne(f,4,b);else{b*=Math.pow(2,32),b+=T(f,8),b-=g,b=Math.max(b,0);const k=Math.floor(b/(Et+1)),B=Math.floor(b%(Et+1));ne(f,4,k),ne(f,8,B)}}})})})}function br(a){const e={valid:null,remainder:null},t=ue(a,["moof"]);if(t.length<2)return e.remainder=a,e;const r=t[t.length-1];return e.valid=Te(a,0,r.byteOffset-8),e.remainder=Te(a,r.byteOffset-8),e}function Ht(a,e){const t=new Uint8Array(a.length+e.length);return t.set(a),t.set(e,a.length),t}function Mt(a,e){const t=[],r=e.samples,n=e.timescale,i=e.id;let s=!1;return ue(r,["moof"]).map(f=>{const m=f.byteOffset-8;ue(f,["traf"]).map(b=>{const k=ue(b,["tfdt"]).map(B=>{const M=B[0];let G=T(B,4);return M===1&&(G*=Math.pow(2,32),G+=T(B,8)),G/n})[0];return k!==void 0&&(a=k),ue(b,["tfhd"]).map(B=>{const M=T(B,4),G=T(B,0)&16777215,X=(G&1)!==0,me=(G&2)!==0,Ne=(G&8)!==0;let Be=0;const et=(G&16)!==0;let Ge=0;const ct=(G&32)!==0;let Qe=8;M===i&&(X&&(Qe+=8),me&&(Qe+=4),Ne&&(Be=T(B,Qe),Qe+=4),et&&(Ge=T(B,Qe),Qe+=4),ct&&(Qe+=4),e.type==="video"&&(s=Tr(e.codec)),ue(b,["trun"]).map(vt=>{const Rt=vt[0],ot=T(vt,0)&16777215,yt=(ot&1)!==0;let nr=0;const Ft=(ot&4)!==0,rr=(ot&256)!==0;let er=0;const Vt=(ot&512)!==0;let Er=0;const Ur=(ot&1024)!==0,Gt=(ot&2048)!==0;let Bt=0;const kr=T(vt,4);let dr=8;yt&&(nr=T(vt,dr),dr+=4),Ft&&(dr+=4);let Fr=nr+m;for(let un=0;un<kr;un++){if(rr?(er=T(vt,dr),dr+=4):er=Be,Vt?(Er=T(vt,dr),dr+=4):Er=Ge,Ur&&(dr+=4),Gt&&(Rt===0?Bt=T(vt,dr):Bt=O(vt,dr),dr+=4),e.type===K.VIDEO){let xn=0;for(;xn<Er;){const Sn=T(r,Fr);if(Fr+=4,Br(s,r[Fr])){const si=r.subarray(Fr,Fr+Sn);Gr(si,s?2:1,a+Bt/n,t)}Fr+=Sn,xn+=Sn+4}}a+=er/n}}))})})}),t}function Tr(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 Br(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 g=i;if(u<m)i+=u;else if(u>m){C.error(`Malformed SEI payload. ${u} is too small, only ${m} bytes left to parse.`);break}if(s===4){if(n[g++]===181){const k=_(n,g);if(g+=2,k===49){const B=T(n,g);if(g+=4,B===1195456820){const M=n[g++];if(M===3){const G=n[g++],X=31&G,me=64&G,Ne=me?2+X*3:0,Be=new Uint8Array(Ne);if(me){Be[0]=G;for(let et=1;et<Ne;et++)Be[et]=n[g++]}r.push({type:M,payloadType:s,pts:t,bytes:Be})}}}}}else if(s===5&&u>16){const b=[];for(let M=0;M<16;M++){const G=n[g++].toString(16);b.push(G.length==1?"0"+G:G),(M===3||M===5||M===7||M===9)&&b.push("-")}const k=u-16,B=new Uint8Array(k);for(let M=0;M<k;M++)B[M]=n[g++];r.push({payloadType:s,pts:t,uuid:b.join(""),userData:_t(B),userDataBytes:B})}}}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 At(a){const e=a[0];let t="",r="",n=0,i=0,s=0,u=0,f=0,m=0;if(e===0){for(;wt(a.subarray(m,m+1))!=="\0";)t+=wt(a.subarray(m,m+1)),m+=1;for(t+=wt(a.subarray(m,m+1)),m+=1;wt(a.subarray(m,m+1))!=="\0";)r+=wt(a.subarray(m,m+1)),m+=1;r+=wt(a.subarray(m,m+1)),m+=1,n=T(a,12),i=T(a,16),u=T(a,20),f=T(a,24),m=28}else if(e===1){m+=4,n=T(a,m),m+=4;const b=T(a,m);m+=4;const k=T(a,m);for(m+=4,s=qo(2,32)*b+k,P(s)||(s=Number.MAX_SAFE_INTEGER,C.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),u=T(a,m),m+=4,f=T(a,m),m+=4;wt(a.subarray(m,m+1))!=="\0";)t+=wt(a.subarray(m,m+1)),m+=1;for(t+=wt(a.subarray(m,m+1)),m+=1;wt(a.subarray(m,m+1))!=="\0";)r+=wt(a.subarray(m,m+1)),m+=1;r+=wt(a.subarray(m,m+1)),m+=1}const g=a.subarray(m,a.byteLength);return{schemeIdUri:t,value:r,timeScale:n,presentationTime:s,presentationTimeDelta:i,eventDuration:u,id:f,payload:g}}function Wt(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 pr(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),Wt([112,115,115,104],new Uint8Array([r,0,0,0]),a,i,n,s,t||new Uint8Array)}function Kr(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=Ir(n);e.push(i),r+=i.size}}return e}function Ir(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=gt.hexDump(new Uint8Array(s,t+12,16)),f=a.getUint32(28);let m=null,g=null;if(i===0){if(e-32<f||f<22)return{offset:t,size:e};g=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:g,offset:t,size:e}}let tn={};class or{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 tt.FAIRPLAY:case tt.WIDEVINE:case tt.PLAYREADY:case tt.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&&C.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const r=wn(e);return new or(this.method,this.uri,"identity",this.keyFormatVersions,r)}const t=fe(this.uri);if(t)switch(this.keyFormat){case tt.WIDEVINE:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case tt.PLAYREADY:{const r=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=pr(r,null,t),this.keyId=It(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 Pt(a){return rn.test(a)}function bt(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 xr(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 gr(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 jr(a=!0){return typeof self=="undefined"?void 0:(a||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function Fn(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 Ar(a,e){const t=Vr[e];return!!t&&!!t[a.slice(0,4)]}function Or(a,e,t=!0){return!a.split(",").some(r=>!cr(r,e,t))}function cr(a,e,t=!0){var r;const n=jr(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 Hr(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 Qt={};function lr(a,e=!0){if(Qt[a])return Qt[a];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"]}[a];for(let r=0;r<t.length;r++)if(cr(t[r],"audio",e))return Qt[a]=t[r],t[r];return a}const Sr=/flac|opus/i;function Cr(a,e=!0){return a.replace(Sr,t=>lr(t.toLowerCase(),e))}function wr(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,hr=/^#EXT(?:INF|-X-TARGETDURATION):/m,mr=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 Qr{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 Me.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return hr.test(e)}static parseMasterPlaylist(e,t){const r=Pt(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 ce(s[1]);bt(n,m,["CODECS","SUPPLEMENTAL-CODECS","ALLOWED-CPC","PATHWAY-ID","STABLE-VARIANT-ID","AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS","NAME"]);const g=qt(n,s[2]),b={attrs:m,bitrate:m.decimalInteger("BANDWIDTH")||m.decimalInteger("AVERAGE-BANDWIDTH"),name:m.NAME,url:Qr.resolve(g,t)},k=m.decimalResolution("RESOLUTION");k&&(b.width=k.width,b.height=k.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],g=s[4];switch(m){case"SESSION-DATA":{const b=new ce(g);bt(n,b,["DATA-ID","LANGUAGE","VALUE","URI"]);const k=b["DATA-ID"];k&&(n.sessionData===null&&(n.sessionData={}),n.sessionData[k]=b);break}case"SESSION-KEY":{const b=Hn(g,t,n);b.encrypted&&b.isSupported()?(n.sessionKeys===null&&(n.sessionKeys=[]),n.sessionKeys.push(b)):C.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${g}"`);break}case"DEFINE":{{const b=new ce(g);bt(n,b,["NAME","VALUE","QUERYPARAM"]),xr(n,b,t)}break}case"CONTENT-STEERING":{const b=new ce(g);bt(n,b,["SERVER-URI","PATHWAY-ID"]),n.contentSteering={uri:Qr.resolve(b["SERVER-URI"],t),pathwayId:b["PATHWAY-ID"]||"."};break}case"START":{n.startTimeOffset=bi(g);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 ce(n[1]),g=m.TYPE;if(g){const b=u[g],k=i[g]||[];i[g]=k,bt(r,m,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);const B=m.LANGUAGE,M=m["ASSOC-LANGUAGE"],G=m.CHANNELS,X=m.CHARACTERISTICS,me=m["INSTREAM-ID"],Ne={attrs:m,bitrate:0,id:f++,groupId:m["GROUP-ID"]||"",name:m.NAME||B||"",type:g,default:m.bool("DEFAULT"),autoselect:m.bool("AUTOSELECT"),forced:m.bool("FORCED"),lang:B,url:m.URI?Qr.resolve(m.URI,t):""};if(M&&(Ne.assocLang=M),G&&(Ne.channels=G),X&&(Ne.characteristics=X),me&&(Ne.instreamId=me),b!=null&&b.length){const Be=Qr.findGroup(b,Ne.groupId)||b[0];xi(Ne,Be,"audioCodec"),xi(Ne,Be,"textCodec")}k.push(Ne)}}return i}static parseLevelPlaylist(e,t,r,n,i,s){const u=new Z(t),f=u.fragments;let m=null,g=0,b=0,k=0,B=0,M=null,G=new $(n,t),X,me,Ne,Be=-1,et=!1,Ge=null;for(mr.lastIndex=0,u.m3u8=e,u.hasVariableRefs=Pt(e);(X=mr.exec(e))!==null;){et&&(et=!1,G=new $(n,t),G.start=k,G.sn=g,G.cc=B,G.level=r,m&&(G.initSegment=m,G.rawProgramDateTime=m.rawProgramDateTime,m.rawProgramDateTime=null,Ge&&(G.setByteRange(Ge),Ge=null)));const Rt=X[1];if(Rt){G.duration=parseFloat(Rt);const ot=(" "+X[2]).slice(1);G.title=ot||null,G.tagList.push(ot?["INF",Rt,ot]:["INF",Rt])}else if(X[3]){if(H(G.duration)){G.start=k,Ne&&Jn(G,Ne,u),G.sn=g,G.level=r,G.cc=B,f.push(G);const ot=(" "+X[3]).slice(1);G.relurl=qt(u,ot),ai(G,M),M=G,k+=G.duration,g++,b=0,et=!0}}else if(X[4]){const ot=(" "+X[4]).slice(1);M?G.setByteRange(ot,M):G.setByteRange(ot)}else if(X[5])G.rawProgramDateTime=(" "+X[5]).slice(1),G.tagList.push(["PROGRAM-DATE-TIME",G.rawProgramDateTime]),Be===-1&&(Be=f.length);else{if(X=X[0].match(Bn),!X){C.warn("No matches on slow regex match for level playlist!");continue}for(me=1;me<X.length&&typeof X[me]=="undefined";me++);const ot=(" "+X[me]).slice(1),yt=(" "+X[me+1]).slice(1),nr=X[me+2]?(" "+X[me+2]).slice(1):"";switch(ot){case"PLAYLIST-TYPE":u.type=yt.toUpperCase();break;case"MEDIA-SEQUENCE":g=u.startSN=parseInt(yt);break;case"SKIP":{const Ft=new ce(yt);bt(u,Ft,["RECENTLY-REMOVED-DATERANGES"]);const rr=Ft.decimalInteger("SKIPPED-SEGMENTS");if(H(rr)){u.skippedSegments=rr;for(let Vt=rr;Vt--;)f.unshift(null);g+=rr}const er=Ft.enumeratedString("RECENTLY-REMOVED-DATERANGES");er&&(u.recentlyRemovedDateranges=er.split(" "));break}case"TARGETDURATION":u.targetduration=Math.max(parseInt(yt),1);break;case"VERSION":u.version=parseInt(yt);break;case"INDEPENDENT-SEGMENTS":case"EXTM3U":break;case"ENDLIST":u.live=!1;break;case"#":(yt||nr)&&G.tagList.push(nr?[yt,nr]:[yt]);break;case"DISCONTINUITY":B++,G.tagList.push(["DIS"]);break;case"GAP":G.gap=!0,G.tagList.push([ot]);break;case"BITRATE":G.tagList.push([ot,yt]);break;case"DATERANGE":{const Ft=new ce(yt);bt(u,Ft,["ID","CLASS","START-DATE","END-DATE","SCTE35-CMD","SCTE35-OUT","SCTE35-IN"]),bt(u,Ft,Ft.clientAttrs);const rr=new ve(Ft,u.dateRanges[Ft.ID]);rr.isValid||u.skippedSegments?u.dateRanges[rr.id]=rr:C.warn(`Ignoring invalid DATERANGE tag: "${yt}"`),G.tagList.push(["EXT-X-DATERANGE",yt]);break}case"DEFINE":{{const Ft=new ce(yt);bt(u,Ft,["NAME","VALUE","IMPORT","QUERYPARAM"]),"IMPORT"in Ft?gr(u,Ft,s):xr(u,Ft,t)}break}case"DISCONTINUITY-SEQUENCE":B=parseInt(yt);break;case"KEY":{const Ft=Hn(yt,t,u);if(Ft.isSupported()){if(Ft.method==="NONE"){Ne=void 0;break}Ne||(Ne={}),Ne[Ft.keyFormat]&&(Ne=l({},Ne)),Ne[Ft.keyFormat]=Ft}else C.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${yt}"`);break}case"START":u.startTimeOffset=bi(yt);break;case"MAP":{const Ft=new ce(yt);if(bt(u,Ft,["BYTERANGE","URI"]),G.duration){const rr=new $(n,t);wi(rr,Ft,r,Ne),m=rr,G.initSegment=m,m.rawProgramDateTime&&!G.rawProgramDateTime&&(G.rawProgramDateTime=m.rawProgramDateTime)}else{const rr=G.byteRangeEndOffset;if(rr){const er=G.byteRangeStartOffset;Ge=`${rr-er}@${er}`}else Ge=null;wi(G,Ft,r,Ne),m=G,et=!0}break}case"SERVER-CONTROL":{const Ft=new ce(yt);u.canBlockReload=Ft.bool("CAN-BLOCK-RELOAD"),u.canSkipUntil=Ft.optionalFloat("CAN-SKIP-UNTIL",0),u.canSkipDateRanges=u.canSkipUntil>0&&Ft.bool("CAN-SKIP-DATERANGES"),u.partHoldBack=Ft.optionalFloat("PART-HOLD-BACK",0),u.holdBack=Ft.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{const Ft=new ce(yt);u.partTarget=Ft.decimalFloatingPoint("PART-TARGET");break}case"PART":{let Ft=u.partList;Ft||(Ft=u.partList=[]);const rr=b>0?Ft[Ft.length-1]:void 0,er=b++,Vt=new ce(yt);bt(u,Vt,["BYTERANGE","URI"]);const Er=new q(Vt,G,t,er,rr);Ft.push(Er),G.duration+=Er.duration;break}case"PRELOAD-HINT":{const Ft=new ce(yt);bt(u,Ft,["URI"]),u.preloadHint=Ft;break}case"RENDITION-REPORT":{const Ft=new ce(yt);bt(u,Ft,["URI"]),u.renditionReports=u.renditionReports||[],u.renditionReports.push(Ft);break}default:C.warn(`line parsed but not handled: ${X}`);break}}}M&&!M.relurl?(f.pop(),k-=M.duration,u.partList&&(u.fragmentHint=M)):u.partList&&(ai(G,M),G.cc=B,u.fragmentHint=G,Ne&&Jn(G,Ne,u));const ct=f.length,Qe=f[0],vt=f[ct-1];if(k+=u.skippedSegments*u.targetduration,k>0&&ct&&vt){u.averagetargetduration=k/ct;const Rt=vt.sn;u.endSN=Rt!=="initSegment"?Rt:0,u.live||(vt.endList=!0),Qe&&(u.startCC=Qe.cc)}else u.endSN=0,u.startCC=0;return u.fragmentHint&&(k+=u.fragmentHint.duration),u.totalduration=k,u.endCC=B,Be>0&&dn(f,Be),u}}function Hn(a,e,t){var r,n;const i=new ce(a);bt(t,i,["KEYFORMAT","KEYFORMATVERSIONS","URI","IV","URI"]);const s=(r=i.METHOD)!=null?r:"",u=i.URI,f=i.hexadecimalInteger("IV"),m=i.KEYFORMATVERSIONS,g=(n=i.KEYFORMAT)!=null?n:"identity";u&&i.IV&&!f&&C.error(`Invalid IV: ${i.IV}`);const b=u?Qr.resolve(u,e):"",k=(m||"1").split("/").map(Number).filter(Number.isFinite);return new or(s,b,g,k,f)}function bi(a){const t=new ce(a).decimalFloatingPoint("TIME-OFFSET");return H(t)?t:null}function Ci(a,e){let t=(a||"").split(/[ ,]+/).filter(r=>r);["video","audio","text"].forEach(r=>{const n=t.filter(i=>Ar(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),H(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 Jn(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 ir={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},Le={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};function jt(a){const{type:e}=a;switch(e){case ir.AUDIO_TRACK:return Le.AUDIO;case ir.SUBTITLE_TRACK:return Le.SUBTITLE;default:return Le.MAIN}}function Pr(a,e){let t=a.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class Wn{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:ir.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:ir.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:ir.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:ir.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){C.trace("[playlist-loader]: playlist request ongoing");return}C.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),n.abort()}let i;if(e.type===ir.MANIFEST?i=r.manifestLoadPolicy.default:i=l({},r.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),n=this.createInternalLoader(e),H((t=e.deliveryDirectives)==null?void 0:t.part)){let m;if(e.type===ir.LEVEL&&e.level!==null?m=this.hls.levels[e.level].details:e.type===ir.AUDIO_TRACK&&e.id!==null?m=this.hls.audioTracks[e.id].details:e.type===ir.SUBTITLE_TRACK&&e.id!==null&&(m=this.hls.subtitleTracks[e.id].details),m){const g=m.partTarget,b=m.targetduration;if(g&&b){const k=Math.max(g*3,b*.8)*1e3;i=l({},i,{maxTimeToFirstByteMs:Math.min(k,i.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(k,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,g,b,k)=>{const B=this.getInternalLoader(b);this.resetInternalLoader(b.type);const M=m.data;if(M.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(m,b,new Error("no EXTM3U delimiter"),k||null,g);return}g.parsing.start=performance.now(),Qr.isMediaPlaylist(M)?this.handleTrackOrLevelPlaylist(m,g,b,k||null,B):this.handleMasterPlaylist(m,g,b,k)},onError:(m,g,b,k)=>{this.handleNetworkError(g,b,!1,m,k)},onTimeout:(m,g,b)=>{this.handleNetworkError(g,b,!0,void 0,m)}};n.load(e,u,f)}handleMasterPlaylist(e,t,r,n){const i=this.hls,s=e.data,u=Pr(e,r),f=Qr.parseMasterPlaylist(s,u);if(f.playlistParsingError){this.handleManifestParsingError(e,r,f.playlistParsingError,n,t);return}const{contentSteering:m,levels:g,sessionData:b,sessionKeys:k,startTimeOffset:B,variableList:M}=f;this.variableList=M;const{AUDIO:G=[],SUBTITLES:X,"CLOSED-CAPTIONS":me}=Qr.parseMasterPlaylistMedia(s,u,f);G.length&&!G.some(Be=>!Be.url)&&g[0].audioCodec&&!g[0].attrs.AUDIO&&(C.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),G.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new ce({}),bitrate:0,url:""})),i.trigger(d.MANIFEST_LOADED,{levels:g,audioTracks:G,subtitles:X,captions:me,contentSteering:m,url:u,stats:t,networkDetails:n,sessionData:b,sessionKeys:k,startTimeOffset:B,variableList:M})}handleTrackOrLevelPlaylist(e,t,r,n,i){const s=this.hls,{id:u,level:f,type:m}=r,g=Pr(e,r),b=0,k=H(f)?f:H(u)?u:0,B=jt(r),M=Qr.parseLevelPlaylist(e.data,g,k,B,b,this.variableList);if(m===ir.MANIFEST){const G={attrs:new ce({}),bitrate:0,details:M,name:"",url:g};s.trigger(d.MANIFEST_LOADED,{levels:[G],audioTracks:[],url:g,stats:t,networkDetails:n,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),r.levelDetails=M,this.handlePlaylistLoaded(M,e,t,r,n,i)}handleManifestParsingError(e,t,r,n,i){this.hls.trigger(d.ERROR,{type:y.NETWORK_ERROR,details:v.MANIFEST_PARSING_ERROR,fatal:t.type===ir.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===ir.LEVEL?s+=`: ${e.level} id: ${e.id}`:(e.type===ir.AUDIO_TRACK||e.type===ir.SUBTITLE_TRACK)&&(s+=` id: ${e.id} group-id: "${e.groupId}"`);const u=new Error(s);C.warn(`[playlist-loader]: ${s}`);let f=v.UNKNOWN,m=!1;const g=this.getInternalLoader(e);switch(e.type){case ir.MANIFEST:f=r?v.MANIFEST_LOAD_TIMEOUT:v.MANIFEST_LOAD_ERROR,m=!0;break;case ir.LEVEL:f=r?v.LEVEL_LOAD_TIMEOUT:v.LEVEL_LOAD_ERROR,m=!1;break;case ir.AUDIO_TRACK:f=r?v.AUDIO_TRACK_LOAD_TIMEOUT:v.AUDIO_TRACK_LOAD_ERROR,m=!1;break;case ir.SUBTITLE_TRACK:f=r?v.SUBTITLE_TRACK_LOAD_TIMEOUT:v.SUBTITLE_LOAD_ERROR,m=!1;break}g&&this.resetInternalLoader(e.type);const b={type:y.NETWORK_ERROR,details:f,fatal:m,url:e.url,loader:g,context:e,error:u,networkDetails:t,stats:i};if(n){const k=(t==null?void 0:t.url)||e.url;b.response=Fe({url:k,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:g,groupId:b,deliveryDirectives:k}=n,B=Pr(t,n),M=jt(n),G=typeof n.level=="number"&&M===Le.MAIN?m:void 0;if(!e.fragments.length){const me=new Error("No Segments found in Playlist");u.trigger(d.ERROR,{type:y.NETWORK_ERROR,details:v.LEVEL_EMPTY_ERROR,fatal:!1,url:B,error:me,reason:me.message,response:t,context:n,level:G,parent:M,networkDetails:i,stats:r});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const X=e.playlistParsingError;if(X){u.trigger(d.ERROR,{type:y.NETWORK_ERROR,details:v.LEVEL_PARSING_ERROR,fatal:!1,url:B,error:X,reason:X.message,response:t,context:n,level:G,parent:M,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 ir.MANIFEST:case ir.LEVEL:u.trigger(d.LEVEL_LOADED,{details:e,level:G||0,id:g||0,stats:r,networkDetails:i,deliveryDirectives:k});break;case ir.AUDIO_TRACK:u.trigger(d.AUDIO_TRACK_LOADED,{details:e,id:g||0,groupId:b||"",stats:r,networkDetails:i,deliveryDirectives:k});break;case ir.SUBTITLE_TRACK:u.trigger(d.SUBTITLE_TRACK_LOADED,{details:e,id:g||0,groupId:b||"",stats:r,networkDetails:i,deliveryDirectives:k});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){C.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){C.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 Tn(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=Tn(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 jn(){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?Fe({type:n},r):r))}return i}const Lt=(()=>{const a=jn();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 Jr(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=jn();if(s)for(let u=0;u<i.length;u++){const f=i[u].type;if(f===pn.emsg&&!r||!n)continue;const m=Pe(i[u].data);if(m){const g=i[u].pts;let b=g+i[u].duration;b>Lt&&(b=Lt),b-g<=0&&(b=g+$i);for(let B=0;B<m.length;B++){const M=m[B];if(!Ae(M)){this.updateId3CueEnds(g,f);const G=ei(s,g,b,M,f);G&&this.id3Track.addCue(G)}}}}}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===Lt&&(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=g=>g.type===pn.audioId3&&f:n==="video"?m=g=>g.type===pn.emsg&&u:m=g=>g.type===pn.audioId3&&f||g.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 g=Object.keys(r).filter(b=>!s.includes(b));for(let b=g.length;b--;){const k=g[b];Object.keys(r[k].cues).forEach(B=>{n.removeCue(r[k].cues[B])}),delete r[k]}}const u=t.fragments[t.fragments.length-1];if(s.length===0||!H(u==null?void 0:u.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const f=u.programDateTime/1e3-u.start,m=jn();for(let g=0;g<s.length;g++){const b=s[g],k=i[b],B=Dn(k.startDate,f),M=r[b],G=(M==null?void 0:M.cues)||{};let X=(M==null?void 0:M.durationKnown)||!1,me=Lt;const Ne=k.endDate;if(Ne)me=Dn(Ne,f),X=!0;else if(k.endOnNext&&!X){const et=s.reduce((Ge,ct)=>{if(ct!==k.id){const Qe=i[ct];if(Qe.class===k.class&&Qe.startDate>k.startDate&&(!Ge||k.startDate<Ge.startDate))return Qe}return Ge},null);et&&(me=Dn(et.startDate,f),X=!0)}const Be=Object.keys(k.attr);for(let et=0;et<Be.length;et++){const Ge=Be[et];if(!ge(Ge))continue;const ct=G[Ge];if(ct)X&&!M.durationKnown&&(ct.endTime=me);else if(m){let Qe=k.attr[Ge];ke(Ge)&&(Qe=Jr(Qe));const vt=ei(m,B,me,{key:Ge,data:Qe},pn.dateRange);vt&&(vt.id=b,this.id3Track.addCue(vt),G[Ge]=vt)}}r[b]={cues:G,dateRange:k,durationKnown:X}}}}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 g=n;return m+Math.min(this.stallCount*1,g)}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===v.BUFFER_STALLED_ERROR&&(this.stallCount++,(r=this.levelDetails)!=null&&r.live&&C.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 g=Math.min(2,Math.max(1,i)),b=Math.round(2/(1+Math.exp(-.75*u-this.edgeStalled))*20)/20;e.playbackRate=Math.min(g,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 ur(a,e){const t=e.startPTS;if(H(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&&(C.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,g=e.endPTS;if(H(m)){const X=Math.abs(m-t);H(e.deltaPTS)?e.deltaPTS=Math.max(X,e.deltaPTS):e.deltaPTS=X,u=Math.max(t,m),t=Math.min(t,m),n=Math.min(n,e.startDTS),f=Math.min(r,g),r=Math.max(r,g),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 k=e.sn;if(!a||k<a.startSN||k>a.endSN)return 0;let B;const M=k-a.startSN,G=a.fragments;for(G[M]=e,B=M;B>0;B--)ur(G[B],G[B-1]);for(B=M;B<G.length-1;B++)ur(G[B],G[B+1]);return a.fragmentHint&&ur(G[G.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,g)=>{if(e.skippedSegments&&f.cc!==u.cc){const b=u.cc-f.cc;for(let k=m;k<g.length;k++)g[k].cc+=b}H(u.startPTS)&&H(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){C.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):Ki(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 ve(e[n].attr,r[n]);i.isValid?r[n]=i:C.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 g=f[s+m];let b=u[m];r&&!b&&m<r&&(b=e.fragments[m]=g),g&&b&&t(g,b,m,u)}}function Ki(a,e){const t=e.startSN+e.skippedSegments-a.startSN,r=a.fragments;t<0||t>=r.length||mt(e,r[t].start)}function mt(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 yr(a){switch(a.details){case v.FRAG_LOAD_TIMEOUT:case v.KEY_LOAD_TIMEOUT:case v.LEVEL_LOAD_TIMEOUT:case v.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function Pn(a,e){const t=yr(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 Fe(Fe({},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 Mi={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 Hi(a,e,t){if(e===null||!Array.isArray(a)||!a.length||!H(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)&&Fi(t,r,i)===0||es(i,a,Math.min(n,r))))return i;const s=Mi.search(e,Fi.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 Fi(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 zt(a,e){return Mi.search(a,t=>t.cc<e?1:t.cc>e?-1:0)}var Dt={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},fr={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=C.log.bind(C,"[info]:"),this.warn=C.warn.bind(C,"[warning]:"),this.error=C.error.bind(C,"[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)===Le.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 v.FRAG_LOAD_ERROR:case v.FRAG_LOAD_TIMEOUT:case v.KEY_LOAD_ERROR:case v.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case v.FRAG_PARSING_ERROR:if((r=t.frag)!=null&&r.gap){t.errorAction={action:Dt.DoNothing,flags:fr.None};return}case v.FRAG_GAP:case v.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=Dt.SendAlternateToPenaltyBox;return}case v.LEVEL_EMPTY_ERROR:case v.LEVEL_PARSING_ERROR:{var u,f;const m=t.parent===Le.MAIN?t.level:i.loadLevel;t.details===v.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 v.LEVEL_LOAD_ERROR:case v.LEVEL_LOAD_TIMEOUT:typeof(s==null?void 0:s.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,s.level));return;case v.AUDIO_TRACK_LOAD_ERROR:case v.AUDIO_TRACK_LOAD_TIMEOUT:case v.SUBTITLE_LOAD_ERROR:case v.SUBTITLE_TRACK_LOAD_TIMEOUT:if(s){const m=i.levels[i.loadLevel];if(m&&(s.type===ir.AUDIO_TRACK&&m.hasAudioGroup(s.groupId)||s.type===ir.SUBTITLE_TRACK&&m.hasSubtitleGroup(s.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.loadLevel),t.errorAction.action=Dt.SendAlternateToPenaltyBox,t.errorAction.flags=fr.MoveAllAlternatesMatchingHost;return}}return;case v.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const m=i.levels[i.loadLevel],g=m==null?void 0:m.attrs["HDCP-LEVEL"];g?t.errorAction={action:Dt.SendAlternateToPenaltyBox,flags:fr.MoveAllAlternatesMatchingHDCP,hdcpLevel:g}:this.keySystemError(t)}return;case v.BUFFER_ADD_CODEC_ERROR:case v.REMUX_ALLOC_ERROR:case v.BUFFER_APPEND_ERROR:t.errorAction=this.getLevelSwitchAction(t,(n=t.level)!=null?n:i.loadLevel);return;case v.INTERNAL_EXCEPTION:case v.BUFFER_APPENDING_ERROR:case v.BUFFER_FULL_ERROR:case v.LEVEL_SWITCH_ERROR:case v.BUFFER_STALLED_ERROR:case v.BUFFER_SEEK_OVER_HOLE:case v.BUFFER_NUDGE_ON_STALL:t.errorAction={action:Dt.DoNothing,flags:fr.None};return}t.type===y.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,yr(e),e.response))return{action:Dt.RetryRequest,flags:fr.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((g,b)=>g+b.fragmentError,0);if(n&&(e.details!==v.FRAG_GAP&&n.fragmentError++,$n(u,f,yr(e),e.response)))return{action:Dt.RetryRequest,flags:fr.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===v.BUFFER_APPEND_ERROR&&n.fragmentError++;let g=-1;const{levels:b,loadLevel:k,minAutoLevel:B,maxAutoLevel:M}=r;r.autoLevelEnabled||(r.loadLevel=-1);const G=(i=e.frag)==null?void 0:i.type,me=(G===Le.AUDIO&&m===v.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(m===v.BUFFER_ADD_CODEC_ERROR||m===v.BUFFER_APPEND_ERROR))&&b.some(({audioCodec:ct})=>n.audioCodec!==ct),Be=e.sourceBufferName==="video"&&(m===v.BUFFER_ADD_CODEC_ERROR||m===v.BUFFER_APPEND_ERROR)&&b.some(({codecSet:ct,audioCodec:Qe})=>n.codecSet!==ct&&n.audioCodec===Qe),{type:et,groupId:Ge}=(s=e.context)!=null?s:{};for(let ct=b.length;ct--;){const Qe=(ct+k)%b.length;if(Qe!==k&&Qe>=B&&Qe<=M&&b[Qe].loadError===0){var u,f;const vt=b[Qe];if(m===v.FRAG_GAP&&G===Le.MAIN&&e.frag){const Rt=b[Qe].details;if(Rt){const ot=Ei(e.frag,Rt.fragments,e.frag.start);if(ot!=null&&ot.gap)continue}}else{if(et===ir.AUDIO_TRACK&&vt.hasAudioGroup(Ge)||et===ir.SUBTITLE_TRACK&&vt.hasSubtitleGroup(Ge))continue;if(G===Le.AUDIO&&(u=n.audioGroups)!=null&&u.some(Rt=>vt.hasAudioGroup(Rt))||G===Le.SUBTITLE&&(f=n.subtitleGroups)!=null&&f.some(Rt=>vt.hasSubtitleGroup(Rt))||me&&n.audioCodec===vt.audioCodec||!me&&n.audioCodec!==vt.audioCodec||Be&&n.codecSet===vt.codecSet)continue}g=Qe;break}}if(g>-1&&r.loadLevel!==g)return e.levelRetry=!0,this.playlistError=0,{action:Dt.SendAlternateToPenaltyBox,flags:fr.None,nextAutoLevel:g}}return{action:Dt.SendAlternateToPenaltyBox,flags:fr.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var r;switch((r=t.errorAction)==null?void 0:r.action){case Dt.DoNothing:break;case Dt.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==v.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 Dt.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 fr.None:this.switchLevel(e,s);break;case fr.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=C.log.bind(C,`${t}:`),this.warn=C.warn.bind(C,`${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){C.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 g=Math.min(t.age-t.partTarget,t.targetduration);f>=0&&g>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,g;if(n.canBlockReload&&n.endSN&&n.advanced){const X=this.hls.config.lowLatencyMode,me=n.lastPartSn,Ne=n.endSN,Be=n.lastPartIndex,et=Be!==-1,Ge=me===Ne,ct=X?0:Be;et?(m=Ge?Ne+1:me,g=Ge?ct:Be+1):m=Ne+1;const Qe=n.age,vt=Qe+n.ageHeader;let Rt=Math.min(vt-n.partTarget,n.targetduration*1.5);if(Rt>0){if(r&&Rt>r.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${r.tuneInGoal} to: ${Rt} with playlist age: ${n.age}`),Rt=0;else{const ot=Math.floor(Rt/n.targetduration);if(m+=ot,g!==void 0){const yt=Math.round(Rt%n.targetduration/n.partTarget);g+=yt}this.log(`CDN Tune-in age: ${n.ageHeader}s last advanced ${Qe.toFixed(2)}s goal: ${Rt} skip sn ${ot} to part ${g}`)}n.tuneInGoal=Rt}if(f=this.getDeliveryDirectives(n,t.deliveryDirectives,m,g),X||!Ge){this.loadPlaylist(f);return}}else(n.canBlockReload||n.canSkipUntil)&&(f=this.getDeliveryDirectives(n,t.deliveryDirectives,m,g));const b=this.hls.mainForwardBufferInfo,k=b?b.end-b.len:0,B=(n.edge-k)*1e3,M=vn(n,B);n.updated&&s>this.requestScheduled+M&&(this.requestScheduled=i.loading.start),m!==void 0&&n.canBlockReload?this.requestScheduled=i.loading.first+M-(n.partTarget*1e3||1e3):this.requestScheduled===-1||this.requestScheduled+M<s?this.requestScheduled=s:this.requestScheduled-s<=0&&(this.requestScheduled+=M);let G=this.requestScheduled-s;G=Math.max(0,G),this.log(`reload live playlist ${e} in ${Math.round(G)} ms`),this.timer=self.setTimeout(()=>this.loadPlaylist(f),G)}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=yr(e),n=e.errorAction,{action:i,retryCount:s=0,retryConfig:u}=n||{},f=!!n&&!!u&&(i===Dt.RetryRequest||!n.resolved&&i===Dt.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 g=zn(u,s);this.timer=self.setTimeout(()=>this.loadPlaylist(),g),this.warn(`Retrying playlist loading ${s+1}/${u.maxNumRetry} after "${t}" in ${g}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 Wi{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 ji={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 g=null;if(s!=null&&s.length)try{s.length===1&&s[0]?g=e.groups[s[0]].channels:g=s.reduce((b,k)=>{if(k){const B=e.groups[k];if(!B)throw new Error(`Audio track group ${k} not found`);Object.keys(B.channels).forEach(M=>{b[M]=(b[M]||0)+B.channels[M]})}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))||!!g&&H(m)&&Object.keys(g).some(b=>parseInt(b)>m)}function ra(a,e,t){const r=a.videoCodec,n=a.audioCodec;if(!r||!n||!t)return Promise.resolve(ji);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:Fe(Fe({},i),{},{contentType:nn(f,"video")})}));return n&&a.audioGroups&&a.audioGroups.forEach(f=>{var m;f&&((m=e.groups[f])==null||m.tracks.forEach(g=>{if(g.groupId===f){const b=g.channels||"",k=parseFloat(b);H(k)&&k>2&&u.push.apply(u,n.split(",").map(B=>({type:"media-source",audio:{contentType:nn(B,"audio"),channels:""+k}})))}}))}),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 Ma(){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:Ma(),t?r=r.filter(n=>n!=="SDR"):r=["SDR"]),{preferHDR:t,allowedVideoRanges:r}}function Ti(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,g=!1,b=1/0,k=1/0,B=1/0,M=0,G=[];const{preferHDR:X,allowedVideoRanges:me}=na(e,n);for(let Ge=i.length;Ge--;){const ct=a[i[Ge]];m=ct.channels[2]>0,b=Math.min(b,ct.minHeight),k=Math.min(k,ct.minFramerate),B=Math.min(B,ct.minBitrate);const Qe=me.filter(vt=>ct.videoRanges[vt]>0);Qe.length>0&&(g=!0,G=Qe)}b=H(b)?b:0,k=H(k)?k:0;const Ne=Math.max(1080,b),Be=Math.max(30,k);return B=H(B)?B:t,t=Math.max(B,t),g||(e=void 0,G=[]),{codecSet:i.reduce((Ge,ct)=>{const Qe=a[ct];if(ct===Ge)return Ge;if(Qe.minBitrate>t)return Mn(ct,`min bitrate of ${Qe.minBitrate} > current estimate of ${t}`),Ge;if(!Qe.hasDefaultAudio)return Mn(ct,"no renditions with default or auto-select sound found"),Ge;if(u&&ct.indexOf(u.substring(0,4))%5!==0)return Mn(ct,`audio codec preference "${u}" not found`),Ge;if(s&&!f){if(!Qe.channels[s])return Mn(ct,`no renditions with ${s} channel sound found (channels options: ${Object.keys(Qe.channels)})`),Ge}else if((!u||f)&&m&&Qe.channels[2]===0)return Mn(ct,"no renditions with stereo sound found"),Ge;return Qe.minHeight>Ne?(Mn(ct,`min resolution of ${Qe.minHeight} > maximum of ${Ne}`),Ge):Qe.minFramerate>Be?(Mn(ct,`min framerate of ${Qe.minFramerate} > maximum of ${Be}`),Ge):G.some(vt=>Qe.videoRanges[vt]>0)?Qe.maxScore<M?(Mn(ct,`max score of ${Qe.maxScore} < selected max of ${M}`),Ge):Ge&&(Hr(ct)>=Hr(Ge)||Qe.fragmentError>a[Ge].fragmentError)?Ge:(M=Qe.maxScore,ct):(Mn(ct,`no variants with VIDEO-RANGE of ${JSON.stringify(G)} found`),Ge)},void 0),videoRanges:G,preferHDR:X,minFramerate:k,minBitrate:B}}function Mn(a,e){C.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 g=e.groups[m];g&&(u.hasDefaultAudio=u.hasDefaultAudio||e.hasDefaultAudio?g.hasDefault:g.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(g.channels).forEach(b=>{u.channels[b]=(u.channels[b]||0)+g.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)||Fa(a.characteristics||"",e.characteristics))&&(t===void 0||t(a,e))}function Fa(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((k,B,M)=>{const G=B.uri;return(k[G]||(k[G]=[])).push(M),k},{})[i.uri];u.length>1&&(r=Math.max.apply(Math,u));const f=i.videoRange,m=i.frameRate,g=i.codecSet.substring(0,4),b=Os(e,r,k=>{if(k.videoRange!==f||k.frameRate!==m||k.codecSet.substring(0,4)!==g)return!1;const B=k.audioGroups,M=t.filter(G=>!B||B.indexOf(G.groupId)!==-1);return Gn(a,M,n)>-1});return b>-1?b:Os(e,r,k=>{const B=k.audioGroups,M=t.filter(G=>!B||B.indexOf(G.groupId)!==-1);return Gn(a,M,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,g=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 k=n.mainForwardBufferInfo;if(k===null)return;const B=this.bwEstimator.getEstimateTTFB(),M=Math.abs(s.playbackRate);if(g<=Math.max(B,1e3*(m/(M*2))))return;const G=k.len/M,X=f.loading.first?f.loading.first-f.loading.start:-1,me=f.loaded&&X>-1,Ne=this.getBwEstimate(),Be=n.levels,et=Be[t.level],Ge=f.total||Math.max(f.loaded,Math.round(m*et.averageBitrate/8));let ct=me?g-X:g;ct<1&&me&&(ct=Math.min(g,f.loaded*8/Ne));const Qe=me?f.loaded*1e3/ct:0,vt=Qe?(Ge-f.loaded)/Qe:Ge*8/Ne+B/1e3;if(vt<=G)return;const Rt=Qe?Qe*8:Ne;let ot=Number.POSITIVE_INFINITY,yt;for(yt=t.level-1;yt>b;yt--){const Ft=Be[yt].maxBitrate;if(ot=this.getTimeToLoadFrag(B/1e3,Rt,m*Ft,!Be[yt].details),ot<G)break}if(ot>=vt||ot>m*10)return;n.nextLoadLevel=n.nextAutoLevel=yt,me?this.bwEstimator.sample(g-Math.min(B,X),f.loaded):this.bwEstimator.sampleTTFB(g);const nr=Be[yt].maxBitrate;this.getBwEstimate()*this.hls.config.abrBandWidthUpFactor>nr&&this.resetEstimator(nr),this.clearTimer(),C.warn(`[abr] Fragment ${t.sn}${r?" part "+r.index:""} of level ${t.level} is loading too slowly;
Time to underbuffer: ${G.toFixed(3)} s
Estimated load time for current fragment: ${vt.toFixed(3)} s
Estimated load time for down switch fragment: ${ot.toFixed(3)} s
TTFB estimate: ${X|0} ms
Current BW estimate: ${H(Ne)?Ne|0:"Unknown"} bps
New BW estimate: ${this.getBwEstimate()|0} bps
Switching to level ${yt} @ ${nr|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&&(C.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 Wi(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 v.BUFFER_ADD_CODEC_ERROR:case v.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case v.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;H(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===Le.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!==Le.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 C.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 g=i.abrBandWidthFactor,b=i.abrBandWidthUpFactor;if(m){const X=this.findBestLevel(f,s,n,m,0,g,b);if(X>=0)return X}let k=u?Math.min(u,i.maxStarvationDelay):i.maxStarvationDelay;if(!m){const X=this.bitrateTestDelay;X&&(k=(u?Math.min(u,i.maxLoadingDelay):i.maxLoadingDelay)-X,C.info(`[abr] bitrate test took ${Math.round(1e3*X)}ms, set first fragment max fetchDuration to ${Math.round(1e3*k)} ms`),g=b=1)}const B=this.findBestLevel(f,s,n,m,k,g,b);if(C.info(`[abr] ${m?"rebuffering expected":"buffer is empty"}, optimal quality level ${B}`),B>-1)return B;const M=r.levels[s],G=r.levels[r.loadLevel];return(M==null?void 0:M.bitrate)<(G==null?void 0:G.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,g=this.lastLoadedFragLevel,b=g===-1?this.hls.firstLevel:g,{fragCurrent:k,partCurrent:B}=this,{levels:M,allAudioTracks:G,loadLevel:X,config:me}=this.hls;if(M.length===1)return 0;const Ne=M[b],Be=!!(Ne!=null&&(f=Ne.details)!=null&&f.live),et=X===-1||g===-1;let Ge,ct="SDR",Qe=(Ne==null?void 0:Ne.frameRate)||0;const{audioPreference:vt,videoPreference:Rt}=me,ot=this.audioTracksByGroup||(this.audioTracksByGroup=ia(G));if(et){if(this.firstSelection!==-1)return this.firstSelection;const er=this.codecTiers||(this.codecTiers=Is(M,ot,t,r)),Vt=Ti(er,ct,e,vt,Rt),{codecSet:Er,videoRanges:Ur,minFramerate:Gt,minBitrate:Bt,preferHDR:kr}=Vt;Ge=Er,ct=kr?Ur[Ur.length-1]:Ur[0],Qe=Gt,e=Math.max(e,Bt),C.log(`[abr] picked start tier ${JSON.stringify(Vt)}`)}else Ge=Ne==null?void 0:Ne.codecSet,ct=Ne==null?void 0:Ne.videoRange;const yt=B?B.duration:k?k.duration:0,nr=this.bwEstimator.getEstimateTTFB()/1e3,Ft=[];for(let er=r;er>=t;er--){var rr;const Vt=M[er],Er=er>b;if(!Vt)continue;if(me.useMediaCapabilities&&!Vt.supportedResult&&!Vt.supportedPromise){const un=navigator.mediaCapabilities;typeof(un==null?void 0:un.decodingInfo)=="function"&&Ls(Vt,ot,ct,Qe,e,vt)?(Vt.supportedPromise=ra(Vt,ot,un),Vt.supportedPromise.then(xn=>{if(!this.hls)return;Vt.supportedResult=xn;const Sn=this.hls.levels,si=Sn.indexOf(Vt);xn.error?C.warn(`[abr] MediaCapabilities decodingInfo error: "${xn.error}" for level ${si} ${JSON.stringify(xn)}`):xn.supported||(C.warn(`[abr] Unsupported MediaCapabilities decodingInfo result for level ${si} ${JSON.stringify(xn)}`),si>-1&&Sn.length>1&&(C.log(`[abr] Removing unsupported level ${si}`),this.hls.removeLevel(si)))})):Vt.supportedResult=ji}if(Ge&&Vt.codecSet!==Ge||ct&&Vt.videoRange!==ct||Er&&Qe>Vt.frameRate||!Er&&Qe>0&&Qe<Vt.frameRate||Vt.supportedResult&&!((rr=Vt.supportedResult.decodingInfoResults)!=null&&rr[0].smooth)){Ft.push(er);continue}const Ur=Vt.details,Gt=(B?Ur==null?void 0:Ur.partTarget:Ur==null?void 0:Ur.averagetargetduration)||yt;let Bt;Er?Bt=u*e:Bt=s*e;const kr=yt&&n>=yt*2&&i===0?M[er].averageBitrate:M[er].maxBitrate,dr=this.getTimeToLoadFrag(nr,Bt,kr*Gt,Ur===void 0);if(Bt>=kr&&(er===g||Vt.loadError===0&&Vt.fragmentError===0)&&(dr<=nr||!H(dr)||Be&&!this.bitrateTestDelay||dr<m)){const un=this.forcedAutoLevel;return er!==X&&(un===-1||un!==X)&&(Ft.length&&C.trace(`[abr] Skipped level(s) ${Ft.join(",")} of ${r} max with CODECS and VIDEO-RANGE:"${M[Ft[0]].codecs}" ${M[Ft[0]].videoRange}; not compatible with "${Ne.codecs}" ${ct}`),C.info(`[abr] switch candidate:${b}->${er} adjustedbw(${Math.round(Bt)})-bitrate=${Math.round(Bt-kr)} ttfb:${nr.toFixed(1)} avgDuration:${Gt.toFixed(1)} maxFetchDuration:${m.toFixed(1)} fetchDuration:${dr.toFixed(1)} firstSelection:${et} codecSet:${Ge} videoRange:${ct} hls.loadLevel:${X}`)),et&&(this.firstSelection=er),er}}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 g=!this.isTimeBuffered(m.startPTS,m.endPTS,t);return g&&this.removeFragment(u.body),g})})}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 g=t[f],b=u||m.partial===!0;s.range[f]=this.getBufferedTimes(r,n,b,g)}),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 g=0;g<n.length;g++){const b=n.start(g)-this.bufferPadding,k=n.end(g)+this.bufferPadding;if(m>=b&&f<=k){i.time.push({startPTS:Math.max(s,n.start(g)),endPTS:Math.min(u,n.end(g))});break}else if(s<k&&u>b){const B=Math.max(s,n.start(g)),M=Math.min(u,n.end(g));M>B&&(i.partial=!0,i.time.push({startPTS:B,endPTS:M}))}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 g=f[m];g&&rs(g)&&(n=g.body.start-u,i=g.body.end+u,e>=n&&e<=i&&(r=Math.min(e-n,i-e),s<=r&&(t=g.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,g){const b=m.start-g.start;return b||g.end-m.end});let n=[];if(r)for(let m=0;m<e.length;m++){const g=n.length;if(g){const b=n[g-1].end;e[m].start-b<r?e[m].end>b&&(n[g-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 g=n[m].start,b=n[m].end;if(t+r>=g&&t<b)u=g,f=b,i=f-t;else if(t+r<g){s=g;break}}return{len:i,start:u||0,end:f||0,nextStart:s}}static getBuffered(e){try{return e.buffered}catch(t){return C.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){C.log("No fragments to align");return}const n=ns(t,r[0].cc);if(!n||n&&!n.startPTS){C.log("No frag in previous level to align on");return}return n}function Ms(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++)Ms(t[r],a);e.fragmentHint&&Ms(e.fragmentHint,a),e.alignedSliding=!0}function Fs(a,e,t){e&&(aa(a,t,e),!t.alignedSliding&&e&&Zn(t,e),!t.alignedSliding&&e&&!t.skippedSegments&&Ki(e,t))}function aa(a,e,t){if(za(a,t,e)){const r=cs(t,e);r&&H(r.start)&&(C.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:y.NETWORK_ERROR,details:v.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(B=>B[0]==="GAP")){f(di(e));return}else e.gap=!1;const m=this.loader=e.loader=i?new i(n):new s(n),g=fs(e),b=ri(n.fragLoadPolicy.default),k={loadPolicy:b,timeout:b.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:Bs};e.stats=m.stats,m.load(g,k,{onSuccess:(B,M,G,X)=>{this.resetLoader(e,m);let me=B.data;G.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(me.slice(0,16)),me=me.slice(16)),u({frag:e,part:null,payload:me,networkDetails:X})},onError:(B,M,G,X)=>{this.resetLoader(e,m),f(new pi({type:y.NETWORK_ERROR,details:v.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:Fe({url:r,data:void 0},B),error:new Error(`HTTP Error ${B.code} ${B.text}`),networkDetails:G,stats:X}))},onAbort:(B,M,G)=>{this.resetLoader(e,m),f(new pi({type:y.NETWORK_ERROR,details:v.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:G,stats:B}))},onTimeout:(B,M,G)=>{this.resetLoader(e,m),f(new pi({type:y.NETWORK_ERROR,details:v.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${k.timeout}ms`),networkDetails:G,stats:B}))},onProgress:(B,M,G,X)=>{t&&t({frag:e,part:null,payload:G,networkDetails:X})}})})}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),g=fs(e,t),b=ri(n.fragLoadPolicy.default),k={loadPolicy:b,timeout:b.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:Bs};t.stats=m.stats,m.load(g,k,{onSuccess:(B,M,G,X)=>{this.resetLoader(e,m),this.updateStatsFromPart(e,t);const me={frag:e,part:t,payload:B.data,networkDetails:X};r(me),u(me)},onError:(B,M,G,X)=>{this.resetLoader(e,m),f(new pi({type:y.NETWORK_ERROR,details:v.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:Fe({url:g.url,data:void 0},B),error:new Error(`HTTP Error ${B.code} ${B.text}`),networkDetails:G,stats:X}))},onAbort:(B,M,G)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,m),f(new pi({type:y.NETWORK_ERROR,details:v.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:G,stats:B}))},onTimeout:(B,M,G)=>{this.resetLoader(e,m),f(new pi({type:y.NETWORK_ERROR,details:v.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${k.timeout}ms`),networkDetails:G,stats:B}))}})})}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(H(n)&&H(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:y.MEDIA_ERROR,details:v.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 Si{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?Te(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],g=f[1],b=f[2],k=f[3],B=new Uint32Array(256);let M=0,G=0,X=0;for(X=0;X<256;X++)X<128?B[X]=X<<1:B[X]=X<<1^283;for(X=0;X<256;X++){let me=G^G<<1^G<<2^G<<3^G<<4;me=me>>>8^me&255^99,e[M]=me,t[me]=M;const Ne=B[M],Be=B[Ne],et=B[Be];let Ge=B[me]*257^me*16843008;n[M]=Ge<<24|Ge>>>8,i[M]=Ge<<16|Ge>>>16,s[M]=Ge<<8|Ge>>>24,u[M]=Ge,Ge=et*16843009^Be*65537^Ne*257^M*16843008,m[me]=Ge<<24|Ge>>>8,g[me]=Ge<<16|Ge>>>16,b[me]=Ge<<8|Ge>>>24,k[me]=Ge,M?(M=Ne^B[B[B[et^Ne]]],G^=B[B[G]]):M=G=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),g=this.invKeySchedule=new Uint32Array(s),b=this.sBox,k=this.rcon,B=this.invSubMix,M=B[0],G=B[1],X=B[2],me=B[3];let Ne,Be;for(u=0;u<s;u++){if(u<i){Ne=m[u]=t[u];continue}Be=Ne,u%i===0?(Be=Be<<8|Be>>>24,Be=b[Be>>>24]<<24|b[Be>>>16&255]<<16|b[Be>>>8&255]<<8|b[Be&255],Be^=k[u/i|0]<<24):i>6&&u%i===4&&(Be=b[Be>>>24]<<24|b[Be>>>16&255]<<16|b[Be>>>8&255]<<8|b[Be&255]),m[u]=Ne=(m[u-i]^Be)>>>0}for(f=0;f<s;f++)u=s-f,f&3?Be=m[u]:Be=m[u-4],f<4||u<=4?g[f]=Be:g[f]=M[b[Be>>>24]]^G[b[Be>>>16&255]]^X[b[Be>>>8&255]]^me[b[Be&255]],g[f]=g[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],g=u[2],b=u[3],k=this.uint8ArrayToUint32Array_(r);let B=k[0],M=k[1],G=k[2],X=k[3];const me=new Int32Array(e),Ne=new Int32Array(me.length);let Be,et,Ge,ct,Qe,vt,Rt,ot,yt,nr,Ft,rr,er,Vt;const Er=this.networkToHostOrderSwap;for(;t<me.length;){for(yt=Er(me[t]),nr=Er(me[t+1]),Ft=Er(me[t+2]),rr=Er(me[t+3]),Qe=yt^i[0],vt=rr^i[1],Rt=Ft^i[2],ot=nr^i[3],er=4,Vt=1;Vt<n;Vt++)Be=f[Qe>>>24]^m[vt>>16&255]^g[Rt>>8&255]^b[ot&255]^i[er],et=f[vt>>>24]^m[Rt>>16&255]^g[ot>>8&255]^b[Qe&255]^i[er+1],Ge=f[Rt>>>24]^m[ot>>16&255]^g[Qe>>8&255]^b[vt&255]^i[er+2],ct=f[ot>>>24]^m[Qe>>16&255]^g[vt>>8&255]^b[Rt&255]^i[er+3],Qe=Be,vt=et,Rt=Ge,ot=ct,er=er+4;Be=s[Qe>>>24]<<24^s[vt>>16&255]<<16^s[Rt>>8&255]<<8^s[ot&255]^i[er],et=s[vt>>>24]<<24^s[Rt>>16&255]<<16^s[ot>>8&255]<<8^s[Qe&255]^i[er+1],Ge=s[Rt>>>24]<<24^s[ot>>16&255]<<16^s[Qe>>8&255]<<8^s[vt&255]^i[er+2],ct=s[ot>>>24]<<24^s[Qe>>16&255]<<16^s[vt>>8&255]<<8^s[Rt&255]^i[er+3],Ne[t]=Er(Be^B),Ne[t+1]=Er(ct^M),Ne[t+2]=Er(Ge^G),Ne[t+3]=Er(et^X),B=yt,M=nr,G=Ft,X=rr,t=t+4}return Ne.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=Ht(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=Te(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 Si(this.subtle,new Uint8Array(r)).decrypt(e.buffer,n)):Promise.reject(new Error("web crypto not initialized"))).catch(n=>(C.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=Te(e,0,r),this.remainderData=Te(e,r)),t}logOnce(e){this.logEnabled&&(C.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}},lt={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=lt.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=C.log.bind(C,`${n}:`),this.warn=C.warn.bind(C,`${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=lt.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===lt.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 ${H(s)?s.toFixed(3):s}, state: ${i}`),this.state===lt.ENDED)this.resetLoadingState();else if(t){const f=e.maxFragLookUpTolerance,m=t.start-f,g=t.start+t.duration+f;if(!u.len||g<u.start||m>u.end){const b=s>g;(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=lt.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===lt.FRAG_LOADING||!this.fragCurrent&&s===lt.PARSING)&&(this.fragmentTracker.removeFragment(e),this.state=lt.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===lt.STOPPED||this.state===lt.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:y.MEDIA_ERROR,details:v.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===lt.STOPPED||this.state===lt.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=lt.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===Le.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!==Le.SUBTITLE){const g=e.elementaryStreams;if(!Object.keys(g).some(b=>!!g[b])){this.state=lt.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=lt.IDLE,u&&(!this.loadedmetadata&&e.type==Le.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=lt.KEY_LOADING,this.fragCurrent=e,u=this.keyLoader.load(e).then(g=>{if(!this.fragContextChanged(g.frag))return this.hls.trigger(d.KEY_LOADED,g),this.state===lt.KEY_LOADING&&(this.state=lt.IDLE),g}),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 g=s.partList;if(g&&n){r>e.end&&s.fragmentHint&&(e=s.fragmentHint);const b=this.getNextPart(g,e,r);if(b>-1){const k=g[b];this.log(`Loading part sn: ${e.sn} p: ${k.index} cc: ${e.cc} of playlist [${s.startSN}-${s.endSN}] parts [0-${b}-${g.length-1}] ${this.logPrefix==="[stream-controller]"?"level":"track"}: ${e.level}, target: ${parseFloat(r.toFixed(3))}`),this.nextLoadPosition=k.start+k.duration,this.state=lt.FRAG_LOADING;let B;return u?B=u.then(M=>!M||this.fragContextChanged(M.frag)?null:this.doFragPartsLoad(e,k,t,n)).catch(M=>this.handleFragLoadError(M)):B=this.doFragPartsLoad(e,k,t,n).catch(M=>this.handleFragLoadError(M)),this.hls.trigger(d.FRAG_LOADING,{frag:e,part:k,targetBufferTime:r}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):B}else if(!e.url||this.loadedEndOfParts(g,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))}`),H(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=lt.FRAG_LOADING;const f=this.config.progressive;let m;return f&&u?m=u.then(g=>!g||this.fragContextChanged(g==null?void 0:g.frag)?null:this.fragmentLoader.load(e,n)).catch(g=>this.handleFragLoadError(g)):m=Promise.all([this.fragmentLoader.load(e,f?n:void 0),u]).then(([g])=>(!f&&g&&n&&n(g),g)).catch(g=>this.handleFragLoadError(g)),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,g=b=>{this.fragmentLoader.loadPart(e,b,n).then(k=>{f[b.index]=k;const B=k.part;this.hls.trigger(d.FRAG_LOADED,k);const M=hi(r,e.sn,b.index+1)||cn(m,e.sn,b.index+1);if(M)g(M);else return i({frag:e,part:B,partsLoaded:f})}).catch(s)};g(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;e.data&&t.details===v.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(d.ERROR,t)}else this.hls.trigger(d.ERROR,{type:y.OTHER_ERROR,details:v.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==lt.PARSING){!this.fragCurrent&&this.state!==lt.STOPPED&&this.state!==lt.ERROR&&(this.state=lt.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!==lt.PARSING)return;const{data1:u,data2:f}=e;let m=u;if(u&&f&&(m=Ht(u,f)),!((s=m)!=null&&s.length))return;const g={type:e.type,frag:t,part:r,chunkMeta:n,parent:t.type,data:m};if(this.hls.trigger(d.BUFFER_APPENDING,g),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 H(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=Le.MAIN){const r=this.fragmentTracker.getAppendedFrag(e,Le.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 g=m.loaded;g?n=-1:(i||m.independent||s)&&m.fragment===t&&(n=u),i=g}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=Hi(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=zt(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,g=r.partList,b=!!(n.lowLatencyMode&&g!=null&&g.length&&f);b&&f&&!this.bitrateTest&&(s=s.concat(f),u=f.sn);let k;if(e<t){const B=e>t-m?0:m;k=Ei(i,s,e,B)}else k=s[s.length-1];if(k){const B=k.sn-r.startSN,M=this.fragmentTracker.getState(k);if((M===on.OK||M===on.PARTIAL&&k.gap)&&(i=k),i&&k.sn===i.sn&&(!b||g[0].fragment.sn>k.sn)&&i&&k.level===i.level){const X=s[B+1];k.sn<u&&this.fragmentTracker.getState(X)!==on.OK?k=X:k=null}}return k}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&&H(i);if(s||!u&&!i){const{fragPrevious:f}=this;Fs(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&&H(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!==lt.FRAG_LOADING_WAITING_RETRY)&&(this.state=lt.IDLE)}onFragmentOrKeyLoadError(e,t){if(t.chunkMeta&&!t.frag){const g=this.getCurrentContext(t.chunkMeta);g&&(t.frag=g.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===v.FRAG_GAP;i&&this.fragmentTracker.fragBuffered(r,!0);const s=t.errorAction,{action:u,retryCount:f=0,retryConfig:m}=s||{};if(s&&u===Dt.RetryRequest&&m){this.resetStartWhenNotLoaded(this.levelLastLoaded);const g=zn(m,f);this.warn(`Fragment ${r.sn} of ${e} ${r.level} errored with ${t.details}, retrying loading ${f+1}/${m.maxNumRetry} in ${g}ms`),s.resolved=!0,this.retryDate=self.performance.now()+g,this.state=lt.FRAG_LOADING_WAITING_RETRY}else if(m&&s)if(this.resetFragmentErrors(e),f<m.maxNumRetry)!i&&u!==Dt.RemoveAlternatePermanently&&(s.resolved=!0);else{C.warn(`${t.details} reached or exceeded max retry (${f})`);return}else(s==null?void 0:s.action)===Dt.SendAlternateToPenaltyBox?this.state=lt.WAITING_LEVEL:this.state=lt.ERROR;this.tickImmediate()}reduceLengthAndFlushBuffer(e){if(this.state===lt.PARSING||this.state===lt.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===Le.AUDIO&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==lt.STOPPED&&(this.state=lt.IDLE)}afterBufferFlushed(e,t,r){if(!e)return;const n=Mr.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,n,r),this.state===lt.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=lt.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 g=e.elementaryStreams[m];if(g){const b=g.endPTS-g.startPTS;if(b<=0)return this.warn(`Could not parse fragment ${e.sn} ${m} duration reliably (${b})`),f||!1;const k=n?0:ui(s,e,g.startPTS,g.endPTS,g.startDTS,g.endDTS);return this.hls.trigger(d.LEVEL_PTS_UPDATED,{details:s,level:r,drift:k,type:m,frag:e,start:g.startPTS,end:g.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:y.MEDIA_ERROR,details:v.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=lt.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=Ht(this.cachedData,e),this.cachedData=null);let r=rt(e,0),n=r?r.length:0,i;const s=this._audioTrack,u=this._id3Track,f=r?oe(r):void 0,m=e.length;for((this.basePTS===null||this.frameIndex===0&&H(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 g=this.appendFrame(s,e,n);g?(this.frameIndex++,this.lastPTS=g.sample.pts,n+=g.length,i=n):n=m}else z(e,n)?(r=rt(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 g=Te(e,i);this.cachedData?this.cachedData=Ht(this.cachedData,g):this.cachedData=g}}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(H(a))return a*90;const r=t?t.baseTime*9e4/t.timescale:0;return e*9e4+r};function Ka(a,e,t,r){let n,i,s,u;const f=navigator.userAgent.toLowerCase(),m=r,g=[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>g.length-1){const k=new Error(`invalid ADTS sampling index:${b}`);a.emit(d.ERROR,d.ERROR,{type:y.MEDIA_ERROR,details:v.FRAG_PARSING_ERROR,fatal:!0,error:k,reason:k.message});return}return s=(e[t+2]&1)<<2,s|=(e[t+3]&192)>>>6,C.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:g[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 Ha(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=Ka(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,C.log(`parsed codec:${a.codec}, rate:${i.samplerate}, channels:${i.channelCount}`)}}function Gs(a){return 1024*9e4/a}function Wa(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 Ks(a,e,t,r,n){const i=Gs(a.samplerate),s=r+n*i,u=Wa(e,t);let f;if(u){const{frameLength:b,headerLength:k}=u,B=k+b,M=Math.max(0,t+B-e.length);M?(f=new Uint8Array(B-k),f.set(e.subarray(t+k,e.length),0)):f=e.subarray(t+k,t+B);const G={unit:f,pts:s};return M||a.samples.push(G),{sample:G,length:B,missing:M}}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 ja=[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=ja[f*14+n-1]*1e3,b=ma[(t===3?0:t===2?1:2)*3+i],k=u===3?1:2,B=Va[t][r],M=ga[r],G=B*8*M,X=Math.floor(B*m/b+s)*M;if(ss===null){const Be=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);ss=Be?parseInt(Be[1]):0}return!!ss&&ss<=87&&r===2&&m>=224e3&&u===0&&(a[e+3]=a[e+3]|128),{sampleRate:b,channelCount:k,frameLength:X,samplesPerFrame:G}}}function bs(a,e){return a[e]===255&&(a[e+1]&224)===224&&(a[e+1]&6)!==0}function Hs(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||Hs(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=rt(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(Ha(e,r))return C.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=Ks(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=Oe(e);if(f.video){const{id:m,timescale:g,codec:b}=f.video;i.id=m,i.timescale=u.timescale=g,i.codec=b}if(f.audio){const{id:m,timescale:g,codec:b}=f.audio;s.id=m,s.timescale=g,s.codec=b}u.id=kt.text,i.sampleDuration=0,i.duration=s.duration=n}resetContiguity(){this.remainderData=null}static probe(e){return Kt(e)}demux(e,t){this.timeOffset=t;let r=e;const n=this.videoTrack,i=this.txtTrack;if(this.config.progressive){this.remainderData&&(r=Ht(this.remainderData,e));const u=br(r);this.remainderData=u.remainder,n.samples=u.valid||new Uint8Array}else n.samples=r;const s=this.extractID3Track(n,t);return i.samples=Mt(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=Mt(e,t),{videoTrack:t,audioTrack:Xn(),id3Track:n,textTrack:Xn()}}extractID3Track(e,t){const r=this.id3Track;if(e.samples.length){const n=ue(e.samples,["emsg"]);n&&n.forEach(i=>{const s=At(i);if(ba.test(s.schemeIdUri)){const u=H(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 Ws 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=js(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=rt(e,0);if(!t)return!1;const r=t.length;return e[r]===11&&e[r+1]===119&&oe(t)!==void 0&&Yi(e,r)<16}}function js(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,g=[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+g>e.length)return-1;const b=e[t+6]>>5;let k=0;b===2?k+=2:(b&1&&b!==1&&(k+=2),b&4&&(k+=2));const B=(e[t+6]<<8|e[t+7])>>12-k&1,G=[2,1,2,3,3,4,4,5][b]+B,X=e[t+5]>>3,me=e[t+5]&7,Ne=new Uint8Array([i<<6|X<<1|me>>2,(me&3)<<6|b<<3|B<<2|f>>4,f<<4&224]),Be=1536/u*9e4,et=r+n*Be,Ge=e.subarray(t,t+g);return a.config=Ne,a.channelCount=G,a.samplerate=u,a.samples.push({unit:Ge,pts:et}),g}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&&C.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&&C.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),g=this.readUEG.bind(this),b=this.readBoolean.bind(this),k=this.skipBits.bind(this),B=this.skipEG.bind(this),M=this.skipUEG.bind(this),G=this.skipScalingList.bind(this);f();const X=f();if(m(5),k(3),f(),M(),X===100||X===110||X===122||X===244||X===44||X===83||X===86||X===118||X===128){const ct=g();if(ct===3&&k(1),M(),M(),k(1),b())for(s=ct!==3?8:12,u=0;u<s;u++)b()&&(u<6?G(16):G(64))}M();const me=g();if(me===0)g();else if(me===1)for(k(1),B(),B(),i=g(),u=0;u<i;u++)B();M(),k(1);const Ne=g(),Be=g(),et=m(1);et===0&&k(1),k(1),b()&&(e=g(),t=g(),r=g(),n=g());let Ge=[1,1];if(b()&&b())switch(f()){case 1:Ge=[1,1];break;case 2:Ge=[12,11];break;case 3:Ge=[10,11];break;case 4:Ge=[16,11];break;case 5:Ge=[40,33];break;case 6:Ge=[24,11];break;case 7:Ge=[20,11];break;case 8:Ge=[32,11];break;case 9:Ge=[80,33];break;case 10:Ge=[18,11];break;case 11:Ge=[15,11];break;case 12:Ge=[64,33];break;case 13:Ge=[160,99];break;case 14:Ge=[4,3];break;case 15:Ge=[3,2];break;case 16:Ge=[2,1];break;case 255:{Ge=[f()<<8|f(),f()<<8|f()];break}}return{width:Math.ceil((Ne+1)*16-e*2-t*2),height:(2-et)*(Be+1)*16-(et?2:4)*(r+n),pixelRatio:Ge}}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(g=>{var b;switch(g.type){case 1:{let G=!1;f=!0;const X=g.data;if(m&&X.length>4){const me=new xa(X).readSliceType();(me===2||me===4||me===7||me===9)&&(G=!0)}if(G){var k;(k=u)!=null&&k.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=G;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(g.data,1,r.pts,t.samples);break}case 7:{var B,M;f=!0,m=!0;const G=g.data,me=new xa(G).readSPS();if(!e.sps||e.width!==me.width||e.height!==me.height||((B=e.pixelRatio)==null?void 0:B[0])!==me.pixelRatio[0]||((M=e.pixelRatio)==null?void 0:M[1])!==me.pixelRatio[1]){e.width=me.width,e.height=me.height,e.pixelRatio=me.pixelRatio,e.sps=[G],e.duration=i;const Ne=G.subarray(1,4);let Be="avc1.";for(let et=0;et<3;et++){let Ge=Ne[et].toString(16);Ge.length<2&&(Ge="0"+Ge),Be+=Ge}e.codec=Be}break}case 8:f=!0,e.pps=[g.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 "+g.type+" ");break}u&&f&&u.units.push(g)}),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,g,b=-1,k=0;for(n===-1&&(b=0,k=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 B={data:t.subarray(b,m),type:k};s.push(B)}else{const B=this.getLastNalUnit(e.samples);B&&(i&&u<=4-i&&B.state&&(B.data=B.data.subarray(0,B.data.byteLength-i)),m>0&&(B.data=Ht(B.data,t.subarray(0,m)),B.state=0))}u<r?(g=t[u]&31,b=u,k=g,n=0):n=-1}else n=0}if(b>=0&&n>=0){const B={data:t.subarray(b,r),type:k,state:n};s.push(B)}if(s.length===0){const B=this.getLastNalUnit(e.samples);B&&(B.data=Ht(B.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&&C.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:kt[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 g=s.pid,b=s.pesData,k=u.pid,B=f.pid,M=u.pesData,G=f.pesData,X=null,me=this.pmtParsed,Ne=this._pmtId,Be=e.length;if(this.remainderData&&(e=Ht(this.remainderData,e),Be=e.length,this.remainderData=null),Be<ln&&!n)return this.remainderData=e,{audioTrack:u,videoTrack:s,id3Track:f,textTrack:m};const et=Math.max(0,Di.syncOffset(e));Be-=(Be-et)%ln,Be<e.byteLength&&!n&&(this.remainderData=new Uint8Array(e.buffer,Be,e.buffer.byteLength-Be));let Ge=0;for(let Qe=et;Qe<Be;Qe+=ln)if(e[Qe]===71){const vt=!!(e[Qe+1]&64),Rt=xs(e,Qe),ot=(e[Qe+3]&48)>>4;let yt;if(ot>1){if(yt=Qe+5+e[Qe+4],yt===Qe+ln)continue}else yt=Qe+4;switch(Rt){case g:vt&&(b&&(i=Ni(b))&&this.videoParser.parseAVCPES(s,m,i,!1,this._duration),b={data:[],size:0}),b&&(b.data.push(e.subarray(yt,Qe+ln)),b.size+=Qe+ln-yt);break;case k:if(vt){if(M&&(i=Ni(M)))switch(u.segmentCodec){case"aac":this.parseAACPES(u,i);break;case"mp3":this.parseMPEGPES(u,i);break;case"ac3":this.parseAC3PES(u,i);break}M={data:[],size:0}}M&&(M.data.push(e.subarray(yt,Qe+ln)),M.size+=Qe+ln-yt);break;case B:vt&&(G&&(i=Ni(G))&&this.parseID3PES(f,i),G={data:[],size:0}),G&&(G.data.push(e.subarray(yt,Qe+ln)),G.size+=Qe+ln-yt);break;case 0:vt&&(yt+=e[yt]+1),Ne=this._pmtId=Xa(e,yt);break;case Ne:{vt&&(yt+=e[yt]+1);const nr=wa(e,yt,this.typeSupported,r,this.observer);g=nr.videoPid,g>0&&(s.pid=g,s.segmentCodec=nr.segmentVideoCodec),k=nr.audioPid,k>0&&(u.pid=k,u.segmentCodec=nr.segmentAudioCodec),B=nr.id3Pid,B>0&&(f.pid=B),X!==null&&!me&&(C.warn(`MPEG-TS PMT found at ${Qe} after unknown PID '${X}'. Backtracking to sync byte @${et} to parse all TS packets.`),X=null,Qe=et-188),me=this.pmtParsed=!0;break}case 17:case 8191:break;default:X=Rt;break}}else Ge++;Ge>0&&ws(this.observer,new Error(`Found ${Ge} TS packet/s that do not start with 0x47`)),s.pesData=b,u.pesData=M,f.pesData=G;const ct={audioTrack:u,videoTrack:s,id3Track:f,textTrack:m};return n&&this.extractRemainingSamples(ct),ct}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&&C.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,k=n.sample.unit.byteLength;if(b===-1)i=Ht(n.sample.unit,i);else{const B=k-b;n.sample.unit.set(i.subarray(0,b),B),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 k=s<u-1;if(k?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),k),!k)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{C.warn("[tsdemuxer]: AAC PES unknown PTS");return}let m=0,g;for(;s<u;)if(g=Ks(e,i,s,f,m),s+=g.length,g.missing){this.aacOverFlow=g;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){C.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;s<n;)if(Hs(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){C.warn("[tsdemuxer]: AC3 PES unknown PTS");return}const i=r.length;let s=0,u=0,f;for(;u<i&&(f=js(e,r,u,n,s++))>0;)u+=f}}parseID3PES(e,t){if(t.pts===void 0){C.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),g=(a[e+3]&15)<<8|a[e+4];switch(a[e]){case 207:if(!r){ie("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){ie("H.264");break}case 27:i.videoPid===-1&&(i.videoPid=m,i.segmentVideoCodec="avc");break;case 3:case 4:!t.mpeg&&!t.mp3?C.log("MPEG audio found, not supported in this browser"):i.audioPid===-1&&(i.audioPid=m,i.segmentAudioCodec="mp3");break;case 193:if(!r){ie("AC-3");break}case 129:t.ac3?i.audioPid===-1&&(i.audioPid=m,i.segmentAudioCodec="ac3"):C.log("AC-3 audio found, not supported in this browser");break;case 6:if(i.audioPid===-1&&g>0){let b=e+5,k=g;for(;k>2;){switch(a[b]){case 106:t.ac3!==!0?C.log("AC-3 audio found, not supported in this browser for now"):(i.audioPid=m,i.segmentAudioCodec="ac3");break}const M=a[b+1]+2;b+=M,k-=M}}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+=g+5}return i}function ws(a,e,t){C.warn(`parsing error: ${e.message}`),a.emit(d.ERROR,d.ERROR,{type:y.MEDIA_ERROR,details:v.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function ie(a){C.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]=Ht(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&&(C.warn(`${Math.round((i-s)/9e4)}s delta between PTS and DTS, align them`),i=s)):s=i),n=t[8];let g=n+9;if(a.size<=g)return null;a.size-=g;const b=new Uint8Array(a.size);for(let k=0,B=u.length;k<B;k++){t=u[k];let M=t.byteLength;if(g)if(g>M){g-=M;continue}else t=t.subarray(g),M-=g,g=0;b.set(t,e),e+=M}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=rt(e,0);let r=(t==null?void 0:t.length)||0;if(t&&e[r]===11&&e[r+1]===119&&oe(t)!==void 0&&Yi(e,r)<=16)return!1;for(let n=e.length;r<n;r++)if(va(e,r))return C.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 He{static init(){He.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 He.types)He.types.hasOwnProperty(e)&&(He.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]);He.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]);He.STTS=He.STSC=He.STCO=i,He.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),He.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),He.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),He.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]);He.FTYP=He.box(He.types.ftyp,s,f,s,u),He.DINF=He.box(He.types.dinf,He.box(He.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 He.box(He.types.hdlr,He.HDLR_TYPES[e])}static mdat(e){return He.box(He.types.mdat,e)}static mdhd(e,t){t*=e;const r=Math.floor(t/(gi+1)),n=Math.floor(t%(gi+1));return He.box(He.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 He.box(He.types.mdia,He.mdhd(e.timescale,e.duration),He.hdlr(e.type),He.minf(e))}static mfhd(e){return He.box(He.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"?He.box(He.types.minf,He.box(He.types.smhd,He.SMHD),He.DINF,He.stbl(e)):He.box(He.types.minf,He.box(He.types.vmhd,He.VMHD),He.DINF,He.stbl(e))}static moof(e,t,r){return He.box(He.types.moof,He.mfhd(e),He.traf(r,t))}static moov(e){let t=e.length;const r=[];for(;t--;)r[t]=He.trak(e[t]);return He.box.apply(null,[He.types.moov,He.mvhd(e[0].timescale,e[0].duration)].concat(r).concat(He.mvex(e)))}static mvex(e){let t=e.length;const r=[];for(;t--;)r[t]=He.trex(e[t]);return He.box.apply(null,[He.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 He.box(He.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 He.box(He.types.sdtp,r)}static stbl(e){return He.box(He.types.stbl,He.stsd(e),He.box(He.types.stts,He.STTS),He.box(He.types.stsc,He.STSC),He.box(He.types.stsz,He.STSZ),He.box(He.types.stco,He.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=He.box(He.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,g=e.pixelRatio[0],b=e.pixelRatio[1];return He.box(He.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,He.box(He.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),He.box(He.types.pasp,new Uint8Array([g>>24,g>>16&255,g>>8&255,g&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 He.box(He.types.mp4a,He.audioStsd(e),He.box(He.types.esds,He.esds(e)))}static mp3(e){return He.box(He.types[".mp3"],He.audioStsd(e))}static ac3(e){return He.box(He.types["ac-3"],He.audioStsd(e),He.box(He.types.dac3,e.config))}static stsd(e){return e.type==="audio"?e.segmentCodec==="mp3"&&e.codec==="mp3"?He.box(He.types.stsd,He.STSD,He.mp3(e)):e.segmentCodec==="ac3"?He.box(He.types.stsd,He.STSD,He.ac3(e)):He.box(He.types.stsd,He.STSD,He.mp4a(e)):He.box(He.types.stsd,He.STSD,He.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 He.box(He.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=He.sdtp(e),n=e.id,i=Math.floor(t/(gi+1)),s=Math.floor(t%(gi+1));return He.box(He.types.traf,He.box(He.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255])),He.box(He.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])),He.trun(e,r.length+16+20+8+16+8+8),r)}static trak(e){return e.duration=e.duration||4294967295,He.box(He.types.trak,He.tkhd(e),He.mdia(e))}static trex(e){const t=e.id;return He.box(He.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,g,b,k;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,g=f.size,b=f.flags,k=f.cts,s.set([m>>>24&255,m>>>16&255,m>>>8&255,m&255,g>>>24&255,g>>>16&255,g>>>8&255,g&255,b.isLeading<<2|b.dependsOn,b.isDependedOn<<6|b.hasRedundancy<<4|b.paddingValue<<1|b.isNonSync,b.degradPrio&61440,b.degradPrio&15,k>>>24&255,k>>>16&255,k>>>8&255,k&255],12+16*u);return He.box(He.types.trun,s)}static initSegment(e){He.types||He.init();const t=He.moov(e);return Ht(He.FTYP,t)}}He.types=void 0,He.HDLR_TYPES=void 0,He.STTS=void 0,He.STSC=void 0,He.STCO=void 0,He.STSZ=void 0,He.VMHD=void 0,He.SMHD=void 0,He.STSD=void 0,He.FTYP=void 0,He.DINF=void 0;const qs=9e4;function Ts(a,e,t=1,r=!1){const n=a*e*t;return r?Math.round(n):n}function Qa(a,e,t=1,r=!1){return Ts(a,e,1/t,r)}function qi(a,e=!1){return Ts(a,1e3,1/qs,e)}function Ea(a,e=1){return Ts(a,qs,1/e)}const As=10*1e3,Ta=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){C.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){C.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){C.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&&C.debug("PTS rollover detected"),n}remux(e,t,r,n,i,s,u,f){let m,g,b,k,B,M,G=i,X=i;const me=e.pid>-1,Ne=t.pid>-1,Be=t.samples.length,et=e.samples.length>0,Ge=u&&Be>0||Be>1;if((!me||et)&&(!Ne||Ge)||this.ISGenerated||u){if(this.ISGenerated){var Qe,vt,Rt,ot;const rr=this.videoTrackConfig;rr&&(t.width!==rr.width||t.height!==rr.height||((Qe=t.pixelRatio)==null?void 0:Qe[0])!==((vt=rr.pixelRatio)==null?void 0:vt[0])||((Rt=t.pixelRatio)==null?void 0:Rt[1])!==((ot=rr.pixelRatio)==null?void 0:ot[1]))&&this.resetInitSegment()}else b=this.generateIS(e,t,i,s);const yt=this.isVideoContiguous;let nr=-1,Ft;if(Ge&&(nr=Ja(t.samples),!yt&&this.config.forceKeyFrameOnDiscontinuity))if(M=!0,nr>0){C.warn(`[mp4-remuxer]: Dropped ${nr} out of ${Be} video samples due to a missing keyframe`);const rr=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(nr),t.dropped+=nr,X+=(t.samples[0].pts-rr)/t.inputTimeScale,Ft=X}else nr===-1&&(C.warn(`[mp4-remuxer]: No keyframe found out of ${Be} video samples`),M=!1);if(this.ISGenerated){if(et&&Ge){const rr=this.getVideoStartPts(t.samples),Vt=(Cn(e.samples[0].pts,rr)-rr)/t.inputTimeScale;G+=Math.max(0,Vt),X+=Math.max(0,-Vt)}if(et){if(e.samplerate||(C.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),b=this.generateIS(e,t,i,s)),g=this.remuxAudio(e,G,this.isAudioContiguous,s,Ne||Ge||f===Le.AUDIO?X:void 0),Ge){const rr=g?g.endPTS-g.startPTS:0;t.inputTimeScale||(C.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),b=this.generateIS(e,t,i,s)),m=this.remuxVideo(t,X,yt,rr)}}else Ge&&(m=this.remuxVideo(t,X,yt,0));m&&(m.firstKeyFrame=nr,m.independent=nr!==-1,m.firstKeyFramePTS=Ft)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(r.samples.length&&(B=Sa(r,i,this._initPTS,this._initDTS)),n.samples.length&&(k=eo(n,i,this._initPTS))),{audio:g,video:m,initSegment:b,independent:M,text:k,id3:B}}generateIS(e,t,r,n){const i=e.samples,s=t.samples,u=this.typeSupported,f={},m=this._initPTS;let g=!m||n,b="audio/mp4",k,B,M;if(g&&(k=B=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):He.initSegment([e]),metadata:{channelCount:e.channelCount}},g&&(M=e.inputTimeScale,!m||M!==m.timescale?k=B=i[0].pts-Math.round(M*r):g=!1)}if(t.sps&&t.pps&&s.length){if(t.timescale=t.inputTimeScale,f.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:He.initSegment([t]),metadata:{width:t.width,height:t.height}},g)if(M=t.inputTimeScale,!m||M!==m.timescale){const G=this.getVideoStartPts(s),X=Math.round(M*r);B=Math.min(B,Cn(s[0].dts,G)-X),k=Math.min(k,G-X)}else g=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(f).length)return this.ISGenerated=!0,g?(this._initPTS={baseTime:k,timescale:M},this._initDTS={baseTime:B,timescale:M}):k=M=void 0,{tracks:f,initPTS:k,timescale:M}}remuxVideo(e,t,r,n){const i=e.inputTimeScale,s=e.samples,u=[],f=s.length,m=this._initPTS;let g=this.nextAvcDts,b=8,k=this.videoSampleDuration,B,M,G=Number.POSITIVE_INFINITY,X=Number.NEGATIVE_INFINITY,me=!1;if(!r||g===null){const Gt=t*i,Bt=s[0].pts-Cn(s[0].dts,s[0].pts);Zi&&g!==null&&Math.abs(Gt-Bt-g)<15e3?r=!0:g=Gt-Bt}const Ne=m.baseTime*i/m.timescale;for(let Gt=0;Gt<f;Gt++){const Bt=s[Gt];Bt.pts=Cn(Bt.pts-Ne,g),Bt.dts=Cn(Bt.dts-Ne,g),Bt.dts<s[Gt>0?Gt-1:Gt].dts&&(me=!0)}me&&s.sort(function(Gt,Bt){const kr=Gt.dts-Bt.dts,dr=Gt.pts-Bt.pts;return kr||dr}),B=s[0].dts,M=s[s.length-1].dts;const Be=M-B,et=Be?Math.round(Be/(f-1)):k||e.inputTimeScale/30;if(r){const Gt=B-g,Bt=Gt>et,kr=Gt<-1;if((Bt||kr)&&(Bt?C.warn(`AVC: ${qi(Gt,!0)} ms (${Gt}dts) hole between fragments detected at ${t.toFixed(3)}`):C.warn(`AVC: ${qi(-Gt,!0)} ms (${Gt}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!kr||g>=s[0].pts||Zi)){B=g;const dr=s[0].pts-Gt;if(Bt)s[0].dts=B,s[0].pts=dr;else for(let Fr=0;Fr<s.length&&!(s[Fr].dts>dr);Fr++)s[Fr].dts-=Gt,s[Fr].pts-=Gt;C.log(`Video: Initial PTS/DTS adjusted: ${qi(dr,!0)}/${qi(B,!0)}, delta: ${qi(Gt,!0)} ms`)}}B=Math.max(0,B);let Ge=0,ct=0,Qe=B;for(let Gt=0;Gt<f;Gt++){const Bt=s[Gt],kr=Bt.units,dr=kr.length;let Fr=0;for(let un=0;un<dr;un++)Fr+=kr[un].data.length;ct+=Fr,Ge+=dr,Bt.length=Fr,Bt.dts<Qe?(Bt.dts=Qe,Qe+=et/4|0||1):Qe=Bt.dts,G=Math.min(Bt.pts,G),X=Math.max(Bt.pts,X)}M=s[f-1].dts;const vt=ct+4*Ge+8;let Rt;try{Rt=new Uint8Array(vt)}catch(Gt){this.observer.emit(d.ERROR,d.ERROR,{type:y.MUX_ERROR,details:v.REMUX_ALLOC_ERROR,fatal:!1,error:Gt,bytes:vt,reason:`fail allocating video mdat ${vt}`});return}const ot=new DataView(Rt.buffer);ot.setUint32(0,vt),Rt.set(He.types.mdat,4);let yt=!1,nr=Number.POSITIVE_INFINITY,Ft=Number.POSITIVE_INFINITY,rr=Number.NEGATIVE_INFINITY,er=Number.NEGATIVE_INFINITY;for(let Gt=0;Gt<f;Gt++){const Bt=s[Gt],kr=Bt.units;let dr=0;for(let xn=0,Sn=kr.length;xn<Sn;xn++){const si=kr[xn],ta=si.data,bo=si.data.byteLength;ot.setUint32(b,bo),b+=4,Rt.set(ta,b),b+=bo,dr+=4+bo}let Fr;if(Gt<f-1)k=s[Gt+1].dts-Bt.dts,Fr=s[Gt+1].pts-Bt.pts;else{const xn=this.config,Sn=Gt>0?Bt.dts-s[Gt-1].dts:et;if(Fr=Gt>0?Bt.pts-s[Gt-1].pts:et,xn.stretchShortVideoTrack&&this.nextAudioPts!==null){const si=Math.floor(xn.maxBufferHole*i),ta=(n?G+n*i:this.nextAudioPts)-Bt.pts;ta>si?(k=ta-Sn,k<0?k=Sn:yt=!0,C.log(`[mp4-remuxer]: It is approximately ${ta/90} ms to the next segment; using duration ${k/90} ms for the last video frame.`)):k=Sn}else k=Sn}const un=Math.round(Bt.pts-Bt.dts);nr=Math.min(nr,k),rr=Math.max(rr,k),Ft=Math.min(Ft,Fr),er=Math.max(er,Fr),u.push(new D(Bt.key,k,dr,un))}if(u.length){if(Zi){if(Zi<70){const Gt=u[0].flags;Gt.dependsOn=2,Gt.isNonSync=0}}else if(Xs&&er-Ft<rr-nr&&et/rr<.025&&u[0].cts===0){C.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let Gt=B;for(let Bt=0,kr=u.length;Bt<kr;Bt++){const dr=Gt+u[Bt].duration,Fr=Gt+u[Bt].cts;if(Bt<kr-1){const un=dr+u[Bt+1].cts;u[Bt].duration=un-Fr}else u[Bt].duration=Bt?u[Bt-1].duration:et;u[Bt].cts=0,Gt=dr}}}k=yt||!k?et:k,this.nextAvcDts=g=M+k,this.videoSampleDuration=k,this.isVideoContiguous=!0;const Ur={data1:He.moof(e.sequenceNumber++,B,l({},e,{samples:u})),data2:Rt,startPTS:G/i,endPTS:(X+k)/i,startDTS:B/i,endDTS:g/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 Ta}}remuxAudio(e,t,r,n,i){const s=e.inputTimeScale,u=e.samplerate?e.samplerate:s,f=s/u,m=this.getSamplesPerFrame(e),g=m*f,b=this._initPTS,k=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,B=[],M=i!==void 0;let G=e.samples,X=k?0:8,me=this.nextAudioPts||-1;const Ne=t*s,Be=b.baseTime*s/b.timescale;if(this.isAudioContiguous=r=r||G.length&&me>0&&(n&&Math.abs(Ne-me)<9e3||Math.abs(Cn(G[0].pts-Be,Ne)-me)<20*g),G.forEach(function(Vt){Vt.pts=Cn(Vt.pts-Be,Ne)}),!r||me<0){if(G=G.filter(Vt=>Vt.pts>=0),!G.length)return;i===0?me=0:n&&!M?me=Math.max(0,Ne):me=G[0].pts}if(e.segmentCodec==="aac"){const Vt=this.config.maxAudioFramesDrift;for(let Er=0,Ur=me;Er<G.length;Er++){const Gt=G[Er],Bt=Gt.pts,kr=Bt-Ur,dr=Math.abs(1e3*kr/s);if(kr<=-Vt*g&&M)Er===0&&(C.warn(`Audio frame @ ${(Bt/s).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3*kr/s)} ms.`),this.nextAudioPts=me=Ur=Bt);else if(kr>=Vt*g&&dr<As&&M){let Fr=Math.round(kr/g);Ur=Bt-Fr*g,Ur<0&&(Fr--,Ur+=g),Er===0&&(this.nextAudioPts=me=Ur),C.warn(`[mp4-remuxer]: Injecting ${Fr} audio frame @ ${(Ur/s).toFixed(3)}s due to ${Math.round(1e3*kr/s)} ms gap.`);for(let un=0;un<Fr;un++){const xn=Math.max(Ur,0);let Sn=Es.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);Sn||(C.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),Sn=Gt.unit.subarray()),G.splice(Er,0,{unit:Sn,pts:xn}),Ur+=g,Er++}}Gt.pts=Ur,Ur+=g}}let et=null,Ge=null,ct,Qe=0,vt=G.length;for(;vt--;)Qe+=G[vt].unit.byteLength;for(let Vt=0,Er=G.length;Vt<Er;Vt++){const Ur=G[Vt],Gt=Ur.unit;let Bt=Ur.pts;if(Ge!==null){const dr=B[Vt-1];dr.duration=Math.round((Bt-Ge)/f)}else if(r&&e.segmentCodec==="aac"&&(Bt=me),et=Bt,Qe>0){Qe+=X;try{ct=new Uint8Array(Qe)}catch(dr){this.observer.emit(d.ERROR,d.ERROR,{type:y.MUX_ERROR,details:v.REMUX_ALLOC_ERROR,fatal:!1,error:dr,bytes:Qe,reason:`fail allocating audio mdat ${Qe}`});return}k||(new DataView(ct.buffer).setUint32(0,Qe),ct.set(He.types.mdat,4))}else return;ct.set(Gt,X);const kr=Gt.byteLength;X+=kr,B.push(new D(!0,m,kr,0)),Ge=Bt}const Rt=B.length;if(!Rt)return;const ot=B[B.length-1];this.nextAudioPts=me=Ge+f*ot.duration;const yt=k?new Uint8Array(0):He.moof(e.sequenceNumber++,et/f,l({},e,{samples:B}));e.samples=[];const nr=et/s,Ft=me/s,er={data1:yt,data2:ct,startPTS:nr,endPTS:Ft,startDTS:nr,endDTS:Ft,type:"audio",hasAudio:!0,hasVideo:!1,nb:Rt};return this.isAudioContiguous=!0,er}remuxEmptyAudio(e,t,r,n){const i=e.inputTimeScale,s=e.samplerate?e.samplerate:i,u=i/s,f=this.nextAudioPts,m=this._initDTS,g=m.baseTime*9e4/m.timescale,b=(f!==null?f:n.startDTS*i)+g,k=n.endDTS*i+g,B=u*Ta,M=Math.ceil((k-b)/B),G=Es.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(C.warn("[mp4-remuxer]: remux empty Audio"),!G){C.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}const X=[];for(let me=0;me<M;me++){const Ne=b+me*B;X.push({unit:G,pts:Ne,dts:Ne})}return e.samples=X,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 Ja(a){for(let e=0;e<a.length;e++)if(a[e].key)return e;return-1}function Sa(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 D{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(R(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=Oe(e);n.audio&&(t=h(n.audio,K.AUDIO)),n.video&&(r=h(n.video,K.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"}:C.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:g}=this;const b={audio:void 0,video:void 0,text:n,id3:r,initSegment:void 0};H(g)||(g=this.lastEndTime=i||0);const k=t.samples;if(!(k!=null&&k.length))return b;const B={initPTS:void 0,timescale:1};let M=this.initData;if((u=M)!=null&&u.length||(this.generateInitSegment(k),M=this.initData),!((f=M)!=null&&f.length))return C.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),b;this.emitInitSegment&&(B.tracks=this.initTracks,this.emitInitSegment=!1);const G=Tt(k,M),X=se(M,k),me=X===null?i:X;(c(m,me,i,G)||B.timescale!==m.timescale&&s)&&(B.initPTS=me-i,m&&m.timescale===1&&C.warn(`Adjusting initPTS by ${B.initPTS-m.baseTime}`),this.initPTS=m={baseTime:B.initPTS,timescale:1});const Ne=e?me-m.baseTime/m.timescale:g,Be=Ne+G;Nt(M,k,m.baseTime/m.timescale),G>0?this.lastEndTime=Be:(C.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const et=!!M.audio,Ge=!!M.video;let ct="";et&&(ct+="audio"),Ge&&(ct+="video");const Qe={data1:k,startPTS:Ne,startDTS:Ne,endPTS:Be,endDTS:Be,type:ct,hasAudio:et,hasVideo:Ge,nb:1,dropped:0};return b.audio=Qe.type==="audio"?Qe:void 0,b.video=Qe.type!=="audio"?Qe:void 0,b.initSegment=B,b.id3=Sa(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===K.AUDIO){if(t==="ec-3"||t==="ac-3"||t==="alac")return t;if(t==="fLaC"||t==="Opus")return Cr(t,!1);const r="mp4a.40.5";return C.info(`Parsed audio codec "${t}" or audio object type not handled. Using "${r}"`),r}return C.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){C.debug("Unable to use Performance API on this environment"),p=Ze==null?void 0:Ze.Date.now}const w=[{demux:Ya,remux:o},{demux:Di,remux:as},{demux:ya,remux:as},{demux:Ys,remux:as}];w.splice(2,0,{demux:Ws,remux:as});class S{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:g,trackSwitch:b,accurateTimeOffset:k,timeOffset:B,initSegmentChange:M}=n||u,{audioCodec:G,videoCodec:X,defaultInitPts:me,duration:Ne,initSegmentData:Be}=f,et=j(s,t);if(et&&et.method==="AES-128"){const vt=this.getDecrypter();if(vt.isSync()){let Rt=vt.softwareDecrypt(s,et.key.buffer,et.iv.buffer);if(r.part>-1&&(Rt=vt.flush()),!Rt)return i.executeEnd=p(),ee(r);s=new Uint8Array(Rt)}else return this.decryptionPromise=vt.webCryptoDecrypt(s,et.key.buffer,et.iv.buffer).then(Rt=>{const ot=this.push(Rt,null,r);return this.decryptionPromise=null,ot}),this.decryptionPromise}const Ge=this.needsProbing(g,b);if(Ge){const vt=this.configureTransmuxer(s);if(vt)return C.warn(`[transmuxer] ${vt.message}`),this.observer.emit(d.ERROR,d.ERROR,{type:y.MEDIA_ERROR,details:v.FRAG_PARSING_ERROR,fatal:!1,error:vt,reason:vt.message}),i.executeEnd=p(),ee(r)}(g||b||M||Ge)&&this.resetInitSegment(Be,G,X,Ne,t),(g||M||Ge)&&this.resetInitialTimestamp(me),m||this.resetContiguity();const ct=this.transmux(s,et,B,k,r),Qe=this.currentTransmuxState;return Qe.contiguous=!0,Qe.discontinuity=!1,Qe.trackSwitch=!1,i.executeEnd=p(),ct}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(),[ee(e)];const g=f.flush(u);return he(g)?g.then(b=>(this.flushRemux(s,b,e),s)):(this.flushRemux(s,g,e),s)}flushRemux(e,t,r){const{audioTrack:n,videoTrack:i,id3Track:s,textTrack:u}=t,{accurateTimeOffset:f,timeOffset:m}=this.currentTransmuxState;C.log(`[transmuxer.ts]: Flushed fragment ${r.sn}${r.part>-1?" p: "+r.part:""} of level ${r.level}`);const g=this.remuxer.remux(n,i,s,u,m,f,!0,this.id);e.push({remuxResult:g,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 k=0,B=w.length;k<B;k++){var u;if((u=w[k].demux)!=null&&u.probe(e)){s=w[k];break}}if(!s)return new Error("Failed to find demuxer by probing fragment data");const f=this.demuxer,m=this.remuxer,g=s.remux,b=s.demux;(!m||!(m instanceof g))&&(this.remuxer=new g(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 ee=a=>({remuxResult:{},chunkMeta:a});function he(a){return"then"in a&&a.then instanceof Function}class Re{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 Ue{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 Ye={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,g){this.fn=f,this.context=m,this.once=g||!1}function i(f,m,g,b,k){if(typeof g!="function")throw new TypeError("The listener must be a function");var B=new n(g,b||f,k),M=t?t+m:m;return f._events[M]?f._events[M].fn?f._events[M]=[f._events[M],B]:f._events[M].push(B):(f._events[M]=B,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=[],g,b;if(this._eventsCount===0)return m;for(b in g=this._events)e.call(g,b)&&m.push(t?b.slice(1):b);return Object.getOwnPropertySymbols?m.concat(Object.getOwnPropertySymbols(g)):m},u.prototype.listeners=function(m){var g=t?t+m:m,b=this._events[g];if(!b)return[];if(b.fn)return[b.fn];for(var k=0,B=b.length,M=new Array(B);k<B;k++)M[k]=b[k].fn;return M},u.prototype.listenerCount=function(m){var g=t?t+m:m,b=this._events[g];return b?b.fn?1:b.length:0},u.prototype.emit=function(m,g,b,k,B,M){var G=t?t+m:m;if(!this._events[G])return!1;var X=this._events[G],me=arguments.length,Ne,Be;if(X.fn){switch(X.once&&this.removeListener(m,X.fn,void 0,!0),me){case 1:return X.fn.call(X.context),!0;case 2:return X.fn.call(X.context,g),!0;case 3:return X.fn.call(X.context,g,b),!0;case 4:return X.fn.call(X.context,g,b,k),!0;case 5:return X.fn.call(X.context,g,b,k,B),!0;case 6:return X.fn.call(X.context,g,b,k,B,M),!0}for(Be=1,Ne=new Array(me-1);Be<me;Be++)Ne[Be-1]=arguments[Be];X.fn.apply(X.context,Ne)}else{var et=X.length,Ge;for(Be=0;Be<et;Be++)switch(X[Be].once&&this.removeListener(m,X[Be].fn,void 0,!0),me){case 1:X[Be].fn.call(X[Be].context);break;case 2:X[Be].fn.call(X[Be].context,g);break;case 3:X[Be].fn.call(X[Be].context,g,b);break;case 4:X[Be].fn.call(X[Be].context,g,b,k);break;default:if(!Ne)for(Ge=1,Ne=new Array(me-1);Ge<me;Ge++)Ne[Ge-1]=arguments[Ge];X[Be].fn.apply(X[Be].context,Ne)}}return!0},u.prototype.on=function(m,g,b){return i(this,m,g,b,!1)},u.prototype.once=function(m,g,b){return i(this,m,g,b,!0)},u.prototype.removeListener=function(m,g,b,k){var B=t?t+m:m;if(!this._events[B])return this;if(!g)return s(this,B),this;var M=this._events[B];if(M.fn)M.fn===g&&(!k||M.once)&&(!b||M.context===b)&&s(this,B);else{for(var G=0,X=[],me=M.length;G<me;G++)(M[G].fn!==g||k&&!M[G].once||b&&M[G].context!==b)&&X.push(M[G]);X.length?this._events[B]=X.length===1?X[0]:X:s(this,B)}return this},u.prototype.removeAllListeners=function(m){var g;return m?(g=t?t+m:m,this._events[g]&&s(this,g)):(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})(Ye);var at=Ye.exports,dt=te(at);class St{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,g)=>{g=g||{},g.frag=this.frag,g.id=this.id,m===d.ERROR&&(this.error=g.error),this.hls.trigger(m,g)};this.observer=new dt,this.observer.on(d.FRAG_DECRYPTED,s),this.observer.on(d.ERROR,s);const u=jr(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?(C.log(`loading Web Worker ${i.workerPath} for "${t}"`),this.workerContext=zs(i.workerPath)):(C.log(`injecting Web Worker for "${t}"`),this.workerContext=Us()),this.onwmsg=b=>this.onWorkerMessage(b);const{worker:g}=this.workerContext;g.addEventListener("message",this.onwmsg),g.onerror=b=>{const k=new Error(`${b.message} (${b.filename}:${b.lineno})`);i.enableWorker=!1,C.warn(`Error in "${t}" Web Worker, fallback to inline`),this.hls.trigger(d.ERROR,{type:y.OTHER_ERROR,details:v.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:k})},g.postMessage({cmd:"init",typeSupported:f,vendor:"",id:t,config:JSON.stringify(i)})}catch(g){C.warn(`Error setting up "${t}" Web Worker, fallback to inline`,g),this.resetWorker(),this.error=null,this.transmuxer=new S(this.observer,f,i,"",t)}return}this.transmuxer=new S(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,g){var b,k;m.transmuxing.start=self.performance.now();const{transmuxer:B}=this,M=s?s.start:i.start,G=i.decryptdata,X=this.frag,me=!(X&&i.cc===X.cc),Ne=!(X&&m.level===X.level),Be=X?m.sn-X.sn:-1,et=this.part?m.part-this.part.index:-1,Ge=Be===0&&m.id>1&&m.id===(X==null?void 0:X.stats.chunkCount),ct=!Ne&&(Be===1||Be===0&&(et===1||Ge&&et<=0)),Qe=self.performance.now();(Ne||Be||i.stats.parsing.start===0)&&(i.stats.parsing.start=Qe),s&&(et||!ct)&&(s.stats.parsing.start=Qe);const vt=!(X&&((b=i.initSegment)==null?void 0:b.url)===((k=X.initSegment)==null?void 0:k.url)),Rt=new Ue(me,ct,f,Ne,M,vt);if(!ct||me||vt){C.log(`[transmuxer-interface, ${i.type}]: Starting new transmux session for sn: ${m.sn} p: ${m.part} level: ${m.level} id: ${m.id}
discontinuity: ${me}
trackSwitch: ${Ne}
contiguous: ${ct}
accurateTimeOffset: ${f}
timeOffset: ${M}
initSegmentChange: ${vt}`);const ot=new Re(r,n,t,u,g);this.configureTransmuxer(ot)}if(this.frag=i,this.part=s,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:e,decryptdata:G,chunkMeta:m,state:Rt},e instanceof ArrayBuffer?[e]:[]);else if(B){const ot=B.push(e,G,m,Rt);he(ot)?(B.async=!0,ot.then(yt=>{this.handleTransmuxComplete(yt)}).catch(yt=>{this.transmuxerError(yt,m,"transmuxer-interface push error")})):(B.async=!1,this.handleTransmuxComplete(ot))}}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);he(r)||t.async?(he(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:y.MEDIA_ERROR,details:v.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)){C.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":C[t.data.logType]&&C[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 Ut=100;class Zt extends ps{constructor(e,t,r){super(e,t,r,"[audio-stream-controller]",Le.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===lt.WAITING_INIT_PTS&&this.tick()}}startLoad(e){if(!this.levels){this.startPosition=e,this.state=lt.STOPPED;return}const t=this.lastCurrentTime;this.stopLoad(),this.setInterval(Ut),t>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t,this.state=lt.IDLE):(this.loadedmetadata=!1,this.state=lt.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}doTick(){switch(this.state){case lt.IDLE:this.doTickIdle();break;case lt.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=lt.WAITING_INIT_PTS}break}case lt.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=lt.IDLE}break}case lt.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=lt.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);Fi(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=lt.IDLE}}this.onTickEnd()}clearWaitingFragment(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=lt.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=lt.WAITING_TRACK;return}const f=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&f&&(this.bufferFlushed=!1,this.afterBufferFlushed(f,K.AUDIO,Le.AUDIO));const m=this.getFwdBufferInfo(f,Le.AUDIO);if(m===null)return;if(!this.switchingTrack&&this._streamEnded(m,u)){e.trigger(d.BUFFER_EOS,{type:"audio"}),this.state=lt.ENDED;return}const g=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,Le.MAIN),b=m.len,k=this.getMaxBufferLength(g==null?void 0:g.len),B=u.fragments,M=B[0].start,G=this.getLoadPosition(),X=this.flushing?G:m.end;if(this.switchingTrack&&r){const et=G;u.PTSKnown&&et<M&&(m.end>M||m.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),r.currentTime=M+.05)}if(b>=k&&!this.switchingTrack&&X<B[B.length-1].start)return;let me=this.getNextFragment(X,u),Ne=!1;if(me&&this.isLoopLoading(me,X)&&(Ne=!!me.gap,me=this.getNextFragmentLoopLoading(me,u,m,Le.MAIN,k)),!me){this.bufferFlushed=!0;return}const Be=g&&me.start>g.end+u.targetduration;if(Be||!(g!=null&&g.len)&&m.len){const et=this.getAppendedFrag(me.start,Le.MAIN);if(et===null||(Ne||(Ne=!!et.gap||!!Be&&g.len===0),Be&&!Ne||Ne&&m.nextStart&&m.nextStart<et.end))return}this.loadFragment(me,s,X)}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(Ut):this.resetTransmuxer(),r?(this.switchingTrack=t,this.state=lt.IDLE,this.flushAudioIfNeeded(t)):(this.switchingTrack=null,this.bufferedTrack=t,this.state=lt.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 g=this.mainDetails;if(i.deltaUpdateFailed||!g)return;if(!u.details&&i.hasProgramDateTime&&g.hasProgramDateTime)Zn(i,g),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===lt.WAITING_TRACK&&!this.waitForCdnTuneIn(i)&&(this.state=lt.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 g=m.details;if(!g){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 k=this.transmuxer;k||(k=this.transmuxer=new St(this.hls,Le.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const B=this.initPTS[r.cc],M=(t=r.initSegment)==null?void 0:t.data;if(B!==void 0){const X=n?n.index:-1,me=X!==-1,Ne=new Ps(r.level,r.sn,r.stats.chunkCount,i.byteLength,X,me);k.push(i,M,b,"",r,n,g.totalduration,!1,Ne,B)}else{this.log(`Unknown video PTS for cc ${r.cc}, waiting for video PTS before demuxing audio frag ${r.sn} of [${g.startSN} ,${g.endSN}],track ${u}`);const{cache:G}=this.waitingData=this.waitingData||{frag:r,part:n,cache:new Ns,complete:!1};G.push(new Uint8Array(i)),this.waitingVideoCC=this.videoTrackCC,this.state=lt.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!==Le.AUDIO){if(!this.loadedmetadata&&r.type===Le.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,Fe({},i)))}this.fragBufferedComplete(r,n)}onError(e,t){var r;if(t.fatal){this.state=lt.ERROR;return}switch(t.details){case v.FRAG_GAP:case v.FRAG_PARSING_ERROR:case v.FRAG_DECRYPT_ERROR:case v.FRAG_LOAD_ERROR:case v.FRAG_LOAD_TIMEOUT:case v.KEY_LOAD_ERROR:case v.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(Le.AUDIO,t);break;case v.AUDIO_TRACK_LOAD_ERROR:case v.AUDIO_TRACK_LOAD_TIMEOUT:case v.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===lt.WAITING_TRACK&&((r=t.context)==null?void 0:r.type)===ir.AUDIO_TRACK&&(this.state=lt.IDLE);break;case v.BUFFER_APPEND_ERROR:case v.BUFFER_FULL_ERROR:if(!t.parent||t.parent!=="audio")return;if(t.details===v.BUFFER_APPEND_ERROR){this.resetLoadingState();return}this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case v.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==K.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==K.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===lt.ENDED&&(this.state=lt.IDLE);const r=this.mediaBuffer||this.media;r&&(this.afterBufferFlushed(r,t,Le.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:g}=u,{details:b}=g,{audio:k,text:B,id3:M,initSegment:G}=i;if(this.fragContextChanged(f)||!b){this.fragmentTracker.removeFragment(f);return}if(this.state=lt.PARSING,this.switchingTrack&&k&&this.completeAudioSwitch(this.switchingTrack),G!=null&&G.tracks){const X=f.initSegment||f;this._bufferInitSegment(g,G.tracks,X,s),n.trigger(d.FRAG_PARSING_INIT_SEGMENT,{frag:X,id:r,tracks:G.tracks})}if(k){const{startPTS:X,endPTS:me,startDTS:Ne,endDTS:Be}=k;m&&(m.elementaryStreams[K.AUDIO]={startPTS:X,endPTS:me,startDTS:Ne,endDTS:Be}),f.setElementaryStreamInfo(K.AUDIO,X,me,Ne,Be),this.bufferFragmentData(k,f,m,s)}if(M!=null&&(t=M.samples)!=null&&t.length){const X=l({id:r,frag:f,details:b},M);n.trigger(d.FRAG_PARSING_METADATA,X)}if(B){const X=l({id:r,frag:f,details:b},B);n.trigger(d.FRAG_PARSING_USERDATA,X)}}_bufferInitSegment(e,t,r,n){if(this.state!==lt.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=lt.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,Fe({},e))}}function Jt(a,e){if(a.length!==e.length)return!1;for(let t=0;t<a.length;t++)if(!Xt(a[t].attrs,e[t].attrs))return!1;return!0}function Xt(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 Rr(a,e){return e.label.toLowerCase()===a.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(a.lang||"").toLowerCase())}class Lr 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(k=>!r||r.indexOf(k.groupId)!==-1);if(u.length)this.selectDefaultTrack&&!u.some(k=>k.default)&&(this.selectDefaultTrack=!1),u.forEach((k,B)=>{k.id=B});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=u;const f=this.hls.config.audioPreference;if(!i&&f){const k=Gn(f,u,Ai);if(k>-1)i=u[k];else{const B=Gn(f,this.tracks);i=this.tracks[B]}}let m=this.findTrackId(i);m===-1&&i&&(m=this.findTrackId(null));const g={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,g);const b=this.trackId;if(m!==-1&&b===-1)this.setAudioTrack(m);else if(u.length&&b===-1){var s;const k=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(k.message),this.hls.trigger(d.ERROR,{type:y.MEDIA_ERROR,details:v.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:k})}}else this.shouldReloadPlaylist(i)&&this.setAudioTrack(this.trackId)}onError(e,t){t.fatal||!t.context||t.context.type===ir.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,Fe({},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 g=t[m];if(fi({name:r,lang:n,assocLang:i,characteristics:s,audioCodec:u,channels:f},g,Ai))return m}for(let m=0;m<t.length;m++){const g=t[m];if(Xt(e.attrs,g.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return m}for(let m=0;m<t.length;m++){const g=t[m];if(Xt(e.attrs,g.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 Wr extends ps{constructor(e,t,r){super(e,t,r,"[subtitle-stream-controller]",Le.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=lt.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=lt.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,Le.SUBTITLE)}}onFragBuffered(e,t){if(!this.loadedmetadata&&t.frag.type===Le.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)===Le.SUBTITLE&&(t.details===v.FRAG_GAP&&this.fragmentTracker.fragBuffered(r,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==lt.STOPPED&&(this.state=lt.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&Jt(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,Le.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 k=b.fragments[0];if(!f.details)s.hasProgramDateTime&&b.hasProgramDateTime?(Zn(s,b),m=s.fragments[0].start):k&&(m=k.start,mt(s,m));else{var g;m=this.alignPlaylists(s,f.details,(g=this.levelLastLoaded)==null?void 0:g.details),m===0&&k&&(m=k.start,mt(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===lt.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:y.MEDIA_ERROR,details:v.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=lt.IDLE})}}doTick(){if(!this.media){this.state=lt.IDLE;return}if(this.state===lt.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,Le.MAIN),g=r.details,b=this.getMaxBufferLength(m==null?void 0:m.len)+g.levelTargetDuration;if(f>b)return;const k=g.fragments,B=k.length,M=g.edge;let G=null;const X=this.fragPrevious;if(u<M){const me=n.maxFragLookUpTolerance,Ne=u>M-me?0:me;G=Ei(X,k,Math.max(k[0].start,u),Ne),!G&&X&&X.start<k[0].start&&(G=k[0])}else G=k[B-1];if(!G)return;if(G=this.mapToInitFragWhenRequired(G),G.sn!=="initSegment"){const me=G.sn-g.startSN,Ne=k[me-1];Ne&&Ne.cc===G.cc&&this.fragmentTracker.getState(Ne)===on.NOT_LOADED&&(G=Ne)}this.fragmentTracker.getState(G)===on.NOT_LOADED&&this.loadFragment(G,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(g=>!r||r.indexOf(g.groupId)!==-1);if(s.length)this.selectDefaultTrack&&!s.some(g=>g.default)&&(this.selectDefaultTrack=!1),s.forEach((g,b)=>{g.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 g=Gn(u,s);if(g>-1)i=s[g];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(Xt(e.attrs,i.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return n}for(let n=0;n<t.length;n++){const i=t[n];if(Xt(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(Rr(n,e))return r}}return-1}onError(e,t){t.fatal||!t.context||t.context.type===ir.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=>Rr(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||!H(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:g}=n;this.hls.trigger(d.SUBTITLE_TRACK_SWITCH,{id:s,groupId:u,name:f,type:m,url:g});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){C.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 Dr=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/;class Kn{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&&C.error(`Media element src was set while attaching MediaSource (${n} > ${r})`)},this.hls=e;const t="[buffer-controller]";this.appendSource=Fn(jr(e.config.preferManagedMediaSource)),this.log=C.log.bind(C,t),this.warn=C.warn.bind(C,t),this.error=C.error.bind(C,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=jr(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),Qn(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:g,levelCodec:b,container:k,metadata:B}=t[s],M=wr(f.codec,f.levelCodec),G=M==null?void 0:M.replace(Dr,"$1");let X=wr(g,b);const me=(u=X)==null?void 0:u.replace(Dr,"$1");if(X&&G!==me){s.slice(0,5)==="audio"&&(X=Cr(X,this.appendSource));const Ne=`${k};codecs=${X}`;this.appendChangeType(s,Ne),this.log(`switching codec ${M} to ${X}`),this.tracks[s]={buffer:f.buffer,codec:g,container:k,levelCodec:b,metadata:B,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:g}=t,b=g.buffering[u],k=self.performance.now();b.start=k;const B=f.stats.buffering,M=m?m.stats.buffering:null;B.start===0&&(B.start=k),M&&M.start===0&&(M.start=k);const G=i.audio;let X=!1;u==="audio"&&(G==null?void 0:G.container)==="audio/mpeg"&&(X=!this.lastMpegAudioChunk||g.id===1||this.lastMpegAudioChunk.sn!==g.sn,this.lastMpegAudioChunk=g);const me=f.start,Ne={execute:()=>{if(b.executeStart=self.performance.now(),X){const Be=this.sourceBuffer[u];if(Be){const et=me-Be.timestampOffset;Math.abs(et)>=.1&&(this.log(`Updating audio SourceBuffer timestampOffset to ${me} (delta: ${et}) sn: ${f.sn})`),Be.timestampOffset=me)}}this.appendExecutor(s,u)},onStart:()=>{},onComplete:()=>{const Be=self.performance.now();b.executeEnd=b.end=Be,B.first===0&&(B.first=Be),M&&M.first===0&&(M.first=Be);const{sourceBuffer:et}=this,Ge={};for(const ct in et)Ge[ct]=Mr.getBuffered(et[ct]);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:g,parent:f.type,timeRanges:Ge})},onError:Be=>{const et={type:y.MEDIA_ERROR,parent:f.type,details:v.BUFFER_APPEND_ERROR,sourceBufferName:u,frag:f,part:m,chunkMeta:g,error:Be,err:Be,fatal:!1};if(Be.code===DOMException.QUOTA_EXCEEDED_ERR)et.details=v.BUFFER_FULL_ERROR;else{const Ge=++this.appendErrors[u];et.details=v.BUFFER_APPEND_ERROR,this.warn(`Failed ${Ge}/${r.config.appendErrorMaxRetry} times to append segment in "${u}" sourceBuffer`),Ge>=r.config.appendErrorMaxRetry&&(et.fatal=!0)}r.trigger(d.ERROR,et)}};n.append(Ne,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[K.AUDIOVIDEO]?i.push("audiovideo"):(s[K.AUDIO]&&i.push("audio"),s[K.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(H(f)&&f>0){const m=Math.max(f,u),g=Math.floor(s/u)*u-m;this.flushBackBuffer(s,u,g)}if(H(i.frontBufferFlushThreshold)&&i.frontBufferFlushThreshold>0){const m=Math.max(i.maxBufferLength,i.frontBufferFlushThreshold),g=Math.max(m,u),b=Math.floor(s/u)*u+g;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 g=f.start(m-1),b=f.end(m-1);if(r>g||e>=g&&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:g,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=H(n.duration)?n.duration:0;e.live&&t.config.liveDurationInfinity?(n.duration=1/0,this.updateSeekableRange(e)):(i>u&&i>s||!H(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:y.MEDIA_ERROR,details:v.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=Cr(u,this.appendSource));const f=`${s.container};codecs=${u}`;this.log(`creating sourceBuffer(${f})`);try{const m=t[i]=r.addSourceBuffer(f),g=i;this.addBufferListener(g,"updatestart",this._onSBUpdateStart),this.addBufferListener(g,"updateend",this._onSBUpdateEnd),this.addBufferListener(g,"error",this._onSBUpdateError),this.appendSource&&this.addBufferListener(g,"bufferedchange",(b,k)=>{const B=k.removedRanges;B!=null&&B.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:y.MEDIA_ERROR,details:v.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:y.MEDIA_ERROR,details:v.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=H(n.duration)?n.duration:1/0,g=H(i.duration)?i.duration:1/0,b=Math.max(0,t),k=Math.min(r,m,g);k>b&&(!f.ending||f.ended)?(f.ended=!1,this.log(`Removing [${b},${k}] from the ${e} SourceBuffer`),f.remove(b,k)):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 Qn(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},Qi={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},Ji={25:2,26:4,29:6,30:8,31:10,27:13,28:15},Ss=["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;C.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 Qs{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 Qs(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 Js{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=Jo(),this.logger=void 0;const n=this.logger=new Ds;this.channels=[null,new Js(e,t,n),new Js(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(Qo(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 g=this.currentChannel;g&&g>0?this.channels[g].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]:Qi[e]:r=s===1?Xi[e]:Ji[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=Ss[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 Qo(a,e,t){return t.a===a&&t.b===e}function Jo(){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(Ze!=null&&Ze.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 g=arguments[m];for(const b in g)u[b]=g[b]}return u}function s(u,f,m){const g=this,b={enumerable:!0};g.hasBeenReset=!1;let k="",B=!1,M=u,G=f,X=m,me=null,Ne="",Be=!0,et="auto",Ge="start",ct=50,Qe="middle",vt=50,Rt="middle";Object.defineProperty(g,"id",i({},b,{get:function(){return k},set:function(ot){k=""+ot}})),Object.defineProperty(g,"pauseOnExit",i({},b,{get:function(){return B},set:function(ot){B=!!ot}})),Object.defineProperty(g,"startTime",i({},b,{get:function(){return M},set:function(ot){if(typeof ot!="number")throw new TypeError("Start time must be set to a number.");M=ot,this.hasBeenReset=!0}})),Object.defineProperty(g,"endTime",i({},b,{get:function(){return G},set:function(ot){if(typeof ot!="number")throw new TypeError("End time must be set to a number.");G=ot,this.hasBeenReset=!0}})),Object.defineProperty(g,"text",i({},b,{get:function(){return X},set:function(ot){X=""+ot,this.hasBeenReset=!0}})),Object.defineProperty(g,"region",i({},b,{get:function(){return me},set:function(ot){me=ot,this.hasBeenReset=!0}})),Object.defineProperty(g,"vertical",i({},b,{get:function(){return Ne},set:function(ot){const yt=r(ot);if(yt===!1)throw new SyntaxError("An invalid or illegal string was specified.");Ne=yt,this.hasBeenReset=!0}})),Object.defineProperty(g,"snapToLines",i({},b,{get:function(){return Be},set:function(ot){Be=!!ot,this.hasBeenReset=!0}})),Object.defineProperty(g,"line",i({},b,{get:function(){return et},set:function(ot){if(typeof ot!="number"&&ot!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");et=ot,this.hasBeenReset=!0}})),Object.defineProperty(g,"lineAlign",i({},b,{get:function(){return Ge},set:function(ot){const yt=n(ot);if(!yt)throw new SyntaxError("An invalid or illegal string was specified.");Ge=yt,this.hasBeenReset=!0}})),Object.defineProperty(g,"position",i({},b,{get:function(){return ct},set:function(ot){if(ot<0||ot>100)throw new Error("Position must be between 0 and 100.");ct=ot,this.hasBeenReset=!0}})),Object.defineProperty(g,"positionAlign",i({},b,{get:function(){return Qe},set:function(ot){const yt=n(ot);if(!yt)throw new SyntaxError("An invalid or illegal string was specified.");Qe=yt,this.hasBeenReset=!0}})),Object.defineProperty(g,"size",i({},b,{get:function(){return vt},set:function(ot){if(ot<0||ot>100)throw new Error("Size must be between 0 and 100.");vt=ot,this.hasBeenReset=!0}})),Object.defineProperty(g,"align",i({},b,{get:function(){return Rt},set:function(ot){const yt=n(ot);if(!yt)throw new SyntaxError("An invalid or illegal string was specified.");Rt=yt,this.hasBeenReset=!0}})),g.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(k,B){let M;switch(k){case"region":for(let G=t.length-1;G>=0;G--)if(t[G].id===B){m.set(k,t[G].region);break}break;case"vertical":m.alt(k,B,["rl","lr"]);break;case"line":M=B.split(","),m.integer(k,M[0]),m.percent(k,M[0])&&m.set("snapToLines",!1),m.alt(k,M[0],["auto"]),M.length===2&&m.alt("lineAlign",M[1],["start",Ca,"end"]);break;case"position":M=B.split(","),m.percent(k,M[0]),M.length===2&&m.alt("positionAlign",M[1],["start",Ca,"end","line-left","line-right","auto"]);break;case"size":m.percent(k,B);break;case"align":m.alt(k,B,["start",Ca,"end","left","right"]);break}},/:/,/\s/),f.region=m.get("region",null),f.vertical=m.get("vertical","");let g=m.get("line","auto");g==="auto"&&io.line===-1&&(g=-1),f.line=g,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(!H(t)||!H(r)||!H(n)||!H(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=_t(new Uint8Array(a)).trim().replace(il,`
`).split(`
`),m=[],g=e?Ea(e.baseTime,e.timescale):0;let b="00:00.000",k=0,B=0,M,G=!0;u.oncue=function(X){const me=t[r];let Ne=t.ccOffset;const Be=(k-g)/9e4;if(me!=null&&me.new&&(B!==void 0?Ne=t.ccOffset=me.start:al(t,r,Be)),Be){if(!e){M=new Error("Missing initPTS for VTT MPEGTS");return}Ne=Be-t.presentationOffset}const et=X.endTime-X.startTime,Ge=Cn((X.startTime+Ne-B)*9e4,n*9e4)/9e4;X.startTime=Math.max(Ge,0),X.endTime=Math.max(Ge+et,0);const ct=X.text.trim();X.text=decodeURIComponent(encodeURIComponent(ct)),X.id||(X.id=oo(X.startTime,X.endTime,ct)),X.endTime>0&&m.push(X)},u.onparsingerror=function(X){M=X},u.onflush=function(){if(M){s(M);return}i(m)},f.forEach(X=>{if(G)if(so(X,"X-TIMESTAMP-MAP=")){G=!1,X.slice(16).split(",").forEach(me=>{so(me,"LOCAL:")?b=me.slice(6):so(me,"MPEGTS:")&&(k=parseInt(me.slice(7)))});try{B=sl(b)/1e3}catch(me){M=me}return}else X===""&&(G=!1);u.parse(X+`
`)}),u.flush()}const lo="stpp.ttml.im1t",To=/^(\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 So(a,e,t,r){const n=ue(new Uint8Array(a),["mdat"]);if(n.length===0){r(new Error("Could not parse IMSC1 mdat"));return}const i=n.map(u=>_t(u)),s=Qa(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,k)=>(b[k]=n.getAttribute(`ttp:${k}`)||i[k],b),{}),u=n.getAttribute("xml:space")!=="preserve",f=Do(uo(n,"styling","style")),m=Do(uo(n,"layout","region")),g=uo(n,"body","[begin]");return[].map.call(g,b=>{const k=ko(b,u);if(!k||!b.hasAttribute("begin"))return null;const B=ho(b.getAttribute("begin"),s),M=ho(b.getAttribute("dur"),s);let G=ho(b.getAttribute("end"),s);if(B===null)throw Co(b);if(G===null){if(M===null)throw Co(b);G=B+M}const X=new no(B-e,G-e,k);X.id=oo(X.startTime,X.endTime,X.text);const me=m[b.getAttribute("region")],Ne=f[b.getAttribute("style")],Be=cl(me,Ne,f),{textAlign:et}=Be;if(et){const Ge=ll[et];Ge&&(X.lineAlign=Ge),X.align=et}return l(X,Be),X}).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&&(To.test(a)?t=hl(a,e):Ao.test(a)&&(t=fl(a,e))),t}function hl(a,e){const t=To.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(Jt(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 g;if(u){let b=null;for(let k=0;k<u.length;k++)if(u[k]&&Lo(u[k],f)){b=u[k],u[k]=null;break}b&&(g=b)}if(g)En(g);else{const b=Ro(f);g=this.createTextTrack(b,f.name,f.lang),g&&(g.mode="disabled")}g&&this.textTracks.push(g)}),u!=null&&u.length){const f=u.filter(m=>m!==null).map(m=>m.label);f.length&&C.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===Le.MAIN){var r,n;const{cea608Parser1:i,cea608Parser2:s,lastSn:u}=this,{cc:f,sn:m}=t.frag,g=(r=(n=t.part)==null?void 0:n.index)!=null?r:-1;i&&s&&(m!==u+1||m===u&&g!==this.lastPartIndex+1||f!==this.lastCc)&&(i.reset(),s.reset()),this.lastCc=f,this.lastSn=m,this.lastPartIndex=g}}onFragLoaded(e,t){const{frag:r,payload:n}=t;if(r.type===Le.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;So(t,this.initPTS[e.cc],n=>{this._appendCues(n,e.level),r.trigger(d.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},n=>{C.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?Ht(r.initSegment.data,new Uint8Array(n)):n;ol(m,this.initPTS[r.cc],this.vttCCs,r.cc,r.start,g=>{this._appendCues(g,r.level),f.trigger(d.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:r})},g=>{const b=g.message==="Missing initPTS for VTT MPEGTS";b?s.push(e):this._fallbackToIMSC1(r,n),C.log(`Failed to parse VTT cue: ${g}`),!(b&&u>r.cc)&&f.trigger(d.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:g})})}_fallbackToIMSC1(e,t){const r=this.tracks[e.level];r.textCodec||So(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===Le.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===Le.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 g=3&s;(g===0||g===1)&&(t[g].push(u),t[g].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)&&Rr(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&&H(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&&C.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 g=m.currentLevel;C.warn("drop FPS ratio greater than max allowed value for currentLevel: "+g),g>0&&(m.autoLevelCapping===-1||m.autoLevelCapping>=g)&&(g=g-1,m.trigger(d.FPS_DROP_LEVEL_CAPPING,{level:g,droppedLevel:m.currentLevel}),m.autoLevelCapping=g,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=C.debug.bind(C,Ra),this.log=C.log.bind(C,Ra),this.warn=C.warn.bind(C,Ra),this.error=C.error.bind(C,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=sr(this.config));const u=s.map(tr).filter(f=>!!f);this.keyFormatPromise=this.getKeyFormatPromise(u)}this.keyFormatPromise.then(s=>{const u=$t(s);let f,m;if(r==="sinf"){if(u!==it.FAIRPLAY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${r}" for selected key-system ${u}`);return}const M=wt(new Uint8Array(n));try{const G=E(JSON.parse(M).sinf),X=ft(G);if(!X)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");f=X.subarray(8,24),m=it.FAIRPLAY}catch(G){this.warn(`${i} Failed to parse sinf: ${G}`);return}}else{if(u!==it.WIDEVINE&&u!==it.PLAYREADY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${r}" for selected key-system ${u}`);return}const M=Kr(n),G=M.filter(me=>!!me.systemId&&nt(me.systemId)===u);G.length>1&&this.warn(`${i} Using first of ${G.length} pssh found for selected key-system ${u}`);const X=G[0];if(!X){M.length===0||M.some(me=>!me.systemId)?this.warn(`${i} contains incomplete or invalid pssh data`):this.log(`ignoring ${i} for ${M.map(me=>nt(me.systemId)).join(",")} pssh data in favor of playlist keys`);return}if(m=nt(X.systemId),X.version===0&&X.data)if(m===it.WIDEVINE){const me=X.data.length-22;f=X.data.subarray(me,me+16)}else m===it.PLAYREADY&&(f=It(X.data))}if(!m||!f){this.log(`Unable to handle ${i} with key-system ${u}`);return}const g=gt.hexDump(f),{keyIdToKeySessionPromise:b,mediaKeySessions:k}=this;let B=b[g];for(let M=0;M<k.length;M++){const G=k[M],X=G.decryptdata;if(!X.keyId)continue;const me=gt.hexDump(X.keyId);if(g===me||X.uri.replace(/-/g,"").indexOf(g)!==-1){if(B=b[me],X.pssh)break;delete b[me],X.pssh=new Uint8Array(n),X.keyId=f,B=b[g]=B.then(()=>this.generateRequestWithPreferredKeySession(G,r,n,"encrypted-event-key-match")),B.catch(Ne=>this.handleError(Ne));break}}if(!B){if(m!==u){this.log(`Ignoring "${i}" with ${m} init data for selected key-system ${u}`);return}B=b[g]=this.getKeySystemSelectionPromise([m]).then(({keySystem:M,mediaKeys:G})=>{var X;this.throwIfDestroyed();const me=new or("ISO-23001-7",g,(X=tr(M))!=null?X:"");return me.pssh=new Uint8Array(n),me.keyId=f,this.attemptSetMediaKeys(M,G).then(()=>{this.throwIfDestroyed();const Ne=this.createMediaKeySessionContext({decryptdata:me,keySystem:M,mediaKeys:G});return this.generateRequestWithPreferredKeySession(Ne,r,n,"encrypted-event-no-match")})}),B.catch(M=>this.handleError(M))}})}},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===it.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 g=m.shift();this.getMediaKeysPromise(g,n,i).then(b=>s({keySystem:g,mediaKeys:b})).catch(b=>{m.length?f(m):b instanceof ii?u(b):u(new ii({type:y.KEY_SYSTEM_ERROR,details:v.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 _r===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=ar(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(g=>(this.log(`Media-keys created for "${e}"`),m.then(b=>b?this.setMediaKeysServerCertificate(g,e,b):g))),u.mediaKeys.catch(g=>{this.error(`Failed to create media-keys for "${e}"}: ${g}`)}),u.mediaKeys})}return s.then(()=>i.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:r}){this.log(`Creating key-system session "${t}" keyId: ${gt.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 gt.hexDump(e.keyId)}updateKeySession(e,t){var r;const n=e.mediaKeysSession;return this.log(`Updating key-session "${n.sessionId}" for keyID ${gt.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=sr(this.config),i=e.map($t).filter(s=>!!s&&n.indexOf(s)!==-1);return this.getKeySystemSelectionPromise(i).then(({keySystem:s})=>{const u=tr(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:y.KEY_SYSTEM_ERROR,details:v.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),r=this.keyIdToKeySessionPromise[t];if(!r){const n=$t(e.keyFormat),i=n?[n]:sr(this.config);return this.attemptKeySystemAccess(i)}return r}getKeySystemSelectionPromise(e){if(e.length||(e=sr(this.config)),e.length===0)throw new ii({type:y.KEY_SYSTEM_ERROR,details:v.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 M=u.call(this.hls,t,r,e);if(!M)throw new Error("Invalid response from configured generateRequest filter");t=M.initDataType,r=e.decryptdata.pssh=M.initData?new Uint8Array(M.initData):null}catch(M){var f;if(this.warn(M.message),(f=this.hls)!=null&&f.config.debug)throw M}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 g=new dt,b=e._onmessage=M=>{const G=e.mediaKeysSession;if(!G){g.emit("error",new Error("invalid state"));return}const{messageType:X,message:me}=M;this.log(`"${X}" message event for session "${G.sessionId}" message size: ${me.byteLength}`),X==="license-request"||X==="license-renewal"?this.renewLicense(e,me).catch(Ne=>{this.handleError(Ne),g.emit("error",Ne)}):X==="license-release"?e.keySystem===it.FAIRPLAY&&(this.updateKeySession(e,$e("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${X}"`)},k=e._onkeystatuseschange=M=>{if(!e.mediaKeysSession){g.emit("error",new Error("invalid state"));return}this.onKeyStatusChange(e);const X=e.keyStatus;g.emit("keyStatus",X),X==="expired"&&(this.warn(`${e.keySystem} expired for key ${m}`),this.renewKeySession(e))};e.mediaKeysSession.addEventListener("message",b),e.mediaKeysSession.addEventListener("keystatuseschange",k);const B=new Promise((M,G)=>{g.on("error",G),g.on("keyStatus",X=>{X.startsWith("usable")?M():X==="output-restricted"?G(new ii({type:y.KEY_SYSTEM_ERROR,details:v.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):X==="internal-error"?G(new ii({type:y.KEY_SYSTEM_ERROR,details:v.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${X}"`)):X==="expired"?G(new Error("key expired while generating request")):this.warn(`unhandled key status change "${X}"`)})});return e.mediaKeysSession.generateRequest(t,r).then(()=>{var M;this.log(`Request generated for key-session "${(M=e.mediaKeysSession)==null?void 0:M.sessionId}" keyId: ${m}`)}).catch(M=>{throw new ii({type:y.KEY_SYSTEM_ERROR,details:v.KEY_SYSTEM_NO_SESSION,error:M,fatal:!1},`Error generating key-session request: ${M}`)}).then(()=>B).catch(M=>{throw g.removeAllListeners(),this.removeSession(e),M}).then(()=>(g.removeAllListeners(),e))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach((t,r)=>{this.log(`key status change "${t}" for keyStatuses keyId: ${gt.hexDump("buffer"in r?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new Uint8Array(r))} session keyId: ${gt.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,g={loadPolicy:m,timeout:m.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},b={onSuccess:(k,B,M,G)=>{s(k.data)},onError:(k,B,M,G)=>{u(new ii({type:y.KEY_SYSTEM_ERROR,details:v.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:M,response:Fe({url:f.url,data:void 0},k)},`"${e}" certificate request failed (${i}). Status: ${k.code} (${k.text})`))},onTimeout:(k,B,M)=>{u(new ii({type:y.KEY_SYSTEM_ERROR,details:v.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:M,response:{url:f.url,data:void 0}},`"${e}" certificate request timed out (${i})`))},onAbort:(k,B,M)=>{u(new Error("aborted"))}};n.load(f,g,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:y.KEY_SYSTEM_ERROR,details:v.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:y.KEY_SYSTEM_ERROR,details:v.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 g;for(let b=0,k=i.length;b<k;b++){var s,u;g=i[b];const B=(s=g.querySelector("name"))==null?void 0:s.textContent,M=(u=g.querySelector("value"))==null?void 0:u.textContent;B&&M&&e.setRequestHeader(B,M)}}const f=n.querySelector("Challenge"),m=f==null?void 0:f.textContent;if(!m)throw new Error("Cannot find <Challenge> in key message");return $e(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(g){this.error(g)}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:y.KEY_SYSTEM_ERROR,details:v.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 g=m-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${g} 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==it.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={},or.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 Tl(a){return a<-999999999999999||999999999999999<a}const Al=/[\x00-\x1f\x7f]+/,Sl="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 Mo(a){if(Tl(a))throw ki(a,El);return a.toString()}function Ll(a){return`@${Mo(a.getTime()/1e3)}`}function Fo(a,e){if(a<0)return-Fo(-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=Fo(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 Ml(a){return a.description||a.toString().slice(7,-1)}function Bo(a){const e=Ml(a);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw ki(e,Sl);return e}function mo(a){switch(typeof a){case"number":if(!H(a))throw ki(a,Po);return Number.isInteger(a)?Mo(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 Fl(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+=Fl(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"?H(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),Kl=(a,e)=>(e!=null&&e.baseUrl&&(a=$l(a,e.baseUrl)),encodeURIComponent(a)),Ia=a=>La(a/100)*100,Hl={br:La,d:La,bl:Ia,dl:Ia,mtp:Ia,nor:Kl,rtp:Ia,tb:La};function Wl(a,e){const t={};if(a==null||typeof a!="object")return t;const r=Object.keys(a).sort(),n=l({},Hl,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(Wl(a,e),l({whitespace:!1},e)):""}function jl(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,g]=s,b=((u=r.find(k=>k[1].includes(m)))==null?void 0:u[0])||os.REQUEST;return(f=i[b])!=null||(i[b]={}),i[b][m]=g,i},{});return Object.entries(n).reduce((i,[s,u])=>(i[s]=Uo(u,e),i),{})}function Vl(a,e,t){return l(a,jl(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){C.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){C.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 Ql=3e5;class Jl{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=C.log.bind(C,"[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)===Dt.SendAlternateToPenaltyBox&&r.flags===fr.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||C.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]>Ql&&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===ir.AUDIO_TRACK&&n[i].hasAudioGroup(e)||t===ir.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(g=>g.pathwayId===s))return;const m=this.getLevelsForPathway(u).map(g=>{const b=new ce(g.attrs);b["PATHWAY-ID"]=s;const k=b.AUDIO&&`${b.AUDIO}_clone_${s}`,B=b.SUBTITLES&&`${b.SUBTITLES}_clone_${s}`;k&&(r[b.AUDIO]=k,b.AUDIO=k),B&&(n[b.SUBTITLES]=B,b.SUBTITLES=B);const M=Go(g.uri,b["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",f),G=new gn({attrs:b,audioCodec:g.audioCodec,bitrate:g.bitrate,height:g.height,name:g.name,url:M,videoCodec:g.videoCodec,width:g.width});if(g.audioGroups)for(let X=1;X<g.audioGroups.length;X++)G.addGroupId("audio",`${g.audioGroups[X]}_clone_${s}`);if(g.subtitleGroups)for(let X=1;X<g.subtitleGroups.length;X++)G.addGroupId("text",`${g.subtitleGroups[X]}_clone_${s}`);return G});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(g){this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(n.protocol!=="data:"){const g=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;n.searchParams.set("_HLS_pathway",this.pathwayId),n.searchParams.set("_HLS_throughput",""+g)}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:(g,b,k,B)=>{this.log(`Loaded steering manifest: "${n}"`);const M=g.data;if(M.VERSION!==1){this.log(`Steering VERSION ${M.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=M.TTL;const{"RELOAD-URI":G,"PATHWAY-CLONES":X,"PATHWAY-PRIORITY":me}=M;if(G)try{this.uri=new self.URL(G,n).href}catch(Be){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${G}`);return}this.scheduleRefresh(this.uri||k.url),X&&this.clonePathways(X);const Ne={steeringManifest:M,url:n.toString()};this.hls.trigger(d.STEERING_MANIFEST_LOADED,Ne),me&&this.updatePathwayPriority(me)},onError:(g,b,k,B)=>{if(this.log(`Error loading steering manifest: ${g.code} ${g.text} (${b.url})`),this.stopLoad(),g.code===410){this.enabled=!1,this.log(`Steering manifest ${b.url} no longer available`);return}let M=this.timeToLoad*1e3;if(g.code===429){const G=this.loader;if(typeof(G==null?void 0:G.getResponseHeader)=="function"){const X=G.getResponseHeader("Retry-After");X&&(M=parseFloat(X)*1e3)}this.log(`Steering manifest ${b.url} rate limited`);return}this.scheduleRefresh(this.uri||b.url,M)},onTimeout:(g,b,k)=>{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 ce(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 Ko{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 Ce,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&&H(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 k=t.responseType==="arraybuffer"?b.byteLength:b.length;if(r.loaded=r.total=k,r.bwEstimate=r.total*8e3/(r.loading.end-r.loading.first),!this.callbacks)return;const B=this.callbacks.onProgress;if(B&&B(r,e,b,t),!this.callbacks)return;const M={url:t.responseURL,data:b,code:s};this.callbacks.onSuccess(M,r,e,t);return}}const f=i.loadPolicy.errorRetry,m=r.retry,g={url:e.url,data:void 0,code:s};$n(f,m,!1,g)?this.retry(f):(C.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;C.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++,C.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 Ho{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 Ce}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:g}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=r,this.request=this.fetchSetup(e,i),self.clearTimeout(this.requestTimeout),t.timeout=m&&H(m)?m:g,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 k=Math.max(self.performance.now(),n.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=g,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),r.onTimeout(n,e,this.response)},g-(k-n.loading.start)),!b.ok){const{status:B,statusText:M}=b;throw new o0(M||"fetch, bad network response",B,b)}return n.loading.first=k,n.total=s0(b.headers)||n.total,s&&H(t.highWaterMark)?this.loadProgressively(b,n,e,t.highWaterMark,s):u?b.arrayBuffer():e.responseType==="json"?b.json():b.text()}).then(b=>{const k=this.response;if(!k)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),n.loading.end=Math.max(self.performance.now(),n.loading.first);const B=b[f];B&&(n.loaded=n.total=B);const M={url:k.url,data:b,code:k.status};s&&!H(t.highWaterMark)&&s(n,e,b,k),r.onSuccess(M,n,e,k)}).catch(b=>{if(self.clearTimeout(this.requestTimeout),n.aborted)return;const k=b&&b.code||0,B=b?b.message:null;r.onError({code:k,text:B},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 g=m.value,b=g.length;return t.loaded+=b,b<n||s.dataLength?(s.push(g),s.dataLength>=n&&i(t,r,s.flush(),e)):i(t,r,g,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(H(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 g=self.VTTCue||self.TextTrackCue;for(let k=0;k<r.rows.length;k++)if(i=r.rows[k],u=!0,f=0,m="",!i.isEmpty()){var b;for(let G=0;G<i.chars.length;G++)l0.test(i.chars[G].uchar)&&u?f++:(m+=i.chars[G].uchar,u=!1);i.cueStartTime=e,e===t&&(t+=1e-4),f>=16?f--:f++;const B=Eo(m.trim()),M=oo(e,t,B);a!=null&&(b=a.cues)!=null&&b.getCueById(M)||(s=new g(e,t,B),s.id=M,s.line=k+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((k,B)=>k.line==="auto"||B.line==="auto"?0:k.line>8&&B.line>8?B.line-k.line:k.line-B.line),n.forEach(k=>li(a,k))),n}},c0={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},Wo=Fe(Fe({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:Ko,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:us,bufferController:Kn,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:_r,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:Wr,subtitleTrackController:yn,timelineController:dl,audioStreamController:Zt,audioTrackController:Lr,emeController:Cs,cmcdController:Xl,contentSteeringController:Jl});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 g=`${i}Loading${m}`,b=e[g];if(b!==void 0&&u){f.push(g);const k=t[s].default;switch(e[s]={default:k},m){case"TimeOut":k.maxLoadTimeMs=b,k.maxTimeToFirstByteMs=b;break;case"MaxRetry":k.errorRetry.maxNumRetry=b,k.timeoutRetry.maxNumRetry=b;break;case"RetryDelay":k.errorRetry.retryDelayMs=b,k.timeoutRetry.retryDelayMs=b;break;case"MaxRetryTimeout":k.errorRetry.maxRetryDelayMs=b,k.timeoutRetry.maxRetryDelayMs=b;break}}}),f.length&&C.warn(`hls.js config: "${f.join('", "')}" setting(s) are deprecated, use "${s}": ${JSON.stringify(e[s])}`)}),Fe(Fe({},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!==Ho&&e!==Ko?(C.log("[config]: Custom loader detected, cannot enable progressive streaming"),a.progressive=!1):t0()&&(a.loader=Ho,a.progressive=!0,a.enableSoftwareAES=!0,C.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(g=>{var b,k;const B=g.attrs;let{audioCodec:M,videoCodec:G}=g;((b=M)==null?void 0:b.indexOf("mp4a.40.34"))!==-1&&(yo||(yo=/chrome|firefox/i.test(navigator.userAgent)),yo&&(g.audioCodec=M=void 0)),M&&(g.audioCodec=M=Cr(M,r)),((k=G)==null?void 0:k.indexOf("avc1"))===0&&(G=g.videoCodec=an(G));const{width:X,height:me,unknownCodecs:Ne}=g;if(u||(u=!!(X&&me)),f||(f=!!G),m||(m=!!M),Ne!=null&&Ne.length||M&&!Or(M,"audio",r)||G&&!Or(G,"video",r))return;const{CODECS:Be,"FRAME-RATE":et,"HDCP-LEVEL":Ge,"PATHWAY-ID":ct,RESOLUTION:Qe,"VIDEO-RANGE":vt}=B,ot=`${`${ct||"."}-`}${g.bitrate}-${Qe}-${et}-${Be}-${vt}-${Ge}`;if(i[ot])if(i[ot].uri!==g.url&&!g.attrs["PATHWAY-ID"]){const yt=s[ot]+=1;g.attrs["PATHWAY-ID"]=new Array(yt+1).join(".");const nr=new gn(g);i[ot]=nr,n.push(nr)}else i[ot].addGroupId("audio",B.AUDIO),i[ot].addGroupId("text",B.SUBTITLES);else{const yt=new gn(g);i[ot]=yt,s[ot]=1,n.push(yt)}}),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:M,videoRange:G,width:X,height:me})=>(!!M||!!(X&&me))&&qr(G))),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 M=new Error("no level with compatible codecs found in manifest");this.hls.trigger(d.ERROR,{type:y.MEDIA_ERROR,details:v.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:M,reason:M.message})}});return}if(t.audioTracks){const{preferManagedMediaSource:M}=this.hls.config;s=t.audioTracks.filter(G=>!G.audioCodec||Or(G.audioCodec,"audio",M)),jo(s)}t.subtitles&&(u=t.subtitles,jo(u));const m=f.slice(0);f.sort((M,G)=>{if(M.attrs["HDCP-LEVEL"]!==G.attrs["HDCP-LEVEL"])return(M.attrs["HDCP-LEVEL"]||"")>(G.attrs["HDCP-LEVEL"]||"")?1:-1;if(r&&M.height!==G.height)return M.height-G.height;if(M.frameRate!==G.frameRate)return M.frameRate-G.frameRate;if(M.videoRange!==G.videoRange)return Nn.indexOf(M.videoRange)-Nn.indexOf(G.videoRange);if(M.videoCodec!==G.videoCodec){const X=fn(M.videoCodec),me=fn(G.videoCodec);if(X!==me)return me-X}if(M.uri===G.uri&&M.codecSet!==G.codecSet){const X=Hr(M.codecSet),me=Hr(G.codecSet);if(X!==me)return me-X}return M.averageBitrate!==G.averageBitrate?M.averageBitrate-G.averageBitrate:0});let g=m[0];if(this.steering&&(f=this.steering.filterParsedLevels(f),f.length!==m.length)){for(let M=0;M<m.length;M++)if(m[M].pathwayId===f[0].pathwayId){g=m[M];break}}this._levels=f;for(let M=0;M<f.length;M++)if(f[M]===g){var b;this._firstLevel=M;const G=g.bitrate,X=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${f.length} level(s) found, first bitrate: ${G}`),((b=this.hls.userConfig)==null?void 0:b.abrEwmaDefaultEstimate)===void 0){const me=Math.min(G,this.hls.config.abrEwmaDefaultEstimateMax);me>X&&X===Wo.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=me)}break}const k=i&&!n,B={levels:f,audioTracks:s,subtitleTracks:u,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:i,video:n,altAudio:!k&&s.some(M=>!!M.url)};this.hls.trigger(d.MANIFEST_PARSED,B),(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 g=new Error("invalid level idx"),b=e<0;if(this.hls.trigger(d.ERROR,{type:y.OTHER_ERROR,details:v.LEVEL_SWITCH_ERROR,level:e,fatal:b,error:g,reason:g.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 g=this.switchParams(s.uri,n==null?void 0:n.details,m);this.loadPlaylist(g)}}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===ir.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===Le.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 jo(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=v.KEY_LOAD_ERROR,r,n,i){return new pi({type:y.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,v.KEY_LOAD_ERROR,m))}const s=i.uri;if(!s)return Promise.reject(this.createKeyLoadError(e,v.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,v.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,g={loadPolicy:m,timeout:m.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},b={onSuccess:(k,B,M,G)=>{const{frag:X,keyInfo:me,url:Ne}=M;if(!X.decryptdata||me!==this.keyUriToKeyInfo[Ne])return u(this.createKeyLoadError(X,v.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),G));me.decryptdata.key=X.decryptdata.key=new Uint8Array(k.data),X.keyLoader=null,me.loader=null,s({frag:X,keyInfo:me})},onError:(k,B,M,G)=>{this.resetLoader(B),u(this.createKeyLoadError(t,v.KEY_LOAD_ERROR,new Error(`HTTP Error ${k.code} loading key ${k.text}`),M,Fe({url:f.url,data:void 0},k)))},onTimeout:(k,B,M)=>{this.resetLoader(B),u(this.createKeyLoadError(t,v.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),M))},onAbort:(k,B,M)=>{this.resetLoader(B),u(this.createKeyLoadError(t,v.INTERNAL_ABORTED,new Error("key loading aborted"),M))}};i.load(f,g,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(!jr())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=jr();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 X=self.performance.now()-i;C.warn(`playback not stuck anymore @${s}, after ${Math.round(X)}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 g=Mr.bufferInfo(n,s,0),b=g.nextStart||0;if(u){const X=g.len>Oa,me=!b||t&&t.start<=s||b-s>Oa&&!this.fragmentTracker.getPartialFragment(s);if(X||me)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var k;if(!(g.len>0)&&!b)return;const me=Math.max(b,g.start||0)-s,Ne=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,et=(Ne==null||(k=Ne.details)==null?void 0:k.live)?Ne.details.targetduration*2:Oa,Ge=this.fragmentTracker.getPartialFragment(s);if(me>0&&(me<=et||Ge)){n.paused||this._trySkipBufferHole(Ge);return}}const B=self.performance.now();if(i===null){this.stalled=B;return}const M=B-i;if(!u&&M>=v0&&(this._reportStall(g),!this.media))return;const G=Mr.bufferInfo(n,s,r.maxBufferHole);this._tryFixBufferStall(G,M)}_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&&(C.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)})`);C.warn(i.message),t.trigger(d.ERROR,{type:y.MEDIA_ERROR,details:v.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,g=u-i;if(g>0&&(f||m)){if(g>t.maxBufferHole){const{fragmentTracker:k}=this;let B=!1;if(i===0){const M=k.getAppendedFrag(0,Le.MAIN);M&&u<M.end&&(B=!0)}if(!B){const M=e||k.getAppendedFrag(i,Le.MAIN);if(M){let G=!1,X=M.end;for(;X<u;){const me=k.getPartialFragment(X);if(me)X+=me.duration;else{G=!0;break}}if(G)return 0}}}const b=Math.max(u+b0,i+y0);if(C.warn(`skipping hole, adjusting currentTime from ${i} to ${b}`),this.moved=!0,this.stalled=null,n.currentTime=b,e&&!e.gap){const k=new Error(`fragment loaded with buffer holes, seeking from ${i} to ${b}`);r.trigger(d.ERROR,{type:y.MEDIA_ERROR,details:v.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:k,reason:k.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}`);C.warn(u.message),r.currentTime=s,t.trigger(d.ERROR,{type:y.MEDIA_ERROR,details:v.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`);C.error(s.message),t.trigger(d.ERROR,{type:y.MEDIA_ERROR,details:v.BUFFER_STALLED_ERROR,error:s,fatal:!0})}}}const w0=100;class E0 extends ps{constructor(e,t,r){super(e,t,r,"[stream-controller]",Le.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=lt.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=lt.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case lt.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=lt.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=lt.IDLE;break}break}case lt.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=lt.IDLE}}break}this.state===lt.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 G={};this.altAudio&&(G.type="video"),this.hls.trigger(d.BUFFER_EOS,G),this.state=lt.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===lt.WAITING_LEVEL||m.live&&this.levelLastLoaded!==s){this.level=i,this.state=lt.WAITING_LEVEL;return}const g=u.len,b=this.getMaxBufferLength(s.maxBitrate);if(g>=b)return;this.backtrackFragment&&this.backtrackFragment.start>u.end&&(this.backtrackFragment=null);const k=this.backtrackFragment?this.backtrackFragment.start:u.end;let B=this.getNextFragment(k,m);if(this.couldBacktrack&&!this.fragPrevious&&B&&B.sn!=="initSegment"&&this.fragmentTracker.getState(B)!==on.OK){var M;const X=((M=this.backtrackFragment)!=null?M:B).sn-m.startSN,me=m.fragments[X-1];me&&B.cc===me.cc&&(B=me,this.fragmentTracker.removeFragment(me))}else this.backtrackFragment&&u.len&&(this.backtrackFragment=null);if(B&&this.isLoopLoading(B,k)){if(!B.gap){const X=this.audioOnly&&!this.altAudio?K.AUDIO:K.VIDEO,me=(X===K.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;me&&this.afterBufferFlushed(me,X,Le.MAIN)}B=this.getNextFragmentLoopLoading(B,m,u,Le.MAIN,b)}B&&(B.initSegment&&!B.initSegment.data&&!this.bitrateTest&&(B=B.initSegment),this.loadFragment(B,s,k))}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,Le.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,g=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(g,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 lt.KEY_LOADING:case lt.FRAG_LOADING:case lt.FRAG_LOADING_WAITING_RETRY:case lt.PARSING:case lt.PARSED:this.state=lt.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;H(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!==lt.IDLE)return;const n=r[t.level];(!n.details||n.details.live&&this.levelLastLoaded!==n||this.waitForCdnTuneIn(n.details))&&(this.state=lt.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===lt.FRAG_LOADING||this.state===lt.FRAG_LOADING_WAITING_RETRY)&&m.level!==t.level&&m.loader&&this.abortCurrentFrag();let g=0;if(s.live||(r=f.details)!=null&&r.live){var b;if(this.checkLiveUpdate(s),s.deltaUpdateFailed)return;g=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===lt.WAITING_LEVEL){if(this.waitForCdnTuneIn(s))return;this.state=lt.IDLE}this.startFragRequested?s.live&&this.synchronizeToLiveEdge(s):this.setStartPosition(s,g),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,g=f.PTSKnown||!f.live,b=(t=r.initSegment)==null?void 0:t.data,k=this._getAudioCodec(u),B=this.transmuxer=this.transmuxer||new St(this.hls,Le.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),M=n?n.index:-1,G=M!==-1,X=new Ps(r.level,r.sn,r.stats.chunkCount,i.byteLength,M,G),me=this.initPTS[r.cc];B.push(i,b,k,m,r,n,f.totalduration,g,X,me)}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!==Le.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===lt.PARSED&&(this.state=lt.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=lt.ERROR;return}switch(t.details){case v.FRAG_GAP:case v.FRAG_PARSING_ERROR:case v.FRAG_DECRYPT_ERROR:case v.FRAG_LOAD_ERROR:case v.FRAG_LOAD_TIMEOUT:case v.KEY_LOAD_ERROR:case v.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(Le.MAIN,t);break;case v.LEVEL_LOAD_ERROR:case v.LEVEL_LOAD_TIMEOUT:case v.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===lt.WAITING_LEVEL&&((r=t.context)==null?void 0:r.type)===ir.LEVEL&&(this.state=lt.IDLE);break;case v.BUFFER_APPEND_ERROR:case v.BUFFER_FULL_ERROR:if(!t.parent||t.parent!=="main")return;if(t.details===v.BUFFER_APPEND_ERROR){this.resetLoadingState();return}this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case v.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!==lt.IDLE?this.fragCurrent:null;t.poll(this.lastCurrentTime,r)}this.lastCurrentTime=e.currentTime}}onFragLoadEmergencyAborted(){this.state=lt.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==K.AUDIO||this.audioOnly&&!this.altAudio){const r=(t===K.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(r,t,Le.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=lt.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:g}=u,{video:b,text:k,id3:B,initSegment:M}=i,{details:G}=g,X=this.altAudio?void 0:i.audio;if(this.fragContextChanged(f)){this.fragmentTracker.removeFragment(f);return}if(this.state=lt.PARSING,M){if(M!=null&&M.tracks){const Be=f.initSegment||f;this._bufferInitSegment(g,M.tracks,Be,s),n.trigger(d.FRAG_PARSING_INIT_SEGMENT,{frag:Be,id:r,tracks:M.tracks})}const me=M.initPTS,Ne=M.timescale;H(me)&&(this.initPTS[f.cc]={baseTime:me,timescale:Ne},n.trigger(d.INIT_PTS_FOUND,{frag:f,id:r,initPTS:me,timescale:Ne}))}if(b&&G&&f.sn!=="initSegment"){const me=G.fragments[f.sn-1-G.startSN],Ne=f.sn===G.startSN,Be=!me||f.cc>me.cc;if(i.independent!==!1){const{startPTS:et,endPTS:Ge,startDTS:ct,endDTS:Qe}=b;if(m)m.elementaryStreams[b.type]={startPTS:et,endPTS:Ge,startDTS:ct,endDTS:Qe};else if(b.firstKeyFrame&&b.independent&&s.id===1&&!Be&&(this.couldBacktrack=!0),b.dropped&&b.independent){const vt=this.getMainFwdBufferInfo(),Rt=(vt?vt.end:this.getLoadPosition())+this.config.maxBufferHole,ot=b.firstKeyFramePTS?b.firstKeyFramePTS:et;if(!Ne&&Rt<ot-this.config.maxBufferHole&&!Be){this.backtrack(f);return}else Be&&(f.gap=!0);f.setElementaryStreamInfo(b.type,f.start,Ge,f.start,Qe,!0)}else Ne&&et>Oa&&(f.gap=!0);f.setElementaryStreamInfo(b.type,et,Ge,ct,Qe),this.backtrackFragment&&(this.backtrackFragment=f),this.bufferFragmentData(b,f,m,s,Ne||Be)}else if(Ne||Be)f.gap=!0;else{this.backtrack(f);return}}if(X){const{startPTS:me,endPTS:Ne,startDTS:Be,endDTS:et}=X;m&&(m.elementaryStreams[K.AUDIO]={startPTS:me,endPTS:Ne,startDTS:Be,endDTS:et}),f.setElementaryStreamInfo(K.AUDIO,me,Ne,Be,et),this.bufferFragmentData(X,f,m,s)}if(G&&B!=null&&(t=B.samples)!=null&&t.length){const me={id:r,frag:f,details:G,samples:B.samples};n.trigger(d.FRAG_PARSING_METADATA,me)}if(G&&k){const me={id:r,frag:f,details:G,samples:k.samples};n.trigger(d.FRAG_PARSING_USERDATA,me)}}_bufferInitSegment(e,t,r,n){if(this.state!==lt.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 g=i.metadata;g&&"channelCount"in g&&(g.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 g=t[f].initSegment;g!=null&&g.byteLength&&this.hls.trigger(d.BUFFER_APPENDING,{type:f,data:g,frag:r,part:null,chunkMeta:n,parent:r.type})}),this.tickImmediate()}getMainFwdBufferInfo(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,Le.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=lt.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&&H(t)&&H(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 jr()}static get Events(){return d}static get ErrorTypes(){return y}static get ErrorDetails(){return v}static get DefaultConfig(){return ls.defaultConfig?ls.defaultConfig:Wo}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 dt,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,re(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),g=this.bufferController=new n(this),b=this.capLevelController=new i(this),k=new u(this),B=new Wn(this),M=new mn(this),G=t.contentSteeringController,X=G?new G(this):null,me=this.levelController=new p0(this,X),Ne=new Ua(this),Be=new m0(this.config),et=this.streamController=new E0(this,Ne,Be);b.setStreamController(et),k.setStreamController(et);const Ge=[B,me,et];X&&Ge.splice(1,0,X),this.networkControllers=Ge;const ct=[m,g,b,k,M,Ne];this.audioTrackController=this.createController(t.audioTrackController,Ge);const Qe=t.audioStreamController;Qe&&Ge.push(new Qe(this,Ne,Be)),this.subtitleTrackController=this.createController(t.subtitleTrackController,Ge);const vt=t.subtitleStreamController;vt&&Ge.push(new vt(this,Ne,Be)),this.createController(t.timelineController,ct),Be.emeController=this.emeController=this.createController(t.emeController,ct),this.cmcdController=this.createController(t.cmcdController,ct),this.latencyController=this.createController(Gi,ct),this.coreComponents=ct,Ge.push(f);const Rt=f.onErrorOut;typeof Rt=="function"&&this.on(d.ERROR,Rt,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(C.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:y.OTHER_ERROR,details:v.INTERNAL_EXCEPTION,fatal:n,event:e,error:r}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){C.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){C.log("attachMedia"),this._media=e,this.trigger(d.MEDIA_ATTACHING,{media:e})}detachMedia(){C.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=Me.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,C.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){C.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(){C.log("stopLoad"),this.started=!1;for(let e=0;e<this.networkControllers.length&&(this.networkControllers[e].stopLoad(),!(this.started||!this.networkControllers));e++);}resumeBuffering(){C.log("resume buffering"),this.networkControllers.forEach(e=>{e.resumeBuffering&&e.resumeBuffering()})}pauseBuffering(){C.log("pause buffering"),this.networkControllers.forEach(e=>{e.pauseBuffering&&e.pauseBuffering()})}swapAudioCodec(){C.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){C.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){C.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){C.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){C.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){C.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){C.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&&(C.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}}]);
}());