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.
1245 lines
1.1 MiB
1245 lines
1.1 MiB
!(function(){var Yo=Math.pow;(self.webpackChunk=self.webpackChunk||[]).push([[869],{70557:function(Bt,it,ne){"use strict";ne.d(it,{Z:function(){return Ee}});var se=ne(96663),xe=ne(59301),Le={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"},Ie=Le,Ne=ne(7657),pe=function(K,N){return xe.createElement(Ne.Z,(0,se.Z)({},K,{ref:N,icon:Ie}))},Oe=xe.forwardRef(pe),Ee=Oe},35593:function(Bt,it,ne){"use strict";ne.d(it,{Z:function(){return Kt}});var se=ne(44127),xe=ne(72071),Le=ne(6620),Ie=ne(43403),Ne=ne(92310),pe=ne.n(Ne),Oe=ne(29301),Ee=ne(76846),l=ne(96452),K=ne(6089),N=ne(80402),A=ne(34280),d=ne(49658),x=ne(59301),y=ne(96663),$=ne(77900),H=ne(8654);function F(ke){var Je=ke.prefixCls,ue=ke.align,Me=ke.arrow,Ge=ke.arrowPos,O=Me||{},Q=O.className,ye=O.content,fe=Ge.x,Te=fe===void 0?0:fe,De=Ge.y,We=De===void 0?0:De,Ze=x.useRef();if(!ue||!ue.points)return null;var Ve={position:"absolute"};if(ue.autoArrow!==!1){var Ke=ue.points[0],vt=ue.points[1],gt=Ke[0],at=Ke[1],mt=vt[0],wt=vt[1];gt===mt||!["t","b"].includes(gt)?Ve.top=We:gt==="t"?Ve.top=0:Ve.bottom=0,at===wt||!["l","r"].includes(at)?Ve.left=Te:at==="l"?Ve.left=0:Ve.right=0}return x.createElement("div",{ref:Ze,className:pe()("".concat(Je,"-arrow"),Q),style:Ve},ye)}function R(ke){var Je=ke.prefixCls,ue=ke.open,Me=ke.zIndex,Ge=ke.mask,O=ke.motion;return Ge?x.createElement($.default,(0,y.Z)({},O,{motionAppear:!0,visible:ue,removeOnLeave:!0}),function(Q){var ye=Q.className;return x.createElement("div",{style:{zIndex:Me},className:pe()("".concat(Je,"-mask"),ye)})}):null}var V=x.memo(function(ke){var Je=ke.children;return Je},function(ke,Je){return Je.cache}),te=V,C=x.forwardRef(function(ke,Je){var ue=ke.popup,Me=ke.className,Ge=ke.prefixCls,O=ke.style,Q=ke.target,ye=ke.onVisibleChanged,fe=ke.open,Te=ke.keepDom,De=ke.fresh,We=ke.onClick,Ze=ke.mask,Ve=ke.arrow,Ke=ke.arrowPos,vt=ke.align,gt=ke.motion,at=ke.maskMotion,mt=ke.forceRender,wt=ke.getPopupContainer,ft=ke.autoDestroy,Dt=ke.portal,yt=ke.zIndex,_=ke.onMouseEnter,w=ke.onMouseLeave,Ye=ke.onPointerEnter,I=ke.ready,re=ke.offsetX,zt=ke.offsetY,ce=ke.offsetR,Ae=ke.offsetB,Fe=ke.onAlign,B=ke.onPrepare,q=ke.stretch,oe=ke.targetWidth,be=ke.targetHeight,L=typeof ue=="function"?ue():ue,dt=fe||Te,ae=(wt==null?void 0:wt.length)>0,At=x.useState(!wt||!ae),Ct=(0,xe.Z)(At,2),Mt=Ct[0],br=Ct[1];if((0,A.Z)(function(){!Mt&&ae&&Q&&br(!0)},[Mt,ae,Q]),!Mt)return null;var Ht="auto",Ot={left:"-1000vw",top:"-1000vh",right:Ht,bottom:Ht};if(I||!fe){var Ar,Br=vt.points,Gr=vt.dynamicInset||((Ar=vt._experimental)===null||Ar===void 0?void 0:Ar.dynamicInset),zr=Gr&&Br[0][1]==="r",Tt=Gr&&Br[0][0]==="b";zr?(Ot.right=ce,Ot.left=Ht):(Ot.left=re,Ot.right=Ht),Tt?(Ot.bottom=Ae,Ot.top=Ht):(Ot.top=zt,Ot.bottom=Ht)}var jt={};return q&&(q.includes("height")&&be?jt.height=be:q.includes("minHeight")&&be&&(jt.minHeight=be),q.includes("width")&&oe?jt.width=oe:q.includes("minWidth")&&oe&&(jt.minWidth=oe)),fe||(jt.pointerEvents="none"),x.createElement(Dt,{open:mt||dt,getContainer:wt&&function(){return wt(Q)},autoDestroy:ft},x.createElement(R,{prefixCls:Ge,open:fe,zIndex:yt,mask:Ze,motion:at}),x.createElement(Oe.Z,{onResize:Fe,disabled:!fe},function(pr){return x.createElement($.default,(0,y.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:mt,leavedClassName:"".concat(Ge,"-hidden")},gt,{onAppearPrepare:B,onEnterPrepare:B,visible:fe,onVisibleChanged:function(Ir){var tn;gt==null||(tn=gt.onVisibleChanged)===null||tn===void 0||tn.call(gt,Ir),ye(Ir)}}),function(Kr,Ir){var tn=Kr.className,or=Kr.style,wn=pe()(Ge,tn,Me);return x.createElement("div",{ref:(0,H.sQ)(pr,Je,Ir),className:wn,style:(0,se.Z)((0,se.Z)((0,se.Z)((0,se.Z)({"--arrow-x":"".concat(Ke.x||0,"px"),"--arrow-y":"".concat(Ke.y||0,"px")},Ot),jt),or),{},{boxSizing:"border-box",zIndex:yt},O),onMouseEnter:_,onMouseLeave:w,onPointerEnter:Ye,onClick:We},Ve&&x.createElement(F,{prefixCls:Ge,arrow:Ve,arrowPos:Ke,align:vt}),x.createElement(te,{cache:!fe&&!De},L))})}))}),_e=C,ve=x.forwardRef(function(ke,Je){var ue=ke.children,Me=ke.getTriggerDOMNode,Ge=(0,H.Yr)(ue),O=x.useCallback(function(ye){(0,H.mH)(Je,Me?Me(ye):ye)},[Me]),Q=(0,H.x1)(O,ue.ref);return Ge?x.cloneElement(ue,{ref:Q}):ue}),de=ve,we=x.createContext(null),Ce=we;function Se(ke){return ke?Array.isArray(ke)?ke:[ke]:[]}function Be(ke,Je,ue,Me){return x.useMemo(function(){var Ge=Se(ue!=null?ue:Je),O=Se(Me!=null?Me:Je),Q=new Set(Ge),ye=new Set(O);return ke&&(Q.has("hover")&&(Q.delete("hover"),Q.add("click")),ye.has("hover")&&(ye.delete("hover"),ye.add("click"))),[Q,ye]},[ke,Je,ue,Me])}var G=ne(29194);function U(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],ue=arguments.length>2?arguments[2]:void 0;return ue?ke[0]===Je[0]:ke[0]===Je[0]&&ke[1]===Je[1]}function j(ke,Je,ue,Me){for(var Ge=ue.points,O=Object.keys(ke),Q=0;Q<O.length;Q+=1){var ye,fe=O[Q];if(U((ye=ke[fe])===null||ye===void 0?void 0:ye.points,Ge,Me))return"".concat(Je,"-placement-").concat(fe)}return""}function Z(ke,Je,ue,Me){return Je||(ue?{motionName:"".concat(ke,"-").concat(ue)}:Me?{motionName:Me}:null)}function le(ke){return ke.ownerDocument.defaultView}function ee(ke){for(var Je=[],ue=ke==null?void 0:ke.parentElement,Me=["hidden","scroll","clip","auto"];ue;){var Ge=le(ue).getComputedStyle(ue),O=Ge.overflowX,Q=Ge.overflowY,ye=Ge.overflow;[O,Q,ye].some(function(fe){return Me.includes(fe)})&&Je.push(ue),ue=ue.parentElement}return Je}function E(ke){var Je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(ke)?Je:ke}function T(ke){return E(parseFloat(ke),0)}function X(ke,Je){var ue=(0,se.Z)({},ke);return(Je||[]).forEach(function(Me){if(!(Me instanceof HTMLBodyElement||Me instanceof HTMLHtmlElement)){var Ge=le(Me).getComputedStyle(Me),O=Ge.overflow,Q=Ge.overflowClipMargin,ye=Ge.borderTopWidth,fe=Ge.borderBottomWidth,Te=Ge.borderLeftWidth,De=Ge.borderRightWidth,We=Me.getBoundingClientRect(),Ze=Me.offsetHeight,Ve=Me.clientHeight,Ke=Me.offsetWidth,vt=Me.clientWidth,gt=T(ye),at=T(fe),mt=T(Te),wt=T(De),ft=E(Math.round(We.width/Ke*1e3)/1e3),Dt=E(Math.round(We.height/Ze*1e3)/1e3),yt=(Ke-vt-mt-wt)*ft,_=(Ze-Ve-gt-at)*Dt,w=gt*Dt,Ye=at*Dt,I=mt*ft,re=wt*ft,zt=0,ce=0;if(O==="clip"){var Ae=T(Q);zt=Ae*ft,ce=Ae*Dt}var Fe=We.x+I-zt,B=We.y+w-ce,q=Fe+We.width+2*zt-I-re-yt,oe=B+We.height+2*ce-w-Ye-_;ue.left=Math.max(ue.left,Fe),ue.top=Math.max(ue.top,B),ue.right=Math.min(ue.right,q),ue.bottom=Math.min(ue.bottom,oe)}}),ue}function ge(ke){var Je=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,ue="".concat(Je),Me=ue.match(/^(.*)\%$/);return Me?ke*(parseFloat(Me[1])/100):parseFloat(ue)}function je(ke,Je){var ue=Je||[],Me=(0,xe.Z)(ue,2),Ge=Me[0],O=Me[1];return[ge(ke.width,Ge),ge(ke.height,O)]}function Qe(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[ke[0],ke[1]]}function nt(ke,Je){var ue=Je[0],Me=Je[1],Ge,O;return ue==="t"?O=ke.y:ue==="b"?O=ke.y+ke.height:O=ke.y+ke.height/2,Me==="l"?Ge=ke.x:Me==="r"?Ge=ke.x+ke.width:Ge=ke.x+ke.width/2,{x:Ge,y:O}}function rt(ke,Je){var ue={t:"b",b:"t",l:"r",r:"l"};return ke.map(function(Me,Ge){return Ge===Je?ue[Me]||"c":Me}).join("")}function Gt(ke,Je,ue,Me,Ge,O,Q){var ye=x.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:Ge[Me]||{}}),fe=(0,xe.Z)(ye,2),Te=fe[0],De=fe[1],We=x.useRef(0),Ze=x.useMemo(function(){return Je?ee(Je):[]},[Je]),Ve=x.useRef({}),Ke=function(){Ve.current={}};ke||Ke();var vt=(0,K.Z)(function(){if(Je&&ue&&ke){let en=function(Pn,zn){var ri=arguments.length>2&&arguments[2]!==void 0?arguments[2]:wn,$n=L.x+Pn,Pi=L.y+zn,Fi=$n+Ar,Hi=Pi+Ot,Ei=Math.max($n,ri.left),es=Math.max(Pi,ri.top),Mi=Math.min(Fi,ri.right),ts=Math.min(Hi,ri.bottom);return Math.max(0,(Mi-Ei)*(ts-es))},vr=function(){Wt=L.y+mr,Pr=Wt+Ot,jn=L.x+hr,oi=jn+Ar};var mt,wt,ft=Je,Dt=ft.ownerDocument,yt=le(ft),_=yt.getComputedStyle(ft),w=_.width,Ye=_.height,I=_.position,re=ft.style.left,zt=ft.style.top,ce=ft.style.right,Ae=ft.style.bottom,Fe=ft.style.overflow,B=(0,se.Z)((0,se.Z)({},Ge[Me]),O),q=Dt.createElement("div");(mt=ft.parentElement)===null||mt===void 0||mt.appendChild(q),q.style.left="".concat(ft.offsetLeft,"px"),q.style.top="".concat(ft.offsetTop,"px"),q.style.position=I,q.style.height="".concat(ft.offsetHeight,"px"),q.style.width="".concat(ft.offsetWidth,"px"),ft.style.left="0",ft.style.top="0",ft.style.right="auto",ft.style.bottom="auto",ft.style.overflow="hidden";var oe;if(Array.isArray(ue))oe={x:ue[0],y:ue[1],width:0,height:0};else{var be=ue.getBoundingClientRect();oe={x:be.x,y:be.y,width:be.width,height:be.height}}var L=ft.getBoundingClientRect(),dt=Dt.documentElement,ae=dt.clientWidth,At=dt.clientHeight,Ct=dt.scrollWidth,Mt=dt.scrollHeight,br=dt.scrollTop,Ht=dt.scrollLeft,Ot=L.height,Ar=L.width,Br=oe.height,Gr=oe.width,zr={left:0,top:0,right:ae,bottom:At},Tt={left:-Ht,top:-br,right:Ct-Ht,bottom:Mt-br},jt=B.htmlRegion,pr="visible",Kr="visibleFirst";jt!=="scroll"&&jt!==Kr&&(jt=pr);var Ir=jt===Kr,tn=X(Tt,Ze),or=X(zr,Ze),wn=jt===pr?or:tn,rn=Ir?or:wn;ft.style.left="auto",ft.style.top="auto",ft.style.right="0",ft.style.bottom="0";var It=ft.getBoundingClientRect();ft.style.left=re,ft.style.top=zt,ft.style.right=ce,ft.style.bottom=Ae,ft.style.overflow=Fe,(wt=ft.parentElement)===null||wt===void 0||wt.removeChild(q);var Et=E(Math.round(Ar/parseFloat(w)*1e3)/1e3),Yt=E(Math.round(Ot/parseFloat(Ye)*1e3)/1e3);if(Et===0||Yt===0||(0,Ee.Sh)(ue)&&!(0,G.Z)(ue))return;var xr=B.offset,gr=B.targetOffset,Wr=je(L,xr),Mn=(0,xe.Z)(Wr,2),Vr=Mn[0],Tr=Mn[1],Or=je(oe,gr),cr=(0,xe.Z)(Or,2),nn=cr[0],fn=cr[1];oe.x-=nn,oe.y-=fn;var Hr=B.points||[],Qt=(0,xe.Z)(Hr,2),lr=Qt[0],Sr=Qt[1],Cr=Qe(Sr),wr=Qe(lr),an=nt(oe,Cr),yi=nt(L,wr),Ln=(0,se.Z)({},B),hr=an.x-yi.x+Vr,mr=an.y-yi.y+Tr,Bn=en(hr,mr),Qr=en(hr,mr,or),Hn=nt(oe,["t","l"]),bi=nt(L,["t","l"]),Ci=nt(oe,["b","r"]),xi=nt(L,["b","r"]),dn=B.overflow||{},ai=dn.adjustX,wi=dn.adjustY,Jn=dn.shiftX,ir=dn.shiftY,Pe=function(zn){return typeof zn=="boolean"?zn:zn>=0},Wt,Pr,jn,oi;vr();var li=Pe(wi),En=wr[0]===Cr[0];if(li&&wr[0]==="t"&&(Pr>rn.bottom||Ve.current.bt)){var _r=mr;En?_r-=Ot-Br:_r=Hn.y-xi.y-Tr;var An=en(hr,_r),In=en(hr,_r,or);An>Bn||An===Bn&&(!Ir||In>=Qr)?(Ve.current.bt=!0,mr=_r,Tr=-Tr,Ln.points=[rt(wr,0),rt(Cr,0)]):Ve.current.bt=!1}if(li&&wr[0]==="b"&&(Wt<rn.top||Ve.current.tb)){var qr=mr;En?qr+=Ot-Br:qr=Ci.y-bi.y-Tr;var pn=en(hr,qr),$i=en(hr,qr,or);pn>Bn||pn===Bn&&(!Ir||$i>=Qr)?(Ve.current.tb=!0,mr=qr,Tr=-Tr,Ln.points=[rt(wr,0),rt(Cr,0)]):Ve.current.tb=!1}var Wn=Pe(ai),ei=wr[1]===Cr[1];if(Wn&&wr[1]==="l"&&(oi>rn.right||Ve.current.rl)){var Lt=hr;ei?Lt-=Ar-Gr:Lt=Hn.x-xi.x-Vr;var Dn=en(Lt,mr),Jr=en(Lt,mr,or);Dn>Bn||Dn===Bn&&(!Ir||Jr>=Qr)?(Ve.current.rl=!0,hr=Lt,Vr=-Vr,Ln.points=[rt(wr,1),rt(Cr,1)]):Ve.current.rl=!1}if(Wn&&wr[1]==="r"&&(jn<rn.left||Ve.current.lr)){var mn=hr;ei?mn+=Ar-Gr:mn=Ci.x-bi.x-Vr;var Gi=en(mn,mr),ti=en(mn,mr,or);Gi>Bn||Gi===Bn&&(!Ir||ti>=Qr)?(Ve.current.lr=!0,hr=mn,Vr=-Vr,Ln.points=[rt(wr,1),rt(Cr,1)]):Ve.current.lr=!1}vr();var Vn=Jn===!0?0:Jn;typeof Vn=="number"&&(jn<or.left&&(hr-=jn-or.left-Vr,oe.x+Gr<or.left+Vn&&(hr+=oe.x-or.left+Gr-Vn)),oi>or.right&&(hr-=oi-or.right-Vr,oe.x>or.right-Vn&&(hr+=oe.x-or.right+Vn)));var Nn=ir===!0?0:ir;typeof Nn=="number"&&(Wt<or.top&&(mr-=Wt-or.top-Tr,oe.y+Br<or.top+Nn&&(mr+=oe.y-or.top+Br-Nn)),Pr>or.bottom&&(mr-=Pr-or.bottom-Tr,oe.y>or.bottom-Nn&&(mr+=oe.y-or.bottom+Nn)));var Yr=L.x+hr,Un=Yr+Ar,On=L.y+mr,Ri=On+Ot,gn=oe.x,Tn=gn+Gr,ur=oe.y,ui=ur+Br,Li=Math.max(Yr,gn),Ii=Math.min(Un,Tn),_n=(Li+Ii)/2,ci=_n-Yr,Ki=Math.max(On,ur),_t=Math.min(Ri,ui),vn=(Ki+_t)/2,Oi=vn-On;Q==null||Q(Je,Ln);var hi=It.right-L.x-(hr+L.width),cn=It.bottom-L.y-(mr+L.height);De({ready:!0,offsetX:hr/Et,offsetY:mr/Yt,offsetR:hi/Et,offsetB:cn/Yt,arrowX:ci/Et,arrowY:Oi/Yt,scaleX:Et,scaleY:Yt,align:Ln})}}),gt=function(){We.current+=1;var wt=We.current;Promise.resolve().then(function(){We.current===wt&&vt()})},at=function(){De(function(wt){return(0,se.Z)((0,se.Z)({},wt),{},{ready:!1})})};return(0,A.Z)(at,[Me]),(0,A.Z)(function(){ke||at()},[ke]),[Te.ready,Te.offsetX,Te.offsetY,Te.offsetR,Te.offsetB,Te.arrowX,Te.arrowY,Te.scaleX,Te.scaleY,Te.align,gt]}var ct=ne(19127);function st(ke,Je,ue,Me,Ge){(0,A.Z)(function(){if(ke&&Je&&ue){let We=function(){Me(),Ge()};var O=Je,Q=ue,ye=ee(O),fe=ee(Q),Te=le(Q),De=new Set([Te].concat((0,ct.Z)(ye),(0,ct.Z)(fe)));return De.forEach(function(Ze){Ze.addEventListener("scroll",We,{passive:!0})}),Te.addEventListener("resize",We,{passive:!0}),Me(),function(){De.forEach(function(Ze){Ze.removeEventListener("scroll",We),Te.removeEventListener("resize",We)})}}},[ke,Je,ue])}var tr=ne(48736),sr=ne(16089);function yr(ke,Je,ue,Me,Ge,O,Q,ye){var fe=x.useRef(ke),Te=x.useRef(!1);fe.current!==ke&&(Te.current=!0,fe.current=ke),x.useEffect(function(){var De=(0,sr.Z)(function(){Te.current=!1});return function(){sr.Z.cancel(De)}},[ke]),x.useEffect(function(){if(Je&&Me&&(!Ge||O)){var De=function(){var I=!1,re=function(Ae){var Fe=Ae.target;I=Q(Fe)},zt=function(Ae){var Fe=Ae.target;!Te.current&&fe.current&&!I&&!Q(Fe)&&ye(!1)};return[re,zt]},We=De(),Ze=(0,xe.Z)(We,2),Ve=Ze[0],Ke=Ze[1],vt=De(),gt=(0,xe.Z)(vt,2),at=gt[0],mt=gt[1],wt=le(Me);wt.addEventListener("mousedown",Ve,!0),wt.addEventListener("click",Ke,!0),wt.addEventListener("contextmenu",Ke,!0);var ft=(0,l.A)(ue);if(ft&&(ft.addEventListener("mousedown",at,!0),ft.addEventListener("click",mt,!0),ft.addEventListener("contextmenu",mt,!0)),0)var Dt,yt,_,w;return function(){wt.removeEventListener("mousedown",Ve,!0),wt.removeEventListener("click",Ke,!0),wt.removeEventListener("contextmenu",Ke,!0),ft&&(ft.removeEventListener("mousedown",at,!0),ft.removeEventListener("click",mt,!0),ft.removeEventListener("contextmenu",mt,!0))}}},[Je,ue,Me,Ge,O])}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 qt(){var ke=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ie.Z,Je=x.forwardRef(function(ue,Me){var Ge=ue.prefixCls,O=Ge===void 0?"rc-trigger-popup":Ge,Q=ue.children,ye=ue.action,fe=ye===void 0?"hover":ye,Te=ue.showAction,De=ue.hideAction,We=ue.popupVisible,Ze=ue.defaultPopupVisible,Ve=ue.onPopupVisibleChange,Ke=ue.afterPopupVisibleChange,vt=ue.mouseEnterDelay,gt=ue.mouseLeaveDelay,at=gt===void 0?.1:gt,mt=ue.focusDelay,wt=ue.blurDelay,ft=ue.mask,Dt=ue.maskClosable,yt=Dt===void 0?!0:Dt,_=ue.getPopupContainer,w=ue.forceRender,Ye=ue.autoDestroy,I=ue.destroyPopupOnHide,re=ue.popup,zt=ue.popupClassName,ce=ue.popupStyle,Ae=ue.popupPlacement,Fe=ue.builtinPlacements,B=Fe===void 0?{}:Fe,q=ue.popupAlign,oe=ue.zIndex,be=ue.stretch,L=ue.getPopupClassNameFromAlign,dt=ue.fresh,ae=ue.alignPoint,At=ue.onPopupClick,Ct=ue.onPopupAlign,Mt=ue.arrow,br=ue.popupMotion,Ht=ue.maskMotion,Ot=ue.popupTransitionName,Ar=ue.popupAnimation,Br=ue.maskTransitionName,Gr=ue.maskAnimation,zr=ue.className,Tt=ue.getTriggerDOMNode,jt=(0,Le.Z)(ue,ar),pr=Ye||I||!1,Kr=x.useState(!1),Ir=(0,xe.Z)(Kr,2),tn=Ir[0],or=Ir[1];(0,A.Z)(function(){or((0,d.Z)())},[]);var wn=x.useRef({}),rn=x.useContext(Ce),It=x.useMemo(function(){return{registerSubPopup:function(kt,fr){wn.current[kt]=fr,rn==null||rn.registerSubPopup(kt,fr)}}},[rn]),Et=(0,N.Z)(),Yt=x.useState(null),xr=(0,xe.Z)(Yt,2),gr=xr[0],Wr=xr[1],Mn=(0,K.Z)(function(Ut){(0,Ee.Sh)(Ut)&&gr!==Ut&&Wr(Ut),rn==null||rn.registerSubPopup(Et,Ut)}),Vr=x.useState(null),Tr=(0,xe.Z)(Vr,2),Or=Tr[0],cr=Tr[1],nn=x.useRef(null),fn=(0,K.Z)(function(Ut){(0,Ee.Sh)(Ut)&&Or!==Ut&&(cr(Ut),nn.current=Ut)}),Hr=x.Children.only(Q),Qt=(Hr==null?void 0:Hr.props)||{},lr={},Sr=(0,K.Z)(function(Ut){var kt,fr,Zr=Or;return(Zr==null?void 0:Zr.contains(Ut))||((kt=(0,l.A)(Zr))===null||kt===void 0?void 0:kt.host)===Ut||Ut===Zr||(gr==null?void 0:gr.contains(Ut))||((fr=(0,l.A)(gr))===null||fr===void 0?void 0:fr.host)===Ut||Ut===gr||Object.values(wn.current).some(function(Nr){return(Nr==null?void 0:Nr.contains(Ut))||Ut===Nr})}),Cr=Z(O,br,Ar,Ot),wr=Z(O,Ht,Gr,Br),an=x.useState(Ze||!1),yi=(0,xe.Z)(an,2),Ln=yi[0],hr=yi[1],mr=We!=null?We:Ln,Bn=(0,K.Z)(function(Ut){We===void 0&&hr(Ut)});(0,A.Z)(function(){hr(We||!1)},[We]);var Qr=x.useRef(mr);Qr.current=mr;var Hn=x.useRef([]);Hn.current=[];var bi=(0,K.Z)(function(Ut){var kt;Bn(Ut),((kt=Hn.current[Hn.current.length-1])!==null&&kt!==void 0?kt:mr)!==Ut&&(Hn.current.push(Ut),Ve==null||Ve(Ut))}),Ci=x.useRef(),xi=function(){clearTimeout(Ci.current)},dn=function(kt){var fr=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;xi(),fr===0?bi(kt):Ci.current=setTimeout(function(){bi(kt)},fr*1e3)};x.useEffect(function(){return xi},[]);var ai=x.useState(!1),wi=(0,xe.Z)(ai,2),Jn=wi[0],ir=wi[1];(0,A.Z)(function(Ut){(!Ut||mr)&&ir(!0)},[mr]);var Pe=x.useState(null),Wt=(0,xe.Z)(Pe,2),Pr=Wt[0],jn=Wt[1],oi=x.useState([0,0]),li=(0,xe.Z)(oi,2),En=li[0],_r=li[1],An=function(kt){_r([kt.clientX,kt.clientY])},In=Gt(mr,gr,ae?En:Or,Ae,B,q,Ct),qr=(0,xe.Z)(In,11),pn=qr[0],$i=qr[1],Wn=qr[2],ei=qr[3],Lt=qr[4],Dn=qr[5],Jr=qr[6],mn=qr[7],Gi=qr[8],ti=qr[9],Vn=qr[10],Nn=Be(tn,fe,Te,De),Yr=(0,xe.Z)(Nn,2),Un=Yr[0],On=Yr[1],Ri=Un.has("click"),gn=On.has("click")||On.has("contextMenu"),Tn=(0,K.Z)(function(){Jn||Vn()}),ur=function(){Qr.current&&ae&&gn&&dn(!1)};st(mr,Or,gr,Tn,ur),(0,A.Z)(function(){Tn()},[En,Ae]),(0,A.Z)(function(){mr&&!(B!=null&&B[Ae])&&Tn()},[JSON.stringify(q)]);var ui=x.useMemo(function(){var Ut=j(B,O,ti,ae);return pe()(Ut,L==null?void 0:L(ti))},[ti,L,B,O,ae]);x.useImperativeHandle(Me,function(){return{nativeElement:nn.current,forceAlign:Tn}});var Li=x.useState(0),Ii=(0,xe.Z)(Li,2),_n=Ii[0],ci=Ii[1],Ki=x.useState(0),_t=(0,xe.Z)(Ki,2),vn=_t[0],Oi=_t[1],hi=function(){if(be&&Or){var kt=Or.getBoundingClientRect();ci(kt.width),Oi(kt.height)}},cn=function(){hi(),Tn()},en=function(kt){ir(!1),Vn(),Ke==null||Ke(kt)},vr=function(){return new Promise(function(kt){hi(),jn(function(){return kt})})};(0,A.Z)(function(){Pr&&(Vn(),Pr(),jn(null))},[Pr]);function Pn(Ut,kt,fr,Zr){lr[Ut]=function(Nr){var kn;Zr==null||Zr(Nr),dn(kt,fr);for(var ji=arguments.length,Wi=new Array(ji>1?ji-1:0),qn=1;qn<ji;qn++)Wi[qn-1]=arguments[qn];(kn=Qt[Ut])===null||kn===void 0||kn.call.apply(kn,[Qt,Nr].concat(Wi))}}(Ri||gn)&&(lr.onClick=function(Ut){var kt;Qr.current&&gn?dn(!1):!Qr.current&&Ri&&(An(Ut),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];(kt=Qt.onClick)===null||kt===void 0||kt.call.apply(kt,[Qt,Ut].concat(Zr))}),yr(mr,gn,Or,gr,ft,yt,Sr,dn);var zn=Un.has("hover"),ri=On.has("hover"),$n,Pi;zn&&(Pn("onMouseEnter",!0,vt,function(Ut){An(Ut)}),Pn("onPointerEnter",!0,vt,function(Ut){An(Ut)}),$n=function(kt){(mr||Jn)&&gr!==null&&gr!==void 0&&gr.contains(kt.target)&&dn(!0,vt)},ae&&(lr.onMouseMove=function(Ut){var kt;(kt=Qt.onMouseMove)===null||kt===void 0||kt.call(Qt,Ut)})),ri&&(Pn("onMouseLeave",!1,at),Pn("onPointerLeave",!1,at),Pi=function(){dn(!1,at)}),Un.has("focus")&&Pn("onFocus",!0,mt),On.has("focus")&&Pn("onBlur",!1,wt),Un.has("contextMenu")&&(lr.onContextMenu=function(Ut){var kt;Qr.current&&On.has("contextMenu")?dn(!1):(An(Ut),dn(!0)),Ut.preventDefault();for(var fr=arguments.length,Zr=new Array(fr>1?fr-1:0),Nr=1;Nr<fr;Nr++)Zr[Nr-1]=arguments[Nr];(kt=Qt.onContextMenu)===null||kt===void 0||kt.call.apply(kt,[Qt,Ut].concat(Zr))}),zr&&(lr.className=pe()(Qt.className,zr));var Fi=(0,se.Z)((0,se.Z)({},Qt),lr),Hi={},Ei=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Ei.forEach(function(Ut){jt[Ut]&&(Hi[Ut]=function(){for(var kt,fr=arguments.length,Zr=new Array(fr),Nr=0;Nr<fr;Nr++)Zr[Nr]=arguments[Nr];(kt=Fi[Ut])===null||kt===void 0||kt.call.apply(kt,[Fi].concat(Zr)),jt[Ut].apply(jt,Zr)})});var es=x.cloneElement(Hr,(0,se.Z)((0,se.Z)({},Fi),Hi)),Mi={x:Dn,y:Jr},ts=Mt?(0,se.Z)({},Mt!==!0?Mt:{}):null;return x.createElement(x.Fragment,null,x.createElement(Oe.Z,{disabled:!mr,ref:fn,onResize:cn},x.createElement(de,{getTriggerDOMNode:Tt},es)),x.createElement(Ce.Provider,{value:It},x.createElement(_e,{portal:ke,ref:Mn,prefixCls:O,popup:re,className:pe()(zt,ui),style:ce,target:Or,onMouseEnter:$n,onMouseLeave:Pi,onPointerEnter:$n,zIndex:oe,open:mr,keepDom:Jn,fresh:dt,onClick:At,mask:ft,motion:Cr,maskMotion:wr,onVisibleChanged:en,onPrepare:vr,forceRender:w,autoDestroy:pr,getPopupContainer:_,align:ti,arrow:ts,arrowPos:Mi,ready:pn,offsetX:$i,offsetY:Wn,offsetR:ei,offsetB:Lt,onAlign:Tn,stretch:be,targetWidth:_n/mn,targetHeight:vn/Gi})))});return Je}var Kt=qt(Ie.Z)},50304:function(){"use strict"},8797:function(Bt,it,ne){"use strict";var se=ne(59301),xe=ne(93314),Le=ne(3113),Ie=Object.defineProperty,Ne=Object.defineProperties,pe=Object.getOwnPropertyDescriptors,Oe=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,l=Object.prototype.propertyIsEnumerable,K=(x,y,$)=>y in x?Ie(x,y,{enumerable:!0,configurable:!0,writable:!0,value:$}):x[y]=$,N=(x,y)=>{for(var $ in y||(y={}))Ee.call(y,$)&&K(x,$,y[$]);if(Oe)for(var $ of Oe(y))l.call(y,$)&&K(x,$,y[$]);return x},A=(x,y)=>Ne(x,pe(y));const d=({img:x,buttonProps:y={},styles:$={},customText:H,ButtonText:F,ButtonClick:R,Buttonclass:V,ButtonTwo:te,imgStyles:C,loading:_e=!1})=>se.createElement("section",{className:"tc animated fadeIn",style:N(N({},{color:"#999",margin:"100px auto",visibility:_e?"hidden":"visible"}),$)},se.createElement("img",{src:x||xe,style:A(N({},C),{pointerEvents:"none",userSelect:"none"})}),se.createElement("p",{className:"mt20 font14"},H||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),F&&se.createElement(Le.ZP,N({className:V,onClick:R},y),F),te&&te);it.Z=d},23210:function(Bt,it,ne){"use strict";ne.d(it,{Z:function(){return V}});var se=ne(59301),xe={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Le=ne(3113),Ie=ne(70557),Ne=ne(23954),pe=ne(6848),Oe=ne(955),Ee=ne(94941),l=ne(8797),K=ne(3294),N=ne(19381),A=ne(59301),d=Object.defineProperty,x=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable,H=(te,C,_e)=>C in te?d(te,C,{enumerable:!0,configurable:!0,writable:!0,value:_e}):te[C]=_e,F=(te,C)=>{for(var _e in C||(C={}))y.call(C,_e)&&H(te,_e,C[_e]);if(x)for(var _e of x(C))$.call(C,_e)&&H(te,_e,C[_e]);return te},R=(te,C,_e)=>new Promise((ve,de)=>{var we=Be=>{try{Se(_e.next(Be))}catch(G){de(G)}},Ce=Be=>{try{Se(_e.throw(Be))}catch(G){de(G)}},Se=Be=>Be.done?ve(Be.value):Promise.resolve(Be.value).then(we,Ce);Se((_e=_e.apply(te,C)).next())}),V=({editOffice:te="view",data:C,theme:_e,type:ve,filename:de,monacoEditor:we,className:Ce,style:Se,close:Be,onClose:G,hasMask:U,disabledDownload:j,onImgDimensions:Z,showNodata:le,recordInfo:ee})=>{const[E,T]=(0,se.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[X,ge]=(0,se.useState)(""),[je,Qe]=(0,se.useState)(),nt=window.ENV==="build"?"/react/build":"",rt=location.host.startsWith("localhost")?K.Z.PROXY_SERVER:K.Z.API_SERVER,ct=10*(1024*1024),st=(0,se.useRef)();C!=null&&C.startsWith("/api")&&ve!=="txt"&&(C=K.Z.API_SERVER+C);const tr=qt=>qt.substring(qt.lastIndexOf("/")+1).split(".").pop();de&&we&&(we.filename=de),(0,se.useEffect)(()=>{var qt,Kt;const ke=(Kt=(qt=document.cookie)==null?void 0:qt.replace(/\s/g,""))==null?void 0:Kt.split(";");ke==null||ke.map(Je=>{let ue=Je.split("=");ue[0]==="_educoder_session"&&ge(ue[1])})},[]),(0,se.useEffect)(()=>{ve==="office"&&(C.indexOf("bigfilescdn.")>-1||C.indexOf("bigfiles1")>-1?Qe({url:C,fileType:tr(C),model:C.indexOf("model=edit")?"edit":"view"}):sr())},[ve,C]);const sr=()=>R(void 0,null,function*(){console.log("data:",C);let qt=C;C.startsWith("http")||(qt=location.origin+qt);let Kt=new URL(qt).pathname.split("/").pop();const ke=yield(0,Ee.gJ)({attachment_id:Kt});ke.url=rt+ke.url,Qe(ke)}),yr=()=>{if(C.startsWith("http")||C.startsWith("blob:")){ar();return}(0,Oe.Sv)(de||"educoder",C,de)},ar=()=>{ee&&(0,N.fc)({id:ee==null?void 0:ee.id,watch_type:1,course_id:ee==null?void 0:ee.course_id}),(0,Oe.Nd)(de||"educoder",decodeURIComponent(C))};return A.createElement("div",{style:F({},Se||{}),className:`${U&&xe.bgBlack} ${ve?xe.wrp:"hide"}`},Be&&A.createElement("div",{className:xe.close,ref:st},!!Z&&A.createElement(pe.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>st.current},A.createElement("span",{onClick:()=>{G(),Z()}},A.createElement("i",{className:"icon-yulanpizhu"}))),!j&&A.createElement(pe.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>st.current},A.createElement("span",{onClick:ar},A.createElement("i",{className:"icon-quxiaozhiding"}))),A.createElement(pe.Z,{title:"\u5173\u95ED",getPopupContainer:()=>st.current},A.createElement("span",{className:"",onClick:G},A.createElement("i",{className:"icon-guanbi1"})))),A.createElement("div",{className:`${xe[Ce]} ${Ce} ${xe.monaco} ${ve==="txt"?"show":"hide"}`},ve==="txt"&&A.createElement(A.Fragment,null,A.createElement(Ne.ZP,F({},we)))),ve==="audio"&&A.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}),ve==="video"&&A.createElement(A.Fragment,null,(C==null?void 0:C.indexOf("http"))>-1?A.createElement("video",{controls:!0,src:`${C}`,autoPlay:!0}):A.createElement("video",{controls:!0,src:`data:video/mp4;base64,${C}`,autoPlay:!0})),ve==="office"&&je&&A.createElement("iframe",{src:`${nt}/office.html?key=${je.key}&url=${btoa(je.url)}&callbackUrl=${rt+(je.callbackUrl||"")}&fileType=${je.fileType}&title=${je.title||""}&model=${te}&officeServer=${K.Z.ONLYOFFICE}&disabledDownload=${!!j}`}),ve==="html"&&A.createElement("iframe",{src:C+"&disposition=inline"}),ve==="pdf"&&A.createElement("iframe",{src:`${nt}/js/pdfview/index.html?filename=${de||"educoder.pdf"}&url=${encodeURIComponent(C)}&disabledDownload=${!!j}`}),ve==="image"&&A.createElement("img",{src:`${(C==null?void 0:C.indexOf("http://"))>-1||(C==null?void 0:C.indexOf("https://"))>-1?"":"data:image/png;base64,"}${C}`}),(ve==="other"||ve==="download")&&A.createElement(A.Fragment,null,le?A.createElement(l.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:A.createElement(Le.ZP,{icon:A.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:yr,disabled:j},"\u4E0B\u8F7D")}):A.createElement(Le.ZP,{type:"primary",size:"middle",onClick:yr,disabled:j},A.createElement(Ie.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},85149:function(Bt,it,ne){"use strict";ne.d(it,{z:function(){return ve},Z:function(){return de}});var se=ne(59301),xe=ne(50304),Le=ne(24768),Ie=ne(64018),Ne=ne(40846),pe=ne(3294),Oe=ne(955),Ee=ne(15342),l=ne(1012),K=ne(23210),N=ne(59301),d=({html:we})=>{const Ce=(0,se.useRef)(null),Se=(0,se.useRef)(null),Be=`.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,se.useEffect)(()=>{const G=Ce.current.attachShadow({mode:"open"});Se.current=document.createElement("div"),Se.current.className="markdown-body",Se.current.innerHTML=we,G.appendChild(Se.current);const U=document.createElement("style");return U.textContent=Be,G.appendChild(U),()=>{G.innerHTML=""}},[]),(0,se.useEffect)(()=>{Se.current&&(Se.current.innerHTML=we)},[we]),N.createElement("div",{ref:Ce})},x=Object.defineProperty,y=Object.getOwnPropertySymbols,$=Object.prototype.hasOwnProperty,H=Object.prototype.propertyIsEnumerable,F=(we,Ce,Se)=>Ce in we?x(we,Ce,{enumerable:!0,configurable:!0,writable:!0,value:Se}):we[Ce]=Se,R=(we,Ce)=>{for(var Se in Ce||(Ce={}))$.call(Ce,Se)&&F(we,Se,Ce[Se]);if(y)for(var Se of y(Ce))H.call(Ce,Se)&&F(we,Se,Ce[Se]);return we};const V="@\u2581\u2581@",te="@\u2581@",C=/<pre[^>]*>/g;function _e(we){let Ce=document.createElement("div");return Ce.innerHTML=we,Ce.childNodes.length===0?"":Ce.childNodes[0].nodeValue}const ve=(we,Ce)=>{we=we||"";const Se=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Be=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,G=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,U=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Ce?we.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(Se,(j,Z,le,ee,E,T,X)=>{const ge=Z||ee||T,je=le||E||X||"?";return pe.Z.API_SERVER+"/api/attachments/"+ge+je+"&t="+(0,Oe.Jn)(ge,Date.now())+(j.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(we=we.replace(U,(j,Z,le,ee,E,T,X)=>{const ge=Z||ee||T,je=le||E||X||"?";return pe.Z.API_SERVER+"/attachments/download/"+ge+je+"&t="+(0,Oe.Jn)(ge,Date.now())+(j.indexOf(")")>-1?")":"&")}).replace(Se,(j,Z,le,ee,E,T,X)=>{const ge=Z||ee||T,je=le||E||X||"?";return pe.Z.API_SERVER+"/api/attachments/"+ge+je+"&t="+(0,Oe.Jn)(ge,Date.now())+(j.indexOf(")")>-1?")":"&")}).replace(Be,(j,Z,le,ee,E)=>{const T=Z||ee,X=le||E||"";return'"'+pe.Z.API_SERVER+"/api/attachments/"+T+X+T+X+"&t="+(0,Oe.Jn)(T,Date.now())}).replace(G,(j,Z,le,ee,E)=>{const T=Z||ee,X=le||E||"";return"("+pe.Z.API_SERVER+"/files/uploads/"+T+X+T+X+"&t="+(0,Oe.Jn)(T,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,`
|
|
`),we)};var de=({value:we="",className:Ce,showTextOnly:Se,showLines:Be,style:G={},stylesPrev:U={},highlightKeywords:j,showProgramFill:Z,isProgramFill:le,disabledFill:ee=!1,programFillValue:E,onFillChange:T=je=>{},onFillBlur:X=()=>{},onFillFocus:ge=()=>{}})=>{let je=String(we);const[Qe,nt]=(0,se.useState)(""),[rt,Gt]=(0,se.useState)("office"),[ct,st]=(0,se.useState)([]),tr=(0,se.useRef)("a"+(0,l.Z)()),sr={},yr=(fe,Te,De)=>{const We=document.createElement(fe===te?"input":"textarea");We.style.width="100%",We.style.height=fe===te?"40px":"151px",We.rows=5,We.spellcheck=!1,We.name="edu-program-fill",We.placeholder="\u8BF7\u8F93\u5165",We.dataset.id=Te;const Ze=Object.keys(sr).length;return sr[Ze]=We,`<span class="edu-program-fill-wrap ${fe===te?"":"show"}" style="width:${fe===te?"400px":"100%"}" title=${De||""}><span>${We.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function ar(fe){return fe=fe.replace(/!\[.*?\]\(.*?\)/g,""),fe=fe.replace(/\[.*?\]\(.*?\)/g,""),fe=fe.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),fe=fe.replace(/<embed.*?>/g,""),fe=fe.replace(/<img.*?>/g,""),fe=fe.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),fe=fe.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),fe=fe.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),fe=fe.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),fe}const qt=fe=>fe.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Te,De){let We=De.replace(/(\n|\r)/g,"").split("}"),Ze=[];return We.map(Ve=>{Ve!=""&&Ze.push(`.${tr.current} ${Ve}`)}),`<style>${Ze.join("}")}</style>`}),Kt=(0,se.useMemo)(()=>{try{const We=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,Ze=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Ve=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Ke=/\(\/attachments\/download\//g;je=je.replace(Ke,"("+pe.Z.API_SERVER+"/attachments/download/").replace(We,"("+pe.Z.API_SERVER+"/api/attachments/").replace(Ze,'"'+pe.Z.API_SERVER+"/api/attachments/").replace(Ve,'"'+pe.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(We){}if(Z){let We=-1;return je=je.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(Ze,Ve,Ke){var vt;return++We,yr(Ze,We,(vt=E==null?void 0:E[We])==null?void 0:vt.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${qt(je||"")}</pre>`}let fe=qt(je);fe=(0,Le.ZP)(fe);const Te=(0,Le.ez)();je.match(/\[TOC\]/)&&(fe=fe.replace("<p>[TOC]</p>",(0,Le.Qv)()),(0,Le.Iy)()),fe=fe.replace(/(__special_katext_id_\d+__)/g,(We,Ze)=>{const{type:Ve,expression:Ke}=Te[Ze];return(0,Ee.renderToString)(_e(Ke)||"",{displayMode:Ve==="block",throwOnError:!1,output:"html"})}),fe=fe.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Le.AL)();const De=document.createElement("div");if(De.innerHTML=fe,Se)return De.innerText;if(j){const We=j.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Me(De,We),De.innerHTML}return setTimeout(()=>Q(),500),De.innerHTML},[je,j]);(0,se.useEffect)(()=>{Ge.current&&Ge.current.querySelectorAll(["input","textarea"]).forEach(Te=>{Te.oninput=ke,Te.onblur=Je,Te.onfocus=ue})},[ct]),(0,se.useEffect)(()=>{var fe,Te,De,We,Ze;if(E!=null&&E.length)try{const Ve=Ge.current.querySelectorAll(".edu-program-fill-score"),Ke=Ge.current.querySelectorAll('[name="edu-program-fill"]');for(const[vt,gt]of Ke.entries())gt.value=((fe=E==null?void 0:E[vt])==null?void 0:fe.value)||"",((Te=E==null?void 0:E[vt])==null?void 0:Te.type)==="warning"?gt.className="program-fill-warning":((De=E==null?void 0:E[vt])==null?void 0:De.type)==="success"?gt.className="program-fill-success":gt.className="";for(const[vt,gt]of Ve.entries())gt.innerHTML=(We=E==null?void 0:E[vt])!=null&&We.score?`${(Ze=E==null?void 0:E[vt])==null?void 0:Ze.score}\u5206`:"";st(E)}catch(Ve){console.log(Ve,"error")}},[E]);const ke=fe=>{ct[fe.target.dataset.id]=ct[fe.target.dataset.id]||{},ct[fe.target.dataset.id].value=fe.target.value,st([...ct]),T(ct,fe.target.dataset.id)},Je=fe=>{ct[fe.target.dataset.id]=ct[fe.target.dataset.id]||{},ct[fe.target.dataset.id].value=fe.target.value,st([...ct]),X(ct,fe.target.dataset.id)},ue=fe=>{ct[fe.target.dataset.id]=ct[fe.target.dataset.id]||{},ct[fe.target.dataset.id].value=fe.target.value,st([...ct]),ge(ct,fe.target.dataset.id)};function Me(fe,Te){return fe.childNodes.forEach(De=>{var We;if(De.childNodes.length>0)Me(De,Te);else if(De.nodeName!=="IMG")if(De.innerHTML)De.innerHTML=(We=De.innerHTML)==null?void 0:We.replace(new RegExp(Te,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const Ze=document.createElement("span");Ze.innerHTML=De.textContent.replace(new RegExp(Te,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),De.replaceWith(Ze)}})}const Ge=(0,se.useRef)();Le.jb.WebkitLineClamp=Be,Be&&(G=R(R({},G),Le.jb));function O(fe){let Te=fe.target;if(Te.tagName.toUpperCase()==="A"){let De=Te.getAttribute("href");if(De.indexOf("office")>-1)fe.preventDefault(),nt(De),Gt("office");else if(De.indexOf("application/pdf")>-1)fe.preventDefault(),nt(De),Gt("pdf");else if(De.indexOf("text/html")>-1)fe.preventDefault(),nt(De),Gt("html");else if(De.startsWith("#")){fe.preventDefault();let We=document.getElementById(De.replace("#",""));We&&We.scrollIntoView(!0)}}}const Q=()=>{var fe;const Te=(fe=Ge.current)==null?void 0:fe.querySelectorAll("video");Te==null||Te.forEach(De=>{if(De.oncontextmenu=()=>!1,De.src.indexOf(".m3u8")>-1&&!De.canPlayType("application/vnd.apple.mpegurl")){if(Ne.ZP.isSupported()){var We=new Ne.ZP;We.loadSource(De.src),We.attachMedia(De)}}})};(0,se.useEffect)(()=>{if(Ge.current&&Kt&&Kt.match(C)&&window.PR.prettyPrint(),Ge.current)return Ge.current.addEventListener("click",O),()=>{var fe;(fe=Ge.current)==null||fe.removeEventListener("click",O),(0,Le.AL)(),(0,Le.Iy)()}},[Kt,Ge.current,O]),(0,se.useEffect)(()=>{var fe;const Te=De=>{De.preventDefault(),De.clipboardData.setData("text",window.getSelection().toString())};return(fe=Ge.current)==null||fe.addEventListener("copy",Te),()=>{var De;(De=Ge.current)==null||De.removeEventListener("copy",Te)}},[Ge.current]);const ye=fe=>/<style[\s\S]*?>/i.test(fe||"");return se.createElement(se.Fragment,null,Se&&se.createElement("div",{ref:Ge},Kt),!Se&&!ye(Kt)&&se.createElement("div",{ref:Ge,style:R({},G),className:`${Ce||""} ${ee?"disabled-fill":""} markdown-body ${tr.current}`,dangerouslySetInnerHTML:{__html:Kt}}),!Se&&ye(Kt)&&se.createElement(d,{html:Kt}),se.createElement(K.Z,{close:!0,data:Qe,type:Qe!=null&&Qe.length?rt:"",style:R({},U),onClose:()=>nt("")}))}},23954:function(Bt,it,ne){"use strict";ne.d(it,{SV:function(){return Ge},ZP:function(){return Me}});var se=ne(59301),xe=ne(76374);const Le={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"]},Ie={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"]},Ne={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(`
|
|
`)}]},pe={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(`
|
|
`)}]},Oe={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 Ee=ne(53184),l=ne.n(Ee),K=Object.defineProperty,N=Object.defineProperties,A=Object.getOwnPropertyDescriptors,d=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,y=Object.prototype.propertyIsEnumerable,$=(O,Q,ye)=>Q in O?K(O,Q,{enumerable:!0,configurable:!0,writable:!0,value:ye}):O[Q]=ye,H=(O,Q)=>{for(var ye in Q||(Q={}))x.call(Q,ye)&&$(O,ye,Q[ye]);if(d)for(var ye of d(Q))y.call(Q,ye)&&$(O,ye,Q[ye]);return O},F=(O,Q)=>N(O,A(Q)),R=(O,Q,ye)=>new Promise((fe,Te)=>{var De=Ve=>{try{Ze(ye.next(Ve))}catch(Ke){Te(Ke)}},We=Ve=>{try{Ze(ye.throw(Ve))}catch(Ke){Te(Ke)}},Ze=Ve=>Ve.done?fe(Ve.value):Promise.resolve(Ve.value).then(De,We);Ze((ye=ye.apply(O,Q)).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"]}},te=(O,Q)=>Q.map(ye=>({label:ye,kind:O.languages.CompletionItemKind.Keyword,insertText:ye})),C=O=>Object.keys(V.tables).map(Q=>({label:Q,kind:O.languages.CompletionItemKind.Variable,insertText:Q})),_e=(O,Q)=>{const ye=V.tables[O];return ye?ye.map(fe=>({label:fe,kind:Q.languages.CompletionItemKind.Field,insertText:fe})):[]};function ve(O,Q,ye,fe,Te){let De=Q.getWordUntilPosition(ye),We={startLineNumber:ye.lineNumber,endLineNumber:ye.lineNumber,startColumn:De.startColumn,endColumn:De.endColumn},Ze=fe.map(Ve=>({label:Ve,kind:O.languages.CompletionItemKind.Keyword,insertText:Ve,insertTextRules:O.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:We}));return Te.map(Ve=>{Ze.push(F(H({},Ve),{range:We}))}),Ze}var de=O=>{V.languages.map(Te=>(O.languages.registerDocumentFormattingEditProvider(Te,{provideDocumentFormattingEdits(De,We,Ze){return R(this,null,function*(){const Ve=l()(De.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:De.getFullModelRange(),text:Ve}]})}}),Te));const Q=Ne.quickKey.map(Te=>({label:Te.label,kind:O.languages.CompletionItemKind.Method,insertText:Te.content,insertTextRules:O.languages.CompletionItemInsertTextRule.InsertAsSnippet})),ye=pe.quickKey.map(Te=>({label:Te.label,kind:O.languages.CompletionItemKind.Method,insertText:Te.content,insertTextRules:O.languages.CompletionItemInsertTextRule.InsertAsSnippet})),fe=Ie.quickKey.map(Te=>({label:Te.label,kind:O.languages.CompletionItemKind.Method,insertText:Te.content,insertTextRules:O.languages.CompletionItemInsertTextRule.InsertAsSnippet}));O.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Te,De){var We=Te.getWordUntilPosition(De),Ze={startLineNumber:De.lineNumber,endLineNumber:De.lineNumber,startColumn:We.startColumn,endColumn:We.endColumn},Ve=Te.getLineContent(De.lineNumber).substring(We.startColumn-2,We.endColumn);return{suggestions:[...Ne.keywords.map(Ke=>({label:Ke,kind:O.languages.CompletionItemKind.Function,documentation:Ke,insertText:Ke,insertTextRules:O.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ze})),...Ne.quickKey.map(Ke=>({label:Ke.label,kind:O.languages.CompletionItemKind.Function,documentation:Ke.content,insertText:Ve.startsWith("#")?Ke.content.replace(/#/,""):Ke.content,insertTextRules:O.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ze}))]}}}),O.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Te,De){var We=Te.getWordUntilPosition(De),Ze={startLineNumber:De.lineNumber,endLineNumber:De.lineNumber,startColumn:We.startColumn,endColumn:We.endColumn};return{suggestions:[...Le.keywords.map(Ve=>({label:Ve,kind:O.languages.CompletionItemKind.Function,documentation:Ve,insertText:Ve,insertTextRules:O.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ze}))]}}}),O.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Te,De){var We=Te.getWordUntilPosition(De),Ze={startLineNumber:De.lineNumber,endLineNumber:De.lineNumber,startColumn:We.startColumn,endColumn:We.endColumn},Ve=Te.getLineContent(De.lineNumber).substring(We.startColumn-2,We.endColumn);return{suggestions:[...Ie.keywords.map(Ke=>({label:Ke,kind:O.languages.CompletionItemKind.Function,documentation:Ke,insertText:Ke,insertTextRules:O.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ze})),...Ie.quickKey.map(Ke=>({label:Ke.label,kind:O.languages.CompletionItemKind.Function,documentation:Ke.content,insertText:Ve.startsWith("#")?Ke.content.replace(/#/,""):Ke.content,insertTextRules:O.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ze}))]}}}),O.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Te,De){var We=Te.getWordUntilPosition(De),Ze={startLineNumber:De.lineNumber,endLineNumber:De.lineNumber,startColumn:We.startColumn,endColumn:We.endColumn},Ve=Te.getLineContent(De.lineNumber).substring(We.startColumn-2,We.endColumn);return{suggestions:[...Oe.keywords.map(Ke=>({label:Ke,kind:O.languages.CompletionItemKind.Function,documentation:Ke,insertText:Ke,insertTextRules:O.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ze})),...Oe.quickKey.map(Ke=>({label:Ke.label,kind:O.languages.CompletionItemKind.Function,documentation:Ke.content,insertText:Ve.startsWith("#")?Ke.content.replace(/#/,""):Ke.content,insertTextRules:O.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ze}))]}}}),O.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Te,De){var We=Te.getWordUntilPosition(De),Ze={startLineNumber:De.lineNumber,endLineNumber:De.lineNumber,startColumn:We.startColumn,endColumn:We.endColumn},Ve=Te.getLineContent(De.lineNumber).substring(We.startColumn-2,We.endColumn);return{suggestions:[...pe.keywords.map(Ke=>({label:Ke,kind:O.languages.CompletionItemKind.Function,documentation:Ke,insertText:Ke,insertTextRules:O.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ze})),...pe.quickKey.map(Ke=>({label:Ke.label,kind:O.languages.CompletionItemKind.Function,documentation:Ke.content,insertText:Ve.startsWith("#")?Ke.content.replace(/#/,""):Ke.content,insertTextRules:O.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ze}))]}}})};const we="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var Ce=Object.defineProperty,Se=(O,Q,ye)=>Q in O?Ce(O,Q,{enumerable:!0,configurable:!0,writable:!0,value:ye}):O[Q]=ye,Be=(O,Q,ye)=>Se(O,typeof Q!="symbol"?Q+"":Q,ye);const G=class Zo{constructor(Q,ye,fe){this.placeholder=Q,this.editor=ye,this.monaco=fe,ye.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)}};Be(G,"ID","editor.widget.placeholderHint");var j=G,Z=ne(96236),le=ne(8591),ee=ne(6848),E=ne(89392),T=ne(34604),X=ne(56102),ge=Object.defineProperty,je=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,nt=Object.getOwnPropertySymbols,rt=Object.prototype.hasOwnProperty,Gt=Object.prototype.propertyIsEnumerable,ct=(O,Q,ye)=>Q in O?ge(O,Q,{enumerable:!0,configurable:!0,writable:!0,value:ye}):O[Q]=ye,st=(O,Q)=>{for(var ye in Q||(Q={}))rt.call(Q,ye)&&ct(O,ye,Q[ye]);if(nt)for(var ye of nt(Q))Gt.call(Q,ye)&&ct(O,ye,Q[ye]);return O},tr=(O,Q)=>je(O,Qe(Q)),sr=(O,Q)=>{var ye={};for(var fe in O)rt.call(O,fe)&&Q.indexOf(fe)<0&&(ye[fe]=O[fe]);if(O!=null&&nt)for(var fe of nt(O))Q.indexOf(fe)<0&&Gt.call(O,fe)&&(ye[fe]=O[fe]);return ye},yr=(O,Q,ye)=>new Promise((fe,Te)=>{var De=Ve=>{try{Ze(ye.next(Ve))}catch(Ke){Te(Ke)}},We=Ve=>{try{Ze(ye.throw(Ve))}catch(Ke){Te(Ke)}},Ze=Ve=>Ve.done?fe(Ve.value):Promise.resolve(Ve.value).then(De,We);Ze((ye=ye.apply(O,Q)).next())});function ar(O){return/^\d+$/.test(O)?`${O}px`:O}function qt(){}let Kt=!1;const ke={"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 Je(O=[]){let Q=O;if(Array.isArray(O)){for(let ye=0;ye<O.length;ye++){let fe=ke[O[ye]];if(fe)return fe}return Q[0]}return ke[Q]||Q}let ue=null;var Me=O=>{var Q=O,{width:ye="100%",height:fe="100%",value:Te,language:De="javascript",style:We={},options:Ze={},overrideServices:Ve={},theme:Ke="vs-dark",onEditBlur:vt,isCopy:gt=!1,onSave:at,autoHeight:mt=!1,forbidCopy:wt=!1,onChange:ft=qt,editorDidMount:Dt=qt,onFocus:yt=qt,onBreakPoint:_=qt,breakPointValue:w=[],filename:Ye="educoder.txt",errorLine:I,errorContent:re="",highlightLine:zt,openBreakPoint:ce=!1,placeholder:Ae=""}=Q,Fe=sr(Q,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder"]);const B=(0,se.useRef)(),q=(0,se.useRef)({}),oe=(0,se.useRef)(),be=(0,se.useRef)(),L=(0,se.useRef)([]),dt=(0,se.useRef)(!1),ae=(0,se.useRef)(),At=(0,se.useRef)(),Ct=(0,se.useRef)(!1),[Mt,br]=(0,se.useState)(!1);function Ht(){let It;return B.current&&(It=new xe.Z(Et=>{for(let Yt of Et)(Yt.target.offsetHeight>0||Yt.target.offsetWidth>0)&&q.current.instance.layout()}),It.observe(B.current)),It}function Ot(){le.ZP.warning({content:decodeURIComponent(we),key:"monaco-editor-tip"})}const Ar=()=>{let It=q.current.instance;if(Te!=null&&It&&Mt){const Et=It.getModel();Et&&Te!==Et.getValue()&&(Kt=!0,Et.setValue(Te),It.layout(),Kt=!1)}};(0,se.useEffect)(()=>{const It=T.Z.subscribe("formatDocument",Et=>{var Yt;let xr=q.current.instance;(Yt=xr==null?void 0:xr.getAction)==null||Yt.call(xr,"editor.action.formatDocument").run()});return window.updateMonacoValue=Et=>{ft(Et)},It},[]),(0,se.useEffect)(()=>{var It;let Et=q.current.instance;be.current&&clearTimeout(be.current),be.current=setTimeout(()=>{Ar()},500),Te&&(Te!=null&&Te.length)&&((It=Et==null?void 0:Et.updateOptions)==null||It.call(Et,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Te.split(/\r\n|\r|\n/g).length))+3,5)}))},[Te,Mt,q.current]),(0,se.useEffect)(()=>{if(I&&q.current&&q.current.instance){let Et=q.current.instance;Et.changeViewZones(function(Yt){var xr=document.createElement("div");xr.style.padding="10px 20px",xr.style.width="calc(100% - 20px)",xr.className="my-error-line-wrp",xr.innerHTML=re,Yt.addZone({afterLineNumber:I||11,heightInLines:3,domNode:xr})});var It={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}};Et.addOverlayWidget(It),Et.revealPositionInCenter({lineNumber:20,column:1})}},[I,q.current,Mt]);const Br=(It="",Et)=>{if(!It||It.trim()==="")return!0;const xr=q.current.instance.getModel().getLineTokens(Et);let gr=!1;for(let Wr=0;Wr<2;Wr++)xr.getStandardTokenType(Wr)===1&&(gr=!0);return gr};(0,se.useEffect)(()=>{var It;const Et=(It=q.current)==null?void 0:It.instance;if(Et&&Mt&&wt){const Yt=Et.onDidBlurEditorWidget(()=>{Ct.current=!1}),xr=Et.onDidFocusEditorText(()=>{Ct.current=!0});return()=>{Yt.dispose(),xr.dispose()}}},[q.current,Mt,wt]),(0,se.useEffect)(()=>{var It;if((It=q.current)!=null&&It.instance&&Mt&&ce){let Et=q.current.instance,Yt=Et.getModel();if(!Yt)return;(()=>{var Qt;let lr=[],Sr=[];const Cr=Yt.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(zt===lr[0])return;Yt.deltaDecorations(Sr,[]);const wr=Yt.getLineCount();zt&&zt<=wr&&(Et.deltaDecorations([],[{range:new ue.Range(zt,1,zt,Yt.getLineMaxColumn(zt)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Et.revealLineInCenter(zt))})();const gr=(Qt=!1)=>{var lr;let Sr=[],Cr=[];const wr=Yt.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)},Wr=Qt=>yr(void 0,null,function*(){let lr={range:new ue.Range(Qt,1,Qt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Yt.deltaDecorations([],[lr]),gr()}),Mn=Qt=>yr(void 0,null,function*(){let lr=[];const Sr=Et.getLineDecorations(Qt);for(let Cr of Sr)Cr.options.linesDecorationsClassName==="breakpoints-select"&&lr.push(Cr.id);yield Yt.deltaDecorations(lr,[]),gr()}),Vr=Qt=>{let lr=Et.getLineDecorations(Qt);for(let Sr of lr)if(Sr.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,E.isEqual)(w,gr(!0).lines)){Yt.deltaDecorations(gr(!0).ids,[]);const Qt=w.map(lr=>({range:new ue.Range(lr,1,lr,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Yt.deltaDecorations([],Qt)}const Tr=Et.onDidChangeModelContent(Qt=>{let lr=Et.getPosition();if(lr){let Sr=lr.lineNumber;clearTimeout(At.current),At.current=setTimeout(()=>{Br(Yt.getLineContent(Sr),Sr)?Mn(Sr):Vr(Sr)?(Mn(Sr),Wr(Sr)):gr()},100)}}),Or=Et.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(Yt.getLineContent(wr),wr))return;Vr(wr)?Mn(wr):Wr(wr)}}),cr=Qt=>{let lr={range:new ue.Range(Qt,1,Qt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};L.current=Et.deltaDecorations(L.current,[lr])},nn=()=>{L.current=Et.deltaDecorations(L.current,[])},fn=Et.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(Yt.getLineContent(wr),wr))return;cr(wr)}}),Hr=Et.onMouseLeave(()=>{nn()});return()=>{Tr.dispose(),Or.dispose(),fn.dispose(),Hr.dispose()}}},[q.current,Mt,w,zt,ce,De]),(0,se.useEffect)(()=>{var It;(It=q.current)!=null&&It.instance&&ce&&q.current.instance.setPosition({lineNumber:0,column:0})},[zt]);function Gr(){let It=q.current.instance;if(It){const Et=It.getSelection(),Yt=q.current.pastePos||{},xr=new ue.Range(Yt.startLineNumber||Et.endLineNumber,Yt.startColumn||Et.endColumn,Yt.endLineNumber||Et.endLineNumber,Yt.endColumn||Et.endColumn);setTimeout(()=>{It.executeEdits("",[{range:xr,text:""}])},300)}}function zr(It){(window.navigator.platform.match("Mac")?It.metaKey:It.ctrlKey)&&It.keyCode==83&&(It.preventDefault(),at())}const Tt=()=>{if(mt&&q.current.instance){const It=q.current.instance.getContentHeight();wn(It<fe?fe:It)}else wn(fe)};function jt(It){var Et=document.createEvent("MouseEvents");Et.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),It.dispatchEvent(Et)}const pr=It=>{if(!Ct.current)return;const{keyCode:Et,ctrlKey:Yt,metaKey:xr,target:gr,type:Wr}=It;return(Wr==="paste"||(Et===67||Et===86)&&(xr||Yt))&&gr.nodeName==="TEXTAREA"&&(Ot(),It.preventDefault()),!1};function Kr(It,Et){var Yt=window.URL||window.webkitURL||window,xr=new Blob([Et]),gr=document.createElementNS("http://www.w3.org/1999/xhtml","a");gr.href=Yt.createObjectURL(xr),gr.download=It,jt(gr)}(0,se.useEffect)(()=>{Tt()},[Tt]),(0,se.useEffect)(()=>{B.current&&!Mt&&Promise.all([ne.e(8909),ne.e(3267)]).then(ne.bind(ne,71448)).then(It=>{try{ue=It,q.current.instance=ue.editor.create(B.current,{value:Te,language:Je(De),theme:Ke,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0},Ve);const Et=q.current.instance;let gr=[...Z.BH._menuItems].find(Tr=>Tr[0]._debugName=="EditorContext")[1],Wr=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Mn=(Tr,Or)=>{var cr,nn;let fn=Tr._first;do Or.includes((nn=(cr=fn.element)==null?void 0:cr.command)==null?void 0:nn.id)&&Tr._remove(fn);while(fn=fn.next)};if(Dt(Et,ue),setTimeout(()=>{Tt(),q.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Kr(Ye||"educoder.txt",Et.getValue())}})},500),q.current.subscription=Et.onDidChangeModelContent(Tr=>{dt.current?clearTimeout(ae.current):(Tt(),ft(Et.getValue(),Tr)),ae.current=setTimeout(()=>{dt.current=!1},500)}),window.Monaco||de(ue,Je(De)),wt&&(Mn(gr,Wr),B.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",pr),window.removeEventListener("paste",pr),window.addEventListener("keydown",pr),window.addEventListener("paste",pr)),window.Monaco=ue,vt&&Et.onDidBlurEditorWidget(()=>{vt(Et.getValue())}),yt&&Et.onDidFocusEditorText(()=>{yt(Et.getValue())}),wt)try{Et.onDidPaste(Tr=>{const Or=Et.getSelection(),cr=q.current.pastePos||{},nn=new ue.Range(cr.startLineNumber||Or.endLineNumber,cr.startColumn||Or.endColumn,cr.endLineNumber||Or.endLineNumber,cr.endColumn||Or.endColumn);Et.executeEdits("",[{range:Tr.range,text:""}])})}catch(Tr){}let Vr=Ht();return Ae&&typeof Ae=="string"&&new j(Ae,Et,ue),br(!0),()=>{const Tr=q.current.instance;Tr.dispose();const Or=Tr.getModel();Or&&Or.dispose(),q.current.subscription&&q.current.subscription.dispose(),Vr.unobserve(B.current)}}catch(Et){}})},[]),(0,se.useEffect)(()=>{if(q.current.instance&&Mt)return document.addEventListener("keydown",zr,!1),()=>{document.removeEventListener("keydown",zr)}},[at,Mt]),(0,se.useEffect)(()=>{let It=q.current.instance;if(It&&Mt){let Et=Je(De);ue.editor.setModelLanguage(It.getModel(),Et)}},[De,Mt]),(0,se.useEffect)(()=>{q.current.instance&&Mt&&ue.editor.setTheme(Ke)},[Ke,Mt]),(0,se.useEffect)(()=>{let It=q.current.instance;oe.current=Ze,It&&Mt&&(It.updateOptions(st({},Ze)),setTimeout(()=>{It.getModel().updateOptions(st({},Ze))},200))},[JSON.stringify(Ze),Mt]),(0,se.useEffect)(()=>{let It=q.current.instance;It&&Mt&&It.layout()},[ye,fe,Mt]);const[Ir,tn]=(0,se.useState)(ar(ye)),[or,wn]=(0,se.useState)(ar(fe)),rn=tr(st({},We),{width:Ir,height:or,position:"relative"});return se.createElement("div",{className:"my-monaco-editor",ref:B,style:rn},gt&&se.createElement(X.CopyToClipboard,{text:Te,onCopy:()=>le.ZP.success("\u590D\u5236\u6210\u529F")},se.createElement(ee.Z,{title:"\u590D\u5236\u4EE3\u7801"},se.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},se.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Ge({width:O="100%",height:Q="100%",original:ye,modified:fe,language:Te,options:De={}}){const We=(0,se.useRef)(),[Ze,Ve]=(0,se.useState)(null);function Ke(mt){let wt;return We.current&&(wt=new xe.Z(ft=>{for(let Dt of ft)(Dt.target.offsetHeight>0||Dt.target.offsetWidth>0)&&mt.layout()}),wt.observe(We.current)),wt}(0,se.useEffect)(()=>(We.current&&Promise.all([ne.e(8909),ne.e(9404)]).then(ne.bind(ne,2550)).then(mt=>{ue=mt;const wt=ue.editor.createDiffEditor(We.current,tr(st({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},De),{wordWrap:!0}));Ve(wt);let ft=Ke(wt);return()=>{wt.dispose();const Dt=wt.getModel();Dt&&Dt.dispose(),ft.unobserve(We.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,se.useEffect)(()=>{Ze&&Ze.setModel({original:ue.editor.createModel(ye,Te),modified:ue.editor.createModel(fe,Te)})},[ye,fe,Te,Ze]);const vt=ar(O),gt=ar(Q),at={width:vt,height:gt};return se.createElement("div",{className:"my-diff-editor",ref:We,style:at})}},98792:function(Bt,it,ne){"use strict";ne.r(it),ne.d(it,{default:function(){return $}});var se=ne(59301),xe=ne(89070),Le=ne(955),Ie=ne(61621),Ne=ne(3113),pe={flex_box_center:"flex_box_center___xpkMF",flex_space_between:"flex_space_between___X8GQS",flex_box_vertical_center:"flex_box_vertical_center___QXnUW",flex_box_center_end:"flex_box_center_end___Qxdq1",flex_box_column:"flex_box_column___pN_H3",guidance:"guidance___BnanP",title:"title___b2ocd",u:"u___QIqxh",active:"active___VXClY",content:"content___NNbRj",btn:"btn___Q2wyi"},Oe=ne(99064),Ee=ne(3294),l=ne(85149),K=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,A=Object.prototype.propertyIsEnumerable,d=(H,F)=>{var R={};for(var V in H)N.call(H,V)&&F.indexOf(V)<0&&(R[V]=H[V]);if(H!=null&&K)for(var V of K(H))F.indexOf(V)<0&&A.call(H,V)&&(R[V]=H[V]);return R},x=(H,F,R)=>new Promise((V,te)=>{var C=de=>{try{ve(R.next(de))}catch(we){te(we)}},_e=de=>{try{ve(R.throw(de))}catch(we){te(we)}},ve=de=>de.done?V(de.value):Promise.resolve(de.value).then(C,_e);ve((R=R.apply(H,F)).next())});const y=H=>{var F=H,{user:R}=F,V=d(F,["user"]),te,C,_e;const[ve,de]=(0,se.useState)(1),[we,Ce]=(0,se.useState)(!1),[Se,Be]=(0,se.useState)(!1),[G,U]=(0,se.useState)(""),[j,Z]=(0,se.useState)(!0),[le,ee]=(0,se.useState)([{},{}]),E=(0,xe.useLocation)(),{pathname:T}=E;console.log(E,"location"),(0,se.useEffect)(()=>{var Qe;(Qe=R==null?void 0:R.userInfo)!=null&&Qe.identity&&X()},[(te=R==null?void 0:R.userInfo)==null?void 0:te.identity]),(0,se.useEffect)(()=>{ge()},[]);const X=()=>{var Qe;if(T.includes("classrooms")){((Qe=R==null?void 0:R.userInfo)==null?void 0:Qe.identity)==="student"&&(Ce(!0),de(2));return}if(T.includes("paths")){Be(!0);return}},ge=Qe=>x(void 0,null,function*(){const nt=yield(0,Oe.ZP)("/api/introductions.json",{method:"get"});if(nt!=null&&nt.introductions){let rt=null;T.includes("classrooms")&&(rt="course",U("\u6559\u5B66\u8BFE\u5802")),T.includes("paths")&&(rt="subject",U("\u5B9E\u8DF5\u8BFE\u7A0B"));const Gt=nt.introductions,ct=[Gt==null?void 0:Gt.find(st=>st.clazz==="teacher"&&st.page_type===rt),Gt==null?void 0:Gt.find(st=>st.clazz==="student"&&st.page_type===rt)];ee(ct)}Z(!1)}),je=()=>{var Qe,nt;const rt=Ee.Z.API_SERVER+"/api/attachments/"+(ve===1?(Qe=le[0])==null?void 0:Qe.attachment_id:(nt=le[1])==null?void 0:nt.attachment_id);(0,Le.Nd)("",rt)};return se.createElement("section",{className:pe.guidance},se.createElement(Ie.Z,{loading:j,active:!0,paragraph:{rows:5}},se.createElement("div",{className:pe.title},G,"\u65B0\u624B\u6307\u5F15"),se.createElement("ul",{className:pe.u},!we&&se.createElement("li",{onClick:()=>de(1),className:ve===1?pe.active:""},"\u6559\u5E08\u7248"),!Se&&se.createElement("li",{onClick:()=>de(2),className:ve===2?pe.active:""},"\u5B66\u751F\u7248")),ve===1&&se.createElement("div",{className:pe.content},se.createElement(l.Z,{value:((C=le[0])==null?void 0:C.content)||""})),ve===2&&se.createElement("div",{className:pe.content},se.createElement(l.Z,{value:((_e=le[1])==null?void 0:_e.content)||""})),se.createElement("div",{className:pe.btn},se.createElement(Ne.ZP,{type:"primary",onClick:je},"\u4E0B\u8F7D\u7528\u6237\u624B\u518C"))))};var $=(0,xe.connect)(({user:H})=>({user:H}))(y)},24768:function(Bt,it,ne){"use strict";ne.d(it,{AL:function(){return te},Iy:function(){return N},Qv:function(){return x},ez:function(){return V},jb:function(){return A}});var se=ne(32834),xe=ne.n(se),Le=ne(11690),Ie=ne.n(Le);let Ne=1;function pe(we,Ce){const Se=we.match(/^(\s+)(?:```)/);if(Se===null)return Ce;const Be=Se[1];return Ce.split(`
|
|
`).map(G=>{const U=G.match(/^\s+/);if(U===null)return G;const[j]=U;return j.length>=Be.length?G.slice(Be.length):G}).join(`
|
|
`)}let Oe=[],Ee=["<ul>"];const l=new(xe()).Renderer,K=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function N(){Oe.length=0,Ee=["<ul>"]}const A={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function d(we,Ce,Se,Be){if(Ce>=we.length||we[Ce].level<=Se)return Ce;var G=we[Ce];Be.push("<li><a href='#"+Ne+G.anchor+"'>"+G.text+"</a>"),Ce++;var U=[];return Ce=d(we,Ce,G.level,U),U.length>0&&(Be.push("<ul>"),U.forEach(function(j){Be.push(j)}),Be.push("</ul>")),Be.push("</li>"),Ce=d(we,Ce,Se,Be),Ce}function x(){return d(Oe,0,0,Ee),Ee.push("</ul>"),Ee.join("")}const y={heading(we){const Ce=K.exec(we);if(Ne+=1,Ce)return{type:"heading",raw:Ce[0],depth:Ce[1].length,text:Ce[2]}},fences(we){const Ce=this.rules.block.fences.exec(we);if(Ce){const Se=Ce[0];let Be=pe(Se,Ce[3]||"");const G=Ce[2]?Ce[2].trim():Ce[2];if(["latex","katex","math"].indexOf(G)>=0){const U=F(),j=Be;Be=U,R[U]={type:"block",expression:j}}return{type:"code",raw:Se,lang:G,text:Be}}}},$=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let H=0;const F=()=>`__special_katext_id_${H++}__`;let R={};function V(){return R}function te(){H=0,R={}}function C(we){return we=we.replace($,(Ce,Se)=>{const Be=F();return R[Be]={type:"inline",expression:Se},Be}),we}const _e=l.listitem;l.listitem=function(we){return _e(C(we))};const ve=l.paragraph;l.paragraph=function(we){return ve(C(we))};const de=l.tablecell;l.tablecell=function(we,Ce){return de(C(we),Ce)},l.code=function(we,Ce,Se){const Be=(Ce||"").match(/\S*/)[0];return Be?["latex","katex","math"].indexOf(Be)>=0?`<p class='editormd-tex'>${we}</p>`:`<pre class="prettyprint linenums"><code class="language-${Ce}">${Se?we:(0,Le.escape)(we,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(Se?we:(0,Le.escape)(we,!0))+"</code></pre>"},l.heading=function(we,Ce,Se){let Be=this.options.headerPrefix+Se.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return Oe.push({anchor:Be,level:Ce,text:we}),"<h"+Ce+' id="'+Ne+Be+'">'+we+"</h"+Ce+">"},xe().setOptions({silent:!0,gfm:!0,pedantic:!1}),xe().use({tokenizer:y,renderer:l}),it.ZP=xe()},36785:function(Bt,it,ne){"use strict";ne.d(it,{o2:function(){return Ne},yT:function(){return pe}});var se=ne(19127),xe=ne(33166);const Le=xe.i.map(Oe=>`${Oe}-inverse`),Ie=["success","processing","error","default","warning"];function Ne(Oe){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat((0,se.Z)(Le),(0,se.Z)(xe.i)).includes(Oe):xe.i.includes(Oe)}function pe(Oe){return Ie.includes(Oe)}},79676:function(Bt,it,ne){"use strict";ne.d(it,{Z:function(){return pe}});var se=ne(19447);function xe(Oe,Ee,l,K){if(K===!1)return{adjustX:!1,adjustY:!1};const N=K&&typeof K=="object"?K:{},A={};switch(Oe){case"top":case"bottom":A.shiftX=Ee.dropdownArrowOffset*2+l;break;case"left":case"right":A.shiftY=Ee.dropdownArrowOffsetVertical*2+l;break}const d=Object.assign(Object.assign({},A),N);return d.shiftX||(d.adjustX=!0),d.shiftY||(d.adjustY=!0),d}const Le={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"]}},Ie={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"]}},Ne=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function pe(Oe){const{arrowWidth:Ee,autoAdjustOverflow:l,arrowPointAtCenter:K,offset:N,borderRadius:A,visibleFirst:d}=Oe,x=Ee/2,y={};return Object.keys(Le).forEach($=>{const H=K&&Ie[$]||Le[$],F=Object.assign(Object.assign({},H),{offset:[0,0]});switch(y[$]=F,Ne.has($)&&(F.autoArrow=!1),$){case"top":case"topLeft":case"topRight":F.offset[1]=-x-N;break;case"bottom":case"bottomLeft":case"bottomRight":F.offset[1]=x+N;break;case"left":case"leftTop":case"leftBottom":F.offset[0]=-x-N;break;case"right":case"rightTop":case"rightBottom":F.offset[0]=x+N;break}const R=(0,se.fS)({contentRadius:A,limitVerticalRadius:!0});if(K)switch($){case"topLeft":case"bottomLeft":F.offset[0]=-R.dropdownArrowOffset-x;break;case"topRight":case"bottomRight":F.offset[0]=R.dropdownArrowOffset+x;break;case"leftTop":case"rightTop":F.offset[1]=-R.dropdownArrowOffset-x;break;case"leftBottom":case"rightBottom":F.offset[1]=R.dropdownArrowOffset+x;break}F.overflow=xe($,R,Ee,l),d&&(F.htmlRegion="visibleFirst")}),y}},61621:function(Bt,it,ne){"use strict";ne.d(it,{Z:function(){return Je}});var se=ne(92310),xe=ne.n(se),Le=ne(59301),Ie=ne(36355),Ne=ne(2738),Oe=ue=>{const{prefixCls:Me,className:Ge,style:O,size:Q,shape:ye}=ue,fe=xe()({[`${Me}-lg`]:Q==="large",[`${Me}-sm`]:Q==="small"}),Te=xe()({[`${Me}-circle`]:ye==="circle",[`${Me}-square`]:ye==="square",[`${Me}-round`]:ye==="round"}),De=Le.useMemo(()=>typeof Q=="number"?{width:Q,height:Q,lineHeight:`${Q}px`}:{},[Q]);return Le.createElement("span",{className:xe()(Me,fe,Te,Ge),style:Object.assign(Object.assign({},De),O)})},Ee=ne(93083),l=ne(83116),K=ne(37613);const N=new Ee.Keyframes("ant-skeleton-loading",{"0%":{backgroundPosition:"100% 50%"},"100%":{backgroundPosition:"0 50%"}}),A=ue=>({height:ue,lineHeight:`${ue}px`}),d=ue=>Object.assign({width:ue},A(ue)),x=ue=>({background:ue.skeletonLoadingBackground,backgroundSize:"400% 100%",animationName:N,animationDuration:ue.skeletonLoadingMotionDuration,animationTimingFunction:"ease",animationIterationCount:"infinite"}),y=ue=>Object.assign({width:ue*5,minWidth:ue*5},A(ue)),$=ue=>{const{skeletonAvatarCls:Me,gradientFromColor:Ge,controlHeight:O,controlHeightLG:Q,controlHeightSM:ye}=ue;return{[`${Me}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Ge},d(O)),[`${Me}${Me}-circle`]:{borderRadius:"50%"},[`${Me}${Me}-lg`]:Object.assign({},d(Q)),[`${Me}${Me}-sm`]:Object.assign({},d(ye))}},H=ue=>{const{controlHeight:Me,borderRadiusSM:Ge,skeletonInputCls:O,controlHeightLG:Q,controlHeightSM:ye,gradientFromColor:fe}=ue;return{[`${O}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:fe,borderRadius:Ge},y(Me)),[`${O}-lg`]:Object.assign({},y(Q)),[`${O}-sm`]:Object.assign({},y(ye))}},F=ue=>Object.assign({width:ue},A(ue)),R=ue=>{const{skeletonImageCls:Me,imageSizeBase:Ge,gradientFromColor:O,borderRadiusSM:Q}=ue;return{[`${Me}`]:Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",background:O,borderRadius:Q},F(Ge*2)),{[`${Me}-path`]:{fill:"#bfbfbf"},[`${Me}-svg`]:Object.assign(Object.assign({},F(Ge)),{maxWidth:Ge*4,maxHeight:Ge*4}),[`${Me}-svg${Me}-svg-circle`]:{borderRadius:"50%"}}),[`${Me}${Me}-circle`]:{borderRadius:"50%"}}},V=(ue,Me,Ge)=>{const{skeletonButtonCls:O}=ue;return{[`${Ge}${O}-circle`]:{width:Me,minWidth:Me,borderRadius:"50%"},[`${Ge}${O}-round`]:{borderRadius:Me}}},te=ue=>Object.assign({width:ue*2,minWidth:ue*2},A(ue)),C=ue=>{const{borderRadiusSM:Me,skeletonButtonCls:Ge,controlHeight:O,controlHeightLG:Q,controlHeightSM:ye,gradientFromColor:fe}=ue;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[`${Ge}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:fe,borderRadius:Me,width:O*2,minWidth:O*2},te(O))},V(ue,O,Ge)),{[`${Ge}-lg`]:Object.assign({},te(Q))}),V(ue,Q,`${Ge}-lg`)),{[`${Ge}-sm`]:Object.assign({},te(ye))}),V(ue,ye,`${Ge}-sm`))},_e=ue=>{const{componentCls:Me,skeletonAvatarCls:Ge,skeletonTitleCls:O,skeletonParagraphCls:Q,skeletonButtonCls:ye,skeletonInputCls:fe,skeletonImageCls:Te,controlHeight:De,controlHeightLG:We,controlHeightSM:Ze,gradientFromColor:Ve,padding:Ke,marginSM:vt,borderRadius:gt,titleHeight:at,blockRadius:mt,paragraphLiHeight:wt,controlHeightXS:ft,paragraphMarginTop:Dt}=ue;return{[`${Me}`]:{display:"table",width:"100%",[`${Me}-header`]:{display:"table-cell",paddingInlineEnd:Ke,verticalAlign:"top",[`${Ge}`]:Object.assign({display:"inline-block",verticalAlign:"top",background:Ve},d(De)),[`${Ge}-circle`]:{borderRadius:"50%"},[`${Ge}-lg`]:Object.assign({},d(We)),[`${Ge}-sm`]:Object.assign({},d(Ze))},[`${Me}-content`]:{display:"table-cell",width:"100%",verticalAlign:"top",[`${O}`]:{width:"100%",height:at,background:Ve,borderRadius:mt,[`+ ${Q}`]:{marginBlockStart:Ze}},[`${Q}`]:{padding:0,"> li":{width:"100%",height:wt,listStyle:"none",background:Ve,borderRadius:mt,"+ li":{marginBlockStart:ft}}},[`${Q}> li:last-child:not(:first-child):not(:nth-child(2))`]:{width:"61%"}},[`&-round ${Me}-content`]:{[`${O}, ${Q} > li`]:{borderRadius:gt}}},[`${Me}-with-avatar ${Me}-content`]:{[`${O}`]:{marginBlockStart:vt,[`+ ${Q}`]:{marginBlockStart:Dt}}},[`${Me}${Me}-element`]:Object.assign(Object.assign(Object.assign(Object.assign({display:"inline-block",width:"auto"},C(ue)),$(ue)),H(ue)),R(ue)),[`${Me}${Me}-block`]:{width:"100%",[`${ye}`]:{width:"100%"},[`${fe}`]:{width:"100%"}},[`${Me}${Me}-active`]:{[`
|
|
${O},
|
|
${Q} > li,
|
|
${Ge},
|
|
${ye},
|
|
${fe},
|
|
${Te}
|
|
`]:Object.assign({},x(ue))}}};var ve=(0,l.Z)("Skeleton",ue=>{const{componentCls:Me}=ue,Ge=(0,K.TS)(ue,{skeletonAvatarCls:`${Me}-avatar`,skeletonTitleCls:`${Me}-title`,skeletonParagraphCls:`${Me}-paragraph`,skeletonButtonCls:`${Me}-button`,skeletonInputCls:`${Me}-input`,skeletonImageCls:`${Me}-image`,imageSizeBase:ue.controlHeight*1.5,borderRadius:100,skeletonLoadingBackground:`linear-gradient(90deg, ${ue.gradientFromColor} 25%, ${ue.gradientToColor} 37%, ${ue.gradientFromColor} 63%)`,skeletonLoadingMotionDuration:"1.4s"});return[_e(Ge)]},ue=>{const{colorFillContent:Me,colorFill:Ge}=ue,O=Me,Q=Ge;return{color:O,colorGradientEnd:Q,gradientFromColor:O,gradientToColor:Q,titleHeight:ue.controlHeight/2,blockRadius:ue.borderRadiusSM,paragraphMarginTop:ue.marginLG+ue.marginXXS,paragraphLiHeight:ue.controlHeight/2}},{deprecatedTokens:[["color","gradientFromColor"],["colorGradientEnd","gradientToColor"]]}),we=ue=>{const{prefixCls:Me,className:Ge,rootClassName:O,active:Q,shape:ye="circle",size:fe="default"}=ue,{getPrefixCls:Te}=Le.useContext(Ie.E_),De=Te("skeleton",Me),[We,Ze]=ve(De),Ve=(0,Ne.Z)(ue,["prefixCls","className"]),Ke=xe()(De,`${De}-element`,{[`${De}-active`]:Q},Ge,O,Ze);return We(Le.createElement("div",{className:Ke},Le.createElement(Oe,Object.assign({prefixCls:`${De}-avatar`,shape:ye,size:fe},Ve))))},Se=ue=>{const{prefixCls:Me,className:Ge,rootClassName:O,active:Q,block:ye=!1,size:fe="default"}=ue,{getPrefixCls:Te}=Le.useContext(Ie.E_),De=Te("skeleton",Me),[We,Ze]=ve(De),Ve=(0,Ne.Z)(ue,["prefixCls"]),Ke=xe()(De,`${De}-element`,{[`${De}-active`]:Q,[`${De}-block`]:ye},Ge,O,Ze);return We(Le.createElement("div",{className:Ke},Le.createElement(Oe,Object.assign({prefixCls:`${De}-button`,size:fe},Ve))))};const Be="M365.714286 329.142857q0 45.714286-32.036571 77.677714t-77.677714 32.036571-77.677714-32.036571-32.036571-77.677714 32.036571-77.677714 77.677714-32.036571 77.677714 32.036571 32.036571 77.677714zM950.857143 548.571429l0 256-804.571429 0 0-109.714286 182.857143-182.857143 91.428571 91.428571 292.571429-292.571429zM1005.714286 146.285714l-914.285714 0q-7.460571 0-12.873143 5.412571t-5.412571 12.873143l0 694.857143q0 7.460571 5.412571 12.873143t12.873143 5.412571l914.285714 0q7.460571 0 12.873143-5.412571t5.412571-12.873143l0-694.857143q0-7.460571-5.412571-12.873143t-12.873143-5.412571zM1097.142857 164.571429l0 694.857143q0 37.741714-26.843429 64.585143t-64.585143 26.843429l-914.285714 0q-37.741714 0-64.585143-26.843429t-26.843429-64.585143l0-694.857143q0-37.741714 26.843429-64.585143t64.585143-26.843429l914.285714 0q37.741714 0 64.585143 26.843429t26.843429 64.585143z";var U=ue=>{const{prefixCls:Me,className:Ge,rootClassName:O,style:Q,active:ye}=ue,{getPrefixCls:fe}=Le.useContext(Ie.E_),Te=fe("skeleton",Me),[De,We]=ve(Te),Ze=xe()(Te,`${Te}-element`,{[`${Te}-active`]:ye},Ge,O,We);return De(Le.createElement("div",{className:Ze},Le.createElement("div",{className:xe()(`${Te}-image`,Ge),style:Q},Le.createElement("svg",{viewBox:"0 0 1098 1024",xmlns:"http://www.w3.org/2000/svg",className:`${Te}-image-svg`},Le.createElement("path",{d:Be,className:`${Te}-image-path`})))))},Z=ue=>{const{prefixCls:Me,className:Ge,rootClassName:O,active:Q,block:ye,size:fe="default"}=ue,{getPrefixCls:Te}=Le.useContext(Ie.E_),De=Te("skeleton",Me),[We,Ze]=ve(De),Ve=(0,Ne.Z)(ue,["prefixCls"]),Ke=xe()(De,`${De}-element`,{[`${De}-active`]:Q,[`${De}-block`]:ye},Ge,O,Ze);return We(Le.createElement("div",{className:Ke},Le.createElement(Oe,Object.assign({prefixCls:`${De}-input`,size:fe},Ve))))},le=ne(96663),ee={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888 792H200V168c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v688c0 4.4 3.6 8 8 8h752c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM288 604a64 64 0 10128 0 64 64 0 10-128 0zm118-224a48 48 0 1096 0 48 48 0 10-96 0zm158 228a96 96 0 10192 0 96 96 0 10-192 0zm148-314a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"dot-chart",theme:"outlined"},E=ee,T=ne(7657),X=function(Me,Ge){return Le.createElement(T.Z,(0,le.Z)({},Me,{ref:Ge,icon:E}))},ge=Le.forwardRef(X),je=ge,nt=ue=>{const{prefixCls:Me,className:Ge,rootClassName:O,style:Q,active:ye,children:fe}=ue,{getPrefixCls:Te}=Le.useContext(Ie.E_),De=Te("skeleton",Me),[We,Ze]=ve(De),Ve=xe()(De,`${De}-element`,{[`${De}-active`]:ye},Ze,Ge,O),Ke=fe!=null?fe:Le.createElement(je,null);return We(Le.createElement("div",{className:Ve},Le.createElement("div",{className:xe()(`${De}-image`,Ge),style:Q},Ke)))},rt=ne(19127),ct=ue=>{const Me=Te=>{const{width:De,rows:We=2}=ue;if(Array.isArray(De))return De[Te];if(We-1===Te)return De},{prefixCls:Ge,className:O,style:Q,rows:ye}=ue,fe=(0,rt.Z)(Array(ye)).map((Te,De)=>Le.createElement("li",{key:De,style:{width:Me(De)}}));return Le.createElement("ul",{className:xe()(Ge,O),style:Q},fe)},tr=ue=>{let{prefixCls:Me,className:Ge,width:O,style:Q}=ue;return Le.createElement("h3",{className:xe()(Me,Ge),style:Object.assign({width:O},Q)})};function sr(ue){return ue&&typeof ue=="object"?ue:{}}function yr(ue,Me){return ue&&!Me?{size:"large",shape:"square"}:{size:"large",shape:"circle"}}function ar(ue,Me){return!ue&&Me?{width:"38%"}:ue&&Me?{width:"50%"}:{}}function qt(ue,Me){const Ge={};return(!ue||!Me)&&(Ge.width="61%"),!ue&&Me?Ge.rows=3:Ge.rows=2,Ge}const Kt=ue=>{const{prefixCls:Me,loading:Ge,className:O,rootClassName:Q,style:ye,children:fe,avatar:Te=!1,title:De=!0,paragraph:We=!0,active:Ze,round:Ve}=ue,{getPrefixCls:Ke,direction:vt,skeleton:gt}=Le.useContext(Ie.E_),at=Ke("skeleton",Me),[mt,wt]=ve(at);if(Ge||!("loading"in ue)){const ft=!!Te,Dt=!!De,yt=!!We;let _;if(ft){const I=Object.assign(Object.assign({prefixCls:`${at}-avatar`},yr(Dt,yt)),sr(Te));_=Le.createElement("div",{className:`${at}-header`},Le.createElement(Oe,Object.assign({},I)))}let w;if(Dt||yt){let I;if(Dt){const zt=Object.assign(Object.assign({prefixCls:`${at}-title`},ar(ft,yt)),sr(De));I=Le.createElement(tr,Object.assign({},zt))}let re;if(yt){const zt=Object.assign(Object.assign({prefixCls:`${at}-paragraph`},qt(ft,Dt)),sr(We));re=Le.createElement(ct,Object.assign({},zt))}w=Le.createElement("div",{className:`${at}-content`},I,re)}const Ye=xe()(at,{[`${at}-with-avatar`]:ft,[`${at}-active`]:Ze,[`${at}-rtl`]:vt==="rtl",[`${at}-round`]:Ve},gt==null?void 0:gt.className,O,Q,wt);return mt(Le.createElement("div",{className:Ye,style:Object.assign(Object.assign({},gt==null?void 0:gt.style),ye)},_,w))}return typeof fe!="undefined"?fe:null};Kt.Button=Se,Kt.Avatar=we,Kt.Input=Z,Kt.Image=U,Kt.Node=nt;var ke=Kt,Je=ke},19447:function(Bt,it,ne){"use strict";ne.d(it,{ZP:function(){return Ne},fS:function(){return Le},qN:function(){return xe}});var se=ne(47585);const xe=8;function Le(pe){const Oe=xe,{contentRadius:Ee,limitVerticalRadius:l}=pe,K=Ee>12?Ee+2:12;return{dropdownArrowOffset:K,dropdownArrowOffsetVertical:l?Oe:K}}function Ie(pe,Oe){return pe?Oe:{}}function Ne(pe,Oe){const{componentCls:Ee,sizePopupArrow:l,borderRadiusXS:K,borderRadiusOuter:N,boxShadowPopoverArrow:A}=pe,{colorBg:d,contentRadius:x=pe.borderRadiusLG,limitVerticalRadius:y,arrowDistance:$=0,arrowPlacement:H={left:!0,right:!0,top:!0,bottom:!0}}=Oe,{dropdownArrowOffsetVertical:F,dropdownArrowOffset:R}=Le({contentRadius:x,limitVerticalRadius:y});return{[Ee]:Object.assign(Object.assign(Object.assign(Object.assign({[`${Ee}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},(0,se.r)(l,K,N,d,A)),{"&:before":{background:d}})]},Ie(!!H.top,{[[`&-placement-top ${Ee}-arrow`,`&-placement-topLeft ${Ee}-arrow`,`&-placement-topRight ${Ee}-arrow`].join(",")]:{bottom:$,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top ${Ee}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},[`&-placement-topLeft ${Ee}-arrow`]:{left:{_skip_check_:!0,value:R}},[`&-placement-topRight ${Ee}-arrow`]:{right:{_skip_check_:!0,value:R}}})),Ie(!!H.bottom,{[[`&-placement-bottom ${Ee}-arrow`,`&-placement-bottomLeft ${Ee}-arrow`,`&-placement-bottomRight ${Ee}-arrow`].join(",")]:{top:$,transform:"translateY(-100%)"},[`&-placement-bottom ${Ee}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},[`&-placement-bottomLeft ${Ee}-arrow`]:{left:{_skip_check_:!0,value:R}},[`&-placement-bottomRight ${Ee}-arrow`]:{right:{_skip_check_:!0,value:R}}})),Ie(!!H.left,{[[`&-placement-left ${Ee}-arrow`,`&-placement-leftTop ${Ee}-arrow`,`&-placement-leftBottom ${Ee}-arrow`].join(",")]:{right:{_skip_check_:!0,value:$},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left ${Ee}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop ${Ee}-arrow`]:{top:F},[`&-placement-leftBottom ${Ee}-arrow`]:{bottom:F}})),Ie(!!H.right,{[[`&-placement-right ${Ee}-arrow`,`&-placement-rightTop ${Ee}-arrow`,`&-placement-rightBottom ${Ee}-arrow`].join(",")]:{left:{_skip_check_:!0,value:$},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right ${Ee}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop ${Ee}-arrow`]:{top:F},[`&-placement-rightBottom ${Ee}-arrow`]:{bottom:F}}))}}},47585:function(Bt,it,ne){"use strict";ne.d(it,{r:function(){return se}});const se=(xe,Le,Ie,Ne,pe)=>{const Oe=xe/2,Ee=0,l=Oe,K=Ie*1/Math.sqrt(2),N=Oe-Ie*(1-1/Math.sqrt(2)),A=Oe-Le*(1/Math.sqrt(2)),d=Ie*(Math.sqrt(2)-1)+Le*(1/Math.sqrt(2)),x=2*Oe-A,y=d,$=2*Oe-K,H=N,F=2*Oe-Ee,R=l,V=Oe*Math.sqrt(2)+Ie*(Math.sqrt(2)-2),te=Ie*(Math.sqrt(2)-1);return{pointerEvents:"none",width:xe,height:xe,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:xe,height:xe/2,background:Ne,clipPath:{_multi_value_:!0,value:[`polygon(${te}px 100%, 50% ${te}px, ${2*Oe-te}px 100%, ${te}px 100%)`,`path('M ${Ee} ${l} A ${Ie} ${Ie} 0 0 0 ${K} ${N} L ${A} ${d} A ${Le} ${Le} 0 0 1 ${x} ${y} L ${$} ${H} A ${Ie} ${Ie} 0 0 0 ${F} ${R} Z')`]},content:'""'},"&::after":{content:'""',position:"absolute",width:V,height:V,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${Le}px 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:pe,zIndex:0,background:"transparent"}}}},33166:function(Bt,it,ne){"use strict";ne.d(it,{i:function(){return se}});const se=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"]},45157:function(Bt,it,ne){"use strict";ne.d(it,{Z:function(){return xe}});var se=ne(33166);function xe(Le,Ie){return se.i.reduce((Ne,pe)=>{const Oe=Le[`${pe}1`],Ee=Le[`${pe}3`],l=Le[`${pe}6`],K=Le[`${pe}7`];return Object.assign(Object.assign({},Ne),Ie(pe,{lightColor:Oe,lightBorderColor:Ee,darkColor:l,textColor:K}))},{})}},6848:function(Bt,it,ne){"use strict";ne.d(it,{Z:function(){return Se}});var se=ne(59301),xe=ne(92310),Le=ne.n(xe),Ie=ne(55477),Ne=ne(18929),pe=ne(62892),Oe=ne(79676),Ee=ne(92343),l=ne(36355),K=ne(33234),N=ne(88088),A=ne(17313),d=ne(29878),x=ne(19447),y=ne(45157),$=ne(37613),H=ne(83116);const F=Be=>{const{componentCls:G,tooltipMaxWidth:U,tooltipColor:j,tooltipBg:Z,tooltipBorderRadius:le,zIndexPopup:ee,controlHeight:E,boxShadowSecondary:T,paddingSM:X,paddingXS:ge,tooltipRadiusOuter:je}=Be;return[{[G]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,A.Wf)(Be)),{position:"absolute",zIndex:ee,display:"block",width:"max-content",maxWidth:U,visibility:"visible",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","&-hidden":{display:"none"},"--antd-arrow-background-color":Z,[`${G}-inner`]:{minWidth:E,minHeight:E,padding:`${X/2}px ${ge}px`,color:j,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:Z,borderRadius:le,boxShadow:T,boxSizing:"border-box"},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${G}-inner`]:{borderRadius:Math.min(le,x.qN)}},[`${G}-content`]:{position:"relative"}}),(0,y.Z)(Be,(Qe,nt)=>{let{darkColor:rt}=nt;return{[`&${G}-${Qe}`]:{[`${G}-inner`]:{backgroundColor:rt},[`${G}-arrow`]:{"--antd-arrow-background-color":rt}}}})),{"&-rtl":{direction:"rtl"}})},(0,x.ZP)((0,$.TS)(Be,{borderRadiusOuter:je}),{colorBg:"var(--antd-arrow-background-color)",contentRadius:le,limitVerticalRadius:!0}),{[`${G}-pure`]:{position:"relative",maxWidth:"none",margin:Be.sizePopupArrow}}]};var R=(Be,G)=>(0,H.Z)("Tooltip",j=>{if(G===!1)return[];const{borderRadius:Z,colorTextLightSolid:le,colorBgDefault:ee,borderRadiusOuter:E}=j,T=(0,$.TS)(j,{tooltipMaxWidth:250,tooltipColor:le,tooltipBorderRadius:Z,tooltipBg:ee,tooltipRadiusOuter:E>4?4:E});return[F(T),(0,d._y)(j,"zoom-big-fast")]},j=>{let{zIndexPopupBase:Z,colorBgSpotlight:le}=j;return{zIndexPopup:Z+70,colorBgDefault:le}},{resetStyle:!1})(Be),V=ne(36785);function te(Be,G){const U=(0,V.o2)(G),j=Le()({[`${Be}-${G}`]:G&&U}),Z={},le={};return G&&!U&&(Z.background=G,le["--antd-arrow-background-color"]=G),{className:j,overlayStyle:Z,arrowStyle:le}}var _e=Be=>{const{prefixCls:G,className:U,placement:j="top",title:Z,color:le,overlayInnerStyle:ee}=Be,{getPrefixCls:E}=se.useContext(l.E_),T=E("tooltip",G),[X,ge]=R(T,!0),je=te(T,le),Qe=je.arrowStyle,nt=Object.assign(Object.assign({},ee),je.overlayStyle),rt=Le()(ge,T,`${T}-pure`,`${T}-placement-${j}`,U,je.className);return X(se.createElement("div",{className:rt,style:Qe},se.createElement("div",{className:`${T}-arrow`}),se.createElement(Ie.G,Object.assign({},Be,{className:ge,prefixCls:T,overlayInnerStyle:nt}),Z)))},ve=function(Be,G){var U={};for(var j in Be)Object.prototype.hasOwnProperty.call(Be,j)&&G.indexOf(j)<0&&(U[j]=Be[j]);if(Be!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Z=0,j=Object.getOwnPropertySymbols(Be);Z<j.length;Z++)G.indexOf(j[Z])<0&&Object.prototype.propertyIsEnumerable.call(Be,j[Z])&&(U[j[Z]]=Be[j[Z]]);return U};const de=(Be,G)=>{const U={},j=Object.assign({},Be);return G.forEach(Z=>{Be&&Z in Be&&(U[Z]=Be[Z],delete j[Z])}),{picked:U,omitted:j}};function we(Be,G){const U=Be.type;if((U.__ANT_BUTTON===!0||Be.type==="button")&&Be.props.disabled||U.__ANT_SWITCH===!0&&(Be.props.disabled||Be.props.loading)||U.__ANT_RADIO===!0&&Be.props.disabled){const{picked:j,omitted:Z}=de(Be.props.style,["position","left","right","top","bottom","float","display","zIndex"]),le=Object.assign(Object.assign({display:"inline-block"},j),{cursor:"not-allowed",width:Be.props.block?"100%":void 0}),ee=Object.assign(Object.assign({},Z),{pointerEvents:"none"}),E=(0,Ee.Tm)(Be,{style:ee,className:null});return se.createElement("span",{style:le,className:Le()(Be.props.className,`${G}-disabled-compatible-wrapper`)},E)}return Be}const Ce=se.forwardRef((Be,G)=>{var U,j;const{prefixCls:Z,openClassName:le,getTooltipContainer:ee,overlayClassName:E,color:T,overlayInnerStyle:X,children:ge,afterOpenChange:je,afterVisibleChange:Qe,destroyTooltipOnHide:nt,arrow:rt=!0,title:Gt,overlay:ct,builtinPlacements:st,arrowPointAtCenter:tr=!1,autoAdjustOverflow:sr=!0}=Be,yr=!!rt,[,ar]=(0,N.Z)(),{getPopupContainer:qt,getPrefixCls:Kt,direction:ke}=se.useContext(l.E_),Je=se.useRef(null),ue=()=>{var Ae;(Ae=Je.current)===null||Ae===void 0||Ae.forceAlign()};se.useImperativeHandle(G,()=>({forceAlign:ue,forcePopupAlign:()=>{ue()}}));const[Me,Ge]=(0,Ne.Z)(!1,{value:(U=Be.open)!==null&&U!==void 0?U:Be.visible,defaultValue:(j=Be.defaultOpen)!==null&&j!==void 0?j:Be.defaultVisible}),O=!Gt&&!ct&&Gt!==0,Q=Ae=>{var Fe,B;Ge(O?!1:Ae),O||((Fe=Be.onOpenChange)===null||Fe===void 0||Fe.call(Be,Ae),(B=Be.onVisibleChange)===null||B===void 0||B.call(Be,Ae))},ye=se.useMemo(()=>{var Ae,Fe;let B=tr;return typeof rt=="object"&&(B=(Fe=(Ae=rt.pointAtCenter)!==null&&Ae!==void 0?Ae:rt.arrowPointAtCenter)!==null&&Fe!==void 0?Fe:tr),st||(0,Oe.Z)({arrowPointAtCenter:B,autoAdjustOverflow:sr,arrowWidth:yr?ar.sizePopupArrow:0,borderRadius:ar.borderRadius,offset:ar.marginXXS,visibleFirst:!0})},[tr,rt,st,ar]),fe=se.useMemo(()=>Gt===0?Gt:ct||Gt||"",[ct,Gt]),Te=se.createElement(K.BR,null,typeof fe=="function"?fe():fe),{getPopupContainer:De,placement:We="top",mouseEnterDelay:Ze=.1,mouseLeaveDelay:Ve=.1,overlayStyle:Ke,rootClassName:vt}=Be,gt=ve(Be,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName"]),at=Kt("tooltip",Z),mt=Kt(),wt=Be["data-popover-inject"];let ft=Me;!("open"in Be)&&!("visible"in Be)&&O&&(ft=!1);const Dt=we((0,Ee.l$)(ge)&&!(0,Ee.M2)(ge)?ge:se.createElement("span",null,ge),at),yt=Dt.props,_=!yt.className||typeof yt.className=="string"?Le()(yt.className,le||`${at}-open`):yt.className,[w,Ye]=R(at,!wt),I=te(at,T),re=I.arrowStyle,zt=Object.assign(Object.assign({},X),I.overlayStyle),ce=Le()(E,{[`${at}-rtl`]:ke==="rtl"},I.className,vt,Ye);return w(se.createElement(Ie.Z,Object.assign({},gt,{showArrow:yr,placement:We,mouseEnterDelay:Ze,mouseLeaveDelay:Ve,prefixCls:at,overlayClassName:ce,overlayStyle:Object.assign(Object.assign({},re),Ke),getTooltipContainer:De||ee||qt,ref:Je,builtinPlacements:ye,overlay:Te,visible:ft,onVisibleChange:Q,afterVisibleChange:je!=null?je:Qe,overlayInnerStyle:zt,arrowContent:se.createElement("span",{className:`${at}-arrow-content`}),motion:{motionName:(0,pe.m)(mt,"zoom-big-fast",Be.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!nt}),ft?(0,Ee.Tm)(Dt,{className:_}):Dt))});Ce._InternalPanelDoNotUseOrYouWillBeFired=_e;var Se=Ce},64018:function(){var Bt,it,ne,se=!1,xe,Le;window.PR_SHOULD_USE_CONTINUATION=!0;var Ie,Ne;(function(){var pe=window,Oe=["break,continue,do,else,for,if,return,while"],Ee=[Oe,"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=[Ee,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],K=[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"],N=[l,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],A=[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",x=[l,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],y="caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",$=[Oe,"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"],H=[Oe,"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"],F=[Oe,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=[K,A,N,x,y,$,H,F],V=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,te="str",C="kwd",_e="com",ve="typ",de="lit",we="pun",Ce="pln",Se="tag",Be="dec",G="src",U="atn",j="atv",Z="nocode",le="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function ee(ke){for(var Je=0,ue=!1,Me=!1,Ge=0,O=ke.length;Ge<O;++Ge){var Q=ke[Ge];if(Q.ignoreCase)Me=!0;else if(/[a-z]/i.test(Q.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){ue=!0,Me=!1;break}}var ye={b:8,t:9,n:10,v:11,f:12,r:13};function fe(Ve){var Ke=Ve.charCodeAt(0);if(Ke!==92)return Ke;var vt=Ve.charAt(1);return Ke=ye[vt],Ke||("0"<=vt&&vt<="7"?parseInt(Ve.substring(1),8):vt==="u"||vt==="x"?parseInt(Ve.substring(2),16):Ve.charCodeAt(1))}function Te(Ve){if(Ve<32)return(Ve<16?"\\x0":"\\x")+Ve.toString(16);var Ke=String.fromCharCode(Ve);return Ke==="\\"||Ke==="-"||Ke==="]"||Ke==="^"?"\\"+Ke:Ke}function De(Ve){var Ke=Ve.substring(1,Ve.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")),vt=[],gt=Ke[0]==="^",at=["["];gt&&at.push("^");for(var mt=gt?1:0,wt=Ke.length;mt<wt;++mt){var ft=Ke[mt];if(/\\[bdsw]/i.test(ft))at.push(ft);else{var Dt=fe(ft),yt;mt+2<wt&&Ke[mt+1]==="-"?(yt=fe(Ke[mt+2]),mt+=2):yt=Dt,vt.push([Dt,yt]),yt<65||Dt>122||(yt<65||Dt>90||vt.push([Math.max(65,Dt)|32,Math.min(yt,90)|32]),yt<97||Dt>122||vt.push([Math.max(97,Dt)&-33,Math.min(yt,122)&-33]))}}vt.sort(function(I,re){return I[0]-re[0]||re[1]-I[1]});for(var _=[],w=[],mt=0;mt<vt.length;++mt){var Ye=vt[mt];Ye[0]<=w[1]+1?w[1]=Math.max(w[1],Ye[1]):_.push(w=Ye)}for(var mt=0;mt<_.length;++mt){var Ye=_[mt];at.push(Te(Ye[0])),Ye[1]>Ye[0]&&(Ye[1]+1>Ye[0]&&at.push("-"),at.push(Te(Ye[1])))}return at.push("]"),at.join("")}function We(Ve){for(var Ke=Ve.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")),vt=Ke.length,gt=[],at=0,mt=0;at<vt;++at){var wt=Ke[at];if(wt==="(")++mt;else if(wt.charAt(0)==="\\"){var ft=+wt.substring(1);ft&&(ft<=mt?gt[ft]=-1:Ke[at]=Te(ft))}}for(var at=1;at<gt.length;++at)gt[at]===-1&&(gt[at]=++Je);for(var at=0,mt=0;at<vt;++at){var wt=Ke[at];if(wt==="(")++mt,gt[mt]||(Ke[at]="(?:");else if(wt.charAt(0)==="\\"){var ft=+wt.substring(1);ft&&ft<=mt&&(Ke[at]="\\"+gt[ft])}}for(var at=0;at<vt;++at)Ke[at]==="^"&&Ke[at+1]!=="^"&&(Ke[at]="");if(Ve.ignoreCase&&ue)for(var at=0;at<vt;++at){var wt=Ke[at],Dt=wt.charAt(0);wt.length>=2&&Dt==="["?Ke[at]=De(wt):Dt!=="\\"&&(Ke[at]=wt.replace(/[a-zA-Z]/g,function(w){var Ye=w.charCodeAt(0);return"["+String.fromCharCode(Ye&-33,Ye|32)+"]"}))}return Ke.join("")}for(var Ze=[],Ge=0,O=ke.length;Ge<O;++Ge){var Q=ke[Ge];if(Q.global||Q.multiline)throw new Error(""+Q);Ze.push("(?:"+We(Q)+")")}return new RegExp(Ze.join("|"),Me?"gi":"g")}function E(ke,Je){var ue=/(?:^|\s)nocode(?:\s|$)/,Me=[],Ge=0,O=[],Q=0;function ye(fe){var Te=fe.nodeType;if(Te==1){if(ue.test(fe.className))return;for(var De=fe.firstChild;De;De=De.nextSibling)ye(De);var We=fe.nodeName.toLowerCase();(We==="br"||We==="li")&&(Me[Q]=`
|
|
`,O[Q<<1]=Ge++,O[Q++<<1|1]=fe)}else if(Te==3||Te==4){var Ze=fe.nodeValue;Ze.length&&(Je?Ze=Ze.replace(/\r\n?/g,`
|
|
`):Ze=Ze.replace(/[ \t\r\n]+/g," "),Me[Q]=Ze,O[Q<<1]=Ge,Ge+=Ze.length,O[Q++<<1|1]=fe)}}return ye(ke),{sourceCode:Me.join("").replace(/\n$/,""),spans:O}}function T(ke,Je,ue,Me,Ge){if(ue){var O={sourceNode:ke,pre:1,langExtension:null,numberLines:null,sourceCode:ue,spans:null,basePos:Je,decorations:null};Me(O),Ge.push.apply(Ge,O.decorations)}}var X=/\S/;function ge(ke){for(var Je=void 0,ue=ke.firstChild;ue;ue=ue.nextSibling){var Me=ue.nodeType;Je=Me===1?Je?ke:ue:Me===3&&X.test(ue.nodeValue)?ke:Je}return Je===ke?void 0:Je}function je(ke,Je){var ue={},Me;(function(){for(var Q=ke.concat(Je),ye=[],fe={},Te=0,De=Q.length;Te<De;++Te){var We=Q[Te],Ze=We[3];if(Ze)for(var Ve=Ze.length;--Ve>=0;)ue[Ze.charAt(Ve)]=We;var Ke=We[1],vt=""+Ke;fe.hasOwnProperty(vt)||(ye.push(Ke),fe[vt]=null)}ye.push(/[\0-\uffff]/),Me=ee(ye)})();var Ge=Je.length,O=function(Q){for(var ye=Q.sourceCode,fe=Q.basePos,Te=Q.sourceNode,De=[fe,Ce],We=0,Ze=ye.match(Me)||[],Ve={},Ke=0,vt=Ze.length;Ke<vt;++Ke){var gt=Ze[Ke],at=Ve[gt],mt=void 0,wt;if(typeof at=="string")wt=!1;else{var ft=ue[gt.charAt(0)];if(ft)mt=gt.match(ft[1]),at=ft[0];else{for(var Dt=0;Dt<Ge;++Dt)if(ft=Je[Dt],mt=gt.match(ft[1]),mt){at=ft[0];break}mt||(at=Ce)}wt=at.length>=5&&at.substring(0,5)==="lang-",wt&&!(mt&&typeof mt[1]=="string")&&(wt=!1,at=G),wt||(Ve[gt]=at)}var yt=We;if(We+=gt.length,!wt)De.push(fe+yt,at);else{var _=mt[1],w=gt.indexOf(_),Ye=w+_.length;mt[2]&&(Ye=gt.length-mt[2].length,w=Ye-_.length);var I=at.substring(5);T(Te,fe+yt,gt.substring(0,w),O,De),T(Te,fe+yt+w,_,tr(I,_),De),T(Te,fe+yt+Ye,gt.substring(Ye),O,De)}}Q.decorations=De};return O}function Qe(ke){var Je=[],ue=[];ke.tripleQuotedStrings?Je.push([te,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):ke.multiLineStrings?Je.push([te,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):Je.push([te,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),ke.verbatimStrings&&ue.push([te,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Me=ke.hashComments;Me&&(ke.cStyleComments?(Me>1?Je.push([_e,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):Je.push([_e,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),ue.push([te,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):Je.push([_e,/^#[^\r\n]*/,null,"#"])),ke.cStyleComments&&(ue.push([_e,/^\/\/[^\r\n]*/,null]),ue.push([_e,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var Ge=ke.regexLiterals;if(Ge){var O=Ge>1?"":`
|
|
\r`,Q=O?".":"[\\S\\s]",ye="/(?=[^/*"+O+"])(?:[^/\\x5B\\x5C"+O+"]|\\x5C"+Q+"|\\x5B(?:[^\\x5C\\x5D"+O+"]|\\x5C"+Q+")*(?:\\x5D|$))+/";ue.push(["lang-regex",RegExp("^"+le+"("+ye+")")])}var fe=ke.types;fe&&ue.push([ve,fe]);var Te=(""+ke.keywords).replace(/^ | $/g,"");Te.length&&ue.push([C,new RegExp("^(?:"+Te.replace(/[\s,]+/g,"|")+")\\b"),null]),Je.push([Ce,/^\s+/,null,` \r
|
|
\xA0`]);var De="^.[^\\s\\w.$@'\"`/\\\\]*";return ke.regexLiterals&&(De+="(?!s*/)"),ue.push([de,/^@[a-z_$][a-z_$@0-9]*/i,null],[ve,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[Ce,/^[a-z_$][a-z_$@0-9]*/i,null],[de,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[Ce,/^\\[\s\S]?/,null],[we,new RegExp(De),null]),je(Je,ue)}var nt=Qe({keywords:R,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function rt(ke,Je,ue){for(var Me=/(?:^|\s)nocode(?:\s|$)/,Ge=/\r\n?|\n/,O=ke.ownerDocument,Q=O.createElement("li");ke.firstChild;)Q.appendChild(ke.firstChild);var ye=[Q];function fe(Ke){var vt=Ke.nodeType;if(vt==1&&!Me.test(Ke.className))if(Ke.nodeName==="br")Te(Ke),Ke.parentNode&&Ke.parentNode.removeChild(Ke);else for(var gt=Ke.firstChild;gt;gt=gt.nextSibling)fe(gt);else if((vt==3||vt==4)&&ue){var at=Ke.nodeValue,mt=at.match(Ge);if(mt){var wt=at.substring(0,mt.index);Ke.nodeValue=wt;var ft=at.substring(mt.index+mt[0].length);if(ft){var Dt=Ke.parentNode;Dt.insertBefore(O.createTextNode(ft),Ke.nextSibling)}Te(Ke),wt||Ke.parentNode.removeChild(Ke)}}}function Te(Ke){for(;!Ke.nextSibling;)if(Ke=Ke.parentNode,!Ke)return;function vt(mt,wt){var ft=wt?mt.cloneNode(!1):mt,Dt=mt.parentNode;if(Dt){var yt=vt(Dt,1),_=mt.nextSibling;yt.appendChild(ft);for(var w=_;w;w=_)_=w.nextSibling,yt.appendChild(w)}return ft}for(var gt=vt(Ke.nextSibling,0),at;(at=gt.parentNode)&&at.nodeType===1;)gt=at;ye.push(gt)}for(var De=0;De<ye.length;++De)fe(ye[De]);Je===(Je|0)&&ye[0].setAttribute("value",Je);var We=O.createElement("ol");We.className="linenums";for(var Ze=Math.max(0,Je-1|0)||0,De=0,Ve=ye.length;De<Ve;++De)Q=ye[De],Q.className="L"+(De+Ze)%10,Q.firstChild||Q.appendChild(O.createTextNode("\xA0")),We.appendChild(Q);ke.appendChild(We)}function Gt(ke){var Je=/\bMSIE\s(\d+)/.exec(navigator.userAgent);Je=Je&&+Je[1]<=8;var ue=/\n/g,Me=ke.sourceCode,Ge=Me.length,O=0,Q=ke.spans,ye=Q.length,fe=0,Te=ke.decorations,De=Te.length,We=0;Te[De]=Ge;var Ze,Ve;for(Ve=Ze=0;Ve<De;)Te[Ve]!==Te[Ve+2]?(Te[Ze++]=Te[Ve++],Te[Ze++]=Te[Ve++]):Ve+=2;for(De=Ze,Ve=Ze=0;Ve<De;){for(var Ke=Te[Ve],vt=Te[Ve+1],gt=Ve+2;gt+2<=De&&Te[gt+1]===vt;)gt+=2;Te[Ze++]=Ke,Te[Ze++]=vt,Ve=gt}De=Te.length=Ze;var at=ke.sourceNode,mt="";at&&(mt=at.style.display,at.style.display="none");try{for(var wt=null;fe<ye;){var ft=Q[fe],Dt=Q[fe+2]||Ge,yt=Te[We+2]||Ge,gt=Math.min(Dt,yt),_=Q[fe+1],w;if(_.nodeType!==1&&(w=Me.substring(O,gt))){Je&&(w=w.replace(ue,"\r")),_.nodeValue=w;var Ye=_.ownerDocument,I=Ye.createElement("span");I.className=Te[We+1];var re=_.parentNode;re.replaceChild(I,_),I.appendChild(_),O<Dt&&(Q[fe+1]=_=Ye.createTextNode(Me.substring(gt,Dt)),re.insertBefore(_,I.nextSibling))}O=gt,O>=Dt&&(fe+=2),O>=yt&&(We+=2)}}finally{at&&(at.style.display=mt)}}var ct={};function st(ke,Je){for(var ue=Je.length;--ue>=0;){var Me=Je[ue];ct.hasOwnProperty(Me)?pe.console&&console.warn("cannot override language handler %s",Me):ct[Me]=ke}}function tr(ke,Je){return ke&&ct.hasOwnProperty(ke)||(ke=/^\s*</.test(Je)?"default-markup":"default-code"),ct[ke]}st(nt,["default-code"]),st(je([],[[Ce,/^[^<?]+/],[Be,/^<!\w[^>]*(?:>|$)/],[_e,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[we,/^(?:<[%?]|[%?]>)/],["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"]),st(je([[Ce,/^[\s]+/,null,` \r
|
|
`],[j,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[Se,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[U,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[we,/^[=<>\/]+/],["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"]),st(je([],[[j,/^[\s\S]+/]]),["uq.val"]),st(Qe({keywords:K,hashComments:!0,cStyleComments:!0,types:V}),["c","cc","cpp","cxx","cyc","m"]),st(Qe({keywords:"null,true,false"}),["json"]),st(Qe({keywords:A,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:V}),["cs"]),st(Qe({keywords:N,cStyleComments:!0}),["java"]),st(Qe({keywords:F,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),st(Qe({keywords:$,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),st(Qe({keywords:y,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),st(Qe({keywords:H,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),st(Qe({keywords:x,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),st(Qe({keywords:d,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),st(je([],[[te,/^[\s\S]+/]]),["regex"]);function sr(ke){var Je=ke.langExtension;try{var ue=E(ke.sourceNode,ke.pre),Me=ue.sourceCode;ke.sourceCode=Me,ke.spans=ue.spans,ke.basePos=0,tr(Je,Me)(ke),Gt(ke)}catch(Ge){pe.console&&console.log(Ge&&Ge.stack||Ge)}}function yr(ke,Je,ue){var Me=ue||!1,Ge=Je||null,O=document.createElement("div");O.innerHTML="<pre>"+ke+"</pre>",O=O.firstChild,Me&&rt(O,Me,!0);var Q={langExtension:Ge,numberLines:Me,sourceNode:O,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return sr(Q),O.innerHTML}function ar(ke,Je){var ue=Je||document.body,Me=ue.ownerDocument||document;function Ge(ft){return ue.getElementsByTagName(ft)}for(var O=[Ge("pre"),Ge("code"),Ge("xmp")],Q=[],ye=0;ye<O.length;++ye)for(var fe=0,Te=O[ye].length;fe<Te;++fe)Q.push(O[ye][fe]);O=null;var De=Date;De.now||(De={now:function(){return+new Date}});var We=0,Ze=/\blang(?:uage)?-([\w.]+)(?!\S)/,Ve=/\bprettyprint\b/,Ke=/\bprettyprinted\b/,vt=/pre|xmp/i,gt=/^code$/i,at=/^(?:pre|code|xmp)$/i,mt={};function wt(){for(var ft=pe.PR_SHOULD_USE_CONTINUATION?De.now()+250:1/0;We<Q.length&&De.now()<ft;We++){for(var Dt=Q[We],yt=mt,_=Dt;_=_.previousSibling;){var w=_.nodeType,Ye=(w===7||w===8)&&_.nodeValue;if(Ye?!/^\??prettify\b/.test(Ye):w!==3||/\S/.test(_.nodeValue))break;if(Ye){yt={},Ye.replace(/\b(\w+)=([\w:.%+-]+)/g,function(ae,At,Ct){yt[At]=Ct});break}}var I=Dt.className;if((yt!==mt||Ve.test(I))&&!Ke.test(I)){for(var re=!1,zt=Dt.parentNode;zt;zt=zt.parentNode){var ce=zt.tagName;if(at.test(ce)&&zt.className&&Ve.test(zt.className)){re=!0;break}}if(!re){Dt.className+=" prettyprinted";var Ae=yt.lang;if(!Ae){Ae=I.match(Ze);var Fe;!Ae&&(Fe=ge(Dt))&>.test(Fe.tagName)&&(Ae=Fe.className.match(Ze)),Ae&&(Ae=Ae[1])}var B;if(vt.test(Dt.tagName))B=1;else{var q=Dt.currentStyle,oe=Me.defaultView,be=q?q.whiteSpace:oe&&oe.getComputedStyle?oe.getComputedStyle(Dt,null).getPropertyValue("white-space"):0;B=be&&be.substring(0,3)==="pre"}var L=yt.linenums;(L=L==="true"||+L)||(L=I.match(/\blinenums\b(?::(\d+))?/),L=L?L[1]&&L[1].length?+L[1]:!0:!1),L&&rt(Dt,L,B);var dt={langExtension:Ae,sourceNode:Dt,numberLines:L,pre:B,sourceCode:null,basePos:null,spans:null,decorations:null};sr(dt)}}}We<Q.length?pe.setTimeout(wt,250):typeof ke=="function"&&ke()}wt()}var qt=pe.PR={createSimpleLexer:je,registerLangHandler:st,sourceDecorator:Qe,PR_ATTRIB_NAME:U,PR_ATTRIB_VALUE:j,PR_COMMENT:_e,PR_DECLARATION:Be,PR_KEYWORD:C,PR_LITERAL:de,PR_NOCODE:Z,PR_PLAIN:Ce,PR_PUNCTUATION:we,PR_SOURCE:G,PR_STRING:te,PR_TAG:Se,PR_TYPE:ve,prettyPrintOne:se?pe.prettyPrintOne=yr:Ie=yr,prettyPrint:Ne=se?pe.prettyPrint=ar:Ne=ar},Kt=pe.define;typeof Kt=="function"&&Kt.amd&&Kt("google-code-prettify",[],function(){return qt})})()},25769:function(Bt,it,ne){"use strict";var se=ne(98040),xe={"text/plain":"Text","text/html":"Url",default:"Text"},Le="Copy to clipboard: #{key}, Enter";function Ie(pe){var Oe=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return pe.replace(/#{\s*key\s*}/g,Oe)}function Ne(pe,Oe){var Ee,l,K,N,A,d,x=!1;Oe||(Oe={}),Ee=Oe.debug||!1;try{K=se(),N=document.createRange(),A=document.getSelection(),d=document.createElement("span"),d.textContent=pe,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($){if($.stopPropagation(),Oe.format)if($.preventDefault(),typeof $.clipboardData=="undefined"){Ee&&console.warn("unable to use e.clipboardData"),Ee&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var H=xe[Oe.format]||xe.default;window.clipboardData.setData(H,pe)}else $.clipboardData.clearData(),$.clipboardData.setData(Oe.format,pe);Oe.onCopy&&($.preventDefault(),Oe.onCopy($.clipboardData))}),document.body.appendChild(d),N.selectNodeContents(d),A.addRange(N);var y=document.execCommand("copy");if(!y)throw new Error("copy command was unsuccessful");x=!0}catch($){Ee&&console.error("unable to copy using execCommand: ",$),Ee&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(Oe.format||"text",pe),Oe.onCopy&&Oe.onCopy(window.clipboardData),x=!0}catch(H){Ee&&console.error("unable to copy using clipboardData: ",H),Ee&&console.error("falling back to prompt"),l=Ie("message"in Oe?Oe.message:Le),window.prompt(l,pe)}}finally{A&&(typeof A.removeRange=="function"?A.removeRange(N):A.removeAllRanges()),d&&document.body.removeChild(d),K()}return x}Bt.exports=Ne},53184:function(Bt,it,ne){"use strict";var se,xe;function Le(Ie,Ne,pe){var Oe=function(Ee,l){return Ie.js_beautify(Ee,l)};return Oe.js=Ie.js_beautify,Oe.css=Ne.css_beautify,Oe.html=pe.html_beautify,Oe.js_beautify=Ie.js_beautify,Oe.css_beautify=Ne.css_beautify,Oe.html_beautify=pe.html_beautify,Oe}se=[ne(58553),ne(87804),ne(40998)],xe=function(Ie,Ne,pe){return Le(Ie,Ne,pe)}.apply(it,se),xe!==void 0&&(Bt.exports=xe)},87804:function(Bt,it){var ne,se;(function(){var xe;(function(){"use strict";var Ie=[,,function(Ee){function l(A){this.__parent=A,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 A=new l(this.__parent);return A.set_indent(this.__indent_count,this.__alignment_count),A},l.prototype.item=function(A){return A<0?this.__items[this.__items.length+A]:this.__items[A]},l.prototype.has_match=function(A){for(var d=this.__items.length-1;d>=0;d--)if(this.__items[d].match(A))return!0;return!1},l.prototype.set_indent=function(A,d){this.is_empty()&&(this.__indent_count=A||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 A=this.__parent.current_line;return A.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),A.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),A.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,A.__items[0]===" "&&(A.__items.splice(0,1),A.__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(A){this.__items.push(A);var d=A.lastIndexOf(`
|
|
`);d!==-1?this.__character_count=A.length-d:this.__character_count+=A.length},l.prototype.pop=function(){var A=null;return this.is_empty()||(A=this.__items.pop(),this.__character_count-=A.length),A},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 A="";return this.is_empty()?this.__parent.indent_empty_lines&&(A=this.__parent.get_indent_string(this.__indent_count)):(A=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),A+=this.__items.join("")),A};function K(A,d){this.__cache=[""],this.__indent_size=A.indent_size,this.__indent_string=A.indent_char,A.indent_with_tabs||(this.__indent_string=new Array(A.indent_size+1).join(A.indent_char)),d=d||"",A.indent_level>0&&(d=new Array(A.indent_level+1).join(this.__indent_string)),this.__base_string=d,this.__base_string_length=d.length}K.prototype.get_indent_size=function(A,d){var x=this.__base_string_length;return d=d||0,A<0&&(x=0),x+=A*this.__indent_size,x+=d,x},K.prototype.get_indent_string=function(A,d){var x=this.__base_string;return d=d||0,A<0&&(A=0,x=""),d+=A*this.__indent_size,this.__ensure_cache(d),x+=this.__cache[d],x},K.prototype.__ensure_cache=function(A){for(;A>=this.__cache.length;)this.__add_column()},K.prototype.__add_column=function(){var A=this.__cache.length,d=0,x="";this.__indent_size&&A>=this.__indent_size&&(d=Math.floor(A/this.__indent_size),A-=d*this.__indent_size,x=new Array(d+1).join(this.__indent_string)),A&&(x+=new Array(A+1).join(" ")),this.__cache.push(x)};function N(A,d){this.__indent_cache=new K(A,d),this.raw=!1,this._end_with_newline=A.end_with_newline,this.indent_size=A.indent_size,this.wrap_line_length=A.wrap_line_length,this.indent_empty_lines=A.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()}N.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},N.prototype.get_line_number=function(){return this.__lines.length},N.prototype.get_indent_string=function(A,d){return this.__indent_cache.get_indent_string(A,d)},N.prototype.get_indent_size=function(A,d){return this.__indent_cache.get_indent_size(A,d)},N.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},N.prototype.add_new_line=function(A){return this.is_empty()||!A&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},N.prototype.get_code=function(A){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 x=this.__lines.join(`
|
|
`);return A!==`
|
|
`&&(x=x.replace(/[\n]/g,A)),x},N.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},N.prototype.set_indent=function(A,d){return A=A||0,d=d||0,this.next_line.set_indent(A,d),this.__lines.length>1?(this.current_line.set_indent(A,d),!0):(this.current_line.set_indent(),!1)},N.prototype.add_raw_token=function(A){for(var d=0;d<A.newlines;d++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(A.whitespace_before),this.current_line.push(A.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},N.prototype.add_token=function(A){this.__add_space_before_token(),this.current_line.push(A),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},N.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(" "))},N.prototype.remove_indent=function(A){for(var d=this.__lines.length;A<d;)this.__lines[A]._remove_indent(),A++;this.current_line._remove_wrap_indent()},N.prototype.trim=function(A){for(A=A===void 0?!1:A,this.current_line.trim();A&&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},N.prototype.just_added_newline=function(){return this.current_line.is_empty()},N.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},N.prototype.ensure_empty_line_above=function(A,d){for(var x=this.__lines.length-2;x>=0;){var y=this.__lines[x];if(y.is_empty())break;if(y.item(0).indexOf(A)!==0&&y.item(-1)!==d){this.__lines.splice(x+1,0,new l(this)),this.previous_line=this.__lines[this.__lines.length-2];break}x--}},Ee.exports.Output=N},,,,function(Ee){function l(A,d){this.raw_options=K(A,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(A,d){var x=this.raw_options[A],y=d||[];return typeof x=="object"?x!==null&&typeof x.concat=="function"&&(y=x.concat()):typeof x=="string"&&(y=x.split(/[^a-zA-Z0-9_\/\-]+/)),y},l.prototype._get_boolean=function(A,d){var x=this.raw_options[A],y=x===void 0?!!d:!!x;return y},l.prototype._get_characters=function(A,d){var x=this.raw_options[A],y=d||"";return typeof x=="string"&&(y=x.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),y},l.prototype._get_number=function(A,d){var x=this.raw_options[A];d=parseInt(d,10),isNaN(d)&&(d=0);var y=parseInt(x,10);return isNaN(y)&&(y=d),y},l.prototype._get_selection=function(A,d,x){var y=this._get_selection_list(A,d,x);if(y.length!==1)throw new Error("Invalid Option Value: The option '"+A+`' can only be one of the following values:
|
|
`+d+`
|
|
You passed in: '`+this.raw_options[A]+"'");return y[0]},l.prototype._get_selection_list=function(A,d,x){if(!d||d.length===0)throw new Error("Selection list cannot be empty.");if(x=x||[d[0]],!this._is_valid_selection(x,d))throw new Error("Invalid Default Value!");var y=this._get_array(A,x);if(!this._is_valid_selection(y,d))throw new Error("Invalid Option Value: The option '"+A+`' can contain only the following values:
|
|
`+d+`
|
|
You passed in: '`+this.raw_options[A]+"'");return y},l.prototype._is_valid_selection=function(A,d){return A.length&&d.length&&!A.some(function(x){return d.indexOf(x)===-1})};function K(A,d){var x={};A=N(A);var y;for(y in A)y!==d&&(x[y]=A[y]);if(d&&A[d])for(y in A[d])x[y]=A[d][y];return x}function N(A){var d={},x;for(x in A){var y=x.replace(/-/g,"_");d[y]=A[x]}return d}Ee.exports.Options=l,Ee.exports.normalizeOpts=N,Ee.exports.mergeOpts=K},,function(Ee){var l=RegExp.prototype.hasOwnProperty("sticky");function K(N){this.__input=N||"",this.__input_length=this.__input.length,this.__position=0}K.prototype.restart=function(){this.__position=0},K.prototype.back=function(){this.__position>0&&(this.__position-=1)},K.prototype.hasNext=function(){return this.__position<this.__input_length},K.prototype.next=function(){var N=null;return this.hasNext()&&(N=this.__input.charAt(this.__position),this.__position+=1),N},K.prototype.peek=function(N){var A=null;return N=N||0,N+=this.__position,N>=0&&N<this.__input_length&&(A=this.__input.charAt(N)),A},K.prototype.__match=function(N,A){N.lastIndex=A;var d=N.exec(this.__input);return d&&!(l&&N.sticky)&&d.index!==A&&(d=null),d},K.prototype.test=function(N,A){return A=A||0,A+=this.__position,A>=0&&A<this.__input_length?!!this.__match(N,A):!1},K.prototype.testChar=function(N,A){var d=this.peek(A);return N.lastIndex=0,d!==null&&N.test(d)},K.prototype.match=function(N){var A=this.__match(N,this.__position);return A?this.__position+=A[0].length:A=null,A},K.prototype.read=function(N,A,d){var x="",y;return N&&(y=this.match(N),y&&(x+=y[0])),A&&(y||!N)&&(x+=this.readUntil(A,d)),x},K.prototype.readUntil=function(N,A){var d="",x=this.__position;N.lastIndex=this.__position;var y=N.exec(this.__input);return y?(x=y.index,A&&(x+=y[0].length)):x=this.__input_length,d=this.__input.substring(this.__position,x),this.__position=x,d},K.prototype.readUntilAfter=function(N){return this.readUntil(N,!0)},K.prototype.get_regexp=function(N,A){var d=null,x="g";return A&&l&&(x="y"),typeof N=="string"&&N!==""?d=new RegExp(N,x):N&&(d=new RegExp(N.source,x)),d},K.prototype.get_literal_regexp=function(N){return RegExp(N.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},K.prototype.peekUntilAfter=function(N){var A=this.__position,d=this.readUntilAfter(N);return this.__position=A,d},K.prototype.lookBack=function(N){var A=this.__position-1;return A>=N.length&&this.__input.substring(A-N.length,A).toLowerCase()===N},Ee.exports.InputScanner=K},,,,,function(Ee){function l(K,N){K=typeof K=="string"?K:K.source,N=typeof N=="string"?N:N.source,this.__directives_block_pattern=new RegExp(K+/ beautify( \w+[:]\w+)+ /.source+N,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(K+/\sbeautify\signore:end\s/.source+N,"g")}l.prototype.get_directives=function(K){if(!K.match(this.__directives_block_pattern))return null;var N={};this.__directive_pattern.lastIndex=0;for(var A=this.__directive_pattern.exec(K);A;)N[A[1]]=A[2],A=this.__directive_pattern.exec(K);return N},l.prototype.readIgnored=function(K){return K.readUntilAfter(this.__directives_end_ignore_pattern)},Ee.exports.Directives=l},,function(Ee,l,K){var N=K(16).Beautifier,A=K(17).Options;function d(x,y){var $=new N(x,y);return $.beautify()}Ee.exports=d,Ee.exports.defaultOptions=function(){return new A}},function(Ee,l,K){var N=K(17).Options,A=K(2).Output,d=K(8).InputScanner,x=K(13).Directives,y=new x(/\/\*/,/\*\//),$=/\r\n|[\r\n]/,H=/\r\n|[\r\n]/g,F=/\s/,R=/(?:\s|\n)+/g,V=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,te=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function C(_e,ve){this._source_text=_e||"",this._options=new N(ve),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 ve="";for(this._ch=this._input.next();this._ch;){if(ve+=this._ch,this._ch==="\\")ve+=this._input.next();else if(_e.indexOf(this._ch)!==-1||this._ch===`
|
|
`)break;this._ch=this._input.next()}return ve},C.prototype.eatWhitespace=function(_e){for(var ve=F.test(this._input.peek()),de=0;F.test(this._input.peek());)this._ch=this._input.next(),_e&&this._ch===`
|
|
`&&(de===0||de<this._options.max_preserve_newlines)&&(de++,this._output.add_new_line(!0));return ve},C.prototype.foundNestedPseudoClass=function(){for(var _e=0,ve=1,de=this._input.peek(ve);de;){if(de==="{")return!0;if(de==="(")_e+=1;else if(de===")"){if(_e===0)return!1;_e-=1}else if(de===";"||de==="}")return!1;ve++,de=this._input.peek(ve)}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,ve=this._options.eol;ve==="auto"&&(ve=`
|
|
`,_e&&$.test(_e||"")&&(ve=_e.match($)[0])),_e=_e.replace(H,`
|
|
`);var de=_e.match(/^[\t ]*/)[0];this._output=new A(this._options,de),this._input=new d(_e),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var we=0,Ce=!1,Se=!1,Be=!1,G=!1,U=!1,j=this._ch,Z=!1,le,ee,E;le=this._input.read(R),ee=le!=="",E=j,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),j=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var T=this._input.read(V),X=y.get_directives(T);X&&X.ignore==="start"&&(T+=y.readIgnored(this._input)),this.print_string(T),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(te)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(ee),this.print_string(this._ch);var ge=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);ge.match(/[ :]$/)&&(ge=this.eatString(": ").replace(/\s+$/,""),this.print_string(ge),this._output.space_before_token=!0),we===0&&ge.indexOf(":")!==-1&&(Se=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(ee),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var je=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);je.match(/[ :]$/)&&(je=this.eatString(": ").replace(/\s+$/,""),this.print_string(je),this._output.space_before_token=!0),we===0&&je.indexOf(":")!==-1?(Se=!0,this.indent()):je in this.NESTED_AT_RULE?(this._nestedLevel+=1,je in this.CONDITIONAL_GROUP_RULE&&(Be=!0)):we===0&&!Se&&(G=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(ee),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")Se&&(Se=!1,this.outdent()),G=!1,Be?(Be=!1,Ce=this._indentLevel>=this._nestedLevel):Ce=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&Ce&&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),Se&&(this.outdent(),Se=!1),this.print_string(this._ch),Ce=!1,this._nestedLevel&&this._nestedLevel--,this.eatWhitespace(!0),this._output.add_new_line(),this._options.newline_between_rules&&!this._output.just_added_blankline()&&this._input.peek()!=="}"&&this._output.add_new_line(!0),this._input.peek()===")"&&(this._output.trim(!0),this._options.brace_style==="expand"&&this._output.add_new_line(!0));else if(this._ch===":"){for(var Qe=0;Qe<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;Qe++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[Qe])){Z=!0;break}(Ce||Be)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!G&&we===0?(this.print_string(":"),Se||(Se=!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 nt=E==='"'||E==="'";this.preserveSingleSpace(nt||ee),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")Z=!1,we===0?(Se&&(this.outdent(),Se=!1),G=!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(),we++,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(")")),we&&(we--,this.outdent()));else{var rt=!1;this._input.lookBack("with")&&(rt=!0),this.preserveSingleSpace(ee||rt),this.print_string(this._ch),Se&&E==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),U=!0):(this.eatWhitespace(),we++,this.indent())}else if(this._ch===")")we&&(we--,this.outdent()),U&&this._input.peek()===";"&&this._options.selector_separator_newline&&(U=!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&&(!Se||U)&&we===0&&!G?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!Se&&we===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&&F.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(ee),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),F.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 Gt=E==='"'||E==="'";this.preserveSingleSpace(Gt||ee),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
`&&Z&&this._output.add_new_line()}var ct=this._output.get_code(ve);return ct},Ee.exports.Beautifier=C},function(Ee,l,K){var N=K(6).Options;function A(d){N.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 x=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||x;var y=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var $=0;$<y.length;$++)y[$]!=="expand"?this.brace_style="collapse":this.brace_style=y[$]}A.prototype=new N,Ee.exports.Options=A}],Ne={};function pe(Ee){var l=Ne[Ee];if(l!==void 0)return l.exports;var K=Ne[Ee]={exports:{}};return Ie[Ee](K,K.exports,pe),K.exports}var Oe=pe(15);xe=Oe})();var Le=xe;ne=[],se=function(){return{css_beautify:Le}}.apply(it,ne),se!==void 0&&(Bt.exports=se)})()},40998:function(Bt,it,ne){var se,xe;(function(){var Le;(function(){"use strict";var Oe=[,,function(N){function A(y){this.__parent=y,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}A.prototype.clone_empty=function(){var y=new A(this.__parent);return y.set_indent(this.__indent_count,this.__alignment_count),y},A.prototype.item=function(y){return y<0?this.__items[this.__items.length+y]:this.__items[y]},A.prototype.has_match=function(y){for(var $=this.__items.length-1;$>=0;$--)if(this.__items[$].match(y))return!0;return!1},A.prototype.set_indent=function(y,$){this.is_empty()&&(this.__indent_count=y||0,this.__alignment_count=$||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},A.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)},A.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},A.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var y=this.__parent.current_line;return y.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),y.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),y.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,y.__items[0]===" "&&(y.__items.splice(0,1),y.__character_count-=1),!0}return!1},A.prototype.is_empty=function(){return this.__items.length===0},A.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},A.prototype.push=function(y){this.__items.push(y);var $=y.lastIndexOf(`
|
|
`);$!==-1?this.__character_count=y.length-$:this.__character_count+=y.length},A.prototype.pop=function(){var y=null;return this.is_empty()||(y=this.__items.pop(),this.__character_count-=y.length),y},A.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},A.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},A.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},A.prototype.toString=function(){var y="";return this.is_empty()?this.__parent.indent_empty_lines&&(y=this.__parent.get_indent_string(this.__indent_count)):(y=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),y+=this.__items.join("")),y};function d(y,$){this.__cache=[""],this.__indent_size=y.indent_size,this.__indent_string=y.indent_char,y.indent_with_tabs||(this.__indent_string=new Array(y.indent_size+1).join(y.indent_char)),$=$||"",y.indent_level>0&&($=new Array(y.indent_level+1).join(this.__indent_string)),this.__base_string=$,this.__base_string_length=$.length}d.prototype.get_indent_size=function(y,$){var H=this.__base_string_length;return $=$||0,y<0&&(H=0),H+=y*this.__indent_size,H+=$,H},d.prototype.get_indent_string=function(y,$){var H=this.__base_string;return $=$||0,y<0&&(y=0,H=""),$+=y*this.__indent_size,this.__ensure_cache($),H+=this.__cache[$],H},d.prototype.__ensure_cache=function(y){for(;y>=this.__cache.length;)this.__add_column()},d.prototype.__add_column=function(){var y=this.__cache.length,$=0,H="";this.__indent_size&&y>=this.__indent_size&&($=Math.floor(y/this.__indent_size),y-=$*this.__indent_size,H=new Array($+1).join(this.__indent_string)),y&&(H+=new Array(y+1).join(" ")),this.__cache.push(H)};function x(y,$){this.__indent_cache=new d(y,$),this.raw=!1,this._end_with_newline=y.end_with_newline,this.indent_size=y.indent_size,this.wrap_line_length=y.wrap_line_length,this.indent_empty_lines=y.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new A(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}x.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},x.prototype.get_line_number=function(){return this.__lines.length},x.prototype.get_indent_string=function(y,$){return this.__indent_cache.get_indent_string(y,$)},x.prototype.get_indent_size=function(y,$){return this.__indent_cache.get_indent_size(y,$)},x.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},x.prototype.add_new_line=function(y){return this.is_empty()||!y&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},x.prototype.get_code=function(y){this.trim(!0);var $=this.current_line.pop();$&&($[$.length-1]===`
|
|
`&&($=$.replace(/\n+$/g,"")),this.current_line.push($)),this._end_with_newline&&this.__add_outputline();var H=this.__lines.join(`
|
|
`);return y!==`
|
|
`&&(H=H.replace(/[\n]/g,y)),H},x.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},x.prototype.set_indent=function(y,$){return y=y||0,$=$||0,this.next_line.set_indent(y,$),this.__lines.length>1?(this.current_line.set_indent(y,$),!0):(this.current_line.set_indent(),!1)},x.prototype.add_raw_token=function(y){for(var $=0;$<y.newlines;$++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(y.whitespace_before),this.current_line.push(y.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},x.prototype.add_token=function(y){this.__add_space_before_token(),this.current_line.push(y),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},x.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(" "))},x.prototype.remove_indent=function(y){for(var $=this.__lines.length;y<$;)this.__lines[y]._remove_indent(),y++;this.current_line._remove_wrap_indent()},x.prototype.trim=function(y){for(y=y===void 0?!1:y,this.current_line.trim();y&&this.__lines.length>1&&this.current_line.is_empty();)this.__lines.pop(),this.current_line=this.__lines[this.__lines.length-1],this.current_line.trim();this.previous_line=this.__lines.length>1?this.__lines[this.__lines.length-2]:null},x.prototype.just_added_newline=function(){return this.current_line.is_empty()},x.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},x.prototype.ensure_empty_line_above=function(y,$){for(var H=this.__lines.length-2;H>=0;){var F=this.__lines[H];if(F.is_empty())break;if(F.item(0).indexOf(y)!==0&&F.item(-1)!==$){this.__lines.splice(H+1,0,new A(this)),this.previous_line=this.__lines[this.__lines.length-2];break}H--}},N.exports.Output=x},function(N){function A(d,x,y,$){this.type=d,this.text=x,this.comments_before=null,this.newlines=y||0,this.whitespace_before=$||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}N.exports.Token=A},,,function(N){function A(y,$){this.raw_options=d(y,$),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"])}A.prototype._get_array=function(y,$){var H=this.raw_options[y],F=$||[];return typeof H=="object"?H!==null&&typeof H.concat=="function"&&(F=H.concat()):typeof H=="string"&&(F=H.split(/[^a-zA-Z0-9_\/\-]+/)),F},A.prototype._get_boolean=function(y,$){var H=this.raw_options[y],F=H===void 0?!!$:!!H;return F},A.prototype._get_characters=function(y,$){var H=this.raw_options[y],F=$||"";return typeof H=="string"&&(F=H.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),F},A.prototype._get_number=function(y,$){var H=this.raw_options[y];$=parseInt($,10),isNaN($)&&($=0);var F=parseInt(H,10);return isNaN(F)&&(F=$),F},A.prototype._get_selection=function(y,$,H){var F=this._get_selection_list(y,$,H);if(F.length!==1)throw new Error("Invalid Option Value: The option '"+y+`' can only be one of the following values:
|
|
`+$+`
|
|
You passed in: '`+this.raw_options[y]+"'");return F[0]},A.prototype._get_selection_list=function(y,$,H){if(!$||$.length===0)throw new Error("Selection list cannot be empty.");if(H=H||[$[0]],!this._is_valid_selection(H,$))throw new Error("Invalid Default Value!");var F=this._get_array(y,H);if(!this._is_valid_selection(F,$))throw new Error("Invalid Option Value: The option '"+y+`' can contain only the following values:
|
|
`+$+`
|
|
You passed in: '`+this.raw_options[y]+"'");return F},A.prototype._is_valid_selection=function(y,$){return y.length&&$.length&&!y.some(function(H){return $.indexOf(H)===-1})};function d(y,$){var H={};y=x(y);var F;for(F in y)F!==$&&(H[F]=y[F]);if($&&y[$])for(F in y[$])H[F]=y[$][F];return H}function x(y){var $={},H;for(H in y){var F=H.replace(/-/g,"_");$[F]=y[H]}return $}N.exports.Options=A,N.exports.normalizeOpts=x,N.exports.mergeOpts=d},,function(N){var A=RegExp.prototype.hasOwnProperty("sticky");function d(x){this.__input=x||"",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 x=null;return this.hasNext()&&(x=this.__input.charAt(this.__position),this.__position+=1),x},d.prototype.peek=function(x){var y=null;return x=x||0,x+=this.__position,x>=0&&x<this.__input_length&&(y=this.__input.charAt(x)),y},d.prototype.__match=function(x,y){x.lastIndex=y;var $=x.exec(this.__input);return $&&!(A&&x.sticky)&&$.index!==y&&($=null),$},d.prototype.test=function(x,y){return y=y||0,y+=this.__position,y>=0&&y<this.__input_length?!!this.__match(x,y):!1},d.prototype.testChar=function(x,y){var $=this.peek(y);return x.lastIndex=0,$!==null&&x.test($)},d.prototype.match=function(x){var y=this.__match(x,this.__position);return y?this.__position+=y[0].length:y=null,y},d.prototype.read=function(x,y,$){var H="",F;return x&&(F=this.match(x),F&&(H+=F[0])),y&&(F||!x)&&(H+=this.readUntil(y,$)),H},d.prototype.readUntil=function(x,y){var $="",H=this.__position;x.lastIndex=this.__position;var F=x.exec(this.__input);return F?(H=F.index,y&&(H+=F[0].length)):H=this.__input_length,$=this.__input.substring(this.__position,H),this.__position=H,$},d.prototype.readUntilAfter=function(x){return this.readUntil(x,!0)},d.prototype.get_regexp=function(x,y){var $=null,H="g";return y&&A&&(H="y"),typeof x=="string"&&x!==""?$=new RegExp(x,H):x&&($=new RegExp(x.source,H)),$},d.prototype.get_literal_regexp=function(x){return RegExp(x.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},d.prototype.peekUntilAfter=function(x){var y=this.__position,$=this.readUntilAfter(x);return this.__position=y,$},d.prototype.lookBack=function(x){var y=this.__position-1;return y>=x.length&&this.__input.substring(y-x.length,y).toLowerCase()===x},N.exports.InputScanner=d},function(N,A,d){var x=d(8).InputScanner,y=d(3).Token,$=d(10).TokenStream,H=d(11).WhitespacePattern,F={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},R=function(V,te){this._input=new x(V),this._options=te||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new H(this._input)};R.prototype.tokenize=function(){this._input.restart(),this.__tokens=new $,this._reset();for(var V,te=new y(F.START,""),C=null,_e=[],ve=new $;te.type!==F.EOF;){for(V=this._get_next_token(te,C);this._is_comment(V);)ve.add(V),V=this._get_next_token(te,C);ve.isEmpty()||(V.comments_before=ve,ve=new $),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=te,te.next=V,this.__tokens.add(V),te=V}return this.__tokens},R.prototype._is_first_token=function(){return this.__tokens.isEmpty()},R.prototype._reset=function(){},R.prototype._get_next_token=function(V,te){this._readWhitespace();var C=this._input.read(/.+/g);return C?this._create_token(F.RAW,C):this._create_token(F.EOF,"")},R.prototype._is_comment=function(V){return!1},R.prototype._is_opening=function(V){return!1},R.prototype._is_closing=function(V,te){return!1},R.prototype._create_token=function(V,te){var C=new y(V,te,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return C},R.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},N.exports.Tokenizer=R,N.exports.TOKEN=F},function(N){function A(d){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=d}A.prototype.restart=function(){this.__position=0},A.prototype.isEmpty=function(){return this.__tokens_length===0},A.prototype.hasNext=function(){return this.__position<this.__tokens_length},A.prototype.next=function(){var d=null;return this.hasNext()&&(d=this.__tokens[this.__position],this.__position+=1),d},A.prototype.peek=function(d){var x=null;return d=d||0,d+=this.__position,d>=0&&d<this.__tokens_length&&(x=this.__tokens[d]),x},A.prototype.add=function(d){this.__parent_token&&(d.parent=this.__parent_token),this.__tokens.push(d),this.__tokens_length+=1},N.exports.TokenStream=A},function(N,A,d){var x=d(12).Pattern;function y($,H){x.call(this,$,H),H?this._line_regexp=this._input.get_regexp(H._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}y.prototype=new x,y.prototype.__set_whitespace_patterns=function($,H){$+="\\t ",H+="\\n\\r",this._match_pattern=this._input.get_regexp("["+$+H+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+H+"]")},y.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var $=this._input.read(this._match_pattern);if($===" ")this.whitespace_before_token=" ";else if($){var H=this.__split(this._newline_regexp,$);this.newline_count=H.length-1,this.whitespace_before_token=H[this.newline_count]}return $},y.prototype.matching=function($,H){var F=this._create();return F.__set_whitespace_patterns($,H),F._update(),F},y.prototype._create=function(){return new y(this._input,this)},y.prototype.__split=function($,H){$.lastIndex=0;for(var F=0,R=[],V=$.exec(H);V;)R.push(H.substring(F,V.index)),F=V.index+V[0].length,V=$.exec(H);return F<H.length?R.push(H.substring(F,H.length)):R.push(""),R},N.exports.WhitespacePattern=y},function(N){function A(d,x){this._input=d,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,x&&(this._starting_pattern=this._input.get_regexp(x._starting_pattern,!0),this._match_pattern=this._input.get_regexp(x._match_pattern,!0),this._until_pattern=this._input.get_regexp(x._until_pattern),this._until_after=x._until_after)}A.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},A.prototype.read_match=function(){return this._input.match(this._match_pattern)},A.prototype.until_after=function(d){var x=this._create();return x._until_after=!0,x._until_pattern=this._input.get_regexp(d),x._update(),x},A.prototype.until=function(d){var x=this._create();return x._until_after=!1,x._until_pattern=this._input.get_regexp(d),x._update(),x},A.prototype.starting_with=function(d){var x=this._create();return x._starting_pattern=this._input.get_regexp(d,!0),x._update(),x},A.prototype.matching=function(d){var x=this._create();return x._match_pattern=this._input.get_regexp(d,!0),x._update(),x},A.prototype._create=function(){return new A(this._input,this)},A.prototype._update=function(){},N.exports.Pattern=A},function(N){function A(d,x){d=typeof d=="string"?d:d.source,x=typeof x=="string"?x:x.source,this.__directives_block_pattern=new RegExp(d+/ beautify( \w+[:]\w+)+ /.source+x,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(d+/\sbeautify\signore:end\s/.source+x,"g")}A.prototype.get_directives=function(d){if(!d.match(this.__directives_block_pattern))return null;var x={};this.__directive_pattern.lastIndex=0;for(var y=this.__directive_pattern.exec(d);y;)x[y[1]]=y[2],y=this.__directive_pattern.exec(d);return x},A.prototype.readIgnored=function(d){return d.readUntilAfter(this.__directives_end_ignore_pattern)},N.exports.Directives=A},function(N,A,d){var x=d(12).Pattern,y={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function $(H,F){x.call(this,H,F),this.__template_pattern=null,this._disabled=Object.assign({},y),this._excluded=Object.assign({},y),F&&(this.__template_pattern=this._input.get_regexp(F.__template_pattern),this._excluded=Object.assign(this._excluded,F._excluded),this._disabled=Object.assign(this._disabled,F._disabled));var R=new x(H);this.__patterns={handlebars_comment:R.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:R.starting_with(/{{{/).until_after(/}}}/),handlebars:R.starting_with(/{{/).until_after(/}}/),php:R.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:R.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:R.starting_with(/{%/).until_after(/%}/),django_value:R.starting_with(/{{/).until_after(/}}/),django_comment:R.starting_with(/{#/).until_after(/#}/),smarty:R.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:R.starting_with(/{\*/).until_after(/\*}/),smarty_literal:R.starting_with(/{literal}/).until_after(/{\/literal}/)}}$.prototype=new x,$.prototype._create=function(){return new $(this._input,this)},$.prototype._update=function(){this.__set_templated_pattern()},$.prototype.disable=function(H){var F=this._create();return F._disabled[H]=!0,F._update(),F},$.prototype.read_options=function(H){var F=this._create();for(var R in y)F._disabled[R]=H.templating.indexOf(R)===-1;return F._update(),F},$.prototype.exclude=function(H){var F=this._create();return F._excluded[H]=!0,F._update(),F},$.prototype.read=function(){var H="";this._match_pattern?H=this._input.read(this._starting_pattern):H=this._input.read(this._starting_pattern,this.__template_pattern);for(var F=this._read_template();F;)this._match_pattern?F+=this._input.read(this._match_pattern):F+=this._input.readUntil(this.__template_pattern),H+=F,F=this._read_template();return this._until_after&&(H+=this._input.readUntilAfter(this._until_pattern)),H},$.prototype.__set_templated_pattern=function(){var H=[];this._disabled.php||H.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||H.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||H.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||H.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(H.push(this.__patterns.django._starting_pattern.source),H.push(this.__patterns.django_value._starting_pattern.source),H.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||H.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&H.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+H.join("|")+")")},$.prototype._read_template=function(){var H="",F=this._input.peek();if(F==="<"){var R=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&R==="?"&&(H=H||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&R==="%"&&(H=H||this.__patterns.erb.read())}else F==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(H=H||this.__patterns.handlebars_comment.read(),H=H||this.__patterns.handlebars_unescaped.read(),H=H||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(H=H||this.__patterns.django_value.read()),this._excluded.django||(H=H||this.__patterns.django_comment.read(),H=H||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(H=H||this.__patterns.smarty_comment.read(),H=H||this.__patterns.smarty_literal.read(),H=H||this.__patterns.smarty.read()));return H},N.exports.TemplatablePattern=$},,,,function(N,A,d){var x=d(19).Beautifier,y=d(20).Options;function $(H,F,R,V){var te=new x(H,F,R,V);return te.beautify()}N.exports=$,N.exports.defaultOptions=function(){return new y}},function(N,A,d){var x=d(20).Options,y=d(2).Output,$=d(21).Tokenizer,H=d(21).TOKEN,F=/\r\n|[\r\n]/,R=/\r\n|[\r\n]/g,V=function(G,U){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=G.max_preserve_newlines,this.preserve_newlines=G.preserve_newlines,this._output=new y(G,U)};V.prototype.current_line_has_match=function(G){return this._output.current_line.has_match(G)},V.prototype.set_space_before_token=function(G,U){this._output.space_before_token=G,this._output.non_breaking_space=U},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(G){this._output.add_raw_token(G)},V.prototype.print_preserved_newlines=function(G){var U=0;G.type!==H.TEXT&&G.previous.type!==H.TEXT&&(U=G.newlines?1:0),this.preserve_newlines&&(U=G.newlines<this.max_preserve_newlines+1?G.newlines:this.max_preserve_newlines+1);for(var j=0;j<U;j++)this.print_newline(j>0);return U!==0},V.prototype.traverse_whitespace=function(G){return G.whitespace_before||G.newlines?(this.print_preserved_newlines(G)||(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(G){this._output.add_new_line(G)},V.prototype.print_token=function(G){G.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(G.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(G){return G=this.indent_level+(G||0),G<1?"":this._output.get_indent_string(G)};var te=function(G){for(var U=null,j=G.next;j.type!==H.EOF&&G.closed!==j;){if(j.type===H.ATTRIBUTE&&j.text==="type"){j.next&&j.next.type===H.EQUALS&&j.next.next&&j.next.next.type===H.VALUE&&(U=j.next.next.text);break}j=j.next}return U},C=function(G,U){var j=null,Z=null;return U.closed?(G==="script"?j="text/javascript":G==="style"&&(j="text/css"),j=te(U)||j,j.search("text/css")>-1?Z="css":j.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?Z="javascript":j.search(/(text|application|dojo)\/(x-)?(html)/)>-1?Z="html":j.search(/test\/null/)>-1&&(Z="null"),Z):null};function _e(G,U){return U.indexOf(G)!==-1}function ve(G,U,j){this.parent=G||null,this.tag=U?U.tag_name:"",this.indent_level=j||0,this.parser_token=U||null}function de(G){this._printer=G,this._current_frame=null}de.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},de.prototype.record_tag=function(G){var U=new ve(this._current_frame,G,this._printer.indent_level);this._current_frame=U},de.prototype._try_pop_frame=function(G){var U=null;return G&&(U=G.parser_token,this._printer.indent_level=G.indent_level,this._current_frame=G.parent),U},de.prototype._get_frame=function(G,U){for(var j=this._current_frame;j&&G.indexOf(j.tag)===-1;){if(U&&U.indexOf(j.tag)!==-1){j=null;break}j=j.parent}return j},de.prototype.try_pop=function(G,U){var j=this._get_frame([G],U);return this._try_pop_frame(j)},de.prototype.indent_to_tag=function(G){var U=this._get_frame(G);U&&(this._printer.indent_level=U.indent_level)};function we(G,U,j,Z){this._source_text=G||"",U=U||{},this._js_beautify=j,this._css_beautify=Z,this._tag_stack=null;var le=new x(U,"html");this._options=le,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"}we.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var G=this._source_text,U=this._options.eol;this._options.eol==="auto"&&(U=`
|
|
`,G&&F.test(G)&&(U=G.match(F)[0])),G=G.replace(R,`
|
|
`);var j=G.match(/^[\t ]*/)[0],Z={text:"",type:""},le=new Ce(this._options),ee=new V(this._options,j),E=new $(G,this._options).tokenize();this._tag_stack=new de(ee);for(var T=null,X=E.next();X.type!==H.EOF;)X.type===H.TAG_OPEN||X.type===H.COMMENT?(T=this._handle_tag_open(ee,X,le,Z,E),le=T):X.type===H.ATTRIBUTE||X.type===H.EQUALS||X.type===H.VALUE||X.type===H.TEXT&&!le.tag_complete?T=this._handle_inside_tag(ee,X,le,Z):X.type===H.TAG_CLOSE?T=this._handle_tag_close(ee,X,le):X.type===H.TEXT?T=this._handle_text(ee,X,le):X.type===H.CONTROL_FLOW_OPEN?T=this._handle_control_flow_open(ee,X):X.type===H.CONTROL_FLOW_CLOSE?T=this._handle_control_flow_close(ee,X):ee.add_raw_token(X),Z=T,X=E.next();var ge=ee._output.get_code(U);return ge},we.prototype._handle_control_flow_open=function(G,U){var j={text:U.text,type:U.type};return G.set_space_before_token(U.newlines||U.whitespace_before!=="",!0),U.newlines?G.print_preserved_newlines(U):G.set_space_before_token(U.newlines||U.whitespace_before!=="",!0),G.print_token(U),G.indent(),j},we.prototype._handle_control_flow_close=function(G,U){var j={text:U.text,type:U.type};return G.deindent(),U.newlines?G.print_preserved_newlines(U):G.set_space_before_token(U.newlines||U.whitespace_before!=="",!0),G.print_token(U),j},we.prototype._handle_tag_close=function(G,U,j){var Z={text:U.text,type:U.type};return G.alignment_size=0,j.tag_complete=!0,G.set_space_before_token(U.newlines||U.whitespace_before!=="",!0),j.is_unformatted?G.add_raw_token(U):(j.tag_start_char==="<"&&(G.set_space_before_token(U.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&j.has_wrapped_attrs&&G.print_newline(!1)),G.print_token(U)),j.indent_content&&!(j.is_unformatted||j.is_content_unformatted)&&(G.indent(),j.indent_content=!1),!j.is_inline_element&&!(j.is_unformatted||j.is_content_unformatted)&&G.set_wrap_point(),Z},we.prototype._handle_inside_tag=function(G,U,j,Z){var le=j.has_wrapped_attrs,ee={text:U.text,type:U.type};return G.set_space_before_token(U.newlines||U.whitespace_before!=="",!0),j.is_unformatted?G.add_raw_token(U):j.tag_start_char==="{"&&U.type===H.TEXT?G.print_preserved_newlines(U)?(U.newlines=0,G.add_raw_token(U)):G.print_token(U):(U.type===H.ATTRIBUTE?G.set_space_before_token(!0):(U.type===H.EQUALS||U.type===H.VALUE&&U.previous.type===H.EQUALS)&&G.set_space_before_token(!1),U.type===H.ATTRIBUTE&&j.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(G.traverse_whitespace(U),le=le||U.newlines!==0),this._is_wrap_attributes_force&&j.attr_count>=this._options.wrap_attributes_min_attrs&&(Z.type!==H.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(G.print_newline(!1),le=!0)),G.print_token(U),le=le||G.previous_token_wrapped(),j.has_wrapped_attrs=le),ee},we.prototype._handle_text=function(G,U,j){var Z={text:U.text,type:"TK_CONTENT"};return j.custom_beautifier_name?this._print_custom_beatifier_text(G,U,j):j.is_unformatted||j.is_content_unformatted?G.add_raw_token(U):(G.traverse_whitespace(U),G.print_token(U)),Z},we.prototype._print_custom_beatifier_text=function(G,U,j){var Z=this;if(U.text!==""){var le=U.text,ee,E=1,T="",X="";j.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?ee=this._js_beautify:j.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?ee=this._css_beautify:j.custom_beautifier_name==="html"&&(ee=function(Gt,ct){var st=new we(Gt,ct,Z._js_beautify,Z._css_beautify);return st.beautify()}),this._options.indent_scripts==="keep"?E=0:this._options.indent_scripts==="separate"&&(E=-G.indent_level);var ge=G.get_full_indent(E);if(le=le.replace(/\n[ \t]*$/,""),j.custom_beautifier_name!=="html"&&le[0]==="<"&&le.match(/^(<!--|<!\[CDATA\[)/)){var je=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(le);if(!je){G.add_raw_token(U);return}T=ge+je[1]+`
|
|
`,le=je[4],je[5]&&(X=ge+je[5]),le=le.replace(/\n[ \t]*$/,""),(je[2]||je[3].indexOf(`
|
|
`)!==-1)&&(je=je[3].match(/[ \t]+$/),je&&(U.whitespace_before=je[0]))}if(le)if(ee){var Qe=function(){this.eol=`
|
|
`};Qe.prototype=this._options.raw_options;var nt=new Qe;le=ee(ge+le,nt)}else{var rt=U.whitespace_before;rt&&(le=le.replace(new RegExp(`
|
|
(`+rt+")?","g"),`
|
|
`)),le=ge+le.replace(/\n/g,`
|
|
`+ge)}T&&(le?le=T+le+`
|
|
`+X:le=T+X),G.print_newline(!1),le&&(U.text=le,U.whitespace_before="",U.newlines=0,G.add_raw_token(U),G.print_newline(!0))}},we.prototype._handle_tag_open=function(G,U,j,Z,le){var ee=this._get_tag_open_token(U);if((j.is_unformatted||j.is_content_unformatted)&&!j.is_empty_element&&U.type===H.TAG_OPEN&&!ee.is_start_tag?(G.add_raw_token(U),ee.start_tag_token=this._tag_stack.try_pop(ee.tag_name)):(G.traverse_whitespace(U),this._set_tag_position(G,U,ee,j,Z),ee.is_inline_element||G.set_wrap_point(),G.print_token(U)),ee.is_start_tag&&this._is_wrap_attributes_force){var E=0,T;do T=le.peek(E),T.type===H.ATTRIBUTE&&(ee.attr_count+=1),E+=1;while(T.type!==H.EOF&&T.type!==H.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(ee.alignment_size=U.text.length+1),!ee.tag_complete&&!ee.is_unformatted&&(G.alignment_size=ee.alignment_size),ee};var Ce=function(G,U,j){if(this.parent=U||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="",!j)this.tag_complete=!0;else{var Z;this.tag_start_char=j.text[0],this.text=j.text,this.tag_start_char==="<"?(Z=j.text.match(/^<([^\s>]*)/),this.tag_check=Z?Z[1]:""):(Z=j.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=Z?Z[1]:"",(j.text.startsWith("{{#>")||j.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&j.next!==null?this.tag_check=j.next.text.split(" ")[0]:this.tag_check=j.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),j.type===H.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||j.closed&&j.closed.text==="/>";var le=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(le=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!G.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(le)))}};we.prototype._get_tag_open_token=function(G){var U=new Ce(this._options,this._tag_stack.get_parser_token(),G);return U.alignment_size=this._options.wrap_attributes_indent_size,U.is_end_tag=U.is_end_tag||_e(U.tag_check,this._options.void_elements),U.is_empty_element=U.tag_complete||U.is_start_tag&&U.is_end_tag,U.is_unformatted=!U.tag_complete&&_e(U.tag_check,this._options.unformatted),U.is_content_unformatted=!U.is_empty_element&&_e(U.tag_check,this._options.content_unformatted),U.is_inline_element=_e(U.tag_name,this._options.inline)||this._options.inline_custom_elements&&U.tag_name.includes("-")||U.tag_start_char==="{",U},we.prototype._set_tag_position=function(G,U,j,Z,le){if(j.is_empty_element||(j.is_end_tag?j.start_tag_token=this._tag_stack.try_pop(j.tag_name):(this._do_optional_end_element(j)&&(j.is_inline_element||G.print_newline(!1)),this._tag_stack.record_tag(j),(j.tag_name==="script"||j.tag_name==="style")&&!(j.is_unformatted||j.is_content_unformatted)&&(j.custom_beautifier_name=C(j.tag_check,U)))),_e(j.tag_check,this._options.extra_liners)&&(G.print_newline(!1),G._output.just_added_blankline()||G.print_newline(!0)),j.is_empty_element){if(j.tag_start_char==="{"&&j.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),j.indent_content=!0;var ee=G.current_line_has_match(/{{#if/);ee||G.print_newline(!1)}j.tag_name==="!--"&&le.type===H.TAG_CLOSE&&Z.is_end_tag&&j.text.indexOf(`
|
|
`)===-1||(j.is_inline_element||j.is_unformatted||G.print_newline(!1),this._calcluate_parent_multiline(G,j))}else if(j.is_end_tag){var E=!1;E=j.start_tag_token&&j.start_tag_token.multiline_content,E=E||!j.is_inline_element&&!(Z.is_inline_element||Z.is_unformatted)&&!(le.type===H.TAG_CLOSE&&j.start_tag_token===Z)&&le.type!=="TK_CONTENT",(j.is_content_unformatted||j.is_unformatted)&&(E=!1),E&&G.print_newline(!1)}else j.indent_content=!j.custom_beautifier_name,j.tag_start_char==="<"&&(j.tag_name==="html"?j.indent_content=this._options.indent_inner_html:j.tag_name==="head"?j.indent_content=this._options.indent_head_inner_html:j.tag_name==="body"&&(j.indent_content=this._options.indent_body_inner_html)),!(j.is_inline_element||j.is_unformatted)&&(le.type!=="TK_CONTENT"||j.is_content_unformatted)&&G.print_newline(!1),this._calcluate_parent_multiline(G,j)},we.prototype._calcluate_parent_multiline=function(G,U){U.parent&&G._output.just_added_newline()&&!((U.is_inline_element||U.is_unformatted)&&U.parent.is_inline_element)&&(U.parent.multiline_content=!0)};var Se=["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"],Be=["a","audio","del","ins","map","noscript","video"];we.prototype._do_optional_end_element=function(G){var U=null;if(!(G.is_empty_element||!G.is_start_tag||!G.parent)){if(G.tag_name==="body")U=U||this._tag_stack.try_pop("head");else if(G.tag_name==="li")U=U||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(G.tag_name==="dd"||G.tag_name==="dt")U=U||this._tag_stack.try_pop("dt",["dl"]),U=U||this._tag_stack.try_pop("dd",["dl"]);else if(G.parent.tag_name==="p"&&Se.indexOf(G.tag_name)!==-1){var j=G.parent.parent;(!j||Be.indexOf(j.tag_name)===-1)&&(U=U||this._tag_stack.try_pop("p"))}else G.tag_name==="rp"||G.tag_name==="rt"?(U=U||this._tag_stack.try_pop("rt",["ruby","rtc"]),U=U||this._tag_stack.try_pop("rp",["ruby","rtc"])):G.tag_name==="optgroup"?U=U||this._tag_stack.try_pop("optgroup",["select"]):G.tag_name==="option"?U=U||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):G.tag_name==="colgroup"?U=U||this._tag_stack.try_pop("caption",["table"]):G.tag_name==="thead"?(U=U||this._tag_stack.try_pop("caption",["table"]),U=U||this._tag_stack.try_pop("colgroup",["table"])):G.tag_name==="tbody"||G.tag_name==="tfoot"?(U=U||this._tag_stack.try_pop("caption",["table"]),U=U||this._tag_stack.try_pop("colgroup",["table"]),U=U||this._tag_stack.try_pop("thead",["table"]),U=U||this._tag_stack.try_pop("tbody",["table"])):G.tag_name==="tr"?(U=U||this._tag_stack.try_pop("caption",["table"]),U=U||this._tag_stack.try_pop("colgroup",["table"]),U=U||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(G.tag_name==="th"||G.tag_name==="td")&&(U=U||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),U=U||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return G.parent=this._tag_stack.get_parser_token(),U}},N.exports.Beautifier=we},function(N,A,d){var x=d(6).Options;function y($){x.call(this,$,"html"),this.templating.length===1&&this.templating[0]==="auto"&&(this.templating=["django","erb","handlebars","php"]),this.indent_inner_html=this._get_boolean("indent_inner_html"),this.indent_body_inner_html=this._get_boolean("indent_body_inner_html",!0),this.indent_head_inner_html=this._get_boolean("indent_head_inner_html",!0),this.indent_handlebars=this._get_boolean("indent_handlebars",!0),this.wrap_attributes=this._get_selection("wrap_attributes",["auto","force","force-aligned","force-expand-multiline","aligned-multiple","preserve","preserve-aligned"]),this.wrap_attributes_min_attrs=this._get_number("wrap_attributes_min_attrs",2),this.wrap_attributes_indent_size=this._get_number("wrap_attributes_indent_size",this.indent_size),this.extra_liners=this._get_array("extra_liners",["head","body","/html"]),this.inline=this._get_array("inline",["a","abbr","area","audio","b","bdi","bdo","br","button","canvas","cite","code","data","datalist","del","dfn","em","embed","i","iframe","img","input","ins","kbd","keygen","label","map","mark","math","meter","noscript","object","output","progress","q","ruby","s","samp","select","small","span","strong","sub","sup","svg","template","textarea","time","u","var","video","wbr","text","acronym","big","strike","tt"]),this.inline_custom_elements=this._get_boolean("inline_custom_elements",!0),this.void_elements=this._get_array("void_elements",["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr","!doctype","?xml","basefont","isindex"]),this.unformatted=this._get_array("unformatted",[]),this.content_unformatted=this._get_array("content_unformatted",["pre","textarea"]),this.unformatted_content_delimiter=this._get_characters("unformatted_content_delimiter"),this.indent_scripts=this._get_selection("indent_scripts",["normal","keep","separate"])}y.prototype=new x,N.exports.Options=y},function(N,A,d){var x=d(9).Tokenizer,y=d(9).TOKEN,$=d(13).Directives,H=d(14).TemplatablePattern,F=d(12).Pattern,R={TAG_OPEN:"TK_TAG_OPEN",TAG_CLOSE:"TK_TAG_CLOSE",CONTROL_FLOW_OPEN:"TK_CONTROL_FLOW_OPEN",CONTROL_FLOW_CLOSE:"TK_CONTROL_FLOW_CLOSE",ATTRIBUTE:"TK_ATTRIBUTE",EQUALS:"TK_EQUALS",VALUE:"TK_VALUE",COMMENT:"TK_COMMENT",TEXT:"TK_TEXT",UNKNOWN:"TK_UNKNOWN",START:y.START,RAW:y.RAW,EOF:y.EOF},V=new $(/<\!--/,/-->/),te=function(C,_e){x.call(this,C,_e),this._current_tag_name="";var ve=new H(this._input).read_options(this._options),de=new F(this._input);if(this.__patterns={word:ve.until(/[\n\r\t <]/),word_control_flow_close_excluded:ve.until(/[\n\r\t <}]/),single_quote:ve.until_after(/'/),double_quote:ve.until_after(/"/),attribute:ve.until(/[\n\r\t =>]|\/>/),element_name:ve.until(/[\n\r\t >\/]/),angular_control_flow_start:de.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:de.starting_with(/{{!--/).until_after(/--}}/),handlebars:de.starting_with(/{{/).until_after(/}}/),handlebars_open:de.until(/[\n\r\t }]/),handlebars_raw_close:de.until(/}}/),comment:de.starting_with(/<!--/).until_after(/-->/),cdata:de.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:de.starting_with(/<!\[/).until_after(/]>/),processing:de.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 we=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=de.matching(we).until_after(we)}};te.prototype=new x,te.prototype._is_comment=function(C){return!1},te.prototype._is_opening=function(C){return C.type===R.TAG_OPEN||C.type===R.CONTROL_FLOW_OPEN},te.prototype._is_closing=function(C,_e){return C.type===R.TAG_CLOSE&&_e&&((C.text===">"||C.text==="/>")&&_e.text[0]==="<"||C.text==="}}"&&_e.text[0]==="{"&&_e.text[1]==="{")||C.type===R.CONTROL_FLOW_CLOSE&&C.text==="}"&&_e.text.endsWith("{")},te.prototype._reset=function(){this._current_tag_name=""},te.prototype._get_next_token=function(C,_e){var ve=null;this._readWhitespace();var de=this._input.peek();return de===null?this._create_token(R.EOF,""):(ve=ve||this._read_open_handlebars(de,_e),ve=ve||this._read_attribute(de,C,_e),ve=ve||this._read_close(de,_e),ve=ve||this._read_script_and_style(de,C),ve=ve||this._read_control_flows(de,_e),ve=ve||this._read_raw_content(de,C,_e),ve=ve||this._read_content_word(de,_e),ve=ve||this._read_comment_or_cdata(de),ve=ve||this._read_processing(de),ve=ve||this._read_open(de,_e),ve=ve||this._create_token(R.UNKNOWN,this._input.next()),ve)},te.prototype._read_comment_or_cdata=function(C){var _e=null,ve=null,de=null;if(C==="<"){var we=this._input.peek(1);we==="!"&&(ve=this.__patterns.comment.read(),ve?(de=V.get_directives(ve),de&&de.ignore==="start"&&(ve+=V.readIgnored(this._input))):ve=this.__patterns.cdata.read()),ve&&(_e=this._create_token(R.COMMENT,ve),_e.directives=de)}return _e},te.prototype._read_processing=function(C){var _e=null,ve=null,de=null;if(C==="<"){var we=this._input.peek(1);(we==="!"||we==="?")&&(ve=this.__patterns.conditional_comment.read(),ve=ve||this.__patterns.processing.read()),ve&&(_e=this._create_token(R.COMMENT,ve),_e.directives=de)}return _e},te.prototype._read_open=function(C,_e){var ve=null,de=null;return(!_e||_e.type===R.CONTROL_FLOW_OPEN)&&C==="<"&&(ve=this._input.next(),this._input.peek()==="/"&&(ve+=this._input.next()),ve+=this.__patterns.element_name.read(),de=this._create_token(R.TAG_OPEN,ve)),de},te.prototype._read_open_handlebars=function(C,_e){var ve=null,de=null;return(!_e||_e.type===R.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)==="!"?(ve=this.__patterns.handlebars_comment.read(),ve=ve||this.__patterns.handlebars.read(),de=this._create_token(R.COMMENT,ve)):(ve=this.__patterns.handlebars_open.read(),de=this._create_token(R.TAG_OPEN,ve))),de},te.prototype._read_control_flows=function(C,_e){var ve="",de=null;if(!this._options.templating.includes("angular"))return de;if(C==="@"){if(ve=this.__patterns.angular_control_flow_start.read(),ve==="")return de;for(var we=ve.endsWith("(")?1:0,Ce=0;!(ve.endsWith("{")&&we===Ce);){var Se=this._input.next();if(Se===null)break;Se==="("?we++:Se===")"&&Ce++,ve+=Se}de=this._create_token(R.CONTROL_FLOW_OPEN,ve)}else C==="}"&&_e&&_e.type===R.CONTROL_FLOW_OPEN&&(ve=this._input.next(),de=this._create_token(R.CONTROL_FLOW_CLOSE,ve));return de},te.prototype._read_close=function(C,_e){var ve=null,de=null;return _e&&_e.type===R.TAG_OPEN&&(_e.text[0]==="<"&&(C===">"||C==="/"&&this._input.peek(1)===">")?(ve=this._input.next(),C==="/"&&(ve+=this._input.next()),de=this._create_token(R.TAG_CLOSE,ve)):_e.text[0]==="{"&&C==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),de=this._create_token(R.TAG_CLOSE,"}}"))),de},te.prototype._read_attribute=function(C,_e,ve){var de=null,we="";if(ve&&ve.text[0]==="<")if(C==="=")de=this._create_token(R.EQUALS,this._input.next());else if(C==='"'||C==="'"){var Ce=this._input.next();C==='"'?Ce+=this.__patterns.double_quote.read():Ce+=this.__patterns.single_quote.read(),de=this._create_token(R.VALUE,Ce)}else we=this.__patterns.attribute.read(),we&&(_e.type===R.EQUALS?de=this._create_token(R.VALUE,we):de=this._create_token(R.ATTRIBUTE,we));return de},te.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)},te.prototype._read_raw_content=function(C,_e,ve){var de="";if(ve&&ve.text[0]==="{")de=this.__patterns.handlebars_raw_close.read();else if(_e.type===R.TAG_CLOSE&&_e.opened.text[0]==="<"&&_e.text[0]!=="/"){var we=_e.opened.text.substr(1).toLowerCase();this._is_content_unformatted(we)&&(de=this._input.readUntil(new RegExp("</"+we+"[\\n\\r\\t ]*?>","ig")))}return de?this._create_token(R.TEXT,de):null},te.prototype._read_script_and_style=function(C,_e){if(_e.type===R.TAG_CLOSE&&_e.opened.text[0]==="<"&&_e.text[0]!=="/"){var ve=_e.opened.text.substr(1).toLowerCase();if(ve==="script"||ve==="style"){var de=this._read_comment_or_cdata(C);if(de)return de.type=R.TEXT,de;var we=this._input.readUntil(new RegExp("</"+ve+"[\\n\\r\\t ]*?>","ig"));if(we)return this._create_token(R.TEXT,we)}}return null},te.prototype._read_content_word=function(C,_e){var ve="";return this._options.unformatted_content_delimiter&&C===this._options.unformatted_content_delimiter[0]&&(ve=this.__patterns.unformatted_content_delimiter.read()),ve||(ve=_e&&_e.type===R.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),ve?this._create_token(R.TEXT,ve):null},N.exports.Tokenizer=te,N.exports.TOKEN=R}],Ee={};function l(N){var A=Ee[N];if(A!==void 0)return A.exports;var d=Ee[N]={exports:{}};return Oe[N](d,d.exports,l),d.exports}var K=l(18);Le=K})();var Ie=Le;if(1)se=[ne,ne(58553),ne(87804)],xe=function(Oe){var Ee=ne(58553),l=ne(87804);return{html_beautify:function(K,N){return Ie(K,N,Ee.js_beautify,l.css_beautify)}}}.apply(it,se),xe!==void 0&&(Bt.exports=xe);else var Ne,pe})()},58553:function(Bt,it){var ne,se;(function(){var xe;(function(){"use strict";var Ie=[function(Ee,l,K){var N=K(1).Beautifier,A=K(5).Options;function d(x,y){var $=new N(x,y);return $.beautify()}Ee.exports=d,Ee.exports.defaultOptions=function(){return new A}},function(Ee,l,K){var N=K(2).Output,A=K(3).Token,d=K(4),x=K(5).Options,y=K(7).Tokenizer,$=K(7).line_starters,H=K(7).positionable_operators,F=K(7).TOKEN;function R(T,X){return X.indexOf(T)!==-1}function V(T){return T.replace(/^\s+/g,"")}function te(T){for(var X={},ge=0;ge<T.length;ge++)X[T[ge].replace(/-/g,"_")]=T[ge];return X}function C(T,X){return T&&T.type===F.RESERVED&&T.text===X}function _e(T,X){return T&&T.type===F.RESERVED&&R(T.text,X)}var ve=["case","return","do","if","throw","else","await","break","continue","async"],de=["before-newline","after-newline","preserve-newline"],we=te(de),Ce=[we.before_newline,we.preserve_newline],Se={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function Be(T,X){X.multiline_frame||X.mode===Se.ForInitializer||X.mode===Se.Conditional||T.remove_indent(X.start_line_index)}function G(T){T=T.replace(d.allLineBreaks,`
|
|
`);for(var X=[],ge=T.indexOf(`
|
|
`);ge!==-1;)X.push(T.substring(0,ge)),T=T.substring(ge+1),ge=T.indexOf(`
|
|
`);return T.length&&X.push(T),X}function U(T){return T===Se.ArrayLiteral}function j(T){return R(T,[Se.Expression,Se.ForInitializer,Se.Conditional])}function Z(T,X){for(var ge=0;ge<T.length;ge++){var je=T[ge].trim();if(je.charAt(0)!==X)return!1}return!0}function le(T,X){for(var ge=0,je=T.length,Qe;ge<je;ge++)if(Qe=T[ge],Qe&&Qe.indexOf(X)!==0)return!1;return!0}function ee(T,X){X=X||{},this._source_text=T||"",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 x(X)}ee.prototype.create_flags=function(T,X){var ge=0;T&&(ge=T.indentation_level,!this._output.just_added_newline()&&T.line_indent_level>ge&&(ge=T.line_indent_level));var je={mode:X,parent:T,last_token:T?T.last_token:new A(F.START_BLOCK,""),last_word:T?T.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:ge,alignment:0,line_indent_level:T?T.line_indent_level:ge,start_line_index:this._output.get_line_number(),ternary_depth:0};return je},ee.prototype._reset=function(T){var X=T.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new N(this._options,X),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(Se.BlockStatement);var ge=new y(T,this._options);return this._tokens=ge.tokenize(),T},ee.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var T,X=this._reset(this._source_text),ge=this._options.eol;this._options.eol==="auto"&&(ge=`
|
|
`,X&&d.lineBreak.test(X||"")&&(ge=X.match(d.lineBreak)[0]));for(var je=this._tokens.next();je;)this.handle_token(je),this._last_last_text=this._flags.last_token.text,this._flags.last_token=je,je=this._tokens.next();return T=this._output.get_code(ge),T},ee.prototype.handle_token=function(T,X){T.type===F.START_EXPR?this.handle_start_expr(T):T.type===F.END_EXPR?this.handle_end_expr(T):T.type===F.START_BLOCK?this.handle_start_block(T):T.type===F.END_BLOCK?this.handle_end_block(T):T.type===F.WORD?this.handle_word(T):T.type===F.RESERVED?this.handle_word(T):T.type===F.SEMICOLON?this.handle_semicolon(T):T.type===F.STRING?this.handle_string(T):T.type===F.EQUALS?this.handle_equals(T):T.type===F.OPERATOR?this.handle_operator(T):T.type===F.COMMA?this.handle_comma(T):T.type===F.BLOCK_COMMENT?this.handle_block_comment(T,X):T.type===F.COMMENT?this.handle_comment(T,X):T.type===F.DOT?this.handle_dot(T):T.type===F.EOF?this.handle_eof(T):T.type===F.UNKNOWN?this.handle_unknown(T,X):this.handle_unknown(T,X)},ee.prototype.handle_whitespace_and_comments=function(T,X){var ge=T.newlines,je=this._options.keep_array_indentation&&U(this._flags.mode);if(T.comments_before)for(var Qe=T.comments_before.next();Qe;)this.handle_whitespace_and_comments(Qe,X),this.handle_token(Qe,X),Qe=T.comments_before.next();if(je)for(var nt=0;nt<ge;nt+=1)this.print_newline(nt>0,X);else if(this._options.max_preserve_newlines&&ge>this._options.max_preserve_newlines&&(ge=this._options.max_preserve_newlines),this._options.preserve_newlines&&ge>1){this.print_newline(!1,X);for(var rt=1;rt<ge;rt+=1)this.print_newline(!0,X)}};var E=["async","break","continue","return","throw","yield"];ee.prototype.allow_wrap_or_preserved_newline=function(T,X){if(X=X===void 0?!1:X,!this._output.just_added_newline()){var ge=this._options.preserve_newlines&&T.newlines||X,je=R(this._flags.last_token.text,H)||R(T.text,H);if(je){var Qe=R(this._flags.last_token.text,H)&&R(this._options.operator_position,Ce)||R(T.text,H);ge=ge&&Qe}if(ge)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()}}},ee.prototype.print_newline=function(T,X){if(!X&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==F.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var ge=this._tokens.peek();this._flags.mode===Se.Statement&&!(this._flags.if_block&&C(ge,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(T)&&(this._flags.multiline_frame=!0)},ee.prototype.print_token_line_indentation=function(T){this._output.just_added_newline()&&(this._options.keep_array_indentation&&T.newlines&&(T.text==="["||U(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(T.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))},ee.prototype.print_token=function(T){if(this._output.raw){this._output.add_raw_token(T);return}if(this._options.comma_first&&T.previous&&T.previous.type===F.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var X=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(X),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(T),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(T),this._output.non_breaking_space=!0,this._output.add_token(T.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},ee.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},ee.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))},ee.prototype.set_mode=function(T){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,T),this._flags=this.create_flags(this._previous_flags,T),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},ee.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===Se.Statement&&Be(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},ee.prototype.start_of_object_property=function(){return this._flags.parent.mode===Se.ObjectLiteral&&this._flags.mode===Se.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||_e(this._flags.last_token,["get","set"]))},ee.prototype.start_of_statement=function(T){var X=!1;return X=X||_e(this._flags.last_token,["var","let","const"])&&T.type===F.WORD,X=X||C(this._flags.last_token,"do"),X=X||!(this._flags.parent.mode===Se.ObjectLiteral&&this._flags.mode===Se.Statement)&&_e(this._flags.last_token,E)&&!T.newlines,X=X||C(this._flags.last_token,"else")&&!(C(T,"if")&&!T.comments_before),X=X||this._flags.last_token.type===F.END_EXPR&&(this._previous_flags.mode===Se.ForInitializer||this._previous_flags.mode===Se.Conditional),X=X||this._flags.last_token.type===F.WORD&&this._flags.mode===Se.BlockStatement&&!this._flags.in_case&&!(T.text==="--"||T.text==="++")&&this._last_last_text!=="function"&&T.type!==F.WORD&&T.type!==F.RESERVED,X=X||this._flags.mode===Se.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||_e(this._flags.last_token,["get","set"])),X?(this.set_mode(Se.Statement),this.indent(),this.handle_whitespace_and_comments(T,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(T,_e(T,["do","for","if","while"])),!0):!1},ee.prototype.handle_start_expr=function(T){this.start_of_statement(T)||this.handle_whitespace_and_comments(T);var X=Se.Expression;if(T.text==="["){if(this._flags.last_token.type===F.WORD||this._flags.last_token.text===")"){_e(this._flags.last_token,$)&&(this._output.space_before_token=!0),this.print_token(T),this.set_mode(X),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}X=Se.ArrayLiteral,U(this._flags.mode)&&(this._flags.last_token.text==="["||this._flags.last_token.text===","&&(this._last_last_text==="]"||this._last_last_text==="}"))&&(this._options.keep_array_indentation||this.print_newline()),R(this._flags.last_token.type,[F.START_EXPR,F.END_EXPR,F.WORD,F.OPERATOR,F.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===F.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,X=Se.ForInitializer):R(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,X=Se.Conditional):R(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&T.whitespace_before===""?this._output.space_before_token=!1:(R(this._flags.last_token.text,$)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===F.EQUALS||this._flags.last_token.type===F.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(T);else if(this._flags.last_token.type===F.WORD){this._output.space_before_token=!1;var ge=this._tokens.peek(-3);if(this._options.space_after_named_function&&ge){var je=this._tokens.peek(-4);_e(ge,["async","function"])||ge.text==="*"&&_e(je,["async","function"])?this._output.space_before_token=!0:this._flags.mode===Se.ObjectLiteral?(ge.text==="{"||ge.text===","||ge.text==="*"&&(je.text==="{"||je.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(T);(this._flags.last_token.type===F.RESERVED&&(this._flags.last_word==="function"||this._flags.last_word==="typeof")||this._flags.last_token.text==="*"&&(R(this._last_last_text,["function","yield"])||this._flags.mode===Se.ObjectLiteral&&R(this._last_last_text,["{",","])))&&(this._output.space_before_token=this._options.space_after_anon_function)}this._flags.last_token.text===";"||this._flags.last_token.type===F.START_BLOCK?this.print_newline():(this._flags.last_token.type===F.END_EXPR||this._flags.last_token.type===F.START_EXPR||this._flags.last_token.type===F.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===F.COMMA)&&this.allow_wrap_or_preserved_newline(T,T.newlines),this.print_token(T),this.set_mode(X),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},ee.prototype.handle_end_expr=function(T){for(;this._flags.mode===Se.Statement;)this.restore_mode();this.handle_whitespace_and_comments(T),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(T,T.text==="]"&&U(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===F.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(T),this.restore_mode(),Be(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===Se.Conditional&&(this._previous_flags.mode=Se.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},ee.prototype.handle_start_block=function(T){this.handle_whitespace_and_comments(T);var X=this._tokens.peek(),ge=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===F.END_EXPR?(this.set_mode(Se.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(Se.BlockStatement):ge&&(R(ge.text,[":",","])&&R(X.type,[F.STRING,F.WORD,F.RESERVED])||R(X.text,["get","set","..."])&&R(ge.type,[F.WORD,F.RESERVED]))?R(this._last_last_text,["class","interface"])&&!R(ge.text,[":",","])?this.set_mode(Se.BlockStatement):this.set_mode(Se.ObjectLiteral):this._flags.last_token.type===F.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(Se.BlockStatement):R(this._flags.last_token.type,[F.EQUALS,F.START_EXPR,F.COMMA,F.OPERATOR])||_e(this._flags.last_token,["return","throw","import","default"])?this.set_mode(Se.ObjectLiteral):this.set_mode(Se.BlockStatement),this._flags.last_token&&_e(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var je=!X.comments_before&&X.text==="}",Qe=je&&this._flags.last_word==="function"&&this._flags.last_token.type===F.END_EXPR;if(this._options.brace_preserve_inline){var nt=0,rt=null;this._flags.inline_frame=!0;do if(nt+=1,rt=this._tokens.peek(nt-1),rt.newlines){this._flags.inline_frame=!1;break}while(rt.type!==F.EOF&&!(rt.type===F.END_BLOCK&&rt.opened===T))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&T.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==F.OPERATOR&&(Qe||this._flags.last_token.type===F.EQUALS||_e(this._flags.last_token,ve)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(U(this._previous_flags.mode)&&(this._flags.last_token.type===F.START_EXPR||this._flags.last_token.type===F.COMMA)&&((this._flags.last_token.type===F.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===F.COMMA||this._flags.last_token.type===F.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(T),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==F.OPERATOR&&this._flags.last_token.type!==F.START_EXPR&&(R(this._flags.last_token.type,[F.START_BLOCK,F.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(T),this.indent(),!je&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},ee.prototype.handle_end_block=function(T){for(this.handle_whitespace_and_comments(T);this._flags.mode===Se.Statement;)this.restore_mode();var X=this._flags.last_token.type===F.START_BLOCK;this._flags.inline_frame&&!X?this._output.space_before_token=!0:this._options.brace_style==="expand"?X||this.print_newline():X||(U(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(T)},ee.prototype.handle_word=function(T){if(T.type===F.RESERVED){if(R(T.text,["set","get"])&&this._flags.mode!==Se.ObjectLiteral)T.type=F.WORD;else if(T.text==="import"&&R(this._tokens.peek().text,["(","."]))T.type=F.WORD;else if(R(T.text,["as","from"])&&!this._flags.import_block)T.type=F.WORD;else if(this._flags.mode===Se.ObjectLiteral){var X=this._tokens.peek();X.text===":"&&(T.type=F.WORD)}}if(this.start_of_statement(T)?_e(this._flags.last_token,["var","let","const"])&&T.type===F.WORD&&(this._flags.declaration_statement=!0):T.newlines&&!j(this._flags.mode)&&(this._flags.last_token.type!==F.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==F.EQUALS&&(this._options.preserve_newlines||!_e(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(T),this.print_newline()):this.handle_whitespace_and_comments(T),this._flags.do_block&&!this._flags.do_while)if(C(T,"while")){this._output.space_before_token=!0,this.print_token(T),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(T,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===Se.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&_e(T,["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(T),this._flags.in_case=!0;return}if((this._flags.last_token.type===F.COMMA||this._flags.last_token.type===F.START_EXPR||this._flags.last_token.type===F.EQUALS||this._flags.last_token.type===F.OPERATOR)&&!this.start_of_object_property()&&!(R(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===Se.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(T),C(T,"function")){(R(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(R(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===F.OPERATOR))&&!this._output.just_added_blankline()&&!T.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===F.RESERVED||this._flags.last_token.type===F.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===F.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(j(this._flags.mode)||U(this._flags.mode))||this.print_newline(),this.print_token(T),this._flags.last_word=T.text;return}var ge="NONE";if(this._flags.last_token.type===F.END_BLOCK?this._previous_flags.inline_frame?ge="SPACE":_e(T,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&T.newlines?ge="NEWLINE":(ge="SPACE",this._output.space_before_token=!0):ge="NEWLINE":this._flags.last_token.type===F.SEMICOLON&&this._flags.mode===Se.BlockStatement?ge="NEWLINE":this._flags.last_token.type===F.SEMICOLON&&j(this._flags.mode)?ge="SPACE":this._flags.last_token.type===F.STRING?ge="NEWLINE":this._flags.last_token.type===F.RESERVED||this._flags.last_token.type===F.WORD||this._flags.last_token.text==="*"&&(R(this._last_last_text,["function","yield"])||this._flags.mode===Se.ObjectLiteral&&R(this._last_last_text,["{",","]))?ge="SPACE":this._flags.last_token.type===F.START_BLOCK?this._flags.inline_frame?ge="SPACE":ge="NEWLINE":this._flags.last_token.type===F.END_EXPR&&(this._output.space_before_token=!0,ge="NEWLINE"),_e(T,$)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?ge="SPACE":ge="NEWLINE"),_e(T,["else","catch","finally"]))if((!(this._flags.last_token.type===F.END_BLOCK&&this._previous_flags.mode===Se.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&T.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var je=this._output.current_line;je.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else ge==="NEWLINE"?_e(this._flags.last_token,ve)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&_e(T,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==F.END_EXPR?(this._flags.last_token.type!==F.START_EXPR||!_e(T,["var","let","const"]))&&this._flags.last_token.text!==":"&&(C(T,"if")&&C(T.previous,"else")?this._output.space_before_token=!0:this.print_newline()):_e(T,$)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&U(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():ge==="SPACE"&&(this._output.space_before_token=!0);T.previous&&(T.previous.type===F.WORD||T.previous.type===F.RESERVED)&&(this._output.space_before_token=!0),this.print_token(T),this._flags.last_word=T.text,T.type===F.RESERVED&&(T.text==="do"?this._flags.do_block=!0:T.text==="if"?this._flags.if_block=!0:T.text==="import"?this._flags.import_block=!0:this._flags.import_block&&C(T,"from")&&(this._flags.import_block=!1))},ee.prototype.handle_semicolon=function(T){this.start_of_statement(T)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(T);for(var X=this._tokens.peek();this._flags.mode===Se.Statement&&!(this._flags.if_block&&C(X,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(T)},ee.prototype.handle_string=function(T){T.text.startsWith("`")&&T.newlines===0&&T.whitespace_before===""&&(T.previous.text===")"||this._flags.last_token.type===F.WORD)||(this.start_of_statement(T)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(T),this._flags.last_token.type===F.RESERVED||this._flags.last_token.type===F.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===F.COMMA||this._flags.last_token.type===F.START_EXPR||this._flags.last_token.type===F.EQUALS||this._flags.last_token.type===F.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(T):T.text.startsWith("`")&&this._flags.last_token.type===F.END_EXPR&&(T.previous.text==="]"||T.previous.text===")")&&T.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(T)},ee.prototype.handle_equals=function(T){this.start_of_statement(T)||this.handle_whitespace_and_comments(T),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(T),this._output.space_before_token=!0},ee.prototype.handle_comma=function(T){this.handle_whitespace_and_comments(T,!0),this.print_token(T),this._output.space_before_token=!0,this._flags.declaration_statement?(j(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(T)):this._flags.mode===Se.ObjectLiteral||this._flags.mode===Se.Statement&&this._flags.parent.mode===Se.ObjectLiteral?(this._flags.mode===Se.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(T)},ee.prototype.handle_operator=function(T){var X=T.text==="*"&&(_e(this._flags.last_token,["function","yield"])||R(this._flags.last_token.type,[F.START_BLOCK,F.COMMA,F.END_BLOCK,F.SEMICOLON])),ge=R(T.text,["-","+"])&&(R(this._flags.last_token.type,[F.START_BLOCK,F.START_EXPR,F.EQUALS,F.OPERATOR])||R(this._flags.last_token.text,$)||this._flags.last_token.text===",");if(!this.start_of_statement(T)){var je=!X;this.handle_whitespace_and_comments(T,je)}if(T.text==="*"&&this._flags.last_token.type===F.DOT){this.print_token(T);return}if(T.text==="::"){this.print_token(T);return}if(R(T.text,["-","+"])&&this.start_of_object_property()){this.print_token(T);return}if(this._flags.last_token.type===F.OPERATOR&&R(this._options.operator_position,Ce)&&this.allow_wrap_or_preserved_newline(T),T.text===":"&&this._flags.in_case){this.print_token(T),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==F.START_BLOCK?(this.indent(),this.print_newline(),this._flags.case_block=!1):(this._flags.case_block=!0,this._output.space_before_token=!0);return}var Qe=!0,nt=!0,rt=!1;if(T.text===":"?this._flags.ternary_depth===0?Qe=!1:(this._flags.ternary_depth-=1,rt=!0):T.text==="?"&&(this._flags.ternary_depth+=1),!ge&&!X&&this._options.preserve_newlines&&R(T.text,H)){var Gt=T.text===":",ct=Gt&&rt,st=Gt&&!rt;switch(this._options.operator_position){case we.before_newline:this._output.space_before_token=!st,this.print_token(T),(!Gt||ct)&&this.allow_wrap_or_preserved_newline(T),this._output.space_before_token=!0;return;case we.after_newline:this._output.space_before_token=!0,!Gt||ct?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(T):this._output.space_before_token=!1,this.print_token(T),this._output.space_before_token=!0;return;case we.preserve_newline:st||this.allow_wrap_or_preserved_newline(T),Qe=!(this._output.just_added_newline()||st),this._output.space_before_token=Qe,this.print_token(T),this._output.space_before_token=!0;return}}if(X){this.allow_wrap_or_preserved_newline(T),Qe=!1;var tr=this._tokens.peek();nt=tr&&R(tr.type,[F.WORD,F.RESERVED])}else if(T.text==="...")this.allow_wrap_or_preserved_newline(T),Qe=this._flags.last_token.type===F.START_BLOCK,nt=!1;else if(R(T.text,["--","++","!","~"])||ge){if((this._flags.last_token.type===F.COMMA||this._flags.last_token.type===F.START_EXPR)&&this.allow_wrap_or_preserved_newline(T),Qe=!1,nt=!1,T.newlines&&(T.text==="--"||T.text==="++"||T.text==="~")){var sr=_e(this._flags.last_token,ve)&&T.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===";"&&j(this._flags.mode)&&(Qe=!0),this._flags.last_token.type===F.RESERVED?Qe=!0:this._flags.last_token.type===F.END_EXPR?Qe=!(this._flags.last_token.text==="]"&&(T.text==="--"||T.text==="++")):this._flags.last_token.type===F.OPERATOR&&(Qe=R(T.text,["--","-","++","+"])&&R(this._flags.last_token.text,["--","-","++","+"]),R(T.text,["+","-"])&&R(this._flags.last_token.text,["--","++"])&&(nt=!0)),(this._flags.mode===Se.BlockStatement&&!this._flags.inline_frame||this._flags.mode===Se.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||Qe,this.print_token(T),this._output.space_before_token=nt},ee.prototype.handle_block_comment=function(T,X){if(this._output.raw){this._output.add_raw_token(T),T.directives&&T.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(T.directives){this.print_newline(!1,X),this.print_token(T),T.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!d.newline.test(T.text)&&!T.newlines){this._output.space_before_token=!0,this.print_token(T),this._output.space_before_token=!0;return}else this.print_block_commment(T,X)},ee.prototype.print_block_commment=function(T,X){var ge=G(T.text),je,Qe=!1,nt=!1,rt=T.whitespace_before,Gt=rt.length;if(this.print_newline(!1,X),this.print_token_line_indentation(T),this._output.add_token(ge[0]),this.print_newline(!1,X),ge.length>1){for(ge=ge.slice(1),Qe=Z(ge,"*"),nt=le(ge,rt),Qe&&(this._flags.alignment=1),je=0;je<ge.length;je++)Qe?(this.print_token_line_indentation(T),this._output.add_token(V(ge[je]))):nt&&ge[je]?(this.print_token_line_indentation(T),this._output.add_token(ge[je].substring(Gt))):(this._output.current_line.set_indent(-1),this._output.add_token(ge[je])),this.print_newline(!1,X);this._flags.alignment=0}},ee.prototype.handle_comment=function(T,X){T.newlines?this.print_newline(!1,X):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(T),this.print_newline(!1,X)},ee.prototype.handle_dot=function(T){this.start_of_statement(T)||this.handle_whitespace_and_comments(T,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),_e(this._flags.last_token,ve)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(T,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(T)},ee.prototype.handle_unknown=function(T,X){this.print_token(T),T.text[T.text.length-1]===`
|
|
`&&this.print_newline(!1,X)},ee.prototype.handle_eof=function(T){for(;this._flags.mode===Se.Statement;)this.restore_mode();this.handle_whitespace_and_comments(T)},Ee.exports.Beautifier=ee},function(Ee){function l(A){this.__parent=A,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 A=new l(this.__parent);return A.set_indent(this.__indent_count,this.__alignment_count),A},l.prototype.item=function(A){return A<0?this.__items[this.__items.length+A]:this.__items[A]},l.prototype.has_match=function(A){for(var d=this.__items.length-1;d>=0;d--)if(this.__items[d].match(A))return!0;return!1},l.prototype.set_indent=function(A,d){this.is_empty()&&(this.__indent_count=A||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 A=this.__parent.current_line;return A.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),A.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),A.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,A.__items[0]===" "&&(A.__items.splice(0,1),A.__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(A){this.__items.push(A);var d=A.lastIndexOf(`
|
|
`);d!==-1?this.__character_count=A.length-d:this.__character_count+=A.length},l.prototype.pop=function(){var A=null;return this.is_empty()||(A=this.__items.pop(),this.__character_count-=A.length),A},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 A="";return this.is_empty()?this.__parent.indent_empty_lines&&(A=this.__parent.get_indent_string(this.__indent_count)):(A=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),A+=this.__items.join("")),A};function K(A,d){this.__cache=[""],this.__indent_size=A.indent_size,this.__indent_string=A.indent_char,A.indent_with_tabs||(this.__indent_string=new Array(A.indent_size+1).join(A.indent_char)),d=d||"",A.indent_level>0&&(d=new Array(A.indent_level+1).join(this.__indent_string)),this.__base_string=d,this.__base_string_length=d.length}K.prototype.get_indent_size=function(A,d){var x=this.__base_string_length;return d=d||0,A<0&&(x=0),x+=A*this.__indent_size,x+=d,x},K.prototype.get_indent_string=function(A,d){var x=this.__base_string;return d=d||0,A<0&&(A=0,x=""),d+=A*this.__indent_size,this.__ensure_cache(d),x+=this.__cache[d],x},K.prototype.__ensure_cache=function(A){for(;A>=this.__cache.length;)this.__add_column()},K.prototype.__add_column=function(){var A=this.__cache.length,d=0,x="";this.__indent_size&&A>=this.__indent_size&&(d=Math.floor(A/this.__indent_size),A-=d*this.__indent_size,x=new Array(d+1).join(this.__indent_string)),A&&(x+=new Array(A+1).join(" ")),this.__cache.push(x)};function N(A,d){this.__indent_cache=new K(A,d),this.raw=!1,this._end_with_newline=A.end_with_newline,this.indent_size=A.indent_size,this.wrap_line_length=A.wrap_line_length,this.indent_empty_lines=A.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()}N.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},N.prototype.get_line_number=function(){return this.__lines.length},N.prototype.get_indent_string=function(A,d){return this.__indent_cache.get_indent_string(A,d)},N.prototype.get_indent_size=function(A,d){return this.__indent_cache.get_indent_size(A,d)},N.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},N.prototype.add_new_line=function(A){return this.is_empty()||!A&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},N.prototype.get_code=function(A){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 x=this.__lines.join(`
|
|
`);return A!==`
|
|
`&&(x=x.replace(/[\n]/g,A)),x},N.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},N.prototype.set_indent=function(A,d){return A=A||0,d=d||0,this.next_line.set_indent(A,d),this.__lines.length>1?(this.current_line.set_indent(A,d),!0):(this.current_line.set_indent(),!1)},N.prototype.add_raw_token=function(A){for(var d=0;d<A.newlines;d++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(A.whitespace_before),this.current_line.push(A.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},N.prototype.add_token=function(A){this.__add_space_before_token(),this.current_line.push(A),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},N.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(" "))},N.prototype.remove_indent=function(A){for(var d=this.__lines.length;A<d;)this.__lines[A]._remove_indent(),A++;this.current_line._remove_wrap_indent()},N.prototype.trim=function(A){for(A=A===void 0?!1:A,this.current_line.trim();A&&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},N.prototype.just_added_newline=function(){return this.current_line.is_empty()},N.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},N.prototype.ensure_empty_line_above=function(A,d){for(var x=this.__lines.length-2;x>=0;){var y=this.__lines[x];if(y.is_empty())break;if(y.item(0).indexOf(A)!==0&&y.item(-1)!==d){this.__lines.splice(x+1,0,new l(this)),this.previous_line=this.__lines[this.__lines.length-2];break}x--}},Ee.exports.Output=N},function(Ee){function l(K,N,A,d){this.type=K,this.text=N,this.comments_before=null,this.newlines=A||0,this.whitespace_before=d||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}Ee.exports.Token=l},function(Ee,l){var K="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",N="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",A="\\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",x="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",y="(?:"+x+"|["+K+A+"])",$="(?:"+x+"|["+N+A+d+"])*";l.identifier=new RegExp(y+$,"g"),l.identifierStart=new RegExp(y),l.identifierMatch=new RegExp("(?:"+x+"|["+N+A+d+"])+");var H=/[\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(Ee,l,K){var N=K(6).Options,A=["before-newline","after-newline","preserve-newline"];function d(x){N.call(this,x,"js");var y=this.raw_options.brace_style||null;y==="expand-strict"?this.raw_options.brace_style="expand":y==="collapse-preserve-inline"?this.raw_options.brace_style="collapse,preserve-inline":this.raw_options.braces_on_own_line!==void 0&&(this.raw_options.brace_style=this.raw_options.braces_on_own_line?"expand":"collapse");var $=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var H=0;H<$.length;H++)$[H]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=$[H];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",A),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}d.prototype=new N,Ee.exports.Options=d},function(Ee){function l(A,d){this.raw_options=K(A,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(A,d){var x=this.raw_options[A],y=d||[];return typeof x=="object"?x!==null&&typeof x.concat=="function"&&(y=x.concat()):typeof x=="string"&&(y=x.split(/[^a-zA-Z0-9_\/\-]+/)),y},l.prototype._get_boolean=function(A,d){var x=this.raw_options[A],y=x===void 0?!!d:!!x;return y},l.prototype._get_characters=function(A,d){var x=this.raw_options[A],y=d||"";return typeof x=="string"&&(y=x.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),y},l.prototype._get_number=function(A,d){var x=this.raw_options[A];d=parseInt(d,10),isNaN(d)&&(d=0);var y=parseInt(x,10);return isNaN(y)&&(y=d),y},l.prototype._get_selection=function(A,d,x){var y=this._get_selection_list(A,d,x);if(y.length!==1)throw new Error("Invalid Option Value: The option '"+A+`' can only be one of the following values:
|
|
`+d+`
|
|
You passed in: '`+this.raw_options[A]+"'");return y[0]},l.prototype._get_selection_list=function(A,d,x){if(!d||d.length===0)throw new Error("Selection list cannot be empty.");if(x=x||[d[0]],!this._is_valid_selection(x,d))throw new Error("Invalid Default Value!");var y=this._get_array(A,x);if(!this._is_valid_selection(y,d))throw new Error("Invalid Option Value: The option '"+A+`' can contain only the following values:
|
|
`+d+`
|
|
You passed in: '`+this.raw_options[A]+"'");return y},l.prototype._is_valid_selection=function(A,d){return A.length&&d.length&&!A.some(function(x){return d.indexOf(x)===-1})};function K(A,d){var x={};A=N(A);var y;for(y in A)y!==d&&(x[y]=A[y]);if(d&&A[d])for(y in A[d])x[y]=A[d][y];return x}function N(A){var d={},x;for(x in A){var y=x.replace(/-/g,"_");d[y]=A[x]}return d}Ee.exports.Options=l,Ee.exports.normalizeOpts=N,Ee.exports.mergeOpts=K},function(Ee,l,K){var N=K(8).InputScanner,A=K(9).Tokenizer,d=K(9).TOKEN,x=K(13).Directives,y=K(4),$=K(12).Pattern,H=K(14).TemplatablePattern;function F(Z,le){return le.indexOf(Z)!==-1}var R={START_EXPR:"TK_START_EXPR",END_EXPR:"TK_END_EXPR",START_BLOCK:"TK_START_BLOCK",END_BLOCK:"TK_END_BLOCK",WORD:"TK_WORD",RESERVED:"TK_RESERVED",SEMICOLON:"TK_SEMICOLON",STRING:"TK_STRING",EQUALS:"TK_EQUALS",OPERATOR:"TK_OPERATOR",COMMA:"TK_COMMA",BLOCK_COMMENT:"TK_BLOCK_COMMENT",COMMENT:"TK_COMMENT",DOT:"TK_DOT",UNKNOWN:"TK_UNKNOWN",START:d.START,RAW:d.RAW,EOF:d.EOF},V=new x(/\/\*/,/\*\//),te=/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\.]/,ve=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),de=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";de=de.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),de="\\?\\.(?!\\d) "+de,de=de.replace(/ /g,"|");var we=new RegExp(de),Ce="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),Se=Ce.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),Be=new RegExp("^(?:"+Se.join("|")+")$"),G,U=function(Z,le){A.call(this,Z,le),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var ee=new $(this._input),E=new H(this._input).read_options(this._options);this.__patterns={template:E,identifier:E.starting_with(y.identifier).matching(y.identifierMatch),number:ee.matching(te),punct:ee.matching(we),comment:ee.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:ee.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:ee.matching(/<!--/),html_comment_end:ee.matching(/-->/),include:ee.starting_with(/#include/).until_after(y.lineBreak),shebang:ee.starting_with(/#!/).until_after(y.lineBreak),xml:ee.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(/[`}\\]/)}};U.prototype=new A,U.prototype._is_comment=function(Z){return Z.type===R.COMMENT||Z.type===R.BLOCK_COMMENT||Z.type===R.UNKNOWN},U.prototype._is_opening=function(Z){return Z.type===R.START_BLOCK||Z.type===R.START_EXPR},U.prototype._is_closing=function(Z,le){return(Z.type===R.END_BLOCK||Z.type===R.END_EXPR)&&le&&(Z.text==="]"&&le.text==="["||Z.text===")"&&le.text==="("||Z.text==="}"&&le.text==="{")},U.prototype._reset=function(){G=!1},U.prototype._get_next_token=function(Z,le){var ee=null;this._readWhitespace();var E=this._input.peek();return E===null?this._create_token(R.EOF,""):(ee=ee||this._read_non_javascript(E),ee=ee||this._read_string(E),ee=ee||this._read_pair(E,this._input.peek(1)),ee=ee||this._read_word(Z),ee=ee||this._read_singles(E),ee=ee||this._read_comment(E),ee=ee||this._read_regexp(E,Z),ee=ee||this._read_xml(E,Z),ee=ee||this._read_punctuation(),ee=ee||this._create_token(R.UNKNOWN,this._input.next()),ee)},U.prototype._read_word=function(Z){var le;if(le=this.__patterns.identifier.read(),le!=="")return le=le.replace(y.allLineBreaks,`
|
|
`),!(Z.type===R.DOT||Z.type===R.RESERVED&&(Z.text==="set"||Z.text==="get"))&&Be.test(le)?(le==="in"||le==="of")&&(Z.type===R.WORD||Z.type===R.STRING)?this._create_token(R.OPERATOR,le):this._create_token(R.RESERVED,le):this._create_token(R.WORD,le);if(le=this.__patterns.number.read(),le!=="")return this._create_token(R.WORD,le)},U.prototype._read_singles=function(Z){var le=null;return Z==="("||Z==="["?le=this._create_token(R.START_EXPR,Z):Z===")"||Z==="]"?le=this._create_token(R.END_EXPR,Z):Z==="{"?le=this._create_token(R.START_BLOCK,Z):Z==="}"?le=this._create_token(R.END_BLOCK,Z):Z===";"?le=this._create_token(R.SEMICOLON,Z):Z==="."&&_e.test(this._input.peek(1))?le=this._create_token(R.DOT,Z):Z===","&&(le=this._create_token(R.COMMA,Z)),le&&this._input.next(),le},U.prototype._read_pair=function(Z,le){var ee=null;return Z==="#"&&le==="{"&&(ee=this._create_token(R.START_BLOCK,Z+le)),ee&&(this._input.next(),this._input.next()),ee},U.prototype._read_punctuation=function(){var Z=this.__patterns.punct.read();if(Z!=="")return Z==="="?this._create_token(R.EQUALS,Z):Z==="?."?this._create_token(R.DOT,Z):this._create_token(R.OPERATOR,Z)},U.prototype._read_non_javascript=function(Z){var le="";if(Z==="#"){if(this._is_first_token()&&(le=this.__patterns.shebang.read(),le))return this._create_token(R.UNKNOWN,le.trim()+`
|
|
`);if(le=this.__patterns.include.read(),le)return this._create_token(R.UNKNOWN,le.trim()+`
|
|
`);Z=this._input.next();var ee="#";if(this._input.hasNext()&&this._input.testChar(C)){do Z=this._input.next(),ee+=Z;while(this._input.hasNext()&&Z!=="#"&&Z!=="=");return Z==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(ee+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(ee+="{}",this._input.next(),this._input.next())),this._create_token(R.WORD,ee)}this._input.back()}else if(Z==="<"&&this._is_first_token()){if(le=this.__patterns.html_comment_start.read(),le){for(;this._input.hasNext()&&!this._input.testChar(y.newline);)le+=this._input.next();return G=!0,this._create_token(R.COMMENT,le)}}else if(G&&Z==="-"&&(le=this.__patterns.html_comment_end.read(),le))return G=!1,this._create_token(R.COMMENT,le);return null},U.prototype._read_comment=function(Z){var le=null;if(Z==="/"){var ee="";if(this._input.peek(1)==="*"){ee=this.__patterns.block_comment.read();var E=V.get_directives(ee);E&&E.ignore==="start"&&(ee+=V.readIgnored(this._input)),ee=ee.replace(y.allLineBreaks,`
|
|
`),le=this._create_token(R.BLOCK_COMMENT,ee),le.directives=E}else this._input.peek(1)==="/"&&(ee=this.__patterns.comment.read(),le=this._create_token(R.COMMENT,ee))}return le},U.prototype._read_string=function(Z){if(Z==="`"||Z==="'"||Z==='"'){var le=this._input.next();return this.has_char_escapes=!1,Z==="`"?le+=this._read_string_recursive("`",!0,"${"):le+=this._read_string_recursive(Z),this.has_char_escapes&&this._options.unescape_strings&&(le=j(le)),this._input.peek()===Z&&(le+=this._input.next()),le=le.replace(y.allLineBreaks,`
|
|
`),this._create_token(R.STRING,le)}return null},U.prototype._allow_regexp_or_xml=function(Z){return Z.type===R.RESERVED&&F(Z.text,["return","case","throw","else","do","typeof","yield"])||Z.type===R.END_EXPR&&Z.text===")"&&Z.opened.previous.type===R.RESERVED&&F(Z.opened.previous.text,["if","while","for"])||F(Z.type,[R.COMMENT,R.START_EXPR,R.START_BLOCK,R.START,R.END_BLOCK,R.OPERATOR,R.EQUALS,R.EOF,R.SEMICOLON,R.COMMA])},U.prototype._read_regexp=function(Z,le){if(Z==="/"&&this._allow_regexp_or_xml(le)){for(var ee=this._input.next(),E=!1,T=!1;this._input.hasNext()&&(E||T||this._input.peek()!==Z)&&!this._input.testChar(y.newline);)ee+=this._input.peek(),E?E=!1:(E=this._input.peek()==="\\",this._input.peek()==="["?T=!0:this._input.peek()==="]"&&(T=!1)),this._input.next();return this._input.peek()===Z&&(ee+=this._input.next(),ee+=this._input.read(y.identifier)),this._create_token(R.STRING,ee)}return null},U.prototype._read_xml=function(Z,le){if(this._options.e4x&&Z==="<"&&this._allow_regexp_or_xml(le)){var ee="",E=this.__patterns.xml.read_match();if(E){for(var T=E[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),X=T.indexOf("{")===0,ge=0;E;){var je=!!E[1],Qe=E[2],nt=!!E[E.length-1]||Qe.slice(0,8)==="![CDATA[";if(!nt&&(Qe===T||X&&Qe.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(je?--ge:++ge),ee+=E[0],ge<=0)break;E=this.__patterns.xml.read_match()}return E||(ee+=this._input.match(/[\s\S]*/g)[0]),ee=ee.replace(y.allLineBreaks,`
|
|
`),this._create_token(R.STRING,ee)}}return null};function j(Z){for(var le="",ee=0,E=new N(Z),T=null;E.hasNext();)if(T=E.match(/([\s]|[^\\]|\\\\)+/g),T&&(le+=T[0]),E.peek()==="\\"){if(E.next(),E.peek()==="x")T=E.match(/x([0-9A-Fa-f]{2})/g);else if(E.peek()==="u")T=E.match(/u([0-9A-Fa-f]{4})/g),T||(T=E.match(/u\{([0-9A-Fa-f]+)\}/g));else{le+="\\",E.hasNext()&&(le+=E.next());continue}if(!T||(ee=parseInt(T[1],16),ee>126&&ee<=255&&T[0].indexOf("x")===0))return Z;ee>=0&&ee<32||ee>1114111?le+="\\"+T[0]:ee===34||ee===39||ee===92?le+="\\"+String.fromCharCode(ee):le+=String.fromCharCode(ee)}return le}U.prototype._read_string_recursive=function(Z,le,ee){var E,T;Z==="'"?T=this.__patterns.single_quote:Z==='"'?T=this.__patterns.double_quote:Z==="`"?T=this.__patterns.template_text:Z==="}"&&(T=this.__patterns.template_expression);for(var X=T.read(),ge="";this._input.hasNext();){if(ge=this._input.next(),ge===Z||!le&&y.newline.test(ge)){this._input.back();break}else ge==="\\"&&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(),ge+=this._input.next()):ee&&(ee==="${"&&ge==="$"&&this._input.peek()==="{"&&(ge+=this._input.next()),ee===ge&&(Z==="`"?ge+=this._read_string_recursive("}",le,"`"):ge+=this._read_string_recursive("`",le,"${"),this._input.hasNext()&&(ge+=this._input.next())));ge+=T.read(),X+=ge}return X},Ee.exports.Tokenizer=U,Ee.exports.TOKEN=R,Ee.exports.positionable_operators=ve.slice(),Ee.exports.line_starters=Ce.slice()},function(Ee){var l=RegExp.prototype.hasOwnProperty("sticky");function K(N){this.__input=N||"",this.__input_length=this.__input.length,this.__position=0}K.prototype.restart=function(){this.__position=0},K.prototype.back=function(){this.__position>0&&(this.__position-=1)},K.prototype.hasNext=function(){return this.__position<this.__input_length},K.prototype.next=function(){var N=null;return this.hasNext()&&(N=this.__input.charAt(this.__position),this.__position+=1),N},K.prototype.peek=function(N){var A=null;return N=N||0,N+=this.__position,N>=0&&N<this.__input_length&&(A=this.__input.charAt(N)),A},K.prototype.__match=function(N,A){N.lastIndex=A;var d=N.exec(this.__input);return d&&!(l&&N.sticky)&&d.index!==A&&(d=null),d},K.prototype.test=function(N,A){return A=A||0,A+=this.__position,A>=0&&A<this.__input_length?!!this.__match(N,A):!1},K.prototype.testChar=function(N,A){var d=this.peek(A);return N.lastIndex=0,d!==null&&N.test(d)},K.prototype.match=function(N){var A=this.__match(N,this.__position);return A?this.__position+=A[0].length:A=null,A},K.prototype.read=function(N,A,d){var x="",y;return N&&(y=this.match(N),y&&(x+=y[0])),A&&(y||!N)&&(x+=this.readUntil(A,d)),x},K.prototype.readUntil=function(N,A){var d="",x=this.__position;N.lastIndex=this.__position;var y=N.exec(this.__input);return y?(x=y.index,A&&(x+=y[0].length)):x=this.__input_length,d=this.__input.substring(this.__position,x),this.__position=x,d},K.prototype.readUntilAfter=function(N){return this.readUntil(N,!0)},K.prototype.get_regexp=function(N,A){var d=null,x="g";return A&&l&&(x="y"),typeof N=="string"&&N!==""?d=new RegExp(N,x):N&&(d=new RegExp(N.source,x)),d},K.prototype.get_literal_regexp=function(N){return RegExp(N.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},K.prototype.peekUntilAfter=function(N){var A=this.__position,d=this.readUntilAfter(N);return this.__position=A,d},K.prototype.lookBack=function(N){var A=this.__position-1;return A>=N.length&&this.__input.substring(A-N.length,A).toLowerCase()===N},Ee.exports.InputScanner=K},function(Ee,l,K){var N=K(8).InputScanner,A=K(3).Token,d=K(10).TokenStream,x=K(11).WhitespacePattern,y={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},$=function(H,F){this._input=new N(H),this._options=F||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new x(this._input)};$.prototype.tokenize=function(){this._input.restart(),this.__tokens=new d,this._reset();for(var H,F=new A(y.START,""),R=null,V=[],te=new d;F.type!==y.EOF;){for(H=this._get_next_token(F,R);this._is_comment(H);)te.add(H),H=this._get_next_token(F,R);te.isEmpty()||(H.comments_before=te,te=new d),H.parent=R,this._is_opening(H)?(V.push(R),R=H):R&&this._is_closing(H,R)&&(H.opened=R,R.closed=H,R=V.pop(),H.parent=R),H.previous=F,F.next=H,this.__tokens.add(H),F=H}return this.__tokens},$.prototype._is_first_token=function(){return this.__tokens.isEmpty()},$.prototype._reset=function(){},$.prototype._get_next_token=function(H,F){this._readWhitespace();var R=this._input.read(/.+/g);return R?this._create_token(y.RAW,R):this._create_token(y.EOF,"")},$.prototype._is_comment=function(H){return!1},$.prototype._is_opening=function(H){return!1},$.prototype._is_closing=function(H,F){return!1},$.prototype._create_token=function(H,F){var R=new A(H,F,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return R},$.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},Ee.exports.Tokenizer=$,Ee.exports.TOKEN=y},function(Ee){function l(K){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=K}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 K=null;return this.hasNext()&&(K=this.__tokens[this.__position],this.__position+=1),K},l.prototype.peek=function(K){var N=null;return K=K||0,K+=this.__position,K>=0&&K<this.__tokens_length&&(N=this.__tokens[K]),N},l.prototype.add=function(K){this.__parent_token&&(K.parent=this.__parent_token),this.__tokens.push(K),this.__tokens_length+=1},Ee.exports.TokenStream=l},function(Ee,l,K){var N=K(12).Pattern;function A(d,x){N.call(this,d,x),x?this._line_regexp=this._input.get_regexp(x._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}A.prototype=new N,A.prototype.__set_whitespace_patterns=function(d,x){d+="\\t ",x+="\\n\\r",this._match_pattern=this._input.get_regexp("["+d+x+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+x+"]")},A.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 x=this.__split(this._newline_regexp,d);this.newline_count=x.length-1,this.whitespace_before_token=x[this.newline_count]}return d},A.prototype.matching=function(d,x){var y=this._create();return y.__set_whitespace_patterns(d,x),y._update(),y},A.prototype._create=function(){return new A(this._input,this)},A.prototype.__split=function(d,x){d.lastIndex=0;for(var y=0,$=[],H=d.exec(x);H;)$.push(x.substring(y,H.index)),y=H.index+H[0].length,H=d.exec(x);return y<x.length?$.push(x.substring(y,x.length)):$.push(""),$},Ee.exports.WhitespacePattern=A},function(Ee){function l(K,N){this._input=K,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,N&&(this._starting_pattern=this._input.get_regexp(N._starting_pattern,!0),this._match_pattern=this._input.get_regexp(N._match_pattern,!0),this._until_pattern=this._input.get_regexp(N._until_pattern),this._until_after=N._until_after)}l.prototype.read=function(){var K=this._input.read(this._starting_pattern);return(!this._starting_pattern||K)&&(K+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),K},l.prototype.read_match=function(){return this._input.match(this._match_pattern)},l.prototype.until_after=function(K){var N=this._create();return N._until_after=!0,N._until_pattern=this._input.get_regexp(K),N._update(),N},l.prototype.until=function(K){var N=this._create();return N._until_after=!1,N._until_pattern=this._input.get_regexp(K),N._update(),N},l.prototype.starting_with=function(K){var N=this._create();return N._starting_pattern=this._input.get_regexp(K,!0),N._update(),N},l.prototype.matching=function(K){var N=this._create();return N._match_pattern=this._input.get_regexp(K,!0),N._update(),N},l.prototype._create=function(){return new l(this._input,this)},l.prototype._update=function(){},Ee.exports.Pattern=l},function(Ee){function l(K,N){K=typeof K=="string"?K:K.source,N=typeof N=="string"?N:N.source,this.__directives_block_pattern=new RegExp(K+/ beautify( \w+[:]\w+)+ /.source+N,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(K+/\sbeautify\signore:end\s/.source+N,"g")}l.prototype.get_directives=function(K){if(!K.match(this.__directives_block_pattern))return null;var N={};this.__directive_pattern.lastIndex=0;for(var A=this.__directive_pattern.exec(K);A;)N[A[1]]=A[2],A=this.__directive_pattern.exec(K);return N},l.prototype.readIgnored=function(K){return K.readUntilAfter(this.__directives_end_ignore_pattern)},Ee.exports.Directives=l},function(Ee,l,K){var N=K(12).Pattern,A={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function d(x,y){N.call(this,x,y),this.__template_pattern=null,this._disabled=Object.assign({},A),this._excluded=Object.assign({},A),y&&(this.__template_pattern=this._input.get_regexp(y.__template_pattern),this._excluded=Object.assign(this._excluded,y._excluded),this._disabled=Object.assign(this._disabled,y._disabled));var $=new N(x);this.__patterns={handlebars_comment:$.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:$.starting_with(/{{{/).until_after(/}}}/),handlebars:$.starting_with(/{{/).until_after(/}}/),php:$.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:$.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:$.starting_with(/{%/).until_after(/%}/),django_value:$.starting_with(/{{/).until_after(/}}/),django_comment:$.starting_with(/{#/).until_after(/#}/),smarty:$.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:$.starting_with(/{\*/).until_after(/\*}/),smarty_literal:$.starting_with(/{literal}/).until_after(/{\/literal}/)}}d.prototype=new N,d.prototype._create=function(){return new d(this._input,this)},d.prototype._update=function(){this.__set_templated_pattern()},d.prototype.disable=function(x){var y=this._create();return y._disabled[x]=!0,y._update(),y},d.prototype.read_options=function(x){var y=this._create();for(var $ in A)y._disabled[$]=x.templating.indexOf($)===-1;return y._update(),y},d.prototype.exclude=function(x){var y=this._create();return y._excluded[x]=!0,y._update(),y},d.prototype.read=function(){var x="";this._match_pattern?x=this._input.read(this._starting_pattern):x=this._input.read(this._starting_pattern,this.__template_pattern);for(var y=this._read_template();y;)this._match_pattern?y+=this._input.read(this._match_pattern):y+=this._input.readUntil(this.__template_pattern),x+=y,y=this._read_template();return this._until_after&&(x+=this._input.readUntilAfter(this._until_pattern)),x},d.prototype.__set_templated_pattern=function(){var x=[];this._disabled.php||x.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||x.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||x.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||x.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(x.push(this.__patterns.django._starting_pattern.source),x.push(this.__patterns.django_value._starting_pattern.source),x.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||x.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&x.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+x.join("|")+")")},d.prototype._read_template=function(){var x="",y=this._input.peek();if(y==="<"){var $=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&$==="?"&&(x=x||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&$==="%"&&(x=x||this.__patterns.erb.read())}else y==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(x=x||this.__patterns.handlebars_comment.read(),x=x||this.__patterns.handlebars_unescaped.read(),x=x||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(x=x||this.__patterns.django_value.read()),this._excluded.django||(x=x||this.__patterns.django_comment.read(),x=x||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(x=x||this.__patterns.smarty_comment.read(),x=x||this.__patterns.smarty_literal.read(),x=x||this.__patterns.smarty.read()));return x},Ee.exports.TemplatablePattern=d}],Ne={};function pe(Ee){var l=Ne[Ee];if(l!==void 0)return l.exports;var K=Ne[Ee]={exports:{}};return Ie[Ee](K,K.exports,pe),K.exports}var Oe=pe(0);xe=Oe})();var Le=xe;ne=[],se=function(){return{js_beautify:Le}}.apply(it,ne),se!==void 0&&(Bt.exports=se)})()},15342:function(Bt){(function(ne,se){Bt.exports=se()})(typeof self!="undefined"?self:this,function(){return function(it){var ne={};function se(xe){if(ne[xe])return ne[xe].exports;var Le=ne[xe]={i:xe,l:!1,exports:{}};return it[xe].call(Le.exports,Le,Le.exports,se),Le.l=!0,Le.exports}return se.m=it,se.c=ne,se.d=function(xe,Le,Ie){se.o(xe,Le)||Object.defineProperty(xe,Le,{enumerable:!0,get:Ie})},se.r=function(xe){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(xe,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(xe,"__esModule",{value:!0})},se.t=function(xe,Le){if(Le&1&&(xe=se(xe)),Le&8||Le&4&&typeof xe=="object"&&xe&&xe.__esModule)return xe;var Ie=Object.create(null);if(se.r(Ie),Object.defineProperty(Ie,"default",{enumerable:!0,value:xe}),Le&2&&typeof xe!="string")for(var Ne in xe)se.d(Ie,Ne,function(pe){return xe[pe]}.bind(null,Ne));return Ie},se.n=function(xe){var Le=xe&&xe.__esModule?function(){return xe.default}:function(){return xe};return se.d(Le,"a",Le),Le},se.o=function(xe,Le){return Object.prototype.hasOwnProperty.call(xe,Le)},se.p="",se(se.s=1)}([function(it,ne,se){},function(it,ne,se){"use strict";se.r(ne);var xe=se(0),Le=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}(),Ie=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,Le.range(this,h))},D}(),Ne=function D(o,c){this.position=void 0;var h="KaTeX parse error: "+o,p,b=c&&c.loc;if(b&&b.start<=b.end){var S=b.lexer.input;p=b.start;var W=b.end;p===S.length?h+=" at end of input: ":h+=" at position "+(p+1)+": ";var J=S.slice(p,W).replace(/[^]/g,"$&\u0332"),he;p>15?he="\u2026"+S.slice(p-15,p):he=S.slice(0,p);var Re;W+15<S.length?Re=S.slice(W,W+15)+"\u2026":Re=S.slice(W),h+=he+J+Re}var $e=new Error(h);return $e.name="ParseError",$e.__proto__=D.prototype,$e.position=p,$e};Ne.prototype.__proto__=Error.prototype;var pe=Ne,Oe=function(o,c){return o.indexOf(c)!==-1},Ee=function(o,c){return o===void 0?c:o},l=/([A-Z])/g,K=function(o){return o.replace(l,"-$1").toLowerCase()},N={"&":"&",">":">","<":"<",'"':""","'":"'"},A=/[&><"']/g;function d(D){return String(D).replace(A,function(o){return N[o]})}var x=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},y=function(o){var c=x(o);return c.type==="mathord"||c.type==="textord"||c.type==="atom"},$=function(o){if(!o)throw new Error("Expected non-null, but got "+String(o));return o},H=function(o){var c=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(o);return c!=null?c[1]:"_relative"},F={contains:Oe,deflt:Ee,escape:d,hyphenate:K,getBaseElem:x,isCharacterBox:y,protocolFromUrl:H},R=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=F.deflt(c.displayMode,!1),this.output=F.deflt(c.output,"htmlAndMathml"),this.leqno=F.deflt(c.leqno,!1),this.fleqn=F.deflt(c.fleqn,!1),this.throwOnError=F.deflt(c.throwOnError,!0),this.errorColor=F.deflt(c.errorColor,"#cc0000"),this.macros=c.macros||{},this.minRuleThickness=Math.max(0,F.deflt(c.minRuleThickness,0)),this.colorIsTextColor=F.deflt(c.colorIsTextColor,!1),this.strict=F.deflt(c.strict,"warn"),this.trust=F.deflt(c.trust,!1),this.maxSize=Math.max(0,F.deflt(c.maxSize,1/0)),this.maxExpand=Math.max(0,F.deflt(c.maxExpand,1e3))}var o=D.prototype;return o.reportNonstrict=function(h,p,b){var S=this.strict;if(typeof S=="function"&&(S=S(h,p,b)),!(!S||S==="ignore")){if(S===!0||S==="error")throw new pe("LaTeX-incompatible input and strict mode is set to 'error': "+(p+" ["+h+"]"),b);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,b){var S=this.strict;if(typeof S=="function")try{S=S(h,p,b)}catch(W){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=F.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 Be[G[this.id]]},o.sub=function(){return Be[U[this.id]]},o.fracNum=function(){return Be[j[this.id]]},o.fracDen=function(){return Be[Z[this.id]]},o.cramp=function(){return Be[le[this.id]]},o.text=function(){return Be[ee[this.id]]},o.isTight=function(){return this.size>=2},D}(),te=0,C=1,_e=2,ve=3,de=4,we=5,Ce=6,Se=7,Be=[new V(te,0,!1),new V(C,0,!0),new V(_e,1,!1),new V(ve,1,!0),new V(de,2,!1),new V(we,2,!0),new V(Ce,3,!1),new V(Se,3,!0)],G=[de,we,de,we,Ce,Se,Ce,Se],U=[we,we,we,we,Se,Se,Se,Se],j=[_e,ve,de,we,Ce,Se,Ce,Se],Z=[ve,ve,we,we,Se,Se,Se,Se],le=[C,C,ve,ve,we,we,Se,Se],ee=[te,C,_e,ve,_e,ve,_e,ve],E={DISPLAY:Be[te],TEXT:Be[_e],SCRIPT:Be[de],SCRIPTSCRIPT:Be[Ce]},T=[{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 X(D){for(var o=0;o<T.length;o++)for(var c=T[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 ge=[];T.forEach(function(D){return D.blocks.forEach(function(o){return ge.push.apply(ge,o)})});function je(D){for(var o=0;o<ge.length;o+=2)if(D>=ge[o]&&D<=ge[o+1])return!0;return!1}var Qe=80,nt=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"},rt=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"},Gt=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"},ct=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"},st=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=nt(c,Qe);break;case"sqrtSize1":p=rt(c,Qe);break;case"sqrtSize2":p=Gt(c,Qe);break;case"sqrtSize3":p=ct(c,Qe);break;case"sqrtSize4":p=st(c,Qe);break;case"sqrtTall":p=tr(c,Qe,h)}return p},yr={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 F.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(b){return b.toText()};return this.children.map(h).join("")},D}(),qt=function(o){return o.filter(function(c){return c}).join(" ")},Kt=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)}},ke=function(o){var c=document.createElement(o);c.className=qt(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 b=0;b<this.children.length;b++)c.appendChild(this.children[b].toNode());return c},Je=function(o){var c="<"+o;this.classes.length&&(c+=' class="'+F.escape(qt(this.classes))+'"');var h="";for(var p in this.style)this.style.hasOwnProperty(p)&&(h+=F.hyphenate(p)+":"+this.style[p]+";");h&&(c+=' style="'+F.escape(h)+'"');for(var b in this.attributes)this.attributes.hasOwnProperty(b)&&(c+=" "+b+'="'+F.escape(this.attributes[b])+'"');c+=">";for(var S=0;S<this.children.length;S++)c+=this.children[S].toMarkup();return c+="</"+o+">",c},ue=function(){function D(c,h,p,b){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,Kt.call(this,c,p,b),this.children=h||[]}var o=D.prototype;return o.setAttribute=function(h,p){this.attributes[h]=p},o.hasClass=function(h){return F.contains(this.classes,h)},o.toNode=function(){return ke.call(this,"span")},o.toMarkup=function(){return Je.call(this,"span")},D}(),Me=function(){function D(c,h,p,b){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,Kt.call(this,h,b),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 F.contains(this.classes,h)},o.toNode=function(){return ke.call(this,"a")},o.toMarkup=function(){return Je.call(this,"a")},D}(),Ge=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 F.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 b in this.style)this.style.hasOwnProperty(b)&&(p+=F.hyphenate(b)+":"+this.style[b]+";");return p&&(h+=' style="'+F.escape(p)+'"'),h+="'/>",h},D}(),O={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},Q=function(){function D(c,h,p,b,S,W,J,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=b||0,this.skew=S||0,this.width=W||0,this.classes=J||[],this.style=he||{},this.maxFontSize=0;var Re=X(this.text.charCodeAt(0));Re&&this.classes.push(Re+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=O[this.text])}var o=D.prototype;return o.hasClass=function(h){return F.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=qt(this.classes));for(var b in this.style)this.style.hasOwnProperty(b)&&(p=p||document.createElement("span"),p.style[b]=this.style[b]);return p?(p.appendChild(h),p):h},o.toMarkup=function(){var h=!1,p="<span";this.classes.length&&(h=!0,p+=' class="',p+=F.escape(qt(this.classes)),p+='"');var b="";this.italic>0&&(b+="margin-right:"+this.italic+"em;");for(var S in this.style)this.style.hasOwnProperty(S)&&(b+=F.hyphenate(S)+":"+this.style[S]+";");b&&(h=!0,p+=' style="'+F.escape(b)+'"');var W=F.escape(this.text);return h?(p+=">",p+=W,p+="</span>",p):W},D}(),ye=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 b in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,b)&&p.setAttribute(b,this.attributes[b]);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 b=0;b<this.children.length;b++)h+=this.children[b].toMarkup();return h+="</svg>",h},D}(),fe=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",yr[this.pathName]),p},o.toMarkup=function(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+yr[this.pathName]+"'/>"},D}(),Te=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 b in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,b)&&p.setAttribute(b,this.attributes[b]);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 De(D){if(D instanceof Q)return D;throw new Error("Expected symbolNode but got "+String(D)+".")}function We(D){if(D instanceof ue)return D;throw new Error("Expected span<HtmlDomNode> but got "+String(D)+".")}var Ze={"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]}},Ve={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 vt(D,o){Ze[D]=o}function gt(D,o,c){if(!Ze[o])throw new Error("Font metrics not found for font: "+o+".");var h=D.charCodeAt(0),p=Ze[o][h];if(!p&&D[0]in Ke&&(h=Ke[D[0]].charCodeAt(0),p=Ze[o][h]),!p&&c==="text"&&je(h)&&(p=Ze[o][77]),p)return{depth:p[0],height:p[1],italic:p[2],skew:p[3],width:p[4]}}var at={};function mt(D){var o;if(D>=5?o=0:D>=3?o=1:o=2,!at[o]){var c=at[o]={cssEmPerMu:Ve.quad[o]/18};for(var h in Ve)Ve.hasOwnProperty(h)&&(c[h]=Ve[h][o])}return at[o]}var wt={bin:1,close:1,inner:1,open:1,punct:1,rel:1},ft={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},Dt={math:{},text:{}},yt=Dt;function _(D,o,c,h,p,b){Dt[D][p]={font:o,group:c,replace:h},b&&h&&(Dt[D][h]=Dt[D][p])}var w="math",Ye="text",I="main",re="ams",zt="accent-token",ce="bin",Ae="close",Fe="inner",B="mathord",q="op-token",oe="open",be="punct",L="rel",dt="spacing",ae="textord";_(w,I,L,"\u2261","\\equiv",!0),_(w,I,L,"\u227A","\\prec",!0),_(w,I,L,"\u227B","\\succ",!0),_(w,I,L,"\u223C","\\sim",!0),_(w,I,L,"\u22A5","\\perp"),_(w,I,L,"\u2AAF","\\preceq",!0),_(w,I,L,"\u2AB0","\\succeq",!0),_(w,I,L,"\u2243","\\simeq",!0),_(w,I,L,"\u2223","\\mid",!0),_(w,I,L,"\u226A","\\ll",!0),_(w,I,L,"\u226B","\\gg",!0),_(w,I,L,"\u224D","\\asymp",!0),_(w,I,L,"\u2225","\\parallel"),_(w,I,L,"\u22C8","\\bowtie",!0),_(w,I,L,"\u2323","\\smile",!0),_(w,I,L,"\u2291","\\sqsubseteq",!0),_(w,I,L,"\u2292","\\sqsupseteq",!0),_(w,I,L,"\u2250","\\doteq",!0),_(w,I,L,"\u2322","\\frown",!0),_(w,I,L,"\u220B","\\ni",!0),_(w,I,L,"\u221D","\\propto",!0),_(w,I,L,"\u22A2","\\vdash",!0),_(w,I,L,"\u22A3","\\dashv",!0),_(w,I,L,"\u220B","\\owns"),_(w,I,be,".","\\ldotp"),_(w,I,be,"\u22C5","\\cdotp"),_(w,I,ae,"#","\\#"),_(Ye,I,ae,"#","\\#"),_(w,I,ae,"&","\\&"),_(Ye,I,ae,"&","\\&"),_(w,I,ae,"\u2135","\\aleph",!0),_(w,I,ae,"\u2200","\\forall",!0),_(w,I,ae,"\u210F","\\hbar",!0),_(w,I,ae,"\u2203","\\exists",!0),_(w,I,ae,"\u2207","\\nabla",!0),_(w,I,ae,"\u266D","\\flat",!0),_(w,I,ae,"\u2113","\\ell",!0),_(w,I,ae,"\u266E","\\natural",!0),_(w,I,ae,"\u2663","\\clubsuit",!0),_(w,I,ae,"\u2118","\\wp",!0),_(w,I,ae,"\u266F","\\sharp",!0),_(w,I,ae,"\u2662","\\diamondsuit",!0),_(w,I,ae,"\u211C","\\Re",!0),_(w,I,ae,"\u2661","\\heartsuit",!0),_(w,I,ae,"\u2111","\\Im",!0),_(w,I,ae,"\u2660","\\spadesuit",!0),_(Ye,I,ae,"\xA7","\\S",!0),_(Ye,I,ae,"\xB6","\\P",!0),_(w,I,ae,"\u2020","\\dag"),_(Ye,I,ae,"\u2020","\\dag"),_(Ye,I,ae,"\u2020","\\textdagger"),_(w,I,ae,"\u2021","\\ddag"),_(Ye,I,ae,"\u2021","\\ddag"),_(Ye,I,ae,"\u2021","\\textdaggerdbl"),_(w,I,Ae,"\u23B1","\\rmoustache",!0),_(w,I,oe,"\u23B0","\\lmoustache",!0),_(w,I,Ae,"\u27EF","\\rgroup",!0),_(w,I,oe,"\u27EE","\\lgroup",!0),_(w,I,ce,"\u2213","\\mp",!0),_(w,I,ce,"\u2296","\\ominus",!0),_(w,I,ce,"\u228E","\\uplus",!0),_(w,I,ce,"\u2293","\\sqcap",!0),_(w,I,ce,"\u2217","\\ast"),_(w,I,ce,"\u2294","\\sqcup",!0),_(w,I,ce,"\u25EF","\\bigcirc"),_(w,I,ce,"\u2219","\\bullet"),_(w,I,ce,"\u2021","\\ddagger"),_(w,I,ce,"\u2240","\\wr",!0),_(w,I,ce,"\u2A3F","\\amalg"),_(w,I,ce,"&","\\And"),_(w,I,L,"\u27F5","\\longleftarrow",!0),_(w,I,L,"\u21D0","\\Leftarrow",!0),_(w,I,L,"\u27F8","\\Longleftarrow",!0),_(w,I,L,"\u27F6","\\longrightarrow",!0),_(w,I,L,"\u21D2","\\Rightarrow",!0),_(w,I,L,"\u27F9","\\Longrightarrow",!0),_(w,I,L,"\u2194","\\leftrightarrow",!0),_(w,I,L,"\u27F7","\\longleftrightarrow",!0),_(w,I,L,"\u21D4","\\Leftrightarrow",!0),_(w,I,L,"\u27FA","\\Longleftrightarrow",!0),_(w,I,L,"\u21A6","\\mapsto",!0),_(w,I,L,"\u27FC","\\longmapsto",!0),_(w,I,L,"\u2197","\\nearrow",!0),_(w,I,L,"\u21A9","\\hookleftarrow",!0),_(w,I,L,"\u21AA","\\hookrightarrow",!0),_(w,I,L,"\u2198","\\searrow",!0),_(w,I,L,"\u21BC","\\leftharpoonup",!0),_(w,I,L,"\u21C0","\\rightharpoonup",!0),_(w,I,L,"\u2199","\\swarrow",!0),_(w,I,L,"\u21BD","\\leftharpoondown",!0),_(w,I,L,"\u21C1","\\rightharpoondown",!0),_(w,I,L,"\u2196","\\nwarrow",!0),_(w,I,L,"\u21CC","\\rightleftharpoons",!0),_(w,re,L,"\u226E","\\nless",!0),_(w,re,L,"\uE010","\\@nleqslant"),_(w,re,L,"\uE011","\\@nleqq"),_(w,re,L,"\u2A87","\\lneq",!0),_(w,re,L,"\u2268","\\lneqq",!0),_(w,re,L,"\uE00C","\\@lvertneqq"),_(w,re,L,"\u22E6","\\lnsim",!0),_(w,re,L,"\u2A89","\\lnapprox",!0),_(w,re,L,"\u2280","\\nprec",!0),_(w,re,L,"\u22E0","\\npreceq",!0),_(w,re,L,"\u22E8","\\precnsim",!0),_(w,re,L,"\u2AB9","\\precnapprox",!0),_(w,re,L,"\u2241","\\nsim",!0),_(w,re,L,"\uE006","\\@nshortmid"),_(w,re,L,"\u2224","\\nmid",!0),_(w,re,L,"\u22AC","\\nvdash",!0),_(w,re,L,"\u22AD","\\nvDash",!0),_(w,re,L,"\u22EA","\\ntriangleleft"),_(w,re,L,"\u22EC","\\ntrianglelefteq",!0),_(w,re,L,"\u228A","\\subsetneq",!0),_(w,re,L,"\uE01A","\\@varsubsetneq"),_(w,re,L,"\u2ACB","\\subsetneqq",!0),_(w,re,L,"\uE017","\\@varsubsetneqq"),_(w,re,L,"\u226F","\\ngtr",!0),_(w,re,L,"\uE00F","\\@ngeqslant"),_(w,re,L,"\uE00E","\\@ngeqq"),_(w,re,L,"\u2A88","\\gneq",!0),_(w,re,L,"\u2269","\\gneqq",!0),_(w,re,L,"\uE00D","\\@gvertneqq"),_(w,re,L,"\u22E7","\\gnsim",!0),_(w,re,L,"\u2A8A","\\gnapprox",!0),_(w,re,L,"\u2281","\\nsucc",!0),_(w,re,L,"\u22E1","\\nsucceq",!0),_(w,re,L,"\u22E9","\\succnsim",!0),_(w,re,L,"\u2ABA","\\succnapprox",!0),_(w,re,L,"\u2246","\\ncong",!0),_(w,re,L,"\uE007","\\@nshortparallel"),_(w,re,L,"\u2226","\\nparallel",!0),_(w,re,L,"\u22AF","\\nVDash",!0),_(w,re,L,"\u22EB","\\ntriangleright"),_(w,re,L,"\u22ED","\\ntrianglerighteq",!0),_(w,re,L,"\uE018","\\@nsupseteqq"),_(w,re,L,"\u228B","\\supsetneq",!0),_(w,re,L,"\uE01B","\\@varsupsetneq"),_(w,re,L,"\u2ACC","\\supsetneqq",!0),_(w,re,L,"\uE019","\\@varsupsetneqq"),_(w,re,L,"\u22AE","\\nVdash",!0),_(w,re,L,"\u2AB5","\\precneqq",!0),_(w,re,L,"\u2AB6","\\succneqq",!0),_(w,re,L,"\uE016","\\@nsubseteqq"),_(w,re,ce,"\u22B4","\\unlhd"),_(w,re,ce,"\u22B5","\\unrhd"),_(w,re,L,"\u219A","\\nleftarrow",!0),_(w,re,L,"\u219B","\\nrightarrow",!0),_(w,re,L,"\u21CD","\\nLeftarrow",!0),_(w,re,L,"\u21CF","\\nRightarrow",!0),_(w,re,L,"\u21AE","\\nleftrightarrow",!0),_(w,re,L,"\u21CE","\\nLeftrightarrow",!0),_(w,re,L,"\u25B3","\\vartriangle"),_(w,re,ae,"\u210F","\\hslash"),_(w,re,ae,"\u25BD","\\triangledown"),_(w,re,ae,"\u25CA","\\lozenge"),_(w,re,ae,"\u24C8","\\circledS"),_(w,re,ae,"\xAE","\\circledR"),_(Ye,re,ae,"\xAE","\\circledR"),_(w,re,ae,"\u2221","\\measuredangle",!0),_(w,re,ae,"\u2204","\\nexists"),_(w,re,ae,"\u2127","\\mho"),_(w,re,ae,"\u2132","\\Finv",!0),_(w,re,ae,"\u2141","\\Game",!0),_(w,re,ae,"\u2035","\\backprime"),_(w,re,ae,"\u25B2","\\blacktriangle"),_(w,re,ae,"\u25BC","\\blacktriangledown"),_(w,re,ae,"\u25A0","\\blacksquare"),_(w,re,ae,"\u29EB","\\blacklozenge"),_(w,re,ae,"\u2605","\\bigstar"),_(w,re,ae,"\u2222","\\sphericalangle",!0),_(w,re,ae,"\u2201","\\complement",!0),_(w,re,ae,"\xF0","\\eth",!0),_(w,re,ae,"\u2571","\\diagup"),_(w,re,ae,"\u2572","\\diagdown"),_(w,re,ae,"\u25A1","\\square"),_(w,re,ae,"\u25A1","\\Box"),_(w,re,ae,"\u25CA","\\Diamond"),_(w,re,ae,"\xA5","\\yen",!0),_(Ye,re,ae,"\xA5","\\yen",!0),_(w,re,ae,"\u2713","\\checkmark",!0),_(Ye,re,ae,"\u2713","\\checkmark"),_(w,re,ae,"\u2136","\\beth",!0),_(w,re,ae,"\u2138","\\daleth",!0),_(w,re,ae,"\u2137","\\gimel",!0),_(w,re,ae,"\u03DD","\\digamma",!0),_(w,re,ae,"\u03F0","\\varkappa"),_(w,re,oe,"\u250C","\\ulcorner",!0),_(w,re,Ae,"\u2510","\\urcorner",!0),_(w,re,oe,"\u2514","\\llcorner",!0),_(w,re,Ae,"\u2518","\\lrcorner",!0),_(w,re,L,"\u2266","\\leqq",!0),_(w,re,L,"\u2A7D","\\leqslant",!0),_(w,re,L,"\u2A95","\\eqslantless",!0),_(w,re,L,"\u2272","\\lesssim",!0),_(w,re,L,"\u2A85","\\lessapprox",!0),_(w,re,L,"\u224A","\\approxeq",!0),_(w,re,ce,"\u22D6","\\lessdot"),_(w,re,L,"\u22D8","\\lll",!0),_(w,re,L,"\u2276","\\lessgtr",!0),_(w,re,L,"\u22DA","\\lesseqgtr",!0),_(w,re,L,"\u2A8B","\\lesseqqgtr",!0),_(w,re,L,"\u2251","\\doteqdot"),_(w,re,L,"\u2253","\\risingdotseq",!0),_(w,re,L,"\u2252","\\fallingdotseq",!0),_(w,re,L,"\u223D","\\backsim",!0),_(w,re,L,"\u22CD","\\backsimeq",!0),_(w,re,L,"\u2AC5","\\subseteqq",!0),_(w,re,L,"\u22D0","\\Subset",!0),_(w,re,L,"\u228F","\\sqsubset",!0),_(w,re,L,"\u227C","\\preccurlyeq",!0),_(w,re,L,"\u22DE","\\curlyeqprec",!0),_(w,re,L,"\u227E","\\precsim",!0),_(w,re,L,"\u2AB7","\\precapprox",!0),_(w,re,L,"\u22B2","\\vartriangleleft"),_(w,re,L,"\u22B4","\\trianglelefteq"),_(w,re,L,"\u22A8","\\vDash",!0),_(w,re,L,"\u22AA","\\Vvdash",!0),_(w,re,L,"\u2323","\\smallsmile"),_(w,re,L,"\u2322","\\smallfrown"),_(w,re,L,"\u224F","\\bumpeq",!0),_(w,re,L,"\u224E","\\Bumpeq",!0),_(w,re,L,"\u2267","\\geqq",!0),_(w,re,L,"\u2A7E","\\geqslant",!0),_(w,re,L,"\u2A96","\\eqslantgtr",!0),_(w,re,L,"\u2273","\\gtrsim",!0),_(w,re,L,"\u2A86","\\gtrapprox",!0),_(w,re,ce,"\u22D7","\\gtrdot"),_(w,re,L,"\u22D9","\\ggg",!0),_(w,re,L,"\u2277","\\gtrless",!0),_(w,re,L,"\u22DB","\\gtreqless",!0),_(w,re,L,"\u2A8C","\\gtreqqless",!0),_(w,re,L,"\u2256","\\eqcirc",!0),_(w,re,L,"\u2257","\\circeq",!0),_(w,re,L,"\u225C","\\triangleq",!0),_(w,re,L,"\u223C","\\thicksim"),_(w,re,L,"\u2248","\\thickapprox"),_(w,re,L,"\u2AC6","\\supseteqq",!0),_(w,re,L,"\u22D1","\\Supset",!0),_(w,re,L,"\u2290","\\sqsupset",!0),_(w,re,L,"\u227D","\\succcurlyeq",!0),_(w,re,L,"\u22DF","\\curlyeqsucc",!0),_(w,re,L,"\u227F","\\succsim",!0),_(w,re,L,"\u2AB8","\\succapprox",!0),_(w,re,L,"\u22B3","\\vartriangleright"),_(w,re,L,"\u22B5","\\trianglerighteq"),_(w,re,L,"\u22A9","\\Vdash",!0),_(w,re,L,"\u2223","\\shortmid"),_(w,re,L,"\u2225","\\shortparallel"),_(w,re,L,"\u226C","\\between",!0),_(w,re,L,"\u22D4","\\pitchfork",!0),_(w,re,L,"\u221D","\\varpropto"),_(w,re,L,"\u25C0","\\blacktriangleleft"),_(w,re,L,"\u2234","\\therefore",!0),_(w,re,L,"\u220D","\\backepsilon"),_(w,re,L,"\u25B6","\\blacktriangleright"),_(w,re,L,"\u2235","\\because",!0),_(w,re,L,"\u22D8","\\llless"),_(w,re,L,"\u22D9","\\gggtr"),_(w,re,ce,"\u22B2","\\lhd"),_(w,re,ce,"\u22B3","\\rhd"),_(w,re,L,"\u2242","\\eqsim",!0),_(w,I,L,"\u22C8","\\Join"),_(w,re,L,"\u2251","\\Doteq",!0),_(w,re,ce,"\u2214","\\dotplus",!0),_(w,re,ce,"\u2216","\\smallsetminus"),_(w,re,ce,"\u22D2","\\Cap",!0),_(w,re,ce,"\u22D3","\\Cup",!0),_(w,re,ce,"\u2A5E","\\doublebarwedge",!0),_(w,re,ce,"\u229F","\\boxminus",!0),_(w,re,ce,"\u229E","\\boxplus",!0),_(w,re,ce,"\u22C7","\\divideontimes",!0),_(w,re,ce,"\u22C9","\\ltimes",!0),_(w,re,ce,"\u22CA","\\rtimes",!0),_(w,re,ce,"\u22CB","\\leftthreetimes",!0),_(w,re,ce,"\u22CC","\\rightthreetimes",!0),_(w,re,ce,"\u22CF","\\curlywedge",!0),_(w,re,ce,"\u22CE","\\curlyvee",!0),_(w,re,ce,"\u229D","\\circleddash",!0),_(w,re,ce,"\u229B","\\circledast",!0),_(w,re,ce,"\u22C5","\\centerdot"),_(w,re,ce,"\u22BA","\\intercal",!0),_(w,re,ce,"\u22D2","\\doublecap"),_(w,re,ce,"\u22D3","\\doublecup"),_(w,re,ce,"\u22A0","\\boxtimes",!0),_(w,re,L,"\u21E2","\\dashrightarrow",!0),_(w,re,L,"\u21E0","\\dashleftarrow",!0),_(w,re,L,"\u21C7","\\leftleftarrows",!0),_(w,re,L,"\u21C6","\\leftrightarrows",!0),_(w,re,L,"\u21DA","\\Lleftarrow",!0),_(w,re,L,"\u219E","\\twoheadleftarrow",!0),_(w,re,L,"\u21A2","\\leftarrowtail",!0),_(w,re,L,"\u21AB","\\looparrowleft",!0),_(w,re,L,"\u21CB","\\leftrightharpoons",!0),_(w,re,L,"\u21B6","\\curvearrowleft",!0),_(w,re,L,"\u21BA","\\circlearrowleft",!0),_(w,re,L,"\u21B0","\\Lsh",!0),_(w,re,L,"\u21C8","\\upuparrows",!0),_(w,re,L,"\u21BF","\\upharpoonleft",!0),_(w,re,L,"\u21C3","\\downharpoonleft",!0),_(w,re,L,"\u22B8","\\multimap",!0),_(w,re,L,"\u21AD","\\leftrightsquigarrow",!0),_(w,re,L,"\u21C9","\\rightrightarrows",!0),_(w,re,L,"\u21C4","\\rightleftarrows",!0),_(w,re,L,"\u21A0","\\twoheadrightarrow",!0),_(w,re,L,"\u21A3","\\rightarrowtail",!0),_(w,re,L,"\u21AC","\\looparrowright",!0),_(w,re,L,"\u21B7","\\curvearrowright",!0),_(w,re,L,"\u21BB","\\circlearrowright",!0),_(w,re,L,"\u21B1","\\Rsh",!0),_(w,re,L,"\u21CA","\\downdownarrows",!0),_(w,re,L,"\u21BE","\\upharpoonright",!0),_(w,re,L,"\u21C2","\\downharpoonright",!0),_(w,re,L,"\u21DD","\\rightsquigarrow",!0),_(w,re,L,"\u21DD","\\leadsto"),_(w,re,L,"\u21DB","\\Rrightarrow",!0),_(w,re,L,"\u21BE","\\restriction"),_(w,I,ae,"\u2018","`"),_(w,I,ae,"$","\\$"),_(Ye,I,ae,"$","\\$"),_(Ye,I,ae,"$","\\textdollar"),_(w,I,ae,"%","\\%"),_(Ye,I,ae,"%","\\%"),_(w,I,ae,"_","\\_"),_(Ye,I,ae,"_","\\_"),_(Ye,I,ae,"_","\\textunderscore"),_(w,I,ae,"\u2220","\\angle",!0),_(w,I,ae,"\u221E","\\infty",!0),_(w,I,ae,"\u2032","\\prime"),_(w,I,ae,"\u25B3","\\triangle"),_(w,I,ae,"\u0393","\\Gamma",!0),_(w,I,ae,"\u0394","\\Delta",!0),_(w,I,ae,"\u0398","\\Theta",!0),_(w,I,ae,"\u039B","\\Lambda",!0),_(w,I,ae,"\u039E","\\Xi",!0),_(w,I,ae,"\u03A0","\\Pi",!0),_(w,I,ae,"\u03A3","\\Sigma",!0),_(w,I,ae,"\u03A5","\\Upsilon",!0),_(w,I,ae,"\u03A6","\\Phi",!0),_(w,I,ae,"\u03A8","\\Psi",!0),_(w,I,ae,"\u03A9","\\Omega",!0),_(w,I,ae,"A","\u0391"),_(w,I,ae,"B","\u0392"),_(w,I,ae,"E","\u0395"),_(w,I,ae,"Z","\u0396"),_(w,I,ae,"H","\u0397"),_(w,I,ae,"I","\u0399"),_(w,I,ae,"K","\u039A"),_(w,I,ae,"M","\u039C"),_(w,I,ae,"N","\u039D"),_(w,I,ae,"O","\u039F"),_(w,I,ae,"P","\u03A1"),_(w,I,ae,"T","\u03A4"),_(w,I,ae,"X","\u03A7"),_(w,I,ae,"\xAC","\\neg",!0),_(w,I,ae,"\xAC","\\lnot"),_(w,I,ae,"\u22A4","\\top"),_(w,I,ae,"\u22A5","\\bot"),_(w,I,ae,"\u2205","\\emptyset"),_(w,re,ae,"\u2205","\\varnothing"),_(w,I,B,"\u03B1","\\alpha",!0),_(w,I,B,"\u03B2","\\beta",!0),_(w,I,B,"\u03B3","\\gamma",!0),_(w,I,B,"\u03B4","\\delta",!0),_(w,I,B,"\u03F5","\\epsilon",!0),_(w,I,B,"\u03B6","\\zeta",!0),_(w,I,B,"\u03B7","\\eta",!0),_(w,I,B,"\u03B8","\\theta",!0),_(w,I,B,"\u03B9","\\iota",!0),_(w,I,B,"\u03BA","\\kappa",!0),_(w,I,B,"\u03BB","\\lambda",!0),_(w,I,B,"\u03BC","\\mu",!0),_(w,I,B,"\u03BD","\\nu",!0),_(w,I,B,"\u03BE","\\xi",!0),_(w,I,B,"\u03BF","\\omicron",!0),_(w,I,B,"\u03C0","\\pi",!0),_(w,I,B,"\u03C1","\\rho",!0),_(w,I,B,"\u03C3","\\sigma",!0),_(w,I,B,"\u03C4","\\tau",!0),_(w,I,B,"\u03C5","\\upsilon",!0),_(w,I,B,"\u03D5","\\phi",!0),_(w,I,B,"\u03C7","\\chi",!0),_(w,I,B,"\u03C8","\\psi",!0),_(w,I,B,"\u03C9","\\omega",!0),_(w,I,B,"\u03B5","\\varepsilon",!0),_(w,I,B,"\u03D1","\\vartheta",!0),_(w,I,B,"\u03D6","\\varpi",!0),_(w,I,B,"\u03F1","\\varrho",!0),_(w,I,B,"\u03C2","\\varsigma",!0),_(w,I,B,"\u03C6","\\varphi",!0),_(w,I,ce,"\u2217","*"),_(w,I,ce,"+","+"),_(w,I,ce,"\u2212","-"),_(w,I,ce,"\u22C5","\\cdot",!0),_(w,I,ce,"\u2218","\\circ"),_(w,I,ce,"\xF7","\\div",!0),_(w,I,ce,"\xB1","\\pm",!0),_(w,I,ce,"\xD7","\\times",!0),_(w,I,ce,"\u2229","\\cap",!0),_(w,I,ce,"\u222A","\\cup",!0),_(w,I,ce,"\u2216","\\setminus"),_(w,I,ce,"\u2227","\\land"),_(w,I,ce,"\u2228","\\lor"),_(w,I,ce,"\u2227","\\wedge",!0),_(w,I,ce,"\u2228","\\vee",!0),_(w,I,ae,"\u221A","\\surd"),_(w,I,oe,"(","("),_(w,I,oe,"[","["),_(w,I,oe,"\u27E8","\\langle",!0),_(w,I,oe,"\u2223","\\lvert"),_(w,I,oe,"\u2225","\\lVert"),_(w,I,Ae,")",")"),_(w,I,Ae,"]","]"),_(w,I,Ae,"?","?"),_(w,I,Ae,"!","!"),_(w,I,Ae,"\u27E9","\\rangle",!0),_(w,I,Ae,"\u2223","\\rvert"),_(w,I,Ae,"\u2225","\\rVert"),_(w,I,L,"=","="),_(w,I,L,"<","<"),_(w,I,L,">",">"),_(w,I,L,":",":"),_(w,I,L,"\u2248","\\approx",!0),_(w,I,L,"\u2245","\\cong",!0),_(w,I,L,"\u2265","\\ge"),_(w,I,L,"\u2265","\\geq",!0),_(w,I,L,"\u2190","\\gets"),_(w,I,L,">","\\gt"),_(w,I,L,"\u2208","\\in",!0),_(w,I,L,"\uE020","\\@not"),_(w,I,L,"\u2282","\\subset",!0),_(w,I,L,"\u2283","\\supset",!0),_(w,I,L,"\u2286","\\subseteq",!0),_(w,I,L,"\u2287","\\supseteq",!0),_(w,re,L,"\u2288","\\nsubseteq",!0),_(w,re,L,"\u2289","\\nsupseteq",!0),_(w,I,L,"\u22A8","\\models"),_(w,I,L,"\u2190","\\leftarrow",!0),_(w,I,L,"\u2264","\\le"),_(w,I,L,"\u2264","\\leq",!0),_(w,I,L,"<","\\lt"),_(w,I,L,"\u2192","\\rightarrow",!0),_(w,I,L,"\u2192","\\to"),_(w,re,L,"\u2271","\\ngeq",!0),_(w,re,L,"\u2270","\\nleq",!0),_(w,I,dt,"\xA0","\\ "),_(w,I,dt,"\xA0","~"),_(w,I,dt,"\xA0","\\space"),_(w,I,dt,"\xA0","\\nobreakspace"),_(Ye,I,dt,"\xA0","\\ "),_(Ye,I,dt,"\xA0","~"),_(Ye,I,dt,"\xA0","\\space"),_(Ye,I,dt,"\xA0","\\nobreakspace"),_(w,I,dt,null,"\\nobreak"),_(w,I,dt,null,"\\allowbreak"),_(w,I,be,",",","),_(w,I,be,";",";"),_(w,re,ce,"\u22BC","\\barwedge",!0),_(w,re,ce,"\u22BB","\\veebar",!0),_(w,I,ce,"\u2299","\\odot",!0),_(w,I,ce,"\u2295","\\oplus",!0),_(w,I,ce,"\u2297","\\otimes",!0),_(w,I,ae,"\u2202","\\partial",!0),_(w,I,ce,"\u2298","\\oslash",!0),_(w,re,ce,"\u229A","\\circledcirc",!0),_(w,re,ce,"\u22A1","\\boxdot",!0),_(w,I,ce,"\u25B3","\\bigtriangleup"),_(w,I,ce,"\u25BD","\\bigtriangledown"),_(w,I,ce,"\u2020","\\dagger"),_(w,I,ce,"\u22C4","\\diamond"),_(w,I,ce,"\u22C6","\\star"),_(w,I,ce,"\u25C3","\\triangleleft"),_(w,I,ce,"\u25B9","\\triangleright"),_(w,I,oe,"{","\\{"),_(Ye,I,ae,"{","\\{"),_(Ye,I,ae,"{","\\textbraceleft"),_(w,I,Ae,"}","\\}"),_(Ye,I,ae,"}","\\}"),_(Ye,I,ae,"}","\\textbraceright"),_(w,I,oe,"{","\\lbrace"),_(w,I,Ae,"}","\\rbrace"),_(w,I,oe,"[","\\lbrack"),_(Ye,I,ae,"[","\\lbrack"),_(w,I,Ae,"]","\\rbrack"),_(Ye,I,ae,"]","\\rbrack"),_(w,I,oe,"(","\\lparen"),_(w,I,Ae,")","\\rparen"),_(Ye,I,ae,"<","\\textless"),_(Ye,I,ae,">","\\textgreater"),_(w,I,oe,"\u230A","\\lfloor",!0),_(w,I,Ae,"\u230B","\\rfloor",!0),_(w,I,oe,"\u2308","\\lceil",!0),_(w,I,Ae,"\u2309","\\rceil",!0),_(w,I,ae,"\\","\\backslash"),_(w,I,ae,"\u2223","|"),_(w,I,ae,"\u2223","\\vert"),_(Ye,I,ae,"|","\\textbar"),_(w,I,ae,"\u2225","\\|"),_(w,I,ae,"\u2225","\\Vert"),_(Ye,I,ae,"\u2225","\\textbardbl"),_(Ye,I,ae,"~","\\textasciitilde"),_(Ye,I,ae,"\\","\\textbackslash"),_(Ye,I,ae,"^","\\textasciicircum"),_(w,I,L,"\u2191","\\uparrow",!0),_(w,I,L,"\u21D1","\\Uparrow",!0),_(w,I,L,"\u2193","\\downarrow",!0),_(w,I,L,"\u21D3","\\Downarrow",!0),_(w,I,L,"\u2195","\\updownarrow",!0),_(w,I,L,"\u21D5","\\Updownarrow",!0),_(w,I,q,"\u2210","\\coprod"),_(w,I,q,"\u22C1","\\bigvee"),_(w,I,q,"\u22C0","\\bigwedge"),_(w,I,q,"\u2A04","\\biguplus"),_(w,I,q,"\u22C2","\\bigcap"),_(w,I,q,"\u22C3","\\bigcup"),_(w,I,q,"\u222B","\\int"),_(w,I,q,"\u222B","\\intop"),_(w,I,q,"\u222C","\\iint"),_(w,I,q,"\u222D","\\iiint"),_(w,I,q,"\u220F","\\prod"),_(w,I,q,"\u2211","\\sum"),_(w,I,q,"\u2A02","\\bigotimes"),_(w,I,q,"\u2A01","\\bigoplus"),_(w,I,q,"\u2A00","\\bigodot"),_(w,I,q,"\u222E","\\oint"),_(w,I,q,"\u222F","\\oiint"),_(w,I,q,"\u2230","\\oiiint"),_(w,I,q,"\u2A06","\\bigsqcup"),_(w,I,q,"\u222B","\\smallint"),_(Ye,I,Fe,"\u2026","\\textellipsis"),_(w,I,Fe,"\u2026","\\mathellipsis"),_(Ye,I,Fe,"\u2026","\\ldots",!0),_(w,I,Fe,"\u2026","\\ldots",!0),_(w,I,Fe,"\u22EF","\\@cdots",!0),_(w,I,Fe,"\u22F1","\\ddots",!0),_(w,I,ae,"\u22EE","\\varvdots"),_(w,I,zt,"\u02CA","\\acute"),_(w,I,zt,"\u02CB","\\grave"),_(w,I,zt,"\xA8","\\ddot"),_(w,I,zt,"~","\\tilde"),_(w,I,zt,"\u02C9","\\bar"),_(w,I,zt,"\u02D8","\\breve"),_(w,I,zt,"\u02C7","\\check"),_(w,I,zt,"^","\\hat"),_(w,I,zt,"\u20D7","\\vec"),_(w,I,zt,"\u02D9","\\dot"),_(w,I,zt,"\u02DA","\\mathring"),_(w,I,B,"\u0131","\\imath",!0),_(w,I,B,"\u0237","\\jmath",!0),_(Ye,I,ae,"\u0131","\\i",!0),_(Ye,I,ae,"\u0237","\\j",!0),_(Ye,I,ae,"\xDF","\\ss",!0),_(Ye,I,ae,"\xE6","\\ae",!0),_(Ye,I,ae,"\xE6","\\ae",!0),_(Ye,I,ae,"\u0153","\\oe",!0),_(Ye,I,ae,"\xF8","\\o",!0),_(Ye,I,ae,"\xC6","\\AE",!0),_(Ye,I,ae,"\u0152","\\OE",!0),_(Ye,I,ae,"\xD8","\\O",!0),_(Ye,I,zt,"\u02CA","\\'"),_(Ye,I,zt,"\u02CB","\\`"),_(Ye,I,zt,"\u02C6","\\^"),_(Ye,I,zt,"\u02DC","\\~"),_(Ye,I,zt,"\u02C9","\\="),_(Ye,I,zt,"\u02D8","\\u"),_(Ye,I,zt,"\u02D9","\\."),_(Ye,I,zt,"\u02DA","\\r"),_(Ye,I,zt,"\u02C7","\\v"),_(Ye,I,zt,"\xA8",'\\"'),_(Ye,I,zt,"\u02DD","\\H"),_(Ye,I,zt,"\u25EF","\\textcircled");var At={"--":!0,"---":!0,"``":!0,"''":!0};_(Ye,I,ae,"\u2013","--"),_(Ye,I,ae,"\u2013","\\textendash"),_(Ye,I,ae,"\u2014","---"),_(Ye,I,ae,"\u2014","\\textemdash"),_(Ye,I,ae,"\u2018","`"),_(Ye,I,ae,"\u2018","\\textquoteleft"),_(Ye,I,ae,"\u2019","'"),_(Ye,I,ae,"\u2019","\\textquoteright"),_(Ye,I,ae,"\u201C","``"),_(Ye,I,ae,"\u201C","\\textquotedblleft"),_(Ye,I,ae,"\u201D","''"),_(Ye,I,ae,"\u201D","\\textquotedblright"),_(w,I,ae,"\xB0","\\degree",!0),_(Ye,I,ae,"\xB0","\\degree"),_(Ye,I,ae,"\xB0","\\textdegree",!0),_(w,I,B,"\xA3","\\pounds"),_(w,I,B,"\xA3","\\mathsterling",!0),_(Ye,I,B,"\xA3","\\pounds"),_(Ye,I,B,"\xA3","\\textsterling",!0),_(w,re,ae,"\u2720","\\maltese"),_(Ye,re,ae,"\u2720","\\maltese"),_(Ye,I,dt,"\xA0","\\ "),_(Ye,I,dt,"\xA0"," "),_(Ye,I,dt,"\xA0","~");for(var Ct='0123456789/@."',Mt=0;Mt<Ct.length;Mt++){var br=Ct.charAt(Mt);_(w,I,ae,br,br)}for(var Ht='0123456789!@*()-=+[]<>|";:?/.,',Ot=0;Ot<Ht.length;Ot++){var Ar=Ht.charAt(Ot);_(Ye,I,ae,Ar,Ar)}for(var Br="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Gr=0;Gr<Br.length;Gr++){var zr=Br.charAt(Gr);_(w,I,B,zr,zr),_(Ye,I,ae,zr,zr)}_(w,re,ae,"C","\u2102"),_(Ye,re,ae,"C","\u2102"),_(w,re,ae,"H","\u210D"),_(Ye,re,ae,"H","\u210D"),_(w,re,ae,"N","\u2115"),_(Ye,re,ae,"N","\u2115"),_(w,re,ae,"P","\u2119"),_(Ye,re,ae,"P","\u2119"),_(w,re,ae,"Q","\u211A"),_(Ye,re,ae,"Q","\u211A"),_(w,re,ae,"R","\u211D"),_(Ye,re,ae,"R","\u211D"),_(w,re,ae,"Z","\u2124"),_(Ye,re,ae,"Z","\u2124"),_(w,I,B,"h","\u210E"),_(Ye,I,B,"h","\u210E");for(var Tt="",jt=0;jt<Br.length;jt++){var pr=Br.charAt(jt);Tt=String.fromCharCode(55349,56320+jt),_(w,I,B,pr,Tt),_(Ye,I,ae,pr,Tt),Tt=String.fromCharCode(55349,56372+jt),_(w,I,B,pr,Tt),_(Ye,I,ae,pr,Tt),Tt=String.fromCharCode(55349,56424+jt),_(w,I,B,pr,Tt),_(Ye,I,ae,pr,Tt),Tt=String.fromCharCode(55349,56580+jt),_(w,I,B,pr,Tt),_(Ye,I,ae,pr,Tt),Tt=String.fromCharCode(55349,56736+jt),_(w,I,B,pr,Tt),_(Ye,I,ae,pr,Tt),Tt=String.fromCharCode(55349,56788+jt),_(w,I,B,pr,Tt),_(Ye,I,ae,pr,Tt),Tt=String.fromCharCode(55349,56840+jt),_(w,I,B,pr,Tt),_(Ye,I,ae,pr,Tt),Tt=String.fromCharCode(55349,56944+jt),_(w,I,B,pr,Tt),_(Ye,I,ae,pr,Tt),jt<26&&(Tt=String.fromCharCode(55349,56632+jt),_(w,I,B,pr,Tt),_(Ye,I,ae,pr,Tt),Tt=String.fromCharCode(55349,56476+jt),_(w,I,B,pr,Tt),_(Ye,I,ae,pr,Tt))}Tt="\u{1D55C}",_(w,I,B,"k",Tt),_(Ye,I,ae,"k",Tt);for(var Kr=0;Kr<10;Kr++){var Ir=Kr.toString();Tt=String.fromCharCode(55349,57294+Kr),_(w,I,B,Ir,Tt),_(Ye,I,ae,Ir,Tt),Tt=String.fromCharCode(55349,57314+Kr),_(w,I,B,Ir,Tt),_(Ye,I,ae,Ir,Tt),Tt=String.fromCharCode(55349,57324+Kr),_(w,I,B,Ir,Tt),_(Ye,I,ae,Ir,Tt),Tt=String.fromCharCode(55349,57334+Kr),_(w,I,B,Ir,Tt),_(Ye,I,ae,Ir,Tt)}for(var tn="\xC7\xD0\xDE\xE7\xFE",or=0;or<tn.length;or++){var wn=tn.charAt(or);_(w,I,B,wn,wn),_(Ye,I,ae,wn,wn)}_(Ye,I,ae,"\xF0","\xF0"),_(Ye,I,ae,"\u2013","\u2013"),_(Ye,I,ae,"\u2014","\u2014"),_(Ye,I,ae,"\u2018","\u2018"),_(Ye,I,ae,"\u2019","\u2019"),_(Ye,I,ae,"\u201C","\u201C"),_(Ye,I,ae,"\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"]],It=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],Et=function(o,c){var h=o.charCodeAt(0),p=o.charCodeAt(1),b=(h-55296)*1024+(p-56320)+65536,S=c==="math"?0:1;if(119808<=b&&b<120484){var W=Math.floor((b-119808)/26);return[rn[W][2],rn[W][S]]}else if(120782<=b&&b<=120831){var J=Math.floor((b-120782)/10);return[It[J][2],It[J][S]]}else{if(b===120485||b===120486)return[rn[0][2],rn[0][S]];if(120486<b&&b<120782)return["",""];throw new pe("Unsupported character: "+o)}},Yt=[[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:Yt[o-1][c.size-1]},Wr=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 b in h)h.hasOwnProperty(b)&&(p[b]=h[b]);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=mt(this.size)),this._fontMetrics},o.getColor=function(){return this.phantom?"transparent":this.color},D}();Wr.BASESIZE=6;var Mn=Wr,Vr={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},Tr={ex:!0,em:!0,mu:!0},Or=function(o){return typeof o!="string"&&(o=o.unit),o in Vr||o in Tr||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 pe("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 yt[h][o]&&yt[h][o].replace&&(o=yt[h][o].replace),{value:o,metrics:gt(o,c,h)}},Hr=function(o,c,h,p,b){var S=fn(o,c,h),W=S.metrics;o=S.value;var J;if(W){var he=W.italic;(h==="text"||p&&p.font==="mathit")&&(he=0),J=new Q(o,W.height,W.depth,he,W.skew,W.width,b)}else typeof console!="undefined"&&console.warn("No character metrics "+("for '"+o+"' in style '"+c+"' and mode '"+h+"'")),J=new Q(o,0,0,0,0,0,b);if(p){J.maxFontSize=p.sizeMultiplier,p.style.isTight()&&J.classes.push("mtight");var Re=p.getColor();Re&&(J.style.color=Re)}return J},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==="\\"||yt[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))||F.contains(nn,o)?{fontName:"Main-Italic",fontClass:"mathit"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},Sr=function(o,c,h,p){return F.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,b=o.text,S=["mord"],W=p==="math"||p==="text"&&c.font,J=W?c.font:c.fontFamily;if(b.charCodeAt(0)===55349){var he=Et(b,p),Re=he[0],$e=he[1];return Hr(b,Re,p,c,S.concat($e))}else if(J){var Xe,ot;if(J==="boldsymbol"||J==="mathnormal"){var pt=J==="boldsymbol"?Cr(b,p,c,S):Sr(b,p,c,S);Xe=pt.fontName,ot=[pt.fontClass]}else F.contains(nn,b)?(Xe="Main-Italic",ot=["mathit"]):W?(Xe=wi[J].fontName,ot=[J]):(Xe=ai(J,c.fontWeight,c.fontShape),ot=[J,c.fontWeight,c.fontShape]);if(fn(b,Xe,p).metrics)return Hr(b,Xe,p,c,S.concat(ot));if(At.hasOwnProperty(b)&&Xe.substr(0,10)==="Typewriter"){for(var St=[],Nt=0;Nt<b.length;Nt++)St.push(Hr(b[Nt],Xe,p,c,S.concat(ot)));return Hn(St)}}if(h==="mathord"){var Zt=lr(b,p,c,S);return Hr(b,Zt.fontName,p,c,S.concat([Zt.fontClass]))}else if(h==="textord"){var Jt=yt[p][b]&&yt[p][b].font;if(Jt==="ams"){var Xt=ai("amsrm",c.fontWeight,c.fontShape);return Hr(b,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(b,Rr,p,c,S.concat(c.fontWeight,c.fontShape))}else{var Lr=ai(Jt,c.fontWeight,c.fontShape);return Hr(b,Lr,p,c,S.concat(Lr,c.fontWeight,c.fontShape))}}else throw new Error("unexpected type: "+h+" in makeOrd")},an=function(o,c){if(qt(o.classes)!==qt(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 Q&&p instanceof Q&&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,b=0;b<o.children.length;b++){var S=o.children[b];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 b=new ue(o,c,h,p);return Ln(b),b},mr=function(o,c,h,p){return new ue(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 b=new Me(o,c,h,p);return Ln(b),b},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,b=p,S=1;S<c.length;S++){var W=-c[S].shift-b-c[S].elem.depth,J=W-(c[S-1].elem.height+c[S-1].elem.depth);b=b+W,h.push({type:"kern",size:J}),h.push(c[S])}return{children:h,depth:p}}var he;if(o.positionType==="top"){for(var Re=o.positionData,$e=0;$e<o.children.length;$e++){var Xe=o.children[$e];Re-=Xe.type==="kern"?Xe.size:Xe.elem.height+Xe.elem.depth}he=Re}else if(o.positionType==="bottom")he=-o.positionData;else{var ot=o.children[0];if(ot.type!=="elem")throw new Error('First child must have type "elem".');if(o.positionType==="shift")he=-ot.elem.depth-o.positionData;else if(o.positionType==="firstBaseline")he=-ot.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,b=h.depth,S=0,W=0;W<p.length;W++){var J=p[W];if(J.type==="elem"){var he=J.elem;S=Math.max(S,he.maxFontSize,he.height)}}S+=2;var Re=hr(["pstrut"],[]);Re.style.height=S+"em";for(var $e=[],Xe=b,ot=b,pt=b,St=0;St<p.length;St++){var Nt=p[St];if(Nt.type==="kern")pt+=Nt.size;else{var Zt=Nt.elem,Jt=Nt.wrapperClasses||[],Xt=Nt.wrapperStyle||{},Rr=hr(Jt,[Re,Zt],void 0,Xt);Rr.style.top=-S-pt-Zt.depth+"em",Nt.marginLeft&&(Rr.style.marginLeft=Nt.marginLeft),Nt.marginRight&&(Rr.style.marginRight=Nt.marginRight),$e.push(Rr),pt+=Zt.height+Zt.depth}Xe=Math.min(Xe,pt),ot=Math.max(ot,pt)}var Lr=hr(["vlist"],$e);Lr.style.height=ot+"em";var $r;if(Xe<0){var jr=hr([],[]),Xr=hr(["vlist"],[jr]);Xr.style.height=-Xe+"em";var yn=hr(["vlist-s"],[new Q("\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=ot,hn.depth=-Xe,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 b;return c==="textbf"&&h==="textit"?b="BoldItalic":c==="textbf"?b="Bold":c==="textit"?b="Italic":b="Regular",p+"-"+b},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],b=h[1],S=h[2],W=new fe(p),J=new ye([W],{width:b+"em",height:S+"em",style:"width:"+b+"em",viewBox:"0 0 "+1e3*b+" "+1e3*S,preserveAspectRatio:"xMinYMin"}),he=mr(["overlay"],[J],c);return he.height=S,he.style.height=S+"em",he.style.width=b+"em",he},Pe={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 Wt(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 jn(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"||ft.hasOwnProperty(D.type))?D:null}var _r={number:3,unit:"mu"},An={number:4,unit:"mu"},In={number:5,unit:"mu"},qr={mord:{mop:_r,mbin:An,mrel:In,minner:_r},mop:{mord:_r,mop:_r,mrel:In,minner:_r},mbin:{mord:An,mop:An,mopen:An,minner:An},mrel:{mord:In,mop:In,mopen:In,minner:In},mopen:{},mclose:{mop:_r,mbin:An,mrel:In,minner:_r},mpunct:{mord:_r,mop:_r,mrel:In,mopen:_r,mclose:_r,mpunct:_r,minner:_r},minner:{mord:_r,mop:_r,mbin:An,mrel:In,mopen:_r,mpunct:_r,minner:_r}},pn={mord:{mop:_r},mop:{mord:_r,mop:_r},mbin:{},mrel:{},mopen:{},mclose:{mop:_r},mpunct:{},minner:{mop:_r}},$i={},Wn={},ei={};function Lt(D){for(var o=D.type,c=D.names,h=D.props,p=D.handler,b=D.htmlBuilder,S=D.mathmlBuilder,W={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},J=0;J<c.length;++J)$i[c[J]]=W;o&&(b&&(Wn[o]=b),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=Pe.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"},Yr=function(o,c,h,p){p===void 0&&(p=[null,null]);for(var b=[],S=0;S<o.length;S++){var W=ur(o[S],c);if(W instanceof ar){var J=W.children;b.push.apply(b,J)}else b.push(W)}if(!h)return b;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 $e=mn([p[0]||"leftmost"],[],c),Xe=mn([p[1]||"rightmost"],[],c);return Un(b,function(ot,pt){var St=pt.classes[0],Nt=ot.classes[0];St==="mbin"&&F.contains(ti,Nt)?pt.classes[0]="mord":Nt==="mbin"&&F.contains(Gi,St)&&(ot.classes[0]="mord")},{node:$e},Xe),Un(b,function(ot,pt){var St=gn(pt),Nt=gn(ot),Zt=St&&Nt?ot.hasClass("mtight")?pn[St][Nt]:qr[St][Nt]:null;if(Zt)return Pe.makeGlue(Zt,he)},{node:$e},Xe),b},Un=function D(o,c,h,p){p&&o.push(p);for(var b=0;b<o.length;b++){var S=o[b],W=On(S);if(W){D(W.children,c,h);continue}if(S.classes[0]!=="mspace"){var J=c(S,h.node);J&&(h.insertAfter?h.insertAfter(J):(o.unshift(J),b++)),h.node=S,h.insertAfter=function(he){return function(Re){o.splice(he+1,0,Re),b++}}(b)}}p&&o.pop()},On=function(o){return o instanceof ar||o instanceof Me?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},Tn=function(o,c){var h=["nulldelimiter"].concat(o.baseSizingClasses());return mn(c.concat(h))},ur=function(o,c,h){if(!o)return mn();if(Wn[o.type]){var p=Wn[o.type](o,c);if(h&&c.size!==h.size){p=mn(c.sizingClasses(h),[p],c);var b=c.sizeMultiplier/h.sizeMultiplier;p.height*=b,p.depth*=b}return p}else throw new pe("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=Yr(D,o,!0),p=[],b=[],S=0;S<h.length;S++)if(b.push(h[S]),h[S].hasClass("mbin")||h[S].hasClass("mrel")||h[S].hasClass("allowbreak")){for(var W=!1;S<h.length-1&&h[S+1].hasClass("mspace")&&!h[S+1].hasClass("newline");)S++,b.push(h[S]),h[S].hasClass("nobreak")&&(W=!0);W||(p.push(ui(b,o)),b=[])}else h[S].hasClass("newline")&&(b.pop(),b.length>0&&(p.push(ui(b,o)),b=[]),p.push(h[S]));b.length>0&&p.push(ui(b,o));var J;c&&(J=ui(Yr(c,o,!0)),J.classes=["tag"],p.push(J));var he=mn(["katex-html"],p);if(he.setAttribute("aria-hidden","true"),J){var Re=J.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 b=0;b<this.children.length;b++)h.appendChild(this.children[b].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+=F.escape(this.attributes[p]),h+='"');h+=">";for(var b=0;b<this.children.length;b++)h+=this.children[b].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 F.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}(),_t={MathNode:_n,TextNode:ci,SpaceNode:Ki,newDocumentFragment:Ii},vn=function(o,c,h){return yt[c][o]&&yt[c][o].replace&&o.charCodeAt(0)!==55349&&!(At.hasOwnProperty(o)&&h&&(h.fontFamily&&h.fontFamily.substr(4,2)==="tt"||h.font&&h.font.substr(4,2)==="tt"))&&(o=yt[c][o].replace),new _t.TextNode(o)},Oi=function(o){return o.length===1?o[0]:new _t.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 b=o.text;if(F.contains(["\\imath","\\jmath"],b))return null;yt[p][b]&&yt[p][b].replace&&(b=yt[p][b].replace);var S=Pe.fontMap[h].fontName;return gt(b,S,p)?Pe.fontMap[h].variant:null},cn=function(o,c,h){if(o.length===1){var p=vr(o[0],c);return h&&p instanceof _n&&p.type==="mo"&&(p.setAttribute("lspace","0em"),p.setAttribute("rspace","0em")),[p]}for(var b=[],S,W=0;W<o.length;W++){var J=vr(o[W],c);if(J instanceof _n&&S instanceof _n){if(J.type==="mtext"&&S.type==="mtext"&&J.getAttribute("mathvariant")===S.getAttribute("mathvariant")){var he;(he=S.children).push.apply(he,J.children);continue}else if(J.type==="mn"&&S.type==="mn"){var Re;(Re=S.children).push.apply(Re,J.children);continue}else if(J.type==="mi"&&J.children.length===1&&S.type==="mn"){var $e=J.children[0];if($e instanceof ci&&$e.text==="."){var Xe;(Xe=S.children).push.apply(Xe,J.children);continue}}else if(S.type==="mi"&&S.children.length===1){var ot=S.children[0];if(ot instanceof ci&&ot.text==="\u0338"&&(J.type==="mo"||J.type==="mi"||J.type==="mn")){var pt=J.children[0];pt instanceof ci&&pt.text.length>0&&(pt.text=pt.text.slice(0,1)+"\u0338"+pt.text.slice(1),b.pop())}}}b.push(J),S=J}return b},en=function(o,c,h){return Oi(cn(o,c,h))},vr=function(o,c){if(!o)return new _t.MathNode("mrow");if(ei[o.type]){var h=ei[o.type](o,c);return h}else throw new pe("Got group of unknown type: '"+o.type+"'")};function Pn(D,o,c,h){var p=cn(D,c),b;p.length===1&&p[0]instanceof _n&&F.contains(["mrow","mtable"],p[0].type)?b=p[0]:b=new _t.MathNode("mrow",p);var S=new _t.MathNode("annotation",[new _t.TextNode(o)]);S.setAttribute("encoding","application/x-tex");var W=new _t.MathNode("semantics",[b,S]),J=new _t.MathNode("math",[W]);J.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML");var he=h?"katex":"katex-mathml";return Pe.makeSpan([he],[J])}var zn=function(o){return new Mn({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=Pe.makeSpan(h,[o])}return o},$n=function(o,c,h){var p=zn(h),b;if(h.output==="mathml")return Pn(o,c,p,!0);if(h.output==="html"){var S=Li(o,p);b=Pe.makeSpan(["katex"],[S])}else{var W=Pn(o,c,p,!1),J=Li(o,p);b=Pe.makeSpan(["katex"],[W,J])}return ri(b,h)},Pi=function(o,c,h){var p=zn(h),b=Li(o,p),S=Pe.makeSpan(["katex"],[b]);return ri(S,h)},Fi=$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 _t.MathNode("mo",[new _t.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]},Mi=function(o){return o.type==="ordgroup"?o.body.length:1},ts=function(o,c){function h(){var J=4e5,he=o.label.substr(1);if(F.contains(["widehat","widecheck","widetilde","utilde"],he)){var Re=o,$e=Mi(Re.base),Xe,ot,pt;if($e>5)he==="widehat"||he==="widecheck"?(Xe=420,J=2364,pt=.42,ot=he+"4"):(Xe=312,J=2340,pt=.34,ot="tilde4");else{var St=[1,1,2,2,3,3][$e];he==="widehat"||he==="widecheck"?(J=[0,1062,2364,2364,2364][St],Xe=[0,239,300,360,420][St],pt=[0,.24,.3,.3,.36,.42][St],ot=he+St):(J=[0,600,1033,2339,2340][St],Xe=[0,260,286,306,312][St],pt=[0,.26,.286,.3,.306,.34][St],ot="tilde"+St)}var Nt=new fe(ot),Zt=new ye([Nt],{width:"100%",height:pt+"em",viewBox:"0 0 "+J+" "+Xe,preserveAspectRatio:"none"});return{span:Pe.makeSvgSpan([],[Zt],c),minWidth:0,height:pt}}else{var Jt=[],Xt=es[he],Rr=Xt[0],Lr=Xt[1],$r=Xt[2],jr=$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 fe(Rr[Kn]),Qn=new ye([_i],{width:"400em",height:jr+"em",viewBox:"0 0 "+J+" "+$r,preserveAspectRatio:hn[Kn]+" slice"}),bn=Pe.makeSvgSpan([yn[Kn]],[Qn],c);if(Xr===1)return{span:bn,minWidth:Lr,height:jr};bn.style.height=jr+"em",Jt.push(bn)}return{span:Pe.makeSpan(["stretchy"],Jt,c),minWidth:Lr,height:jr}}}var p=h(),b=p.span,S=p.minWidth,W=p.height;return b.height=W,b.style.height=W+"em",S>0&&(b.style.minWidth=S+"em"),b},Ut=function(o,c,h,p){var b,S=o.height+o.depth+2*h;if(/fbox|color/.test(c)){if(b=Pe.makeSpan(["stretchy",c],[],p),c==="fbox"){var W=p.color&&p.getColor();W&&(b.style.borderColor=W)}}else{var J=[];/^[bx]cancel$/.test(c)&&J.push(new Te({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(c)&&J.push(new Te({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var he=new ye(J,{width:"100%",height:S+"em"});b=Pe.makeSvgSpan([],[he],p)}return b.height=S,b.style.height=S+"em",b},kt={encloseSpan:Ut,mathMLnode:Ei,svgSpan:ts},fr=function(o,c){var h,p,b=Pr(o,"supsub"),S;b?(p=Wt(b.base,"accent"),h=p.base,b.base=h,S=We(ur(b,c)),b.base=p):(p=Wt(o,"accent"),h=p.base);var W=ur(h,c.havingCrampedStyle()),J=p.isShifty&&F.isCharacterBox(h),he=0;if(J){var Re=F.getBaseElem(h),$e=ur(Re,c.havingCrampedStyle());he=De($e).skew}var Xe=Math.min(W.height,c.fontMetrics().xHeight),ot;if(p.isStretchy)ot=kt.svgSpan(p,c),ot=Pe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:W},{type:"elem",elem:ot,wrapperClasses:["svg-align"],wrapperStyle:he>0?{width:"calc(100% - "+2*he+"em)",marginLeft:2*he+"em"}:void 0}]},c);else{var pt,St;p.label==="\\vec"?(pt=Pe.staticSvg("vec",c),St=Pe.svgData.vec[1]):(pt=Pe.makeOrd({mode:p.mode,text:p.label},c,"textord"),pt=De(pt),pt.italic=0,St=pt.width),ot=Pe.makeSpan(["accent-body"],[pt]);var Nt=p.label==="\\textcircled";Nt&&(ot.classes.push("accent-full"),Xe=W.height);var Zt=he;Nt||(Zt-=St/2),ot.style.left=Zt+"em",p.label==="\\textcircled"&&(ot.style.top=".2em"),ot=Pe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:W},{type:"kern",size:-Xe},{type:"elem",elem:ot}]},c)}var Jt=Pe.makeSpan(["mord","accent"],[ot],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?kt.mathMLnode(o.label):new _t.MathNode("mo",[vn(o.label,o.mode)]),p=new _t.MathNode("mover",[vr(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),b=!p||o.funcName==="\\widehat"||o.funcName==="\\widetilde"||o.funcName==="\\widecheck";return{type:"accent",mode:o.parser.mode,label:o.funcName,isStretchy:p,isShifty:b,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,b=c[0];return{type:"accentUnder",mode:h.mode,label:p,base:b}},htmlBuilder:function(o,c){var h=ur(o.base,c),p=kt.svgSpan(o,c),b=o.label==="\\utilde"?.12:0,S=Pe.makeVList({positionType:"bottom",positionData:p.height+b,children:[{type:"elem",elem:p,wrapperClasses:["svg-align"]},{type:"kern",size:b},{type:"elem",elem:h}]},c);return Pe.makeSpan(["mord","accentunder"],[S],c)},mathmlBuilder:function(o,c){var h=kt.mathMLnode(o.label),p=new _t.MathNode("munder",[vr(o.base,c),h]);return p.setAttribute("accentunder","true"),p}});var kn=function(o){var c=new _t.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,b=o.funcName;return{type:"xArrow",mode:p.mode,label:b,body:c[0],below:h[0]}},htmlBuilder:function(o,c){var h=c.style,p=c.havingStyle(h.sup()),b=Pe.wrapFragment(ur(o.body,p,c),c);b.classes.push("x-arrow-pad");var S;o.below&&(p=c.havingStyle(h.sub()),S=Pe.wrapFragment(ur(o.below,p,c),c),S.classes.push("x-arrow-pad"));var W=kt.svgSpan(o,c),J=-c.fontMetrics().axisHeight+.5*W.height,he=-c.fontMetrics().axisHeight-.5*W.height-.111;(b.depth>.25||o.label==="\\xleftequilibrium")&&(he-=b.depth);var Re;if(S){var $e=-c.fontMetrics().axisHeight+S.height+.5*W.height+.111;Re=Pe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:he},{type:"elem",elem:W,shift:J},{type:"elem",elem:S,shift:$e}]},c)}else Re=Pe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:b,shift:he},{type:"elem",elem:W,shift:J}]},c);return Re.children[0].children[0].children[1].classes.push("svg-align"),Pe.makeSpan(["mrel","x-arrow"],[Re],c)},mathmlBuilder:function(o,c){var h=kt.mathMLnode(o.label),p;if(o.body){var b=kn(vr(o.body,c));if(o.below){var S=kn(vr(o.below,c));p=new _t.MathNode("munderover",[h,S,b])}else p=new _t.MathNode("mover",[h,b])}else if(o.below){var W=kn(vr(o.below,c));p=new _t.MathNode("munder",[h,W])}else p=kn(),p=new _t.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=Wt(c[0],"ordgroup"),b=p.body,S="",W=0;W<b.length;W++){var J=Wt(b[W],"textord");S+=J.text}var he=parseInt(S);if(isNaN(he))throw new pe("\\@char has non-numeric argument "+S);return{type:"textord",mode:h.mode,text:String.fromCharCode(he)}}});var ji=function(o,c){var h=Yr(o.body,c.withColor(o.color),!1);return Pe.makeFragment(h)},Wi=function(o,c){var h=cn(o.body,c.withColor(o.color)),p=new _t.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=Wt(c[0],"color-token").color,b=c[1];return{type:"color",mode:h.mode,color:p,body:Jr(b)}},htmlBuilder:ji,mathmlBuilder:Wi}),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,b=Wt(c[0],"color-token").color;h.gullet.macros.set("\\current@color",b);var S=h.parseExpression(!0,p);return{type:"color",mode:h.mode,color:b,body:S}},htmlBuilder:ji,mathmlBuilder:Wi}),Lt({type:"cr",names:["\\cr","\\newline"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(o,c,h){var p=o.parser,b=o.funcName,S=h[0],W=b==="\\cr",J=!1;return W||(p.settings.displayMode&&p.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode")?J=!1:J=!0),{type:"cr",mode:p.mode,newLine:J,newRow:W,size:S&&Wt(S,"size").value}},htmlBuilder:function(o,c){if(o.newRow)throw new pe("\\cr valid only within a tabular/array environment");var h=Pe.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 _t.MathNode("mspace");return o.newLine&&(h.setAttribute("linebreak","newline"),o.size&&h.setAttribute("height",cr(o.size,c)+"em")),h}});var qn=function(o,c,h){var p=yt.math[o]&&yt.math[o].replace,b=gt(p||o,c,h);if(!b)throw new Error("Unsupported symbol "+o+" and font size "+c+".");return b},Ls=function(o,c,h,p){var b=h.havingBaseStyle(c),S=Pe.makeSpan(p.concat(b.sizingClasses(h)),[o],h),W=b.sizeMultiplier/h.sizeMultiplier;return S.height*=W,S.depth*=W,S.maxFontSize=b.sizeMultiplier,S},ra=function(o,c,h){var p=c.havingBaseStyle(h),b=(1-c.sizeMultiplier/p.sizeMultiplier)*c.fontMetrics().axisHeight;o.classes.push("delimcenter"),o.style.top=b+"em",o.height-=b,o.depth+=b},Pa=function(o,c,h,p,b,S){var W=Pe.makeSymbol(o,"Main-Regular",b,p),J=Ls(W,c,p,S);return h&&ra(J,p,c),J},Fa=function(o,c,h,p){return Pe.makeSymbol(o,"Size"+c+"-Regular",h,p)},na=function(o,c,h,p,b,S){var W=Fa(o,c,b,p),J=Ls(Pe.makeSpan(["delimsizing","size"+c],[W],p),E.TEXT,p,S);return h&&ra(J,p,E.TEXT),J},Ai=function(o,c,h){var p;c==="Size1-Regular"?p="delim-size1":p="delim-size4";var b=Pe.makeSpan(["delimsizinginner",p],[Pe.makeSpan([],[Pe.makeSymbol(o,c,h)])]);return{type:"elem",elem:b}},Fn={type:"kern",size:-.005},ia=function(o,c,h,p,b,S){var W,J,he,Re;W=he=Re=o,J=null;var $e="Size1-Regular";o==="\\uparrow"?he=Re="\u23D0":o==="\\Uparrow"?he=Re="\u2016":o==="\\downarrow"?W=he="\u23D0":o==="\\Downarrow"?W=he="\u2016":o==="\\updownarrow"?(W="\\uparrow",he="\u23D0",Re="\\downarrow"):o==="\\Updownarrow"?(W="\\Uparrow",he="\u2016",Re="\\Downarrow"):o==="["||o==="\\lbrack"?(W="\u23A1",he="\u23A2",Re="\u23A3",$e="Size4-Regular"):o==="]"||o==="\\rbrack"?(W="\u23A4",he="\u23A5",Re="\u23A6",$e="Size4-Regular"):o==="\\lfloor"||o==="\u230A"?(he=W="\u23A2",Re="\u23A3",$e="Size4-Regular"):o==="\\lceil"||o==="\u2308"?(W="\u23A1",he=Re="\u23A2",$e="Size4-Regular"):o==="\\rfloor"||o==="\u230B"?(he=W="\u23A5",Re="\u23A6",$e="Size4-Regular"):o==="\\rceil"||o==="\u2309"?(W="\u23A4",he=Re="\u23A5",$e="Size4-Regular"):o==="("||o==="\\lparen"?(W="\u239B",he="\u239C",Re="\u239D",$e="Size4-Regular"):o===")"||o==="\\rparen"?(W="\u239E",he="\u239F",Re="\u23A0",$e="Size4-Regular"):o==="\\{"||o==="\\lbrace"?(W="\u23A7",J="\u23A8",Re="\u23A9",he="\u23AA",$e="Size4-Regular"):o==="\\}"||o==="\\rbrace"?(W="\u23AB",J="\u23AC",Re="\u23AD",he="\u23AA",$e="Size4-Regular"):o==="\\lgroup"||o==="\u27EE"?(W="\u23A7",Re="\u23A9",he="\u23AA",$e="Size4-Regular"):o==="\\rgroup"||o==="\u27EF"?(W="\u23AB",Re="\u23AD",he="\u23AA",$e="Size4-Regular"):o==="\\lmoustache"||o==="\u23B0"?(W="\u23A7",Re="\u23AD",he="\u23AA",$e="Size4-Regular"):(o==="\\rmoustache"||o==="\u23B1")&&(W="\u23AB",Re="\u23A9",he="\u23AA",$e="Size4-Regular");var Xe=qn(W,$e,b),ot=Xe.height+Xe.depth,pt=qn(he,$e,b),St=pt.height+pt.depth,Nt=qn(Re,$e,b),Zt=Nt.height+Nt.depth,Jt=0,Xt=1;if(J!==null){var Rr=qn(J,$e,b);Jt=Rr.height+Rr.depth,Xt=2}var Lr=ot+Zt+Jt,$r=Math.max(0,Math.ceil((c-Lr)/(Xt*St))),jr=Lr+$r*Xt*St,Xr=p.fontMetrics().axisHeight;h&&(Xr*=p.sizeMultiplier);var yn=jr/2-Xr,hn=($r+1)*.005-St,Dr=[];if(Dr.push(Ai(Re,$e,b)),J===null)for(var Kn=0;Kn<$r;Kn++)Dr.push(Fn),Dr.push(Ai(he,$e,b));else{for(var _i=0;_i<$r;_i++)Dr.push(Fn),Dr.push(Ai(he,$e,b));Dr.push({type:"kern",size:hn}),Dr.push(Ai(he,$e,b)),Dr.push(Fn),Dr.push(Ai(J,$e,b));for(var Qn=0;Qn<$r;Qn++)Dr.push(Fn),Dr.push(Ai(he,$e,b))}Dr.push({type:"kern",size:hn}),Dr.push(Ai(he,$e,b)),Dr.push(Fn),Dr.push(Ai(W,$e,b));var bn=p.havingBaseStyle(E.TEXT),vi=Pe.makeVList({positionType:"bottom",positionData:yn,children:Dr},bn);return Ls(Pe.makeSpan(["delimsizing","mult"],[vi],bn),E.TEXT,p,S)},Is=80,Gn=.08,fi=function(o,c,h,p,b){var S=sr(o,p,h),W=new fe(o,S),J=new ye([W],{width:"400em",height:c+"em",viewBox:"0 0 400000 "+h,preserveAspectRatio:"xMinYMin slice"});return Pe.makeSvgSpan(["hide-tail"],[J],b)},Ma=function(o,c){var h=c.havingBaseSizing(),p=sa("\\surd",o*h.sizeMultiplier,rs,h),b=h.sizeMultiplier,S=Math.max(0,c.minRuleThickness-c.fontMetrics().sqrtRuleThickness),W,J=0,he=0,Re=0,$e;return p.type==="small"?(Re=1e3+1e3*S+Is,o<1?b=1:o<1.4&&(b=.7),J=(1+S+Gn)/b,he=(1+S)/b,W=fi("sqrtMain",J,Re,S,c),W.style.minWidth="0.853em",$e=.833/b):p.type==="large"?(Re=(1e3+Is)*us[p.size],he=(us[p.size]+S)/b,J=(us[p.size]+S+Gn)/b,W=fi("sqrtSize"+p.size,J,Re,S,c),W.style.minWidth="1.02em",$e=1/b):(J=o+S+Gn,he=o+S,Re=Math.floor(1e3*o+S)+Is,W=fi("sqrtTall",J,Re,S,c),W.style.minWidth="0.742em",$e=1.056),W.height=he,W.style.height=J+"em",{span:W,advanceWidth:$e,ruleWidth:(c.fontMetrics().sqrtRuleThickness+S)*b}},Ti=["(","\\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,b){if(o==="<"||o==="\\lt"||o==="\u27E8"?o="\\langle":(o===">"||o==="\\gt"||o==="\u27E9")&&(o="\\rangle"),F.contains(Ti,o)||F.contains(Os,o))return na(o,c,!1,h,p,b);if(F.contains(Ba,o))return ia(o,us[c],!1,h,p,b);throw new pe("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 b=Math.min(2,3-p.style.size),S=b;S<h.length&&h[S].type!=="stack";S++){var W=qn(o,Vi(h[S]),"math"),J=W.height+W.depth;if(h[S].type==="small"){var he=p.havingBaseStyle(h[S].style);J*=he.sizeMultiplier}if(J>c)return h[S]}return h[h.length-1]},Fr=function(o,c,h,p,b,S){o==="<"||o==="\\lt"||o==="\u27E8"?o="\\langle":(o===">"||o==="\\gt"||o==="\u27E9")&&(o="\\rangle");var W;F.contains(Os,o)?W=on:F.contains(Ti,o)?W=rs:W=Ua;var J=sa(o,c,W,p);return J.type==="small"?Pa(o,J.style,h,p,b,S):J.type==="large"?na(o,J.size,h,p,b,S):ia(o,c,h,p,b,S)},Ps=function(o,c,h,p,b,S){var W=p.fontMetrics().axisHeight*p.sizeMultiplier,J=901,he=5/p.fontMetrics().ptPerEm,Re=Math.max(c-W,h+W),$e=Math.max(Re/500*J,2*Re-he);return Fr(o,$e,!0,p,b,S)},Yn={sqrtImage:Ma,sizedDelim:Na,customSizedDelim:Fr,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&&F.contains(za,c.text))return c;throw new pe("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==="."?Pe.makeSpan([o.mclass]):Yn.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 _t.MathNode("mo",c);return o.mclass==="mopen"||o.mclass==="mclose"?h.setAttribute("fence","true"):h.setAttribute("fence","false"),h}});function Fs(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 pe("\\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 b=p.parseExpression(!1);--p.leftrightDepth,p.expect("\\right",!1);var S=Wt(p.parseFunction(),"leftright-right");return{type:"leftright",mode:p.mode,body:b,left:h.text,right:S.delim,rightColor:S.color}},htmlBuilder:function(o,c){Fs(o);for(var h=Yr(o.body,c,!0,["mopen","mclose"]),p=0,b=0,S=!1,W=0;W<h.length;W++)h[W].isMiddle?S=!0:(p=Math.max(h[W].height,p),b=Math.max(h[W].depth,b));p*=c.sizeMultiplier,b*=c.sizeMultiplier;var J;if(o.left==="."?J=Tn(c,["mopen"]):J=Yn.leftRightDelim(o.left,p,b,c,o.mode,["mopen"]),h.unshift(J),S)for(var he=1;he<h.length;he++){var Re=h[he],$e=Re.isMiddle;$e&&(h[he]=Yn.leftRightDelim($e.delim,p,b,$e.options,o.mode,[]))}var Xe;if(o.right===".")Xe=Tn(c,["mclose"]);else{var ot=o.rightColor?c.withColor(o.rightColor):c;Xe=Yn.leftRightDelim(o.right,p,b,ot,o.mode,["mclose"])}return h.push(Xe),Pe.makeSpan(["minner"],h,c)},mathmlBuilder:function(o,c){Fs(o);var h=cn(o.body,c);if(o.left!=="."){var p=new _t.MathNode("mo",[vn(o.left,o.mode)]);p.setAttribute("fence","true"),h.unshift(p)}if(o.right!=="."){var b=new _t.MathNode("mo",[vn(o.right,o.mode)]);b.setAttribute("fence","true"),o.rightColor&&b.setAttribute("mathcolor",o.rightColor),h.push(b)}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 pe("\\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=Tn(c,[]);else{h=Yn.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 _t.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=Pe.wrapFragment(ur(o.body,c),c),p=o.label.substr(1),b=c.sizeMultiplier,S,W=0,J=F.isCharacterBox(o.body);if(p==="sout")S=Pe.makeSpan(["stretchy","sout"]),S.height=c.fontMetrics().defaultRuleThickness/b,W=-.5*c.fontMetrics().xHeight;else{/cancel/.test(p)?J||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=J?.2:0,S=kt.encloseSpan(h,p,he,c),/fbox|boxed|fcolorbox/.test(p)&&(S.style.borderStyle="solid",S.style.borderWidth=Re+"em"),W=h.depth+he,o.backgroundColor&&(S.style.backgroundColor=o.backgroundColor,o.borderColor&&(S.style.borderColor=o.borderColor))}var $e;return o.backgroundColor?$e=Pe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:S,shift:W},{type:"elem",elem:h,shift:0}]},c):$e=Pe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:h,shift:0},{type:"elem",elem:S,shift:W,wrapperClasses:/cancel/.test(p)?["svg-align"]:[]}]},c),/cancel/.test(p)&&($e.height=h.height,$e.depth=h.depth),/cancel/.test(p)&&!J?Pe.makeSpan(["mord","cancel-lap"],[$e],c):Pe.makeSpan(["mord"],[$e],c)},Ms=function(o,c){var h=0,p=new _t.MathNode(o.label.indexOf("colorbox")>-1?"mpadded":"menclose",[vr(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 b=Math.max(c.fontMetrics().fboxrule,c.minRuleThickness);p.setAttribute("style","border: "+b+"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,b=o.funcName,S=Wt(c[0],"color-token").color,W=c[1];return{type:"enclose",mode:p.mode,label:b,backgroundColor:S,body:W}},htmlBuilder:hs,mathmlBuilder:Ms}),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,b=o.funcName,S=Wt(c[0],"color-token").color,W=Wt(c[1],"color-token").color,J=c[2];return{type:"enclose",mode:p.mode,label:b,backgroundColor:W,borderColor:S,body:J}},htmlBuilder:hs,mathmlBuilder:Ms}),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,b=o.funcName,S=c[0];return{type:"enclose",mode:p.mode,label:b,body:S}},htmlBuilder:hs,mathmlBuilder:Ms});var aa={};function Zn(D){for(var o=D.type,c=D.names,h=D.props,p=D.handler,b=D.htmlBuilder,S=D.mathmlBuilder,W={type:o,numArgs:h.numArgs||0,greediness:1,allowedInText:!1,numOptionalArgs:0,handler:p},J=0;J<c.length;++J)aa[c[J]]=W;b&&(Wn[o]=b),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,b=o.cols,S=o.arraystretch,W=o.colSeparationType;if(D.gullet.beginGroup(),D.gullet.macros.set("\\\\","\\cr"),!S){var J=D.gullet.expandMacroAsText("\\arraystretch");if(J==null)S=1;else if(S=parseFloat(J),!S||S<0)throw new pe("Invalid \\arraystretch: "+J)}D.gullet.beginGroup();var he=[],Re=[he],$e=[],Xe=[];for(Xe.push(Bs(D));;){var ot=D.parseExpression(!1,"\\cr");D.gullet.endGroup(),D.gullet.beginGroup(),ot={type:"ordgroup",mode:D.mode,body:ot},c&&(ot={type:"styling",mode:D.mode,style:c,body:[ot]}),he.push(ot);var pt=D.fetch().text;if(pt==="&")D.consume();else if(pt==="\\end"){he.length===1&&ot.type==="styling"&&ot.body[0].body.length===0&&Re.pop(),Xe.length<Re.length+1&&Xe.push([]);break}else if(pt==="\\cr"){var St=Wt(D.parseFunction(),"cr");$e.push(St.size),Xe.push(Bs(D)),he=[],Re.push(he)}else throw new pe("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:b,rowGaps:$e,hskipBeforeAndAfter:h,hLinesBeforeRow:Xe,colSeparationType:W}}function fs(D){return D.substr(0,1)==="d"?"display":"text"}var di=function(o,c){var h,p,b=o.body.length,S=o.hLinesBeforeRow,W=0,J=new Array(b),he=[],Re=Math.max(c.fontMetrics().arrayRuleWidth,c.minRuleThickness),$e=1/c.fontMetrics().ptPerEm,Xe=5*$e;if(o.colSeparationType&&o.colSeparationType==="small"){var ot=c.havingStyle(E.SCRIPT).sizeMultiplier;Xe=.2778*(ot/c.sizeMultiplier)}var pt=12*$e,St=3*$e,Nt=o.arraystretch*pt,Zt=.7*Nt,Jt=.3*Nt,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,jr=Jt;W<Lr.length&&(W=Lr.length);var Xr=new Array(Lr.length);for(p=0;p<Lr.length;++p){var yn=ur(Lr[p],c);jr<yn.depth&&(jr=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,jr<Dr&&(jr=Dr),Dr=0)),o.addJot&&(jr+=St),Xr.height=$r,Xr.depth=jr,Xt+=$r,Xr.pos=Xt,Xt+=jr+Dr,J[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<W||vi<_i.length;++p,++vi){for(var sn=_i[vi]||{},ni=!0;sn.type==="separator";){if(ni||(bn=Pe.makeSpan(["arraycolsep"],[]),bn.style.width=c.fontMetrics().doubleRuleSep+"em",Qn.push(bn)),sn.separator==="|"||sn.separator===":"){var to=sn.separator==="|"?"solid":"dashed",Xi=Pe.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 pe("Invalid separator type: "+sn.separator);vi++,sn=_i[vi]||{},ni=!1}if(!(p>=W)){var Qi=void 0;(p>0||o.hskipBeforeAndAfter)&&(Qi=F.deflt(sn.pregap,Xe),Qi!==0&&(bn=Pe.makeSpan(["arraycolsep"],[]),bn.style.width=Qi+"em",Qn.push(bn)));var Ji=[];for(h=0;h<b;++h){var Ss=J[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=Pe.makeVList({positionType:"individualShift",children:Ji},c),Ji=Pe.makeSpan(["col-align-"+(sn.align||"c")],[Ji]),Qn.push(Ji),(p<W-1||o.hskipBeforeAndAfter)&&(Qi=F.deflt(sn.postgap,Xe),Qi!==0&&(bn=Pe.makeSpan(["arraycolsep"],[]),bn.style.width=Qi+"em",Qn.push(bn)))}}if(J=Pe.makeSpan(["mtable"],Qn),he.length>0){for(var Da=Pe.makeLineSpan("hline",c,Re),ro=Pe.makeLineSpan("hdashline",c,Re),Qs=[{type:"elem",elem:J,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})}J=Pe.makeVList({positionType:"individualShift",children:Qs},c)}return Pe.makeSpan(["mord"],[J],c)},pi={c:"center ",l:"left ",r:"right "},Si=function(o,c){var h=new _t.MathNode("mtable",o.body.map(function(Xt){return new _t.MathNode("mtr",Xt.map(function(Rr){return new _t.MathNode("mtd",[vr(Rr,c)])}))})),p=o.arraystretch===.5?.1:.16+o.arraystretch-1+(o.addJot?.09:0);h.setAttribute("rowspacing",p+"em");var b="",S="";if(o.cols){var W=o.cols,J="",he=!1,Re=0,$e=W.length;W[0].type==="separator"&&(b+="top ",Re=1),W[W.length-1].type==="separator"&&(b+="bottom ",$e-=1);for(var Xe=Re;Xe<$e;Xe++)W[Xe].type==="align"?(S+=pi[W[Xe].align],he&&(J+="none "),he=!0):W[Xe].type==="separator"&&he&&(J+=W[Xe].separator==="|"?"solid ":"dashed ",he=!1);h.setAttribute("columnalign",S.trim()),/[sd]/.test(J)&&h.setAttribute("columnlines",J.trim())}if(o.colSeparationType==="align"){for(var ot=o.cols||[],pt="",St=1;St<ot.length;St++)pt+=St%2?"0em ":"1em ";h.setAttribute("columnspacing",pt.trim())}else o.colSeparationType==="alignat"?h.setAttribute("columnspacing","0em"):o.colSeparationType==="small"?h.setAttribute("columnspacing","0.2778em"):h.setAttribute("columnspacing","1em");var Nt="",Zt=o.hLinesBeforeRow;b+=Zt[0].length>0?"left ":"",b+=Zt[Zt.length-1].length>0?"right ":"";for(var Jt=1;Jt<Zt.length-1;Jt++)Nt+=Zt[Jt].length===0?"none ":Zt[Jt][0]?"dashed ":"solid ";return/[sd]/.test(Nt)&&h.setAttribute("rowlines",Nt.trim()),b!==""&&(h=new _t.MathNode("menclose",[h]),h.setAttribute("notation",b.trim())),o.arraystretch&&o.arraystretch<1&&(h=new _t.MathNode("mstyle",[h]),h.setAttribute("scriptlevel","1")),h},oa=function(o,c){var h=[],p=Bi(o.parser,{cols:h,addJot:!0},"display"),b,S=0,W={type:"ordgroup",mode:o.mode,body:[]},J=Pr(c[0],"ordgroup");if(J){for(var he="",Re=0;Re<J.body.length;Re++){var $e=Wt(J.body[Re],"textord");he+=$e.text}b=Number(he),S=b*2}var Xe=!S;p.body.forEach(function(Nt){for(var Zt=1;Zt<Nt.length;Zt+=2){var Jt=Wt(Nt[Zt],"styling"),Xt=Wt(Jt.body[0],"ordgroup");Xt.body.unshift(W)}if(Xe)S<Nt.length&&(S=Nt.length);else{var Rr=Nt.length/2;if(b<Rr)throw new pe("Too many math in a row: "+("expected "+b+", but got "+Rr),Nt[0])}});for(var ot=0;ot<S;++ot){var pt="r",St=0;ot%2===1?pt="l":ot>0&&Xe&&(St=1),h[ot]={type:"align",align:pt,pregap:St,postgap:0}}return p.colSeparationType=Xe?"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]]:Wt(c[0],"ordgroup").body,b=p.map(function(W){var J=li(W),he=J.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 pe("Unknown column alignment: "+he,W)}),S={cols:b,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]]:Wt(c[0],"ordgroup").body,b=p.map(function(W){var J=li(W),he=J.text;if("lc".indexOf(he)!==-1)return{type:"align",align:he};throw new pe("Unknown column alignment: "+he,W)});if(b.length>1)throw new pe("{subarray} can contain only one column");var S={cols:b,hskipBeforeAndAfter:!1,arraystretch:.5};if(S=Bi(o.parser,S,"script"),S.body[0].length>1)throw new pe("{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 pe(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,b=c[0];if(b.type!=="ordgroup")throw new pe("Invalid environment name",b);for(var S="",W=0;W<b.body.length;++W)S+=Wt(b.body[W],"textord").text;if(p==="\\begin"){if(!la.hasOwnProperty(S))throw new pe("No such environment: "+S,b);var J=la[S],he=h.parseArguments("\\begin{"+S+"}",J),Re=he.args,$e=he.optArgs,Xe={mode:h.mode,envName:S,parser:h},ot=J.handler(Xe,Re,$e);h.expect("\\end",!1);var pt=h.nextToken,St=Wt(h.parseFunction(),"environment");if(St.name!==S)throw new pe("Mismatch: \\begin{"+S+"} matched by \\end{"+St.name+"}",pt);return ot}return{type:"environment",mode:h.mode,name:S,nameGroup:b}}});var Ga=Pe.makeSpan;function ds(D,o){var c=Yr(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"?_t.newDocumentFragment(h):(D.mclass==="mord"?D.isCharacterBox?(c=h[0],c.type="mi"):c=new _t.MathNode("mi",h):(D.isCharacterBox?(c=h[0],c.type="mo"):c=new _t.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,b=c[0];return{type:"mclass",mode:h.mode,mclass:"m"+p.substr(5),body:Jr(b),isCharacterBox:F.isCharacterBox(b)}},htmlBuilder:ds,mathmlBuilder:ua});var ut=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:ut(c[0]),body:[c[1]],isCharacterBox:F.isCharacterBox(c[1])}}}),Lt({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(o,c){var h=o.parser,p=o.funcName,b=c[1],S=c[0],W;p!=="\\stackrel"?W=ut(b):W="mrel";var J={type:"op",mode:b.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:p!=="\\stackrel",body:Jr(b)},he={type:"supsub",mode:S.mode,base:J,sup:p==="\\underset"?null:S,sub:p==="\\underset"?S:null};return{type:"mclass",mode:h.mode,mclass:W,body:[he],isCharacterBox:F.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 vr(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,b=c[0],S=p;return S in ca&&(S=ca[S]),{type:"font",mode:h.mode,font:S.slice(1),body:b}},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],b=F.isCharacterBox(p);return{type:"mclass",mode:h.mode,mclass:ut(p),body:[{type:"font",mode:h.mode,font:"boldsymbol",body:p}],isCharacterBox:b}}}),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,b=o.breakOnTokenText,S=h.mode,W=h.parseExpression(!0,b),J="math"+p.slice(1);return{type:"font",mode:S,font:J,body:{type:"ordgroup",mode:h.mode,body:W}}},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(),b=h.fracDen(),S;S=c.havingStyle(p);var W=ur(o.numer,S,c);if(o.continued){var J=8.5/c.fontMetrics().ptPerEm,he=3.5/c.fontMetrics().ptPerEm;W.height=W.height<J?J:W.height,W.depth=W.depth<he?he:W.depth}S=c.havingStyle(b);var Re=ur(o.denom,S,c),$e,Xe,ot;o.hasBarLine?(o.barSize?(Xe=cr(o.barSize,c),$e=Pe.makeLineSpan("frac-line",c,Xe)):$e=Pe.makeLineSpan("frac-line",c),Xe=$e.height,ot=$e.height):($e=null,Xe=0,ot=c.fontMetrics().defaultRuleThickness);var pt,St,Nt;h.size===E.DISPLAY.size||o.size==="display"?(pt=c.fontMetrics().num1,Xe>0?St=3*ot:St=7*ot,Nt=c.fontMetrics().denom1):(Xe>0?(pt=c.fontMetrics().num2,St=ot):(pt=c.fontMetrics().num3,St=3*ot),Nt=c.fontMetrics().denom2);var Zt;if($e){var Xt=c.fontMetrics().axisHeight;pt-W.depth-(Xt+.5*Xe)<St&&(pt+=St-(pt-W.depth-(Xt+.5*Xe))),Xt-.5*Xe-(Re.height-Nt)<St&&(Nt+=St-(Xt-.5*Xe-(Re.height-Nt)));var Rr=-(Xt-.5*Xe);Zt=Pe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:Re,shift:Nt},{type:"elem",elem:$e,shift:Rr},{type:"elem",elem:W,shift:-pt}]},c)}else{var Jt=pt-W.depth-(Re.height-Nt);Jt<St&&(pt+=.5*(St-Jt),Nt+=.5*(St-Jt)),Zt=Pe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:Re,shift:Nt},{type:"elem",elem:W,shift:-pt}]},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,jr;return o.leftDelim==null?$r=Tn(c,["mopen"]):$r=Yn.customSizedDelim(o.leftDelim,Lr,!0,c.havingStyle(h),o.mode,["mopen"]),o.continued?jr=Pe.makeSpan([]):o.rightDelim==null?jr=Tn(c,["mclose"]):jr=Yn.customSizedDelim(o.rightDelim,Lr,!0,c.havingStyle(h),o.mode,["mclose"]),Pe.makeSpan(["mord"].concat(S.sizingClasses(c)),[$r,Pe.makeSpan(["mfrac"],[Zt]),jr],c)},zs=function(o,c){var h=new _t.MathNode("mfrac",[vr(o.numer,c),vr(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 b=ha(o.size,c.style);if(b.size!==c.style.size){h=new _t.MathNode("mstyle",[h]);var S=b.size===E.DISPLAY.size?"true":"false";h.setAttribute("displaystyle",S),h.setAttribute("scriptlevel","0")}if(o.leftDelim!=null||o.rightDelim!=null){var W=[];if(o.leftDelim!=null){var J=new _t.MathNode("mo",[new _t.TextNode(o.leftDelim.replace("\\",""))]);J.setAttribute("fence","true"),W.push(J)}if(W.push(h),o.rightDelim!=null){var he=new _t.MathNode("mo",[new _t.TextNode(o.rightDelim.replace("\\",""))]);he.setAttribute("fence","true"),W.push(he)}return Oi(W)}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,b=c[0],S=c[1],W,J=null,he=null,Re="auto";switch(p){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":W=!0;break;case"\\\\atopfrac":W=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":W=!1,J="(",he=")";break;case"\\\\bracefrac":W=!1,J="\\{",he="\\}";break;case"\\\\brackfrac":W=!1,J="[",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:b,denom:S,hasBarLine:W,leftDelim:J,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,b;switch(h){case"\\over":b="\\frac";break;case"\\choose":b="\\binom";break;case"\\atop":b="\\\\atopfrac";break;case"\\brace":b="\\\\bracefrac";break;case"\\brack":b="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:c.mode,replaceWith:b,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],b=c[5],S=Pr(c[0],"atom");S&&(S=jn(c[0],"open"));var W=S?ms(S.text):null,J=Pr(c[1],"atom");J&&(J=jn(c[1],"close"));var he=J?ms(J.text):null,Re=Wt(c[2],"size"),$e,Xe=null;Re.isBlank?$e=!0:(Xe=Re.value,$e=Xe.number>0);var ot="auto",pt=Pr(c[3],"ordgroup");if(pt){if(pt.body.length>0){var St=Wt(pt.body[0],"textord");ot=Xn[Number(St.text)]}}else pt=Wt(c[3],"textord"),ot=Xn[Number(pt.text)];return{type:"genfrac",mode:h.mode,numer:p,denom:b,continued:!1,hasBarLine:$e,barSize:Xe,leftDelim:W,rightDelim:he,size:ot}},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,b=o.token;return{type:"infix",mode:h.mode,replaceWith:"\\\\abovefrac",size:Wt(c[0],"size").value,token:b}}}),Lt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(o,c){var h=o.parser,p=o.funcName,b=c[0],S=$(Wt(c[1],"infix").size),W=c[2],J=S.number>0;return{type:"genfrac",mode:h.mode,numer:b,denom:W,continued:!1,hasBarLine:J,barSize:S,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Us,mathmlBuilder:zs});var fa=function(o,c){var h=c.style,p,b,S=Pr(o,"supsub");S?(p=S.sup?ur(S.sup,c.havingStyle(h.sup()),c):ur(S.sub,c.havingStyle(h.sub()),c),b=Wt(S.base,"horizBrace")):b=Wt(o,"horizBrace");var W=ur(b.base,c.havingBaseStyle(E.DISPLAY)),J=kt.svgSpan(b,c),he;if(b.isOver?(he=Pe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:W},{type:"kern",size:.1},{type:"elem",elem:J}]},c),he.children[0].children[0].children[1].classes.push("svg-align")):(he=Pe.makeVList({positionType:"bottom",positionData:W.depth+.1+J.height,children:[{type:"elem",elem:J},{type:"kern",size:.1},{type:"elem",elem:W}]},c),he.children[0].children[0].children[0].classes.push("svg-align")),p){var Re=Pe.makeSpan(["mord",b.isOver?"mover":"munder"],[he],c);b.isOver?he=Pe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:Re},{type:"kern",size:.2},{type:"elem",elem:p}]},c):he=Pe.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 Pe.makeSpan(["mord",b.isOver?"mover":"munder"],[he],c)},Ka=function(o,c){var h=kt.mathMLnode(o.label);return new _t.MathNode(o.isOver?"mover":"munder",[vr(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],b=Wt(c[0],"url").url;return h.settings.isTrusted({command:"\\href",url:b})?{type:"href",mode:h.mode,href:b,body:Jr(p)}:h.formatUnsupportedCmd("\\href")},htmlBuilder:function(o,c){var h=Yr(o.body,c,!1);return Pe.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=Wt(c[0],"url").url;if(!h.settings.isTrusted({command:"\\url",url:p}))return h.formatUnsupportedCmd("\\url");for(var b=[],S=0;S<p.length;S++){var W=p[S];W==="~"&&(W="\\textasciitilde"),b.push({type:"textord",mode:"text",text:W})}var J={type:"text",mode:h.mode,font:"\\texttt",body:b};return{type:"href",mode:h.mode,href:p,body:Jr(J)}}}),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=Yr(o.html,c,!1);return Pe.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 pe("Invalid size: '"+o+"' in \\includegraphics");var h={number:+(c[1]+c[2]),unit:c[3]};if(!Or(h))throw new pe("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,b={number:0,unit:"em"},S={number:.9,unit:"em"},W={number:0,unit:"em"},J="";if(h[0])for(var he=Wt(h[0],"raw").string,Re=he.split(","),$e=0;$e<Re.length;$e++){var Xe=Re[$e].split("=");if(Xe.length===2){var ot=Xe[1].trim();switch(Xe[0].trim()){case"alt":J=ot;break;case"width":b=gs(ot);break;case"height":S=gs(ot);break;case"totalheight":W=gs(ot);break;default:throw new pe("Invalid key: '"+Xe[0]+"' in \\includegraphics.")}}}var pt=Wt(c[0],"url").url;return J===""&&(J=pt,J=J.replace(/^.*[\\/]/,""),J=J.substring(0,J.lastIndexOf("."))),p.settings.isTrusted({command:"\\includegraphics",url:pt})?{type:"includegraphics",mode:p.mode,alt:J,width:b,height:S,totalheight:W,src:pt}: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 b=0;o.width.number>0&&(b=cr(o.width,c));var S={height:h+p+"em"};b>0&&(S.width=b+"em"),p>0&&(S.verticalAlign=-p+"em");var W=new Ge(o.src,o.alt,S);return W.height=h,W.depth=p,W},mathmlBuilder:function(o,c){var h=new _t.MathNode("mglyph",[]);h.setAttribute("alt",o.alt);var p=cr(o.height,c),b=0;if(o.totalheight.number>0&&(b=cr(o.totalheight,c)-p,b=b.toFixed(2),h.setAttribute("valign","-"+b+"em")),h.setAttribute("height",p+b+"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,b=Wt(c[0],"size");if(h.settings.strict){var S=p[1]==="m",W=b.value.unit==="mu";S?(W||h.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+p+" supports only mu units, "+("not "+b.value.unit+" units")),h.mode!=="math"&&h.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+p+" works only in math mode")):W&&h.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+p+" doesn't support mu units")}return{type:"kern",mode:h.mode,dimension:b.value}},htmlBuilder:function(o,c){return Pe.makeGlue(o.dimension,c)},mathmlBuilder:function(o,c){var h=cr(o.dimension,c);return new _t.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,b=c[0];return{type:"lap",mode:h.mode,alignment:p.slice(5),body:b}},htmlBuilder:function(o,c){var h;o.alignment==="clap"?(h=Pe.makeSpan([],[ur(o.body,c)]),h=Pe.makeSpan(["inner"],[h],c)):h=Pe.makeSpan(["inner"],[ur(o.body,c)]);var p=Pe.makeSpan(["fix"],[]),b=Pe.makeSpan([o.alignment],[h,p],c),S=Pe.makeSpan(["strut"]);return S.style.height=b.height+b.depth+"em",S.style.verticalAlign=-b.depth+"em",b.children.unshift(S),b=Pe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:b}]},c),Pe.makeSpan(["mord"],[b],c)},mathmlBuilder:function(o,c){var h=new _t.MathNode("mpadded",[vr(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,b=p.mode;p.switchMode("math");var S=h==="\\("?"\\)":"$",W=p.parseExpression(!1,S);return p.expect(S),p.switchMode(b),{type:"styling",mode:p.mode,style:"text",body:W}}}),Lt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(o,c){throw new pe("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=Yr(h,c,!1);return Pe.makeFragment(p)},mathmlBuilder:function(o,c){var h=$s(o,c);return en(h,c)}});var _s=function(o,c,h,p,b,S,W){o=Pe.makeSpan([],[o]);var J,he;if(c){var Re=ur(c,p.havingStyle(b.sup()),p);he={elem:Re,kern:Math.max(p.fontMetrics().bigOpSpacing1,p.fontMetrics().bigOpSpacing3-Re.depth)}}if(h){var $e=ur(h,p.havingStyle(b.sub()),p);J={elem:$e,kern:Math.max(p.fontMetrics().bigOpSpacing2,p.fontMetrics().bigOpSpacing4-$e.height)}}var Xe;if(he&&J){var ot=p.fontMetrics().bigOpSpacing5+J.elem.height+J.elem.depth+J.kern+o.depth+W;Xe=Pe.makeVList({positionType:"bottom",positionData:ot,children:[{type:"kern",size:p.fontMetrics().bigOpSpacing5},{type:"elem",elem:J.elem,marginLeft:-S+"em"},{type:"kern",size:J.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(J){var pt=o.height-W;Xe=Pe.makeVList({positionType:"top",positionData:pt,children:[{type:"kern",size:p.fontMetrics().bigOpSpacing5},{type:"elem",elem:J.elem,marginLeft:-S+"em"},{type:"kern",size:J.kern},{type:"elem",elem:o}]},p)}else if(he){var St=o.depth+W;Xe=Pe.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 Pe.makeSpan(["mop","op-limits"],[Xe],p)},da=["\\smallint"],mi=function(o,c){var h,p,b=!1,S,W=Pr(o,"supsub");W?(h=W.sup,p=W.sub,S=Wt(W.base,"op"),b=!0):S=Wt(o,"op");var J=c.style,he=!1;J.size===E.DISPLAY.size&&S.symbol&&!F.contains(da,S.name)&&(he=!0);var Re;if(S.symbol){var $e=he?"Size2-Regular":"Size1-Regular",Xe="";if((S.name==="\\oiint"||S.name==="\\oiiint")&&(Xe=S.name.substr(1),S.name=Xe==="oiint"?"\\iint":"\\iiint"),Re=Pe.makeSymbol(S.name,$e,"math",c,["mop","op-symbol",he?"large-op":"small-op"]),Xe.length>0){var ot=Re.italic,pt=Pe.staticSvg(Xe+"Size"+(he?"2":"1"),c);Re=Pe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:Re,shift:0},{type:"elem",elem:pt,shift:he?.08:0}]},c),S.name="\\"+Xe,Re.classes.unshift("mop"),Re.italic=ot}}else if(S.body){var St=Yr(S.body,c,!0);St.length===1&&St[0]instanceof Q?(Re=St[0],Re.classes[0]="mop"):Re=Pe.makeSpan(["mop"],Pe.tryCombineChars(St),c)}else{for(var Nt=[],Zt=1;Zt<S.name.length;Zt++)Nt.push(Pe.mathsym(S.name[Zt],S.mode,c));Re=Pe.makeSpan(["mop"],Nt,c)}var Jt=0,Xt=0;return(Re instanceof Q||S.name==="\\oiint"||S.name==="\\oiiint")&&!S.suppressBaseShift&&(Jt=(Re.height-Re.depth)/2-c.fontMetrics().axisHeight,Xt=Re.italic),b?_s(Re,h,p,c,J,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)]),F.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,b=p;return b.length===1&&(b=Ha[b]),{type:"op",mode:h.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:b}},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,b=!1,S,W=Pr(o,"supsub");W?(h=W.sup,p=W.sub,S=Wt(W.base,"operatorname"),b=!0):S=Wt(o,"operatorname");var J;if(S.body.length>0){for(var he=S.body.map(function(ot){var pt=ot.text;return typeof pt=="string"?{type:"textord",mode:ot.mode,text:pt}:ot}),Re=Yr(he,c.withFont("mathrm"),!0),$e=0;$e<Re.length;$e++){var Xe=Re[$e];Xe instanceof Q&&(Xe.text=Xe.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}J=Pe.makeSpan(["mop"],Re,c)}else J=Pe.makeSpan(["mop"],[],c);return b?_s(J,h,p,c,c.style,0,0):J},ja=function(o,c){for(var h=cn(o.body,c.withFont("mathrm")),p=!0,b=0;b<h.length;b++){var S=h[b];if(!(S instanceof _t.SpaceNode))if(S instanceof _t.MathNode)switch(S.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var W=S.children[0];S.children.length===1&&W instanceof _t.TextNode?W.text=W.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):p=!1;break}default:p=!1}else p=!1}if(p){var J=h.map(function($e){return $e.toText()}).join("");h=[new _t.TextNode(J)]}var he=new _t.MathNode("mi",h);he.setAttribute("mathvariant","normal");var Re=new _t.MathNode("mo",[vn("\u2061","text")]);return o.parentIsSupSub?new _t.MathNode("mo",[he,Re]):_t.newDocumentFragment([he,Re])};Lt({type:"operatorname",names:["\\operatorname","\\operatorname*"],props:{numArgs:1},handler:function(o,c){var h=o.parser,p=o.funcName,b=c[0];return{type:"operatorname",mode:h.mode,body:Jr(b),alwaysHandleSupSub:p==="\\operatorname*",limits:!1,parentIsSupSub:!1}},htmlBuilder:Gs,mathmlBuilder:ja}),Dn({type:"ordgroup",htmlBuilder:function(o,c){return o.semisimple?Pe.makeFragment(Yr(o.body,c,!1)):Pe.makeSpan(["mord"],Yr(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=Pe.makeLineSpan("overline-line",c),b=c.fontMetrics().defaultRuleThickness,S=Pe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:h},{type:"kern",size:3*b},{type:"elem",elem:p},{type:"kern",size:b}]},c);return Pe.makeSpan(["mord","overline"],[S],c)},mathmlBuilder:function(o,c){var h=new _t.MathNode("mo",[new _t.TextNode("\u203E")]);h.setAttribute("stretchy","true");var p=new _t.MathNode("mover",[vr(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=Yr(o.body,c.withPhantom(),!1);return Pe.makeFragment(h)},mathmlBuilder:function(o,c){var h=cn(o.body,c);return new _t.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=Pe.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=Pe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:h}]},c),Pe.makeSpan(["mord"],[h],c)},mathmlBuilder:function(o,c){var h=cn(Jr(o.body),c),p=new _t.MathNode("mphantom",h),b=new _t.MathNode("mpadded",[p]);return b.setAttribute("height","0px"),b.setAttribute("depth","0px"),b}}),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=Pe.makeSpan(["inner"],[ur(o.body,c.withPhantom())]),p=Pe.makeSpan(["fix"],[]);return Pe.makeSpan(["mord","rlap"],[h,p],c)},mathmlBuilder:function(o,c){var h=cn(Jr(o.body),c),p=new _t.MathNode("mphantom",h),b=new _t.MathNode("mpadded",[p]);return b.setAttribute("width","0px"),b}}),Lt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler:function(o,c){var h=o.parser,p=Wt(c[0],"size").value,b=c[1];return{type:"raisebox",mode:h.mode,dy:p,body:b}},htmlBuilder:function(o,c){var h=ur(o.body,c),p=cr(o.dy,c);return Pe.makeVList({positionType:"shift",positionData:-p,children:[{type:"elem",elem:h}]},c)},mathmlBuilder:function(o,c){var h=new _t.MathNode("mpadded",[vr(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,b=h[0],S=Wt(c[0],"size"),W=Wt(c[1],"size");return{type:"rule",mode:p.mode,shift:b&&Wt(b,"size").value,width:S.value,height:W.value}},htmlBuilder:function(o,c){var h=Pe.makeSpan(["mord","rule"],[],c),p=cr(o.width,c),b=cr(o.height,c),S=o.shift?cr(o.shift,c):0;return h.style.borderRightWidth=p+"em",h.style.borderTopWidth=b+"em",h.style.bottom=S+"em",h.width=p,h.height=b+S,h.depth=-S,h.maxFontSize=b*1.125*c.sizeMultiplier,h},mathmlBuilder:function(o,c){var h=cr(o.width,c),p=cr(o.height,c),b=o.shift?cr(o.shift,c):0,S=c.color&&c.getColor()||"black",W=new _t.MathNode("mspace");W.setAttribute("mathbackground",S),W.setAttribute("width",h+"em"),W.setAttribute("height",p+"em");var J=new _t.MathNode("mpadded",[W]);return b>=0?J.setAttribute("height","+"+b+"em"):(J.setAttribute("height",b+"em"),J.setAttribute("depth","+"+-b+"em")),J.setAttribute("voffset",b+"em"),J}});function Ks(D,o,c){for(var h=Yr(D,o,!1),p=o.sizeMultiplier/c.sizeMultiplier,b=0;b<h.length;b++){var S=h[b].classes.indexOf("sizing");S<0?Array.prototype.push.apply(h[b].classes,o.sizingClasses(c)):h[b].classes[S+1]==="reset-size"+o.size&&(h[b].classes[S+1]="reset-size"+c.size),h[b].height*=p,h[b].depth*=p}return Pe.makeFragment(h)}var ss=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Wa=function(o,c){var h=c.havingSize(o.size);return 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,b=o.parser,S=b.parseExpression(!1,h);return{type:"sizing",mode:b.mode,size:ss.indexOf(p)+1,body:S}},htmlBuilder:Wa,mathmlBuilder:function(o,c){var h=c.havingSize(o.size),p=cn(o.body,h),b=new _t.MathNode("mstyle",p);return b.setAttribute("mathsize",h.sizeMultiplier+"em"),b}}),Lt({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(o,c,h){var p=o.parser,b=!1,S=!1,W=h[0]&&Wt(h[0],"ordgroup");if(W)for(var J="",he=0;he<W.body.length;++he){var Re=W.body[he];if(J=Re.text,J==="t")b=!0;else if(J==="b")S=!0;else{b=!1,S=!1;break}}else b=!0,S=!0;var $e=c[0];return{type:"smash",mode:p.mode,body:$e,smashHeight:b,smashDepth:S}},htmlBuilder:function(o,c){var h=Pe.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 b=0;b<h.children.length;b++)h.children[b].depth=0;var S=Pe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:h}]},c);return Pe.makeSpan(["mord"],[S],c)},mathmlBuilder:function(o,c){var h=new _t.MathNode("mpadded",[vr(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,b=h[0],S=c[0];return{type:"sqrt",mode:p.mode,body:S,index:b}},htmlBuilder:function(o,c){var h=ur(o.body,c.havingCrampedStyle());h.height===0&&(h.height=c.fontMetrics().xHeight),h=Pe.wrapFragment(h,c);var p=c.fontMetrics(),b=p.defaultRuleThickness,S=b;c.style.id<E.TEXT.id&&(S=c.fontMetrics().xHeight);var W=b+S/4,J=h.height+h.depth+W+b,he=Yn.sqrtImage(J,c),Re=he.span,$e=he.ruleWidth,Xe=he.advanceWidth,ot=Re.height-$e;ot>h.height+h.depth+W&&(W=(W+ot-h.height-h.depth)/2);var pt=Re.height-h.height-W-$e;h.style.paddingLeft=Xe+"em";var St=Pe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:h,wrapperClasses:["svg-align"]},{type:"kern",size:-(h.height+pt)},{type:"elem",elem:Re},{type:"kern",size:$e}]},c);if(o.index){var Nt=c.havingStyle(E.SCRIPTSCRIPT),Zt=ur(o.index,Nt,c),Jt=.6*(St.height-St.depth),Xt=Pe.makeVList({positionType:"shift",positionData:-Jt,children:[{type:"elem",elem:Zt}]},c),Rr=Pe.makeSpan(["root"],[Xt]);return Pe.makeSpan(["mord","sqrt"],[Rr,St],c)}else return Pe.makeSpan(["mord","sqrt"],[St],c)},mathmlBuilder:function(o,c){var h=o.body,p=o.index;return p?new _t.MathNode("mroot",[vr(h,c),vr(p,c)]):new _t.MathNode("msqrt",[vr(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,b=o.parser,S=b.parseExpression(!0,h),W=p.slice(1,p.length-5);return{type:"styling",mode:b.mode,style:W,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),b=cn(o.body,p),S=new _t.MathNode("mstyle",b),W={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},J=W[o.style];return S.setAttribute("scriptlevel",J[0]),S.setAttribute("displaystyle",J[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 b=h.alwaysHandleSupSub&&(c.style.size===E.DISPLAY.size||h.limits);return b?Gs:null}else{if(h.type==="accent")return F.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,b=o.sup,S=o.sub,W=ur(p,c),J,he,Re=c.fontMetrics(),$e=0,Xe=0,ot=p&&F.isCharacterBox(p);if(b){var pt=c.havingStyle(c.style.sup());J=ur(b,pt,c),ot||($e=W.height-pt.fontMetrics().supDrop*pt.sizeMultiplier/c.sizeMultiplier)}if(S){var St=c.havingStyle(c.style.sub());he=ur(S,St,c),ot||(Xe=W.depth+St.fontMetrics().subDrop*St.sizeMultiplier/c.sizeMultiplier)}var Nt;c.style===E.DISPLAY?Nt=Re.sup1:c.style.cramped?Nt=Re.sup3:Nt=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");(W instanceof Q||Rr)&&(Xt=-W.italic+"em")}var Lr;if(J&&he){$e=Math.max($e,Nt,J.depth+.25*Re.xHeight),Xe=Math.max(Xe,Re.sub2);var $r=Re.defaultRuleThickness,jr=4*$r;if($e-J.depth-(he.height-Xe)<jr){Xe=jr-($e-J.depth)+he.height;var Xr=.8*Re.xHeight-($e-J.depth);Xr>0&&($e+=Xr,Xe-=Xr)}var yn=[{type:"elem",elem:he,shift:Xe,marginRight:Jt,marginLeft:Xt},{type:"elem",elem:J,shift:-$e,marginRight:Jt}];Lr=Pe.makeVList({positionType:"individualShift",children:yn},c)}else if(he){Xe=Math.max(Xe,Re.sub1,he.height-.8*Re.xHeight);var hn=[{type:"elem",elem:he,marginLeft:Xt,marginRight:Jt}];Lr=Pe.makeVList({positionType:"shift",positionData:Xe,children:hn},c)}else if(J)$e=Math.max($e,Nt,J.depth+.25*Re.xHeight),Lr=Pe.makeVList({positionType:"shift",positionData:-$e,children:[{type:"elem",elem:J,marginRight:Jt}]},c);else throw new Error("supsub must have either sup or sub.");var Dr=gn(W,"right")||"mord";return Pe.makeSpan([Dr],[W,Pe.makeSpan(["msupsub"],[Lr])],c)},mathmlBuilder:function(o,c){var h=!1,p,b,S=Pr(o.base,"horizBrace");S&&(b=!!o.sup,b===S.isOver&&(h=!0,p=S.isOver)),o.base&&(o.base.type==="op"||o.base.type==="operatorname")&&(o.base.parentIsSupSub=!0);var W=[vr(o.base,c)];o.sub&&W.push(vr(o.sub,c)),o.sup&&W.push(vr(o.sup,c));var J;if(h)J=p?"mover":"munder";else if(o.sub)if(o.sup){var $e=o.base;$e&&$e.type==="op"&&$e.limits&&c.style===E.DISPLAY||$e&&$e.type==="operatorname"&&$e.alwaysHandleSupSub&&(c.style===E.DISPLAY||$e.limits)?J="munderover":J="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)?J="munder":J="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)?J="mover":J="msup"}var Xe=new _t.MathNode(J,W);return Xe}}),Dn({type:"atom",htmlBuilder:function(o,c){return Pe.mathsym(o.text,o.mode,c,["m"+o.family])},mathmlBuilder:function(o,c){var h=new _t.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 Pe.makeOrd(o,c,"mathord")},mathmlBuilder:function(o,c){var h=new _t.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 Pe.makeOrd(o,c,"textord")},mathmlBuilder:function(o,c){var h=vn(o.text,o.mode,c),p=hi(o,c)||"normal",b;return o.mode==="text"?b=new _t.MathNode("mtext",[h]):/[0-9]/.test(o.text)?b=new _t.MathNode("mn",[h]):o.text==="\\prime"?b=new _t.MathNode("mo",[h]):b=new _t.MathNode("mi",[h]),p!==ga[b.type]&&b.setAttribute("mathvariant",p),b}});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=Pe.makeOrd(o,c,"textord");return p.classes.push(h),p}else return Pe.makeSpan(["mspace",h],[Pe.mathsym(o.text,o.mode,c)],c)}else{if(vs.hasOwnProperty(o.text))return Pe.makeSpan(["mspace",vs[o.text]],[],c);throw new pe('Unknown type of space "'+o.text+'"')}},mathmlBuilder:function(o,c){var h;if(ys.hasOwnProperty(o.text))h=new _t.MathNode("mtext",[new _t.TextNode("\xA0")]);else{if(vs.hasOwnProperty(o.text))return new _t.MathNode("mspace");throw new pe('Unknown type of space "'+o.text+'"')}return h}});var bs=function(){var o=new _t.MathNode("mtd",[]);return o.setAttribute("width","50%"),o};Dn({type:"tag",mathmlBuilder:function(o,c){var h=new _t.MathNode("mtable",[new _t.MathNode("mtr",[bs(),new _t.MathNode("mtd",[en(o.body,c)]),bs(),new _t.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,b=c[0];return{type:"text",mode:h.mode,body:Jr(b),font:p}},htmlBuilder:function(o,c){var h=ya(o,c),p=Yr(o.body,h,!0);return Pe.makeSpan(["mord","text"],Pe.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=Pe.makeLineSpan("underline-line",c),b=c.fontMetrics().defaultRuleThickness,S=Pe.makeVList({positionType:"top",positionData:h.height,children:[{type:"kern",size:b},{type:"elem",elem:p},{type:"kern",size:3*b},{type:"elem",elem:h}]},c);return Pe.makeSpan(["mord","underline"],[S],c)},mathmlBuilder:function(o,c){var h=new _t.MathNode("mo",[new _t.TextNode("\u203E")]);h.setAttribute("stretchy","true");var p=new _t.MathNode("munder",[vr(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 pe("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(o,c){for(var h=ba(o),p=[],b=c.havingStyle(c.style.text()),S=0;S<h.length;S++){var W=h[S];W==="~"&&(W="\\textasciitilde"),p.push(Pe.makeSymbol(W,"Typewriter-Regular",o.mode,b,["mord","texttt"]))}return Pe.makeSpan(["mord","text"].concat(b.sizingClasses(c)),Pe.tryCombineChars(p),b)},mathmlBuilder:function(o,c){var h=new _t.TextNode(ba(o)),p=new _t.MathNode("mtext",[h]);return p.setAttribute("mathvariant","monospace"),p}});var ba=function(o){return o.body.replace(/ /g,o.star?"\u2423":"\xA0")},qa=$i,qi=qa,js=`[ \r
|
|
]`,Ws="\\\\[a-zA-Z@]+",Ya="\\\\[^\uD800-\uDFFF]",xa=""+Ws+js+"*",Za=new RegExp("^("+Ws+")"+js+"*$"),Vs="[\u0300-\u036F]",ln=new RegExp(Vs+"+$"),Di="("+js+"+)|([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(Vs+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(Vs+"*")+"|\\\\verb\\*([^]).*?\\3|\\\\verb([^*a-zA-Z]).*?\\4|\\\\operatorname\\*"+("|"+xa)+("|"+Ya+")"),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 Ie("EOF",new Le(this,p,p));var b=this.tokenRegex.exec(h);if(b===null||b.index!==p)throw new pe("Unexpected character: '"+h[p]+"'",new Ie(h[p],new Le(this,p,p+1)));var S=b[2]||" ";if(this.catcodes[S]===14){var W=h.indexOf(`
|
|
`,this.tokenRegex.lastIndex);return W===-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=W+1,this.lex()}var J=S.match(Za);return J&&(S=J[1]),new Ie(S,new Le(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 pe("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,b){if(b===void 0&&(b=!1),b){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 W=this.undefStack[this.undefStack.length-1];W&&!W.hasOwnProperty(h)&&(W[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 pe("\\char` missing argument");h=o.text.charCodeAt(0)}else c=10;if(c){if(h=Ni[o.text],h==null||h>=c)throw new pe("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 qs=function(o,c){var h=o.consumeArgs(1)[0];if(h.length!==1)throw new pe("\\gdef's first argument must be a macro name");var p=h[0].text,b=0;for(h=o.consumeArgs(1)[0];h.length===1&&h[0].text==="#";){if(h=o.consumeArgs(1)[0],h.length!==1)throw new pe('Invalid argument number length "'+h.length+'"');if(!/^[1-9]$/.test(h[0].text))throw new pe('Invalid argument number "'+h[0].text+'"');if(b++,parseInt(h[0].text)!==b)throw new pe('Argument number "'+h[0].text+'" out of order');h=o.consumeArgs(1)[0]}return o.macros.set(p,{tokens:h,numArgs:b},c),""};ie("\\gdef",function(D){return qs(D,!0)}),ie("\\def",function(D){return qs(D,!1)}),ie("\\global",function(D){var o=D.consumeArgs(1)[0];if(o.length!==1)throw new pe("Invalid command after \\global");var c=o[0].text;if(c==="\\def")return qs(D,!0);throw new pe("Invalid command '"+c+"' after \\global")});var Es=function(o,c,h){var p=o.consumeArgs(1)[0];if(p.length!==1)throw new pe("\\newcommand's first argument must be a macro name");var b=p[0].text,S=o.isDefined(b);if(S&&!c)throw new pe("\\newcommand{"+b+"} attempting to redefine "+(b+"; use \\renewcommand"));if(!S&&!h)throw new pe("\\renewcommand{"+b+"} when command "+b+" does not yet exist; use \\newcommand");var W=0;if(p=o.consumeArgs(1)[0],p.length===1&&p[0].text==="["){for(var J="",he=o.expandNextToken();he.text!=="]"&&he.text!=="EOF";)J+=he.text,he=o.expandNextToken();if(!J.match(/^\s*[0-9]+\s*$/))throw new pe("Invalid number of arguments: "+J);W=parseInt(J),p=o.consumeArgs(1)[0]}return o.macros.set(b,{tokens:p,numArgs:W}),""};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 yt.math&&F.contains(["bin","rel"],yt.math[c].group))&&(o="\\dotsb"),o});var qe={")":!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 qe?"\\ldots\\,":"\\ldots"}),ie("\\dotsc",function(D){var o=D.future().text;return o in qe&&o!==","?"\\ldots\\,":"\\ldots"}),ie("\\cdots",function(D){var o=D.future().text;return o in qe?"\\@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 pe("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 Ys=Ze["Main-Regular"][84][1]-.7*Ze["Main-Regular"][65][1]+"em";ie("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Ys+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),ie("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Ys+"}{\\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 As={"\\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=[],b=0;b<h;++b){this.consumeSpaces();var S=this.popToken();if(S.text==="{"){for(var W=[],J=1;J!==0;){var he=this.popToken();if(W.push(he),he.text==="{")++J;else if(he.text==="}")--J;else if(he.text==="EOF")throw new pe("End of input in macro argument",S)}W.pop(),W.reverse(),p[b]=W}else{if(S.text==="EOF")throw new pe("End of input expecting macro argument");p[b]=[S]}}return p},o.expandOnce=function(){var h=this.popToken(),p=h.text,b=this._getExpansion(p);if(b==null)return this.pushToken(h),h;if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new pe("Too many expansions: infinite loop or need to increase maxExpand setting");var S=b.tokens;if(b.numArgs){var W=this.consumeArgs(b.numArgs);S=S.slice();for(var J=S.length-1;J>=0;--J){var he=S[J];if(he.text==="#"){if(J===0)throw new pe("Incomplete placeholder at end of macro body",he);if(he=S[--J],he.text==="#")S.splice(J+1,1);else if(/^[1-9]$/.test(he.text)){var Re;(Re=S).splice.apply(Re,[J,2].concat(W[+he.text-1]))}else throw new pe("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 Ie)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=[],b=this.stack.length;for(this.pushToken(new Ie(h));this.stack.length>b;){var S=this.expandOnce();S instanceof Ie&&p.push(this.stack.pop())}return p}},o.expandMacroAsText=function(h){var p=this.expandMacro(h);return p&&p.map(function(b){return b.text}).join("")},o._getExpansion=function(h){var p=this.macros.get(h);if(p==null)return p;var b=typeof p=="function"?p(this):p;if(typeof b=="string"){var S=0;if(b.indexOf("#")!==-1)for(var W=b.replace(/##/g,"");W.indexOf("#"+(S+1))!==-1;)++S;for(var J=new xs(b,this.settings),he=[],Re=J.lex();Re.text!=="EOF";)he.push(Re),Re=J.lex();he.reverse();var $e={tokens:he,numArgs:S};return $e}return b},o.isDefined=function(h){return this.macros.has(h)||qi.hasOwnProperty(h)||yt.math.hasOwnProperty(h)||yt.text.hasOwnProperty(h)||As.hasOwnProperty(h)},D}(),Yi={"\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"},Ts=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 pe("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 b=[];;){this.mode==="math"&&this.consumeSpaces();var S=this.fetch();if(D.endOfExpression.indexOf(S.text)!==-1||p&&S.text===p||h&&qi[S.text]&&qi[S.text].infix)break;var W=this.parseAtom(p);if(!W)break;b.push(W)}return this.mode==="text"&&this.formLigatures(b),this.handleInfixNodes(b)},o.handleInfixNodes=function(h){for(var p=-1,b,S=0;S<h.length;S++){var W=Pr(h[S],"infix");if(W){if(p!==-1)throw new pe("only one infix operator per group",W.token);p=S,b=W.replaceWith}}if(p!==-1&&b){var J,he,Re=h.slice(0,p),$e=h.slice(p+1);Re.length===1&&Re[0].type==="ordgroup"?J=Re[0]:J={type:"ordgroup",mode:this.mode,body:Re},$e.length===1&&$e[0].type==="ordgroup"?he=$e[0]:he={type:"ordgroup",mode:this.mode,body:$e};var Xe;return b==="\\\\abovefrac"?Xe=this.callFunction(b,[J,h[p],he],[]):Xe=this.callFunction(b,[J,he],[]),[Xe]}else return h},o.handleSupSubscript=function(h){var p=this.fetch(),b=p.text;this.consume();var S=this.parseGroup(h,!1,D.SUPSUB_GREEDINESS,void 0,void 0,!0);if(!S)throw new pe("Expected group after '"+b+"'",p);return S},o.formatUnsupportedCmd=function(h){for(var p=[],b=0;b<h.length;b++)p.push({type:"textord",mode:"text",text:h[b]});var S={type:"text",mode:this.mode,body:p},W={type:"color",mode:this.mode,color:this.settings.errorColor,body:[S]};return W},o.parseAtom=function(h){var p=this.parseGroup("atom",!1,null,h);if(this.mode==="text")return p;for(var b,S;;){this.consumeSpaces();var W=this.fetch();if(W.text==="\\limits"||W.text==="\\nolimits"){var J=Pr(p,"op");if(J){var he=W.text==="\\limits";J.limits=he,J.alwaysHandleSupSub=!0}else if(J=Pr(p,"operatorname"),J&&J.alwaysHandleSupSub){var Re=W.text==="\\limits";J.limits=Re}else throw new pe("Limit controls must follow a math operator",W);this.consume()}else if(W.text==="^"){if(b)throw new pe("Double superscript",W);b=this.handleSupSubscript("superscript")}else if(W.text==="_"){if(S)throw new pe("Double subscript",W);S=this.handleSupSubscript("subscript")}else if(W.text==="'"){if(b)throw new pe("Double superscript",W);var $e={type:"textord",mode:this.mode,text:"\\prime"},Xe=[$e];for(this.consume();this.fetch().text==="'";)Xe.push($e),this.consume();this.fetch().text==="^"&&Xe.push(this.handleSupSubscript("superscript")),b={type:"ordgroup",mode:this.mode,body:Xe}}else break}return b||S?{type:"supsub",mode:this.mode,base:p,sup:b,sub:S}:p},o.parseFunction=function(h,p,b){var S=this.fetch(),W=S.text,J=qi[W];if(!J)return null;if(this.consume(),b!=null&&J.greediness<=b)throw new pe("Got function '"+W+"' with no arguments"+(p?" as "+p:""),S);if(this.mode==="text"&&!J.allowedInText)throw new pe("Can't use function '"+W+"' in text mode",S);if(this.mode==="math"&&J.allowedInMath===!1)throw new pe("Can't use function '"+W+"' in math mode",S);var he=this.parseArguments(W,J),Re=he.args,$e=he.optArgs;return this.callFunction(W,Re,$e,S,h)},o.callFunction=function(h,p,b,S,W){var J={funcName:h,parser:this,token:S,breakOnTokenText:W},he=qi[h];if(he&&he.handler)return he.handler(J,p,b);throw new pe("No function handler for "+h)},o.parseArguments=function(h,p){var b=p.numArgs+p.numOptionalArgs;if(b===0)return{args:[],optArgs:[]};for(var S=p.greediness,W=[],J=[],he=0;he<b;he++){var Re=p.argTypes&&p.argTypes[he],$e=he<p.numOptionalArgs,Xe=he>0&&!$e||he===0&&!$e&&this.mode==="math",ot=this.parseGroupOfType("argument to '"+h+"'",Re,$e,S,Xe);if(!ot){if($e){J.push(null);continue}throw new pe("Expected group after '"+h+"'",this.fetch())}($e?J:W).push(ot)}return{args:W,optArgs:J}},o.parseGroupOfType=function(h,p,b,S,W){switch(p){case"color":return W&&this.consumeSpaces(),this.parseColorGroup(b);case"size":return W&&this.consumeSpaces(),this.parseSizeGroup(b);case"url":return this.parseUrlGroup(b,W);case"math":case"text":return this.parseGroup(h,b,S,void 0,p,W);case"hbox":{var J=this.parseGroup(h,b,S,void 0,"text",W);if(!J)return J;var he={type:"styling",mode:J.mode,body:[J],style:"text"};return he}case"raw":{if(W&&this.consumeSpaces(),b&&this.fetch().text==="{")return null;var Re=this.parseStringGroup("raw",b,!0);if(Re)return{type:"raw",mode:"text",string:Re.text};throw new pe("Expected raw group",this.fetch())}case"original":case null:case void 0:return this.parseGroup(h,b,S,void 0,void 0,W);default:throw new pe("Unknown group type as "+h,this.fetch())}},o.consumeSpaces=function(){for(;this.fetch().text===" ";)this.consume()},o.parseStringGroup=function(h,p,b){var S=p?"[":"{",W=p?"]":"}",J=this.fetch();if(J.text!==S){if(p)return null;if(b&&J.text!=="EOF"&&/[^{}[\]]/.test(J.text))return this.consume(),J}var he=this.mode;this.mode="text",this.expect(S);for(var Re="",$e=this.fetch(),Xe=0,ot=$e,pt;(pt=this.fetch()).text!==W||b&&Xe>0;){switch(pt.text){case"EOF":throw new pe("Unexpected end of input in "+h,$e.range(ot,Re));case S:Xe++;break;case W:Xe--;break}ot=pt,Re+=ot.text,this.consume()}return this.expect(W),this.mode=he,$e.range(ot,Re)},o.parseRegexGroup=function(h,p){var b=this.mode;this.mode="text";for(var S=this.fetch(),W=S,J="",he;(he=this.fetch()).text!=="EOF"&&h.test(J+he.text);)W=he,J+=W.text,this.consume();if(J==="")throw new pe("Invalid "+p+": '"+S.text+"'",S);return this.mode=b,S.range(W,J)},o.parseColorGroup=function(h){var p=this.parseStringGroup("color",h);if(!p)return null;var b=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(p.text);if(!b)throw new pe("Invalid color: '"+p.text+"'",p);var S=b[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,b=!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",b=!0);var S=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(p.text);if(!S)throw new pe("Invalid size: '"+p.text+"'",p);var W={number:+(S[1]+S[2]),unit:S[3]};if(!Or(W))throw new pe("Invalid unit: '"+W.unit+"'",p);return{type:"size",mode:this.mode,value:W,isBlank:b}},o.parseUrlGroup=function(h,p){this.gullet.lexer.setCatcode("%",13);var b=this.parseStringGroup("url",h,!0);if(this.gullet.lexer.setCatcode("%",14),!b)return null;var S=b.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:S}},o.parseGroup=function(h,p,b,S,W,J){var he=this.mode;W&&this.switchMode(W),J&&this.consumeSpaces();var Re=this.fetch(),$e=Re.text,Xe;if(p?$e==="[":$e==="{"||$e==="\\begingroup"){this.consume();var ot=D.endOfGroup[$e];this.gullet.beginGroup();var pt=this.parseExpression(!1,ot),St=this.fetch();this.expect(ot),this.gullet.endGroup(),Xe={type:"ordgroup",mode:this.mode,loc:Le.range(Re,St),body:pt,semisimple:$e==="\\begingroup"||void 0}}else if(p)Xe=null;else if(Xe=this.parseFunction(S,h,b)||this.parseSymbol(),Xe==null&&$e[0]==="\\"&&!As.hasOwnProperty($e)){if(this.settings.throwOnError)throw new pe("Undefined control sequence: "+$e,Re);Xe=this.formatUnsupportedCmd($e),this.consume()}return W&&this.switchMode(he),Xe},o.formLigatures=function(h){for(var p=h.length-1,b=0;b<p;++b){var S=h[b],W=S.text;W==="-"&&h[b+1].text==="-"&&(b+1<p&&h[b+2].text==="-"?(h.splice(b,3,{type:"textord",mode:"text",loc:Le.range(S,h[b+2]),text:"---"}),p-=2):(h.splice(b,2,{type:"textord",mode:"text",loc:Le.range(S,h[b+1]),text:"--"}),p-=1)),(W==="'"||W==="`")&&h[b+1].text===W&&(h.splice(b,2,{type:"textord",mode:"text",loc:Le.range(S,h[b+1]),text:W+W}),p-=1)}},o.parseSymbol=function(){var h=this.fetch(),p=h.text;if(/^\\verb[^a-zA-Z]/.test(p)){this.consume();var b=p.slice(5),S=b.charAt(0)==="*";if(S&&(b=b.slice(1)),b.length<2||b.charAt(0)!==b.slice(-1))throw new pe(`\\verb assertion failed --
|
|
please report what input caused this bug`);return b=b.slice(1,-1),{type:"verb",mode:"text",body:b,star:S}}Ea.hasOwnProperty(p[0])&&!yt[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 W=ln.exec(p);W&&(p=p.substring(0,W.index),p==="i"?p="\u0131":p==="j"&&(p="\u0237"));var J;if(yt[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=yt[this.mode][p].group,Re=Le.range(h),$e;if(wt.hasOwnProperty(he)){var Xe=he;$e={type:"atom",mode:this.mode,family:Xe,loc:Re,text:p}}else $e={type:he,mode:this.mode,loc:Re,text:p};J=$e}else if(p.charCodeAt(0)>=128)this.settings.strict&&(je(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)),J={type:"textord",mode:"text",loc:Le.range(h),text:p};else return null;if(this.consume(),W)for(var ot=0;ot<W[0].length;ot++){var pt=W[0][ot];if(!Yi[pt])throw new pe("Unknown accent ' "+pt+"'",h);var St=Yi[pt][this.mode];if(!St)throw new pe("Accent "+pt+" unsupported in "+this.mode+" mode",h);J={type:"accent",mode:this.mode,loc:Le.range(h),label:St,isStretchy:!1,isShifty:!0,base:J}}return J},D}();Ts.endOfExpression=["}","\\endgroup","\\end","\\right","&"],Ts.endOfGroup={"[":"]","{":"}","\\begingroup":"\\endgroup"},Ts.SUPSUB_GREEDINESS=1;var Aa=function(o,c){if(!(typeof o=="string"||o instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var h=new Ts(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 pe("\\tag works only in display equations");h.gullet.feed("\\df@tag"),p=[{type:"tag",mode:"text",body:p,tag:h.parse()}]}return p},Zs=Aa,Ta=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."),Ta=function(){throw new pe("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 R(c);return Zs(o,h)},as=function(o,c,h){if(h.throwOnError||!(o instanceof pe))throw o;var p=Pe.makeSpan(["katex-error"],[new Q(c)]);return p.setAttribute("title",o.toString()),p.setAttribute("style","color:"+h.errorColor),p},Cn=function(o,c){var h=new R(c);try{var p=Zs(o,h);return $n(p,o,h)}catch(b){return as(b,o,h)}},Ja=function(o,c){var h=new R(c);try{var p=Zs(o,h);return Pi(p,o,h)}catch(b){return as(b,o,h)}},Sa={version:"0.11.1",render:Ta,renderToString:Zi,ParseError:pe,__parse:Xs,__renderToDomTree:Cn,__renderToHTMLTree:Ja,__setFontMetrics:vt,__defineSymbol:_,__defineMacro:ie,__domTree:{Span:ue,Anchor:Me,SymbolNode:Q,SvgNode:ye,PathNode:fe,LineNode:Te}},eo=ne.default=Sa}]).default})},32834:function(Bt){(function(it,ne){Bt.exports=ne()})(this,function(){"use strict";function it(ce,Ae){for(var Fe=0;Fe<Ae.length;Fe++){var B=Ae[Fe];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(ce,B.key,B)}}function ne(ce,Ae,Fe){return Ae&&it(ce.prototype,Ae),Fe&&it(ce,Fe),ce}function se(ce,Ae){if(ce){if(typeof ce=="string")return xe(ce,Ae);var Fe=Object.prototype.toString.call(ce).slice(8,-1);if(Fe==="Object"&&ce.constructor&&(Fe=ce.constructor.name),Fe==="Map"||Fe==="Set")return Array.from(ce);if(Fe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Fe))return xe(ce,Ae)}}function xe(ce,Ae){(Ae==null||Ae>ce.length)&&(Ae=ce.length);for(var Fe=0,B=new Array(Ae);Fe<Ae;Fe++)B[Fe]=ce[Fe];return B}function Le(ce,Ae){var Fe=typeof Symbol!="undefined"&&ce[Symbol.iterator]||ce["@@iterator"];if(Fe)return(Fe=Fe.call(ce)).next.bind(Fe);if(Array.isArray(ce)||(Fe=se(ce))||Ae&&ce&&typeof ce.length=="number"){Fe&&(ce=Fe);var B=0;return function(){return B>=ce.length?{done:!0}:{done:!1,value:ce[B++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ie={exports:{}};function Ne(){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 pe(ce){Ie.exports.defaults=ce}Ie.exports={defaults:Ne(),getDefaults:Ne,changeDefaults:pe};var Oe=/[&<>"']/,Ee=/[&<>"']/g,l=/[<>"']|&(?!#?\w+;)/,K=/[<>"']|&(?!#?\w+;)/g,N={"&":"&","<":"<",">":">",'"':""","'":"'"},A=function(Ae){return N[Ae]};function d(ce,Ae){if(Ae){if(Oe.test(ce))return ce.replace(Ee,A)}else if(l.test(ce))return ce.replace(K,A);return ce}var x=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function y(ce){return ce.replace(x,function(Ae,Fe){return Fe=Fe.toLowerCase(),Fe==="colon"?":":Fe.charAt(0)==="#"?Fe.charAt(1)==="x"?String.fromCharCode(parseInt(Fe.substring(2),16)):String.fromCharCode(+Fe.substring(1)):""})}var $=/(^|[^\[])\^/g;function H(ce,Ae){ce=ce.source||ce,Ae=Ae||"";var Fe={replace:function(q,oe){return oe=oe.source||oe,oe=oe.replace($,"$1"),ce=ce.replace(q,oe),Fe},getRegex:function(){return new RegExp(ce,Ae)}};return Fe}var F=/[^\w:]/g,R=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function V(ce,Ae,Fe){if(ce){var B;try{B=decodeURIComponent(y(Fe)).replace(F,"").toLowerCase()}catch(q){return null}if(B.indexOf("javascript:")===0||B.indexOf("vbscript:")===0||B.indexOf("data:")===0)return null}Ae&&!R.test(Fe)&&(Fe=de(Ae,Fe));try{Fe=encodeURI(Fe).replace(/%25/g,"%")}catch(q){return null}return Fe}var te={},C=/^[^:]+:\/*[^/]*$/,_e=/^([^:]+:)[\s\S]*$/,ve=/^([^:]+:\/*[^/]*)[\s\S]*$/;function de(ce,Ae){te[" "+ce]||(C.test(ce)?te[" "+ce]=ce+"/":te[" "+ce]=Be(ce,"/",!0)),ce=te[" "+ce];var Fe=ce.indexOf(":")===-1;return Ae.substring(0,2)==="//"?Fe?Ae:ce.replace(_e,"$1")+Ae:Ae.charAt(0)==="/"?Fe?Ae:ce.replace(ve,"$1")+Ae:ce+Ae}var we={exec:function(){}};function Ce(ce){for(var Ae=1,Fe,B;Ae<arguments.length;Ae++){Fe=arguments[Ae];for(B in Fe)Object.prototype.hasOwnProperty.call(Fe,B)&&(ce[B]=Fe[B])}return ce}function Se(ce,Ae){var Fe=ce.replace(/\|/g,function(oe,be,L){for(var dt=!1,ae=be;--ae>=0&&L[ae]==="\\";)dt=!dt;return dt?"|":" |"}),B=Fe.split(/ \|/),q=0;if(B.length>Ae)B.splice(Ae);else for(;B.length<Ae;)B.push("");for(;q<B.length;q++)B[q]=B[q].trim().replace(/\\\|/g,"|");return B}function Be(ce,Ae,Fe){var B=ce.length;if(B===0)return"";for(var q=0;q<B;){var oe=ce.charAt(B-q-1);if(oe===Ae&&!Fe)q++;else if(oe!==Ae&&Fe)q++;else break}return ce.substr(0,B-q)}function G(ce,Ae){if(ce.indexOf(Ae[1])===-1)return-1;for(var Fe=ce.length,B=0,q=0;q<Fe;q++)if(ce[q]==="\\")q++;else if(ce[q]===Ae[0])B++;else if(ce[q]===Ae[1]&&(B--,B<0))return q;return-1}function U(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 j(ce,Ae){if(Ae<1)return"";for(var Fe="";Ae>1;)Ae&1&&(Fe+=ce),Ae>>=1,ce+=ce;return Fe+ce}var Z={escape:d,unescape:y,edit:H,cleanUrl:V,resolveUrl:de,noopTest:we,merge:Ce,splitCells:Se,rtrim:Be,findClosingBracket:G,checkSanitizeDeprecation:U,repeatString:j},le=Ie.exports.defaults,ee=Z.rtrim,E=Z.splitCells,T=Z.escape,X=Z.findClosingBracket;function ge(ce,Ae,Fe){var B=Ae.href,q=Ae.title?T(Ae.title):null,oe=ce[1].replace(/\\([\[\]])/g,"$1");return ce[0].charAt(0)!=="!"?{type:"link",raw:Fe,href:B,title:q,text:oe}:{type:"image",raw:Fe,href:B,title:q,text:T(oe)}}function je(ce,Ae){var Fe=ce.match(/^(\s+)(?:```)/);if(Fe===null)return Ae;var B=Fe[1];return Ae.split(`
|
|
`).map(function(q){var oe=q.match(/^\s+/);if(oe===null)return q;var be=oe[0];return be.length>=B.length?q.slice(B.length):q}).join(`
|
|
`)}var Qe=function(){function ce(Fe){this.options=Fe||le}var Ae=ce.prototype;return Ae.space=function(B){var q=this.rules.block.newline.exec(B);if(q)return q[0].length>1?{type:"space",raw:q[0]}:{raw:`
|
|
`}},Ae.code=function(B){var q=this.rules.block.code.exec(B);if(q){var oe=q[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:q[0],codeBlockStyle:"indented",text:this.options.pedantic?oe:ee(oe,`
|
|
`)}}},Ae.fences=function(B){var q=this.rules.block.fences.exec(B);if(q){var oe=q[0],be=je(oe,q[3]||"");return{type:"code",raw:oe,lang:q[2]?q[2].trim():q[2],text:be}}},Ae.heading=function(B){var q=this.rules.block.heading.exec(B);if(q){var oe=q[2].trim();if(/#$/.test(oe)){var be=ee(oe,"#");(this.options.pedantic||!be||/ $/.test(be))&&(oe=be.trim())}return{type:"heading",raw:q[0],depth:q[1].length,text:oe}}},Ae.nptable=function(B){var q=this.rules.block.nptable.exec(B);if(q){var oe={type:"table",header:E(q[1].replace(/^ *| *\| *$/g,"")),align:q[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:q[3]?q[3].replace(/\n$/,"").split(`
|
|
`):[],raw:q[0]};if(oe.header.length===oe.align.length){var be=oe.align.length,L;for(L=0;L<be;L++)/^ *-+: *$/.test(oe.align[L])?oe.align[L]="right":/^ *:-+: *$/.test(oe.align[L])?oe.align[L]="center":/^ *:-+ *$/.test(oe.align[L])?oe.align[L]="left":oe.align[L]=null;for(be=oe.cells.length,L=0;L<be;L++)oe.cells[L]=E(oe.cells[L],oe.header.length);return oe}}},Ae.hr=function(B){var q=this.rules.block.hr.exec(B);if(q)return{type:"hr",raw:q[0]}},Ae.blockquote=function(B){var q=this.rules.block.blockquote.exec(B);if(q){var oe=q[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:q[0],text:oe}}},Ae.list=function(B){var q=this.rules.block.list.exec(B);if(q){var oe=q[0],be=q[2],L=be.length>1,dt={type:"list",raw:oe,ordered:L,start:L?+be.slice(0,-1):"",loose:!1,items:[]},ae=q[0].match(this.rules.block.item),At=!1,Ct,Mt,br,Ht,Ot,Ar,Br,Gr,zr,Tt=ae.length;br=this.rules.block.listItemStart.exec(ae[0]);for(var jt=0;jt<Tt;jt++){if(Ct=ae[jt],oe=Ct,this.options.pedantic||(zr=Ct.match(new RegExp("\\n\\s*\\n {0,"+(br[0].length-1)+"}\\S")),zr&&(Ot=Ct.length-zr.index+ae.slice(jt+1).join(`
|
|
`).length,dt.raw=dt.raw.substring(0,dt.raw.length-Ot),Ct=Ct.substring(0,zr.index),oe=Ct,Tt=jt+1)),jt!==Tt-1){if(Ht=this.rules.block.listItemStart.exec(ae[jt+1]),this.options.pedantic?Ht[1].length>br[1].length:Ht[1].length>=br[0].length||Ht[1].length>3){ae.splice(jt,2,ae[jt]+(!this.options.pedantic&&Ht[1].length<br[0].length&&!ae[jt].match(/\n$/)?"":`
|
|
`)+ae[jt+1]),jt--,Tt--;continue}else(!this.options.pedantic||this.options.smartLists?Ht[2][Ht[2].length-1]!==be[be.length-1]:L===(Ht[2].length===1))&&(Ot=ae.slice(jt+1).join(`
|
|
`).length,dt.raw=dt.raw.substring(0,dt.raw.length-Ot),jt=Tt-1);br=Ht}Mt=Ct.length,Ct=Ct.replace(/^ *([*+-]|\d+[.)]) ?/,""),~Ct.indexOf(`
|
|
`)&&(Mt-=Ct.length,Ct=this.options.pedantic?Ct.replace(/^ {1,4}/gm,""):Ct.replace(new RegExp("^ {1,"+Mt+"}","gm"),"")),Ct=ee(Ct,`
|
|
`),jt!==Tt-1&&(oe=oe+`
|
|
`),Ar=At||/\n\n(?!\s*$)/.test(oe),jt!==Tt-1&&(At=oe.slice(-2)===`
|
|
|
|
`,Ar||(Ar=At)),Ar&&(dt.loose=!0),this.options.gfm&&(Br=/^\[[ xX]\] /.test(Ct),Gr=void 0,Br&&(Gr=Ct[1]!==" ",Ct=Ct.replace(/^\[[ xX]\] +/,""))),dt.items.push({type:"list_item",raw:oe,task:Br,checked:Gr,loose:Ar,text:Ct})}return dt}},Ae.html=function(B){var q=this.rules.block.html.exec(B);if(q)return{type:this.options.sanitize?"paragraph":"html",raw:q[0],pre:!this.options.sanitizer&&(q[1]==="pre"||q[1]==="script"||q[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(q[0]):T(q[0]):q[0]}},Ae.def=function(B){var q=this.rules.block.def.exec(B);if(q){q[3]&&(q[3]=q[3].substring(1,q[3].length-1));var oe=q[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:oe,raw:q[0],href:q[2],title:q[3]}}},Ae.table=function(B){var q=this.rules.block.table.exec(B);if(q){var oe={type:"table",header:E(q[1].replace(/^ *| *\| *$/g,"")),align:q[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:q[3]?q[3].replace(/\n$/,"").split(`
|
|
`):[]};if(oe.header.length===oe.align.length){oe.raw=q[0];var be=oe.align.length,L;for(L=0;L<be;L++)/^ *-+: *$/.test(oe.align[L])?oe.align[L]="right":/^ *:-+: *$/.test(oe.align[L])?oe.align[L]="center":/^ *:-+ *$/.test(oe.align[L])?oe.align[L]="left":oe.align[L]=null;for(be=oe.cells.length,L=0;L<be;L++)oe.cells[L]=E(oe.cells[L].replace(/^ *\| *| *\| *$/g,""),oe.header.length);return oe}}},Ae.lheading=function(B){var q=this.rules.block.lheading.exec(B);if(q)return{type:"heading",raw:q[0],depth:q[2].charAt(0)==="="?1:2,text:q[1]}},Ae.paragraph=function(B){var q=this.rules.block.paragraph.exec(B);if(q)return{type:"paragraph",raw:q[0],text:q[1].charAt(q[1].length-1)===`
|
|
`?q[1].slice(0,-1):q[1]}},Ae.text=function(B){var q=this.rules.block.text.exec(B);if(q)return{type:"text",raw:q[0],text:q[0]}},Ae.escape=function(B){var q=this.rules.inline.escape.exec(B);if(q)return{type:"escape",raw:q[0],text:T(q[1])}},Ae.tag=function(B,q,oe){var be=this.rules.inline.tag.exec(B);if(be)return!q&&/^<a /i.test(be[0])?q=!0:q&&/^<\/a>/i.test(be[0])&&(q=!1),!oe&&/^<(pre|code|kbd|script)(\s|>)/i.test(be[0])?oe=!0:oe&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(be[0])&&(oe=!1),{type:this.options.sanitize?"text":"html",raw:be[0],inLink:q,inRawBlock:oe,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(be[0]):T(be[0]):be[0]}},Ae.link=function(B){var q=this.rules.inline.link.exec(B);if(q){var oe=q[2].trim();if(!this.options.pedantic&&/^</.test(oe)){if(!/>$/.test(oe))return;var be=ee(oe.slice(0,-1),"\\");if((oe.length-be.length)%2===0)return}else{var L=X(q[2],"()");if(L>-1){var dt=q[0].indexOf("!")===0?5:4,ae=dt+q[1].length+L;q[2]=q[2].substring(0,L),q[0]=q[0].substring(0,ae).trim(),q[3]=""}}var At=q[2],Ct="";if(this.options.pedantic){var Mt=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(At);Mt&&(At=Mt[1],Ct=Mt[3])}else Ct=q[3]?q[3].slice(1,-1):"";return At=At.trim(),/^</.test(At)&&(this.options.pedantic&&!/>$/.test(oe)?At=At.slice(1):At=At.slice(1,-1)),ge(q,{href:At&&At.replace(this.rules.inline._escapes,"$1"),title:Ct&&Ct.replace(this.rules.inline._escapes,"$1")},q[0])}},Ae.reflink=function(B,q){var oe;if((oe=this.rules.inline.reflink.exec(B))||(oe=this.rules.inline.nolink.exec(B))){var be=(oe[2]||oe[1]).replace(/\s+/g," ");if(be=q[be.toLowerCase()],!be||!be.href){var L=oe[0].charAt(0);return{type:"text",raw:L,text:L}}return ge(oe,be,oe[0])}},Ae.emStrong=function(B,q,oe){oe===void 0&&(oe="");var be=this.rules.inline.emStrong.lDelim.exec(B);if(be&&!(be[3]&&oe.match(/(?:[0-9A-Za-z\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u08A0-\u08B4\u08B6-\u08C7\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\u9FFC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7BF\uA7C2-\uA7CA\uA7F5-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEC0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD1E\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDD\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/))){var L=be[1]||be[2]||"";if(!L||L&&(oe===""||this.rules.inline.punctuation.exec(oe))){var dt=be[0].length-1,ae,At,Ct=dt,Mt=0,br=be[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(br.lastIndex=0,q=q.slice(-1*B.length+dt);(be=br.exec(q))!=null;)if(ae=be[1]||be[2]||be[3]||be[4]||be[5]||be[6],!!ae){if(At=ae.length,be[3]||be[4]){Ct+=At;continue}else if((be[5]||be[6])&&dt%3&&!((dt+At)%3)){Mt+=At;continue}if(Ct-=At,!(Ct>0))return At=Math.min(At,At+Ct+Mt),Math.min(dt,At)%2?{type:"em",raw:B.slice(0,dt+be.index+At+1),text:B.slice(1,dt+be.index+At)}:{type:"strong",raw:B.slice(0,dt+be.index+At+1),text:B.slice(2,dt+be.index+At-1)}}}}},Ae.codespan=function(B){var q=this.rules.inline.code.exec(B);if(q){var oe=q[2].replace(/\n/g," "),be=/[^ ]/.test(oe),L=/^ /.test(oe)&&/ $/.test(oe);return be&&L&&(oe=oe.substring(1,oe.length-1)),oe=T(oe,!0),{type:"codespan",raw:q[0],text:oe}}},Ae.br=function(B){var q=this.rules.inline.br.exec(B);if(q)return{type:"br",raw:q[0]}},Ae.del=function(B){var q=this.rules.inline.del.exec(B);if(q)return{type:"del",raw:q[0],text:q[2]}},Ae.autolink=function(B,q){var oe=this.rules.inline.autolink.exec(B);if(oe){var be,L;return oe[2]==="@"?(be=T(this.options.mangle?q(oe[1]):oe[1]),L="mailto:"+be):(be=T(oe[1]),L=be),{type:"link",raw:oe[0],text:be,href:L,tokens:[{type:"text",raw:be,text:be}]}}},Ae.url=function(B,q){var oe;if(oe=this.rules.inline.url.exec(B)){var be,L;if(oe[2]==="@")be=T(this.options.mangle?q(oe[0]):oe[0]),L="mailto:"+be;else{var dt;do dt=oe[0],oe[0]=this.rules.inline._backpedal.exec(oe[0])[0];while(dt!==oe[0]);be=T(oe[0]),oe[1]==="www."?L="http://"+be:L=be}return{type:"link",raw:oe[0],text:be,href:L,tokens:[{type:"text",raw:be,text:be}]}}},Ae.inlineText=function(B,q,oe){var be=this.rules.inline.text.exec(B);if(be){var L;return q?L=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(be[0]):T(be[0]):be[0]:L=T(this.options.smartypants?oe(be[0]):be[0]),{type:"text",raw:be[0],text:L}}},ce}(),nt=Z.noopTest,rt=Z.edit,Gt=Z.merge,ct={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:nt,table:nt,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};ct._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ct._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ct.def=rt(ct.def).replace("label",ct._label).replace("title",ct._title).getRegex(),ct.bullet=/(?:[*+-]|\d{1,9}[.)])/,ct.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,ct.item=rt(ct.item,"gm").replace(/bull/g,ct.bullet).getRegex(),ct.listItemStart=rt(/^( *)(bull) */).replace("bull",ct.bullet).getRegex(),ct.list=rt(ct.list).replace(/bull/g,ct.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ct.def.source+")").getRegex(),ct._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",ct._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,ct.html=rt(ct.html,"i").replace("comment",ct._comment).replace("tag",ct._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ct.paragraph=rt(ct._paragraph).replace("hr",ct.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",ct._tag).getRegex(),ct.blockquote=rt(ct.blockquote).replace("paragraph",ct.paragraph).getRegex(),ct.normal=Gt({},ct),ct.gfm=Gt({},ct.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*|$)"}),ct.gfm.nptable=rt(ct.gfm.nptable).replace("hr",ct.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",ct._tag).getRegex(),ct.gfm.table=rt(ct.gfm.table).replace("hr",ct.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",ct._tag).getRegex(),ct.pedantic=Gt({},ct.normal,{html:rt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ct._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:nt,paragraph:rt(ct.normal._paragraph).replace("hr",ct.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",ct.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var st={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:nt,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:nt,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};st._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",st.punctuation=rt(st.punctuation).replace(/punctuation/g,st._punctuation).getRegex(),st.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,st.escapedEmSt=/\\\*|\\_/g,st._comment=rt(ct._comment).replace("(?:-->|$)","-->").getRegex(),st.emStrong.lDelim=rt(st.emStrong.lDelim).replace(/punct/g,st._punctuation).getRegex(),st.emStrong.rDelimAst=rt(st.emStrong.rDelimAst,"g").replace(/punct/g,st._punctuation).getRegex(),st.emStrong.rDelimUnd=rt(st.emStrong.rDelimUnd,"g").replace(/punct/g,st._punctuation).getRegex(),st._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,st._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,st._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])?)+(?![-_])/,st.autolink=rt(st.autolink).replace("scheme",st._scheme).replace("email",st._email).getRegex(),st._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,st.tag=rt(st.tag).replace("comment",st._comment).replace("attribute",st._attribute).getRegex(),st._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,st._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,st._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,st.link=rt(st.link).replace("label",st._label).replace("href",st._href).replace("title",st._title).getRegex(),st.reflink=rt(st.reflink).replace("label",st._label).getRegex(),st.reflinkSearch=rt(st.reflinkSearch,"g").replace("reflink",st.reflink).replace("nolink",st.nolink).getRegex(),st.normal=Gt({},st),st.pedantic=Gt({},st.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:rt(/^!?\[(label)\]\((.*?)\)/).replace("label",st._label).getRegex(),reflink:rt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",st._label).getRegex()}),st.gfm=Gt({},st.normal,{escape:rt(st.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),st.gfm.url=rt(st.gfm.url,"i").replace("email",st.gfm._extended_email).getRegex(),st.breaks=Gt({},st.gfm,{br:rt(st.br).replace("{2,}","*").getRegex(),text:rt(st.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var tr={block:ct,inline:st},sr=Qe,yr=Ie.exports.defaults,ar=tr.block,qt=tr.inline,Kt=Z.repeatString;function ke(ce){return ce.replace(/---/g,"\u2014").replace(/--/g,"\u2013").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1\u2018").replace(/'/g,"\u2019").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1\u201C").replace(/"/g,"\u201D").replace(/\.{3}/g,"\u2026")}function Je(ce){var Ae="",Fe,B,q=ce.length;for(Fe=0;Fe<q;Fe++)B=ce.charCodeAt(Fe),Math.random()>.5&&(B="x"+B.toString(16)),Ae+="&#"+B+";";return Ae}var ue=function(){function ce(Fe){this.tokens=[],this.tokens.links=Object.create(null),this.options=Fe||yr,this.options.tokenizer=this.options.tokenizer||new sr,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var B={block:ar.normal,inline:qt.normal};this.options.pedantic?(B.block=ar.pedantic,B.inline=qt.pedantic):this.options.gfm&&(B.block=ar.gfm,this.options.breaks?B.inline=qt.breaks:B.inline=qt.gfm),this.tokenizer.rules=B}ce.lex=function(B,q){var oe=new ce(q);return oe.lex(B)},ce.lexInline=function(B,q){var oe=new ce(q);return oe.inlineTokens(B)};var Ae=ce.prototype;return Ae.lex=function(B){return B=B.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(B,this.tokens,!0),this.inline(this.tokens),this.tokens},Ae.blockTokens=function(B,q,oe){q===void 0&&(q=[]),oe===void 0&&(oe=!0),this.options.pedantic&&(B=B.replace(/^ +$/gm,""));for(var be,L,dt,ae;B;){if(be=this.tokenizer.space(B)){B=B.substring(be.raw.length),be.type&&q.push(be);continue}if(be=this.tokenizer.code(B)){B=B.substring(be.raw.length),ae=q[q.length-1],ae&&ae.type==="paragraph"?(ae.raw+=`
|
|
`+be.raw,ae.text+=`
|
|
`+be.text):q.push(be);continue}if(be=this.tokenizer.fences(B)){B=B.substring(be.raw.length),q.push(be);continue}if(be=this.tokenizer.heading(B)){B=B.substring(be.raw.length),q.push(be);continue}if(be=this.tokenizer.nptable(B)){B=B.substring(be.raw.length),q.push(be);continue}if(be=this.tokenizer.hr(B)){B=B.substring(be.raw.length),q.push(be);continue}if(be=this.tokenizer.blockquote(B)){B=B.substring(be.raw.length),be.tokens=this.blockTokens(be.text,[],oe),q.push(be);continue}if(be=this.tokenizer.list(B)){for(B=B.substring(be.raw.length),dt=be.items.length,L=0;L<dt;L++)be.items[L].tokens=this.blockTokens(be.items[L].text,[],!1);q.push(be);continue}if(be=this.tokenizer.html(B)){B=B.substring(be.raw.length),q.push(be);continue}if(oe&&(be=this.tokenizer.def(B))){B=B.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(B)){B=B.substring(be.raw.length),q.push(be);continue}if(be=this.tokenizer.lheading(B)){B=B.substring(be.raw.length),q.push(be);continue}if(oe&&(be=this.tokenizer.paragraph(B))){B=B.substring(be.raw.length),q.push(be);continue}if(be=this.tokenizer.text(B)){B=B.substring(be.raw.length),ae=q[q.length-1],ae&&ae.type==="text"?(ae.raw+=`
|
|
`+be.raw,ae.text+=`
|
|
`+be.text):q.push(be);continue}if(B){var At="Infinite loop on byte: "+B.charCodeAt(0);if(this.options.silent){console.error(At);break}else throw new Error(At)}}return q},Ae.inline=function(B){var q,oe,be,L,dt,ae,At=B.length;for(q=0;q<At;q++)switch(ae=B[q],ae.type){case"paragraph":case"text":case"heading":{ae.tokens=[],this.inlineTokens(ae.text,ae.tokens);break}case"table":{for(ae.tokens={header:[],cells:[]},L=ae.header.length,oe=0;oe<L;oe++)ae.tokens.header[oe]=[],this.inlineTokens(ae.header[oe],ae.tokens.header[oe]);for(L=ae.cells.length,oe=0;oe<L;oe++)for(dt=ae.cells[oe],ae.tokens.cells[oe]=[],be=0;be<dt.length;be++)ae.tokens.cells[oe][be]=[],this.inlineTokens(dt[be],ae.tokens.cells[oe][be]);break}case"blockquote":{this.inline(ae.tokens);break}case"list":{for(L=ae.items.length,oe=0;oe<L;oe++)this.inline(ae.items[oe].tokens);break}}return B},Ae.inlineTokens=function(B,q,oe,be){q===void 0&&(q=[]),oe===void 0&&(oe=!1),be===void 0&&(be=!1);var L,dt,ae=B,At,Ct,Mt;if(this.tokens.links){var br=Object.keys(this.tokens.links);if(br.length>0)for(;(At=this.tokenizer.rules.inline.reflinkSearch.exec(ae))!=null;)br.includes(At[0].slice(At[0].lastIndexOf("[")+1,-1))&&(ae=ae.slice(0,At.index)+"["+Kt("a",At[0].length-2)+"]"+ae.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(At=this.tokenizer.rules.inline.blockSkip.exec(ae))!=null;)ae=ae.slice(0,At.index)+"["+Kt("a",At[0].length-2)+"]"+ae.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(At=this.tokenizer.rules.inline.escapedEmSt.exec(ae))!=null;)ae=ae.slice(0,At.index)+"++"+ae.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;B;){if(Ct||(Mt=""),Ct=!1,L=this.tokenizer.escape(B)){B=B.substring(L.raw.length),q.push(L);continue}if(L=this.tokenizer.tag(B,oe,be)){B=B.substring(L.raw.length),oe=L.inLink,be=L.inRawBlock;var Ht=q[q.length-1];Ht&&L.type==="text"&&Ht.type==="text"?(Ht.raw+=L.raw,Ht.text+=L.text):q.push(L);continue}if(L=this.tokenizer.link(B)){B=B.substring(L.raw.length),L.type==="link"&&(L.tokens=this.inlineTokens(L.text,[],!0,be)),q.push(L);continue}if(L=this.tokenizer.reflink(B,this.tokens.links)){B=B.substring(L.raw.length);var Ot=q[q.length-1];L.type==="link"?(L.tokens=this.inlineTokens(L.text,[],!0,be),q.push(L)):Ot&&L.type==="text"&&Ot.type==="text"?(Ot.raw+=L.raw,Ot.text+=L.text):q.push(L);continue}if(L=this.tokenizer.emStrong(B,ae,Mt)){B=B.substring(L.raw.length),L.tokens=this.inlineTokens(L.text,[],oe,be),q.push(L);continue}if(L=this.tokenizer.codespan(B)){B=B.substring(L.raw.length),q.push(L);continue}if(L=this.tokenizer.br(B)){B=B.substring(L.raw.length),q.push(L);continue}if(L=this.tokenizer.del(B)){B=B.substring(L.raw.length),L.tokens=this.inlineTokens(L.text,[],oe,be),q.push(L);continue}if(L=this.tokenizer.autolink(B,Je)){B=B.substring(L.raw.length),q.push(L);continue}if(!oe&&(L=this.tokenizer.url(B,Je))){B=B.substring(L.raw.length),q.push(L);continue}if(L=this.tokenizer.inlineText(B,be,ke)){B=B.substring(L.raw.length),L.raw.slice(-1)!=="_"&&(Mt=L.raw.slice(-1)),Ct=!0,dt=q[q.length-1],dt&&dt.type==="text"?(dt.raw+=L.raw,dt.text+=L.text):q.push(L);continue}if(B){var Ar="Infinite loop on byte: "+B.charCodeAt(0);if(this.options.silent){console.error(Ar);break}else throw new Error(Ar)}}return q},ne(ce,null,[{key:"rules",get:function(){return{block:ar,inline:qt}}}]),ce}(),Me=Ie.exports.defaults,Ge=Z.cleanUrl,O=Z.escape,Q=function(){function ce(Fe){this.options=Fe||Me}var Ae=ce.prototype;return Ae.code=function(B,q,oe){var be=(q||"").match(/\S*/)[0];if(this.options.highlight){var L=this.options.highlight(B,be);L!=null&&L!==B&&(oe=!0,B=L)}return B=B.replace(/\n$/,"")+`
|
|
`,be?'<pre><code class="'+this.options.langPrefix+O(be,!0)+'">'+(oe?B:O(B,!0))+`</code></pre>
|
|
`:"<pre><code>"+(oe?B:O(B,!0))+`</code></pre>
|
|
`},Ae.blockquote=function(B){return`<blockquote>
|
|
`+B+`</blockquote>
|
|
`},Ae.html=function(B){return B},Ae.heading=function(B,q,oe,be){return this.options.headerIds?"<h"+q+' id="'+this.options.headerPrefix+be.slug(oe)+'">'+B+"</h"+q+`>
|
|
`:"<h"+q+">"+B+"</h"+q+`>
|
|
`},Ae.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},Ae.list=function(B,q,oe){var be=q?"ol":"ul",L=q&&oe!==1?' start="'+oe+'"':"";return"<"+be+L+`>
|
|
`+B+"</"+be+`>
|
|
`},Ae.listitem=function(B){return"<li>"+B+`</li>
|
|
`},Ae.checkbox=function(B){return"<input "+(B?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},Ae.paragraph=function(B){return"<p>"+B+`</p>
|
|
`},Ae.table=function(B,q){return q&&(q="<tbody>"+q+"</tbody>"),`<table>
|
|
<thead>
|
|
`+B+`</thead>
|
|
`+q+`</table>
|
|
`},Ae.tablerow=function(B){return`<tr>
|
|
`+B+`</tr>
|
|
`},Ae.tablecell=function(B,q){var oe=q.header?"th":"td",be=q.align?"<"+oe+' align="'+q.align+'">':"<"+oe+">";return be+B+"</"+oe+`>
|
|
`},Ae.strong=function(B){return"<strong>"+B+"</strong>"},Ae.em=function(B){return"<em>"+B+"</em>"},Ae.codespan=function(B){return"<code>"+B+"</code>"},Ae.br=function(){return this.options.xhtml?"<br/>":"<br>"},Ae.del=function(B){return"<del>"+B+"</del>"},Ae.link=function(B,q,oe){if(B=Ge(this.options.sanitize,this.options.baseUrl,B),B===null)return oe;var be='<a href="'+O(B)+'"';return q&&(be+=' title="'+q+'"'),be+=">"+oe+"</a>",be},Ae.image=function(B,q,oe){if(B=Ge(this.options.sanitize,this.options.baseUrl,B),B===null)return oe;var be='<img src="'+B+'" alt="'+oe+'"';return q&&(be+=' title="'+q+'"'),be+=this.options.xhtml?"/>":">",be},Ae.text=function(B){return B},ce}(),ye=function(){function ce(){}var Ae=ce.prototype;return Ae.strong=function(B){return B},Ae.em=function(B){return B},Ae.codespan=function(B){return B},Ae.del=function(B){return B},Ae.html=function(B){return B},Ae.text=function(B){return B},Ae.link=function(B,q,oe){return""+oe},Ae.image=function(B,q,oe){return""+oe},Ae.br=function(){return""},ce}(),fe=function(){function ce(){this.seen={}}var Ae=ce.prototype;return Ae.serialize=function(B){return B.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},Ae.getNextSafeSlug=function(B,q){var oe=B,be=0;if(this.seen.hasOwnProperty(oe)){be=this.seen[B];do be++,oe=B+"-"+be;while(this.seen.hasOwnProperty(oe))}return q||(this.seen[B]=be,this.seen[oe]=0),oe},Ae.slug=function(B,q){q===void 0&&(q={});var oe=this.serialize(B);return this.getNextSafeSlug(oe,q.dryrun)},ce}(),Te=Q,De=ye,We=fe,Ze=Ie.exports.defaults,Ve=Z.unescape,Ke=function(){function ce(Fe){this.options=Fe||Ze,this.options.renderer=this.options.renderer||new Te,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new De,this.slugger=new We}ce.parse=function(B,q){var oe=new ce(q);return oe.parse(B)},ce.parseInline=function(B,q){var oe=new ce(q);return oe.parseInline(B)};var Ae=ce.prototype;return Ae.parse=function(B,q){q===void 0&&(q=!0);var oe="",be,L,dt,ae,At,Ct,Mt,br,Ht,Ot,Ar,Br,Gr,zr,Tt,jt,pr,Kr,Ir=B.length;for(be=0;be<Ir;be++)switch(Ot=B[be],Ot.type){case"space":continue;case"hr":{oe+=this.renderer.hr();continue}case"heading":{oe+=this.renderer.heading(this.parseInline(Ot.tokens),Ot.depth,Ve(this.parseInline(Ot.tokens,this.textRenderer)),this.slugger);continue}case"code":{oe+=this.renderer.code(Ot.text,Ot.lang,Ot.escaped);continue}case"table":{for(br="",Mt="",ae=Ot.header.length,L=0;L<ae;L++)Mt+=this.renderer.tablecell(this.parseInline(Ot.tokens.header[L]),{header:!0,align:Ot.align[L]});for(br+=this.renderer.tablerow(Mt),Ht="",ae=Ot.cells.length,L=0;L<ae;L++){for(Ct=Ot.tokens.cells[L],Mt="",At=Ct.length,dt=0;dt<At;dt++)Mt+=this.renderer.tablecell(this.parseInline(Ct[dt]),{header:!1,align:Ot.align[dt]});Ht+=this.renderer.tablerow(Mt)}oe+=this.renderer.table(br,Ht);continue}case"blockquote":{Ht=this.parse(Ot.tokens),oe+=this.renderer.blockquote(Ht);continue}case"list":{for(Ar=Ot.ordered,Br=Ot.start,Gr=Ot.loose,ae=Ot.items.length,Ht="",L=0;L<ae;L++)Tt=Ot.items[L],jt=Tt.checked,pr=Tt.task,zr="",Tt.task&&(Kr=this.renderer.checkbox(jt),Gr?Tt.tokens.length>0&&Tt.tokens[0].type==="text"?(Tt.tokens[0].text=Kr+" "+Tt.tokens[0].text,Tt.tokens[0].tokens&&Tt.tokens[0].tokens.length>0&&Tt.tokens[0].tokens[0].type==="text"&&(Tt.tokens[0].tokens[0].text=Kr+" "+Tt.tokens[0].tokens[0].text)):Tt.tokens.unshift({type:"text",text:Kr}):zr+=Kr),zr+=this.parse(Tt.tokens,Gr),Ht+=this.renderer.listitem(zr,pr,jt);oe+=this.renderer.list(Ht,Ar,Br);continue}case"html":{oe+=this.renderer.html(Ot.text);continue}case"paragraph":{oe+=this.renderer.paragraph(this.parseInline(Ot.tokens));continue}case"text":{for(Ht=Ot.tokens?this.parseInline(Ot.tokens):Ot.text;be+1<Ir&&B[be+1].type==="text";)Ot=B[++be],Ht+=`
|
|
`+(Ot.tokens?this.parseInline(Ot.tokens):Ot.text);oe+=q?this.renderer.paragraph(Ht):Ht;continue}default:{var tn='Token with "'+Ot.type+'" type was not found.';if(this.options.silent){console.error(tn);return}else throw new Error(tn)}}return oe},Ae.parseInline=function(B,q){q=q||this.renderer;var oe="",be,L,dt=B.length;for(be=0;be<dt;be++)switch(L=B[be],L.type){case"escape":{oe+=q.text(L.text);break}case"html":{oe+=q.html(L.text);break}case"link":{oe+=q.link(L.href,L.title,this.parseInline(L.tokens,q));break}case"image":{oe+=q.image(L.href,L.title,L.text);break}case"strong":{oe+=q.strong(this.parseInline(L.tokens,q));break}case"em":{oe+=q.em(this.parseInline(L.tokens,q));break}case"codespan":{oe+=q.codespan(L.text);break}case"br":{oe+=q.br();break}case"del":{oe+=q.del(this.parseInline(L.tokens,q));break}case"text":{oe+=q.text(L.text);break}default:{var ae='Token with "'+L.type+'" type was not found.';if(this.options.silent){console.error(ae);return}else throw new Error(ae)}}return oe},ce}(),vt=ue,gt=Ke,at=Qe,mt=Q,wt=ye,ft=fe,Dt=Z.merge,yt=Z.checkSanitizeDeprecation,_=Z.escape,w=Ie.exports.getDefaults,Ye=Ie.exports.changeDefaults,I=Ie.exports.defaults;function re(ce,Ae,Fe){if(typeof ce=="undefined"||ce===null)throw new Error("marked(): input parameter is undefined or null");if(typeof ce!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(ce)+", string expected");if(typeof Ae=="function"&&(Fe=Ae,Ae=null),Ae=Dt({},re.defaults,Ae||{}),yt(Ae),Fe){var B=Ae.highlight,q;try{q=vt.lex(ce,Ae)}catch(dt){return Fe(dt)}var oe=function(ae){var At;if(!ae)try{Ae.walkTokens&&re.walkTokens(q,Ae.walkTokens),At=gt.parse(q,Ae)}catch(Ct){ae=Ct}return Ae.highlight=B,ae?Fe(ae):Fe(null,At)};if(!B||B.length<3||(delete Ae.highlight,!q.length))return oe();var be=0;re.walkTokens(q,function(dt){dt.type==="code"&&(be++,setTimeout(function(){B(dt.text,dt.lang,function(ae,At){if(ae)return oe(ae);At!=null&&At!==dt.text&&(dt.text=At,dt.escaped=!0),be--,be===0&&oe()})},0))}),be===0&&oe();return}try{var L=vt.lex(ce,Ae);return Ae.walkTokens&&re.walkTokens(L,Ae.walkTokens),gt.parse(L,Ae)}catch(dt){if(dt.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,Ae.silent)return"<p>An error occurred:</p><pre>"+_(dt.message+"",!0)+"</pre>";throw dt}}re.options=re.setOptions=function(ce){return Dt(re.defaults,ce),Ye(re.defaults),re},re.getDefaults=w,re.defaults=I,re.use=function(ce){var Ae=Dt({},ce);if(ce.renderer&&function(){var B=re.defaults.renderer||new mt,q=function(L){var dt=B[L];B[L]=function(){for(var ae=arguments.length,At=new Array(ae),Ct=0;Ct<ae;Ct++)At[Ct]=arguments[Ct];var Mt=ce.renderer[L].apply(B,At);return Mt===!1&&(Mt=dt.apply(B,At)),Mt}};for(var oe in ce.renderer)q(oe);Ae.renderer=B}(),ce.tokenizer&&function(){var B=re.defaults.tokenizer||new at,q=function(L){var dt=B[L];B[L]=function(){for(var ae=arguments.length,At=new Array(ae),Ct=0;Ct<ae;Ct++)At[Ct]=arguments[Ct];var Mt=ce.tokenizer[L].apply(B,At);return Mt===!1&&(Mt=dt.apply(B,At)),Mt}};for(var oe in ce.tokenizer)q(oe);Ae.tokenizer=B}(),ce.walkTokens){var Fe=re.defaults.walkTokens;Ae.walkTokens=function(B){ce.walkTokens(B),Fe&&Fe(B)}}re.setOptions(Ae)},re.walkTokens=function(ce,Ae){for(var Fe=Le(ce),B;!(B=Fe()).done;){var q=B.value;switch(Ae(q),q.type){case"table":{for(var oe=Le(q.tokens.header),be;!(be=oe()).done;){var L=be.value;re.walkTokens(L,Ae)}for(var dt=Le(q.tokens.cells),ae;!(ae=dt()).done;)for(var At=ae.value,Ct=Le(At),Mt;!(Mt=Ct()).done;){var br=Mt.value;re.walkTokens(br,Ae)}break}case"list":{re.walkTokens(q.items,Ae);break}default:q.tokens&&re.walkTokens(q.tokens,Ae)}}},re.parseInline=function(ce,Ae){if(typeof ce=="undefined"||ce===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof ce!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(ce)+", string expected");Ae=Dt({},re.defaults,Ae||{}),yt(Ae);try{var Fe=vt.lexInline(ce,Ae);return Ae.walkTokens&&re.walkTokens(Fe,Ae.walkTokens),gt.parseInline(Fe,Ae)}catch(B){if(B.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,Ae.silent)return"<p>An error occurred:</p><pre>"+_(B.message+"",!0)+"</pre>";throw B}},re.Parser=gt,re.parser=gt.parse,re.Renderer=mt,re.TextRenderer=wt,re.Lexer=vt,re.lexer=vt.lex,re.Tokenizer=at,re.Slugger=ft,re.parse=re;var zt=re;return zt})},11690:function(Bt){const it=/[&<>"']/,ne=/[&<>"']/g,se=/[<>"']|&(?!#?\w+;)/,xe=/[<>"']|&(?!#?\w+;)/g,Le={"&":"&","<":"<",">":">",'"':""","'":"'"},Ie=de=>Le[de];function Ne(de,we){if(we){if(it.test(de))return de.replace(ne,Ie)}else if(se.test(de))return de.replace(xe,Ie);return de}const pe=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function Oe(de){return de.replace(pe,(we,Ce)=>(Ce=Ce.toLowerCase(),Ce==="colon"?":":Ce.charAt(0)==="#"?Ce.charAt(1)==="x"?String.fromCharCode(parseInt(Ce.substring(2),16)):String.fromCharCode(+Ce.substring(1)):""))}const Ee=/(^|[^\[])\^/g;function l(de,we){de=de.source||de,we=we||"";const Ce={replace:(Se,Be)=>(Be=Be.source||Be,Be=Be.replace(Ee,"$1"),de=de.replace(Se,Be),Ce),getRegex:()=>new RegExp(de,we)};return Ce}const K=/[^\w:]/g,N=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function A(de,we,Ce){if(de){let Se;try{Se=decodeURIComponent(Oe(Ce)).replace(K,"").toLowerCase()}catch(Be){return null}if(Se.indexOf("javascript:")===0||Se.indexOf("vbscript:")===0||Se.indexOf("data:")===0)return null}we&&!N.test(Ce)&&(Ce=H(we,Ce));try{Ce=encodeURI(Ce).replace(/%25/g,"%")}catch(Se){return null}return Ce}const d={},x=/^[^:]+:\/*[^/]*$/,y=/^([^:]+:)[\s\S]*$/,$=/^([^:]+:\/*[^/]*)[\s\S]*$/;function H(de,we){d[" "+de]||(x.test(de)?d[" "+de]=de+"/":d[" "+de]=te(de,"/",!0)),de=d[" "+de];const Ce=de.indexOf(":")===-1;return we.substring(0,2)==="//"?Ce?we:de.replace(y,"$1")+we:we.charAt(0)==="/"?Ce?we:de.replace($,"$1")+we:de+we}const F={exec:function(){}};function R(de){let we=1,Ce,Se;for(;we<arguments.length;we++){Ce=arguments[we];for(Se in Ce)Object.prototype.hasOwnProperty.call(Ce,Se)&&(de[Se]=Ce[Se])}return de}function V(de,we){const Ce=de.replace(/\|/g,(G,U,j)=>{let Z=!1,le=U;for(;--le>=0&&j[le]==="\\";)Z=!Z;return Z?"|":" |"}),Se=Ce.split(/ \|/);let Be=0;if(Se.length>we)Se.splice(we);else for(;Se.length<we;)Se.push("");for(;Be<Se.length;Be++)Se[Be]=Se[Be].trim().replace(/\\\|/g,"|");return Se}function te(de,we,Ce){const Se=de.length;if(Se===0)return"";let Be=0;for(;Be<Se;){const G=de.charAt(Se-Be-1);if(G===we&&!Ce)Be++;else if(G!==we&&Ce)Be++;else break}return de.substr(0,Se-Be)}function C(de,we){if(de.indexOf(we[1])===-1)return-1;const Ce=de.length;let Se=0,Be=0;for(;Be<Ce;Be++)if(de[Be]==="\\")Be++;else if(de[Be]===we[0])Se++;else if(de[Be]===we[1]&&(Se--,Se<0))return Be;return-1}function _e(de){de&&de.sanitize&&!de.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 ve(de,we){if(we<1)return"";let Ce="";for(;we>1;)we&1&&(Ce+=de),we>>=1,de+=de;return Ce+de}Bt.exports={escape:Ne,unescape:Oe,edit:l,cleanUrl:A,resolveUrl:H,noopTest:F,merge:R,splitCells:V,rtrim:te,findClosingBracket:C,checkSanitizeDeprecation:_e,repeatString:ve}},75918:function(Bt,it,ne){"use strict";ne.d(it,{Wi:function(){return pe},Z0:function(){return Oe},aU:function(){return Ne},eZ:function(){return l},wY:function(){return Ee}});var se=ne(4348),xe=ne(69323),Le=ne(13268),Ie=function(K,N,A,d){function x(y){return y instanceof A?y:new A(function($){$(y)})}return new(A||(A=Promise))(function(y,$){function H(V){try{R(d.next(V))}catch(te){$(te)}}function F(V){try{R(d.throw(V))}catch(te){$(te)}}function R(V){V.done?y(V.value):x(V.value).then(H,F)}R((d=d.apply(K,N||[])).next())})};class Ne extends xe.JT{constructor(N,A="",d="",x=!0,y){super(),this._onDidChange=this._register(new se.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=N,this._label=A,this._cssClass=d,this._enabled=x,this._actionCallback=y}get id(){return this._id}get label(){return this._label}set label(N){this._setLabel(N)}_setLabel(N){this._label!==N&&(this._label=N,this._onDidChange.fire({label:N}))}get tooltip(){return this._tooltip||""}set tooltip(N){this._setTooltip(N)}_setTooltip(N){this._tooltip!==N&&(this._tooltip=N,this._onDidChange.fire({tooltip:N}))}get class(){return this._cssClass}set class(N){this._setClass(N)}_setClass(N){this._cssClass!==N&&(this._cssClass=N,this._onDidChange.fire({class:N}))}get enabled(){return this._enabled}set enabled(N){this._setEnabled(N)}_setEnabled(N){this._enabled!==N&&(this._enabled=N,this._onDidChange.fire({enabled:N}))}get checked(){return this._checked}set checked(N){this._setChecked(N)}_setChecked(N){this._checked!==N&&(this._checked=N,this._onDidChange.fire({checked:N}))}run(N,A){return Ie(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(N))})}}class pe extends xe.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new se.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new se.Q5),this.onDidRun=this._onDidRun.event}run(N,A){return Ie(this,void 0,void 0,function*(){if(!N.enabled)return;this._onBeforeRun.fire({action:N});let d;try{yield this.runAction(N,A)}catch(x){d=x}this._onDidRun.fire({action:N,error:d})})}runAction(N,A){return Ie(this,void 0,void 0,function*(){yield N.run(A)})}}class Oe extends Ne{constructor(N){super(Oe.ID,N,N?"separator text":"separator"),this.checked=!1,this.enabled=!1}}Oe.ID="vs.actions.separator";class Ee{constructor(N,A,d,x){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=N,this.label=A,this.class=x,this._actions=d}get actions(){return this._actions}dispose(){}run(){return Ie(this,void 0,void 0,function*(){})}}class l extends Ne{constructor(){super(l.ID,Le.N("submenu.empty","(empty)"),void 0,!1)}}l.ID="vs.actions.empty"},76068:function(Bt,it,ne){"use strict";ne.d(it,{ok:function(){return se}});function se(xe,Le){if(!xe)throw new Error(Le?`Assertion failed (${Le})`:"Assertion Failed")}},52615:function(Bt,it,ne){"use strict";ne.d(it,{CM:function(){return Ne},JL:function(){return pe},dT:function(){return Ee},fK:function(){return Ie},lA:function(){return Oe}});var se=ne(4348);class xe{constructor(){this._icons=new Map,this._onDidRegister=new se.Q5}add(K){const N=this._icons.get(K.id);N?K.description?N.description=K.description:console.error(`Duplicate registration of codicon ${K.id}`):(this._icons.set(K.id,K),this._onDidRegister.fire(K))}get(K){return this._icons.get(K)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const Le=new xe,Ie=Le;function Ne(l,K){return new Oe(l,K)}function pe(l){return l?l.replace(/\$\((.*?)\)/g,(K,N)=>` ${N} `).trim():""}class Oe{constructor(K,N,A){this.id=K,this.definition=N,this.description=A,Le.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var Ee;(function(l){l.iconNameSegment="[A-Za-z0-9]+",l.iconNameExpression="[A-Za-z0-9\\-]+",l.iconModifierExpression="~[A-Za-z]+";const K=new RegExp(`^(${l.iconNameExpression})(${l.iconModifierExpression})?$`);function N(x){if(x instanceof Oe)return["codicon","codicon-"+x.id];const y=K.exec(x.id);if(!y)return N(Oe.error);let[,$,H]=y;const F=["codicon","codicon-"+$];return H&&F.push("codicon-modifier-"+H.substr(1)),F}l.asClassNameArray=N;function A(x){return N(x).join(" ")}l.asClassName=A;function d(x){return"."+N(x).join(".")}l.asCSSSelector=d})(Ee||(Ee={})),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"})}(Oe||(Oe={}))},79881:function(Bt,it,ne){"use strict";ne.d(it,{B8:function(){return N},Cp:function(){return Ie},F0:function(){return Ee},L6:function(){return K},VV:function(){return Oe},b1:function(){return l},dL:function(){return Le},ri:function(){return Ne}});class se{constructor(){this.listeners=[],this.unexpectedErrorHandler=function(d){setTimeout(()=>{throw d.stack?new Error(d.message+`
|
|
|
|
`+d.stack):d},0)}}emit(d){this.listeners.forEach(x=>{x(d)})}onUnexpectedError(d){this.unexpectedErrorHandler(d),this.emit(d)}onUnexpectedExternalError(d){this.unexpectedErrorHandler(d)}}const xe=new se;function Le(A){Oe(A)||xe.onUnexpectedError(A)}function Ie(A){Oe(A)||xe.onUnexpectedExternalError(A)}function Ne(A){if(A instanceof Error){let{name:d,message:x}=A;const y=A.stacktrace||A.stack;return{$isError:!0,name:d,message:x,stack:y}}return A}const pe="Canceled";function Oe(A){return A instanceof Error&&A.name===pe&&A.message===pe}function Ee(){const A=new Error(pe);return A.name=A.message,A}function l(A){return A?new Error(`Illegal argument: ${A}`):new Error("Illegal argument")}function K(A){return A?new Error(`Illegal state: ${A}`):new Error("Illegal state")}class N extends Error{constructor(d){super("NotSupported"),d&&(this.message=d)}}},4348:function(Bt,it,ne){"use strict";ne.d(it,{D0:function(){return N},E7:function(){return A},K3:function(){return K},Q5:function(){return l},ZD:function(){return d},ju:function(){return Ne}});var se=ne(79881),xe=ne(69323),Le=ne(34502),Ie=ne(95830),Ne;(function(x){x.None=()=>xe.JT.None;function y(j){return(Z,le=null,ee)=>{let E=!1,T;return T=j(X=>{if(!E)return T?T.dispose():E=!0,Z.call(le,X)},null,ee),E&&T.dispose(),T}}x.once=y;function $(j,Z){return C((le,ee=null,E)=>j(T=>le.call(ee,Z(T)),null,E))}x.map=$;function H(j,Z){return C((le,ee=null,E)=>j(T=>{Z(T),le.call(ee,T)},null,E))}x.forEach=H;function F(j,Z){return C((le,ee=null,E)=>j(T=>Z(T)&&le.call(ee,T),null,E))}x.filter=F;function R(j){return j}x.signal=R;function V(...j){return(Z,le=null,ee)=>(0,xe.F8)(...j.map(E=>E(T=>Z.call(le,T),null,ee)))}x.any=V;function te(j,Z,le){let ee=le;return $(j,E=>(ee=Z(ee,E),ee))}x.reduce=te;function C(j){let Z;const le=new l({onFirstListenerAdd(){Z=j(le.fire,le)},onLastListenerRemove(){Z.dispose()}});return le.event}function _e(j,Z,le=100,ee=!1,E){let T,X,ge,je=0;const Qe=new l({leakWarningThreshold:E,onFirstListenerAdd(){T=j(nt=>{je++,X=Z(X,nt),ee&&!ge&&(Qe.fire(X),X=void 0),clearTimeout(ge),ge=setTimeout(()=>{const rt=X;X=void 0,ge=void 0,(!ee||je>1)&&Qe.fire(rt),je=0},le)})},onLastListenerRemove(){T.dispose()}});return Qe.event}x.debounce=_e;function ve(j,Z=(le,ee)=>le===ee){let le=!0,ee;return F(j,E=>{const T=le||!Z(E,ee);return le=!1,ee=E,T})}x.latch=ve;function de(j,Z){return[x.filter(j,Z),x.filter(j,le=>!Z(le))]}x.split=de;function we(j,Z=!1,le=[]){let ee=le.slice(),E=j(ge=>{ee?ee.push(ge):X.fire(ge)});const T=()=>{ee&&ee.forEach(ge=>X.fire(ge)),ee=null},X=new l({onFirstListenerAdd(){E||(E=j(ge=>X.fire(ge)))},onFirstListenerDidAdd(){ee&&(Z?setTimeout(T):T())},onLastListenerRemove(){E&&E.dispose(),E=null}});return X.event}x.buffer=we;class Ce{constructor(Z){this.event=Z}map(Z){return new Ce($(this.event,Z))}forEach(Z){return new Ce(H(this.event,Z))}filter(Z){return new Ce(F(this.event,Z))}reduce(Z,le){return new Ce(te(this.event,Z,le))}latch(){return new Ce(ve(this.event))}debounce(Z,le=100,ee=!1,E){return new Ce(_e(this.event,Z,le,ee,E))}on(Z,le,ee){return this.event(Z,le,ee)}once(Z,le,ee){return y(this.event)(Z,le,ee)}}function Se(j){return new Ce(j)}x.chain=Se;function Be(j,Z,le=ee=>ee){const ee=(...ge)=>X.fire(le(...ge)),E=()=>j.on(Z,ee),T=()=>j.removeListener(Z,ee),X=new l({onFirstListenerAdd:E,onLastListenerRemove:T});return X.event}x.fromNodeEventEmitter=Be;function G(j,Z,le=ee=>ee){const ee=(...ge)=>X.fire(le(...ge)),E=()=>j.addEventListener(Z,ee),T=()=>j.removeEventListener(Z,ee),X=new l({onFirstListenerAdd:E,onLastListenerRemove:T});return X.event}x.fromDOMEventEmitter=G;function U(j){return new Promise(Z=>y(j)(Z))}x.toPromise=U})(Ne||(Ne={}));class pe{constructor(y){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${y}_${pe._idPool++}`}start(y){this._stopWatch=new Ie.G(!0),this._listenerCount=y}stop(){if(this._stopWatch){const y=this._stopWatch.elapsed();this._elapsedOverall+=y,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${y.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}pe._idPool=0;let Oe=-1;class Ee{constructor(y,$=Math.random().toString(18).slice(2,5)){this.customThreshold=y,this.name=$,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(y){let $=Oe;if(typeof this.customThreshold=="number"&&($=this.customThreshold),$<=0||y<$)return;this._stacks||(this._stacks=new Map);const H=new Error().stack.split(`
|
|
`).slice(3).join(`
|
|
`),F=this._stacks.get(H)||0;if(this._stacks.set(H,F+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=$*.5;let R,V=0;for(const[te,C]of this._stacks)(!R||V<C)&&(R=te,V=C);console.warn(`[${this.name}] potential listener LEAK detected, having ${y} listeners already. MOST frequent listener (${V}):`),console.warn(R)}return()=>{const R=this._stacks.get(H)||0;this._stacks.set(H,R-1)}}}class l{constructor(y){var $;this._disposed=!1,this._options=y,this._leakageMon=Oe>0?new Ee(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!(($=this._options)===null||$===void 0)&&$._profName?new pe(this._options._profName):void 0}get event(){return this._event||(this._event=(y,$,H)=>{var F;this._listeners||(this._listeners=new Le.S);const R=this._listeners.isEmpty();R&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const V=this._listeners.push($?[y,$]:y);R&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,y,$);const te=(F=this._leakageMon)===null||F===void 0?void 0:F.check(this._listeners.size),C=(0,xe.OF)(()=>{te&&te(),this._disposed||(V(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return H instanceof xe.SL?H.add(C):Array.isArray(H)&&H.push(C),C}),this._event}fire(y){var $,H;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new Le.S);for(let F of this._listeners)this._deliveryQueue.push([F,y]);for(($=this._perfMon)===null||$===void 0||$.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[F,R]=this._deliveryQueue.shift();try{typeof F=="function"?F.call(void 0,R):F[0].call(F[1],R)}catch(V){(0,se.dL)(V)}}(H=this._perfMon)===null||H===void 0||H.stop()}}dispose(){var y,$,H,F,R;this._disposed||(this._disposed=!0,(y=this._listeners)===null||y===void 0||y.clear(),($=this._deliveryQueue)===null||$===void 0||$.clear(),(F=(H=this._options)===null||H===void 0?void 0:H.onLastListenerRemove)===null||F===void 0||F.call(H),(R=this._leakageMon)===null||R===void 0||R.dispose())}}class K extends l{constructor(y){super(y),this._isPaused=0,this._eventQueue=new Le.S,this._mergeFn=y==null?void 0:y.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const y=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(y))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(y){this._listeners&&(this._isPaused!==0?this._eventQueue.push(y):super.fire(y))}}class N extends K{constructor(y){var $;super(y),this._delay=($=y.delay)!==null&&$!==void 0?$:100}fire(y){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(y)}}class A{constructor(){this.buffers=[]}wrapEvent(y){return($,H,F)=>y(R=>{const V=this.buffers[this.buffers.length-1];V?V.push(()=>$.call(H,R)):$.call(H,R)},void 0,F)}bufferEvents(y){const $=[];this.buffers.push($);const H=y();return this.buffers.pop(),$.forEach(F=>F()),H}}class d{constructor(){this.listening=!1,this.inputEvent=Ne.None,this.inputEventListener=xe.JT.None,this.emitter=new l({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(y){this.inputEvent=y,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=y(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},17845:function(Bt,it,ne){"use strict";ne.d(it,{I:function(){return se}});function se(xe){const Le=this;let Ie=!1,Ne;return function(){return Ie||(Ie=!0,Ne=xe.apply(Le,arguments)),Ne}}},88226:function(Bt,it,ne){"use strict";ne.d(it,{$:function(){return se}});var se;(function(xe){function Le(V){return V&&typeof V=="object"&&typeof V[Symbol.iterator]=="function"}xe.is=Le;const Ie=Object.freeze([]);function Ne(){return Ie}xe.empty=Ne;function*pe(V){yield V}xe.single=pe;function Oe(V){return V||Ie}xe.from=Oe;function Ee(V){return!V||V[Symbol.iterator]().next().done===!0}xe.isEmpty=Ee;function l(V){return V[Symbol.iterator]().next().value}xe.first=l;function K(V,te){for(const C of V)if(te(C))return!0;return!1}xe.some=K;function N(V,te){for(const C of V)if(te(C))return C}xe.find=N;function*A(V,te){for(const C of V)te(C)&&(yield C)}xe.filter=A;function*d(V,te){let C=0;for(const _e of V)yield te(_e,C++)}xe.map=d;function*x(...V){for(const te of V)for(const C of te)yield C}xe.concat=x;function*y(V){for(const te of V)for(const C of te)yield C}xe.concatNested=y;function $(V,te,C){let _e=C;for(const ve of V)_e=te(_e,ve);return _e}xe.reduce=$;function*H(V,te,C=V.length){for(te<0&&(te+=V.length),C<0?C+=V.length:C>V.length&&(C=V.length);te<C;te++)yield V[te]}xe.slice=H;function F(V,te=Number.POSITIVE_INFINITY){const C=[];if(te===0)return[C,V];const _e=V[Symbol.iterator]();for(let ve=0;ve<te;ve++){const de=_e.next();if(de.done)return[C,xe.empty()];C.push(de.value)}return[C,{[Symbol.iterator](){return _e}}]}xe.consume=F;function R(V,te,C=(_e,ve)=>_e===ve){const _e=V[Symbol.iterator](),ve=te[Symbol.iterator]();for(;;){const de=_e.next(),we=ve.next();if(de.done!==we.done)return!1;if(de.done)return!0;if(!C(de.value,we.value))return!1}}xe.equals=R})(se||(se={}))},69323:function(Bt,it,ne){"use strict";ne.d(it,{B9:function(){return d},F8:function(){return x},JT:function(){return H},Jz:function(){return R},OF:function(){return y},SL:function(){return $},Wf:function(){return A},XK:function(){return F},dk:function(){return K}});var se=ne(17845),xe=ne(88226);const Le=!1;let Ie=null;function Ne(V){Ie=V}if(Le){const V="__is_disposable_tracked__";Ne(new class{trackDisposable(te){const C=new Error("Potentially leaked disposable").stack;setTimeout(()=>{te[V]||console.log(C)},3e3)}setParent(te,C){if(te&&te!==H.None)try{te[V]=!0}catch(_e){}}markAsDisposed(te){if(te&&te!==H.None)try{te[V]=!0}catch(C){}}markAsSingleton(te){}})}function pe(V){return Ie==null||Ie.trackDisposable(V),V}function Oe(V){Ie==null||Ie.markAsDisposed(V)}function Ee(V,te){Ie==null||Ie.setParent(V,te)}function l(V,te){if(Ie)for(const C of V)Ie.setParent(C,te)}function K(V){return Ie==null||Ie.markAsSingleton(V),V}class N extends Error{constructor(te){super(`Encountered errors while disposing of store. Errors: [${te.join(", ")}]`),this.errors=te}}function A(V){return typeof V.dispose=="function"&&V.dispose.length===0}function d(V){if(xe.$.is(V)){let te=[];for(const C of V)if(C)try{C.dispose()}catch(_e){te.push(_e)}if(te.length===1)throw te[0];if(te.length>1)throw new N(te);return Array.isArray(V)?[]:V}else if(V)return V.dispose(),V}function x(...V){const te=y(()=>d(V));return l(V,te),te}function y(V){const te=pe({dispose:(0,se.I)(()=>{Oe(te),V()})});return te}class ${constructor(){this._toDispose=new Set,this._isDisposed=!1,pe(this)}dispose(){this._isDisposed||(Oe(this),this._isDisposed=!0,this.clear())}clear(){try{d(this._toDispose.values())}finally{this._toDispose.clear()}}add(te){if(!te)return te;if(te===this)throw new Error("Cannot register a disposable on itself!");return Ee(te,this),this._isDisposed?$.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(te),te}}$.DISABLE_DISPOSED_WARNING=!1;class H{constructor(){this._store=new $,pe(this),Ee(this._store,this)}dispose(){Oe(this),this._store.dispose()}_register(te){if(te===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(te)}}H.None=Object.freeze({dispose(){}});class F{constructor(){this._isDisposed=!1,pe(this)}get value(){return this._isDisposed?void 0:this._value}set value(te){var C;this._isDisposed||te===this._value||((C=this._value)===null||C===void 0||C.dispose(),te&&Ee(te,this),this._value=te)}clear(){this.value=void 0}dispose(){var te;this._isDisposed=!0,Oe(this),(te=this._value)===null||te===void 0||te.dispose(),this._value=void 0}clearAndLeak(){const te=this._value;return this._value=void 0,te&&Ee(te,null),te}}class R{constructor(te){this.object=te}dispose(){}}},34502:function(Bt,it,ne){"use strict";ne.d(it,{S:function(){return xe}});class se{constructor(Ie){this.element=Ie,this.next=se.Undefined,this.prev=se.Undefined}}se.Undefined=new se(void 0);class xe{constructor(){this._first=se.Undefined,this._last=se.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===se.Undefined}clear(){let Ie=this._first;for(;Ie!==se.Undefined;){const Ne=Ie.next;Ie.prev=se.Undefined,Ie.next=se.Undefined,Ie=Ne}this._first=se.Undefined,this._last=se.Undefined,this._size=0}unshift(Ie){return this._insert(Ie,!1)}push(Ie){return this._insert(Ie,!0)}_insert(Ie,Ne){const pe=new se(Ie);if(this._first===se.Undefined)this._first=pe,this._last=pe;else if(Ne){const Ee=this._last;this._last=pe,pe.prev=Ee,Ee.next=pe}else{const Ee=this._first;this._first=pe,pe.next=Ee,Ee.prev=pe}this._size+=1;let Oe=!1;return()=>{Oe||(Oe=!0,this._remove(pe))}}shift(){if(this._first!==se.Undefined){const Ie=this._first.element;return this._remove(this._first),Ie}}pop(){if(this._last!==se.Undefined){const Ie=this._last.element;return this._remove(this._last),Ie}}_remove(Ie){if(Ie.prev!==se.Undefined&&Ie.next!==se.Undefined){const Ne=Ie.prev;Ne.next=Ie.next,Ie.next.prev=Ne}else Ie.prev===se.Undefined&&Ie.next===se.Undefined?(this._first=se.Undefined,this._last=se.Undefined):Ie.next===se.Undefined?(this._last=this._last.prev,this._last.next=se.Undefined):Ie.prev===se.Undefined&&(this._first=this._first.next,this._first.prev=se.Undefined);this._size-=1}*[Symbol.iterator](){let Ie=this._first;for(;Ie!==se.Undefined;)yield Ie.element,Ie=Ie.next}}},23345:function(Bt,it,ne){"use strict";ne.d(it,{$L:function(){return _e},ED:function(){return R},IJ:function(){return te},OS:function(){return Ce},WE:function(){return de},dz:function(){return V},gn:function(){return ve},li:function(){return y},r:function(){return G},tY:function(){return C},xS:function(){return we}});var se=ne(97671),xe;const Le="en";let Ie=!1,Ne=!1,pe=!1,Oe=!1,Ee=!1,l=!1,K=!1,N,A=null,d=null,x;const y=typeof self=="object"?self:typeof ne.g=="object"?ne.g:{};let $;typeof y.vscode!="undefined"&&typeof y.vscode.process!="undefined"?$=y.vscode.process:typeof se!="undefined"&&($=se);const H=typeof((xe=$==null?void 0:$.versions)===null||xe===void 0?void 0:xe.electron)=="string"&&$.type==="renderer";if(typeof navigator=="object"&&!H)x=navigator.userAgent,Ie=x.indexOf("Windows")>=0,Ne=x.indexOf("Macintosh")>=0,K=(x.indexOf("Macintosh")>=0||x.indexOf("iPad")>=0||x.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,pe=x.indexOf("Linux")>=0,l=!0,N=navigator.language,A=N;else if(typeof $=="object"){Ie=$.platform==="win32",Ne=$.platform==="darwin",pe=$.platform==="linux",Oe=pe&&!!$.env.SNAP&&!!$.env.SNAP_REVISION,N=Le,A=Le;const U=$.env.VSCODE_NLS_CONFIG;if(U)try{const j=JSON.parse(U),Z=j.availableLanguages["*"];N=j.locale,A=Z||Le,d=j._translationsConfigFile}catch(j){}Ee=!0}else console.error("Unable to resolve platform.");let F=0;Ne?F=1:Ie?F=3:pe&&(F=2);const R=Ie,V=Ne,te=pe,C=Ee,_e=l,ve=K,de=x,we=function(){if(y.setImmediate)return y.setImmediate.bind(y);if(typeof y.postMessage=="function"&&!y.importScripts){let Z=[];y.addEventListener("message",ee=>{if(ee.data&&ee.data.vscodeSetImmediateId)for(let E=0,T=Z.length;E<T;E++){const X=Z[E];if(X.id===ee.data.vscodeSetImmediateId){Z.splice(E,1),X.callback();return}}});let le=0;return ee=>{const E=++le;Z.push({id:E,callback:ee}),y.postMessage({vscodeSetImmediateId:E},"*")}}if(typeof($==null?void 0:$.nextTick)=="function")return $.nextTick.bind($);const j=Promise.resolve();return Z=>j.then(Z)}(),Ce=Ne||K?2:Ie?1:3;let Se=!0,Be=!1;function G(){if(!Be){Be=!0;const U=new Uint8Array(2);U[0]=1,U[1]=2,Se=new Uint16Array(U.buffer)[0]===513}return Se}},95830:function(Bt,it,ne){"use strict";ne.d(it,{G:function(){return Le}});var se=ne(23345);const xe=se.li.performance&&typeof se.li.performance.now=="function";class Le{constructor(Ne){this._highResolution=xe&&Ne,this._startTime=this._now(),this._stopTime=-1}static create(Ne=!0){return new Le(Ne)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?se.li.performance.now():Date.now()}}},82983:function(Bt,it,ne){"use strict";ne.d(it,{$i:function(){return je},C8:function(){return ct},GF:function(){return N},HO:function(){return le},IO:function(){return A},K7:function(){return Gt},Kw:function(){return sr},LC:function(){return y},Mh:function(){return we},P1:function(){return Ce},PJ:function(){return yr},Qe:function(){return Qe},R1:function(){return K},RP:function(){return X},S6:function(){return ar},TT:function(){return R},Ut:function(){return E},V8:function(){return $},WU:function(){return Le},YK:function(){return Be},YU:function(){return Ie},ZG:function(){return Se},ZH:function(){return U},ab:function(){return nt},c1:function(){return st},df:function(){return _e},ec:function(){return Ne},fi:function(){return qt},fy:function(){return pe},j3:function(){return Oe},j_:function(){return te},m5:function(){return se},mK:function(){return C},mr:function(){return d},oH:function(){return Je},oL:function(){return Ee},ok:function(){return de},ow:function(){return H},qq:function(){return ve},qu:function(){return F},rL:function(){return G},uS:function(){return tr},un:function(){return l},uq:function(){return x},vH:function(){return Z},xe:function(){return rt},zY:function(){return V}});function se(O){return!O||typeof O!="string"?!0:O.trim().length===0}const xe=/{(\d+)}/g;function Le(O,...Q){return Q.length===0?O:O.replace(xe,function(ye,fe){const Te=parseInt(fe,10);return isNaN(Te)||Te<0||Te>=Q.length?ye:Q[Te]})}function Ie(O){return O.replace(/[<>&]/g,function(Q){switch(Q){case"<":return"<";case">":return">";case"&":return"&";default:return Q}})}function Ne(O){return O.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function pe(O,Q=" "){const ye=Oe(O,Q);return Ee(ye,Q)}function Oe(O,Q){if(!O||!Q)return O;const ye=Q.length;if(ye===0||O.length===0)return O;let fe=0;for(;O.indexOf(Q,fe)===fe;)fe=fe+ye;return O.substring(fe)}function Ee(O,Q){if(!O||!Q)return O;const ye=Q.length,fe=O.length;if(ye===0||fe===0)return O;let Te=fe,De=-1;for(;De=O.lastIndexOf(Q,Te-1),!(De===-1||De+ye!==Te);){if(De===0)return"";Te=De}return O.substring(0,Te)}function l(O){return O.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function K(O){return O.replace(/\*/g,"")}function N(O,Q,ye={}){if(!O)throw new Error("Cannot create regex from empty string");Q||(O=Ne(O)),ye.wholeWord&&(/\B/.test(O.charAt(0))||(O="\\b"+O),/\B/.test(O.charAt(O.length-1))||(O=O+"\\b"));let fe="";return ye.global&&(fe+="g"),ye.matchCase||(fe+="i"),ye.multiline&&(fe+="m"),ye.unicode&&(fe+="u"),new RegExp(O,fe)}function A(O){return O.source==="^"||O.source==="^$"||O.source==="$"||O.source==="^\\s*$"?!1:!!(O.exec("")&&O.lastIndex===0)}function d(O){return(O.global?"g":"")+(O.ignoreCase?"i":"")+(O.multiline?"m":"")+(O.unicode?"u":"")}function x(O){return O.split(/\r\n|\r|\n/)}function y(O){for(let Q=0,ye=O.length;Q<ye;Q++){const fe=O.charCodeAt(Q);if(fe!==32&&fe!==9)return Q}return-1}function $(O,Q=0,ye=O.length){for(let fe=Q;fe<ye;fe++){const Te=O.charCodeAt(fe);if(Te!==32&&Te!==9)return O.substring(Q,fe)}return O.substring(Q,ye)}function H(O,Q=O.length-1){for(let ye=Q;ye>=0;ye--){const fe=O.charCodeAt(ye);if(fe!==32&&fe!==9)return ye}return-1}function F(O,Q){return O<Q?-1:O>Q?1:0}function R(O,Q,ye=0,fe=O.length,Te=0,De=Q.length){for(;ye<fe&&Te<De;ye++,Te++){let Ve=O.charCodeAt(ye),Ke=Q.charCodeAt(Te);if(Ve<Ke)return-1;if(Ve>Ke)return 1}const We=fe-ye,Ze=De-Te;return We<Ze?-1:We>Ze?1:0}function V(O,Q){return te(O,Q,0,O.length,0,Q.length)}function te(O,Q,ye=0,fe=O.length,Te=0,De=Q.length){for(;ye<fe&&Te<De;ye++,Te++){let Ve=O.charCodeAt(ye),Ke=Q.charCodeAt(Te);if(Ve===Ke)continue;if(Ve>=128||Ke>=128)return R(O.toLowerCase(),Q.toLowerCase(),ye,fe,Te,De);C(Ve)&&(Ve-=32),C(Ke)&&(Ke-=32);const vt=Ve-Ke;if(vt!==0)return vt}const We=fe-ye,Ze=De-Te;return We<Ze?-1:We>Ze?1:0}function C(O){return O>=97&&O<=122}function _e(O){return O>=65&&O<=90}function ve(O,Q){return O.length===Q.length&&te(O,Q)===0}function de(O,Q){const ye=Q.length;return Q.length>O.length?!1:te(O,Q,0,ye)===0}function we(O,Q){let ye,fe=Math.min(O.length,Q.length);for(ye=0;ye<fe;ye++)if(O.charCodeAt(ye)!==Q.charCodeAt(ye))return ye;return fe}function Ce(O,Q){let ye,fe=Math.min(O.length,Q.length);const Te=O.length-1,De=Q.length-1;for(ye=0;ye<fe;ye++)if(O.charCodeAt(Te-ye)!==Q.charCodeAt(De-ye))return ye;return fe}function Se(O){return 55296<=O&&O<=56319}function Be(O){return 56320<=O&&O<=57343}function G(O,Q){return(O-55296<<10)+(Q-56320)+65536}function U(O,Q,ye){const fe=O.charCodeAt(ye);if(Se(fe)&&ye+1<Q){const Te=O.charCodeAt(ye+1);if(Be(Te))return G(fe,Te)}return fe}function j(O,Q){const ye=O.charCodeAt(Q-1);if(Be(ye)&&Q>1){const fe=O.charCodeAt(Q-2);if(Se(fe))return G(fe,ye)}return ye}function Z(O,Q){const ye=Kt.getInstance(),fe=Q,Te=O.length,De=U(O,Te,Q);Q+=De>=65536?2:1;let We=ye.getGraphemeBreakType(De);for(;Q<Te;){const Ze=U(O,Te,Q),Ve=ye.getGraphemeBreakType(Ze);if(qt(We,Ve))break;Q+=Ze>=65536?2:1,We=Ve}return Q-fe}function le(O,Q){const ye=Kt.getInstance(),fe=Q,Te=j(O,Q);Q-=Te>=65536?2:1;let De=ye.getGraphemeBreakType(Te);for(;Q>0;){const We=j(O,Q),Ze=ye.getGraphemeBreakType(We);if(qt(Ze,De))break;Q-=We>=65536?2:1,De=Ze}return fe-Q}const ee=/(?:[\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(O){return ee.test(O)}const T=/(?:[\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 X(O){return T.test(O)}const ge=/^[\t\n\r\x20-\x7E]*$/;function je(O){return ge.test(O)}const Qe=/[\u2028\u2029]/;function nt(O){return Qe.test(O)}function rt(O){for(let Q=0,ye=O.length;Q<ye;Q++)if(Gt(O.charCodeAt(Q)))return!0;return!1}function Gt(O){return O=+O,O>=11904&&O<=55215||O>=63744&&O<=64255||O>=65281&&O<=65374}function ct(O){return O>=127462&&O<=127487||O===8986||O===8987||O===9200||O===9203||O>=9728&&O<=10175||O===11088||O===11093||O>=127744&&O<=128591||O>=128640&&O<=128764||O>=128992&&O<=129003||O>=129280&&O<=129535||O>=129648&&O<=129750}const st="\uFEFF";function tr(O){return!!(O&&O.length>0&&O.charCodeAt(0)===65279)}function sr(O,Q=!1){return O?(Q&&(O=O.replace(/\\./g,"")),O.toLowerCase()!==O):!1}function yr(O){return O=O%(2*26),O<26?String.fromCharCode(97+O):String.fromCharCode(65+O-26)}function ar(O){return Kt.getInstance().getGraphemeBreakType(O)}function qt(O,Q){return O===0?Q!==5&&Q!==7:O===2&&Q===3?!1:O===4||O===2||O===3||Q===4||Q===2||Q===3?!0:!(O===8&&(Q===8||Q===9||Q===11||Q===12)||(O===11||O===9)&&(Q===9||Q===10)||(O===12||O===10)&&Q===10||Q===5||Q===13||Q===7||O===1||O===13&&Q===14||O===6&&Q===6)}class Kt{constructor(){this._data=ke()}static getInstance(){return Kt._INSTANCE||(Kt._INSTANCE=new Kt),Kt._INSTANCE}getGraphemeBreakType(Q){if(Q<32)return Q===10?3:Q===13?2:4;if(Q<127)return 0;const ye=this._data,fe=ye.length/3;let Te=1;for(;Te<=fe;)if(Q<ye[3*Te])Te=2*Te;else if(Q>ye[3*Te+1])Te=2*Te+1;else return ye[3*Te+2];return 0}}Kt._INSTANCE=null;function ke(){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 Je(O,Q){if(O===0)return 0;const ye=ue(O,Q);if(ye!==void 0)return ye;const fe=j(Q,O);return O-=Me(fe),O}function ue(O,Q){let ye=j(Q,O);for(O-=Me(ye);Ge(ye)||ye===65039||ye===8419;){if(O===0)return;ye=j(Q,O),O-=Me(ye)}if(ct(ye)){if(O>=0){const fe=j(Q,O);fe===8205&&(O-=Me(fe))}return O}}function Me(O){return O>=65536?2:1}function Ge(O){return 127995<=O&&O<=127999}},72999:function(Bt,it,ne){"use strict";ne.d(it,{$E:function(){return y},$K:function(){return Oe},D8:function(){return A},HD:function(){return xe},IU:function(){return $},Jp:function(){return Ee},Kn:function(){return Le},cW:function(){return K},f6:function(){return H},hj:function(){return Ie},jn:function(){return Ne},kJ:function(){return se},mf:function(){return N},o8:function(){return pe},p_:function(){return l},vE:function(){return F}});function se(R){return Array.isArray(R)}function xe(R){return typeof R=="string"}function Le(R){return typeof R=="object"&&R!==null&&!Array.isArray(R)&&!(R instanceof RegExp)&&!(R instanceof Date)}function Ie(R){return typeof R=="number"&&!isNaN(R)}function Ne(R){return R===!0||R===!1}function pe(R){return typeof R=="undefined"}function Oe(R){return!Ee(R)}function Ee(R){return pe(R)||R===null}function l(R,V){if(!R)throw new Error(V?`Unexpected type, expected '${V}'`:"Unexpected type")}function K(R){if(Ee(R))throw new Error("Assertion Failed: argument is undefined or null");return R}function N(R){return typeof R=="function"}function A(R,V){const te=Math.min(R.length,V.length);for(let C=0;C<te;C++)d(R[C],V[C])}function d(R,V){if(xe(V)){if(typeof R!==V)throw new Error(`argument does not match constraint: typeof ${V}`)}else if(N(V)){try{if(R instanceof V)return}catch(te){}if(!Ee(R)&&R.constructor===V||V.length===1&&V.call(void 0,R)===!0)return;throw new Error("argument does not match one of these constraints: arg instanceof constraint, arg.constructor === constraint, nor constraint(arg) === true")}}function x(R){let V=[],te=Object.getPrototypeOf(R);for(;Object.prototype!==te;)V=V.concat(Object.getOwnPropertyNames(te)),te=Object.getPrototypeOf(te);return V}function y(R){const V=[];for(const te of x(R))typeof R[te]=="function"&&V.push(te);return V}function $(R,V){const te=_e=>function(){const ve=Array.prototype.slice.call(arguments,0);return V(_e,ve)};let C={};for(const _e of R)C[_e]=te(_e);return C}function H(R){return R===null?void 0:R}function F(R,V="Unreachable"){throw new Error(V)}},13268:function(Bt,it,ne){"use strict";ne.d(it,{N:function(){return xe}});function se(Le,Ie){let Ne;return Ie.length===0?Ne=Le:Ne=Le.replace(/\{(\d+)\}/g,function(pe,Oe){const Ee=Oe[0];return typeof Ie[Ee]!="undefined"?Ie[Ee]:pe}),Ne}function xe(Le,Ie,...Ne){return se(Ie,Ne)}},96236:function(Bt,it,ne){"use strict";ne.d(it,{BH:function(){return $},NZ:function(){return H},U8:function(){return F},co:function(){return y},eH:function(){return x},vr:function(){return d}});var se=ne(75918),xe=ne(52615),Le=ne(4348),Ie=ne(88226),Ne=ne(69323),pe=ne(34502),Oe=ne(35884),Ee=ne(90689),l=ne(16925),K=ne(49055),N=function(R,V,te,C){var _e=arguments.length,ve=_e<3?V:C===null?C=Object.getOwnPropertyDescriptor(V,te):C,de;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(R,V,te,C);else for(var we=R.length-1;we>=0;we--)(de=R[we])&&(ve=(_e<3?de(ve):_e>3?de(V,te,ve):de(V,te))||ve);return _e>3&&ve&&Object.defineProperty(V,te,ve),ve},A=function(R,V){return function(te,C){V(te,C,R)}};function d(R){return R.command!==void 0}class x{constructor(V){this.id=x._idPool++,this._debugName=V}}x._idPool=0,x.CommandPalette=new x("CommandPalette"),x.EditorContext=new x("EditorContext"),x.SimpleEditorContext=new x("SimpleEditorContext"),x.EditorContextCopy=new x("EditorContextCopy"),x.EditorContextPeek=new x("EditorContextPeek"),x.MenubarEditMenu=new x("MenubarEditMenu"),x.MenubarCopy=new x("MenubarCopy"),x.MenubarGoMenu=new x("MenubarGoMenu"),x.MenubarSelectionMenu=new x("MenubarSelectionMenu"),x.InlineCompletionsActions=new x("InlineCompletionsActions");const y=(0,l.yh)("menuService"),$=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new Le.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:R=>R===x.CommandPalette}}addCommand(R){return this.addCommands(Ie.$.single(R))}addCommands(R){for(const V of R)this._commands.set(V.id,V);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,Ne.OF)(()=>{let V=!1;for(const te of R)V=this._commands.delete(te.id)||V;V&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(R){return this._commands.get(R)}getCommands(){const R=new Map;return this._commands.forEach((V,te)=>R.set(te,V)),R}appendMenuItem(R,V){return this.appendMenuItems(Ie.$.single({id:R,item:V}))}appendMenuItems(R){const V=new Set,te=new pe.S;for(const{id:C,item:_e}of R){let ve=this._menuItems.get(C);ve||(ve=new pe.S,this._menuItems.set(C,ve)),te.push(ve.push(_e)),V.add(C)}return this._onDidChangeMenu.fire(V),(0,Ne.OF)(()=>{if(te.size>0){for(let C of te)C();this._onDidChangeMenu.fire(V),te.clear()}})}getMenuItems(R){let V;return this._menuItems.has(R)?V=[...this._menuItems.get(R)]:V=[],R===x.CommandPalette&&this._appendImplicitItems(V),V}_appendImplicitItems(R){const V=new Set;for(const te of R)d(te)&&(V.add(te.command.id),te.alt&&V.add(te.alt.id));this._commands.forEach((te,C)=>{V.has(C)||R.push({command:te})})}};class H extends se.wY{constructor(V,te,C,_e){super(`submenuitem.${V.submenu.id}`,typeof V.title=="string"?V.title:V.title.value,[],"submenu"),this.item=V,this._menuService=te,this._contextKeyService=C,this._options=_e}get actions(){const V=[],te=this._menuService.createMenu(this.item.submenu,this._contextKeyService),C=te.getActions(this._options);te.dispose();for(const[,_e]of C)_e.length>0&&(V.push(..._e),V.push(new se.Z0));return V.length&&V.pop(),V}}let F=class Xo{constructor(V,te,C,_e,ve){var de,we;if(this._commandService=ve,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=(we=typeof V.tooltip=="string"?V.tooltip:(de=V.tooltip)===null||de===void 0?void 0:de.value)!==null&&we!==void 0?we:"",this.enabled=!V.precondition||_e.contextMatchesRules(V.precondition),this.checked=void 0,V.toggled){const Ce=V.toggled.condition?V.toggled:{condition:V.toggled};this.checked=_e.contextMatchesRules(Ce.condition),this.checked&&Ce.tooltip&&(this.tooltip=typeof Ce.tooltip=="string"?Ce.tooltip:Ce.tooltip.value),Ce.title&&(this.label=typeof Ce.title=="string"?Ce.title:Ce.title.value)}this.item=V,this.alt=te?new Xo(te,void 0,C,_e,ve):void 0,this._options=C,K.kS.isThemeIcon(V.icon)&&(this.class=xe.dT.asClassName(V.icon))}dispose(){}run(...V){var te,C;let _e=[];return!((te=this._options)===null||te===void 0)&&te.arg&&(_e=[..._e,this._options.arg]),!((C=this._options)===null||C===void 0)&&C.shouldForwardArgs&&(_e=[..._e,...V]),this._commandService.executeCommand(this.id,..._e)}};F=N([A(3,Ee.i6),A(4,Oe.H)],F)},35884:function(Bt,it,ne){"use strict";ne.d(it,{H:function(){return Oe},P:function(){return Ee}});var se=ne(4348),xe=ne(88226),Le=ne(69323),Ie=ne(34502),Ne=ne(72999),pe=ne(16925);const Oe=(0,pe.yh)("commandService"),Ee=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new se.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(l,K){if(!l)throw new Error("invalid command");if(typeof l=="string"){if(!K)throw new Error("invalid command");return this.registerCommand({id:l,handler:K})}if(l.description){const y=[];for(let H of l.description.args)y.push(H.constraint);const $=l.handler;l.handler=function(H,...F){return(0,Ne.D8)(F,y),$(H,...F)}}const{id:N}=l;let A=this._commands.get(N);A||(A=new Ie.S,this._commands.set(N,A));let d=A.unshift(l),x=(0,Le.OF)(()=>{d();const y=this._commands.get(N);y!=null&&y.isEmpty()&&this._commands.delete(N)});return this._onDidRegisterCommand.fire(N),x}registerCommandAlias(l,K){return Ee.registerCommand(l,(N,...A)=>N.get(Oe).executeCommand(K,...A))}getCommand(l){const K=this._commands.get(l);if(!(!K||K.isEmpty()))return xe.$.first(K)}getCommands(){const l=new Map;for(const K of this._commands.keys()){const N=this.getCommand(K);N&&l.set(K,N)}return l}};Ee.registerCommand("noop",()=>{})},90689:function(Bt,it,ne){"use strict";ne.d(it,{Ao:function(){return Oe},Eq:function(){return G},Fb:function(){return Ee},K8:function(){return Z},i6:function(){return Be},uy:function(){return Se}});var se=ne(23345),xe=ne(82983),Le=ne(16925);let Ie=se.WE||"";const Ne=new Map;Ne.set("false",!1),Ne.set("true",!0),Ne.set("isMac",se.dz),Ne.set("isLinux",se.IJ),Ne.set("isWindows",se.ED),Ne.set("isWeb",se.$L),Ne.set("isMacNative",se.dz&&!se.$L),Ne.set("isEdge",Ie.indexOf("Edg/")>=0),Ne.set("isFirefox",Ie.indexOf("Firefox")>=0),Ne.set("isChrome",Ie.indexOf("Chrome")>=0),Ne.set("isSafari",Ie.indexOf("Safari")>=0);const pe=Object.prototype.hasOwnProperty;class Oe{static has(E){return A.create(E)}static equals(E,T){return d.create(E,T)}static regex(E,T){return _e.create(E,T)}static not(E){return H.create(E)}static and(...E){return we.create(E,null)}static or(...E){return Ce.create(E,null,!0)}static deserialize(E,T=!1){if(E)return this._deserializeOrExpression(E,T)}static _deserializeOrExpression(E,T){let X=E.split("||");return Ce.create(X.map(ge=>this._deserializeAndExpression(ge,T)),null,!0)}static _deserializeAndExpression(E,T){let X=E.split("&&");return we.create(X.map(ge=>this._deserializeOne(ge,T)),null)}static _deserializeOne(E,T){if(E=E.trim(),E.indexOf("!=")>=0){let X=E.split("!=");return $.create(X[0].trim(),this._deserializeValue(X[1],T))}if(E.indexOf("==")>=0){let X=E.split("==");return d.create(X[0].trim(),this._deserializeValue(X[1],T))}if(E.indexOf("=~")>=0){let X=E.split("=~");return _e.create(X[0].trim(),this._deserializeRegexValue(X[1],T))}if(E.indexOf(" in ")>=0){let X=E.split(" in ");return x.create(X[0].trim(),X[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(E)){const X=E.split(">=");return V.create(X[0].trim(),X[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(E)){const X=E.split(">");return R.create(X[0].trim(),X[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(E)){const X=E.split("<=");return C.create(X[0].trim(),X[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(E)){const X=E.split("<");return te.create(X[0].trim(),X[1].trim())}return/^\!\s*/.test(E)?H.create(E.substr(1).trim()):A.create(E)}static _deserializeValue(E,T){if(E=E.trim(),E==="true")return!0;if(E==="false")return!1;let X=/^'([^']*)'$/.exec(E);return X?X[1].trim():E}static _deserializeRegexValue(E,T){if((0,xe.m5)(E)){if(T)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let X=E.indexOf("/"),ge=E.lastIndexOf("/");if(X===ge||X<0){if(T)throw new Error(`bad regexp-value '${E}', missing /-enclosure`);return console.warn(`bad regexp-value '${E}', missing /-enclosure`),null}let je=E.slice(X+1,ge),Qe=E[ge+1]==="i"?"i":"";try{return new RegExp(je,Qe)}catch(nt){if(T)throw new Error(`bad regexp-value '${E}', parse error: ${nt}`);return console.warn(`bad regexp-value '${E}', parse error: ${nt}`),null}}}function Ee(ee,E){const T=ee?ee.substituteConstants():void 0,X=E?E.substituteConstants():void 0;return!T&&!X?!0:!T||!X?!1:T.equals(X)}function l(ee,E){return ee.cmp(E)}class K{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 N.INSTANCE}}K.INSTANCE=new K;class N{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 K.INSTANCE}}N.INSTANCE=new N;class A{constructor(E,T){this.key=E,this.negated=T,this.type=2}static create(E,T=null){const X=Ne.get(E);return typeof X=="boolean"?X?N.INSTANCE:K.INSTANCE:new A(E,T)}cmp(E){return E.type!==this.type?this.type-E.type:U(this.key,E.key)}equals(E){return E.type===this.type?this.key===E.key:!1}substituteConstants(){const E=Ne.get(this.key);return typeof E=="boolean"?E?N.INSTANCE:K.INSTANCE:this}evaluate(E){return!!E.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=H.create(this.key,this)),this.negated}}class d{constructor(E,T,X){this.key=E,this.value=T,this.negated=X,this.type=4}static create(E,T,X=null){if(typeof T=="boolean")return T?A.create(E,X):H.create(E,X);const ge=Ne.get(E);return typeof ge=="boolean"?T===(ge?"true":"false")?N.INSTANCE:K.INSTANCE:new d(E,T,X)}cmp(E){return E.type!==this.type?this.type-E.type:j(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=Ne.get(this.key);if(typeof E=="boolean"){const T=E?"true":"false";return this.value===T?N.INSTANCE:K.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=$.create(this.key,this.value,this)),this.negated}}class x{constructor(E,T){this.key=E,this.valueKey=T,this.type=10,this.negated=null}static create(E,T){return new x(E,T)}cmp(E){return E.type!==this.type?this.type-E.type:j(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 T=E.getValue(this.valueKey),X=E.getValue(this.key);return Array.isArray(T)?T.indexOf(X)>=0:typeof X=="string"&&typeof T=="object"&&T!==null?pe.call(T,X):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=y.create(this)),this.negated}}class y{constructor(E){this._actual=E,this.type=11}static create(E){return new y(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 ${constructor(E,T,X){this.key=E,this.value=T,this.negated=X,this.type=5}static create(E,T,X=null){if(typeof T=="boolean")return T?H.create(E,X):A.create(E,X);const ge=Ne.get(E);return typeof ge=="boolean"?T===(ge?"true":"false")?K.INSTANCE:N.INSTANCE:new $(E,T,X)}cmp(E){return E.type!==this.type?this.type-E.type:j(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=Ne.get(this.key);if(typeof E=="boolean"){const T=E?"true":"false";return this.value===T?K.INSTANCE:N.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 H{constructor(E,T){this.key=E,this.negated=T,this.type=3}static create(E,T=null){const X=Ne.get(E);return typeof X=="boolean"?X?K.INSTANCE:N.INSTANCE:new H(E,T)}cmp(E){return E.type!==this.type?this.type-E.type:U(this.key,E.key)}equals(E){return E.type===this.type?this.key===E.key:!1}substituteConstants(){const E=Ne.get(this.key);return typeof E=="boolean"?E?K.INSTANCE:N.INSTANCE:this}evaluate(E){return!E.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=A.create(this.key,this)),this.negated}}function F(ee,E){if(typeof ee=="string"){const T=parseFloat(ee);isNaN(T)||(ee=T)}return typeof ee=="string"||typeof ee=="number"?E(ee):K.INSTANCE}class R{constructor(E,T,X){this.key=E,this.value=T,this.negated=X,this.type=12}static create(E,T,X=null){return F(T,ge=>new R(E,ge,X))}cmp(E){return E.type!==this.type?this.type-E.type:j(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,T,X){this.key=E,this.value=T,this.negated=X,this.type=13}static create(E,T,X=null){return F(T,ge=>new V(E,ge,X))}cmp(E){return E.type!==this.type?this.type-E.type:j(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=te.create(this.key,this.value,this)),this.negated}}class te{constructor(E,T,X){this.key=E,this.value=T,this.negated=X,this.type=14}static create(E,T,X=null){return F(T,ge=>new te(E,ge,X))}cmp(E){return E.type!==this.type?this.type-E.type:j(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,T,X){this.key=E,this.value=T,this.negated=X,this.type=15}static create(E,T,X=null){return F(T,ge=>new C(E,ge,X))}cmp(E){return E.type!==this.type?this.type-E.type:j(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=R.create(this.key,this.value,this)),this.negated}}class _e{constructor(E,T){this.key=E,this.regexp=T,this.type=7,this.negated=null}static create(E,T){return new _e(E,T)}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 T=this.regexp?this.regexp.source:"",X=E.regexp?E.regexp.source:"";return T<X?-1:T>X?1:0}equals(E){if(E.type===this.type){const T=this.regexp?this.regexp.source:"",X=E.regexp?E.regexp.source:"";return this.key===E.key&&T===X}return!1}substituteConstants(){return this}evaluate(E){let T=E.getValue(this.key);return this.regexp?this.regexp.test(T):!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=ve.create(this)),this.negated}}class ve{constructor(E){this._actual=E,this.type=8}static create(E){return new ve(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 de(ee){let E=null;for(let T=0,X=ee.length;T<X;T++){const ge=ee[T].substituteConstants();if(ee[T]!==ge&&E===null){E=[];for(let je=0;je<T;je++)E[je]=ee[je]}E!==null&&(E[T]=ge)}return E===null?ee:E}class we{constructor(E,T){this.expr=E,this.negated=T,this.type=6}static create(E,T){return we._normalizeArr(E,T)}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 T=0,X=this.expr.length;T<X;T++){const ge=l(this.expr[T],E.expr[T]);if(ge!==0)return ge}return 0}equals(E){if(E.type===this.type){if(this.expr.length!==E.expr.length)return!1;for(let T=0,X=this.expr.length;T<X;T++)if(!this.expr[T].equals(E.expr[T]))return!1;return!0}return!1}substituteConstants(){const E=de(this.expr);return E===this.expr?this:we.create(E,this.negated)}evaluate(E){for(let T=0,X=this.expr.length;T<X;T++)if(!this.expr[T].evaluate(E))return!1;return!0}static _normalizeArr(E,T){const X=[];let ge=!1;for(const je of E)if(je){if(je.type===1){ge=!0;continue}if(je.type===0)return K.INSTANCE;if(je.type===6){X.push(...je.expr);continue}X.push(je)}if(X.length===0&&ge)return N.INSTANCE;if(X.length!==0){if(X.length===1)return X[0];X.sort(l);for(let je=1;je<X.length;je++)X[je-1].equals(X[je])&&(X.splice(je,1),je--);if(X.length===1)return X[0];for(;X.length>1;){const je=X[X.length-1];if(je.type!==9)break;X.pop();const Qe=X.pop(),nt=X.length===0,rt=Ce.create(je.expr.map(Gt=>we.create([Gt,Qe],null)),null,nt);rt&&(X.push(rt),X.sort(l))}return X.length===1?X[0]:new we(X,T)}}serialize(){return this.expr.map(E=>E.serialize()).join(" && ")}keys(){const E=[];for(let T of this.expr)E.push(...T.keys());return E}negate(){if(!this.negated){const E=[];for(let T of this.expr)E.push(T.negate());this.negated=Ce.create(E,this,!0)}return this.negated}}class Ce{constructor(E,T){this.expr=E,this.negated=T,this.type=9}static create(E,T,X){return Ce._normalizeArr(E,T,X)}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 T=0,X=this.expr.length;T<X;T++){const ge=l(this.expr[T],E.expr[T]);if(ge!==0)return ge}return 0}equals(E){if(E.type===this.type){if(this.expr.length!==E.expr.length)return!1;for(let T=0,X=this.expr.length;T<X;T++)if(!this.expr[T].equals(E.expr[T]))return!1;return!0}return!1}substituteConstants(){const E=de(this.expr);return E===this.expr?this:Ce.create(E,this.negated,!1)}evaluate(E){for(let T=0,X=this.expr.length;T<X;T++)if(this.expr[T].evaluate(E))return!0;return!1}static _normalizeArr(E,T,X){let ge=[],je=!1;if(E){for(let Qe=0,nt=E.length;Qe<nt;Qe++){const rt=E[Qe];if(rt){if(rt.type===0){je=!0;continue}if(rt.type===1)return N.INSTANCE;if(rt.type===9){ge=ge.concat(rt.expr);continue}ge.push(rt)}}if(ge.length===0&&je)return K.INSTANCE;ge.sort(l)}if(ge.length!==0){if(ge.length===1)return ge[0];for(let Qe=1;Qe<ge.length;Qe++)ge[Qe-1].equals(ge[Qe])&&(ge.splice(Qe,1),Qe--);if(ge.length===1)return ge[0];if(X){for(let Qe=0;Qe<ge.length;Qe++)for(let nt=Qe+1;nt<ge.length;nt++)Z(ge[Qe],ge[nt])&&(ge.splice(nt,1),nt--);if(ge.length===1)return ge[0]}return new Ce(ge,T)}}serialize(){return this.expr.map(E=>E.serialize()).join(" || ")}keys(){const E=[];for(let T of this.expr)E.push(...T.keys());return E}negate(){if(!this.negated){let E=[];for(let T of this.expr)E.push(T.negate());for(;E.length>1;){const T=E.shift(),X=E.shift(),ge=[];for(const Qe of le(T))for(const nt of le(X))ge.push(we.create([Qe,nt],null));const je=E.length===0;E.unshift(Ce.create(ge,null,je))}this.negated=E[0]}return this.negated}}class Se extends A{constructor(E,T,X){super(E,null),this._defaultValue=T,typeof X=="object"?Se._info.push(Object.assign(Object.assign({},X),{key:E})):X!==!0&&Se._info.push({key:E,description:X,type:T!=null?typeof T:void 0})}static all(){return Se._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)}}Se._info=[];const Be=(0,Le.yh)("contextKeyService"),G="setContext";function U(ee,E){return ee<E?-1:ee>E?1:0}function j(ee,E,T,X){return ee<T?-1:ee>T?1:E<X?-1:E>X?1:0}function Z(ee,E){if(E.type===6&&ee.type!==9&&ee.type!==6){for(const ge of E.expr)if(ee.equals(ge))return!0}const T=ee.negate(),X=le(T).concat(le(E));X.sort(l);for(let ge=0;ge<X.length;ge++){const Qe=X[ge].negate();for(let nt=ge+1;nt<X.length;nt++){const rt=X[nt];if(Qe.equals(rt))return!0}}return!1}function le(ee){return ee.type===9?ee.expr:[ee]}},16925:function(Bt,it,ne){"use strict";ne.d(it,{I8:function(){return se},TG:function(){return xe},jt:function(){return Ne},yh:function(){return Ie}});var se;(function(pe){pe.serviceIds=new Map,pe.DI_TARGET="$di$target",pe.DI_DEPENDENCIES="$di$dependencies";function Oe(Ee){return Ee[pe.DI_DEPENDENCIES]||[]}pe.getServiceDependencies=Oe})(se||(se={}));const xe=Ie("instantiationService");function Le(pe,Oe,Ee,l){Oe[se.DI_TARGET]===Oe?Oe[se.DI_DEPENDENCIES].push({id:pe,index:Ee,optional:l}):(Oe[se.DI_DEPENDENCIES]=[{id:pe,index:Ee,optional:l}],Oe[se.DI_TARGET]=Oe)}function Ie(pe){if(se.serviceIds.has(pe))return se.serviceIds.get(pe);const Oe=function(Ee,l,K){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");Le(Oe,Ee,K,!1)};return Oe.toString=()=>pe,se.serviceIds.set(pe,Oe),Oe}function Ne(pe){return function(Oe,Ee,l){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");Le(pe,Oe,l,!0)}}},44650:function(Bt,it,ne){"use strict";ne.d(it,{B:function(){return Ie}});var se=ne(76068),xe=ne(72999);class Le{constructor(){this.data=new Map}add(pe,Oe){se.ok(xe.HD(pe)),se.ok(xe.Kn(Oe)),se.ok(!this.data.has(pe),"There is already an extension with this id"),this.data.set(pe,Oe)}as(pe){return this.data.get(pe)||null}}const Ie=new Le},66213:function(Bt,it,ne){"use strict";ne.d(it,{e:function(){return se}});var se;(function(xe){xe.DARK="dark",xe.LIGHT="light",xe.HIGH_CONTRAST="hc"})(se||(se={}))},49055:function(Bt,it,ne){"use strict";ne.d(it,{EN:function(){return l},IP:function(){return A},Ic:function(){return y},XE:function(){return Oe},bB:function(){return $},kS:function(){return K},m6:function(){return N}});var se=ne(52615),xe=ne(4348),Le=ne(69323),Ie=ne(16925),Ne=ne(44650),pe=ne(66213);const Oe=(0,Ie.yh)("themeService");var Ee;(function(H){function F(R){return R&&typeof R=="object"&&typeof R.id=="string"}H.isThemeColor=F})(Ee||(Ee={}));function l(H){return{id:H}}var K;(function(H){function F(ve){return ve&&typeof ve=="object"&&typeof ve.id=="string"&&(typeof ve.color=="undefined"||Ee.isThemeColor(ve.color))}H.isThemeIcon=F;const R=new RegExp(`^\\$\\((${se.dT.iconNameExpression}(?:${se.dT.iconModifierExpression})?)\\)$`);function V(ve){const de=R.exec(ve);if(!de)return;let[,we]=de;return{id:we}}H.fromString=V;function te(ve,de){let we=ve.id;const Ce=we.lastIndexOf("~");return Ce!==-1&&(we=we.substring(0,Ce)),de&&(we=`${we}~${de}`),{id:we}}H.modify=te;function C(ve,de){var we,Ce;return ve.id===de.id&&((we=ve.color)===null||we===void 0?void 0:we.id)===((Ce=de.color)===null||Ce===void 0?void 0:Ce.id)}H.isEqual=C;function _e(ve,de){return{id:ve.id,color:de?l(de):void 0}}H.asThemeIcon=_e,H.asClassNameArray=se.dT.asClassNameArray,H.asClassName=se.dT.asClassName,H.asCSSSelector=se.dT.asCSSSelector})(K||(K={}));function N(H){switch(H){case pe.e.DARK:return"vs-dark";case pe.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const A={ThemingContribution:"base.contributions.theming"};class d{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new xe.Q5}onColorThemeChange(F){return this.themingParticipants.push(F),this.onThemingParticipantAddedEmitter.fire(F),(0,Le.OF)(()=>{const R=this.themingParticipants.indexOf(F);this.themingParticipants.splice(R,1)})}getThemingParticipants(){return this.themingParticipants}}let x=new d;Ne.B.add(A.ThemingContribution,x);function y(H){return x.onColorThemeChange(H)}class $ extends Le.JT{constructor(F){super(),this.themeService=F,this.theme=F.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(R=>this.onThemeChange(R)))}onThemeChange(F){this.theme=F,this.updateStyles()}updateStyles(){}}},29301:function(Bt,it,ne){"use strict";ne.d(it,{Z:function(){return G}});var se=ne(96663),xe=ne(59301),Le=ne(11592),Ie=ne(48736),Ne=ne(44127),pe=ne(20135),Oe=ne(76846),Ee=ne(8654),l=xe.createContext(null);function K(U){var j=U.children,Z=U.onBatchResize,le=xe.useRef(0),ee=xe.useRef([]),E=xe.useContext(l),T=xe.useCallback(function(X,ge,je){le.current+=1;var Qe=le.current;ee.current.push({size:X,element:ge,data:je}),Promise.resolve().then(function(){Qe===le.current&&(Z==null||Z(ee.current),ee.current=[])}),E==null||E(X,ge,je)},[Z,E]);return xe.createElement(l.Provider,{value:T},j)}var N=ne(76374),A=new Map;function d(U){U.forEach(function(j){var Z,le=j.target;(Z=A.get(le))===null||Z===void 0||Z.forEach(function(ee){return ee(le)})})}var x=new N.Z(d),y=null,$=null;function H(U,j){A.has(U)||(A.set(U,new Set),x.observe(U)),A.get(U).add(j)}function F(U,j){A.has(U)&&(A.get(U).delete(j),A.get(U).size||(x.unobserve(U),A.delete(U)))}var R=ne(52884),V=ne(95727),te=ne(65711),C=ne(85745),_e=function(U){(0,te.Z)(Z,U);var j=(0,C.Z)(Z);function Z(){return(0,R.Z)(this,Z),j.apply(this,arguments)}return(0,V.Z)(Z,[{key:"render",value:function(){return this.props.children}}]),Z}(xe.Component);function ve(U,j){var Z=U.children,le=U.disabled,ee=xe.useRef(null),E=xe.useRef(null),T=xe.useContext(l),X=typeof Z=="function",ge=X?Z(ee):Z,je=xe.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Qe=!X&&xe.isValidElement(ge)&&(0,Ee.Yr)(ge),nt=Qe?(0,Ee.C4)(ge):null,rt=(0,Ee.x1)(nt,ee),Gt=function(){var sr;return(0,Oe.ZP)(ee.current)||(ee.current&&(0,pe.Z)(ee.current)==="object"?(0,Oe.ZP)((sr=ee.current)===null||sr===void 0?void 0:sr.nativeElement):null)||(0,Oe.ZP)(E.current)};xe.useImperativeHandle(j,function(){return Gt()});var ct=xe.useRef(U);ct.current=U;var st=xe.useCallback(function(tr){var sr=ct.current,yr=sr.onResize,ar=sr.data,qt=tr.getBoundingClientRect(),Kt=qt.width,ke=qt.height,Je=tr.offsetWidth,ue=tr.offsetHeight,Me=Math.floor(Kt),Ge=Math.floor(ke);if(je.current.width!==Me||je.current.height!==Ge||je.current.offsetWidth!==Je||je.current.offsetHeight!==ue){var O={width:Me,height:Ge,offsetWidth:Je,offsetHeight:ue};je.current=O;var Q=Je===Math.round(Kt)?Kt:Je,ye=ue===Math.round(ke)?ke:ue,fe=(0,Ne.Z)((0,Ne.Z)({},O),{},{offsetWidth:Q,offsetHeight:ye});T==null||T(fe,tr,ar),yr&&Promise.resolve().then(function(){yr(fe,tr)})}},[]);return xe.useEffect(function(){var tr=Gt();return tr&&!le&&H(tr,st),function(){return F(tr,st)}},[ee.current,le]),xe.createElement(_e,{ref:E},Qe?xe.cloneElement(ge,{ref:rt}):ge)}var de=xe.forwardRef(ve),we=de,Ce="rc-observer-key";function Se(U,j){var Z=U.children,le=typeof Z=="function"?[Z]:(0,Le.Z)(Z);return le.map(function(ee,E){var T=(ee==null?void 0:ee.key)||"".concat(Ce,"-").concat(E);return xe.createElement(we,(0,se.Z)({},U,{key:T,ref:E===0?j:void 0}),ee)})}var Be=xe.forwardRef(Se);Be.Collection=K;var G=Be},55477:function(Bt,it,ne){"use strict";ne.d(it,{G:function(){return d},Z:function(){return H}});var se=ne(96663),xe=ne(44127),Le=ne(6620),Ie=ne(35593),Ne=ne(59301),pe={shiftX:64,adjustY:1},Oe={adjustX:1,shiftY:!0},Ee=[0,0],l={left:{points:["cr","cl"],overflow:Oe,offset:[-4,0],targetOffset:Ee},right:{points:["cl","cr"],overflow:Oe,offset:[4,0],targetOffset:Ee},top:{points:["bc","tc"],overflow:pe,offset:[0,-4],targetOffset:Ee},bottom:{points:["tc","bc"],overflow:pe,offset:[0,4],targetOffset:Ee},topLeft:{points:["bl","tl"],overflow:pe,offset:[0,-4],targetOffset:Ee},leftTop:{points:["tr","tl"],overflow:Oe,offset:[-4,0],targetOffset:Ee},topRight:{points:["br","tr"],overflow:pe,offset:[0,-4],targetOffset:Ee},rightTop:{points:["tl","tr"],overflow:Oe,offset:[4,0],targetOffset:Ee},bottomRight:{points:["tr","br"],overflow:pe,offset:[0,4],targetOffset:Ee},rightBottom:{points:["bl","br"],overflow:Oe,offset:[4,0],targetOffset:Ee},bottomLeft:{points:["tl","bl"],overflow:pe,offset:[0,4],targetOffset:Ee},leftBottom:{points:["br","bl"],overflow:Oe,offset:[-4,0],targetOffset:Ee}},K=null,N=ne(92310),A=ne.n(N);function d(F){var R=F.children,V=F.prefixCls,te=F.id,C=F.overlayInnerStyle,_e=F.className,ve=F.style;return Ne.createElement("div",{className:A()("".concat(V,"-content"),_e),style:ve},Ne.createElement("div",{className:"".concat(V,"-inner"),id:te,role:"tooltip",style:C},typeof R=="function"?R():R))}var x=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"],y=function(R,V){var te=R.overlayClassName,C=R.trigger,_e=C===void 0?["hover"]:C,ve=R.mouseEnterDelay,de=ve===void 0?0:ve,we=R.mouseLeaveDelay,Ce=we===void 0?.1:we,Se=R.overlayStyle,Be=R.prefixCls,G=Be===void 0?"rc-tooltip":Be,U=R.children,j=R.onVisibleChange,Z=R.afterVisibleChange,le=R.transitionName,ee=R.animation,E=R.motion,T=R.placement,X=T===void 0?"right":T,ge=R.align,je=ge===void 0?{}:ge,Qe=R.destroyTooltipOnHide,nt=Qe===void 0?!1:Qe,rt=R.defaultVisible,Gt=R.getTooltipContainer,ct=R.overlayInnerStyle,st=R.arrowContent,tr=R.overlay,sr=R.id,yr=R.showArrow,ar=yr===void 0?!0:yr,qt=(0,Le.Z)(R,x),Kt=(0,Ne.useRef)(null);(0,Ne.useImperativeHandle)(V,function(){return Kt.current});var ke=(0,xe.Z)({},qt);"visible"in R&&(ke.popupVisible=R.visible);var Je=function(){return Ne.createElement(d,{key:"content",prefixCls:G,id:sr,overlayInnerStyle:ct},tr)};return Ne.createElement(Ie.Z,(0,se.Z)({popupClassName:te,prefixCls:G,popup:Je,action:_e,builtinPlacements:l,popupPlacement:X,ref:Kt,popupAlign:je,getPopupContainer:Gt,onPopupVisibleChange:j,afterPopupVisibleChange:Z,popupTransitionName:le,popupAnimation:ee,popupMotion:E,defaultPopupVisible:rt,autoDestroy:nt,mouseLeaveDelay:Ce,popupStyle:Se,mouseEnterDelay:de,arrow:ar},ke),U)},$=(0,Ne.forwardRef)(y),H=$},49658:function(Bt,it){"use strict";it.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var ne=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(ne)||/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(ne==null?void 0:ne.substr(0,4))}},83145:function(Bt,it,ne){"use strict";Object.defineProperty(it,"__esModule",{value:!0}),it.CopyToClipboard=void 0;var se=Le(ne(59301)),xe=Le(ne(25769));function Le(R){return R&&R.__esModule?R:{default:R}}function Ie(R){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ie=function(te){return typeof te}:Ie=function(te){return te&&typeof Symbol=="function"&&te.constructor===Symbol&&te!==Symbol.prototype?"symbol":typeof te},Ie(R)}function Ne(R,V){var te=Object.keys(R);if(Object.getOwnPropertySymbols){var C=Object.getOwnPropertySymbols(R);V&&(C=C.filter(function(_e){return Object.getOwnPropertyDescriptor(R,_e).enumerable})),te.push.apply(te,C)}return te}function pe(R){for(var V=1;V<arguments.length;V++){var te=arguments[V]!=null?arguments[V]:{};V%2?Ne(te,!0).forEach(function(C){H(R,C,te[C])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(te)):Ne(te).forEach(function(C){Object.defineProperty(R,C,Object.getOwnPropertyDescriptor(te,C))})}return R}function Oe(R,V){if(R==null)return{};var te=Ee(R,V),C,_e;if(Object.getOwnPropertySymbols){var ve=Object.getOwnPropertySymbols(R);for(_e=0;_e<ve.length;_e++)C=ve[_e],!(V.indexOf(C)>=0)&&Object.prototype.propertyIsEnumerable.call(R,C)&&(te[C]=R[C])}return te}function Ee(R,V){if(R==null)return{};var te={},C=Object.keys(R),_e,ve;for(ve=0;ve<C.length;ve++)_e=C[ve],!(V.indexOf(_e)>=0)&&(te[_e]=R[_e]);return te}function l(R,V){if(!(R instanceof V))throw new TypeError("Cannot call a class as a function")}function K(R,V){for(var te=0;te<V.length;te++){var C=V[te];C.enumerable=C.enumerable||!1,C.configurable=!0,"value"in C&&(C.writable=!0),Object.defineProperty(R,C.key,C)}}function N(R,V,te){return V&&K(R.prototype,V),te&&K(R,te),R}function A(R,V){return V&&(Ie(V)==="object"||typeof V=="function")?V:x(R)}function d(R){return d=Object.setPrototypeOf?Object.getPrototypeOf:function(te){return te.__proto__||Object.getPrototypeOf(te)},d(R)}function x(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}function y(R,V){if(typeof V!="function"&&V!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(V&&V.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),V&&$(R,V)}function $(R,V){return $=Object.setPrototypeOf||function(C,_e){return C.__proto__=_e,C},$(R,V)}function H(R,V,te){return V in R?Object.defineProperty(R,V,{value:te,enumerable:!0,configurable:!0,writable:!0}):R[V]=te,R}var F=function(R){y(V,R);function V(){var te,C;l(this,V);for(var _e=arguments.length,ve=new Array(_e),de=0;de<_e;de++)ve[de]=arguments[de];return C=A(this,(te=d(V)).call.apply(te,[this].concat(ve))),H(x(C),"onClick",function(we){var Ce=C.props,Se=Ce.text,Be=Ce.onCopy,G=Ce.children,U=Ce.options,j=se.default.Children.only(G),Z=(0,xe.default)(Se,U);Be&&Be(Se,Z),j&&j.props&&typeof j.props.onClick=="function"&&j.props.onClick(we)}),C}return N(V,[{key:"render",value:function(){var C=this.props,_e=C.text,ve=C.onCopy,de=C.options,we=C.children,Ce=Oe(C,["text","onCopy","options","children"]),Se=se.default.Children.only(we);return se.default.cloneElement(Se,pe({},Ce,{onClick:this.onClick}))}}]),V}(se.default.PureComponent);it.CopyToClipboard=F,H(F,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(Bt,it,ne){"use strict";var se=ne(83145),xe=se.CopyToClipboard;xe.CopyToClipboard=xe,Bt.exports=xe},76374:function(Bt,it,ne){"use strict";var se=function(){if(typeof Map!="undefined")return Map;function G(U,j){var Z=-1;return U.some(function(le,ee){return le[0]===j?(Z=ee,!0):!1}),Z}return function(){function U(){this.__entries__=[]}return Object.defineProperty(U.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),U.prototype.get=function(j){var Z=G(this.__entries__,j),le=this.__entries__[Z];return le&&le[1]},U.prototype.set=function(j,Z){var le=G(this.__entries__,j);~le?this.__entries__[le][1]=Z:this.__entries__.push([j,Z])},U.prototype.delete=function(j){var Z=this.__entries__,le=G(Z,j);~le&&Z.splice(le,1)},U.prototype.has=function(j){return!!~G(this.__entries__,j)},U.prototype.clear=function(){this.__entries__.splice(0)},U.prototype.forEach=function(j,Z){Z===void 0&&(Z=null);for(var le=0,ee=this.__entries__;le<ee.length;le++){var E=ee[le];j.call(Z,E[1],E[0])}},U}()}(),xe=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,Le=function(){return typeof ne.g!="undefined"&&ne.g.Math===Math?ne.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),Ie=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Le):function(G){return setTimeout(function(){return G(Date.now())},1e3/60)}}(),Ne=2;function pe(G,U){var j=!1,Z=!1,le=0;function ee(){j&&(j=!1,G()),Z&&T()}function E(){Ie(ee)}function T(){var X=Date.now();if(j){if(X-le<Ne)return;Z=!0}else j=!0,Z=!1,setTimeout(E,U);le=X}return T}var Oe=20,Ee=["top","right","bottom","left","width","height","size","weight"],l=typeof MutationObserver!="undefined",K=function(){function G(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=pe(this.refresh.bind(this),Oe)}return G.prototype.addObserver=function(U){~this.observers_.indexOf(U)||this.observers_.push(U),this.connected_||this.connect_()},G.prototype.removeObserver=function(U){var j=this.observers_,Z=j.indexOf(U);~Z&&j.splice(Z,1),!j.length&&this.connected_&&this.disconnect_()},G.prototype.refresh=function(){var U=this.updateObservers_();U&&this.refresh()},G.prototype.updateObservers_=function(){var U=this.observers_.filter(function(j){return j.gatherActive(),j.hasActive()});return U.forEach(function(j){return j.broadcastActive()}),U.length>0},G.prototype.connect_=function(){!xe||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)},G.prototype.disconnect_=function(){!xe||!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)},G.prototype.onTransitionEnd_=function(U){var j=U.propertyName,Z=j===void 0?"":j,le=Ee.some(function(ee){return!!~Z.indexOf(ee)});le&&this.refresh()},G.getInstance=function(){return this.instance_||(this.instance_=new G),this.instance_},G.instance_=null,G}(),N=function(G,U){for(var j=0,Z=Object.keys(U);j<Z.length;j++){var le=Z[j];Object.defineProperty(G,le,{value:U[le],enumerable:!1,writable:!1,configurable:!0})}return G},A=function(G){var U=G&&G.ownerDocument&&G.ownerDocument.defaultView;return U||Le},d=_e(0,0,0,0);function x(G){return parseFloat(G)||0}function y(G){for(var U=[],j=1;j<arguments.length;j++)U[j-1]=arguments[j];return U.reduce(function(Z,le){var ee=G["border-"+le+"-width"];return Z+x(ee)},0)}function $(G){for(var U=["top","right","bottom","left"],j={},Z=0,le=U;Z<le.length;Z++){var ee=le[Z],E=G["padding-"+ee];j[ee]=x(E)}return j}function H(G){var U=G.getBBox();return _e(0,0,U.width,U.height)}function F(G){var U=G.clientWidth,j=G.clientHeight;if(!U&&!j)return d;var Z=A(G).getComputedStyle(G),le=$(Z),ee=le.left+le.right,E=le.top+le.bottom,T=x(Z.width),X=x(Z.height);if(Z.boxSizing==="border-box"&&(Math.round(T+ee)!==U&&(T-=y(Z,"left","right")+ee),Math.round(X+E)!==j&&(X-=y(Z,"top","bottom")+E)),!V(G)){var ge=Math.round(T+ee)-U,je=Math.round(X+E)-j;Math.abs(ge)!==1&&(T-=ge),Math.abs(je)!==1&&(X-=je)}return _e(le.left,le.top,T,X)}var R=function(){return typeof SVGGraphicsElement!="undefined"?function(G){return G instanceof A(G).SVGGraphicsElement}:function(G){return G instanceof A(G).SVGElement&&typeof G.getBBox=="function"}}();function V(G){return G===A(G).document.documentElement}function te(G){return xe?R(G)?H(G):F(G):d}function C(G){var U=G.x,j=G.y,Z=G.width,le=G.height,ee=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,E=Object.create(ee.prototype);return N(E,{x:U,y:j,width:Z,height:le,top:j,right:U+Z,bottom:le+j,left:U}),E}function _e(G,U,j,Z){return{x:G,y:U,width:j,height:Z}}var ve=function(){function G(U){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=_e(0,0,0,0),this.target=U}return G.prototype.isActive=function(){var U=te(this.target);return this.contentRect_=U,U.width!==this.broadcastWidth||U.height!==this.broadcastHeight},G.prototype.broadcastRect=function(){var U=this.contentRect_;return this.broadcastWidth=U.width,this.broadcastHeight=U.height,U},G}(),de=function(){function G(U,j){var Z=C(j);N(this,{target:U,contentRect:Z})}return G}(),we=function(){function G(U,j,Z){if(this.activeObservations_=[],this.observations_=new se,typeof U!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=U,this.controller_=j,this.callbackCtx_=Z}return G.prototype.observe=function(U){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(U instanceof A(U).Element))throw new TypeError('parameter 1 is not of type "Element".');var j=this.observations_;j.has(U)||(j.set(U,new ve(U)),this.controller_.addObserver(this),this.controller_.refresh())}},G.prototype.unobserve=function(U){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(U instanceof A(U).Element))throw new TypeError('parameter 1 is not of type "Element".');var j=this.observations_;j.has(U)&&(j.delete(U),j.size||this.controller_.removeObserver(this))}},G.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},G.prototype.gatherActive=function(){var U=this;this.clearActive(),this.observations_.forEach(function(j){j.isActive()&&U.activeObservations_.push(j)})},G.prototype.broadcastActive=function(){if(this.hasActive()){var U=this.callbackCtx_,j=this.activeObservations_.map(function(Z){return new de(Z.target,Z.broadcastRect())});this.callback_.call(U,j,U),this.clearActive()}},G.prototype.clearActive=function(){this.activeObservations_.splice(0)},G.prototype.hasActive=function(){return this.activeObservations_.length>0},G}(),Ce=typeof WeakMap!="undefined"?new WeakMap:new se,Se=function(){function G(U){if(!(this instanceof G))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var j=K.getInstance(),Z=new we(U,j,this);Ce.set(this,Z)}return G}();["observe","unobserve","disconnect"].forEach(function(G){Se.prototype[G]=function(){var U;return(U=Ce.get(this))[G].apply(U,arguments)}});var Be=function(){return typeof Le.ResizeObserver!="undefined"?Le.ResizeObserver:Se}();it.Z=Be},98040:function(Bt){Bt.exports=function(){var it=document.getSelection();if(!it.rangeCount)return function(){};for(var ne=document.activeElement,se=[],xe=0;xe<it.rangeCount;xe++)se.push(it.getRangeAt(xe));switch(ne.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":ne.blur();break;default:ne=null;break}return it.removeAllRanges(),function(){it.type==="Caret"&&it.removeAllRanges(),it.rangeCount||se.forEach(function(Le){it.addRange(Le)}),ne&&ne.focus()}}},1012:function(Bt,it,ne){"use strict";ne.d(it,{Z:function(){return A}});var se=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),xe=new Uint8Array(16);function Le(){if(!se)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return se(xe)}var Ie=/^(?:[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 Ne(d){return typeof d=="string"&&Ie.test(d)}for(var pe=Ne,Oe=[],Ee=0;Ee<256;++Ee)Oe.push((Ee+256).toString(16).substr(1));function l(d){var x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,y=(Oe[d[x+0]]+Oe[d[x+1]]+Oe[d[x+2]]+Oe[d[x+3]]+"-"+Oe[d[x+4]]+Oe[d[x+5]]+"-"+Oe[d[x+6]]+Oe[d[x+7]]+"-"+Oe[d[x+8]]+Oe[d[x+9]]+"-"+Oe[d[x+10]]+Oe[d[x+11]]+Oe[d[x+12]]+Oe[d[x+13]]+Oe[d[x+14]]+Oe[d[x+15]]).toLowerCase();if(!pe(y))throw TypeError("Stringified UUID is invalid");return y}var K=l;function N(d,x,y){d=d||{};var $=d.random||(d.rng||Le)();if($[6]=$[6]&15|64,$[8]=$[8]&63|128,x){y=y||0;for(var H=0;H<16;++H)x[y+H]=$[H];return x}return K($)}var A=N},93314:function(Bt){"use strict";Bt.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(Bt,it,ne){"use strict";ne.d(it,{ZP:function(){return ls}});function se(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var xe={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 v=u.parseURL(f);if(!v)throw new Error("Error trying to parse base URL.");return v.path=u.normalizePath(v.path),u.buildURLFromParts(v)}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 M=u.parseURL(f);if(!M)throw new Error("Error trying to parse base URL.");if(!M.netLoc&&M.path&&M.path[0]!=="/"){var P=n.exec(M.path);M.netLoc=P[1],M.path=P[2]}M.netLoc&&!M.path&&(M.path="/");var z={scheme:M.scheme,netLoc:k.netLoc,path:null,params:k.params,query:k.query,fragment:k.fragment};if(!k.netLoc&&(z.netLoc=M.netLoc,k.path[0]!=="/"))if(!k.path)z.path=M.path,k.params||(z.params=M.params,k.query||(z.query=M.query));else{var Y=M.path,me=Y.substring(0,Y.lastIndexOf("/")+1)+k.path;z.path=u.normalizePath(me)}return z.path===null&&(z.path=g.alwaysNormalize?u.normalizePath(k.path):k.path),u.buildURLFromParts(z)},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})()})(xe);var Le=xe.exports;function Ie(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 Ne(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Ie(Object(t),!0).forEach(function(r){Ee(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):Ie(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}function pe(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 Oe(a){var e=pe(a,"string");return typeof e=="symbol"?e:String(e)}function Ee(a,e,t){return e=Oe(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 K=Number.isFinite||function(a){return typeof a=="number"&&isFinite(a)},N=Number.isSafeInteger||function(a){return typeof a=="number"&&Math.abs(a)<=A},A=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}({}),x=function(a){return a.NETWORK_ERROR="networkError",a.MEDIA_ERROR="mediaError",a.KEY_SYSTEM_ERROR="keySystemError",a.MUX_ERROR="muxError",a.OTHER_ERROR="otherError",a}({}),y=function(a){return a.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",a.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",a.KEY_SYSTEM_NO_SESSION="keySystemNoSession",a.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",a.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",a.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",a.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",a.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",a.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",a.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",a.MANIFEST_LOAD_ERROR="manifestLoadError",a.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",a.MANIFEST_PARSING_ERROR="manifestParsingError",a.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",a.LEVEL_EMPTY_ERROR="levelEmptyError",a.LEVEL_LOAD_ERROR="levelLoadError",a.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",a.LEVEL_PARSING_ERROR="levelParsingError",a.LEVEL_SWITCH_ERROR="levelSwitchError",a.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",a.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",a.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",a.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",a.FRAG_LOAD_ERROR="fragLoadError",a.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",a.FRAG_DECRYPT_ERROR="fragDecryptError",a.FRAG_PARSING_ERROR="fragParsingError",a.FRAG_GAP="fragGap",a.REMUX_ALLOC_ERROR="remuxAllocError",a.KEY_LOAD_ERROR="keyLoadError",a.KEY_LOAD_TIMEOUT="keyLoadTimeOut",a.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",a.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",a.BUFFER_APPEND_ERROR="bufferAppendError",a.BUFFER_APPENDING_ERROR="bufferAppendingError",a.BUFFER_STALLED_ERROR="bufferStalledError",a.BUFFER_FULL_ERROR="bufferFullError",a.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",a.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",a.INTERNAL_EXCEPTION="internalException",a.INTERNAL_ABORTED="aborted",a.UNKNOWN="unknown",a}({});const $=function(){},H={trace:$,debug:$,log:$,warn:$,info:$,error:$};let F=H;function R(a){const e=self.console[a];return e?e.bind(self.console,`[${a}] >`):$}function V(a,...e){e.forEach(function(t){F[t]=a[t]?a[t].bind(a):R(t)})}function te(a,e){if(typeof console=="object"&&a===!0||typeof a=="object"){V(a,"debug","log","info","warn","error");try{F.log(`Debug logs enabled for "${e}" in hls.js version 1.5.20`)}catch(t){F=H}}else F=H}const C=F,_e=/^(\d+)x(\d+)$/,ve=/(.+?)=(".*?"|.*?)(?:,|$)/g;class de{constructor(e){typeof e=="string"&&(e=de.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(ve.lastIndex=0;(t=ve.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 we(a){return a!=="ID"&&a!=="CLASS"&&a!=="START-DATE"&&a!=="DURATION"&&a!=="END-DATE"&&a!=="END-ON-NEXT"}function Ce(a){return a==="SCTE35-OUT"||a==="SCTE35-IN"}class Se{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 de({}),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"]);K(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(K(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&&K(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)}}class Be{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 G={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class U{constructor(e){this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams={[G.AUDIO]:null,[G.VIDEO]:null,[G.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=Le.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}}class j extends U{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 Be,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||!K(this.programDateTime))return null;const e=K(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[G.AUDIO]=null,e[G.VIDEO]=null,e[G.AUDIOVIDEO]=null}}class Z extends U{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 Be,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 le=10;class ee{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?K(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||le}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 T(a){const e=je(a).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function X(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 ge(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=T(s)}}return t}function je(a){return Uint8Array.from(unescape(encodeURIComponent(a)),e=>e.charCodeAt(0))}const Qe=typeof self!="undefined"?self:void 0;var nt={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},rt={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function Gt(a){switch(a){case rt.FAIRPLAY:return nt.FAIRPLAY;case rt.PLAYREADY:return nt.PLAYREADY;case rt.WIDEVINE:return nt.WIDEVINE;case rt.CLEARKEY:return nt.CLEARKEY}}var ct={CENC:"1077efecc0b24d02ace33c1e52e2fb4b",CLEARKEY:"e2719d58a985b3c9781ab030af78d30e",FAIRPLAY:"94ce86fb07ff4f43adb893d2fa968ca2",PLAYREADY:"9a04f07998404286ab92e65be0885f95",WIDEVINE:"edef8ba979d64acea3c827dcd51d21ed"};function st(a){if(a===ct.WIDEVINE)return nt.WIDEVINE;if(a===ct.PLAYREADY)return nt.PLAYREADY;if(a===ct.CENC||a===ct.CLEARKEY)return nt.CLEARKEY}function tr(a){switch(a){case nt.FAIRPLAY:return rt.FAIRPLAY;case nt.PLAYREADY:return rt.PLAYREADY;case nt.WIDEVINE:return rt.WIDEVINE;case nt.CLEARKEY:return rt.CLEARKEY}}function sr(a){const{drmSystems:e,widevineLicenseUrl:t}=a,r=e?[nt.FAIRPLAY,nt.WIDEVINE,nt.PLAYREADY,nt.CLEARKEY].filter(n=>!!e[n]):[];return!r[nt.WIDEVINE]&&t&&r.push(nt.WIDEVINE),r}const yr=function(a){return Qe!=null&&(a=Qe.navigator)!=null&&a.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function ar(a,e,t,r){let n;switch(a){case nt.FAIRPLAY:n=["cenc","sinf"];break;case nt.WIDEVINE:case nt.PLAYREADY:n=["cenc"];break;case nt.CLEARKEY:n=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${a}`)}return qt(n,e,t,r)}function qt(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 Kt(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 X(f),f}}return null}function ke(a,e,t){return Uint8Array.prototype.slice?a.slice(e,t):new Uint8Array(Array.prototype.slice.call(a,e,t))}const Je=(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,ue=(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,Me=(a,e)=>{const t=e;let r=0;for(;Je(a,e);){r+=10;const n=Ge(a,e+6);r+=n,ue(a,e+10)&&(r+=10),e+=r}if(r>0)return a.subarray(t,t+r)},Ge=(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},O=(a,e)=>Je(a,e)&&Ge(a,e+6)+10<=a.length-e,Q=a=>{const e=Te(a);for(let t=0;t<e.length;t++){const r=e[t];if(ye(r))return Ke(r)}},ye=a=>a&&a.key==="PRIV"&&a.info==="com.apple.streaming.transportStreamTimestamp",fe=a=>{const e=String.fromCharCode(a[0],a[1],a[2],a[3]),t=Ge(a,4),r=10;return{type:e,size:t,data:a.subarray(r,r+t)}},Te=a=>{let e=0;const t=[];for(;Je(a,e);){const r=Ge(a,e+6);e+=10;const n=e+r;for(;e+8<n;){const i=fe(a.subarray(e)),s=De(i);s&&t.push(s),e+=i.size+10}ue(a,e)&&(e+=10)}return t},De=a=>a.type==="PRIV"?We(a):a.type[0]==="W"?Ve(a):Ze(a),We=a=>{if(a.size<2)return;const e=vt(a.data,!0),t=new Uint8Array(a.data.subarray(e.length+1));return{key:a.type,info:e,data:t.buffer}},Ze=a=>{if(a.size<2)return;if(a.type==="TXXX"){let t=1;const r=vt(a.data.subarray(t),!0);t+=r.length+1;const n=vt(a.data.subarray(t));return{key:a.type,info:r,data:n}}const e=vt(a.data.subarray(1));return{key:a.type,data:e}},Ve=a=>{if(a.type==="WXXX"){if(a.size<2)return;let t=1;const r=vt(a.data.subarray(t),!0);t+=r.length+1;const n=vt(a.data.subarray(t));return{key:a.type,info:r,data:n}}const e=vt(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)}},vt=(a,e=!1)=>{const t=at();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 gt;function at(){if(!navigator.userAgent.includes("PlayStation 4"))return!gt&&typeof self.TextDecoder!="undefined"&&(gt=new self.TextDecoder("utf-8")),gt}const mt={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}},wt=Math.pow(2,32)-1,ft=[].push,Dt={video:1,audio:2,id3:3,text:4};function yt(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 w(a,e){const t=I(a,e);return t<0?4294967296+t:t}function Ye(a,e){let t=w(a,e);return t*=Math.pow(2,32),t+=w(a,e+4),t}function I(a,e){return a[e]<<24|a[e+1]<<16|a[e+2]<<8|a[e+3]}function re(a,e,t){a[e]=t>>24,a[e+1]=t>>16&255,a[e+2]=t>>8&255,a[e+3]=t&255}function zt(a){const e=a.byteLength;for(let t=0;t<e;){const r=w(a,t);if(r>8&&a[t+4]===109&&a[t+5]===111&&a[t+6]===111&&a[t+7]===102)return!0;t=r>1?t+r:e}return!1}function ce(a,e){const t=[];if(!e.length)return t;const r=a.byteLength;for(let n=0;n<r;){const i=w(a,n),s=yt(a.subarray(n+4,n+8)),u=i>1?n+i:r;if(s===e[0])if(e.length===1)t.push(a.subarray(n+8,u));else{const f=ce(a.subarray(n+8,u),e.slice(1));f.length&&ft.apply(t,f)}n=u}return t}function Ae(a){const e=[],t=a[0];let r=8;const n=w(a,r);r+=4;let i=0,s=0;t===0?(i=w(a,r),s=w(a,r+4),r+=8):(i=Ye(a,r),s=Ye(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 v=w(a,g);g+=4;const k=v&2147483647;if((v&2147483648)>>>31===1)return C.warn("SIDX has hierarchical references (not supported)"),null;const P=w(a,g);g+=4,e.push({referenceSize:k,subsegmentDuration:P,info:{duration:P/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 Fe(a){const e=[],t=ce(a,["moov","trak"]);for(let n=0;n<t.length;n++){const i=t[n],s=ce(i,["tkhd"])[0];if(s){let u=s[0];const f=w(s,u===0?12:20),m=ce(i,["mdia","mdhd"])[0];if(m){u=m[0];const g=w(m,u===0?12:20),v=ce(i,["mdia","hdlr"])[0];if(v){const k=yt(v.subarray(8,12)),M={soun:G.AUDIO,vide:G.VIDEO}[k];if(M){const P=ce(i,["mdia","minf","stbl","stsd"])[0],z=B(P);e[f]={timescale:g,type:M},e[M]=Ne({timescale:g,id:f},z)}}}}}return ce(a,["moov","mvex","trex"]).forEach(n=>{const i=w(n,4),s=e[i];s&&(s.default={duration:w(n,12),flags:w(n,20)})}),e}function B(a){const e=a.subarray(8),t=e.subarray(86),r=yt(e.subarray(4,8));let n=r;const i=r==="enca"||r==="encv";if(i){const u=ce(e,[r])[0].subarray(r==="enca"?28:78);ce(u,["sinf"]).forEach(m=>{const g=ce(m,["schm"])[0];if(g){const v=yt(g.subarray(4,8));if(v==="cbcs"||v==="cenc"){const k=ce(m,["frma"])[0];k&&(n=yt(k))}}})}switch(n){case"avc1":case"avc2":case"avc3":case"avc4":{const s=ce(t,["avcC"])[0];n+="."+oe(s[1])+oe(s[2])+oe(s[3]);break}case"mp4a":{const s=ce(e,[r])[0],u=ce(s.subarray(28),["esds"])[0];if(u&&u.length>12){let f=4;if(u[f++]!==3)break;f=q(u,f),f+=2;const m=u[f++];if(m&128&&(f+=2),m&64&&(f+=u[f++]),u[f++]!==4)break;f=q(u,f);const g=u[f++];if(g===64)n+="."+oe(g);else break;if(f+=12,u[f++]!==5)break;f=q(u,f);const v=u[f++];let k=(v&248)>>3;k===31&&(k+=1+((v&7)<<3)+((u[f]&224)>>5)),n+="."+k}break}case"hvc1":case"hev1":{const s=ce(t,["hvcC"])[0],u=s[1],f=["","A","B","C"][u>>6],m=u&31,g=w(s,2),v=(u&32)>>5?"H":"L",k=s[12],M=s.subarray(6,12);n+="."+f+m,n+="."+g.toString(16).toUpperCase(),n+="."+v+k;let P="";for(let z=M.length;z--;){const Y=M[z];(Y||P)&&(P="."+Y.toString(16).toUpperCase()+P)}n+=P;break}case"dvh1":case"dvhe":{const s=ce(t,["dvcC"])[0],u=s[2]>>1&127,f=s[2]<<5&32|s[3]>>3&31;n+="."+be(u)+"."+be(f);break}case"vp09":{const s=ce(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=ce(t,["av1C"])[0],u=s[1]>>>5,f=s[1]&31,m=s[2]>>>7?"H":"M",g=(s[2]&64)>>6,v=(s[2]&32)>>5,k=u===2&&g?v?12:10:g?10:8,M=(s[2]&16)>>4,P=(s[2]&8)>>3,z=(s[2]&4)>>2,Y=s[2]&3;n+="."+u+"."+be(f)+m+"."+be(k)+"."+M+"."+P+z+Y+"."+be(1)+"."+be(1)+"."+be(1)+"."+0;break}}return{codec:n,encrypted:i}}function q(a,e){const t=e+5;for(;a[e++]&128&&e<t;);return e}function oe(a){return("0"+a.toString(16).toUpperCase()).slice(-2)}function be(a){return(a<10?"0":"")+a}function L(a,e){if(!a||!e)return a;const t=e.keyId;return t&&e.isCommonEncryption&&ce(a,["moov","trak"]).forEach(n=>{const s=ce(n,["mdia","minf","stbl","stsd"])[0].subarray(8);let u=ce(s,["enca"]);const f=u.length>0;f||(u=ce(s,["encv"])),u.forEach(m=>{const g=f?m.subarray(28):m.subarray(78);ce(g,["sinf"]).forEach(k=>{const M=dt(k);if(M){const P=M.subarray(8,24);P.some(z=>z!==0)||(C.log(`[eme] Patching keyId in 'enc${f?"a":"v"}>sinf>>tenc' box: ${mt.hexDump(P)} -> ${mt.hexDump(t)}`),M.set(t,8))}})})}),a}function dt(a){const e=ce(a,["schm"])[0];if(e){const t=yt(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return ce(a,["schi","tenc"])[0]}return null}function ae(a,e){return ce(e,["moof","traf"]).reduce((t,r)=>{const n=ce(r,["tfdt"])[0],i=n[0],s=ce(r,["tfhd"]).reduce((u,f)=>{const m=w(f,4),g=a[m];if(g){let v=w(n,4);if(i===1){if(v===wt)return C.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),u;v*=wt+1,v+=w(n,8)}const k=g.timescale||9e4,M=v/k;if(K(M)&&(u===null||M<u))return M}return u},null);return s!==null&&K(s)&&(t===null||s<t)?s:t},null)}function At(a,e){let t=0,r=0,n=0;const i=ce(a,["moof","traf"]);for(let s=0;s<i.length;s++){const u=i[s],f=ce(u,["tfhd"])[0],m=w(f,4),g=e[m];if(!g)continue;const v=g.default,k=w(f,0)|(v==null?void 0:v.flags);let M=v==null?void 0:v.duration;k&8&&(k&2?M=w(f,12):M=w(f,8));const P=g.timescale||9e4,z=ce(u,["trun"]);for(let Y=0;Y<z.length;Y++){if(t=Ct(z[Y]),!t&&M){const me=w(z[Y],4);t=M*me}g.type===G.VIDEO?r+=t/P:g.type===G.AUDIO&&(n+=t/P)}}if(r===0&&n===0){let s=1/0,u=0,f=0;const m=ce(a,["sidx"]);for(let g=0;g<m.length;g++){const v=Ae(m[g]);if(v!=null&&v.references){s=Math.min(s,v.earliestPresentationTime/v.timescale);const k=v.references.reduce((M,P)=>M+P.info.duration||0,0);u=Math.max(u,k+v.earliestPresentationTime/v.timescale),f=u-s}}if(f&&K(f))return f}return r||n}function Ct(a){const e=w(a,0);let t=8;e&1&&(t+=4),e&4&&(t+=4);let r=0;const n=w(a,4);for(let i=0;i<n;i++){if(e&256){const s=w(a,t);r+=s,t+=4}e&512&&(t+=4),e&1024&&(t+=4),e&2048&&(t+=4)}return r}function Mt(a,e,t){ce(e,["moof","traf"]).forEach(r=>{ce(r,["tfhd"]).forEach(n=>{const i=w(n,4),s=a[i];if(!s)return;const u=s.timescale||9e4;ce(r,["tfdt"]).forEach(f=>{const m=f[0],g=t*u;if(g){let v=w(f,4);if(m===0)v-=g,v=Math.max(v,0),re(f,4,v);else{v*=Math.pow(2,32),v+=w(f,8),v-=g,v=Math.max(v,0);const k=Math.floor(v/(wt+1)),M=Math.floor(v%(wt+1));re(f,4,k),re(f,8,M)}}})})})}function br(a){const e={valid:null,remainder:null},t=ce(a,["moof"]);if(t.length<2)return e.remainder=a,e;const r=t[t.length-1];return e.valid=ke(a,0,r.byteOffset-8),e.remainder=ke(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 Ot(a,e){const t=[],r=e.samples,n=e.timescale,i=e.id;let s=!1;return ce(r,["moof"]).map(f=>{const m=f.byteOffset-8;ce(f,["traf"]).map(v=>{const k=ce(v,["tfdt"]).map(M=>{const P=M[0];let z=w(M,4);return P===1&&(z*=Math.pow(2,32),z+=w(M,8)),z/n})[0];return k!==void 0&&(a=k),ce(v,["tfhd"]).map(M=>{const P=w(M,4),z=w(M,0)&16777215,Y=(z&1)!==0,me=(z&2)!==0,ze=(z&8)!==0;let Ue=0;const tt=(z&16)!==0;let He=0;const ht=(z&32)!==0;let et=8;P===i&&(Y&&(et+=8),me&&(et+=4),ze&&(Ue=w(M,et),et+=4),tt&&(He=w(M,et),et+=4),ht&&(et+=4),e.type==="video"&&(s=Ar(e.codec)),ce(v,["trun"]).map(bt=>{const Rt=bt[0],lt=w(bt,0)&16777215,xt=(lt&1)!==0;let nr=0;const Pt=(lt&4)!==0,rr=(lt&256)!==0;let er=0;const Vt=(lt&512)!==0;let Er=0;const Ur=(lt&1024)!==0,$t=(lt&2048)!==0;let Ft=0;const kr=w(bt,4);let dr=8;xt&&(nr=w(bt,dr),dr+=4),Pt&&(dr+=4);let Mr=nr+m;for(let un=0;un<kr;un++){if(rr?(er=w(bt,dr),dr+=4):er=Ue,Vt?(Er=w(bt,dr),dr+=4):Er=He,Ur&&(dr+=4),$t&&(Rt===0?Ft=w(bt,dr):Ft=I(bt,dr),dr+=4),e.type===G.VIDEO){let xn=0;for(;xn<Er;){const Sn=w(r,Mr);if(Mr+=4,Br(s,r[Mr])){const si=r.subarray(Mr,Mr+Sn);Gr(si,s?2:1,a+Ft/n,t)}Mr+=Sn,xn+=Sn+4}}a+=er/n}}))})})}),t}function Ar(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 M=w(n,g);if(g+=4,M===1195456820){const P=n[g++];if(P===3){const z=n[g++],Y=31&z,me=64&z,ze=me?2+Y*3:0,Ue=new Uint8Array(ze);if(me){Ue[0]=z;for(let tt=1;tt<ze;tt++)Ue[tt]=n[g++]}r.push({type:P,payloadType:s,pts:t,bytes:Ue})}}}}}else if(s===5&&u>16){const v=[];for(let P=0;P<16;P++){const z=n[g++].toString(16);v.push(z.length==1?"0"+z:z),(P===3||P===5||P===7||P===9)&&v.push("-")}const k=u-16,M=new Uint8Array(k);for(let P=0;P<k;P++)M[P]=n[g++];r.push({payloadType:s,pts:t,uuid:v.join(""),userData:vt(M),userDataBytes:M})}}}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 Tt(a){const e=a[0];let t="",r="",n=0,i=0,s=0,u=0,f=0,m=0;if(e===0){for(;yt(a.subarray(m,m+1))!=="\0";)t+=yt(a.subarray(m,m+1)),m+=1;for(t+=yt(a.subarray(m,m+1)),m+=1;yt(a.subarray(m,m+1))!=="\0";)r+=yt(a.subarray(m,m+1)),m+=1;r+=yt(a.subarray(m,m+1)),m+=1,n=w(a,12),i=w(a,16),u=w(a,20),f=w(a,24),m=28}else if(e===1){m+=4,n=w(a,m),m+=4;const v=w(a,m);m+=4;const k=w(a,m);for(m+=4,s=Yo(2,32)*v+k,N(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=w(a,m),m+=4,f=w(a,m),m+=4;yt(a.subarray(m,m+1))!=="\0";)t+=yt(a.subarray(m,m+1)),m+=1;for(t+=yt(a.subarray(m,m+1)),m+=1;yt(a.subarray(m,m+1))!=="\0";)r+=yt(a.subarray(m,m+1)),m+=1;r+=yt(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 jt(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),jt([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=mt.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 v=0;v<f;v++)m.push(new Uint8Array(s,t+32+v*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 rt.FAIRPLAY:case rt.WIDEVINE:case rt.PLAYREADY:case rt.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=ge(this.uri);if(t)switch(this.keyFormat){case rt.WIDEVINE:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case rt.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=Kt(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 It(a){return rn.test(a)}function Et(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]=Yt(a,i))}}function Yt(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 Wr(a=!0){return typeof self=="undefined"?void 0:(a||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function Mn(a){return typeof self!="undefined"&&a===self.ManagedMediaSource}const Vr={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function Tr(a,e){const t=Vr[e];return!!t&&!!t[a.slice(0,4)]}function Or(a,e,t=!0){return!a.split(",").some(r=>!cr(r,e,t))}function cr(a,e,t=!0){var r;const n=Wr(t);return(r=n==null?void 0:n.isTypeSupported(nn(a,e)))!=null?r:!1}function nn(a,e){return`${e}/mp4;codecs="${a}"`}function fn(a){if(a){const e=a.substring(0,4);return Vr.video[e]}return 2}function 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 Le.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return hr.test(e)}static parseMasterPlaylist(e,t){const r=It(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 de(s[1]);Et(n,m,["CODECS","SUPPLEMENTAL-CODECS","ALLOWED-CPC","PATHWAY-ID","STABLE-VARIANT-ID","AUDIO","VIDEO","SUBTITLES","CLOSED-CAPTIONS","NAME"]);const g=Yt(n,s[2]),v={attrs:m,bitrate:m.decimalInteger("BANDWIDTH")||m.decimalInteger("AVERAGE-BANDWIDTH"),name:m.NAME,url:Qr.resolve(g,t)},k=m.decimalResolution("RESOLUTION");k&&(v.width=k.width,v.height=k.height),Ci(m.CODECS,v),(u=v.unknownCodecs)!=null&&u.length||i.push(v),n.levels.push(v)}else if(s[3]){const m=s[3],g=s[4];switch(m){case"SESSION-DATA":{const v=new de(g);Et(n,v,["DATA-ID","LANGUAGE","VALUE","URI"]);const k=v["DATA-ID"];k&&(n.sessionData===null&&(n.sessionData={}),n.sessionData[k]=v);break}case"SESSION-KEY":{const v=Hn(g,t,n);v.encrypted&&v.isSupported()?(n.sessionKeys===null&&(n.sessionKeys=[]),n.sessionKeys.push(v)):C.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${g}"`);break}case"DEFINE":{{const v=new de(g);Et(n,v,["NAME","VALUE","QUERYPARAM"]),xr(n,v,t)}break}case"CONTENT-STEERING":{const v=new de(g);Et(n,v,["SERVER-URI","PATHWAY-ID"]),n.contentSteering={uri:Qr.resolve(v["SERVER-URI"],t),pathwayId:v["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 de(n[1]),g=m.TYPE;if(g){const v=u[g],k=i[g]||[];i[g]=k,Et(r,m,["URI","GROUP-ID","LANGUAGE","ASSOC-LANGUAGE","STABLE-RENDITION-ID","NAME","INSTREAM-ID","CHARACTERISTICS","CHANNELS"]);const M=m.LANGUAGE,P=m["ASSOC-LANGUAGE"],z=m.CHANNELS,Y=m.CHARACTERISTICS,me=m["INSTREAM-ID"],ze={attrs:m,bitrate:0,id:f++,groupId:m["GROUP-ID"]||"",name:m.NAME||M||"",type:g,default:m.bool("DEFAULT"),autoselect:m.bool("AUTOSELECT"),forced:m.bool("FORCED"),lang:M,url:m.URI?Qr.resolve(m.URI,t):""};if(P&&(ze.assocLang=P),z&&(ze.channels=z),Y&&(ze.characteristics=Y),me&&(ze.instreamId=me),v!=null&&v.length){const Ue=Qr.findGroup(v,ze.groupId)||v[0];xi(ze,Ue,"audioCodec"),xi(ze,Ue,"textCodec")}k.push(ze)}}return i}static parseLevelPlaylist(e,t,r,n,i,s){const u=new ee(t),f=u.fragments;let m=null,g=0,v=0,k=0,M=0,P=null,z=new j(n,t),Y,me,ze,Ue=-1,tt=!1,He=null;for(mr.lastIndex=0,u.m3u8=e,u.hasVariableRefs=It(e);(Y=mr.exec(e))!==null;){tt&&(tt=!1,z=new j(n,t),z.start=k,z.sn=g,z.cc=M,z.level=r,m&&(z.initSegment=m,z.rawProgramDateTime=m.rawProgramDateTime,m.rawProgramDateTime=null,He&&(z.setByteRange(He),He=null)));const Rt=Y[1];if(Rt){z.duration=parseFloat(Rt);const lt=(" "+Y[2]).slice(1);z.title=lt||null,z.tagList.push(lt?["INF",Rt,lt]:["INF",Rt])}else if(Y[3]){if(K(z.duration)){z.start=k,ze&&Jn(z,ze,u),z.sn=g,z.level=r,z.cc=M,f.push(z);const lt=(" "+Y[3]).slice(1);z.relurl=Yt(u,lt),ai(z,P),P=z,k+=z.duration,g++,v=0,tt=!0}}else if(Y[4]){const lt=(" "+Y[4]).slice(1);P?z.setByteRange(lt,P):z.setByteRange(lt)}else if(Y[5])z.rawProgramDateTime=(" "+Y[5]).slice(1),z.tagList.push(["PROGRAM-DATE-TIME",z.rawProgramDateTime]),Ue===-1&&(Ue=f.length);else{if(Y=Y[0].match(Bn),!Y){C.warn("No matches on slow regex match for level playlist!");continue}for(me=1;me<Y.length&&typeof Y[me]=="undefined";me++);const lt=(" "+Y[me]).slice(1),xt=(" "+Y[me+1]).slice(1),nr=Y[me+2]?(" "+Y[me+2]).slice(1):"";switch(lt){case"PLAYLIST-TYPE":u.type=xt.toUpperCase();break;case"MEDIA-SEQUENCE":g=u.startSN=parseInt(xt);break;case"SKIP":{const Pt=new de(xt);Et(u,Pt,["RECENTLY-REMOVED-DATERANGES"]);const rr=Pt.decimalInteger("SKIPPED-SEGMENTS");if(K(rr)){u.skippedSegments=rr;for(let Vt=rr;Vt--;)f.unshift(null);g+=rr}const er=Pt.enumeratedString("RECENTLY-REMOVED-DATERANGES");er&&(u.recentlyRemovedDateranges=er.split(" "));break}case"TARGETDURATION":u.targetduration=Math.max(parseInt(xt),1);break;case"VERSION":u.version=parseInt(xt);break;case"INDEPENDENT-SEGMENTS":case"EXTM3U":break;case"ENDLIST":u.live=!1;break;case"#":(xt||nr)&&z.tagList.push(nr?[xt,nr]:[xt]);break;case"DISCONTINUITY":M++,z.tagList.push(["DIS"]);break;case"GAP":z.gap=!0,z.tagList.push([lt]);break;case"BITRATE":z.tagList.push([lt,xt]);break;case"DATERANGE":{const Pt=new de(xt);Et(u,Pt,["ID","CLASS","START-DATE","END-DATE","SCTE35-CMD","SCTE35-OUT","SCTE35-IN"]),Et(u,Pt,Pt.clientAttrs);const rr=new Se(Pt,u.dateRanges[Pt.ID]);rr.isValid||u.skippedSegments?u.dateRanges[rr.id]=rr:C.warn(`Ignoring invalid DATERANGE tag: "${xt}"`),z.tagList.push(["EXT-X-DATERANGE",xt]);break}case"DEFINE":{{const Pt=new de(xt);Et(u,Pt,["NAME","VALUE","IMPORT","QUERYPARAM"]),"IMPORT"in Pt?gr(u,Pt,s):xr(u,Pt,t)}break}case"DISCONTINUITY-SEQUENCE":M=parseInt(xt);break;case"KEY":{const Pt=Hn(xt,t,u);if(Pt.isSupported()){if(Pt.method==="NONE"){ze=void 0;break}ze||(ze={}),ze[Pt.keyFormat]&&(ze=l({},ze)),ze[Pt.keyFormat]=Pt}else C.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${xt}"`);break}case"START":u.startTimeOffset=bi(xt);break;case"MAP":{const Pt=new de(xt);if(Et(u,Pt,["BYTERANGE","URI"]),z.duration){const rr=new j(n,t);wi(rr,Pt,r,ze),m=rr,z.initSegment=m,m.rawProgramDateTime&&!z.rawProgramDateTime&&(z.rawProgramDateTime=m.rawProgramDateTime)}else{const rr=z.byteRangeEndOffset;if(rr){const er=z.byteRangeStartOffset;He=`${rr-er}@${er}`}else He=null;wi(z,Pt,r,ze),m=z,tt=!0}break}case"SERVER-CONTROL":{const Pt=new de(xt);u.canBlockReload=Pt.bool("CAN-BLOCK-RELOAD"),u.canSkipUntil=Pt.optionalFloat("CAN-SKIP-UNTIL",0),u.canSkipDateRanges=u.canSkipUntil>0&&Pt.bool("CAN-SKIP-DATERANGES"),u.partHoldBack=Pt.optionalFloat("PART-HOLD-BACK",0),u.holdBack=Pt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{const Pt=new de(xt);u.partTarget=Pt.decimalFloatingPoint("PART-TARGET");break}case"PART":{let Pt=u.partList;Pt||(Pt=u.partList=[]);const rr=v>0?Pt[Pt.length-1]:void 0,er=v++,Vt=new de(xt);Et(u,Vt,["BYTERANGE","URI"]);const Er=new Z(Vt,z,t,er,rr);Pt.push(Er),z.duration+=Er.duration;break}case"PRELOAD-HINT":{const Pt=new de(xt);Et(u,Pt,["URI"]),u.preloadHint=Pt;break}case"RENDITION-REPORT":{const Pt=new de(xt);Et(u,Pt,["URI"]),u.renditionReports=u.renditionReports||[],u.renditionReports.push(Pt);break}default:C.warn(`line parsed but not handled: ${Y}`);break}}}P&&!P.relurl?(f.pop(),k-=P.duration,u.partList&&(u.fragmentHint=P)):u.partList&&(ai(z,P),z.cc=M,u.fragmentHint=z,ze&&Jn(z,ze,u));const ht=f.length,et=f[0],bt=f[ht-1];if(k+=u.skippedSegments*u.targetduration,k>0&&ht&&bt){u.averagetargetduration=k/ht;const Rt=bt.sn;u.endSN=Rt!=="initSegment"?Rt:0,u.live||(bt.endList=!0),et&&(u.startCC=et.cc)}else u.endSN=0,u.startCC=0;return u.fragmentHint&&(k+=u.fragmentHint.duration),u.totalduration=k,u.endCC=M,Ue>0&&dn(f,Ue),u}}function Hn(a,e,t){var r,n;const i=new de(a);Et(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 v=u?Qr.resolve(u,e):"",k=(m||"1").split("/").map(Number).filter(Number.isFinite);return new or(s,v,g,k,f)}function bi(a){const t=new de(a).decimalFloatingPoint("TIME-OFFSET");return K(t)?t:null}function Ci(a,e){let t=(a||"").split(/[ ,]+/).filter(r=>r);["video","audio","text"].forEach(r=>{const n=t.filter(i=>Tr(i,r));n.length&&(e[`${r}Codec`]=n.join(","),t=t.filter(i=>n.indexOf(i)===-1))}),e.unknownCodecs=t}function xi(a,e,t){const r=e[t];r&&(a[t]=r)}function dn(a,e){let t=a[e];for(let r=e;r--;){const n=a[r];if(!n)return;n.programDateTime=t.programDateTime-n.duration*1e3,t=n}}function ai(a,e){a.rawProgramDateTime?a.programDateTime=Date.parse(a.rawProgramDateTime):e!=null&&e.programDateTime&&(a.programDateTime=e.endProgramDateTime),K(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"},Pe={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};function Wt(a){const{type:e}=a;switch(e){case ir.AUDIO_TRACK:return Pe.AUDIO;case ir.SUBTITLE_TRACK:return Pe.SUBTITLE;default:return Pe.MAIN}}function Pr(a,e){let t=a.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class jn{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),K((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,v=m.targetduration;if(g&&v){const k=Math.max(g*3,v*.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,v,k)=>{const M=this.getInternalLoader(v);this.resetInternalLoader(v.type);const P=m.data;if(P.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(m,v,new Error("no EXTM3U delimiter"),k||null,g);return}g.parsing.start=performance.now(),Qr.isMediaPlaylist(P)?this.handleTrackOrLevelPlaylist(m,g,v,k||null,M):this.handleMasterPlaylist(m,g,v,k)},onError:(m,g,v,k)=>{this.handleNetworkError(g,v,!1,m,k)},onTimeout:(m,g,v)=>{this.handleNetworkError(g,v,!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:v,sessionKeys:k,startTimeOffset:M,variableList:P}=f;this.variableList=P;const{AUDIO:z=[],SUBTITLES:Y,"CLOSED-CAPTIONS":me}=Qr.parseMasterPlaylistMedia(s,u,f);z.length&&!z.some(Ue=>!Ue.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"),z.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new de({}),bitrate:0,url:""})),i.trigger(d.MANIFEST_LOADED,{levels:g,audioTracks:z,subtitles:Y,captions:me,contentSteering:m,url:u,stats:t,networkDetails:n,sessionData:v,sessionKeys:k,startTimeOffset:M,variableList:P})}handleTrackOrLevelPlaylist(e,t,r,n,i){const s=this.hls,{id:u,level:f,type:m}=r,g=Pr(e,r),v=0,k=K(f)?f:K(u)?u:0,M=Wt(r),P=Qr.parseLevelPlaylist(e.data,g,k,M,v,this.variableList);if(m===ir.MANIFEST){const z={attrs:new de({}),bitrate:0,details:P,name:"",url:g};s.trigger(d.MANIFEST_LOADED,{levels:[z],audioTracks:[],url:g,stats:t,networkDetails:n,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),r.levelDetails=P,this.handlePlaylistLoaded(P,e,t,r,n,i)}handleManifestParsingError(e,t,r,n,i){this.hls.trigger(d.ERROR,{type:x.NETWORK_ERROR,details:y.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=y.UNKNOWN,m=!1;const g=this.getInternalLoader(e);switch(e.type){case ir.MANIFEST:f=r?y.MANIFEST_LOAD_TIMEOUT:y.MANIFEST_LOAD_ERROR,m=!0;break;case ir.LEVEL:f=r?y.LEVEL_LOAD_TIMEOUT:y.LEVEL_LOAD_ERROR,m=!1;break;case ir.AUDIO_TRACK:f=r?y.AUDIO_TRACK_LOAD_TIMEOUT:y.AUDIO_TRACK_LOAD_ERROR,m=!1;break;case ir.SUBTITLE_TRACK:f=r?y.SUBTITLE_TRACK_LOAD_TIMEOUT:y.SUBTITLE_LOAD_ERROR,m=!1;break}g&&this.resetInternalLoader(e.type);const v={type:x.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;v.response=Ne({url:k,data:void 0},n)}this.hls.trigger(d.ERROR,v)}handlePlaylistLoaded(e,t,r,n,i,s){const u=this.hls,{type:f,level:m,id:g,groupId:v,deliveryDirectives:k}=n,M=Pr(t,n),P=Wt(n),z=typeof n.level=="number"&&P===Pe.MAIN?m:void 0;if(!e.fragments.length){const me=new Error("No Segments found in Playlist");u.trigger(d.ERROR,{type:x.NETWORK_ERROR,details:y.LEVEL_EMPTY_ERROR,fatal:!1,url:M,error:me,reason:me.message,response:t,context:n,level:z,parent:P,networkDetails:i,stats:r});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const Y=e.playlistParsingError;if(Y){u.trigger(d.ERROR,{type:x.NETWORK_ERROR,details:y.LEVEL_PARSING_ERROR,fatal:!1,url:M,error:Y,reason:Y.message,response:t,context:n,level:z,parent:P,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:z||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:v||"",stats:r,networkDetails:i,deliveryDirectives:k});break;case ir.SUBTITLE_TRACK:u.trigger(d.SUBTITLE_TRACK_LOADED,{details:e,id:g||0,groupId:v||"",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 _r(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 An(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=An(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 qr(a){const e=[];for(let t=0;t<a.length;t++){const r=a[t];(r.kind==="subtitles"||r.kind==="captions")&&r.label&&e.push(a[t])}return e}var pn={audioId3:"org.id3",dateRange:"com.apple.quicktime.HLS",emsg:"https://aomedia.org/emsg/ID3"};const $i=.25;function Wn(){if(typeof self!="undefined")return self.VTTCue||self.TextTrackCue}function ei(a,e,t,r,n){let i=new a(e,t,"");try{i.value=r,n&&(i.type=n)}catch(s){i=new a(e,t,JSON.stringify(n?Ne({type:n},r):r))}return i}const Lt=(()=>{const a=Wn();try{a&&new a(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function Dn(a,e){return a.getTime()/1e3-e}function 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=Wn();if(s)for(let u=0;u<i.length;u++){const f=i[u].type;if(f===pn.emsg&&!r||!n)continue;const m=Te(i[u].data);if(m){const g=i[u].pts;let v=g+i[u].duration;v>Lt&&(v=Lt),v-g<=0&&(v=g+$i);for(let M=0;M<m.length;M++){const P=m[M];if(!ye(P)){this.updateId3CueEnds(g,f);const z=ei(s,g,v,P,f);z&&this.id3Track.addCue(z)}}}}}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,_r(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(v=>!s.includes(v));for(let v=g.length;v--;){const k=g[v];Object.keys(r[k].cues).forEach(M=>{n.removeCue(r[k].cues[M])}),delete r[k]}}const u=t.fragments[t.fragments.length-1];if(s.length===0||!K(u==null?void 0:u.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const f=u.programDateTime/1e3-u.start,m=Wn();for(let g=0;g<s.length;g++){const v=s[g],k=i[v],M=Dn(k.startDate,f),P=r[v],z=(P==null?void 0:P.cues)||{};let Y=(P==null?void 0:P.durationKnown)||!1,me=Lt;const ze=k.endDate;if(ze)me=Dn(ze,f),Y=!0;else if(k.endOnNext&&!Y){const tt=s.reduce((He,ht)=>{if(ht!==k.id){const et=i[ht];if(et.class===k.class&&et.startDate>k.startDate&&(!He||k.startDate<He.startDate))return et}return He},null);tt&&(me=Dn(tt.startDate,f),Y=!0)}const Ue=Object.keys(k.attr);for(let tt=0;tt<Ue.length;tt++){const He=Ue[tt];if(!we(He))continue;const ht=z[He];if(ht)Y&&!P.durationKnown&&(ht.endTime=me);else if(m){let et=k.attr[He];Ce(He)&&(et=Jr(et));const bt=ei(m,M,me,{key:He,data:et},pn.dateRange);bt&&(bt.id=v,this.id3Track.addCue(bt),z[He]=bt)}}r[v]={cues:z,dateRange:k,durationKnown:Y}}}}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===y.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)),v=Math.round(2/(1+Math.exp(-.75*u-this.edgeStalled))*20)/20;e.playbackRate=Math.min(g,Math.max(1,v))}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 Yr(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 Tn(this._audioGroups,e)}hasSubtitleGroup(e){return Tn(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 Tn(a,e){return!e||!a?!1:a.indexOf(e)!==-1}function ur(a,e){const t=e.startPTS;if(K(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(K(m)){const Y=Math.abs(m-t);K(e.deltaPTS)?e.deltaPTS=Math.max(Y,e.deltaPTS):e.deltaPTS=Y,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 v=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 M;const P=k-a.startSN,z=a.fragments;for(z[P]=e,M=P;M>0;M--)ur(z[M],z[M-1]);for(M=P;M<z.length-1;M++)ur(z[M],z[M+1]);return a.fragmentHint&&ur(z[z.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,v}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 v=u.cc-f.cc;for(let k=m;k<g.length;k++)g[k].cc+=v}K(u.startPTS)&&K(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 Se(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 v=u[m];r&&!v&&m<r&&(v=e.fragments[m]=g),g&&v&&t(g,v,m,u)}}function Ki(a,e){const t=e.startSN+e.skippedSegments-a.startSN,r=a.fragments;t<0||t>=r.length||_t(e,r[t].start)}function _t(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 vr(a){switch(a.details){case y.FRAG_LOAD_TIMEOUT:case y.KEY_LOAD_TIMEOUT:case y.LEVEL_LOAD_TIMEOUT:case y.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function Pn(a,e){const t=vr(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 Ne(Ne({},a),{errorRetry:null,timeoutRetry:null})}function $n(a,e,t,r){if(!a)return!1;const n=r==null?void 0:r.code,i=e<a.maxNumRetry&&(Pi(n)||!!t);return a.shouldRetry?a.shouldRetry(a,e,t,r,i):i}function Pi(a){return a===0&&navigator.onLine===!1||!!a&&(a<400||a>499)}const Fi={search:function(a,e){let t=0,r=a.length-1,n=null,i=null;for(;t<=r;){n=(t+r)/2|0,i=a[n];const s=e(i);if(s>0)t=n+1;else if(s<0)r=n-1;else return i}return null}};function Hi(a,e,t){if(e===null||!Array.isArray(a)||!a.length||!K(e))return null;const r=a[0].programDateTime;if(e<(r||0))return null;const n=a[a.length-1].endProgramDateTime;if(e>=(n||0))return null;t=t||0;for(let i=0;i<a.length;++i){const s=a[i];if(ts(e,t,s))return s}return null}function Ei(a,e,t=0,r=0,n=.005){let i=null;if(a){i=e[a.sn-e[0].sn+1]||null;const u=a.endDTS-t;u>0&&u<15e-7&&(t+=15e-7)}else t===0&&e[0].start===0&&(i=e[0]);if(i&&((!a||a.level===i.level)&&Mi(t,r,i)===0||es(i,a,Math.min(n,r))))return i;const s=Fi.search(e,Mi.bind(null,t,r));return s&&(s!==a||!i)?s:i}function es(a,e,t){if(e&&e.start===0&&e.level<a.level&&(e.endPTS||0)>0){const r=e.tagList.reduce((n,i)=>(i[0]==="INF"&&(n+=parseFloat(i[1])),n),t);return a.start<=r}return!1}function Mi(a=0,e=0,t){if(t.start<=a&&t.start+t.duration>a)return 0;const r=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-r<=a?1:t.start-r>a&&t.start?-1:0}function ts(a,e,t){const r=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-r>a}function Ut(a,e){return Fi.search(a,t=>t.cc<e?1:t.cc>e?-1:0)}var kt={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)===Pe.MAIN?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var r,n;if(t.fatal)return;const i=this.hls,s=t.context;switch(t.details){case y.FRAG_LOAD_ERROR:case y.FRAG_LOAD_TIMEOUT:case y.KEY_LOAD_ERROR:case y.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case y.FRAG_PARSING_ERROR:if((r=t.frag)!=null&&r.gap){t.errorAction={action:kt.DoNothing,flags:fr.None};return}case y.FRAG_GAP:case y.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=kt.SendAlternateToPenaltyBox;return}case y.LEVEL_EMPTY_ERROR:case y.LEVEL_PARSING_ERROR:{var u,f;const m=t.parent===Pe.MAIN?t.level:i.loadLevel;t.details===y.LEVEL_EMPTY_ERROR&&((u=t.context)!=null&&(f=u.levelDetails)!=null&&f.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,m):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,m))}return;case y.LEVEL_LOAD_ERROR:case y.LEVEL_LOAD_TIMEOUT:typeof(s==null?void 0:s.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,s.level));return;case y.AUDIO_TRACK_LOAD_ERROR:case y.AUDIO_TRACK_LOAD_TIMEOUT:case y.SUBTITLE_LOAD_ERROR:case y.SUBTITLE_TRACK_LOAD_TIMEOUT:if(s){const m=i.levels[i.loadLevel];if(m&&(s.type===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=kt.SendAlternateToPenaltyBox,t.errorAction.flags=fr.MoveAllAlternatesMatchingHost;return}}return;case y.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const m=i.levels[i.loadLevel],g=m==null?void 0:m.attrs["HDCP-LEVEL"];g?t.errorAction={action:kt.SendAlternateToPenaltyBox,flags:fr.MoveAllAlternatesMatchingHDCP,hdcpLevel:g}:this.keySystemError(t)}return;case y.BUFFER_ADD_CODEC_ERROR:case y.REMUX_ALLOC_ERROR:case y.BUFFER_APPEND_ERROR:t.errorAction=this.getLevelSwitchAction(t,(n=t.level)!=null?n:i.loadLevel);return;case y.INTERNAL_EXCEPTION:case y.BUFFER_APPENDING_ERROR:case y.BUFFER_FULL_ERROR:case y.LEVEL_SWITCH_ERROR:case y.BUFFER_STALLED_ERROR:case y.BUFFER_SEEK_OVER_HOLE:case y.BUFFER_NUDGE_ON_STALL:t.errorAction={action:kt.DoNothing,flags:fr.None};return}t.type===x.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,vr(e),e.response))return{action:kt.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,v)=>g+v.fragmentError,0);if(n&&(e.details!==y.FRAG_GAP&&n.fragmentError++,$n(u,f,vr(e),e.response)))return{action:kt.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===y.BUFFER_APPEND_ERROR&&n.fragmentError++;let g=-1;const{levels:v,loadLevel:k,minAutoLevel:M,maxAutoLevel:P}=r;r.autoLevelEnabled||(r.loadLevel=-1);const z=(i=e.frag)==null?void 0:i.type,me=(z===Pe.AUDIO&&m===y.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(m===y.BUFFER_ADD_CODEC_ERROR||m===y.BUFFER_APPEND_ERROR))&&v.some(({audioCodec:ht})=>n.audioCodec!==ht),Ue=e.sourceBufferName==="video"&&(m===y.BUFFER_ADD_CODEC_ERROR||m===y.BUFFER_APPEND_ERROR)&&v.some(({codecSet:ht,audioCodec:et})=>n.codecSet!==ht&&n.audioCodec===et),{type:tt,groupId:He}=(s=e.context)!=null?s:{};for(let ht=v.length;ht--;){const et=(ht+k)%v.length;if(et!==k&&et>=M&&et<=P&&v[et].loadError===0){var u,f;const bt=v[et];if(m===y.FRAG_GAP&&z===Pe.MAIN&&e.frag){const Rt=v[et].details;if(Rt){const lt=Ei(e.frag,Rt.fragments,e.frag.start);if(lt!=null&<.gap)continue}}else{if(tt===ir.AUDIO_TRACK&&bt.hasAudioGroup(He)||tt===ir.SUBTITLE_TRACK&&bt.hasSubtitleGroup(He))continue;if(z===Pe.AUDIO&&(u=n.audioGroups)!=null&&u.some(Rt=>bt.hasAudioGroup(Rt))||z===Pe.SUBTITLE&&(f=n.subtitleGroups)!=null&&f.some(Rt=>bt.hasSubtitleGroup(Rt))||me&&n.audioCodec===bt.audioCodec||!me&&n.audioCodec!==bt.audioCodec||Ue&&n.codecSet===bt.codecSet)continue}g=et;break}}if(g>-1&&r.loadLevel!==g)return e.levelRetry=!0,this.playlistError=0,{action:kt.SendAlternateToPenaltyBox,flags:fr.None,nextAutoLevel:g}}return{action:kt.SendAlternateToPenaltyBox,flags:fr.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var r;switch((r=t.errorAction)==null?void 0:r.action){case kt.DoNothing:break;case kt.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==y.FRAG_GAP?t.fatal=!0:/MediaSource readyState: ended/.test(t.error.message)&&(this.warn(`MediaSource ended after "${t.sourceBufferName}" sourceBuffer append error. Attempting to recover from media error.`),this.hls.recoverMediaError());break;case kt.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 Y=this.hls.config.lowLatencyMode,me=n.lastPartSn,ze=n.endSN,Ue=n.lastPartIndex,tt=Ue!==-1,He=me===ze,ht=Y?0:Ue;tt?(m=He?ze+1:me,g=He?ht:Ue+1):m=ze+1;const et=n.age,bt=et+n.ageHeader;let Rt=Math.min(bt-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 lt=Math.floor(Rt/n.targetduration);if(m+=lt,g!==void 0){const xt=Math.round(Rt%n.targetduration/n.partTarget);g+=xt}this.log(`CDN Tune-in age: ${n.ageHeader}s last advanced ${et.toFixed(2)}s goal: ${Rt} skip sn ${lt} to part ${g}`)}n.tuneInGoal=Rt}if(f=this.getDeliveryDirectives(n,t.deliveryDirectives,m,g),Y||!He){this.loadPlaylist(f);return}}else(n.canBlockReload||n.canSkipUntil)&&(f=this.getDeliveryDirectives(n,t.deliveryDirectives,m,g));const v=this.hls.mainForwardBufferInfo,k=v?v.end-v.len:0,M=(n.edge-k)*1e3,P=vn(n,M);n.updated&&s>this.requestScheduled+P&&(this.requestScheduled=i.loading.start),m!==void 0&&n.canBlockReload?this.requestScheduled=i.loading.first+P-(n.partTarget*1e3||1e3):this.requestScheduled===-1||this.requestScheduled+P<s?this.requestScheduled=s:this.requestScheduled-s<=0&&(this.requestScheduled+=P);let z=this.requestScheduled-s;z=Math.max(0,z),this.log(`reload live playlist ${e} in ${Math.round(z)} ms`),this.timer=self.setTimeout(()=>this.loadPlaylist(f),z)}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=vr(e),n=e.errorAction,{action:i,retryCount:s=0,retryConfig:u}=n||{},f=!!n&&!!u&&(i===kt.RetryRequest||!n.resolved&&i===kt.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 ji{constructor(e,t,r,n=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=r,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new kn(e),this.fast_=new kn(t),this.defaultTTFB_=n,this.ttfb_=new kn(e)}update(e,t){const{slow_:r,fast_:n,ttfb_:i}=this;r.halfLife!==e&&(this.slow_=new kn(e,r.getEstimate(),r.getTotalWeight())),n.halfLife!==t&&(this.fast_=new kn(t,n.getEstimate(),n.getTotalWeight())),i.halfLife!==e&&(this.ttfb_=new kn(e,i.getEstimate(),i.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const r=8*t,n=e/1e3,i=r/n;this.fast_.sample(n,i),this.slow_.sample(n,i)}sampleTTFB(e){const t=e/1e3,r=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(r,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}destroy(){}}const Wi={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]},qn={};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((v,k)=>{if(k){const M=e.groups[k];if(!M)throw new Error(`Audio track group ${k} not found`);Object.keys(M.channels).forEach(P=>{v[P]=(v[P]||0)+M.channels[P]})}return v},{2:0})}catch(v){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&&K(m)&&Object.keys(g).some(v=>parseInt(v)>m)}function ra(a,e,t){const r=a.videoCodec,n=a.audioCodec;if(!r||!n||!t)return Promise.resolve(Wi);const i={width:a.width,height:a.height,bitrate:Math.ceil(Math.max(a.bitrate*.9,a.averageBitrate)),framerate:a.frameRate||30},s=a.videoRange;s!=="SDR"&&(i.transferFunction=s.toLowerCase());const u=r.split(",").map(f=>({type:"media-source",video:Ne(Ne({},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 v=g.channels||"",k=parseFloat(v);K(k)&&k>2&&u.push.apply(u,n.split(",").map(M=>({type:"media-source",audio:{contentType:nn(M,"audio"),channels:""+k}})))}}))}),Promise.all(u.map(f=>{const m=Pa(f);return qn[m]||(qn[m]=t.decodingInfo(f))})).then(f=>({supported:!f.some(m=>!m.supported),configurations:u,decodingInfoResults:f})).catch(f=>({supported:!1,configurations:u,decodingInfoResults:[],error:f}))}function Pa(a){const{audio:e,video:t}=a,r=t||e;if(r){const n=r.contentType.split('"')[1];if(t)return`r${t.height}x${t.width}f${Math.ceil(t.framerate)}${t.transferFunction||"sd"}_${n}_${Math.ceil(t.bitrate/1e5)}`;if(e)return`c${e.channels}${e.spatialRendering?"s":"n"}_${n}`}return""}function Fa(){if(typeof matchMedia=="function"){const a=matchMedia("(dynamic-range: high)"),e=matchMedia("bad query");if(a.media!==e.media)return a.matches===!0}return!1}function na(a,e){let t=!1,r=[];return a&&(t=a!=="SDR",r=[a]),e&&(r=e.allowedVideoRanges||Nn.slice(0),t=e.preferHDR!==void 0?e.preferHDR:Fa(),t?r=r.filter(n=>n!=="SDR"):r=["SDR"]),{preferHDR:t,allowedVideoRanges:r}}function Ai(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,v=1/0,k=1/0,M=1/0,P=0,z=[];const{preferHDR:Y,allowedVideoRanges:me}=na(e,n);for(let He=i.length;He--;){const ht=a[i[He]];m=ht.channels[2]>0,v=Math.min(v,ht.minHeight),k=Math.min(k,ht.minFramerate),M=Math.min(M,ht.minBitrate);const et=me.filter(bt=>ht.videoRanges[bt]>0);et.length>0&&(g=!0,z=et)}v=K(v)?v:0,k=K(k)?k:0;const ze=Math.max(1080,v),Ue=Math.max(30,k);return M=K(M)?M:t,t=Math.max(M,t),g||(e=void 0,z=[]),{codecSet:i.reduce((He,ht)=>{const et=a[ht];if(ht===He)return He;if(et.minBitrate>t)return Fn(ht,`min bitrate of ${et.minBitrate} > current estimate of ${t}`),He;if(!et.hasDefaultAudio)return Fn(ht,"no renditions with default or auto-select sound found"),He;if(u&&ht.indexOf(u.substring(0,4))%5!==0)return Fn(ht,`audio codec preference "${u}" not found`),He;if(s&&!f){if(!et.channels[s])return Fn(ht,`no renditions with ${s} channel sound found (channels options: ${Object.keys(et.channels)})`),He}else if((!u||f)&&m&&et.channels[2]===0)return Fn(ht,"no renditions with stereo sound found"),He;return et.minHeight>ze?(Fn(ht,`min resolution of ${et.minHeight} > maximum of ${ze}`),He):et.minFramerate>Ue?(Fn(ht,`min framerate of ${et.minFramerate} > maximum of ${Ue}`),He):z.some(bt=>et.videoRanges[bt]>0)?et.maxScore<P?(Fn(ht,`max score of ${et.maxScore} < selected max of ${P}`),He):He&&(Hr(ht)>=Hr(He)||et.fragmentError>a[He].fragmentError)?He:(P=et.maxScore,ht):(Fn(ht,`no variants with VIDEO-RANGE of ${JSON.stringify(z)} found`),He)},void 0),videoRanges:z,preferHDR:Y,minFramerate:k,minBitrate:M}}function Fn(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(v=>{u.channels[v]=(u.channels[v]||0)+g.channels[v]}))}),n},{})}function Gn(a,e,t){if("attrs"in a){const r=e.indexOf(a);if(r!==-1)return r}for(let r=0;r<e.length;r++){const n=e[r];if(fi(a,n,t))return r}return-1}function fi(a,e,t){const{groupId:r,name:n,lang:i,assocLang:s,default:u}=a,f=a.forced;return(r===void 0||e.groupId===r)&&(n===void 0||e.name===n)&&(i===void 0||e.lang===i)&&(i===void 0||e.assocLang===s)&&(u===void 0||e.default===u)&&(f===void 0||e.forced===f)&&(!("characteristics"in a)||Ma(a.characteristics||"",e.characteristics))&&(t===void 0||t(a,e))}function Ma(a,e=""){const t=a.split(","),r=e.split(",");return t.length===r.length&&!t.some(n=>r.indexOf(n)===-1)}function Ti(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,M,P)=>{const z=M.uri;return(k[z]||(k[z]=[])).push(P),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),v=Os(e,r,k=>{if(k.videoRange!==f||k.frameRate!==m||k.codecSet.substring(0,4)!==g)return!1;const M=k.audioGroups,P=t.filter(z=>!M||M.indexOf(z.groupId)!==-1);return Gn(a,P,n)>-1});return v>-1?v:Os(e,r,k=>{const M=k.audioGroups,P=t.filter(z=>!M||M.indexOf(z.groupId)!==-1);return Gn(a,P,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,v=n.minAutoLevel;if(f.aborted||f.loaded&&f.loaded===f.total||t.level<=v){this.clearTimer(),this._nextAutoLevel=-1;return}if(!i||s.paused||!s.playbackRate||!s.readyState)return;const k=n.mainForwardBufferInfo;if(k===null)return;const M=this.bwEstimator.getEstimateTTFB(),P=Math.abs(s.playbackRate);if(g<=Math.max(M,1e3*(m/(P*2))))return;const z=k.len/P,Y=f.loading.first?f.loading.first-f.loading.start:-1,me=f.loaded&&Y>-1,ze=this.getBwEstimate(),Ue=n.levels,tt=Ue[t.level],He=f.total||Math.max(f.loaded,Math.round(m*tt.averageBitrate/8));let ht=me?g-Y:g;ht<1&&me&&(ht=Math.min(g,f.loaded*8/ze));const et=me?f.loaded*1e3/ht:0,bt=et?(He-f.loaded)/et:He*8/ze+M/1e3;if(bt<=z)return;const Rt=et?et*8:ze;let lt=Number.POSITIVE_INFINITY,xt;for(xt=t.level-1;xt>v;xt--){const Pt=Ue[xt].maxBitrate;if(lt=this.getTimeToLoadFrag(M/1e3,Rt,m*Pt,!Ue[xt].details),lt<z)break}if(lt>=bt||lt>m*10)return;n.nextLoadLevel=n.nextAutoLevel=xt,me?this.bwEstimator.sample(g-Math.min(M,Y),f.loaded):this.bwEstimator.sampleTTFB(g);const nr=Ue[xt].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: ${z.toFixed(3)} s
|
|
Estimated load time for current fragment: ${bt.toFixed(3)} s
|
|
Estimated load time for down switch fragment: ${lt.toFixed(3)} s
|
|
TTFB estimate: ${Y|0} ms
|
|
Current BW estimate: ${K(ze)?ze|0:"Unknown"} bps
|
|
New BW estimate: ${this.getBwEstimate()|0} bps
|
|
Switching to level ${xt} @ ${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 ji(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(d.MANIFEST_LOADING,this.onManifestLoading,this),e.on(d.FRAG_LOADING,this.onFragLoading,this),e.on(d.FRAG_LOADED,this.onFragLoaded,this),e.on(d.FRAG_BUFFERED,this.onFragBuffered,this),e.on(d.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(d.LEVEL_LOADED,this.onLevelLoaded,this),e.on(d.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(d.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(d.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(d.MANIFEST_LOADING,this.onManifestLoading,this),e.off(d.FRAG_LOADING,this.onFragLoading,this),e.off(d.FRAG_LOADED,this.onFragLoaded,this),e.off(d.FRAG_BUFFERED,this.onFragBuffered,this),e.off(d.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(d.LEVEL_LOADED,this.onLevelLoaded,this),e.off(d.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(d.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(d.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()}onLevelsUpdated(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null}onMaxAutoLevelUpdated(){this.firstSelection=-1,this.nextAutoLevelKey=""}onFragLoading(e,t){const r=t.frag;if(!this.ignoreFragment(r)){if(!r.bitrateTest){var n;this.fragCurrent=r,this.partCurrent=(n=t.part)!=null?n:null}this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100)}}onLevelSwitching(e,t){this.clearTimer()}onError(e,t){if(!t.fatal)switch(t.details){case y.BUFFER_ADD_CODEC_ERROR:case y.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case y.FRAG_LOAD_TIMEOUT:{const r=t.frag,{fragCurrent:n,partCurrent:i}=this;if(r&&n&&r.sn===n.sn&&r.level===n.level){const s=performance.now(),u=i?i.stats:r.stats,f=s-u.loading.start,m=u.loading.first?u.loading.first-u.loading.start:-1;if(u.loaded&&m>-1){const v=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(f-Math.min(v,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;K(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===Pe.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!==Pe.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,v=i.abrBandWidthUpFactor;if(m){const Y=this.findBestLevel(f,s,n,m,0,g,v);if(Y>=0)return Y}let k=u?Math.min(u,i.maxStarvationDelay):i.maxStarvationDelay;if(!m){const Y=this.bitrateTestDelay;Y&&(k=(u?Math.min(u,i.maxLoadingDelay):i.maxLoadingDelay)-Y,C.info(`[abr] bitrate test took ${Math.round(1e3*Y)}ms, set first fragment max fetchDuration to ${Math.round(1e3*k)} ms`),g=v=1)}const M=this.findBestLevel(f,s,n,m,k,g,v);if(C.info(`[abr] ${m?"rebuffering expected":"buffer is empty"}, optimal quality level ${M}`),M>-1)return M;const P=r.levels[s],z=r.levels[r.loadLevel];return(P==null?void 0:P.bitrate)<(z==null?void 0:z.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,v=g===-1?this.hls.firstLevel:g,{fragCurrent:k,partCurrent:M}=this,{levels:P,allAudioTracks:z,loadLevel:Y,config:me}=this.hls;if(P.length===1)return 0;const ze=P[v],Ue=!!(ze!=null&&(f=ze.details)!=null&&f.live),tt=Y===-1||g===-1;let He,ht="SDR",et=(ze==null?void 0:ze.frameRate)||0;const{audioPreference:bt,videoPreference:Rt}=me,lt=this.audioTracksByGroup||(this.audioTracksByGroup=ia(z));if(tt){if(this.firstSelection!==-1)return this.firstSelection;const er=this.codecTiers||(this.codecTiers=Is(P,lt,t,r)),Vt=Ai(er,ht,e,bt,Rt),{codecSet:Er,videoRanges:Ur,minFramerate:$t,minBitrate:Ft,preferHDR:kr}=Vt;He=Er,ht=kr?Ur[Ur.length-1]:Ur[0],et=$t,e=Math.max(e,Ft),C.log(`[abr] picked start tier ${JSON.stringify(Vt)}`)}else He=ze==null?void 0:ze.codecSet,ht=ze==null?void 0:ze.videoRange;const xt=M?M.duration:k?k.duration:0,nr=this.bwEstimator.getEstimateTTFB()/1e3,Pt=[];for(let er=r;er>=t;er--){var rr;const Vt=P[er],Er=er>v;if(!Vt)continue;if(me.useMediaCapabilities&&!Vt.supportedResult&&!Vt.supportedPromise){const un=navigator.mediaCapabilities;typeof(un==null?void 0:un.decodingInfo)=="function"&&Ls(Vt,lt,ht,et,e,bt)?(Vt.supportedPromise=ra(Vt,lt,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=Wi}if(He&&Vt.codecSet!==He||ht&&Vt.videoRange!==ht||Er&&et>Vt.frameRate||!Er&&et>0&&et<Vt.frameRate||Vt.supportedResult&&!((rr=Vt.supportedResult.decodingInfoResults)!=null&&rr[0].smooth)){Pt.push(er);continue}const Ur=Vt.details,$t=(M?Ur==null?void 0:Ur.partTarget:Ur==null?void 0:Ur.averagetargetduration)||xt;let Ft;Er?Ft=u*e:Ft=s*e;const kr=xt&&n>=xt*2&&i===0?P[er].averageBitrate:P[er].maxBitrate,dr=this.getTimeToLoadFrag(nr,Ft,kr*$t,Ur===void 0);if(Ft>=kr&&(er===g||Vt.loadError===0&&Vt.fragmentError===0)&&(dr<=nr||!K(dr)||Ue&&!this.bitrateTestDelay||dr<m)){const un=this.forcedAutoLevel;return er!==Y&&(un===-1||un!==Y)&&(Pt.length&&C.trace(`[abr] Skipped level(s) ${Pt.join(",")} of ${r} max with CODECS and VIDEO-RANGE:"${P[Pt[0]].codecs}" ${P[Pt[0]].videoRange}; not compatible with "${ze.codecs}" ${ht}`),C.info(`[abr] switch candidate:${v}->${er} adjustedbw(${Math.round(Ft)})-bitrate=${Math.round(Ft-kr)} ttfb:${nr.toFixed(1)} avgDuration:${$t.toFixed(1)} maxFetchDuration:${m.toFixed(1)} fetchDuration:${dr.toFixed(1)} firstSelection:${tt} codecSet:${He} videoRange:${ht} hls.loadLevel:${Y}`)),tt&&(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],v=u||m.partial===!0;s.range[f]=this.getBufferedTimes(r,n,v,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 v=n.start(g)-this.bufferPadding,k=n.end(g)+this.bufferPadding;if(m>=v&&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>v){const M=Math.max(s,n.start(g)),P=Math.min(u,n.end(g));P>M&&(i.partial=!0,i.time.push({startPTS:M,endPTS:P}))}else if(u<=v)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 Fr{static isBuffered(e,t){try{if(e){const r=Fr.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=Fr.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 v=m.start-g.start;return v||g.end-m.end});let n=[];if(r)for(let m=0;m<e.length;m++){const g=n.length;if(g){const v=n[g-1].end;e[m].start-v<r?e[m].end>v&&(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,v=n[m].end;if(t+r>=g&&t<v)u=g,f=v,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=Yn(),this.buffering={audio:Yn(),video:Yn(),audiovideo:Yn()},this.level=e,this.sn=t,this.id=r,this.size=n,this.part=i,this.partial=s}}function Yn(){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 Fs(a,e){if(a){const t=a.start+e;a.start=a.startPTS=t,a.endPTS=t+a.duration}}function hs(a,e){const t=e.fragments;for(let r=0,n=t.length;r<n;r++)Fs(t[r],a);e.fragmentHint&&Fs(e.fragmentHint,a),e.alignedSliding=!0}function Ms(a,e,t){e&&(aa(a,t,e),!t.alignedSliding&&e&&Zn(t,e),!t.alignedSliding&&e&&!t.skippedSegments&&Ki(e,t))}function aa(a,e,t){if(za(a,t,e)){const r=cs(t,e);r&&K(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:x.NETWORK_ERROR,details:y.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error(`Fragment does not have a ${r?"part list":"url"}`),networkDetails:null}));this.abort();const n=this.config,i=n.fLoader,s=n.loader;return new Promise((u,f)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(M=>M[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),v=ri(n.fragLoadPolicy.default),k={loadPolicy:v,timeout:v.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:Bs};e.stats=m.stats,m.load(g,k,{onSuccess:(M,P,z,Y)=>{this.resetLoader(e,m);let me=M.data;z.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(me.slice(0,16)),me=me.slice(16)),u({frag:e,part:null,payload:me,networkDetails:Y})},onError:(M,P,z,Y)=>{this.resetLoader(e,m),f(new pi({type:x.NETWORK_ERROR,details:y.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:Ne({url:r,data:void 0},M),error:new Error(`HTTP Error ${M.code} ${M.text}`),networkDetails:z,stats:Y}))},onAbort:(M,P,z)=>{this.resetLoader(e,m),f(new pi({type:x.NETWORK_ERROR,details:y.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:z,stats:M}))},onTimeout:(M,P,z)=>{this.resetLoader(e,m),f(new pi({type:x.NETWORK_ERROR,details:y.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${k.timeout}ms`),networkDetails:z,stats:M}))},onProgress:(M,P,z,Y)=>{t&&t({frag:e,part:null,payload:z,networkDetails:Y})}})})}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),v=ri(n.fragLoadPolicy.default),k={loadPolicy:v,timeout:v.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:Bs};t.stats=m.stats,m.load(g,k,{onSuccess:(M,P,z,Y)=>{this.resetLoader(e,m),this.updateStatsFromPart(e,t);const me={frag:e,part:t,payload:M.data,networkDetails:Y};r(me),u(me)},onError:(M,P,z,Y)=>{this.resetLoader(e,m),f(new pi({type:x.NETWORK_ERROR,details:y.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:Ne({url:g.url,data:void 0},M),error:new Error(`HTTP Error ${M.code} ${M.text}`),networkDetails:z,stats:Y}))},onAbort:(M,P,z)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,m),f(new pi({type:x.NETWORK_ERROR,details:y.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:z,stats:M}))},onTimeout:(M,P,z)=>{this.resetLoader(e,m),f(new pi({type:x.NETWORK_ERROR,details:y.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${k.timeout}ms`),networkDetails:z,stats:M}))}})})}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),v=(f-m)*Math.round(r.loaded/m);r.total=r.loaded+v}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(K(n)&&K(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:x.MEDIA_ERROR,details:y.FRAG_GAP,fatal:!1,frag:a,error:t,networkDetails:null};return e&&(r.part=e),(e||a).stats.aborted=!0,new pi(r)}class pi extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class 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?ke(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],v=f[2],k=f[3],M=new Uint32Array(256);let P=0,z=0,Y=0;for(Y=0;Y<256;Y++)Y<128?M[Y]=Y<<1:M[Y]=Y<<1^283;for(Y=0;Y<256;Y++){let me=z^z<<1^z<<2^z<<3^z<<4;me=me>>>8^me&255^99,e[P]=me,t[me]=P;const ze=M[P],Ue=M[ze],tt=M[Ue];let He=M[me]*257^me*16843008;n[P]=He<<24|He>>>8,i[P]=He<<16|He>>>16,s[P]=He<<8|He>>>24,u[P]=He,He=tt*16843009^Ue*65537^ze*257^P*16843008,m[me]=He<<24|He>>>8,g[me]=He<<16|He>>>16,v[me]=He<<8|He>>>24,k[me]=He,P?(P=ze^M[M[M[tt^ze]]],z^=M[M[z]]):P=z=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),v=this.sBox,k=this.rcon,M=this.invSubMix,P=M[0],z=M[1],Y=M[2],me=M[3];let ze,Ue;for(u=0;u<s;u++){if(u<i){ze=m[u]=t[u];continue}Ue=ze,u%i===0?(Ue=Ue<<8|Ue>>>24,Ue=v[Ue>>>24]<<24|v[Ue>>>16&255]<<16|v[Ue>>>8&255]<<8|v[Ue&255],Ue^=k[u/i|0]<<24):i>6&&u%i===4&&(Ue=v[Ue>>>24]<<24|v[Ue>>>16&255]<<16|v[Ue>>>8&255]<<8|v[Ue&255]),m[u]=ze=(m[u-i]^Ue)>>>0}for(f=0;f<s;f++)u=s-f,f&3?Ue=m[u]:Ue=m[u-4],f<4||u<=4?g[f]=Ue:g[f]=P[v[Ue>>>24]]^z[v[Ue>>>16&255]]^Y[v[Ue>>>8&255]]^me[v[Ue&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],v=u[3],k=this.uint8ArrayToUint32Array_(r);let M=k[0],P=k[1],z=k[2],Y=k[3];const me=new Int32Array(e),ze=new Int32Array(me.length);let Ue,tt,He,ht,et,bt,Rt,lt,xt,nr,Pt,rr,er,Vt;const Er=this.networkToHostOrderSwap;for(;t<me.length;){for(xt=Er(me[t]),nr=Er(me[t+1]),Pt=Er(me[t+2]),rr=Er(me[t+3]),et=xt^i[0],bt=rr^i[1],Rt=Pt^i[2],lt=nr^i[3],er=4,Vt=1;Vt<n;Vt++)Ue=f[et>>>24]^m[bt>>16&255]^g[Rt>>8&255]^v[lt&255]^i[er],tt=f[bt>>>24]^m[Rt>>16&255]^g[lt>>8&255]^v[et&255]^i[er+1],He=f[Rt>>>24]^m[lt>>16&255]^g[et>>8&255]^v[bt&255]^i[er+2],ht=f[lt>>>24]^m[et>>16&255]^g[bt>>8&255]^v[Rt&255]^i[er+3],et=Ue,bt=tt,Rt=He,lt=ht,er=er+4;Ue=s[et>>>24]<<24^s[bt>>16&255]<<16^s[Rt>>8&255]<<8^s[lt&255]^i[er],tt=s[bt>>>24]<<24^s[Rt>>16&255]<<16^s[lt>>8&255]<<8^s[et&255]^i[er+1],He=s[Rt>>>24]<<24^s[lt>>16&255]<<16^s[et>>8&255]<<8^s[bt&255]^i[er+2],ht=s[lt>>>24]<<24^s[et>>16&255]<<16^s[bt>>8&255]<<8^s[Rt&255]^i[er+3],ze[t]=Er(Ue^M),ze[t+1]=Er(ht^P),ze[t+2]=Er(He^z),ze[t+3]=Er(tt^Y),M=xt,P=nr,z=Pt,Y=rr,t=t+4}return ze.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=ke(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=ke(e,0,r),this.remainderData=ke(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}},ut={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=ut.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=ut.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 Fr.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===ut.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=Fr.bufferInfo(n||r,s,e.maxBufferHole);if(this.log(`media seeking to ${K(s)?s.toFixed(3):s}, state: ${i}`),this.state===ut.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 v=s>g;(s<m||v)&&(v&&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=ut.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===ut.FRAG_LOADING||!this.fragCurrent&&s===ut.PARSING)&&(this.fragmentTracker.removeFragment(e),this.state=ut.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===ut.STOPPED||this.state===ut.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:x.MEDIA_ERROR,details:y.FRAG_DECRYPT_ERROR,fatal:!1,error:f,reason:f.message,frag:e}),f}).then(f=>{const m=self.performance.now();return n.trigger(d.FRAG_DECRYPTED,{frag:e,payload:f,stats:{tstart:u,tdecrypt:m}}),r.payload=f,this.completeInitSegmentLoad(r)})}return this.completeInitSegmentLoad(r)}).catch(r=>{this.state===ut.STOPPED||this.state===ut.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=ut.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===Pe.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(Fr.getBuffered(u)):"(detached)"})`),e.sn!=="initSegment"){var f;if(e.type!==Pe.SUBTITLE){const g=e.elementaryStreams;if(!Object.keys(g).some(v=>!!g[v])){this.state=ut.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=ut.IDLE,u&&(!this.loadedmetadata&&e.type==Pe.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=ut.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===ut.KEY_LOADING&&(this.state=ut.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 v=this.getNextPart(g,e,r);if(v>-1){const k=g[v];this.log(`Loading part sn: ${e.sn} p: ${k.index} cc: ${e.cc} of playlist [${s.startSN}-${s.endSN}] parts [0-${v}-${g.length-1}] ${this.logPrefix==="[stream-controller]"?"level":"track"}: ${e.level}, target: ${parseFloat(r.toFixed(3))}`),this.nextLoadPosition=k.start+k.duration,this.state=ut.FRAG_LOADING;let M;return u?M=u.then(P=>!P||this.fragContextChanged(P.frag)?null:this.doFragPartsLoad(e,k,t,n)).catch(P=>this.handleFragLoadError(P)):M=this.doFragPartsLoad(e,k,t,n).catch(P=>this.handleFragLoadError(P)),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")):M}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))}`),K(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=ut.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=v=>{this.fragmentLoader.loadPart(e,v,n).then(k=>{f[v.index]=k;const M=k.part;this.hls.trigger(d.FRAG_LOADED,k);const P=hi(r,e.sn,v.index+1)||cn(m,e.sn,v.index+1);if(P)g(P);else return i({frag:e,part:M,partsLoaded:f})}).catch(s)};g(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;e.data&&t.details===y.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(d.ERROR,t)}else this.hls.trigger(d.ERROR,{type:x.OTHER_ERROR,details:y.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==ut.PARSING){!this.fragCurrent&&this.state!==ut.STOPPED&&this.state!==ut.ERROR&&(this.state=ut.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!==ut.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(!Fr.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const r=t.currentTime,n=Fr.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 K(r)?this.getFwdBufferInfoAtPos(e,r,t):null}getFwdBufferInfoAtPos(e,t,r){const{config:{maxBufferHole:n}}=this,i=Fr.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 Fr.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=Pe.MAIN){const r=this.fragmentTracker.getAppendedFrag(e,Pe.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=Ut(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,v=!!(n.lowLatencyMode&&g!=null&&g.length&&f);v&&f&&!this.bitrateTest&&(s=s.concat(f),u=f.sn);let k;if(e<t){const M=e>t-m?0:m;k=Ei(i,s,e,M)}else k=s[s.length-1];if(k){const M=k.sn-r.startSN,P=this.fragmentTracker.getState(k);if((P===on.OK||P===on.PARTIAL&&k.gap)&&(i=k),i&&k.sn===i.sn&&(!v||g[0].fragment.sn>k.sn)&&i&&k.level===i.level){const Y=s[M+1];k.sn<u&&this.fragmentTracker.getState(Y)!==on.OK?k=Y: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&&K(i);if(s||!u&&!i){const{fragPrevious:f}=this;Ms(f,r,e);const m=e.fragments[0].start;return this.log(`Live playlist sliding: ${m.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} prev-sn: ${f?f.sn:"na"} fragments: ${n}`),m}return i}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*3)}setStartPosition(e,t){let r=this.startPosition;if(r<t&&(r=-1),r===-1||this.lastCurrentTime===-1){const n=this.startTimeOffset!==null,i=n?this.startTimeOffset:e.startTimeOffset;i!==null&&K(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!==ut.FRAG_LOADING_WAITING_RETRY)&&(this.state=ut.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===y.FRAG_GAP;i&&this.fragmentTracker.fragBuffered(r,!0);const s=t.errorAction,{action:u,retryCount:f=0,retryConfig:m}=s||{};if(s&&u===kt.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=ut.FRAG_LOADING_WAITING_RETRY}else if(m&&s)if(this.resetFragmentErrors(e),f<m.maxNumRetry)!i&&u!==kt.RemoveAlternatePermanently&&(s.resolved=!0);else{C.warn(`${t.details} reached or exceeded max retry (${f})`);return}else(s==null?void 0:s.action)===kt.SendAlternateToPenaltyBox?this.state=ut.WAITING_LEVEL:this.state=ut.ERROR;this.tickImmediate()}reduceLengthAndFlushBuffer(e){if(this.state===ut.PARSING||this.state===ut.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===Pe.AUDIO&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==ut.STOPPED&&(this.state=ut.IDLE)}afterBufferFlushed(e,t,r){if(!e)return;const n=Fr.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,n,r),this.state===ut.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state=ut.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 v=g.endPTS-g.startPTS;if(v<=0)return this.warn(`Could not parse fragment ${e.sn} ${m} duration reliably (${v})`),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:x.MEDIA_ERROR,details:y.FRAG_PARSING_ERROR,fatal:!1,error:f,frag:e,reason:`Found no media in msn ${e.sn} of level "${r.url}"`}),!this.hls)return;this.resetTransmuxer()}this.state=ut.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=Me(e,0),n=r?r.length:0,i;const s=this._audioTrack,u=this._id3Track,f=r?Q(r):void 0,m=e.length;for((this.basePTS===null||this.frameIndex===0&&K(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 O(e,n)?(r=Me(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=ke(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(K(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 v=(e[t+2]&60)>>>2;if(v>g.length-1){const k=new Error(`invalid ADTS sampling index:${v}`);a.emit(d.ERROR,d.ERROR,{type:x.MEDIA_ERROR,details:y.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:${v}`),/firefox/i.test(f)?v>=6?(n=5,u=new Array(4),i=v-3):(n=2,u=new Array(2),i=v):f.indexOf("android")!==-1?(n=2,u=new Array(2),i=v):(n=5,u=new Array(4),r&&(r.indexOf("mp4a.40.29")!==-1||r.indexOf("mp4a.40.5")!==-1)||!r&&v>=6?i=v-3:((r&&r.indexOf("mp4a.40.2")!==-1&&(v>=6&&s===1||/vivaldi/i.test(f))||!r&&s===1)&&(n=2,u=new Array(2)),i=v)),u[0]=n<<3,u[0]|=(v&14)>>1,u[1]|=(v&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[v],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 ja(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=ja(e,t);let f;if(u){const{frameLength:v,headerLength:k}=u,M=k+v,P=Math.max(0,t+M-e.length);P?(f=new Uint8Array(M-k),f.set(e.subarray(t+k,e.length),0)):f=e.subarray(t+k,t+M);const z={unit:f,pts:s};return P||a.samples.push(z),{sample:z,length:M,missing:P}}const m=e.length-t;return f=new Uint8Array(m),f.set(e.subarray(t,e.length),0),{sample:{unit:f,pts:s},length:m,missing:-1}}let ss=null;const Wa=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],ma=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Va=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],ga=[0,1,1,4];function vs(a,e,t,r,n){if(t+24>e.length)return;const i=ys(e,t);if(i&&t+i.frameLength<=e.length){const s=i.samplesPerFrame*9e4/i.sampleRate,u=r+n*s,f={unit:e.subarray(t,t+i.frameLength),pts:u,dts:u};return a.config=[],a.channelCount=i.channelCount,a.samplerate=i.sampleRate,a.samples.push(f),{sample:f,length:i.frameLength,missing:0}}}function ys(a,e){const t=a[e+1]>>3&3,r=a[e+1]>>1&3,n=a[e+2]>>4&15,i=a[e+2]>>2&3;if(t!==1&&n!==0&&n!==15&&i!==3){const s=a[e+2]>>1&1,u=a[e+3]>>6,f=t===3?3-r:r===3?3:4,m=Wa[f*14+n-1]*1e3,v=ma[(t===3?0:t===2?1:2)*3+i],k=u===3?1:2,M=Va[t][r],P=ga[r],z=M*8*P,Y=Math.floor(M*m/v+s)*P;if(ss===null){const Ue=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);ss=Ue?parseInt(Ue[1]):0}return!!ss&&ss<=87&&r===2&&m>=224e3&&u===0&&(a[e+3]=a[e+3]|128),{sampleRate:v,channelCount:k,frameLength:Y,samplesPerFrame:z}}}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=Me(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 qa{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=Fe(e);if(f.video){const{id:m,timescale:g,codec:v}=f.video;i.id=m,i.timescale=u.timescale=g,i.codec=v}if(f.audio){const{id:m,timescale:g,codec:v}=f.audio;s.id=m,s.timescale=g,s.codec=v}u.id=Dt.text,i.sampleDuration=0,i.duration=s.duration=n}resetContiguity(){this.remainderData=null}static probe(e){return zt(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=Ot(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=Ot(e,t),{videoTrack:t,audioTrack:Xn(),id3Track:n,textTrack:Xn()}}extractID3Track(e,t){const r=this.id3Track;if(e.samples.length){const n=ce(e.samples,["emsg"]);n&&n.forEach(i=>{const s=Tt(i);if(ba.test(s.schemeIdUri)){const u=K(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 qi=(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 js extends ms{constructor(e){super(),this.observer=void 0,this.observer=e}resetInitSegment(e,t,r,n){super.resetInitSegment(e,t,r,n),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:t,duration:n,inputTimeScale:9e4,dropped:0}}canParse(e,t){return t+64<e.length}appendFrame(e,t,r){const n=Ws(e,t,r,this.basePTS,this.frameIndex);if(n!==-1)return{sample:e.samples[e.samples.length-1],length:n,missing:0}}static probe(e){if(!e)return!1;const t=Me(e,0);if(!t)return!1;const r=t.length;return e[r]===11&&e[r+1]===119&&Q(t)!==void 0&&qi(e,r)<16}}function Ws(a,e,t,r,n){if(t+8>e.length||e[t]!==11||e[t+1]!==119)return-1;const i=e[t+4]>>6;if(i>=3)return-1;const u=[48e3,44100,32e3][i],f=e[t+4]&63,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 v=e[t+6]>>5;let k=0;v===2?k+=2:(v&1&&v!==1&&(k+=2),v&4&&(k+=2));const M=(e[t+6]<<8|e[t+7])>>12-k&1,z=[2,1,2,3,3,4,4,5][v]+M,Y=e[t+5]>>3,me=e[t+5]&7,ze=new Uint8Array([i<<6|Y<<1|me>>2,(me&3)<<6|v<<3|M<<2|f>>4,f<<4&224]),Ue=1536/u*9e4,tt=r+n*Ue,He=e.subarray(t,t+g);return a.config=ze,a.channelCount=z,a.samplerate=u,a.samples.push({unit:He,pts:tt}),g}class Ya{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),v=this.readBoolean.bind(this),k=this.skipBits.bind(this),M=this.skipEG.bind(this),P=this.skipUEG.bind(this),z=this.skipScalingList.bind(this);f();const Y=f();if(m(5),k(3),f(),P(),Y===100||Y===110||Y===122||Y===244||Y===44||Y===83||Y===86||Y===118||Y===128){const ht=g();if(ht===3&&k(1),P(),P(),k(1),v())for(s=ht!==3?8:12,u=0;u<s;u++)v()&&(u<6?z(16):z(64))}P();const me=g();if(me===0)g();else if(me===1)for(k(1),M(),M(),i=g(),u=0;u<i;u++)M();P(),k(1);const ze=g(),Ue=g(),tt=m(1);tt===0&&k(1),k(1),v()&&(e=g(),t=g(),r=g(),n=g());let He=[1,1];if(v()&&v())switch(f()){case 1:He=[1,1];break;case 2:He=[12,11];break;case 3:He=[10,11];break;case 4:He=[16,11];break;case 5:He=[40,33];break;case 6:He=[24,11];break;case 7:He=[20,11];break;case 8:He=[32,11];break;case 9:He=[80,33];break;case 10:He=[18,11];break;case 11:He=[15,11];break;case 12:He=[64,33];break;case 13:He=[160,99];break;case 14:He=[4,3];break;case 15:He=[3,2];break;case 16:He=[2,1];break;case 255:{He=[f()<<8|f(),f()<<8|f()];break}}return{width:Math.ceil((ze+1)*16-e*2-t*2),height:(2-tt)*(Ue+1)*16-(tt?2:4)*(r+n),pixelRatio:He}}readSliceType(){return this.readUByte(),this.readUEG(),this.readUEG()}}class Za extends Ya{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 v;switch(g.type){case 1:{let z=!1;f=!0;const Y=g.data;if(m&&Y.length>4){const me=new xa(Y).readSliceType();(me===2||me===4||me===7||me===9)&&(z=!0)}if(z){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=z;break}case 5:f=!0,(v=u)!=null&&v.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 M,P;f=!0,m=!0;const z=g.data,me=new xa(z).readSPS();if(!e.sps||e.width!==me.width||e.height!==me.height||((M=e.pixelRatio)==null?void 0:M[0])!==me.pixelRatio[0]||((P=e.pixelRatio)==null?void 0:P[1])!==me.pixelRatio[1]){e.width=me.width,e.height=me.height,e.pixelRatio=me.pixelRatio,e.sps=[z],e.duration=i;const ze=z.subarray(1,4);let Ue="avc1.";for(let tt=0;tt<3;tt++){let He=ze[tt].toString(16);He.length<2&&(He="0"+He),Ue+=He}e.codec=Ue}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,v=-1,k=0;for(n===-1&&(v=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,v>=0){const M={data:t.subarray(v,m),type:k};s.push(M)}else{const M=this.getLastNalUnit(e.samples);M&&(i&&u<=4-i&&M.state&&(M.data=M.data.subarray(0,M.data.byteLength-i)),m>0&&(M.data=Ht(M.data,t.subarray(0,m)),M.state=0))}u<r?(g=t[u]&31,v=u,k=g,n=0):n=-1}else n=0}if(v>=0&&n>=0){const M={data:t.subarray(v,r),type:k,state:n};s.push(M)}if(s.length===0){const M=this.getLastNalUnit(e.samples);M&&(M.data=Ht(M.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:Dt[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,v=s.pesData,k=u.pid,M=f.pid,P=u.pesData,z=f.pesData,Y=null,me=this.pmtParsed,ze=this._pmtId,Ue=e.length;if(this.remainderData&&(e=Ht(this.remainderData,e),Ue=e.length,this.remainderData=null),Ue<ln&&!n)return this.remainderData=e,{audioTrack:u,videoTrack:s,id3Track:f,textTrack:m};const tt=Math.max(0,Di.syncOffset(e));Ue-=(Ue-tt)%ln,Ue<e.byteLength&&!n&&(this.remainderData=new Uint8Array(e.buffer,Ue,e.buffer.byteLength-Ue));let He=0;for(let et=tt;et<Ue;et+=ln)if(e[et]===71){const bt=!!(e[et+1]&64),Rt=xs(e,et),lt=(e[et+3]&48)>>4;let xt;if(lt>1){if(xt=et+5+e[et+4],xt===et+ln)continue}else xt=et+4;switch(Rt){case g:bt&&(v&&(i=Ni(v))&&this.videoParser.parseAVCPES(s,m,i,!1,this._duration),v={data:[],size:0}),v&&(v.data.push(e.subarray(xt,et+ln)),v.size+=et+ln-xt);break;case k:if(bt){if(P&&(i=Ni(P)))switch(u.segmentCodec){case"aac":this.parseAACPES(u,i);break;case"mp3":this.parseMPEGPES(u,i);break;case"ac3":this.parseAC3PES(u,i);break}P={data:[],size:0}}P&&(P.data.push(e.subarray(xt,et+ln)),P.size+=et+ln-xt);break;case M:bt&&(z&&(i=Ni(z))&&this.parseID3PES(f,i),z={data:[],size:0}),z&&(z.data.push(e.subarray(xt,et+ln)),z.size+=et+ln-xt);break;case 0:bt&&(xt+=e[xt]+1),ze=this._pmtId=Xa(e,xt);break;case ze:{bt&&(xt+=e[xt]+1);const nr=wa(e,xt,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),M=nr.id3Pid,M>0&&(f.pid=M),Y!==null&&!me&&(C.warn(`MPEG-TS PMT found at ${et} after unknown PID '${Y}'. Backtracking to sync byte @${tt} to parse all TS packets.`),Y=null,et=tt-188),me=this.pmtParsed=!0;break}case 17:case 8191:break;default:Y=Rt;break}}else He++;He>0&&ws(this.observer,new Error(`Found ${He} TS packet/s that do not start with 0x47`)),s.pesData=v,u.pesData=P,f.pesData=z;const ht={audioTrack:u,videoTrack:s,id3Track:f,textTrack:m};return n&&this.extractRemainingSamples(ht),ht}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 v=n.missing,k=n.sample.unit.byteLength;if(v===-1)i=Ht(n.sample.unit,i);else{const M=k-v;n.sample.unit.set(i.subarray(0,v),M),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 v;const k=s<u-1;if(k?v=`AAC PES did not start with ADTS header,offset:${s}`:v="No ADTS header found in AAC PES",ws(this.observer,new Error(v),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 v=Gs(e.samplerate);f=n.sample.pts+v}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=Ws(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 v=e+5,k=g;for(;k>2;){switch(a[v]){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 P=a[v+1]+2;v+=P,k-=P}}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:x.MEDIA_ERROR,details:y.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 v=new Uint8Array(a.size);for(let k=0,M=u.length;k<M;k++){t=u[k];let P=t.byteLength;if(g)if(g>P){g-=P;continue}else t=t.subarray(g),P-=g,g=0;v.set(t,e),e+=P}return r&&(r-=n+3),{data:v,pts:i,dts:s,len:r}}return null}class qs 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=Me(e,0);let r=(t==null?void 0:t.length)||0;if(t&&e[r]===11&&e[r+1]===119&&Q(t)!==void 0&&qi(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 qe{static init(){qe.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 qe.types)qe.types.hasOwnProperty(e)&&(qe.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]);qe.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]);qe.STTS=qe.STSC=qe.STCO=i,qe.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),qe.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),qe.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),qe.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]);qe.FTYP=qe.box(qe.types.ftyp,s,f,s,u),qe.DINF=qe.box(qe.types.dinf,qe.box(qe.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 qe.box(qe.types.hdlr,qe.HDLR_TYPES[e])}static mdat(e){return qe.box(qe.types.mdat,e)}static mdhd(e,t){t*=e;const r=Math.floor(t/(gi+1)),n=Math.floor(t%(gi+1));return qe.box(qe.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 qe.box(qe.types.mdia,qe.mdhd(e.timescale,e.duration),qe.hdlr(e.type),qe.minf(e))}static mfhd(e){return qe.box(qe.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"?qe.box(qe.types.minf,qe.box(qe.types.smhd,qe.SMHD),qe.DINF,qe.stbl(e)):qe.box(qe.types.minf,qe.box(qe.types.vmhd,qe.VMHD),qe.DINF,qe.stbl(e))}static moof(e,t,r){return qe.box(qe.types.moof,qe.mfhd(e),qe.traf(r,t))}static moov(e){let t=e.length;const r=[];for(;t--;)r[t]=qe.trak(e[t]);return qe.box.apply(null,[qe.types.moov,qe.mvhd(e[0].timescale,e[0].duration)].concat(r).concat(qe.mvex(e)))}static mvex(e){let t=e.length;const r=[];for(;t--;)r[t]=qe.trex(e[t]);return qe.box.apply(null,[qe.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 qe.box(qe.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 qe.box(qe.types.sdtp,r)}static stbl(e){return qe.box(qe.types.stbl,qe.stsd(e),qe.box(qe.types.stts,qe.STTS),qe.box(qe.types.stsc,qe.STSC),qe.box(qe.types.stsz,qe.STSZ),qe.box(qe.types.stco,qe.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=qe.box(qe.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],v=e.pixelRatio[1];return qe.box(qe.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,qe.box(qe.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),qe.box(qe.types.pasp,new Uint8Array([g>>24,g>>16&255,g>>8&255,g&255,v>>24,v>>16&255,v>>8&255,v&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 qe.box(qe.types.mp4a,qe.audioStsd(e),qe.box(qe.types.esds,qe.esds(e)))}static mp3(e){return qe.box(qe.types[".mp3"],qe.audioStsd(e))}static ac3(e){return qe.box(qe.types["ac-3"],qe.audioStsd(e),qe.box(qe.types.dac3,e.config))}static stsd(e){return e.type==="audio"?e.segmentCodec==="mp3"&&e.codec==="mp3"?qe.box(qe.types.stsd,qe.STSD,qe.mp3(e)):e.segmentCodec==="ac3"?qe.box(qe.types.stsd,qe.STSD,qe.ac3(e)):qe.box(qe.types.stsd,qe.STSD,qe.mp4a(e)):qe.box(qe.types.stsd,qe.STSD,qe.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 qe.box(qe.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=qe.sdtp(e),n=e.id,i=Math.floor(t/(gi+1)),s=Math.floor(t%(gi+1));return qe.box(qe.types.traf,qe.box(qe.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255])),qe.box(qe.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])),qe.trun(e,r.length+16+20+8+16+8+8),r)}static trak(e){return e.duration=e.duration||4294967295,qe.box(qe.types.trak,qe.tkhd(e),qe.mdia(e))}static trex(e){const t=e.id;return qe.box(qe.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,v,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,v=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,v.isLeading<<2|v.dependsOn,v.isDependedOn<<6|v.hasRedundancy<<4|v.paddingValue<<1|v.isNonSync,v.degradPrio&61440,v.degradPrio&15,k>>>24&255,k>>>16&255,k>>>8&255,k&255],12+16*u);return qe.box(qe.types.trun,s)}static initSegment(e){qe.types||qe.init();const t=qe.moov(e);return Ht(qe.FTYP,t)}}qe.types=void 0,qe.HDLR_TYPES=void 0,qe.STTS=void 0,qe.STSC=void 0,qe.STCO=void 0,qe.STSZ=void 0,qe.VMHD=void 0,qe.SMHD=void 0,qe.STSD=void 0,qe.FTYP=void 0,qe.DINF=void 0;const Ys=9e4;function As(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 As(a,e,1/t,r)}function Yi(a,e=!1){return As(a,1e3,1/Ys,e)}function Ea(a,e=1){return As(a,Ys,1/e)}const Ts=10*1e3,Aa=1024,Zs=1152,Ta=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,v,k,M,P,z=i,Y=i;const me=e.pid>-1,ze=t.pid>-1,Ue=t.samples.length,tt=e.samples.length>0,He=u&&Ue>0||Ue>1;if((!me||tt)&&(!ze||He)||this.ISGenerated||u){if(this.ISGenerated){var et,bt,Rt,lt;const rr=this.videoTrackConfig;rr&&(t.width!==rr.width||t.height!==rr.height||((et=t.pixelRatio)==null?void 0:et[0])!==((bt=rr.pixelRatio)==null?void 0:bt[0])||((Rt=t.pixelRatio)==null?void 0:Rt[1])!==((lt=rr.pixelRatio)==null?void 0:lt[1]))&&this.resetInitSegment()}else v=this.generateIS(e,t,i,s);const xt=this.isVideoContiguous;let nr=-1,Pt;if(He&&(nr=Ja(t.samples),!xt&&this.config.forceKeyFrameOnDiscontinuity))if(P=!0,nr>0){C.warn(`[mp4-remuxer]: Dropped ${nr} out of ${Ue} video samples due to a missing keyframe`);const rr=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(nr),t.dropped+=nr,Y+=(t.samples[0].pts-rr)/t.inputTimeScale,Pt=Y}else nr===-1&&(C.warn(`[mp4-remuxer]: No keyframe found out of ${Ue} video samples`),P=!1);if(this.ISGenerated){if(tt&&He){const rr=this.getVideoStartPts(t.samples),Vt=(Cn(e.samples[0].pts,rr)-rr)/t.inputTimeScale;z+=Math.max(0,Vt),Y+=Math.max(0,-Vt)}if(tt){if(e.samplerate||(C.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),v=this.generateIS(e,t,i,s)),g=this.remuxAudio(e,z,this.isAudioContiguous,s,ze||He||f===Pe.AUDIO?Y:void 0),He){const rr=g?g.endPTS-g.startPTS:0;t.inputTimeScale||(C.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),v=this.generateIS(e,t,i,s)),m=this.remuxVideo(t,Y,xt,rr)}}else He&&(m=this.remuxVideo(t,Y,xt,0));m&&(m.firstKeyFrame=nr,m.independent=nr!==-1,m.firstKeyFramePTS=Pt)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(r.samples.length&&(M=Sa(r,i,this._initPTS,this._initDTS)),n.samples.length&&(k=eo(n,i,this._initPTS))),{audio:g,video:m,initSegment:v,independent:P,text:k,id3:M}}generateIS(e,t,r,n){const i=e.samples,s=t.samples,u=this.typeSupported,f={},m=this._initPTS;let g=!m||n,v="audio/mp4",k,M,P;if(g&&(k=M=1/0),e.config&&i.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":u.mpeg?(v="audio/mpeg",e.codec=""):u.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}f.audio={id:"audio",container:v,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&u.mpeg?new Uint8Array(0):qe.initSegment([e]),metadata:{channelCount:e.channelCount}},g&&(P=e.inputTimeScale,!m||P!==m.timescale?k=M=i[0].pts-Math.round(P*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:qe.initSegment([t]),metadata:{width:t.width,height:t.height}},g)if(P=t.inputTimeScale,!m||P!==m.timescale){const z=this.getVideoStartPts(s),Y=Math.round(P*r);M=Math.min(M,Cn(s[0].dts,z)-Y),k=Math.min(k,z-Y)}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:P},this._initDTS={baseTime:M,timescale:P}):k=P=void 0,{tracks:f,initPTS:k,timescale:P}}remuxVideo(e,t,r,n){const i=e.inputTimeScale,s=e.samples,u=[],f=s.length,m=this._initPTS;let g=this.nextAvcDts,v=8,k=this.videoSampleDuration,M,P,z=Number.POSITIVE_INFINITY,Y=Number.NEGATIVE_INFINITY,me=!1;if(!r||g===null){const $t=t*i,Ft=s[0].pts-Cn(s[0].dts,s[0].pts);Zi&&g!==null&&Math.abs($t-Ft-g)<15e3?r=!0:g=$t-Ft}const ze=m.baseTime*i/m.timescale;for(let $t=0;$t<f;$t++){const Ft=s[$t];Ft.pts=Cn(Ft.pts-ze,g),Ft.dts=Cn(Ft.dts-ze,g),Ft.dts<s[$t>0?$t-1:$t].dts&&(me=!0)}me&&s.sort(function($t,Ft){const kr=$t.dts-Ft.dts,dr=$t.pts-Ft.pts;return kr||dr}),M=s[0].dts,P=s[s.length-1].dts;const Ue=P-M,tt=Ue?Math.round(Ue/(f-1)):k||e.inputTimeScale/30;if(r){const $t=M-g,Ft=$t>tt,kr=$t<-1;if((Ft||kr)&&(Ft?C.warn(`AVC: ${Yi($t,!0)} ms (${$t}dts) hole between fragments detected at ${t.toFixed(3)}`):C.warn(`AVC: ${Yi(-$t,!0)} ms (${$t}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!kr||g>=s[0].pts||Zi)){M=g;const dr=s[0].pts-$t;if(Ft)s[0].dts=M,s[0].pts=dr;else for(let Mr=0;Mr<s.length&&!(s[Mr].dts>dr);Mr++)s[Mr].dts-=$t,s[Mr].pts-=$t;C.log(`Video: Initial PTS/DTS adjusted: ${Yi(dr,!0)}/${Yi(M,!0)}, delta: ${Yi($t,!0)} ms`)}}M=Math.max(0,M);let He=0,ht=0,et=M;for(let $t=0;$t<f;$t++){const Ft=s[$t],kr=Ft.units,dr=kr.length;let Mr=0;for(let un=0;un<dr;un++)Mr+=kr[un].data.length;ht+=Mr,He+=dr,Ft.length=Mr,Ft.dts<et?(Ft.dts=et,et+=tt/4|0||1):et=Ft.dts,z=Math.min(Ft.pts,z),Y=Math.max(Ft.pts,Y)}P=s[f-1].dts;const bt=ht+4*He+8;let Rt;try{Rt=new Uint8Array(bt)}catch($t){this.observer.emit(d.ERROR,d.ERROR,{type:x.MUX_ERROR,details:y.REMUX_ALLOC_ERROR,fatal:!1,error:$t,bytes:bt,reason:`fail allocating video mdat ${bt}`});return}const lt=new DataView(Rt.buffer);lt.setUint32(0,bt),Rt.set(qe.types.mdat,4);let xt=!1,nr=Number.POSITIVE_INFINITY,Pt=Number.POSITIVE_INFINITY,rr=Number.NEGATIVE_INFINITY,er=Number.NEGATIVE_INFINITY;for(let $t=0;$t<f;$t++){const Ft=s[$t],kr=Ft.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;lt.setUint32(v,bo),v+=4,Rt.set(ta,v),v+=bo,dr+=4+bo}let Mr;if($t<f-1)k=s[$t+1].dts-Ft.dts,Mr=s[$t+1].pts-Ft.pts;else{const xn=this.config,Sn=$t>0?Ft.dts-s[$t-1].dts:tt;if(Mr=$t>0?Ft.pts-s[$t-1].pts:tt,xn.stretchShortVideoTrack&&this.nextAudioPts!==null){const si=Math.floor(xn.maxBufferHole*i),ta=(n?z+n*i:this.nextAudioPts)-Ft.pts;ta>si?(k=ta-Sn,k<0?k=Sn:xt=!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(Ft.pts-Ft.dts);nr=Math.min(nr,k),rr=Math.max(rr,k),Pt=Math.min(Pt,Mr),er=Math.max(er,Mr),u.push(new D(Ft.key,k,dr,un))}if(u.length){if(Zi){if(Zi<70){const $t=u[0].flags;$t.dependsOn=2,$t.isNonSync=0}}else if(Xs&&er-Pt<rr-nr&&tt/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 $t=M;for(let Ft=0,kr=u.length;Ft<kr;Ft++){const dr=$t+u[Ft].duration,Mr=$t+u[Ft].cts;if(Ft<kr-1){const un=dr+u[Ft+1].cts;u[Ft].duration=un-Mr}else u[Ft].duration=Ft?u[Ft-1].duration:tt;u[Ft].cts=0,$t=dr}}}k=xt||!k?tt:k,this.nextAvcDts=g=P+k,this.videoSampleDuration=k,this.isVideoContiguous=!0;const Ur={data1:qe.moof(e.sequenceNumber++,M,l({},e,{samples:u})),data2:Rt,startPTS:z/i,endPTS:(Y+k)/i,startDTS:M/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 Ta;default:return Aa}}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,v=this._initPTS,k=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,M=[],P=i!==void 0;let z=e.samples,Y=k?0:8,me=this.nextAudioPts||-1;const ze=t*s,Ue=v.baseTime*s/v.timescale;if(this.isAudioContiguous=r=r||z.length&&me>0&&(n&&Math.abs(ze-me)<9e3||Math.abs(Cn(z[0].pts-Ue,ze)-me)<20*g),z.forEach(function(Vt){Vt.pts=Cn(Vt.pts-Ue,ze)}),!r||me<0){if(z=z.filter(Vt=>Vt.pts>=0),!z.length)return;i===0?me=0:n&&!P?me=Math.max(0,ze):me=z[0].pts}if(e.segmentCodec==="aac"){const Vt=this.config.maxAudioFramesDrift;for(let Er=0,Ur=me;Er<z.length;Er++){const $t=z[Er],Ft=$t.pts,kr=Ft-Ur,dr=Math.abs(1e3*kr/s);if(kr<=-Vt*g&&P)Er===0&&(C.warn(`Audio frame @ ${(Ft/s).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3*kr/s)} ms.`),this.nextAudioPts=me=Ur=Ft);else if(kr>=Vt*g&&dr<Ts&&P){let Mr=Math.round(kr/g);Ur=Ft-Mr*g,Ur<0&&(Mr--,Ur+=g),Er===0&&(this.nextAudioPts=me=Ur),C.warn(`[mp4-remuxer]: Injecting ${Mr} audio frame @ ${(Ur/s).toFixed(3)}s due to ${Math.round(1e3*kr/s)} ms gap.`);for(let un=0;un<Mr;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=$t.unit.subarray()),z.splice(Er,0,{unit:Sn,pts:xn}),Ur+=g,Er++}}$t.pts=Ur,Ur+=g}}let tt=null,He=null,ht,et=0,bt=z.length;for(;bt--;)et+=z[bt].unit.byteLength;for(let Vt=0,Er=z.length;Vt<Er;Vt++){const Ur=z[Vt],$t=Ur.unit;let Ft=Ur.pts;if(He!==null){const dr=M[Vt-1];dr.duration=Math.round((Ft-He)/f)}else if(r&&e.segmentCodec==="aac"&&(Ft=me),tt=Ft,et>0){et+=Y;try{ht=new Uint8Array(et)}catch(dr){this.observer.emit(d.ERROR,d.ERROR,{type:x.MUX_ERROR,details:y.REMUX_ALLOC_ERROR,fatal:!1,error:dr,bytes:et,reason:`fail allocating audio mdat ${et}`});return}k||(new DataView(ht.buffer).setUint32(0,et),ht.set(qe.types.mdat,4))}else return;ht.set($t,Y);const kr=$t.byteLength;Y+=kr,M.push(new D(!0,m,kr,0)),He=Ft}const Rt=M.length;if(!Rt)return;const lt=M[M.length-1];this.nextAudioPts=me=He+f*lt.duration;const xt=k?new Uint8Array(0):qe.moof(e.sequenceNumber++,tt/f,l({},e,{samples:M}));e.samples=[];const nr=tt/s,Pt=me/s,er={data1:xt,data2:ht,startPTS:nr,endPTS:Pt,startDTS:nr,endDTS:Pt,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,v=(f!==null?f:n.startDTS*i)+g,k=n.endDTS*i+g,M=u*Aa,P=Math.ceil((k-v)/M),z=Es.getSilentFrame(e.manifestCodec||e.codec,e.channelCount);if(C.warn("[mp4-remuxer]: remux empty Audio"),!z){C.trace("[mp4-remuxer]: Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec");return}const Y=[];for(let me=0;me<P;me++){const ze=v+me*M;Y.push({unit:z,pts:ze,dts:ze})}return e.samples=Y,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(L(e,n)),this.emitInitSegment=!0}generateInitSegment(e){let{audioCodec:t,videoCodec:r}=this;if(!(e!=null&&e.byteLength)){this.initTracks=void 0,this.initData=void 0;return}const n=this.initData=Fe(e);n.audio&&(t=h(n.audio,G.AUDIO)),n.video&&(r=h(n.video,G.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 v={audio:void 0,video:void 0,text:n,id3:r,initSegment:void 0};K(g)||(g=this.lastEndTime=i||0);const k=t.samples;if(!(k!=null&&k.length))return v;const M={initPTS:void 0,timescale:1};let P=this.initData;if((u=P)!=null&&u.length||(this.generateInitSegment(k),P=this.initData),!((f=P)!=null&&f.length))return C.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),v;this.emitInitSegment&&(M.tracks=this.initTracks,this.emitInitSegment=!1);const z=At(k,P),Y=ae(P,k),me=Y===null?i:Y;(c(m,me,i,z)||M.timescale!==m.timescale&&s)&&(M.initPTS=me-i,m&&m.timescale===1&&C.warn(`Adjusting initPTS by ${M.initPTS-m.baseTime}`),this.initPTS=m={baseTime:M.initPTS,timescale:1});const ze=e?me-m.baseTime/m.timescale:g,Ue=ze+z;Mt(P,k,m.baseTime/m.timescale),z>0?this.lastEndTime=Ue:(C.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const tt=!!P.audio,He=!!P.video;let ht="";tt&&(ht+="audio"),He&&(ht+="video");const et={data1:k,startPTS:ze,startDTS:ze,endPTS:Ue,endDTS:Ue,type:ht,hasAudio:tt,hasVideo:He,nb:1,dropped:0};return v.audio=et.type==="audio"?et:void 0,v.video=et.type!=="audio"?et:void 0,v.initSegment=M,v.id3=Sa(r,i,m,m),n.samples.length&&(v.text=eo(n,i,m)),v}}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===G.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=Qe==null?void 0:Qe.Date.now}const b=[{demux:qa,remux:o},{demux:Di,remux:as},{demux:ya,remux:as},{demux:qs,remux:as}];b.splice(2,0,{demux:js,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:v,accurateTimeOffset:k,timeOffset:M,initSegmentChange:P}=n||u,{audioCodec:z,videoCodec:Y,defaultInitPts:me,duration:ze,initSegmentData:Ue}=f,tt=W(s,t);if(tt&&tt.method==="AES-128"){const bt=this.getDecrypter();if(bt.isSync()){let Rt=bt.softwareDecrypt(s,tt.key.buffer,tt.iv.buffer);if(r.part>-1&&(Rt=bt.flush()),!Rt)return i.executeEnd=p(),J(r);s=new Uint8Array(Rt)}else return this.decryptionPromise=bt.webCryptoDecrypt(s,tt.key.buffer,tt.iv.buffer).then(Rt=>{const lt=this.push(Rt,null,r);return this.decryptionPromise=null,lt}),this.decryptionPromise}const He=this.needsProbing(g,v);if(He){const bt=this.configureTransmuxer(s);if(bt)return C.warn(`[transmuxer] ${bt.message}`),this.observer.emit(d.ERROR,d.ERROR,{type:x.MEDIA_ERROR,details:y.FRAG_PARSING_ERROR,fatal:!1,error:bt,reason:bt.message}),i.executeEnd=p(),J(r)}(g||v||P||He)&&this.resetInitSegment(Ue,z,Y,ze,t),(g||P||He)&&this.resetInitialTimestamp(me),m||this.resetContiguity();const ht=this.transmux(s,tt,M,k,r),et=this.currentTransmuxState;return et.contiguous=!0,et.discontinuity=!1,et.trackSwitch=!1,i.executeEnd=p(),ht}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 v=r.flush();v&&s.push(this.push(v,null,e))}const{demuxer:f,remuxer:m}=this;if(!f||!m)return t.executeEnd=p(),[J(e)];const g=f.flush(u);return he(g)?g.then(v=>(this.flushRemux(s,v,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,M=b.length;k<M;k++){var u;if((u=b[k].demux)!=null&&u.probe(e)){s=b[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,v=s.demux;(!m||!(m instanceof g))&&(this.remuxer=new g(r,t,n,i)),(!f||!(f instanceof v))&&(this.demuxer=new v(r,t,n),this.probe=v.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 W(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 J=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 $e{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 Xe={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,v,k){if(typeof g!="function")throw new TypeError("The listener must be a function");var M=new n(g,v||f,k),P=t?t+m:m;return f._events[P]?f._events[P].fn?f._events[P]=[f._events[P],M]:f._events[P].push(M):(f._events[P]=M,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,v;if(this._eventsCount===0)return m;for(v in g=this._events)e.call(g,v)&&m.push(t?v.slice(1):v);return Object.getOwnPropertySymbols?m.concat(Object.getOwnPropertySymbols(g)):m},u.prototype.listeners=function(m){var g=t?t+m:m,v=this._events[g];if(!v)return[];if(v.fn)return[v.fn];for(var k=0,M=v.length,P=new Array(M);k<M;k++)P[k]=v[k].fn;return P},u.prototype.listenerCount=function(m){var g=t?t+m:m,v=this._events[g];return v?v.fn?1:v.length:0},u.prototype.emit=function(m,g,v,k,M,P){var z=t?t+m:m;if(!this._events[z])return!1;var Y=this._events[z],me=arguments.length,ze,Ue;if(Y.fn){switch(Y.once&&this.removeListener(m,Y.fn,void 0,!0),me){case 1:return Y.fn.call(Y.context),!0;case 2:return Y.fn.call(Y.context,g),!0;case 3:return Y.fn.call(Y.context,g,v),!0;case 4:return Y.fn.call(Y.context,g,v,k),!0;case 5:return Y.fn.call(Y.context,g,v,k,M),!0;case 6:return Y.fn.call(Y.context,g,v,k,M,P),!0}for(Ue=1,ze=new Array(me-1);Ue<me;Ue++)ze[Ue-1]=arguments[Ue];Y.fn.apply(Y.context,ze)}else{var tt=Y.length,He;for(Ue=0;Ue<tt;Ue++)switch(Y[Ue].once&&this.removeListener(m,Y[Ue].fn,void 0,!0),me){case 1:Y[Ue].fn.call(Y[Ue].context);break;case 2:Y[Ue].fn.call(Y[Ue].context,g);break;case 3:Y[Ue].fn.call(Y[Ue].context,g,v);break;case 4:Y[Ue].fn.call(Y[Ue].context,g,v,k);break;default:if(!ze)for(He=1,ze=new Array(me-1);He<me;He++)ze[He-1]=arguments[He];Y[Ue].fn.apply(Y[Ue].context,ze)}}return!0},u.prototype.on=function(m,g,v){return i(this,m,g,v,!1)},u.prototype.once=function(m,g,v){return i(this,m,g,v,!0)},u.prototype.removeListener=function(m,g,v,k){var M=t?t+m:m;if(!this._events[M])return this;if(!g)return s(this,M),this;var P=this._events[M];if(P.fn)P.fn===g&&(!k||P.once)&&(!v||P.context===v)&&s(this,M);else{for(var z=0,Y=[],me=P.length;z<me;z++)(P[z].fn!==g||k&&!P[z].once||v&&P[z].context!==v)&&Y.push(P[z]);Y.length?this._events[M]=Y.length===1?Y[0]:Y:s(this,M)}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})(Xe);var ot=Xe.exports,pt=se(ot);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 pt,this.observer.on(d.FRAG_DECRYPTED,s),this.observer.on(d.ERROR,s);const u=Wr(i.preferManagedMediaSource)||{isTypeSupported:()=>!1},f={mpeg:u.isTypeSupported("audio/mpeg"),mp3:u.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:u.isTypeSupported('audio/mp4; codecs="ac-3"')};if(this.useWorker&&typeof Worker!="undefined"&&(i.workerPath||ha())){try{i.workerPath?(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=v=>this.onWorkerMessage(v);const{worker:g}=this.workerContext;g.addEventListener("message",this.onwmsg),g.onerror=v=>{const k=new Error(`${v.message} (${v.filename}:${v.lineno})`);i.enableWorker=!1,C.warn(`Error in "${t}" Web Worker, fallback to inline`),this.hls.trigger(d.ERROR,{type:x.OTHER_ERROR,details:y.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 v,k;m.transmuxing.start=self.performance.now();const{transmuxer:M}=this,P=s?s.start:i.start,z=i.decryptdata,Y=this.frag,me=!(Y&&i.cc===Y.cc),ze=!(Y&&m.level===Y.level),Ue=Y?m.sn-Y.sn:-1,tt=this.part?m.part-this.part.index:-1,He=Ue===0&&m.id>1&&m.id===(Y==null?void 0:Y.stats.chunkCount),ht=!ze&&(Ue===1||Ue===0&&(tt===1||He&&tt<=0)),et=self.performance.now();(ze||Ue||i.stats.parsing.start===0)&&(i.stats.parsing.start=et),s&&(tt||!ht)&&(s.stats.parsing.start=et);const bt=!(Y&&((v=i.initSegment)==null?void 0:v.url)===((k=Y.initSegment)==null?void 0:k.url)),Rt=new $e(me,ht,f,ze,P,bt);if(!ht||me||bt){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: ${ze}
|
|
contiguous: ${ht}
|
|
accurateTimeOffset: ${f}
|
|
timeOffset: ${P}
|
|
initSegmentChange: ${bt}`);const lt=new Re(r,n,t,u,g);this.configureTransmuxer(lt)}if(this.frag=i,this.part=s,this.workerContext)this.workerContext.worker.postMessage({cmd:"demux",data:e,decryptdata:z,chunkMeta:m,state:Rt},e instanceof ArrayBuffer?[e]:[]);else if(M){const lt=M.push(e,z,m,Rt);he(lt)?(M.async=!0,lt.then(xt=>{this.handleTransmuxComplete(xt)}).catch(xt=>{this.transmuxerError(xt,m,"transmuxer-interface push error")})):(M.async=!1,this.handleTransmuxComplete(lt))}}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:x.MEDIA_ERROR,details:y.FRAG_PARSING_ERROR,chunkMeta:t,frag:this.frag||void 0,fatal:!1,error:e,err:e,reason:r}))}handleFlushResult(e,t){e.forEach(r=>{this.handleTransmuxComplete(r)}),this.onFlush(t)}onWorkerMessage(e){const t=e.data;if(!(t!=null&&t.event)){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 Nt=100;class Zt extends ps{constructor(e,t,r){super(e,t,r,"[audio-stream-controller]",Pe.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===ut.WAITING_INIT_PTS&&this.tick()}}startLoad(e){if(!this.levels){this.startPosition=e,this.state=ut.STOPPED;return}const t=this.lastCurrentTime;this.stopLoad(),this.setInterval(Nt),t>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t,this.state=ut.IDLE):(this.loadedmetadata=!1,this.state=ut.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}doTick(){switch(this.state){case ut.IDLE:this.doTickIdle();break;case ut.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=ut.WAITING_INIT_PTS}break}case ut.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=ut.IDLE}break}case ut.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=ut.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=Fr.bufferInfo(this.mediaBuffer,f,this.config.maxBufferHole);Mi(m.end,this.config.maxFragLookUpTolerance,n)<0&&(this.log(`Waiting fragment cc (${n.cc}) @ ${n.start} cancelled because another fragment at ${m.end} is needed`),this.clearWaitingFragment())}}else this.state=ut.IDLE}}this.onTickEnd()}clearWaitingFragment(){const e=this.waitingData;e&&(this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.waitingVideoCC=-1,this.state=ut.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=ut.WAITING_TRACK;return}const f=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&f&&(this.bufferFlushed=!1,this.afterBufferFlushed(f,G.AUDIO,Pe.AUDIO));const m=this.getFwdBufferInfo(f,Pe.AUDIO);if(m===null)return;if(!this.switchingTrack&&this._streamEnded(m,u)){e.trigger(d.BUFFER_EOS,{type:"audio"}),this.state=ut.ENDED;return}const g=this.getFwdBufferInfo(this.videoBuffer?this.videoBuffer:this.media,Pe.MAIN),v=m.len,k=this.getMaxBufferLength(g==null?void 0:g.len),M=u.fragments,P=M[0].start,z=this.getLoadPosition(),Y=this.flushing?z:m.end;if(this.switchingTrack&&r){const tt=z;u.PTSKnown&&tt<P&&(m.end>P||m.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),r.currentTime=P+.05)}if(v>=k&&!this.switchingTrack&&Y<M[M.length-1].start)return;let me=this.getNextFragment(Y,u),ze=!1;if(me&&this.isLoopLoading(me,Y)&&(ze=!!me.gap,me=this.getNextFragmentLoopLoading(me,u,m,Pe.MAIN,k)),!me){this.bufferFlushed=!0;return}const Ue=g&&me.start>g.end+u.targetduration;if(Ue||!(g!=null&&g.len)&&m.len){const tt=this.getAppendedFrag(me.start,Pe.MAIN);if(tt===null||(ze||(ze=!!tt.gap||!!Ue&&g.len===0),Ue&&!ze||ze&&m.nextStart&&m.nextStart<tt.end))return}this.loadFragment(me,s,Y)}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(Nt):this.resetTransmuxer(),r?(this.switchingTrack=t,this.state=ut.IDLE,this.flushAudioIfNeeded(t)):(this.switchingTrack=null,this.bufferedTrack=t,this.state=ut.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===ut.WAITING_TRACK&&!this.waitForCdnTuneIn(i)&&(this.state=ut.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 v=s.defaultAudioCodec||m.audioCodec||"mp4a.40.2";let k=this.transmuxer;k||(k=this.transmuxer=new St(this.hls,Pe.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const M=this.initPTS[r.cc],P=(t=r.initSegment)==null?void 0:t.data;if(M!==void 0){const Y=n?n.index:-1,me=Y!==-1,ze=new Ps(r.level,r.sn,r.stats.chunkCount,i.byteLength,Y,me);k.push(i,P,v,"",r,n,g.totalduration,!1,ze,M)}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:z}=this.waitingData=this.waitingData||{frag:r,part:n,cache:new Ns,complete:!1};z.push(new Uint8Array(i)),this.waitingVideoCC=this.videoTrackCC,this.state=ut.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!==Pe.AUDIO){if(!this.loadedmetadata&&r.type===Pe.MAIN){const i=this.videoBuffer||this.media;i&&Fr.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,Ne({},i)))}this.fragBufferedComplete(r,n)}onError(e,t){var r;if(t.fatal){this.state=ut.ERROR;return}switch(t.details){case y.FRAG_GAP:case y.FRAG_PARSING_ERROR:case y.FRAG_DECRYPT_ERROR:case y.FRAG_LOAD_ERROR:case y.FRAG_LOAD_TIMEOUT:case y.KEY_LOAD_ERROR:case y.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(Pe.AUDIO,t);break;case y.AUDIO_TRACK_LOAD_ERROR:case y.AUDIO_TRACK_LOAD_TIMEOUT:case y.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===ut.WAITING_TRACK&&((r=t.context)==null?void 0:r.type)===ir.AUDIO_TRACK&&(this.state=ut.IDLE);break;case y.BUFFER_APPEND_ERROR:case y.BUFFER_FULL_ERROR:if(!t.parent||t.parent!=="audio")return;if(t.details===y.BUFFER_APPEND_ERROR){this.resetLoadingState();return}this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case y.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==G.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==G.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===ut.ENDED&&(this.state=ut.IDLE);const r=this.mediaBuffer||this.media;r&&(this.afterBufferFlushed(r,t,Pe.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:v}=g,{audio:k,text:M,id3:P,initSegment:z}=i;if(this.fragContextChanged(f)||!v){this.fragmentTracker.removeFragment(f);return}if(this.state=ut.PARSING,this.switchingTrack&&k&&this.completeAudioSwitch(this.switchingTrack),z!=null&&z.tracks){const Y=f.initSegment||f;this._bufferInitSegment(g,z.tracks,Y,s),n.trigger(d.FRAG_PARSING_INIT_SEGMENT,{frag:Y,id:r,tracks:z.tracks})}if(k){const{startPTS:Y,endPTS:me,startDTS:ze,endDTS:Ue}=k;m&&(m.elementaryStreams[G.AUDIO]={startPTS:Y,endPTS:me,startDTS:ze,endDTS:Ue}),f.setElementaryStreamInfo(G.AUDIO,Y,me,ze,Ue),this.bufferFragmentData(k,f,m,s)}if(P!=null&&(t=P.samples)!=null&&t.length){const Y=l({id:r,frag:f,details:v},P);n.trigger(d.FRAG_PARSING_METADATA,Y)}if(M){const Y=l({id:r,frag:f,details:v},M);n.trigger(d.FRAG_PARSING_USERDATA,Y)}}_bufferInitSegment(e,t,r,n){if(this.state!==ut.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=ut.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,Ti)||(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,Ne({},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,M)=>{k.id=M});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=u;const f=this.hls.config.audioPreference;if(!i&&f){const k=Gn(f,u,Ti);if(k>-1)i=u[k];else{const M=Gn(f,this.tracks);i=this.tracks[M]}}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 v=this.trackId;if(m!==-1&&v===-1)this.setAudioTrack(m);else if(u.length&&v===-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:x.MEDIA_ERROR,details:y.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,Ti))return n;const i=Gn(e,this.tracksInGroup,Ti);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,Ti);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,Ne({},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,Ti)))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,Ti))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 jr extends ps{constructor(e,t,r){super(e,t,r,"[subtitle-stream-controller]",Pe.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=ut.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=ut.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,Pe.SUBTITLE)}}onFragBuffered(e,t){if(!this.loadedmetadata&&t.frag.type===Pe.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)===Pe.SUBTITLE&&(t.details===y.FRAG_GAP&&this.fragmentTracker.fragBuffered(r,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==ut.STOPPED&&(this.state=ut.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,Pe.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 v=this.mainDetails;if(s.deltaUpdateFailed||!v)return;const k=v.fragments[0];if(!f.details)s.hasProgramDateTime&&v.hasProgramDateTime?(Zn(s,v),m=s.fragments[0].start):k&&(m=k.start,_t(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,_t(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===ut.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:x.MEDIA_ERROR,details:y.FRAG_DECRYPT_ERROR,fatal:!1,error:u,reason:u.message,frag:t}),u}).then(u=>{const f=performance.now();i.trigger(d.FRAG_DECRYPTED,{frag:t,payload:u,stats:{tstart:s,tdecrypt:f}})}).catch(u=>{this.warn(`${u.name}: ${u.message}`),this.state=ut.IDLE})}}doTick(){if(!this.media){this.state=ut.IDLE;return}if(this.state===ut.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=Fr.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],i,n.maxBufferHole),{end:u,len:f}=s,m=this.getFwdBufferInfo(this.media,Pe.MAIN),g=r.details,v=this.getMaxBufferLength(m==null?void 0:m.len)+g.levelTargetDuration;if(f>v)return;const k=g.fragments,M=k.length,P=g.edge;let z=null;const Y=this.fragPrevious;if(u<P){const me=n.maxFragLookUpTolerance,ze=u>P-me?0:me;z=Ei(Y,k,Math.max(k[0].start,u),ze),!z&&Y&&Y.start<k[0].start&&(z=k[0])}else z=k[M-1];if(!z)return;if(z=this.mapToInitFragWhenRequired(z),z.sn!=="initSegment"){const me=z.sn-g.startSN,ze=k[me-1];ze&&ze.cc===z.cc&&this.fragmentTracker.getState(ze)===on.NOT_LOADED&&(z=ze)}this.fragmentTracker.getState(z)===on.NOT_LOADED&&this.loadFragment(z,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=qr(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),qr(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,v)=>{g.id=v});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 v=Gn(u,this.tracks);i=this.tracks[v]}}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=qr(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||!K(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 v=this.switchParams(n.url,r==null?void 0:r.details,n.details);this.loadPlaylist(v)}}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=Mn(Wr(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=Wr(this.appendSource);if(r&&n){var i;const s=this.mediaSource=new n;this.log(`created media source: ${(i=s.constructor)==null?void 0:i.name}`),s.addEventListener("sourceopen",this._onMediaSourceOpen),s.addEventListener("sourceended",this._onMediaSourceEnded),s.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(s.addEventListener("startstreaming",this._onStartStreaming),s.addEventListener("endstreaming",this._onEndStreaming));const u=this._objectUrl=self.URL.createObjectURL(s);if(this.appendSource)try{r.removeAttribute("src");const f=self.ManagedMediaSource;r.disableRemotePlayback=r.disableRemotePlayback||f&&s instanceof f,_i(r),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:v,container:k,metadata:M}=t[s],P=wr(f.codec,f.levelCodec),z=P==null?void 0:P.replace(Dr,"$1");let Y=wr(g,v);const me=(u=Y)==null?void 0:u.replace(Dr,"$1");if(Y&&z!==me){s.slice(0,5)==="audio"&&(Y=Cr(Y,this.appendSource));const ze=`${k};codecs=${Y}`;this.appendChangeType(s,ze),this.log(`switching codec ${P} to ${Y}`),this.tracks[s]={buffer:f.buffer,codec:g,container:k,levelCodec:v,metadata:M,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,v=g.buffering[u],k=self.performance.now();v.start=k;const M=f.stats.buffering,P=m?m.stats.buffering:null;M.start===0&&(M.start=k),P&&P.start===0&&(P.start=k);const z=i.audio;let Y=!1;u==="audio"&&(z==null?void 0:z.container)==="audio/mpeg"&&(Y=!this.lastMpegAudioChunk||g.id===1||this.lastMpegAudioChunk.sn!==g.sn,this.lastMpegAudioChunk=g);const me=f.start,ze={execute:()=>{if(v.executeStart=self.performance.now(),Y){const Ue=this.sourceBuffer[u];if(Ue){const tt=me-Ue.timestampOffset;Math.abs(tt)>=.1&&(this.log(`Updating audio SourceBuffer timestampOffset to ${me} (delta: ${tt}) sn: ${f.sn})`),Ue.timestampOffset=me)}}this.appendExecutor(s,u)},onStart:()=>{},onComplete:()=>{const Ue=self.performance.now();v.executeEnd=v.end=Ue,M.first===0&&(M.first=Ue),P&&P.first===0&&(P.first=Ue);const{sourceBuffer:tt}=this,He={};for(const ht in tt)He[ht]=Fr.getBuffered(tt[ht]);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:He})},onError:Ue=>{const tt={type:x.MEDIA_ERROR,parent:f.type,details:y.BUFFER_APPEND_ERROR,sourceBufferName:u,frag:f,part:m,chunkMeta:g,error:Ue,err:Ue,fatal:!1};if(Ue.code===DOMException.QUOTA_EXCEEDED_ERR)tt.details=y.BUFFER_FULL_ERROR;else{const He=++this.appendErrors[u];tt.details=y.BUFFER_APPEND_ERROR,this.warn(`Failed ${He}/${r.config.appendErrorMaxRetry} times to append segment in "${u}" sourceBuffer`),He>=r.config.appendErrorMaxRetry&&(tt.fatal=!0)}r.trigger(d.ERROR,tt)}};n.append(ze,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[G.AUDIOVIDEO]?i.push("audiovideo"):(s[G.AUDIO]&&i.push("audio"),s[G.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(K(f)&&f>0){const m=Math.max(f,u),g=Math.floor(s/u)*u-m;this.flushBackBuffer(s,u,g)}if(K(i.frontBufferFlushThreshold)&&i.frontBufferFlushThreshold>0){const m=Math.max(i.maxBufferLength,i.frontBufferFlushThreshold),g=Math.max(m,u),v=Math.floor(s/u)*u+g;this.flushFrontBuffer(s,u,v)}}flushBackBuffer(e,t,r){const{details:n,sourceBuffer:i}=this;this.getSourceBufferTypes().forEach(u=>{const f=i[u];if(f){const m=Fr.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=Fr.getBuffered(u),m=f.length;if(m<2)return;const g=f.start(m-1),v=f.end(m-1);if(r>g||e>=g&&e<=v)return;if(u.ended&&e-v<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=K(n.duration)?n.duration:0;e.live&&t.config.liveDurationInfinity?(n.duration=1/0,this.updateSeekableRange(e)):(i>u&&i>s||!K(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:x.MEDIA_ERROR,details:y.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:s,reason:s.message})}}}createSourceBuffers(e){const{sourceBuffer:t,mediaSource:r}=this;if(!r)throw Error("createSourceBuffers called when mediaSource was null");for(const i in e)if(!t[i]){var n;const s=e[i];if(!s)throw Error(`source buffer exists for track ${i}, however track does not`);let u=((n=s.levelCodec)==null?void 0:n.indexOf(","))===-1?s.levelCodec:s.codec;u&&i.slice(0,5)==="audio"&&(u=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",(v,k)=>{const M=k.removedRanges;M!=null&&M.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:x.MEDIA_ERROR,details:y.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:m,sourceBufferName:i,mimeType:f})}}}get mediaSrc(){var e,t;const r=((e=this.media)==null||(t=e.querySelector)==null?void 0:t.call(e,"source"))||this.media;return r==null?void 0:r.src}_onSBUpdateStart(e){const{operationQueue:t}=this;t.current(e).onStart()}_onSBUpdateEnd(e){var t;if(((t=this.mediaSource)==null?void 0:t.readyState)==="closed"){this.resetBuffer(e);return}const{operationQueue:r}=this;r.current(e).onComplete(),r.shiftAndExecuteNext(e)}_onSBUpdateError(e,t){var r;const n=new Error(`${e} SourceBuffer error. MediaSource readyState: ${(r=this.mediaSource)==null?void 0:r.readyState}`);this.error(`${n}`,t),this.hls.trigger(d.ERROR,{type:x.MEDIA_ERROR,details:y.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:n,fatal:!1});const i=this.operationQueue.current(e);i&&i.onError(n)}removeExecutor(e,t,r){const{media:n,mediaSource:i,operationQueue:s,sourceBuffer:u}=this,f=u[e];if(!n||!i||!f){this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),s.shiftAndExecuteNext(e);return}const m=K(n.duration)?n.duration:1/0,g=K(i.duration)?i.duration:1/0,v=Math.max(0,t),k=Math.min(r,m,g);k>v&&(!f.ending||f.ended)?(f.ended=!1,this.log(`Removing [${v},${k}] from the ${e} SourceBuffer`),f.remove(v,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(Qe!=null&&Qe.VTTCue)return self.VTTCue;const a=["","lr","rl"],e=["start","middle","end","left","right"];function t(u,f){if(typeof f!="string"||!Array.isArray(u))return!1;const m=f.toLowerCase();return~u.indexOf(m)?m:!1}function r(u){return t(a,u)}function n(u){return t(e,u)}function i(u,...f){let m=1;for(;m<arguments.length;m++){const g=arguments[m];for(const v in g)u[v]=g[v]}return u}function s(u,f,m){const g=this,v={enumerable:!0};g.hasBeenReset=!1;let k="",M=!1,P=u,z=f,Y=m,me=null,ze="",Ue=!0,tt="auto",He="start",ht=50,et="middle",bt=50,Rt="middle";Object.defineProperty(g,"id",i({},v,{get:function(){return k},set:function(lt){k=""+lt}})),Object.defineProperty(g,"pauseOnExit",i({},v,{get:function(){return M},set:function(lt){M=!!lt}})),Object.defineProperty(g,"startTime",i({},v,{get:function(){return P},set:function(lt){if(typeof lt!="number")throw new TypeError("Start time must be set to a number.");P=lt,this.hasBeenReset=!0}})),Object.defineProperty(g,"endTime",i({},v,{get:function(){return z},set:function(lt){if(typeof lt!="number")throw new TypeError("End time must be set to a number.");z=lt,this.hasBeenReset=!0}})),Object.defineProperty(g,"text",i({},v,{get:function(){return Y},set:function(lt){Y=""+lt,this.hasBeenReset=!0}})),Object.defineProperty(g,"region",i({},v,{get:function(){return me},set:function(lt){me=lt,this.hasBeenReset=!0}})),Object.defineProperty(g,"vertical",i({},v,{get:function(){return ze},set:function(lt){const xt=r(lt);if(xt===!1)throw new SyntaxError("An invalid or illegal string was specified.");ze=xt,this.hasBeenReset=!0}})),Object.defineProperty(g,"snapToLines",i({},v,{get:function(){return Ue},set:function(lt){Ue=!!lt,this.hasBeenReset=!0}})),Object.defineProperty(g,"line",i({},v,{get:function(){return tt},set:function(lt){if(typeof lt!="number"&<!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");tt=lt,this.hasBeenReset=!0}})),Object.defineProperty(g,"lineAlign",i({},v,{get:function(){return He},set:function(lt){const xt=n(lt);if(!xt)throw new SyntaxError("An invalid or illegal string was specified.");He=xt,this.hasBeenReset=!0}})),Object.defineProperty(g,"position",i({},v,{get:function(){return ht},set:function(lt){if(lt<0||lt>100)throw new Error("Position must be between 0 and 100.");ht=lt,this.hasBeenReset=!0}})),Object.defineProperty(g,"positionAlign",i({},v,{get:function(){return et},set:function(lt){const xt=n(lt);if(!xt)throw new SyntaxError("An invalid or illegal string was specified.");et=xt,this.hasBeenReset=!0}})),Object.defineProperty(g,"size",i({},v,{get:function(){return bt},set:function(lt){if(lt<0||lt>100)throw new Error("Size must be between 0 and 100.");bt=lt,this.hasBeenReset=!0}})),Object.defineProperty(g,"align",i({},v,{get:function(){return Rt},set:function(lt){const xt=n(lt);if(!xt)throw new SyntaxError("An invalid or illegal string was specified.");Rt=xt,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,M){let P;switch(k){case"region":for(let z=t.length-1;z>=0;z--)if(t[z].id===M){m.set(k,t[z].region);break}break;case"vertical":m.alt(k,M,["rl","lr"]);break;case"line":P=M.split(","),m.integer(k,P[0]),m.percent(k,P[0])&&m.set("snapToLines",!1),m.alt(k,P[0],["auto"]),P.length===2&&m.alt("lineAlign",P[1],["start",Ca,"end"]);break;case"position":P=M.split(","),m.percent(k,P[0]),P.length===2&&m.alt("positionAlign",P[1],["start",Ca,"end","line-left","line-right","auto"]);break;case"size":m.percent(k,M);break;case"align":m.alt(k,M,["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 v=m.get("position","auto");v==="auto"&&io.position===50&&(v=f.align==="start"||f.align==="left"?0:f.align==="end"||f.align==="right"?100:50),f.position=v}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(!K(t)||!K(r)||!K(n)||!K(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=vt(new Uint8Array(a)).trim().replace(il,`
|
|
`).split(`
|
|
`),m=[],g=e?Ea(e.baseTime,e.timescale):0;let v="00:00.000",k=0,M=0,P,z=!0;u.oncue=function(Y){const me=t[r];let ze=t.ccOffset;const Ue=(k-g)/9e4;if(me!=null&&me.new&&(M!==void 0?ze=t.ccOffset=me.start:al(t,r,Ue)),Ue){if(!e){P=new Error("Missing initPTS for VTT MPEGTS");return}ze=Ue-t.presentationOffset}const tt=Y.endTime-Y.startTime,He=Cn((Y.startTime+ze-M)*9e4,n*9e4)/9e4;Y.startTime=Math.max(He,0),Y.endTime=Math.max(He+tt,0);const ht=Y.text.trim();Y.text=decodeURIComponent(encodeURIComponent(ht)),Y.id||(Y.id=oo(Y.startTime,Y.endTime,ht)),Y.endTime>0&&m.push(Y)},u.onparsingerror=function(Y){P=Y},u.onflush=function(){if(P){s(P);return}i(m)},f.forEach(Y=>{if(z)if(so(Y,"X-TIMESTAMP-MAP=")){z=!1,Y.slice(16).split(",").forEach(me=>{so(me,"LOCAL:")?v=me.slice(6):so(me,"MPEGTS:")&&(k=parseInt(me.slice(7)))});try{M=sl(v)/1e3}catch(me){P=me}return}else Y===""&&(z=!1);u.parse(Y+`
|
|
`)}),u.flush()}const lo="stpp.ttml.im1t",Ao=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,To=/^(\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=ce(new Uint8Array(a),["mdat"]);if(n.length===0){r(new Error("Could not parse IMSC1 mdat"));return}const i=n.map(u=>vt(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((v,k)=>(v[k]=n.getAttribute(`ttp:${k}`)||i[k],v),{}),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,v=>{const k=ko(v,u);if(!k||!v.hasAttribute("begin"))return null;const M=ho(v.getAttribute("begin"),s),P=ho(v.getAttribute("dur"),s);let z=ho(v.getAttribute("end"),s);if(M===null)throw Co(v);if(z===null){if(P===null)throw Co(v);z=M+P}const Y=new no(M-e,z-e,k);Y.id=oo(Y.startTime,Y.endTime,Y.text);const me=m[v.getAttribute("region")],ze=f[v.getAttribute("style")],Ue=cl(me,ze,f),{textAlign:tt}=Ue;if(tt){const He=ll[tt];He&&(Y.lineAlign=He),Y.align=tt}return l(Y,Ue),Y}).filter(v=>v!==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&&(Ao.test(a)?t=hl(a,e):To.test(a)&&(t=fl(a,e))),t}function hl(a,e){const t=Ao.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=To.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?qr(s.textTracks):null;if(this.tracks.forEach((f,m)=>{let g;if(u){let v=null;for(let k=0;k<u.length;k++)if(u[k]&&Lo(u[k],f)){v=u[k],u[k]=null;break}v&&(g=v)}if(g)En(g);else{const v=Ro(f);g=this.createTextTrack(v,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===Pe.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===Pe.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 v=g.message==="Missing initPTS for VTT MPEGTS";v?s.push(e):this._fallbackToIMSC1(r,n),C.log(`Failed to parse VTT cue: ${g}`),!(v&&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===Pe.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===Pe.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=>_r(u[f],t,r))}if(this.config.renderTextTracksNatively&&t===0&&n!==void 0){const{textTracks:u}=this;Object.keys(u).forEach(f=>_r(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&&K(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=Gt(s);let f,m;if(r==="sinf"){if(u!==nt.FAIRPLAY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${r}" for selected key-system ${u}`);return}const P=yt(new Uint8Array(n));try{const z=E(JSON.parse(P).sinf),Y=dt(z);if(!Y)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");f=Y.subarray(8,24),m=nt.FAIRPLAY}catch(z){this.warn(`${i} Failed to parse sinf: ${z}`);return}}else{if(u!==nt.WIDEVINE&&u!==nt.PLAYREADY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${r}" for selected key-system ${u}`);return}const P=Kr(n),z=P.filter(me=>!!me.systemId&&st(me.systemId)===u);z.length>1&&this.warn(`${i} Using first of ${z.length} pssh found for selected key-system ${u}`);const Y=z[0];if(!Y){P.length===0||P.some(me=>!me.systemId)?this.warn(`${i} contains incomplete or invalid pssh data`):this.log(`ignoring ${i} for ${P.map(me=>st(me.systemId)).join(",")} pssh data in favor of playlist keys`);return}if(m=st(Y.systemId),Y.version===0&&Y.data)if(m===nt.WIDEVINE){const me=Y.data.length-22;f=Y.data.subarray(me,me+16)}else m===nt.PLAYREADY&&(f=Kt(Y.data))}if(!m||!f){this.log(`Unable to handle ${i} with key-system ${u}`);return}const g=mt.hexDump(f),{keyIdToKeySessionPromise:v,mediaKeySessions:k}=this;let M=v[g];for(let P=0;P<k.length;P++){const z=k[P],Y=z.decryptdata;if(!Y.keyId)continue;const me=mt.hexDump(Y.keyId);if(g===me||Y.uri.replace(/-/g,"").indexOf(g)!==-1){if(M=v[me],Y.pssh)break;delete v[me],Y.pssh=new Uint8Array(n),Y.keyId=f,M=v[g]=M.then(()=>this.generateRequestWithPreferredKeySession(z,r,n,"encrypted-event-key-match")),M.catch(ze=>this.handleError(ze));break}}if(!M){if(m!==u){this.log(`Ignoring "${i}" with ${m} init data for selected key-system ${u}`);return}M=v[g]=this.getKeySystemSelectionPromise([m]).then(({keySystem:P,mediaKeys:z})=>{var Y;this.throwIfDestroyed();const me=new or("ISO-23001-7",g,(Y=tr(P))!=null?Y:"");return me.pssh=new Uint8Array(n),me.keyId=f,this.attemptSetMediaKeys(P,z).then(()=>{this.throwIfDestroyed();const ze=this.createMediaKeySessionContext({decryptdata:me,keySystem:P,mediaKeys:z});return this.generateRequestWithPreferredKeySession(ze,r,n,"encrypted-event-no-match")})}),M.catch(P=>this.handleError(P))}})}},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===nt.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(v=>s({keySystem:g,mediaKeys:v})).catch(v=>{m.length?f(m):v instanceof ii?u(v):u(new ii({type:x.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_NO_ACCESS,error:v,fatal:!0},v.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 yr===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(v=>v?this.setMediaKeysServerCertificate(g,e,v):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: ${mt.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 mt.hexDump(e.keyId)}updateKeySession(e,t){var r;const n=e.mediaKeysSession;return this.log(`Updating key-session "${n.sessionId}" for keyID ${mt.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(Gt).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:x.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),r=this.keyIdToKeySessionPromise[t];if(!r){const n=Gt(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:x.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${JSON.stringify({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}attemptSetMediaKeys(e,t){const r=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const n=Promise.all(r).then(()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)});return this.setMediaKeysQueue.push(n),n.then(()=>{this.log(`Media-keys set for "${e}"`),r.push(n),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(i=>r.indexOf(i)===-1)})}generateRequestWithPreferredKeySession(e,t,r,n){var i,s;const u=(i=this.config.drmSystems)==null||(s=i[e.keySystem])==null?void 0:s.generateRequest;if(u)try{const P=u.call(this.hls,t,r,e);if(!P)throw new Error("Invalid response from configured generateRequest filter");t=P.initDataType,r=e.decryptdata.pssh=P.initData?new Uint8Array(P.initData):null}catch(P){var f;if(this.warn(P.message),(f=this.hls)!=null&&f.config.debug)throw P}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 pt,v=e._onmessage=P=>{const z=e.mediaKeysSession;if(!z){g.emit("error",new Error("invalid state"));return}const{messageType:Y,message:me}=P;this.log(`"${Y}" message event for session "${z.sessionId}" message size: ${me.byteLength}`),Y==="license-request"||Y==="license-renewal"?this.renewLicense(e,me).catch(ze=>{this.handleError(ze),g.emit("error",ze)}):Y==="license-release"?e.keySystem===nt.FAIRPLAY&&(this.updateKeySession(e,je("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${Y}"`)},k=e._onkeystatuseschange=P=>{if(!e.mediaKeysSession){g.emit("error",new Error("invalid state"));return}this.onKeyStatusChange(e);const Y=e.keyStatus;g.emit("keyStatus",Y),Y==="expired"&&(this.warn(`${e.keySystem} expired for key ${m}`),this.renewKeySession(e))};e.mediaKeysSession.addEventListener("message",v),e.mediaKeysSession.addEventListener("keystatuseschange",k);const M=new Promise((P,z)=>{g.on("error",z),g.on("keyStatus",Y=>{Y.startsWith("usable")?P():Y==="output-restricted"?z(new ii({type:x.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):Y==="internal-error"?z(new ii({type:x.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${Y}"`)):Y==="expired"?z(new Error("key expired while generating request")):this.warn(`unhandled key status change "${Y}"`)})});return e.mediaKeysSession.generateRequest(t,r).then(()=>{var P;this.log(`Request generated for key-session "${(P=e.mediaKeysSession)==null?void 0:P.sessionId}" keyId: ${m}`)}).catch(P=>{throw new ii({type:x.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_NO_SESSION,error:P,fatal:!1},`Error generating key-session request: ${P}`)}).then(()=>M).catch(P=>{throw g.removeAllListeners(),this.removeSession(e),P}).then(()=>(g.removeAllListeners(),e))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach((t,r)=>{this.log(`key status change "${t}" for keyStatuses keyId: ${mt.hexDump("buffer"in r?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new Uint8Array(r))} session keyId: ${mt.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},v={onSuccess:(k,M,P,z)=>{s(k.data)},onError:(k,M,P,z)=>{u(new ii({type:x.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:P,response:Ne({url:f.url,data:void 0},k)},`"${e}" certificate request failed (${i}). Status: ${k.code} (${k.text})`))},onTimeout:(k,M,P)=>{u(new ii({type:x.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:P,response:{url:f.url,data:void 0}},`"${e}" certificate request timed out (${i})`))},onAbort:(k,M,P)=>{u(new Error("aborted"))}};n.load(f,g,v)})):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:x.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:s,fatal:!0},s.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(r=>this.updateKeySession(e,new Uint8Array(r)).catch(n=>{throw new ii({type:x.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:n,fatal:!0},n.message)}))}unpackPlayReadyKeyMessage(e,t){const r=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!r.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const n=new DOMParser().parseFromString(r,"application/xml"),i=n.querySelectorAll("HttpHeader");if(i.length>0){let g;for(let v=0,k=i.length;v<k;v++){var s,u;g=i[v];const M=(s=g.querySelector("name"))==null?void 0:s.textContent,P=(u=g.querySelector("value"))==null?void 0:u.textContent;M&&P&&e.setRequestHeader(M,P)}}const f=n.querySelector("Challenge"),m=f==null?void 0:f.textContent;if(!m)throw new Error("Cannot find <Challenge> in key message");return je(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:x.KEY_SYSTEM_ERROR,details:y.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:u,response:{url:s,data:void 0,code:u.status,text:u.statusText}},`License Request XHR failed (${s}). Status: ${u.status} (${u.statusText})`));else{const 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==nt.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 Al(a){return a<-999999999999999||999999999999999<a}const Tl=/[\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 Fo(a){if(Al(a))throw ki(a,El);return a.toString()}function Ll(a){return`@${Fo(a.getTime()/1e3)}`}function Mo(a,e){if(a<0)return-Mo(-a,e);const t=Math.pow(10,e);if(Math.abs(a*t%1-.5)<Number.EPSILON){const n=Math.floor(a*t);return(n%2===0?n:n+1)/t}else return Math.round(a*t)/t}function Il(a){const e=Mo(a,3);if(Math.floor(Math.abs(e)).toString().length>12)throw ki(a,wl);const t=e.toString();return t.includes(".")?t:`${t}.0`}const Ol="String";function Pl(a){if(Tl.test(a))throw ki(a,Ol);return`"${a.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Fl(a){return a.description||a.toString().slice(7,-1)}function Bo(a){const e=Fl(a);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw ki(e,Sl);return e}function mo(a){switch(typeof a){case"number":if(!K(a))throw ki(a,Po);return Number.isInteger(a)?Fo(a):Il(a);case"string":return Pl(a);case"symbol":return Bo(a);case"boolean":return kl(a);case"object":if(a instanceof Date)return Ll(a);if(a instanceof Uint8Array)return Rl(a);if(a instanceof Oo)return Bo(a);default:throw ki(a,Po)}}function go(a){if(/^[a-z*][a-z0-9\-_.*]*$/.test(a)===!1)throw ki(a,Dl);return a}function _o(a){return a==null?"":Object.entries(a).map(([e,t])=>t===!0?`;${go(e)}`:`;${go(e)}=${mo(t)}`).join("")}function No(a){return a instanceof Rs?`${mo(a.value)}${_o(a.params)}`:mo(a)}function Ml(a){return`(${a.value.map(No).join(" ")})${_o(a.params)}`}function Bl(a,e={whitespace:!0}){if(typeof a!="object")throw ki(a,_l);const t=a instanceof Map?a.entries():Object.entries(a),r=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([n,i])=>{i instanceof Rs||(i=new Rs(i));let s=go(n);return i.value===!0?s+=_o(i.params):(s+="=",Array.isArray(i.value)?s+=Ml(i):s+=No(i)),s}).join(`,${r}`)}function Nl(a,e){return Bl(a,e)}const Ul=a=>a==="ot"||a==="sf"||a==="st",zl=a=>typeof a=="number"?K(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 jl(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(jl(a,e),l({whitespace:!1},e)):""}function Wl(a,e={}){if(!a)return{};const t=Object.entries(a),r=Object.entries(gl).concat(Object.entries((e==null?void 0:e.customHeaderMap)||{})),n=t.reduce((i,s)=>{var u,f;const[m,g]=s,v=((u=r.find(k=>k[1].includes(m)))==null?void 0:u[0])||os.REQUEST;return(f=i[v])!=null||(i[v]={}),i[v][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,Wl(e,t))}const ql="CMCD";function Yl(a,e={}){if(!a)return"";const t=Uo(a,e);return`${ql}=${encodeURIComponent(t)}`}const zo=/CMCD=[^&#]+/;function Zl(a,e,t){const r=Yl(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:Fr.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)===kt.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 v=new de(g.attrs);v["PATHWAY-ID"]=s;const k=v.AUDIO&&`${v.AUDIO}_clone_${s}`,M=v.SUBTITLES&&`${v.SUBTITLES}_clone_${s}`;k&&(r[v.AUDIO]=k,v.AUDIO=k),M&&(n[v.SUBTITLES]=M,v.SUBTITLES=M);const P=Go(g.uri,v["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",f),z=new gn({attrs:v,audioCodec:g.audioCodec,bitrate:g.bitrate,height:g.height,name:g.name,url:P,videoCodec:g.videoCodec,width:g.width});if(g.audioGroups)for(let Y=1;Y<g.audioGroups.length;Y++)z.addGroupId("audio",`${g.audioGroups[Y]}_clone_${s}`);if(g.subtitleGroups)for(let Y=1;Y<g.subtitleGroups.length;Y++)z.addGroupId("text",`${g.subtitleGroups[Y]}_clone_${s}`);return z});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,v,k,M)=>{this.log(`Loaded steering manifest: "${n}"`);const P=g.data;if(P.VERSION!==1){this.log(`Steering VERSION ${P.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=P.TTL;const{"RELOAD-URI":z,"PATHWAY-CLONES":Y,"PATHWAY-PRIORITY":me}=P;if(z)try{this.uri=new self.URL(z,n).href}catch(Ue){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${z}`);return}this.scheduleRefresh(this.uri||k.url),Y&&this.clonePathways(Y);const ze={steeringManifest:P,url:n.toString()};this.hls.trigger(d.STEERING_MANIFEST_LOADED,ze),me&&this.updatePathwayPriority(me)},onError:(g,v,k,M)=>{if(this.log(`Error loading steering manifest: ${g.code} ${g.text} (${v.url})`),this.stopLoad(),g.code===410){this.enabled=!1,this.log(`Steering manifest ${v.url} no longer available`);return}let P=this.timeToLoad*1e3;if(g.code===429){const z=this.loader;if(typeof(z==null?void 0:z.getResponseHeader)=="function"){const Y=z.getResponseHeader("Retry-After");Y&&(P=parseFloat(Y)*1e3)}this.log(`Steering manifest ${v.url} rate limited`);return}this.scheduleRefresh(this.uri||v.url,P)},onTimeout:(g,v,k)=>{this.log(`Timeout loading steering manifest (${v.url})`),this.scheduleRefresh(this.uri||v.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 de(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 Be,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&&K(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 v=u!=null?u:t.response;if(v!=null){r.loading.end=Math.max(self.performance.now(),r.loading.first);const k=t.responseType==="arraybuffer"?v.byteLength:v.length;if(r.loaded=r.total=k,r.bwEstimate=r.total*8e3/(r.loading.end-r.loading.first),!this.callbacks)return;const M=this.callbacks.onProgress;if(M&&M(r,e,v,t),!this.callbacks)return;const P={url:t.responseURL,data:v,code:s};this.callbacks.onSuccess(P,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 Be}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&&K(m)?m:g,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),r.onTimeout(n,e,this.response)},t.timeout),self.fetch(this.request).then(v=>{this.response=this.loader=v;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)),!v.ok){const{status:M,statusText:P}=v;throw new o0(P||"fetch, bad network response",M,v)}return n.loading.first=k,n.total=s0(v.headers)||n.total,s&&K(t.highWaterMark)?this.loadProgressively(v,n,e,t.highWaterMark,s):u?v.arrayBuffer():e.responseType==="json"?v.json():v.text()}).then(v=>{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 M=v[f];M&&(n.loaded=n.total=M);const P={url:k.url,data:v,code:k.status};s&&!K(t.highWaterMark)&&s(n,e,v,k),r.onSuccess(P,n,e,k)}).catch(v=>{if(self.clearTimeout(this.requestTimeout),n.aborted)return;const k=v&&v.code||0,M=v?v.message:null;r.onError({code:k,text:M},e,v?v.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,v=g.length;return t.loaded+=v,v<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(K(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 v;for(let z=0;z<i.chars.length;z++)l0.test(i.chars[z].uchar)&&u?f++:(m+=i.chars[z].uchar,u=!1);i.cueStartTime=e,e===t&&(t+=1e-4),f>=16?f--:f++;const M=Eo(m.trim()),P=oo(e,t,M);a!=null&&(v=a.cues)!=null&&v.getCueById(P)||(s=new g(e,t,M),s.id=P,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,M)=>k.line==="auto"||M.line==="auto"?0:k.line>8&&M.line>8?M.line-k.line:k.line-M.line),n.forEach(k=>li(a,k))),n}},c0={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},jo=Ne(Ne({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:yr,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:jr,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}`,v=e[g];if(v!==void 0&&u){f.push(g);const k=t[s].default;switch(e[s]={default:k},m){case"TimeOut":k.maxLoadTimeMs=v,k.maxTimeToFirstByteMs=v;break;case"MaxRetry":k.errorRetry.maxNumRetry=v,k.timeoutRetry.maxNumRetry=v;break;case"RetryDelay":k.errorRetry.retryDelayMs=v,k.timeoutRetry.retryDelayMs=v;break;case"MaxRetryTimeout":k.errorRetry.maxRetryDelayMs=v,k.timeoutRetry.maxRetryDelayMs=v;break}}}),f.length&&C.warn(`hls.js config: "${f.join('", "')}" setting(s) are deprecated, use "${s}": ${JSON.stringify(e[s])}`)}),Ne(Ne({},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 v,k;const M=g.attrs;let{audioCodec:P,videoCodec:z}=g;((v=P)==null?void 0:v.indexOf("mp4a.40.34"))!==-1&&(yo||(yo=/chrome|firefox/i.test(navigator.userAgent)),yo&&(g.audioCodec=P=void 0)),P&&(g.audioCodec=P=Cr(P,r)),((k=z)==null?void 0:k.indexOf("avc1"))===0&&(z=g.videoCodec=an(z));const{width:Y,height:me,unknownCodecs:ze}=g;if(u||(u=!!(Y&&me)),f||(f=!!z),m||(m=!!P),ze!=null&&ze.length||P&&!Or(P,"audio",r)||z&&!Or(z,"video",r))return;const{CODECS:Ue,"FRAME-RATE":tt,"HDCP-LEVEL":He,"PATHWAY-ID":ht,RESOLUTION:et,"VIDEO-RANGE":bt}=M,lt=`${`${ht||"."}-`}${g.bitrate}-${et}-${tt}-${Ue}-${bt}-${He}`;if(i[lt])if(i[lt].uri!==g.url&&!g.attrs["PATHWAY-ID"]){const xt=s[lt]+=1;g.attrs["PATHWAY-ID"]=new Array(xt+1).join(".");const nr=new gn(g);i[lt]=nr,n.push(nr)}else i[lt].addGroupId("audio",M.AUDIO),i[lt].addGroupId("text",M.SUBTITLES);else{const xt=new gn(g);i[lt]=xt,s[lt]=1,n.push(xt)}}),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:P,videoRange:z,width:Y,height:me})=>(!!P||!!(Y&&me))&&Yr(z))),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 P=new Error("no level with compatible codecs found in manifest");this.hls.trigger(d.ERROR,{type:x.MEDIA_ERROR,details:y.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:P,reason:P.message})}});return}if(t.audioTracks){const{preferManagedMediaSource:P}=this.hls.config;s=t.audioTracks.filter(z=>!z.audioCodec||Or(z.audioCodec,"audio",P)),Wo(s)}t.subtitles&&(u=t.subtitles,Wo(u));const m=f.slice(0);f.sort((P,z)=>{if(P.attrs["HDCP-LEVEL"]!==z.attrs["HDCP-LEVEL"])return(P.attrs["HDCP-LEVEL"]||"")>(z.attrs["HDCP-LEVEL"]||"")?1:-1;if(r&&P.height!==z.height)return P.height-z.height;if(P.frameRate!==z.frameRate)return P.frameRate-z.frameRate;if(P.videoRange!==z.videoRange)return Nn.indexOf(P.videoRange)-Nn.indexOf(z.videoRange);if(P.videoCodec!==z.videoCodec){const Y=fn(P.videoCodec),me=fn(z.videoCodec);if(Y!==me)return me-Y}if(P.uri===z.uri&&P.codecSet!==z.codecSet){const Y=Hr(P.codecSet),me=Hr(z.codecSet);if(Y!==me)return me-Y}return P.averageBitrate!==z.averageBitrate?P.averageBitrate-z.averageBitrate:0});let g=m[0];if(this.steering&&(f=this.steering.filterParsedLevels(f),f.length!==m.length)){for(let P=0;P<m.length;P++)if(m[P].pathwayId===f[0].pathwayId){g=m[P];break}}this._levels=f;for(let P=0;P<f.length;P++)if(f[P]===g){var v;this._firstLevel=P;const z=g.bitrate,Y=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${f.length} level(s) found, first bitrate: ${z}`),((v=this.hls.userConfig)==null?void 0:v.abrEwmaDefaultEstimate)===void 0){const me=Math.min(z,this.hls.config.abrEwmaDefaultEstimateMax);me>Y&&Y===jo.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=me)}break}const k=i&&!n,M={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(P=>!!P.url)};this.hls.trigger(d.MANIFEST_PARSED,M),(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"),v=e<0;if(this.hls.trigger(d.ERROR,{type:x.OTHER_ERROR,details:y.LEVEL_SWITCH_ERROR,level:e,fatal:v,error:g,reason:g.message}),v)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===Pe.MAIN){const r=t.elementaryStreams;if(!Object.keys(r).some(i=>!!r[i]))return;const n=this._levels[t.level];n!=null&&n.loadError&&(this.log(`Resetting level error count of ${n.loadError} on frag buffered`),n.loadError=0)}}onLevelLoaded(e,t){var r;const{level:n,details:i}=t,s=this._levels[n];if(!s){var u;this.warn(`Invalid level index ${n}`),(u=t.deliveryDirectives)!=null&&u.skip&&(i.deltaUpdateFailed=!0);return}n===this.currentLevelIndex?(s.fragmentError===0&&(s.loadError=0),this.playlistLoaded(n,t,s.details)):(r=t.deliveryDirectives)!=null&&r.skip&&(i.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist();const t=this.currentLevelIndex,r=this.currentLevel;if(r&&this.shouldLoadPlaylist(r)){let n=r.uri;if(e)try{n=e.addDirectives(n)}catch(s){this.warn(`Could not construct new URL with HLS Delivery Directives: ${s}`)}const i=r.attrs["PATHWAY-ID"];this.log(`Loading level index ${t}${(e==null?void 0:e.msn)!==void 0?" at sn "+e.msn+" part "+e.part:""} with${i?" Pathway "+i:""} ${n}`),this.clearTimer(),this.hls.trigger(d.LEVEL_LOADING,{url:n,level:t,pathwayId:r.attrs["PATHWAY-ID"],id:0,deliveryDirectives:e||null})}}get nextLoadLevel(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;const r=this._levels.filter((n,i)=>i!==e?!0:(this.steering&&this.steering.removeLevel(n),n===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,n.details&&n.details.fragments.forEach(s=>s.level=-1)),!1));en(r),this._levels=r,this.currentLevelIndex>-1&&(t=this.currentLevel)!=null&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.hls.trigger(d.LEVELS_UPDATED,{levels:r})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:r}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(d.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:r}))}}function Wo(a){const e={};a.forEach(t=>{const r=t.groupId||"";t.id=e[r]=e[r]||0,e[r]++})}class m0{constructor(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const r in this.keyUriToKeyInfo){const n=this.keyUriToKeyInfo[r].loader;if(n){var t;if(e&&e!==((t=n.context)==null?void 0:t.frag.type))return;n.abort()}}}detach(){for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e].loader;t&&t.destroy()}this.keyUriToKeyInfo={}}createKeyLoadError(e,t=y.KEY_LOAD_ERROR,r,n,i){return new pi({type:x.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:i,error:r,networkDetails:n})}loadClear(e,t){if(this.emeController&&this.config.emeEnabled){const{sn:r,cc:n}=e;for(let i=0;i<t.length;i++){const s=t[i];if(n<=s.cc&&(r==="initSegment"||s.sn==="initSegment"||r<s.sn)){this.emeController.selectKeySystemFormat(s).then(u=>{s.setKeyFormat(u)});break}}}}load(e){return!e.decryptdata&&e.encrypted&&this.emeController&&this.config.emeEnabled?this.emeController.selectKeySystemFormat(e).then(t=>this.loadInternal(e,t)):this.loadInternal(e)}loadInternal(e,t){var r,n;t&&e.setKeyFormat(t);const i=e.decryptdata;if(!i){const m=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,y.KEY_LOAD_ERROR,m))}const s=i.uri;if(!s)return Promise.reject(this.createKeyLoadError(e,y.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${s}"`)));let u=this.keyUriToKeyInfo[s];if((r=u)!=null&&r.decryptdata.key)return i.key=u.decryptdata.key,Promise.resolve({frag:e,keyInfo:u});if((n=u)!=null&&n.keyLoadPromise){var f;switch((f=u.mediaKeySessionContext)==null?void 0:f.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return u.keyLoadPromise.then(m=>(i.key=m.keyInfo.decryptdata.key,{frag:e,keyInfo:u}))}}switch(u=this.keyUriToKeyInfo[s]={decryptdata:i,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},i.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return i.keyFormat==="identity"?this.loadKeyHTTP(u,e):this.loadKeyEME(u,e);case"AES-128":return this.loadKeyHTTP(u,e);default:return Promise.reject(this.createKeyLoadError(e,y.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${i.method}"`)))}}loadKeyEME(e,t){const r={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const n=this.emeController.loadKey(r);if(n)return(e.keyLoadPromise=n.then(i=>(e.mediaKeySessionContext=i,r))).catch(i=>{throw e.keyLoadPromise=null,i})}return Promise.resolve(r)}loadKeyHTTP(e,t){const r=this.config,n=r.loader,i=new n(r);return t.keyLoader=e.loader=i,e.keyLoadPromise=new Promise((s,u)=>{const f={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},m=r.keyLoadPolicy.default,g={loadPolicy:m,timeout:m.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},v={onSuccess:(k,M,P,z)=>{const{frag:Y,keyInfo:me,url:ze}=P;if(!Y.decryptdata||me!==this.keyUriToKeyInfo[ze])return u(this.createKeyLoadError(Y,y.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),z));me.decryptdata.key=Y.decryptdata.key=new Uint8Array(k.data),Y.keyLoader=null,me.loader=null,s({frag:Y,keyInfo:me})},onError:(k,M,P,z)=>{this.resetLoader(M),u(this.createKeyLoadError(t,y.KEY_LOAD_ERROR,new Error(`HTTP Error ${k.code} loading key ${k.text}`),P,Ne({url:f.url,data:void 0},k)))},onTimeout:(k,M,P)=>{this.resetLoader(M),u(this.createKeyLoadError(t,y.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),P))},onAbort:(k,M,P)=>{this.resetLoader(M),u(this.createKeyLoadError(t,y.INTERNAL_ABORTED,new Error("key loading aborted"),P))}};i.load(f,g,v)})}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 qo(){if(!Wr())return!1;const e=Vo();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function g0(){if(!qo())return!1;const a=Wr();return typeof(a==null?void 0:a.isTypeSupported)=="function"&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some(e=>a.isTypeSupported(nn(e,"video")))||["mp4a.40.2","fLaC"].some(e=>a.isTypeSupported(nn(e,"audio"))))}function _0(){var a;const e=Vo();return typeof(e==null||(a=e.prototype)==null?void 0:a.changeType)=="function"}const v0=250,Oa=2,y0=.1,b0=.05;class x0{constructor(e,t,r,n){this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.config=e,this.media=t,this.fragmentTracker=r,this.hls=n}destroy(){this.media=null,this.hls=this.fragmentTracker=null}poll(e,t){const{config:r,media:n,stalled:i}=this;if(n===null)return;const{currentTime:s,seeking:u}=n,f=this.seeking&&!u,m=!this.seeking&&u;if(this.seeking=u,s!==e){if(this.moved=!0,u||(this.nudgeRetry=0),i!==null){if(this.stallReported){const Y=self.performance.now()-i;C.warn(`playback not stuck anymore @${s}, after ${Math.round(Y)}ms`),this.stallReported=!1}this.stalled=null}return}if(m||f){this.stalled=null;return}if(n.paused&&!u||n.ended||n.playbackRate===0||!Fr.getBuffered(n).length){this.nudgeRetry=0;return}const g=Fr.bufferInfo(n,s,0),v=g.nextStart||0;if(u){const Y=g.len>Oa,me=!v||t&&t.start<=s||v-s>Oa&&!this.fragmentTracker.getPartialFragment(s);if(Y||me)return;this.moved=!1}if(!this.moved&&this.stalled!==null){var k;if(!(g.len>0)&&!v)return;const me=Math.max(v,g.start||0)-s,ze=this.hls.levels?this.hls.levels[this.hls.currentLevel]:null,tt=(ze==null||(k=ze.details)==null?void 0:k.live)?ze.details.targetduration*2:Oa,He=this.fragmentTracker.getPartialFragment(s);if(me>0&&(me<=tt||He)){n.paused||this._trySkipBufferHole(He);return}}const M=self.performance.now();if(i===null){this.stalled=M;return}const P=M-i;if(!u&&P>=v0&&(this._reportStall(g),!this.media))return;const z=Fr.bufferInfo(n,s,r.maxBufferHole);this._tryFixBufferStall(z,P)}_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:x.MEDIA_ERROR,details:y.BUFFER_STALLED_ERROR,fatal:!1,error:i,buffer:e.len})}}_trySkipBufferHole(e){const{config:t,hls:r,media:n}=this;if(n===null)return 0;const i=n.currentTime,s=Fr.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 M=!1;if(i===0){const P=k.getAppendedFrag(0,Pe.MAIN);P&&u<P.end&&(M=!0)}if(!M){const P=e||k.getAppendedFrag(i,Pe.MAIN);if(P){let z=!1,Y=P.end;for(;Y<u;){const me=k.getPartialFragment(Y);if(me)Y+=me.duration;else{z=!0;break}}if(z)return 0}}}const v=Math.max(u+b0,i+y0);if(C.warn(`skipping hole, adjusting currentTime from ${i} to ${v}`),this.moved=!0,this.stalled=null,n.currentTime=v,e&&!e.gap){const k=new Error(`fragment loaded with buffer holes, seeking from ${i} to ${v}`);r.trigger(d.ERROR,{type:x.MEDIA_ERROR,details:y.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:k,reason:k.message,frag:e})}return v}}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:x.MEDIA_ERROR,details:y.BUFFER_NUDGE_ON_STALL,error:u,fatal:!1})}else{const s=new Error(`Playhead still not moving while enough data buffered @${i} after ${e.nudgeMaxRetry} nudges`);C.error(s.message),t.trigger(d.ERROR,{type:x.MEDIA_ERROR,details:y.BUFFER_STALLED_ERROR,error:s,fatal:!0})}}}const w0=100;class E0 extends ps{constructor(e,t,r){super(e,t,r,"[stream-controller]",Pe.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=ut.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=ut.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case ut.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=ut.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=ut.IDLE;break}break}case ut.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=ut.IDLE}}break}this.state===ut.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 z={};this.altAudio&&(z.type="video"),this.hls.trigger(d.BUFFER_EOS,z),this.state=ut.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===ut.WAITING_LEVEL||m.live&&this.levelLastLoaded!==s){this.level=i,this.state=ut.WAITING_LEVEL;return}const g=u.len,v=this.getMaxBufferLength(s.maxBitrate);if(g>=v)return;this.backtrackFragment&&this.backtrackFragment.start>u.end&&(this.backtrackFragment=null);const k=this.backtrackFragment?this.backtrackFragment.start:u.end;let M=this.getNextFragment(k,m);if(this.couldBacktrack&&!this.fragPrevious&&M&&M.sn!=="initSegment"&&this.fragmentTracker.getState(M)!==on.OK){var P;const Y=((P=this.backtrackFragment)!=null?P:M).sn-m.startSN,me=m.fragments[Y-1];me&&M.cc===me.cc&&(M=me,this.fragmentTracker.removeFragment(me))}else this.backtrackFragment&&u.len&&(this.backtrackFragment=null);if(M&&this.isLoopLoading(M,k)){if(!M.gap){const Y=this.audioOnly&&!this.altAudio?G.AUDIO:G.VIDEO,me=(Y===G.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;me&&this.afterBufferFlushed(me,Y,Pe.MAIN)}M=this.getNextFragmentLoopLoading(M,m,u,Pe.MAIN,v)}M&&(M.initSegment&&!M.initSegment.data&&!this.bitrateTest&&(M=M.initSegment),this.loadFragment(M,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,Pe.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 ut.KEY_LOADING:case ut.FRAG_LOADING:case ut.FRAG_LOADING_WAITING_RETRY:case ut.PARSING:case ut.PARSED:this.state=ut.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;K(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!==ut.IDLE)return;const n=r[t.level];(!n.details||n.details.live&&this.levelLastLoaded!==n||this.waitForCdnTuneIn(n.details))&&(this.state=ut.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===ut.FRAG_LOADING||this.state===ut.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 v;if(this.checkLiveUpdate(s),s.deltaUpdateFailed)return;g=this.alignPlaylists(s,f.details,(v=this.levelLastLoaded)==null?void 0:v.details)}if(f.details=s,this.levelLastLoaded=f,this.hls.trigger(d.LEVEL_UPDATED,{details:s,level:i}),this.state===ut.WAITING_LEVEL){if(this.waitForCdnTuneIn(s))return;this.state=ut.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,v=(t=r.initSegment)==null?void 0:t.data,k=this._getAudioCodec(u),M=this.transmuxer=this.transmuxer||new St(this.hls,Pe.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),P=n?n.index:-1,z=P!==-1,Y=new Ps(r.level,r.sn,r.stats.chunkCount,i.byteLength,P,z),me=this.initPTS[r.cc];M.push(i,v,k,m,r,n,f.totalduration,g,Y,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!==Pe.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===ut.PARSED&&(this.state=ut.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=ut.ERROR;return}switch(t.details){case y.FRAG_GAP:case y.FRAG_PARSING_ERROR:case y.FRAG_DECRYPT_ERROR:case y.FRAG_LOAD_ERROR:case y.FRAG_LOAD_TIMEOUT:case y.KEY_LOAD_ERROR:case y.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(Pe.MAIN,t);break;case y.LEVEL_LOAD_ERROR:case y.LEVEL_LOAD_TIMEOUT:case y.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===ut.WAITING_LEVEL&&((r=t.context)==null?void 0:r.type)===ir.LEVEL&&(this.state=ut.IDLE);break;case y.BUFFER_APPEND_ERROR:case y.BUFFER_FULL_ERROR:if(!t.parent||t.parent!=="main")return;if(t.details===y.BUFFER_APPEND_ERROR){this.resetLoadingState();return}this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case y.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}checkBuffer(){const{media:e,gapController:t}=this;if(!(!e||!t||!e.readyState)){if(this.loadedmetadata||!Fr.getBuffered(e).length){const r=this.state!==ut.IDLE?this.fragCurrent:null;t.poll(this.lastCurrentTime,r)}this.lastCurrentTime=e.currentTime}}onFragLoadEmergencyAborted(){this.state=ut.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==G.AUDIO||this.audioOnly&&!this.altAudio){const r=(t===G.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(r,t,Pe.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=Fr.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=ut.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:v,text:k,id3:M,initSegment:P}=i,{details:z}=g,Y=this.altAudio?void 0:i.audio;if(this.fragContextChanged(f)){this.fragmentTracker.removeFragment(f);return}if(this.state=ut.PARSING,P){if(P!=null&&P.tracks){const Ue=f.initSegment||f;this._bufferInitSegment(g,P.tracks,Ue,s),n.trigger(d.FRAG_PARSING_INIT_SEGMENT,{frag:Ue,id:r,tracks:P.tracks})}const me=P.initPTS,ze=P.timescale;K(me)&&(this.initPTS[f.cc]={baseTime:me,timescale:ze},n.trigger(d.INIT_PTS_FOUND,{frag:f,id:r,initPTS:me,timescale:ze}))}if(v&&z&&f.sn!=="initSegment"){const me=z.fragments[f.sn-1-z.startSN],ze=f.sn===z.startSN,Ue=!me||f.cc>me.cc;if(i.independent!==!1){const{startPTS:tt,endPTS:He,startDTS:ht,endDTS:et}=v;if(m)m.elementaryStreams[v.type]={startPTS:tt,endPTS:He,startDTS:ht,endDTS:et};else if(v.firstKeyFrame&&v.independent&&s.id===1&&!Ue&&(this.couldBacktrack=!0),v.dropped&&v.independent){const bt=this.getMainFwdBufferInfo(),Rt=(bt?bt.end:this.getLoadPosition())+this.config.maxBufferHole,lt=v.firstKeyFramePTS?v.firstKeyFramePTS:tt;if(!ze&&Rt<lt-this.config.maxBufferHole&&!Ue){this.backtrack(f);return}else Ue&&(f.gap=!0);f.setElementaryStreamInfo(v.type,f.start,He,f.start,et,!0)}else ze&&tt>Oa&&(f.gap=!0);f.setElementaryStreamInfo(v.type,tt,He,ht,et),this.backtrackFragment&&(this.backtrackFragment=f),this.bufferFragmentData(v,f,m,s,ze||Ue)}else if(ze||Ue)f.gap=!0;else{this.backtrack(f);return}}if(Y){const{startPTS:me,endPTS:ze,startDTS:Ue,endDTS:tt}=Y;m&&(m.elementaryStreams[G.AUDIO]={startPTS:me,endPTS:ze,startDTS:Ue,endDTS:tt}),f.setElementaryStreamInfo(G.AUDIO,me,ze,Ue,tt),this.bufferFragmentData(Y,f,m,s)}if(z&&M!=null&&(t=M.samples)!=null&&t.length){const me={id:r,frag:f,details:z,samples:M.samples};n.trigger(d.FRAG_PARSING_METADATA,me)}if(z&&k){const me={id:r,frag:f,details:z,samples:k.samples};n.trigger(d.FRAG_PARSING_USERDATA,me)}}_bufferInitSegment(e,t,r,n){if(this.state!==ut.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,Pe.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=ut.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const r=e.currentTime;if(Fr.isBuffered(e,r)?t=this.getAppendedFrag(r):Fr.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&&K(t)&&K(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 qo()}static isSupported(){return g0()}static getMediaSource(){return Wr()}static get Events(){return d}static get ErrorTypes(){return x}static get ErrorDetails(){return y}static get DefaultConfig(){return ls.defaultConfig?ls.defaultConfig:jo}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 pt,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,te(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),v=this.capLevelController=new i(this),k=new u(this),M=new jn(this),P=new mn(this),z=t.contentSteeringController,Y=z?new z(this):null,me=this.levelController=new p0(this,Y),ze=new Ua(this),Ue=new m0(this.config),tt=this.streamController=new E0(this,ze,Ue);v.setStreamController(tt),k.setStreamController(tt);const He=[M,me,tt];Y&&He.splice(1,0,Y),this.networkControllers=He;const ht=[m,g,v,k,P,ze];this.audioTrackController=this.createController(t.audioTrackController,He);const et=t.audioStreamController;et&&He.push(new et(this,ze,Ue)),this.subtitleTrackController=this.createController(t.subtitleTrackController,He);const bt=t.subtitleStreamController;bt&&He.push(new bt(this,ze,Ue)),this.createController(t.timelineController,ht),Ue.emeController=this.emeController=this.createController(t.emeController,ht),this.cmcdController=this.createController(t.cmcdController,ht),this.latencyController=this.createController(Gi,ht),this.coreComponents=ht,He.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:x.OTHER_ERROR,details:y.INTERNAL_EXCEPTION,fatal:n,event:e,error:r}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){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=Le.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}}]);
|
|
}()); |