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.
1328 lines
1.4 MiB
1328 lines
1.4 MiB
!(function(){var Vl=Math.pow;(self.webpackChunk=self.webpackChunk||[]).push([[5992],{70557:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return ie}});var $=w(72308),ae=w(59301),Se={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"},_e=Se,O=w(7657),m=function(Q,U){return ae.createElement(O.Z,(0,$.Z)({},Q,{ref:U,icon:_e}))},de=ae.forwardRef(m),ie=de},27812:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return ie}});var $=w(72308),ae=w(59301),Se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 000 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"arrow-left",theme:"outlined"},_e=Se,O=w(7657),m=function(Q,U){return ae.createElement(O.Z,(0,$.Z)({},Q,{ref:U,icon:_e}))},de=ae.forwardRef(m),ie=de},84105:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return ie}});var $=w(72308),ae=w(59301),Se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z"}}]},name:"down",theme:"outlined"},_e=Se,O=w(7657),m=function(Q,U){return ae.createElement(O.Z,(0,$.Z)({},Q,{ref:U,icon:_e}))},de=ae.forwardRef(m),ie=de},18785:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return ie}});var $=w(72308),ae=w(59301),Se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M176 511a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0zm280 0a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"ellipsis",theme:"outlined"},_e=Se,O=w(7657),m=function(Q,U){return ae.createElement(O.Z,(0,$.Z)({},Q,{ref:U,icon:_e}))},de=ae.forwardRef(m),ie=de},73331:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return ie}});var $=w(72308),ae=w(59301),Se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z"}},{tag:"path",attrs:{d:"M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z"}}]},name:"eye-invisible",theme:"outlined"},_e=Se,O=w(7657),m=function(Q,U){return ae.createElement(O.Z,(0,$.Z)({},Q,{ref:U,icon:_e}))},de=ae.forwardRef(m),ie=de},15277:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return ie}});var $=w(72308),ae=w(59301),Se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z"}}]},name:"eye",theme:"outlined"},_e=Se,O=w(7657),m=function(Q,U){return ae.createElement(O.Z,(0,$.Z)({},Q,{ref:U,icon:_e}))},de=ae.forwardRef(m),ie=de},33853:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return ie}});var $=w(72308),ae=w(59301),Se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},_e=Se,O=w(7657),m=function(Q,U){return ae.createElement(O.Z,(0,$.Z)({},Q,{ref:U,icon:_e}))},de=ae.forwardRef(m),ie=de},38819:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return ie}});var $=w(72308),ae=w(59301),Se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},_e=Se,O=w(7657),m=function(Q,U){return ae.createElement(O.Z,(0,$.Z)({},Q,{ref:U,icon:_e}))},de=ae.forwardRef(m),ie=de},47472:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return ie}});var $=w(72308),ae=w(59301),Se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},_e=Se,O=w(7657),m=function(Q,U){return ae.createElement(O.Z,(0,$.Z)({},Q,{ref:U,icon:_e}))},de=ae.forwardRef(m),ie=de},87395:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return ie}});var $=w(72308),ae=w(59301),Se={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M890.5 755.3L537.9 269.2c-12.8-17.6-39-17.6-51.7 0L133.5 755.3A8 8 0 00140 768h75c5.1 0 9.9-2.5 12.9-6.6L512 369.8l284.1 391.6c3 4.1 7.8 6.6 12.9 6.6h75c6.5 0 10.3-7.4 6.5-12.7z"}}]},name:"up",theme:"outlined"},_e=Se,O=w(7657),m=function(Q,U){return ae.createElement(O.Z,(0,$.Z)({},Q,{ref:U,icon:_e}))},de=ae.forwardRef(m),ie=de},35593:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return kt}});var $=w(77321),ae=w(52487),Se=w(74416),_e=w(43403),O=w(92310),m=w.n(O),de=w(29301),ie=w(76846),o=w(96452),Q=w(6089),U=w(80402),E=w(34280),b=w(49658),S=w(59301),D=w(72308),V=w(77900),q=w(8654);function B(fe){var he=fe.prefixCls,se=fe.align,Me=fe.arrow,$e=fe.arrowPos,F=Me||{},le=F.className,xe=F.content,we=$e.x,Ie=we===void 0?0:we,Oe=$e.y,Qe=Oe===void 0?0:Oe,it=S.useRef();if(!se||!se.points)return null;var Je={position:"absolute"};if(se.autoArrow!==!1){var Ke=se.points[0],yt=se.points[1],De=Ke[0],Pe=Ke[1],Ze=yt[0],Ve=yt[1];De===Ze||!["t","b"].includes(De)?Je.top=Qe:De==="t"?Je.top=0:Je.bottom=0,Pe===Ve||!["l","r"].includes(Pe)?Je.left=Ie:Pe==="l"?Je.left=0:Je.right=0}return S.createElement("div",{ref:it,className:m()("".concat(he,"-arrow"),le),style:Je},xe)}function R(fe){var he=fe.prefixCls,se=fe.open,Me=fe.zIndex,$e=fe.mask,F=fe.motion;return $e?S.createElement(V.default,(0,D.Z)({},F,{motionAppear:!0,visible:se,removeOnLeave:!0}),function(le){var xe=le.className;return S.createElement("div",{style:{zIndex:Me},className:m()("".concat(he,"-mask"),xe)})}):null}var Z=S.memo(function(fe){var he=fe.children;return he},function(fe,he){return he.cache}),ue=Z,M=S.forwardRef(function(fe,he){var se=fe.popup,Me=fe.className,$e=fe.prefixCls,F=fe.style,le=fe.target,xe=fe.onVisibleChanged,we=fe.open,Ie=fe.keepDom,Oe=fe.fresh,Qe=fe.onClick,it=fe.mask,Je=fe.arrow,Ke=fe.arrowPos,yt=fe.align,De=fe.motion,Pe=fe.maskMotion,Ze=fe.forceRender,Ve=fe.getPopupContainer,nt=fe.autoDestroy,mt=fe.portal,gt=fe.zIndex,x=fe.onMouseEnter,T=fe.onMouseLeave,et=fe.onPointerEnter,W=fe.ready,Ee=fe.offsetX,Bt=fe.offsetY,Be=fe.offsetR,ze=fe.offsetB,qe=fe.onAlign,ee=fe.onPrepare,be=fe.stretch,me=fe.targetWidth,Ge=fe.targetHeight,X=typeof se=="function"?se():se,Ct=we||Ie,Ce=(Ve==null?void 0:Ve.length)>0,Ot=S.useState(!Ve||!Ce),zt=(0,ae.Z)(Ot,2),cr=zt[0],sr=zt[1];if((0,E.Z)(function(){!cr&&Ce&&le&&sr(!0)},[cr,Ce,le]),!cr)return null;var Kt="auto",$t={left:"-1000vw",top:"-1000vh",right:Kt,bottom:Kt};if(W||!we){var mr,Vr=yt.points,Ur=yt.dynamicInset||((mr=yt._experimental)===null||mr===void 0?void 0:mr.dynamicInset),jr=Ur&&Vr[0][1]==="r",Vt=Ur&&Vr[0][0]==="b";jr?($t.right=Be,$t.left=Kt):($t.left=Ee,$t.right=Kt),Vt?($t.bottom=ze,$t.top=Kt):($t.top=Bt,$t.bottom=Kt)}var or={};return be&&(be.includes("height")&&Ge?or.height=Ge:be.includes("minHeight")&&Ge&&(or.minHeight=Ge),be.includes("width")&&me?or.width=me:be.includes("minWidth")&&me&&(or.minWidth=me)),we||(or.pointerEvents="none"),S.createElement(mt,{open:Ze||Ct,getContainer:Ve&&function(){return Ve(le)},autoDestroy:nt},S.createElement(R,{prefixCls:$e,open:we,zIndex:gt,mask:it,motion:Pe}),S.createElement(de.Z,{onResize:qe,disabled:!we},function(Ir){return S.createElement(V.default,(0,D.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:Ze,leavedClassName:"".concat($e,"-hidden")},De,{onAppearPrepare:ee,onEnterPrepare:ee,visible:we,onVisibleChanged:function(Lr){var ln;De==null||(ln=De.onVisibleChanged)===null||ln===void 0||ln.call(De,Lr),xe(Lr)}}),function(Kr,Lr){var ln=Kr.className,Pr=Kr.style,Fn=m()($e,ln,Me);return S.createElement("div",{ref:(0,q.sQ)(Ir,he,Lr),className:Fn,style:(0,$.Z)((0,$.Z)((0,$.Z)((0,$.Z)({"--arrow-x":"".concat(Ke.x||0,"px"),"--arrow-y":"".concat(Ke.y||0,"px")},$t),or),Pr),{},{boxSizing:"border-box",zIndex:gt},F),onMouseEnter:x,onMouseLeave:T,onPointerEnter:et,onClick:Qe},Je&&S.createElement(B,{prefixCls:$e,arrow:Je,arrowPos:Ke,align:yt}),S.createElement(ue,{cache:!we&&!Oe},X))})}))}),Y=M,oe=S.forwardRef(function(fe,he){var se=fe.children,Me=fe.getTriggerDOMNode,$e=(0,q.Yr)(se),F=S.useCallback(function(xe){(0,q.mH)(he,Me?Me(xe):xe)},[Me]),le=(0,q.x1)(F,se.ref);return $e?S.cloneElement(se,{ref:le}):se}),J=oe,ye=S.createContext(null),pe=ye;function ve(fe){return fe?Array.isArray(fe)?fe:[fe]:[]}function Ae(fe,he,se,Me){return S.useMemo(function(){var $e=ve(se!=null?se:he),F=ve(Me!=null?Me:he),le=new Set($e),xe=new Set(F);return fe&&(le.has("hover")&&(le.delete("hover"),le.add("click")),xe.has("hover")&&(xe.delete("hover"),xe.add("click"))),[le,xe]},[fe,he,se,Me])}var j=w(29194);function P(){var fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],se=arguments.length>2?arguments[2]:void 0;return se?fe[0]===he[0]:fe[0]===he[0]&&fe[1]===he[1]}function K(fe,he,se,Me){for(var $e=se.points,F=Object.keys(fe),le=0;le<F.length;le+=1){var xe,we=F[le];if(P((xe=fe[we])===null||xe===void 0?void 0:xe.points,$e,Me))return"".concat(he,"-placement-").concat(we)}return""}function k(fe,he,se,Me){return he||(se?{motionName:"".concat(fe,"-").concat(se)}:Me?{motionName:Me}:null)}function ne(fe){return fe.ownerDocument.defaultView}function G(fe){for(var he=[],se=fe==null?void 0:fe.parentElement,Me=["hidden","scroll","clip","auto"];se;){var $e=ne(se).getComputedStyle(se),F=$e.overflowX,le=$e.overflowY,xe=$e.overflow;[F,le,xe].some(function(we){return Me.includes(we)})&&he.push(se),se=se.parentElement}return he}function v(fe){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1;return Number.isNaN(fe)?he:fe}function y(fe){return v(parseFloat(fe),0)}function N(fe,he){var se=(0,$.Z)({},fe);return(he||[]).forEach(function(Me){if(!(Me instanceof HTMLBodyElement||Me instanceof HTMLHtmlElement)){var $e=ne(Me).getComputedStyle(Me),F=$e.overflow,le=$e.overflowClipMargin,xe=$e.borderTopWidth,we=$e.borderBottomWidth,Ie=$e.borderLeftWidth,Oe=$e.borderRightWidth,Qe=Me.getBoundingClientRect(),it=Me.offsetHeight,Je=Me.clientHeight,Ke=Me.offsetWidth,yt=Me.clientWidth,De=y(xe),Pe=y(we),Ze=y(Ie),Ve=y(Oe),nt=v(Math.round(Qe.width/Ke*1e3)/1e3),mt=v(Math.round(Qe.height/it*1e3)/1e3),gt=(Ke-yt-Ze-Ve)*nt,x=(it-Je-De-Pe)*mt,T=De*mt,et=Pe*mt,W=Ze*nt,Ee=Ve*nt,Bt=0,Be=0;if(F==="clip"){var ze=y(le);Bt=ze*nt,Be=ze*mt}var qe=Qe.x+W-Bt,ee=Qe.y+T-Be,be=qe+Qe.width+2*Bt-W-Ee-gt,me=ee+Qe.height+2*Be-T-et-x;se.left=Math.max(se.left,qe),se.top=Math.max(se.top,ee),se.right=Math.min(se.right,be),se.bottom=Math.min(se.bottom,me)}}),se}function te(fe){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,se="".concat(he),Me=se.match(/^(.*)\%$/);return Me?fe*(parseFloat(Me[1])/100):parseFloat(se)}function Le(fe,he){var se=he||[],Me=(0,ae.Z)(se,2),$e=Me[0],F=Me[1];return[te(fe.width,$e),te(fe.height,F)]}function Fe(){var fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return[fe[0],fe[1]]}function Ue(fe,he){var se=he[0],Me=he[1],$e,F;return se==="t"?F=fe.y:se==="b"?F=fe.y+fe.height:F=fe.y+fe.height/2,Me==="l"?$e=fe.x:Me==="r"?$e=fe.x+fe.width:$e=fe.x+fe.width/2,{x:$e,y:F}}function Ye(fe,he){var se={t:"b",b:"t",l:"r",r:"l"};return fe.map(function(Me,$e){return $e===he?se[Me]||"c":Me}).join("")}function ut(fe,he,se,Me,$e,F,le){var xe=S.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:$e[Me]||{}}),we=(0,ae.Z)(xe,2),Ie=we[0],Oe=we[1],Qe=S.useRef(0),it=S.useMemo(function(){return he?G(he):[]},[he]),Je=S.useRef({}),Ke=function(){Je.current={}};fe||Ke();var yt=(0,Q.Z)(function(){if(he&&se&&fe){let yn=function(Cn,Jn){var ei=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Fn,Wn=X.x+Cn,$n=X.y+Jn,Jr=Wn+mr,jn=$n+$t,Li=Math.max(Wn,ei.left),Oi=Math.max($n,ei.top),Pi=Math.min(Jr,ei.right),Ai=Math.min(jn,ei.bottom);return Math.max(0,(Pi-Li)*(Ai-Oi))},Xr=function(){Wt=X.y+lr,Jt=Wt+$t,yr=X.x+nr,Sn=yr+mr};var Ze,Ve,nt=he,mt=nt.ownerDocument,gt=ne(nt),x=gt.getComputedStyle(nt),T=x.width,et=x.height,W=x.position,Ee=nt.style.left,Bt=nt.style.top,Be=nt.style.right,ze=nt.style.bottom,qe=nt.style.overflow,ee=(0,$.Z)((0,$.Z)({},$e[Me]),F),be=mt.createElement("div");(Ze=nt.parentElement)===null||Ze===void 0||Ze.appendChild(be),be.style.left="".concat(nt.offsetLeft,"px"),be.style.top="".concat(nt.offsetTop,"px"),be.style.position=W,be.style.height="".concat(nt.offsetHeight,"px"),be.style.width="".concat(nt.offsetWidth,"px"),nt.style.left="0",nt.style.top="0",nt.style.right="auto",nt.style.bottom="auto",nt.style.overflow="hidden";var me;if(Array.isArray(se))me={x:se[0],y:se[1],width:0,height:0};else{var Ge=se.getBoundingClientRect();me={x:Ge.x,y:Ge.y,width:Ge.width,height:Ge.height}}var X=nt.getBoundingClientRect(),Ct=mt.documentElement,Ce=Ct.clientWidth,Ot=Ct.clientHeight,zt=Ct.scrollWidth,cr=Ct.scrollHeight,sr=Ct.scrollTop,Kt=Ct.scrollLeft,$t=X.height,mr=X.width,Vr=me.height,Ur=me.width,jr={left:0,top:0,right:Ce,bottom:Ot},Vt={left:-Kt,top:-sr,right:zt-Kt,bottom:cr-sr},or=ee.htmlRegion,Ir="visible",Kr="visibleFirst";or!=="scroll"&&or!==Kr&&(or=Ir);var Lr=or===Kr,ln=N(Vt,it),Pr=N(jr,it),Fn=or===Ir?Pr:ln,un=Lr?Pr:Fn;nt.style.left="auto",nt.style.top="auto",nt.style.right="0",nt.style.bottom="0";var zr=nt.getBoundingClientRect();nt.style.left=Ee,nt.style.top=Bt,nt.style.right=Be,nt.style.bottom=ze,nt.style.overflow=qe,(Ve=nt.parentElement)===null||Ve===void 0||Ve.removeChild(be);var qt=v(Math.round(mr/parseFloat(T)*1e3)/1e3),Xt=v(Math.round($t/parseFloat(et)*1e3)/1e3);if(qt===0||Xt===0||(0,ie.Sh)(se)&&!(0,j.Z)(se))return;var wr=ee.offset,Er=ee.targetOffset,_r=Le(X,wr),On=(0,ae.Z)(_r,2),Gr=On[0],hr=On[1],st=Le(me,Er),at=(0,ae.Z)(st,2),bt=at[0],Dt=at[1];me.x-=bt,me.y-=Dt;var vt=ee.points||[],Ut=(0,ae.Z)(vt,2),wt=Ut[0],Zt=Ut[1],tr=Fe(Zt),Qt=Fe(wt),Tr=Ue(me,tr),gr=Ue(X,Qt),Fr=(0,$.Z)({},ee),nr=Tr.x-gr.x+Gr,lr=Tr.y-gr.y+hr,Zr=yn(nr,lr),qr=yn(nr,lr,Pr),rn=Ue(me,["t","l"]),Yr=Ue(X,["t","l"]),kr=Ue(me,["b","r"]),Mr=Ue(X,["b","r"]),Or=ee.overflow||{},Wr=Or.adjustX,pn=Or.adjustY,Qr=Or.shiftX,ir=Or.shiftY,Xe=function(Jn){return typeof Jn=="boolean"?Jn:Jn>=0},Wt,Jt,yr,Sn;Xr();var vn=Xe(pn),In=Qt[0]===tr[0];if(vn&&Qt[0]==="t"&&(Jt>un.bottom||Je.current.bt)){var Sr=lr;In?Sr-=$t-Vr:Sr=rn.y-Mr.y-hr;var wn=yn(nr,Sr),Rn=yn(nr,Sr,Pr);wn>Zr||wn===Zr&&(!Lr||Rn>=qr)?(Je.current.bt=!0,lr=Sr,hr=-hr,Fr.points=[Ye(Qt,0),Ye(tr,0)]):Je.current.bt=!1}if(vn&&Qt[0]==="b"&&(Wt<un.top||Je.current.tb)){var hn=lr;In?hn+=$t-Vr:hn=kr.y-Yr.y-hr;var ai=yn(nr,hn),oi=yn(nr,hn,Pr);ai>Zr||ai===Zr&&(!Lr||oi>=qr)?(Je.current.tb=!0,lr=hn,hr=-hr,Fr.points=[Ye(Qt,0),Ye(tr,0)]):Je.current.tb=!1}var qn=Xe(Wr),Vn=Qt[1]===tr[1];if(qn&&Qt[1]==="l"&&(Sn>un.right||Je.current.rl)){var rr=nr;Vn?rr-=mr-Ur:rr=rn.x-Mr.x-Gr;var Tn=yn(rr,lr),nn=yn(rr,lr,Pr);Tn>Zr||Tn===Zr&&(!Lr||nn>=qr)?(Je.current.rl=!0,nr=rr,Gr=-Gr,Fr.points=[Ye(Qt,1),Ye(tr,1)]):Je.current.rl=!1}if(qn&&Qt[1]==="r"&&(yr<un.left||Je.current.lr)){var Pn=nr;Vn?Pn+=mr-Ur:Pn=kr.x-Yr.x-Gr;var li=yn(Pn,lr),Mn=yn(Pn,lr,Pr);li>Zr||li===Zr&&(!Lr||Mn>=qr)?(Je.current.lr=!0,nr=Pn,Gr=-Gr,Fr.points=[Ye(Qt,1),Ye(tr,1)]):Je.current.lr=!1}Xr();var _n=Qr===!0?0:Qr;typeof _n=="number"&&(yr<Pr.left&&(nr-=yr-Pr.left-Gr,me.x+Ur<Pr.left+_n&&(nr+=me.x-Pr.left+Ur-_n)),Sn>Pr.right&&(nr-=Sn-Pr.right-Gr,me.x>Pr.right-_n&&(nr+=me.x-Pr.right+_n)));var Un=ir===!0?0:ir;typeof Un=="number"&&(Wt<Pr.top&&(lr-=Wt-Pr.top-hr,me.y+Vr<Pr.top+Un&&(lr+=me.y-Pr.top+Vr-Un)),Jt>Pr.bottom&&(lr-=Jt-Pr.bottom-hr,me.y>Pr.bottom-Un&&(lr+=me.y-Pr.bottom+Un)));var sn=X.x+nr,ni=sn+mr,pr=X.y+lr,ii=pr+$t,ri=me.x,Zn=ri+Ur,Hr=me.y,ui=Hr+Vr,Ti=Math.max(sn,ri),vi=Math.min(ni,Zn),Ar=(Ti+vi)/2,_i=Ar-sn,Ri=Math.max(pr,Hr),Gt=Math.min(ii,ui),Hn=(Ri+Gt)/2,ci=Hn-pr;le==null||le(he,Fr);var hi=zr.right-X.x-(nr+X.width),An=zr.bottom-X.y-(lr+X.height);Oe({ready:!0,offsetX:nr/qt,offsetY:lr/Xt,offsetR:hi/qt,offsetB:An/Xt,arrowX:_i/qt,arrowY:ci/Xt,scaleX:qt,scaleY:Xt,align:Fr})}}),De=function(){Qe.current+=1;var Ve=Qe.current;Promise.resolve().then(function(){Qe.current===Ve&&yt()})},Pe=function(){Oe(function(Ve){return(0,$.Z)((0,$.Z)({},Ve),{},{ready:!1})})};return(0,E.Z)(Pe,[Me]),(0,E.Z)(function(){fe||Pe()},[fe]),[Ie.ready,Ie.offsetX,Ie.offsetY,Ie.offsetR,Ie.offsetB,Ie.arrowX,Ie.arrowY,Ie.scaleX,Ie.scaleY,Ie.align,De]}var ot=w(80702);function lt(fe,he,se,Me,$e){(0,E.Z)(function(){if(fe&&he&&se){let Qe=function(){Me(),$e()};var F=he,le=se,xe=G(F),we=G(le),Ie=ne(le),Oe=new Set([Ie].concat((0,ot.Z)(xe),(0,ot.Z)(we)));return Oe.forEach(function(it){it.addEventListener("scroll",Qe,{passive:!0})}),Ie.addEventListener("resize",Qe,{passive:!0}),Me(),function(){Oe.forEach(function(it){it.removeEventListener("scroll",Qe),Ie.removeEventListener("resize",Qe)})}}},[fe,he,se])}var St=w(48736),Lt=w(16089);function _t(fe,he,se,Me,$e,F,le,xe){var we=S.useRef(fe),Ie=S.useRef(!1);we.current!==fe&&(Ie.current=!0,we.current=fe),S.useEffect(function(){var Oe=(0,Lt.Z)(function(){Ie.current=!1});return function(){Lt.Z.cancel(Oe)}},[fe]),S.useEffect(function(){if(he&&Me&&(!$e||F)){var Oe=function(){var W=!1,Ee=function(ze){var qe=ze.target;W=le(qe)},Bt=function(ze){var qe=ze.target;!Ie.current&&we.current&&!W&&!le(qe)&&xe(!1)};return[Ee,Bt]},Qe=Oe(),it=(0,ae.Z)(Qe,2),Je=it[0],Ke=it[1],yt=Oe(),De=(0,ae.Z)(yt,2),Pe=De[0],Ze=De[1],Ve=ne(Me);Ve.addEventListener("mousedown",Je,!0),Ve.addEventListener("click",Ke,!0),Ve.addEventListener("contextmenu",Ke,!0);var nt=(0,o.A)(se);if(nt&&(nt.addEventListener("mousedown",Pe,!0),nt.addEventListener("click",Ze,!0),nt.addEventListener("contextmenu",Ze,!0)),0)var mt,gt,x,T;return function(){Ve.removeEventListener("mousedown",Je,!0),Ve.removeEventListener("click",Ke,!0),Ve.removeEventListener("contextmenu",Ke,!0),nt&&(nt.removeEventListener("mousedown",Pe,!0),nt.removeEventListener("click",Ze,!0),nt.removeEventListener("contextmenu",Ze,!0))}}},[he,se,Me,$e,F])}var At=["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 Pt(){var fe=arguments.length>0&&arguments[0]!==void 0?arguments[0]:_e.Z,he=S.forwardRef(function(se,Me){var $e=se.prefixCls,F=$e===void 0?"rc-trigger-popup":$e,le=se.children,xe=se.action,we=xe===void 0?"hover":xe,Ie=se.showAction,Oe=se.hideAction,Qe=se.popupVisible,it=se.defaultPopupVisible,Je=se.onPopupVisibleChange,Ke=se.afterPopupVisibleChange,yt=se.mouseEnterDelay,De=se.mouseLeaveDelay,Pe=De===void 0?.1:De,Ze=se.focusDelay,Ve=se.blurDelay,nt=se.mask,mt=se.maskClosable,gt=mt===void 0?!0:mt,x=se.getPopupContainer,T=se.forceRender,et=se.autoDestroy,W=se.destroyPopupOnHide,Ee=se.popup,Bt=se.popupClassName,Be=se.popupStyle,ze=se.popupPlacement,qe=se.builtinPlacements,ee=qe===void 0?{}:qe,be=se.popupAlign,me=se.zIndex,Ge=se.stretch,X=se.getPopupClassNameFromAlign,Ct=se.fresh,Ce=se.alignPoint,Ot=se.onPopupClick,zt=se.onPopupAlign,cr=se.arrow,sr=se.popupMotion,Kt=se.maskMotion,$t=se.popupTransitionName,mr=se.popupAnimation,Vr=se.maskTransitionName,Ur=se.maskAnimation,jr=se.className,Vt=se.getTriggerDOMNode,or=(0,Se.Z)(se,At),Ir=et||W||!1,Kr=S.useState(!1),Lr=(0,ae.Z)(Kr,2),ln=Lr[0],Pr=Lr[1];(0,E.Z)(function(){Pr((0,b.Z)())},[]);var Fn=S.useRef({}),un=S.useContext(pe),zr=S.useMemo(function(){return{registerSubPopup:function(fr,bn){Fn.current[fr]=bn,un==null||un.registerSubPopup(fr,bn)}}},[un]),qt=(0,U.Z)(),Xt=S.useState(null),wr=(0,ae.Z)(Xt,2),Er=wr[0],_r=wr[1],On=(0,Q.Z)(function(ar){(0,ie.Sh)(ar)&&Er!==ar&&_r(ar),un==null||un.registerSubPopup(qt,ar)}),Gr=S.useState(null),hr=(0,ae.Z)(Gr,2),st=hr[0],at=hr[1],bt=S.useRef(null),Dt=(0,Q.Z)(function(ar){(0,ie.Sh)(ar)&&st!==ar&&(at(ar),bt.current=ar)}),vt=S.Children.only(le),Ut=(vt==null?void 0:vt.props)||{},wt={},Zt=(0,Q.Z)(function(ar){var fr,bn,Ln=st;return(Ln==null?void 0:Ln.contains(ar))||((fr=(0,o.A)(Ln))===null||fr===void 0?void 0:fr.host)===ar||ar===Ln||(Er==null?void 0:Er.contains(ar))||((bn=(0,o.A)(Er))===null||bn===void 0?void 0:bn.host)===ar||ar===Er||Object.values(Fn.current).some(function(an){return(an==null?void 0:an.contains(ar))||ar===an})}),tr=k(F,sr,mr,$t),Qt=k(F,Kt,Ur,Vr),Tr=S.useState(it||!1),gr=(0,ae.Z)(Tr,2),Fr=gr[0],nr=gr[1],lr=Qe!=null?Qe:Fr,Zr=(0,Q.Z)(function(ar){Qe===void 0&&nr(ar)});(0,E.Z)(function(){nr(Qe||!1)},[Qe]);var qr=S.useRef(lr);qr.current=lr;var rn=S.useRef([]);rn.current=[];var Yr=(0,Q.Z)(function(ar){var fr;Zr(ar),((fr=rn.current[rn.current.length-1])!==null&&fr!==void 0?fr:lr)!==ar&&(rn.current.push(ar),Je==null||Je(ar))}),kr=S.useRef(),Mr=function(){clearTimeout(kr.current)},Or=function(fr){var bn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;Mr(),bn===0?Yr(fr):kr.current=setTimeout(function(){Yr(fr)},bn*1e3)};S.useEffect(function(){return Mr},[]);var Wr=S.useState(!1),pn=(0,ae.Z)(Wr,2),Qr=pn[0],ir=pn[1];(0,E.Z)(function(ar){(!ar||lr)&&ir(!0)},[lr]);var Xe=S.useState(null),Wt=(0,ae.Z)(Xe,2),Jt=Wt[0],yr=Wt[1],Sn=S.useState([0,0]),vn=(0,ae.Z)(Sn,2),In=vn[0],Sr=vn[1],wn=function(fr){Sr([fr.clientX,fr.clientY])},Rn=ut(lr,Er,Ce?In:st,ze,ee,be,zt),hn=(0,ae.Z)(Rn,11),ai=hn[0],oi=hn[1],qn=hn[2],Vn=hn[3],rr=hn[4],Tn=hn[5],nn=hn[6],Pn=hn[7],li=hn[8],Mn=hn[9],_n=hn[10],Un=Ae(ln,we,Ie,Oe),sn=(0,ae.Z)(Un,2),ni=sn[0],pr=sn[1],ii=ni.has("click"),ri=pr.has("click")||pr.has("contextMenu"),Zn=(0,Q.Z)(function(){Qr||_n()}),Hr=function(){qr.current&&Ce&&ri&&Or(!1)};lt(lr,st,Er,Zn,Hr),(0,E.Z)(function(){Zn()},[In,ze]),(0,E.Z)(function(){lr&&!(ee!=null&&ee[ze])&&Zn()},[JSON.stringify(be)]);var ui=S.useMemo(function(){var ar=K(ee,F,Mn,Ce);return m()(ar,X==null?void 0:X(Mn))},[Mn,X,ee,F,Ce]);S.useImperativeHandle(Me,function(){return{nativeElement:bt.current,forceAlign:Zn}});var Ti=S.useState(0),vi=(0,ae.Z)(Ti,2),Ar=vi[0],_i=vi[1],Ri=S.useState(0),Gt=(0,ae.Z)(Ri,2),Hn=Gt[0],ci=Gt[1],hi=function(){if(Ge&&st){var fr=st.getBoundingClientRect();_i(fr.width),ci(fr.height)}},An=function(){hi(),Zn()},yn=function(fr){ir(!1),_n(),Ke==null||Ke(fr)},Xr=function(){return new Promise(function(fr){hi(),yr(function(){return fr})})};(0,E.Z)(function(){Jt&&(_n(),Jt(),yr(null))},[Jt]);function Cn(ar,fr,bn,Ln){wt[ar]=function(an){var di;Ln==null||Ln(an),Or(fr,bn);for(var Ci=arguments.length,ji=new Array(Ci>1?Ci-1:0),yi=1;yi<Ci;yi++)ji[yi-1]=arguments[yi];(di=Ut[ar])===null||di===void 0||di.call.apply(di,[Ut,an].concat(ji))}}(ii||ri)&&(wt.onClick=function(ar){var fr;qr.current&&ri?Or(!1):!qr.current&&ii&&(wn(ar),Or(!0));for(var bn=arguments.length,Ln=new Array(bn>1?bn-1:0),an=1;an<bn;an++)Ln[an-1]=arguments[an];(fr=Ut.onClick)===null||fr===void 0||fr.call.apply(fr,[Ut,ar].concat(Ln))}),_t(lr,ri,st,Er,nt,gt,Zt,Or);var Jn=ni.has("hover"),ei=pr.has("hover"),Wn,$n;Jn&&(Cn("onMouseEnter",!0,yt,function(ar){wn(ar)}),Cn("onPointerEnter",!0,yt,function(ar){wn(ar)}),Wn=function(fr){(lr||Qr)&&Er!==null&&Er!==void 0&&Er.contains(fr.target)&&Or(!0,yt)},Ce&&(wt.onMouseMove=function(ar){var fr;(fr=Ut.onMouseMove)===null||fr===void 0||fr.call(Ut,ar)})),ei&&(Cn("onMouseLeave",!1,Pe),Cn("onPointerLeave",!1,Pe),$n=function(){Or(!1,Pe)}),ni.has("focus")&&Cn("onFocus",!0,Ze),pr.has("focus")&&Cn("onBlur",!1,Ve),ni.has("contextMenu")&&(wt.onContextMenu=function(ar){var fr;qr.current&&pr.has("contextMenu")?Or(!1):(wn(ar),Or(!0)),ar.preventDefault();for(var bn=arguments.length,Ln=new Array(bn>1?bn-1:0),an=1;an<bn;an++)Ln[an-1]=arguments[an];(fr=Ut.onContextMenu)===null||fr===void 0||fr.call.apply(fr,[Ut,ar].concat(Ln))}),jr&&(wt.className=m()(Ut.className,jr));var Jr=(0,$.Z)((0,$.Z)({},Ut),wt),jn={},Li=["onContextMenu","onClick","onMouseDown","onTouchStart","onMouseEnter","onMouseLeave","onFocus","onBlur"];Li.forEach(function(ar){or[ar]&&(jn[ar]=function(){for(var fr,bn=arguments.length,Ln=new Array(bn),an=0;an<bn;an++)Ln[an]=arguments[an];(fr=Jr[ar])===null||fr===void 0||fr.call.apply(fr,[Jr].concat(Ln)),or[ar].apply(or,Ln)})});var Oi=S.cloneElement(vt,(0,$.Z)((0,$.Z)({},Jr),jn)),Pi={x:Tn,y:nn},Ai=cr?(0,$.Z)({},cr!==!0?cr:{}):null;return S.createElement(S.Fragment,null,S.createElement(de.Z,{disabled:!lr,ref:Dt,onResize:An},S.createElement(J,{getTriggerDOMNode:Vt},Oi)),S.createElement(pe.Provider,{value:zr},S.createElement(Y,{portal:fe,ref:On,prefixCls:F,popup:Ee,className:m()(Bt,ui),style:Be,target:st,onMouseEnter:Wn,onMouseLeave:$n,onPointerEnter:Wn,zIndex:me,open:lr,keepDom:Qr,fresh:Ct,onClick:Ot,mask:nt,motion:tr,maskMotion:Qt,onVisibleChanged:yn,onPrepare:Xr,forceRender:T,autoDestroy:Ir,getPopupContainer:x,align:Mn,arrow:Ai,arrowPos:Pi,ready:ai,offsetX:oi,offsetY:qn,offsetR:Vn,offsetB:rr,onAlign:Zn,stretch:Ge,targetWidth:Ar/Pn,targetHeight:Hn/li})))});return he}var kt=Pt(_e.Z)},50304:function(){"use strict"},8797:function(Nt,rt,w){"use strict";var $=w(59301),ae=w(93314),Se=w(3113),_e=Object.defineProperty,O=Object.defineProperties,m=Object.getOwnPropertyDescriptors,de=Object.getOwnPropertySymbols,ie=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,Q=(S,D,V)=>D in S?_e(S,D,{enumerable:!0,configurable:!0,writable:!0,value:V}):S[D]=V,U=(S,D)=>{for(var V in D||(D={}))ie.call(D,V)&&Q(S,V,D[V]);if(de)for(var V of de(D))o.call(D,V)&&Q(S,V,D[V]);return S},E=(S,D)=>O(S,m(D));const b=({img:S,buttonProps:D={},styles:V={},customText:q,ButtonText:B,ButtonClick:R,Buttonclass:Z,ButtonTwo:ue,imgStyles:M,loading:Y=!1,className:oe=""})=>$.createElement("section",{className:`tc animated fadeIn ${oe}`,style:U({color:"#999",margin:"100px auto",visibility:Y?"hidden":"visible"},V)},$.createElement("img",{src:S||ae,style:E(U({},M),{pointerEvents:"none",userSelect:"none"})}),$.createElement("p",{className:"mt20 font14"},q||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),B&&$.createElement(Se.ZP,U({className:Z,onClick:R},D),B),ue&&ue);rt.Z=b},23210:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return Z}});var $=w(59301),ae={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Se=w(3113),_e=w(70557),O=w(23954),m=w(6848),de=w(955),ie=w(94941),o=w(8797),Q=w(3294),U=w(19381),E=w(59301),b=Object.defineProperty,S=Object.getOwnPropertySymbols,D=Object.prototype.hasOwnProperty,V=Object.prototype.propertyIsEnumerable,q=(ue,M,Y)=>M in ue?b(ue,M,{enumerable:!0,configurable:!0,writable:!0,value:Y}):ue[M]=Y,B=(ue,M)=>{for(var Y in M||(M={}))D.call(M,Y)&&q(ue,Y,M[Y]);if(S)for(var Y of S(M))V.call(M,Y)&&q(ue,Y,M[Y]);return ue},R=(ue,M,Y)=>new Promise((oe,J)=>{var ye=Ae=>{try{ve(Y.next(Ae))}catch(j){J(j)}},pe=Ae=>{try{ve(Y.throw(Ae))}catch(j){J(j)}},ve=Ae=>Ae.done?oe(Ae.value):Promise.resolve(Ae.value).then(ye,pe);ve((Y=Y.apply(ue,M)).next())}),Z=({editOffice:ue="view",data:M,theme:Y,type:oe,filename:J,monacoEditor:ye,className:pe,style:ve,close:Ae,onClose:j,hasMask:P,disabledDownload:K,onImgDimensions:k,showNodata:ne,recordInfo:G})=>{const[v,y]=(0,$.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[N,te]=(0,$.useState)(""),[Le,Fe]=(0,$.useState)(),Ue=window.ENV==="build"?"/react/build":"",Ye=location.host.startsWith("localhost")?Q.Z.PROXY_SERVER:Q.Z.API_SERVER,ot=10*(1024*1024),lt=(0,$.useRef)();M!=null&&M.startsWith("/api")&&oe!=="txt"&&(M=Q.Z.API_SERVER+M);const St=Pt=>Pt.substring(Pt.lastIndexOf("/")+1).split(".").pop();J&&ye&&(ye.filename=J),(0,$.useEffect)(()=>{var Pt,kt;const fe=(kt=(Pt=document.cookie)==null?void 0:Pt.replace(/\s/g,""))==null?void 0:kt.split(";");fe==null||fe.map(he=>{let se=he.split("=");se[0]==="_educoder_session"&&te(se[1])})},[]),(0,$.useEffect)(()=>{oe==="office"&&(M.indexOf("bigfilescdn.")>-1||M.indexOf("bigfiles1")>-1?Fe({url:M,fileType:St(M),model:M.indexOf("model=edit")?"edit":"view"}):Lt())},[oe,M]);const Lt=()=>R(void 0,null,function*(){console.log("data:",M);let Pt=M;M.startsWith("http")||(Pt=location.origin+Pt);let kt=new URL(Pt).pathname.split("/").pop();const fe=yield(0,ie.gJ)({attachment_id:kt});fe.url=Ye+fe.url,Fe(fe)}),_t=()=>{if(M.startsWith("http")||M.startsWith("blob:")){At();return}(0,de.Sv)(J||"educoder",M,J)},At=()=>{G&&(0,U.fc)({id:G==null?void 0:G.id,watch_type:1,course_id:G==null?void 0:G.course_id}),(0,de.Nd)(J||"educoder",decodeURIComponent(M))};return E.createElement("div",{style:B({},ve||{}),className:`${P&&ae.bgBlack} ${oe?ae.wrp:"hide"}`},Ae&&E.createElement("div",{className:ae.close,ref:lt},!!k&&E.createElement(m.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>lt.current},E.createElement("span",{onClick:()=>{j(),k()}},E.createElement("i",{className:"icon-yulanpizhu"}))),!K&&E.createElement(m.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>lt.current},E.createElement("span",{onClick:At},E.createElement("i",{className:"icon-quxiaozhiding"}))),E.createElement(m.Z,{title:"\u5173\u95ED",getPopupContainer:()=>lt.current},E.createElement("span",{className:"",onClick:j},E.createElement("i",{className:"icon-guanbi1"})))),E.createElement("div",{className:`${ae[pe]} ${pe} ${ae.monaco} ${oe==="txt"?"show":"hide"}`},oe==="txt"&&E.createElement(E.Fragment,null,E.createElement(O.ZP,B({},ye)))),oe==="audio"&&E.createElement("audio",{src:`${(M==null?void 0:M.indexOf("http://"))>-1||(M==null?void 0:M.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${M}`,autoPlay:!0}),oe==="video"&&E.createElement(E.Fragment,null,(M==null?void 0:M.indexOf("http"))>-1?E.createElement("video",{controls:!0,src:`${M}`,autoPlay:!0}):E.createElement("video",{controls:!0,src:`data:video/mp4;base64,${M}`,autoPlay:!0})),oe==="office"&&Le&&E.createElement("iframe",{src:`${Ue}/office.html?key=${Le.key}&url=${btoa(Le.url)}&callbackUrl=${Ye+(Le.callbackUrl||"")}&fileType=${Le.fileType}&title=${Le.title||""}&model=${ue}&officeServer=${Q.Z.ONLYOFFICE}&disabledDownload=${!!K}`}),oe==="html"&&E.createElement("iframe",{src:M+"&disposition=inline"}),oe==="pdf"&&E.createElement("iframe",{src:`${Ue}/js/pdfview/index.html?filename=${J||"educoder.pdf"}&url=${encodeURIComponent(M)}&disabledDownload=${!!K}`}),oe==="image"&&E.createElement("img",{src:`${(M==null?void 0:M.indexOf("http://"))>-1||(M==null?void 0:M.indexOf("https://"))>-1?"":"data:image/png;base64,"}${M}`}),(oe==="other"||oe==="download")&&E.createElement(E.Fragment,null,ne?E.createElement(o.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:E.createElement(Se.ZP,{icon:E.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:_t,disabled:K},"\u4E0B\u8F7D")}):E.createElement(Se.ZP,{type:"primary",size:"middle",onClick:_t,disabled:K},E.createElement(_e.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},85149:function(Nt,rt,w){"use strict";w.d(rt,{z:function(){return oe},Z:function(){return J}});var $=w(59301),ae=w(50304),Se=w(24768),_e=w(64018),O=w(65157),m=w(3294),de=w(955),ie=w(15342),o=w(1012),Q=w(23210),U=w(59301),b=({html:ye})=>{const pe=(0,$.useRef)(null),ve=(0,$.useRef)(null),Ae=`.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,$.useEffect)(()=>{const j=pe.current.attachShadow({mode:"open"});ve.current=document.createElement("div"),ve.current.className="markdown-body",ve.current.innerHTML=ye,j.appendChild(ve.current);const P=document.createElement("style");return P.textContent=Ae,j.appendChild(P),()=>{j.innerHTML=""}},[]),(0,$.useEffect)(()=>{ve.current&&(ve.current.innerHTML=ye)},[ye]),U.createElement("div",{ref:pe})},S=Object.defineProperty,D=Object.getOwnPropertySymbols,V=Object.prototype.hasOwnProperty,q=Object.prototype.propertyIsEnumerable,B=(ye,pe,ve)=>pe in ye?S(ye,pe,{enumerable:!0,configurable:!0,writable:!0,value:ve}):ye[pe]=ve,R=(ye,pe)=>{for(var ve in pe||(pe={}))V.call(pe,ve)&&B(ye,ve,pe[ve]);if(D)for(var ve of D(pe))q.call(pe,ve)&&B(ye,ve,pe[ve]);return ye};const Z="@\u2581\u2581@",ue="@\u2581@",M=/<pre[^>]*>/g;function Y(ye){let pe=document.createElement("div");return pe.innerHTML=ye,pe.childNodes.length===0?"":pe.childNodes[0].nodeValue}const oe=(ye,pe)=>{ye=ye||"";const ve=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ae=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,j=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,P=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return pe?ye.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(ve,(K,k,ne,G,v,y,N)=>{const te=k||G||y,Le=ne||v||N||"?";return m.Z.API_SERVER+"/api/attachments/"+te+Le+"&t="+(0,de.Jn)(te,Date.now())+(K.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(ye=ye.replace(P,(K,k,ne,G,v,y,N)=>{const te=k||G||y,Le=ne||v||N||"?";return m.Z.API_SERVER+"/attachments/download/"+te+Le+"&t="+(0,de.Jn)(te,Date.now())+(K.indexOf(")")>-1?")":"&")}).replace(ve,(K,k,ne,G,v,y,N)=>{const te=k||G||y,Le=ne||v||N||"?";return m.Z.API_SERVER+"/api/attachments/"+te+Le+"&t="+(0,de.Jn)(te,Date.now())+(K.indexOf(")")>-1?")":"&")}).replace(Ae,(K,k,ne,G,v)=>{const y=k||G,N=ne||v||"";return'"'+m.Z.API_SERVER+"/api/attachments/"+y+N+y+N+"&t="+(0,de.Jn)(y,Date.now())}).replace(j,(K,k,ne,G,v)=>{const y=k||G,N=ne||v||"";return"("+m.Z.API_SERVER+"/files/uploads/"+y+N+y+N+"&t="+(0,de.Jn)(y,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,`
|
|
`),ye)};var J=({value:ye="",className:pe,showTextOnly:ve,showLines:Ae,style:j={},stylesPrev:P={},highlightKeywords:K,showProgramFill:k,isProgramFill:ne,disabledFill:G=!1,programFillValue:v,onFillChange:y=Le=>{},onFillBlur:N=()=>{},onFillFocus:te=()=>{}})=>{let Le=String(ye);const[Fe,Ue]=(0,$.useState)(""),[Ye,ut]=(0,$.useState)("office"),[ot,lt]=(0,$.useState)([]),St=(0,$.useRef)("a"+(0,o.Z)()),Lt={},_t=(we,Ie,Oe)=>{const Qe=document.createElement(we===ue?"input":"textarea");Qe.style.width="100%",Qe.style.height=we===ue?"40px":"151px",Qe.rows=5,Qe.spellcheck=!1,Qe.name="edu-program-fill",Qe.placeholder="\u8BF7\u8F93\u5165",Qe.dataset.id=Ie;const it=Object.keys(Lt).length;return Lt[it]=Qe,`<span class="edu-program-fill-wrap ${we===ue?"":"show"}" style="width:${we===ue?"400px":"100%"}" title=${Oe||""}><span>${Qe.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function At(we){return we=we.replace(/!\[.*?\]\(.*?\)/g,""),we=we.replace(/\[.*?\]\(.*?\)/g,""),we=we.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),we=we.replace(/<embed.*?>/g,""),we=we.replace(/<img.*?>/g,""),we=we.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),we=we.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),we=we.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),we=we.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),we}const Pt=we=>we.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Ie,Oe){let Qe=Oe.replace(/(\n|\r)/g,"").split("}"),it=[];return Qe.map(Je=>{Je!=""&&it.push(`.${St.current} ${Je}`)}),`<style>${it.join("}")}</style>`}),kt=(0,$.useMemo)(()=>{try{const Qe=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,it=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Je=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Ke=/\(\/attachments\/download\//g;Le=Le.replace(Ke,"("+m.Z.API_SERVER+"/attachments/download/").replace(Qe,"("+m.Z.API_SERVER+"/api/attachments/").replace(it,'"'+m.Z.API_SERVER+"/api/attachments/").replace(Je,'"'+m.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(Qe){}if(k){let Qe=-1;return Le=Le.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(it,Je,Ke){var yt;return++Qe,_t(it,Qe,(yt=v==null?void 0:v[Qe])==null?void 0:yt.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${Pt(Le||"")}</pre>`}let we=Pt(Le);we=(0,Se.ZP)(we);const Ie=(0,Se.ez)();Le.match(/\[TOC\]/)&&(we=we.replace("<p>[TOC]</p>",(0,Se.Qv)()),(0,Se.Iy)()),we=we.replace(/(__special_katext_id_\d+__)/g,(Qe,it)=>{const{type:Je,expression:Ke}=Ie[it];return(0,ie.renderToString)(Y(Ke)||"",{displayMode:Je==="block",throwOnError:!1,output:"html"})}),we=we.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Se.AL)();const Oe=document.createElement("div");if(Oe.innerHTML=we,ve)return Oe.innerText;if(K){const Qe=K.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Me(Oe,Qe),Oe.innerHTML}return setTimeout(()=>le(),500),Oe.innerHTML},[Le,K]);(0,$.useEffect)(()=>{$e.current&&$e.current.querySelectorAll(["input","textarea"]).forEach(Ie=>{Ie.oninput=fe,Ie.onblur=he,Ie.onfocus=se})},[ot]),(0,$.useEffect)(()=>{var we,Ie,Oe,Qe,it;if(v!=null&&v.length)try{const Je=$e.current.querySelectorAll(".edu-program-fill-score"),Ke=$e.current.querySelectorAll('[name="edu-program-fill"]');for(const[yt,De]of Ke.entries())De.value=((we=v==null?void 0:v[yt])==null?void 0:we.value)||"",((Ie=v==null?void 0:v[yt])==null?void 0:Ie.type)==="warning"?De.className="program-fill-warning":((Oe=v==null?void 0:v[yt])==null?void 0:Oe.type)==="success"?De.className="program-fill-success":De.className="";for(const[yt,De]of Je.entries())De.innerHTML=(Qe=v==null?void 0:v[yt])!=null&&Qe.score?`${(it=v==null?void 0:v[yt])==null?void 0:it.score}\u5206`:"";lt(v)}catch(Je){console.log(Je,"error")}},[v]);const fe=we=>{ot[we.target.dataset.id]=ot[we.target.dataset.id]||{},ot[we.target.dataset.id].value=we.target.value,lt([...ot]),y(ot,we.target.dataset.id)},he=we=>{ot[we.target.dataset.id]=ot[we.target.dataset.id]||{},ot[we.target.dataset.id].value=we.target.value,lt([...ot]),N(ot,we.target.dataset.id)},se=we=>{ot[we.target.dataset.id]=ot[we.target.dataset.id]||{},ot[we.target.dataset.id].value=we.target.value,lt([...ot]),te(ot,we.target.dataset.id)};function Me(we,Ie){return we.childNodes.forEach(Oe=>{var Qe;if(Oe.childNodes.length>0)Me(Oe,Ie);else if(Oe.nodeName!=="IMG")if(Oe.innerHTML)Oe.innerHTML=(Qe=Oe.innerHTML)==null?void 0:Qe.replace(new RegExp(Ie,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const it=document.createElement("span");it.innerHTML=Oe.textContent.replace(new RegExp(Ie,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Oe.replaceWith(it)}})}const $e=(0,$.useRef)();Se.jb.WebkitLineClamp=Ae,Ae&&(j=R(R({},j),Se.jb));function F(we){let Ie=we.target;if(Ie.tagName.toUpperCase()==="A"){let Oe=Ie.getAttribute("href");if(Oe.indexOf("office")>-1)we.preventDefault(),Ue(Oe),ut("office");else if(Oe.indexOf("application/pdf")>-1)we.preventDefault(),Ue(Oe),ut("pdf");else if(Oe.indexOf("text/html")>-1)we.preventDefault(),Ue(Oe),ut("html");else if(Oe.startsWith("#")){we.preventDefault();let Qe=document.getElementById(Oe.replace("#",""));Qe&&Qe.scrollIntoView(!0)}}}const le=()=>{var we;const Ie=(we=$e.current)==null?void 0:we.querySelectorAll("video");Ie==null||Ie.forEach(Oe=>{if(Oe.oncontextmenu=()=>!1,Oe.src.indexOf(".m3u8")>-1&&!Oe.canPlayType("application/vnd.apple.mpegurl")){if(O.ZP.isSupported()){var Qe=new O.ZP;Qe.loadSource(Oe.src),Qe.attachMedia(Oe)}}})};(0,$.useEffect)(()=>{if($e.current&&kt&&kt.match(M)&&window.PR.prettyPrint(),$e.current)return $e.current.addEventListener("click",F),()=>{var we;(we=$e.current)==null||we.removeEventListener("click",F),(0,Se.AL)(),(0,Se.Iy)()}},[kt,$e.current,F]),(0,$.useEffect)(()=>{var we;const Ie=Oe=>{Oe.preventDefault(),Oe.clipboardData.setData("text",window.getSelection().toString())};return(we=$e.current)==null||we.addEventListener("copy",Ie),()=>{var Oe;(Oe=$e.current)==null||Oe.removeEventListener("copy",Ie)}},[$e.current]);const xe=we=>/<style[\s\S]*?>/i.test(we||"");return $.createElement($.Fragment,null,ve&&$.createElement("div",{ref:$e},kt),!ve&&!xe(kt)&&$.createElement("div",{ref:$e,style:R({},j),className:`${pe||""} ${G?"disabled-fill":""} markdown-body ${St.current}`,dangerouslySetInnerHTML:{__html:kt}}),!ve&&xe(kt)&&$.createElement(b,{html:kt}),$.createElement(Q.Z,{close:!0,data:Fe,type:Fe!=null&&Fe.length?Ye:"",style:R({},P),onClose:()=>Ue("")}))}},23954:function(Nt,rt,w){"use strict";w.d(rt,{SV:function(){return $e},ZP:function(){return Me}});var $=w(59301),ae=w(76374);const Se={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"]},_e={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"]},O={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(`
|
|
`)}]},m={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(`
|
|
`)}]},de={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 ie=w(53184),o=w.n(ie),Q=Object.defineProperty,U=Object.defineProperties,E=Object.getOwnPropertyDescriptors,b=Object.getOwnPropertySymbols,S=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable,V=(F,le,xe)=>le in F?Q(F,le,{enumerable:!0,configurable:!0,writable:!0,value:xe}):F[le]=xe,q=(F,le)=>{for(var xe in le||(le={}))S.call(le,xe)&&V(F,xe,le[xe]);if(b)for(var xe of b(le))D.call(le,xe)&&V(F,xe,le[xe]);return F},B=(F,le)=>U(F,E(le)),R=(F,le,xe)=>new Promise((we,Ie)=>{var Oe=Je=>{try{it(xe.next(Je))}catch(Ke){Ie(Ke)}},Qe=Je=>{try{it(xe.throw(Je))}catch(Ke){Ie(Ke)}},it=Je=>Je.done?we(Je.value):Promise.resolve(Je.value).then(Oe,Qe);it((xe=xe.apply(F,le)).next())});const Z={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"]}},ue=(F,le)=>le.map(xe=>({label:xe,kind:F.languages.CompletionItemKind.Keyword,insertText:xe})),M=F=>Object.keys(Z.tables).map(le=>({label:le,kind:F.languages.CompletionItemKind.Variable,insertText:le})),Y=(F,le)=>{const xe=Z.tables[F];return xe?xe.map(we=>({label:we,kind:le.languages.CompletionItemKind.Field,insertText:we})):[]};function oe(F,le,xe,we,Ie){let Oe=le.getWordUntilPosition(xe),Qe={startLineNumber:xe.lineNumber,endLineNumber:xe.lineNumber,startColumn:Oe.startColumn,endColumn:Oe.endColumn},it=we.map(Je=>({label:Je,kind:F.languages.CompletionItemKind.Keyword,insertText:Je,insertTextRules:F.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Qe}));return Ie.map(Je=>{it.push(B(q({},Je),{range:Qe}))}),it}var J=F=>{Z.languages.map(Ie=>(F.languages.registerDocumentFormattingEditProvider(Ie,{provideDocumentFormattingEdits(Oe,Qe,it){return R(this,null,function*(){const Je=o()(Oe.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:Oe.getFullModelRange(),text:Je}]})}}),Ie));const le=O.quickKey.map(Ie=>({label:Ie.label,kind:F.languages.CompletionItemKind.Method,insertText:Ie.content,insertTextRules:F.languages.CompletionItemInsertTextRule.InsertAsSnippet})),xe=m.quickKey.map(Ie=>({label:Ie.label,kind:F.languages.CompletionItemKind.Method,insertText:Ie.content,insertTextRules:F.languages.CompletionItemInsertTextRule.InsertAsSnippet})),we=_e.quickKey.map(Ie=>({label:Ie.label,kind:F.languages.CompletionItemKind.Method,insertText:Ie.content,insertTextRules:F.languages.CompletionItemInsertTextRule.InsertAsSnippet}));F.languages.registerCompletionItemProvider("cpp",{provideCompletionItems:function(Ie,Oe){var Qe=Ie.getWordUntilPosition(Oe),it={startLineNumber:Oe.lineNumber,endLineNumber:Oe.lineNumber,startColumn:Qe.startColumn,endColumn:Qe.endColumn},Je=Ie.getLineContent(Oe.lineNumber).substring(Qe.startColumn-2,Qe.endColumn);return{suggestions:[...O.keywords.map(Ke=>({label:Ke,kind:F.languages.CompletionItemKind.Function,documentation:Ke,insertText:Ke,insertTextRules:F.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:it})),...O.quickKey.map(Ke=>({label:Ke.label,kind:F.languages.CompletionItemKind.Function,documentation:Ke.content,insertText:Je.startsWith("#")?Ke.content.replace(/#/,""):Ke.content,insertTextRules:F.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:it}))]}}}),F.languages.registerCompletionItemProvider("c",{provideCompletionItems:function(Ie,Oe){var Qe=Ie.getWordUntilPosition(Oe),it={startLineNumber:Oe.lineNumber,endLineNumber:Oe.lineNumber,startColumn:Qe.startColumn,endColumn:Qe.endColumn};return{suggestions:[...Se.keywords.map(Je=>({label:Je,kind:F.languages.CompletionItemKind.Function,documentation:Je,insertText:Je,insertTextRules:F.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:it}))]}}}),F.languages.registerCompletionItemProvider("java",{provideCompletionItems:function(Ie,Oe){var Qe=Ie.getWordUntilPosition(Oe),it={startLineNumber:Oe.lineNumber,endLineNumber:Oe.lineNumber,startColumn:Qe.startColumn,endColumn:Qe.endColumn},Je=Ie.getLineContent(Oe.lineNumber).substring(Qe.startColumn-2,Qe.endColumn);return{suggestions:[..._e.keywords.map(Ke=>({label:Ke,kind:F.languages.CompletionItemKind.Function,documentation:Ke,insertText:Ke,insertTextRules:F.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:it})),..._e.quickKey.map(Ke=>({label:Ke.label,kind:F.languages.CompletionItemKind.Function,documentation:Ke.content,insertText:Je.startsWith("#")?Ke.content.replace(/#/,""):Ke.content,insertTextRules:F.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:it}))]}}}),F.languages.registerCompletionItemProvider("scala",{provideCompletionItems:function(Ie,Oe){var Qe=Ie.getWordUntilPosition(Oe),it={startLineNumber:Oe.lineNumber,endLineNumber:Oe.lineNumber,startColumn:Qe.startColumn,endColumn:Qe.endColumn},Je=Ie.getLineContent(Oe.lineNumber).substring(Qe.startColumn-2,Qe.endColumn);return{suggestions:[...de.keywords.map(Ke=>({label:Ke,kind:F.languages.CompletionItemKind.Function,documentation:Ke,insertText:Ke,insertTextRules:F.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:it})),...de.quickKey.map(Ke=>({label:Ke.label,kind:F.languages.CompletionItemKind.Function,documentation:Ke.content,insertText:Je.startsWith("#")?Ke.content.replace(/#/,""):Ke.content,insertTextRules:F.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:it}))]}}}),F.languages.registerCompletionItemProvider("python",{provideCompletionItems:function(Ie,Oe){var Qe=Ie.getWordUntilPosition(Oe),it={startLineNumber:Oe.lineNumber,endLineNumber:Oe.lineNumber,startColumn:Qe.startColumn,endColumn:Qe.endColumn},Je=Ie.getLineContent(Oe.lineNumber).substring(Qe.startColumn-2,Qe.endColumn);return{suggestions:[...m.keywords.map(Ke=>({label:Ke,kind:F.languages.CompletionItemKind.Function,documentation:Ke,insertText:Ke,insertTextRules:F.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:it})),...m.quickKey.map(Ke=>({label:Ke.label,kind:F.languages.CompletionItemKind.Function,documentation:Ke.content,insertText:Je.startsWith("#")?Ke.content.replace(/#/,""):Ke.content,insertTextRules:F.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:it}))]}}})};const ye="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var pe=Object.defineProperty,ve=(F,le,xe)=>le in F?pe(F,le,{enumerable:!0,configurable:!0,writable:!0,value:xe}):F[le]=xe,Ae=(F,le,xe)=>ve(F,typeof le!="symbol"?le+"":le,xe);const j=class Zl{constructor(le,xe,we){this.placeholder=le,this.editor=xe,this.monaco=we,xe.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return Zl.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)}};Ae(j,"ID","editor.widget.placeholderHint");var K=j,k=w(96236),ne=w(8591),G=w(6848),v=w(89392),y=w(34604),N=w(56102),te=Object.defineProperty,Le=Object.defineProperties,Fe=Object.getOwnPropertyDescriptors,Ue=Object.getOwnPropertySymbols,Ye=Object.prototype.hasOwnProperty,ut=Object.prototype.propertyIsEnumerable,ot=(F,le,xe)=>le in F?te(F,le,{enumerable:!0,configurable:!0,writable:!0,value:xe}):F[le]=xe,lt=(F,le)=>{for(var xe in le||(le={}))Ye.call(le,xe)&&ot(F,xe,le[xe]);if(Ue)for(var xe of Ue(le))ut.call(le,xe)&&ot(F,xe,le[xe]);return F},St=(F,le)=>Le(F,Fe(le)),Lt=(F,le)=>{var xe={};for(var we in F)Ye.call(F,we)&&le.indexOf(we)<0&&(xe[we]=F[we]);if(F!=null&&Ue)for(var we of Ue(F))le.indexOf(we)<0&&ut.call(F,we)&&(xe[we]=F[we]);return xe},_t=(F,le,xe)=>new Promise((we,Ie)=>{var Oe=Je=>{try{it(xe.next(Je))}catch(Ke){Ie(Ke)}},Qe=Je=>{try{it(xe.throw(Je))}catch(Ke){Ie(Ke)}},it=Je=>Je.done?we(Je.value):Promise.resolve(Je.value).then(Oe,Qe);it((xe=xe.apply(F,le)).next())});function At(F){return/^\d+$/.test(F)?`${F}px`:F}function Pt(){}let kt=!1;const fe={"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 he(F=[]){let le=F;if(Array.isArray(F)){for(let xe=0;xe<F.length;xe++){let we=fe[F[xe]];if(we)return we}return le[0]}return fe[le]||le}let se=null;var Me=F=>{var le=F,{width:xe="100%",height:we="100%",value:Ie,language:Oe="javascript",style:Qe={},options:it={},overrideServices:Je={},theme:Ke="vs-dark",onEditBlur:yt,isCopy:De=!1,onSave:Pe,autoHeight:Ze=!1,forbidCopy:Ve=!1,onChange:nt=Pt,editorDidMount:mt=Pt,onFocus:gt=Pt,onBreakPoint:x=Pt,breakPointValue:T=[],filename:et="educoder.txt",errorLine:W,errorContent:Ee="",highlightLine:Bt,openBreakPoint:Be=!1,placeholder:ze="",showMiniMap:qe=!0}=le,ee=Lt(le,["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"]);const be=(0,$.useRef)(),me=(0,$.useRef)({}),Ge=(0,$.useRef)(),X=(0,$.useRef)(),Ct=(0,$.useRef)([]),Ce=(0,$.useRef)(!1),Ot=(0,$.useRef)(),zt=(0,$.useRef)(),cr=(0,$.useRef)(!1),[sr,Kt]=(0,$.useState)(!1);function $t(){let qt;return be.current&&(qt=new ae.Z(Xt=>{for(let wr of Xt)(wr.target.offsetHeight>0||wr.target.offsetWidth>0)&&me.current.instance.layout()}),qt.observe(be.current)),qt}function mr(){ne.ZP.warning({content:decodeURIComponent(ye),key:"monaco-editor-tip"})}const Vr=()=>{let qt=me.current.instance;if(Ie!=null&&qt&&sr){const Xt=qt.getModel();Xt&&Ie!==Xt.getValue()&&(kt=!0,Xt.setValue(Ie),qt.layout(),kt=!1)}};(0,$.useEffect)(()=>{const qt=y.Z.subscribe("formatDocument",Xt=>{var wr;let Er=me.current.instance;(wr=Er==null?void 0:Er.getAction)==null||wr.call(Er,"editor.action.formatDocument").run()});return window.updateMonacoValue=Xt=>{nt(Xt)},qt},[]),(0,$.useEffect)(()=>{var qt;let Xt=me.current.instance;X.current&&clearTimeout(X.current),X.current=setTimeout(()=>{Vr()},500),Ie&&(Ie!=null&&Ie.length)&&((qt=Xt==null?void 0:Xt.updateOptions)==null||qt.call(Xt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Ie.split(/\r\n|\r|\n/g).length))+3,5)}))},[Ie,sr,me.current]),(0,$.useEffect)(()=>{if(W&&me.current&&me.current.instance){let Xt=me.current.instance;Xt.changeViewZones(function(wr){var Er=document.createElement("div");Er.style.padding="10px 20px",Er.style.width="calc(100% - 20px)",Er.className="my-error-line-wrp",Er.innerHTML=Ee,wr.addZone({afterLineNumber:W||11,heightInLines:3,domNode:Er})});var qt={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}};Xt.addOverlayWidget(qt),Xt.revealPositionInCenter({lineNumber:20,column:1})}},[W,me.current,sr]);const Ur=(qt="",Xt)=>{if(!qt||qt.trim()==="")return!0;const Er=me.current.instance.getModel().getLineTokens(Xt);let _r=!1;for(let On=0;On<2;On++)Er.getStandardTokenType(On)===1&&(_r=!0);return _r};(0,$.useEffect)(()=>{var qt;const Xt=(qt=me.current)==null?void 0:qt.instance;if(Xt&&sr&&Ve){const wr=Xt.onDidBlurEditorWidget(()=>{cr.current=!1}),Er=Xt.onDidFocusEditorText(()=>{cr.current=!0});return()=>{wr.dispose(),Er.dispose()}}},[me.current,sr,Ve]),(0,$.useEffect)(()=>{var qt;if((qt=me.current)!=null&&qt.instance&&sr&&Be){let Xt=me.current.instance,wr=Xt.getModel();if(!wr)return;(()=>{var wt;let Zt=[],tr=[];const Qt=wr.getAllDecorations();for(let gr of Qt)gr.options.className==="highlighted-line"&&(Zt.push((wt=gr==null?void 0:gr.range)==null?void 0:wt.startLineNumber),tr.push(gr==null?void 0:gr.id));if(Bt===Zt[0])return;wr.deltaDecorations(tr,[]);const Tr=wr.getLineCount();Bt&&Bt<=Tr&&(Xt.deltaDecorations([],[{range:new se.Range(Bt,1,Bt,wr.getLineMaxColumn(Bt)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Xt.revealLineInCenter(Bt))})();const _r=(wt=!1)=>{var Zt;let tr=[],Qt=[];const Tr=wr.getAllDecorations();for(let gr of Tr)gr.options.linesDecorationsClassName==="breakpoints-select"&&(tr.push((Zt=gr==null?void 0:gr.range)==null?void 0:Zt.startLineNumber),Qt.push(gr==null?void 0:gr.id));if(wt)return{lines:tr,ids:Qt};x(tr)},On=wt=>_t(void 0,null,function*(){let Zt={range:new se.Range(wt,1,wt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield wr.deltaDecorations([],[Zt]),_r()}),Gr=wt=>_t(void 0,null,function*(){let Zt=[];const tr=Xt.getLineDecorations(wt);for(let Qt of tr)Qt.options.linesDecorationsClassName==="breakpoints-select"&&Zt.push(Qt.id);yield wr.deltaDecorations(Zt,[]),_r()}),hr=wt=>{let Zt=Xt.getLineDecorations(wt);for(let tr of Zt)if(tr.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,v.isEqual)(T,_r(!0).lines)){wr.deltaDecorations(_r(!0).ids,[]);const wt=T.map(Zt=>({range:new se.Range(Zt,1,Zt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));wr.deltaDecorations([],wt)}const st=Xt.onDidChangeModelContent(wt=>{let Zt=Xt.getPosition();if(Zt){let tr=Zt.lineNumber;clearTimeout(zt.current),zt.current=setTimeout(()=>{Ur(wr.getLineContent(tr),tr)?Gr(tr):hr(tr)?(Gr(tr),On(tr)):_r()},100)}}),at=Xt.onMouseDown(wt=>{var Zt,tr,Qt;if(wt.target.detail&&((Qt=(tr=(Zt=wt.target)==null?void 0:Zt.element)==null?void 0:tr.className)!=null&&Qt.includes("line-numbers"))){let Tr=wt.target.position.lineNumber;if(Ur(wr.getLineContent(Tr),Tr))return;hr(Tr)?Gr(Tr):On(Tr)}}),bt=wt=>{let Zt={range:new se.Range(wt,1,wt,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Ct.current=Xt.deltaDecorations(Ct.current,[Zt])},Dt=()=>{Ct.current=Xt.deltaDecorations(Ct.current,[])},vt=Xt.onMouseMove(wt=>{var Zt,tr,Qt;if(Dt(),wt.target.detail&&((Qt=(tr=(Zt=wt.target)==null?void 0:Zt.element)==null?void 0:tr.className)!=null&&Qt.includes("line-numbers"))){let Tr=wt.target.position.lineNumber;if(Ur(wr.getLineContent(Tr),Tr))return;bt(Tr)}}),Ut=Xt.onMouseLeave(()=>{Dt()});return()=>{st.dispose(),at.dispose(),vt.dispose(),Ut.dispose()}}},[me.current,sr,T,Bt,Be,Oe]),(0,$.useEffect)(()=>{var qt;(qt=me.current)!=null&&qt.instance&&Be&&me.current.instance.setPosition({lineNumber:0,column:0})},[Bt]);function jr(){let qt=me.current.instance;if(qt){const Xt=qt.getSelection(),wr=me.current.pastePos||{},Er=new se.Range(wr.startLineNumber||Xt.endLineNumber,wr.startColumn||Xt.endColumn,wr.endLineNumber||Xt.endLineNumber,wr.endColumn||Xt.endColumn);setTimeout(()=>{qt.executeEdits("",[{range:Er,text:""}])},300)}}function Vt(qt){(window.navigator.platform.match("Mac")?qt.metaKey:qt.ctrlKey)&&qt.keyCode==83&&(qt.preventDefault(),Pe())}const or=()=>{if(Ze&&me.current.instance){const qt=me.current.instance.getContentHeight();un(qt<we?we:qt)}else un(we)};function Ir(qt){var Xt=document.createEvent("MouseEvents");Xt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),qt.dispatchEvent(Xt)}const Kr=qt=>{if(!cr.current)return;const{keyCode:Xt,ctrlKey:wr,metaKey:Er,target:_r,type:On}=qt;return(On==="paste"||(Xt===67||Xt===86)&&(Er||wr))&&_r.nodeName==="TEXTAREA"&&(mr(),qt.preventDefault()),!1};function Lr(qt,Xt){var wr=window.URL||window.webkitURL||window,Er=new Blob([Xt]),_r=document.createElementNS("http://www.w3.org/1999/xhtml","a");_r.href=wr.createObjectURL(Er),_r.download=qt,Ir(_r)}(0,$.useEffect)(()=>{or()},[or]),(0,$.useEffect)(()=>{be.current&&!sr&&Promise.all([w.e(8909),w.e(3267)]).then(w.bind(w,71448)).then(qt=>{try{se=qt,me.current.instance=se.editor.create(be.current,{value:Ie,language:he(Oe),theme:Ke,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:qe||!1}},Je);const Xt=me.current.instance;let _r=[...k.BH._menuItems].find(st=>st[0]._debugName=="EditorContext")[1],On=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],Gr=(st,at)=>{var bt,Dt;let vt=st._first;do at.includes((Dt=(bt=vt.element)==null?void 0:bt.command)==null?void 0:Dt.id)&&st._remove(vt);while(vt=vt.next)};if(mt(Xt,se),setTimeout(()=>{or(),me.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Lr(et||"educoder.txt",Xt.getValue())}})},500),me.current.subscription=Xt.onDidChangeModelContent(st=>{Ce.current?clearTimeout(Ot.current):(or(),nt(Xt.getValue(),st)),Ot.current=setTimeout(()=>{Ce.current=!1},500)}),window.Monaco||J(se,he(Oe)),Ve&&(Gr(_r,On),be.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Kr),window.removeEventListener("paste",Kr),window.addEventListener("keydown",Kr),window.addEventListener("paste",Kr)),window.Monaco=se,yt&&Xt.onDidBlurEditorWidget(()=>{yt(Xt.getValue())}),gt&&Xt.onDidFocusEditorText(()=>{gt(Xt.getValue())}),Ve)try{Xt.onDidPaste(st=>{const at=Xt.getSelection(),bt=me.current.pastePos||{},Dt=new se.Range(bt.startLineNumber||at.endLineNumber,bt.startColumn||at.endColumn,bt.endLineNumber||at.endLineNumber,bt.endColumn||at.endColumn);Xt.executeEdits("",[{range:st.range,text:""}])})}catch(st){}let hr=$t();return ze&&typeof ze=="string"&&new K(ze,Xt,se),Kt(!0),()=>{const st=me.current.instance;st.dispose();const at=st.getModel();at&&at.dispose(),me.current.subscription&&me.current.subscription.dispose(),hr.unobserve(be.current)}}catch(Xt){}})},[]),(0,$.useEffect)(()=>{if(me.current.instance&&sr)return document.addEventListener("keydown",Vt,!1),()=>{document.removeEventListener("keydown",Vt)}},[Pe,sr]),(0,$.useEffect)(()=>{let qt=me.current.instance;if(qt&&sr){let Xt=he(Oe);se.editor.setModelLanguage(qt.getModel(),Xt)}},[Oe,sr]),(0,$.useEffect)(()=>{me.current.instance&&sr&&se.editor.setTheme(Ke)},[Ke,sr]),(0,$.useEffect)(()=>{let qt=me.current.instance;Ge.current=it,qt&&sr&&(qt.updateOptions(lt({},it)),setTimeout(()=>{qt.getModel().updateOptions(lt({},it))},200))},[JSON.stringify(it),sr]),(0,$.useEffect)(()=>{let qt=me.current.instance;qt&&sr&&qt.layout()},[xe,we,sr]);const[ln,Pr]=(0,$.useState)(At(xe)),[Fn,un]=(0,$.useState)(At(we)),zr=St(lt({},Qe),{width:ln,height:Fn,position:"relative"});return $.createElement("div",{className:"my-monaco-editor",ref:be,style:zr},De&&$.createElement(N.CopyToClipboard,{text:Ie,onCopy:()=>ne.ZP.success("\u590D\u5236\u6210\u529F")},$.createElement(G.Z,{title:"\u590D\u5236\u4EE3\u7801"},$.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},$.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function $e({width:F="100%",height:le="100%",original:xe,modified:we,language:Ie,options:Oe={}}){const Qe=(0,$.useRef)(),[it,Je]=(0,$.useState)(null);function Ke(Ze){let Ve;return Qe.current&&(Ve=new ae.Z(nt=>{for(let mt of nt)(mt.target.offsetHeight>0||mt.target.offsetWidth>0)&&Ze.layout()}),Ve.observe(Qe.current)),Ve}(0,$.useEffect)(()=>(Qe.current&&Promise.all([w.e(8909),w.e(9404)]).then(w.bind(w,2550)).then(Ze=>{se=Ze;const Ve=se.editor.createDiffEditor(Qe.current,St(lt({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},Oe),{wordWrap:!0}));Je(Ve);let nt=Ke(Ve);return()=>{Ve.dispose();const mt=Ve.getModel();mt&&mt.dispose(),nt.unobserve(Qe.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,$.useEffect)(()=>{it&&it.setModel({original:se.editor.createModel(xe,Ie),modified:se.editor.createModel(we,Ie)})},[xe,we,Ie,it]);const yt=At(F),De=At(le),Pe={width:yt,height:De};return $.createElement("div",{className:"my-diff-editor",ref:Qe,style:Pe})}},1464:function(Nt,rt,w){"use strict";w.r(rt),w.d(rt,{default:function(){return j}});var $=w(59301),ae=w(89070),Se=w(8591),_e=w(5871),O=w(3113),m=w(66104),de=w(95237),ie=w(43604),o=w(28103),Q=w(79817),U=w(5112),E=w(92832),b=w(27812),S=w(94941),D=w(85149);const V=({data:P})=>{const[K,k]=(0,$.useState)(!1),ne=()=>{var G;switch(P.question_type){case 3:return $.createElement("aside",null,$.createElement("span",{style:{cursor:"pointer"},className:"font12 c-blue",onClick:()=>{k(!K)}},K?"\u9690\u85CF\u53C2\u8003\u7B54\u6848":"\u67E5\u770B\u53C2\u8003\u7B54\u6848"),K&&$.createElement("div",null,(G=P==null?void 0:P.standard_answer)==null?void 0:G.map(function(v,y){var N;return $.createElement(de.Z,{className:"mt10"},$.createElement(ie.Z,{flex:"50px"},$.createElement("span",{className:"mt10"},"\u586B\u7A7A",v.choice_id)),$.createElement(ie.Z,{flex:1},(N=v==null?void 0:v.answer_text)==null?void 0:N.map(function(te,Le){return $.createElement("div",{style:{border:"1px solid #eee",padding:"15px 10px 0 10px"}},te)})))})));case 4:return $.createElement("aside",null,$.createElement("span",{style:{cursor:"pointer"},className:"font12 c-blue",onClick:()=>{k(!K)}},K?"\u9690\u85CF\u53C2\u8003\u7B54\u6848":"\u67E5\u770B\u53C2\u8003\u7B54\u6848"),K&&$.createElement("div",null,$.createElement(D.Z,{value:P.standard_answer.join(" ")})))}};return $.createElement("section",null,ne())};var q={flex_box_center:"flex_box_center___rZhUX",flex_space_between:"flex_space_between___WSWPP",flex_box_vertical_center:"flex_box_vertical_center___Fl2CQ",flex_box_center_end:"flex_box_center_end___zIA_L",flex_box_column:"flex_box_column___wpPM2",bg:"bg___PTvAX",title:"title___NRpL_",questionIcons:"questionIcons___qftEo",green:"green___DII_f",orange:"orange___nqaHJ",greenTip:"greenTip___NQ5fc",redTip:"redTip___BYmiY",orangeTip:"orangeTip___wlzcb",cuttOff:"cuttOff___Y19D3"},B=w(955),R=w(59301),Z=Object.defineProperty,ue=Object.getOwnPropertySymbols,M=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,oe=(P,K,k)=>K in P?Z(P,K,{enumerable:!0,configurable:!0,writable:!0,value:k}):P[K]=k,J=(P,K)=>{for(var k in K||(K={}))M.call(K,k)&&oe(P,k,K[k]);if(ue)for(var k of ue(K))Y.call(K,k)&&oe(P,k,K[k]);return P},ye=(P,K)=>{var k={};for(var ne in P)M.call(P,ne)&&K.indexOf(ne)<0&&(k[ne]=P[ne]);if(P!=null&&ue)for(var ne of ue(P))K.indexOf(ne)<0&&Y.call(P,ne)&&(k[ne]=P[ne]);return k},pe=(P,K,k)=>new Promise((ne,G)=>{var v=te=>{try{N(k.next(te))}catch(Le){G(Le)}},y=te=>{try{N(k.throw(te))}catch(Le){G(Le)}},N=te=>te.done?ne(te.value):Promise.resolve(te.value).then(v,y);N((k=k.apply(P,K)).next())});const ve=["\u5355\u9009\u9898","\u591A\u9009\u9898","\u5224\u65AD\u9898","\u586B\u7A7A\u9898","\u7B80\u7B54\u9898","\u5B9E\u8BAD\u9898"],Ae=P=>{var K=P,{exercise:k,globalSetting:ne,loading:G,user:v,dispatch:y}=K,N=ye(K,["exercise","globalSetting","loading","user","dispatch"]),te,Le,Fe,Ue,Ye,ut,ot,lt,St,Lt,_t,At,Pt,kt,fe,he,se,Me,$e,F,le;const xe=(0,ae.useParams)(),{userInfo:we}=v,{reviewGroupExercise:Ie}=k,[Oe,Qe]=(0,$.useState)({}),[it,Je]=(0,$.useState)(!1),Ke=(0,$.useRef)();console.log(Oe);const yt=()=>{var Ve,nt;console.log(xe,222);let mt=localStorage[`${(Ve=v==null?void 0:v.userInfo)==null?void 0:Ve.login}-${xe.coursesId}-${xe.exerciseId}-filter`];if(mt?mt=JSON.parse(mt):mt={},Object.prototype.toString.call(mt)!=="[object Object]")return{};let gt=((nt=mt==null?void 0:mt.commit_status)==null?void 0:nt.filter(x=>x===2||x===3))||[2,3];return mt.commit_status=(gt==null?void 0:gt.length)>0?gt:[2,3],mt};(0,$.useEffect)(()=>{var Ve;(Ve=v==null?void 0:v.userInfo)!=null&&Ve.login&&De()},[(te=v==null?void 0:v.userInfo)==null?void 0:te.login]);const De=()=>{const Ve=yt();y({type:"exercise/getReviewGroupExercise",payload:J({exerciseId:xe.exerciseId},Ve)})},Pe=Ve=>pe(void 0,null,function*(){const nt=yt();y({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u8C03\u5206\u4E2D\uFF0C\u8BF7\u7A0D\u540E..."}}),(yield(0,S.LP)(J({cover_all:!0,id:Ve.question_id,max_score:Oe[Ve.q_position].max,min_score:Oe[Ve.q_position].min,comment:Oe.comment},nt))).status===0&&(delete Oe[Ve.q_position],De(),Se.ZP.success("\u6279\u91CF\u8C03\u5206\u6210\u529F")),y({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:"\u8C03\u5206\u4E2D\uFF0C\u8BF7\u7A0D\u540E..."}})}),Ze=Ve=>{var nt,mt,gt;if(Ve.question_type>1)return Oe[Ve.q_position]?R.createElement("div",{className:"mr10 ml10 inline-block"},"\u5728\u4EE5\u4E0B\u533A\u95F4\u4E2D\u4E3A\u5B66\u751F\u968F\u673A\u8D4B\u5206\uFF1A",R.createElement(_e.Z,{placeholder:"\u6700\u4F4E",defaultValue:Ve.user_score,max:Ve.question_score,min:0,onChange:x=>{Oe[Ve.q_position].min=String(x),Qe(J({},Oe))}}),R.createElement("div",{className:q.cuttOff}),R.createElement(_e.Z,{placeholder:"\u6700\u9AD8",defaultValue:Ve.user_score,max:Ve.question_score,min:((nt=Oe[Ve.q_position])==null?void 0:nt.min)||0,onChange:x=>{Oe[Ve.q_position].max=String(x),Qe(J({},Oe))}}),"\u5206",R.createElement(O.ZP,{className:"ml5",type:"primary",disabled:!((mt=Oe[Ve.q_position])!=null&&mt.min)||!((gt=Oe[Ve.q_position])!=null&>.max),onClick:()=>Pe(Ve)},"\u786E\u8BA4")):R.createElement("span",{style:{cursor:"pointer"},onClick:()=>{Oe[Ve.q_position]={},Qe(J({},Oe))},className:"c-blue mr10 ml10"},"\u8C03\u5206")};return R.createElement("section",{className:"edu-container",ref:Ke},R.createElement("section",{className:"animated fadeIn"},R.createElement("aside",{className:"mt10"},we&&R.createElement(m.Z,{separator:">"},R.createElement(m.Z.Item,null,R.createElement(ae.Link,{to:`${we.first_category_url}`},(Le=we==null?void 0:we.course)==null?void 0:Le.course_name)),R.createElement(m.Z.Item,null,R.createElement(ae.Link,{to:`/classrooms/${xe.coursesId}/exercise`},"\u8BD5\u5377\u5217\u8868")),R.createElement(m.Z.Item,null,R.createElement(ae.Link,{to:`/classrooms/${xe.coursesId}/exercise/${xe.exerciseId}/detail`},"\u8BD5\u5377\u8BE6\u60C5")),R.createElement(m.Z.Item,null,(Fe=Ie==null?void 0:Ie.exercise_answer_user)==null?void 0:Fe.user_name))),R.createElement("aside",{className:[q.title,"mt20"].join(" ")},R.createElement(de.Z,{style:{width:"100%"}},R.createElement(ie.Z,{flex:"1"},R.createElement(ae.Link,{to:`/classrooms/${xe.coursesId}/exercise/${xe.exerciseId}/detail`},R.createElement(b.Z,{className:"font16 c-black"})),R.createElement("strong",{className:"font20 ml5"},(Ue=Ie==null?void 0:Ie.exercise)==null?void 0:Ue.exercise_name),R.createElement(B.VV,{status:[B.ju[(Ye=Ie.exercise)==null?void 0:Ye.exercise_status]]})),R.createElement(ie.Z,null)))),R.createElement("section",{className:[q.bg,"pt30","pl30","pr30","pb30","mt20"].join(" ")},R.createElement(de.Z,{gutter:[30,0]},R.createElement(ie.Z,{className:"bold c-black"},R.createElement("aside",null,R.createElement("span",null,"\u8003\u8BD5\u65F6\u957F ",((ut=Ie.exercise)==null?void 0:ut.time)===-1?"\u672A\u9650\u65F6":(ot=Ie.exercise)==null?void 0:ot.time),R.createElement("span",{className:"ml20"},"\u6EE1\u5206 ",(St=(lt=Ie.exercise_scores)==null?void 0:lt.exercise_types)==null?void 0:St.q_scores,"\u5206")))),R.createElement(o.Z,null),R.createElement(de.Z,{gutter:[30,0]},R.createElement(ie.Z,{flex:"1"},R.createElement("span",{className:"c-light-black"},"\u60A8\u6B63\u5728\u5BF9\u4EE5\u4E0B\u5B66\u751F\u8FDB\u884C\u6279\u91CF\u8BC4\u9605\uFF1A"),R.createElement("span",null,(Lt=Ie.exercise_answer_user)==null?void 0:Lt.user_name))),R.createElement(de.Z,{gutter:[30,0]},R.createElement(ie.Z,{span:24,className:"mt10"},(_t=Ie==null?void 0:Ie.exercise_users)==null?void 0:_t.map(function(Ve,nt){if(nt<100)return R.createElement("strong",{className:"mr10",key:nt},Ve.user_name)})),R.createElement(ie.Z,{span:24,className:"tr"},((At=Ie==null?void 0:Ie.exercise_users)==null?void 0:At.length)>100&&R.createElement("span",null,"......\u7B49",(Pt=Ie==null?void 0:Ie.exercise_users)==null?void 0:Pt.length,"\u4EBA"))),R.createElement(o.Z,null),((kt=Ie==null?void 0:Ie.exercise_questions)==null?void 0:kt.some(Ve=>Ve.question_type!==4))&&R.createElement("aside",null,R.createElement(de.Z,{gutter:[10,10]},R.createElement(ie.Z,{flex:"1"},R.createElement("aside",null,R.createElement("strong",{className:"font14"},"\u5BA2\u89C2\u9898"),R.createElement("span",{className:q.greenTip},"\u6B63\u786E"),R.createElement("span",{className:q.redTip},"\u9519\u8BEF"),R.createElement("span",{className:q.redTip},"\u90E8\u5206\u5F97\u5206")),R.createElement("aside",{className:[q.questionIcons,"mt10"].join(" ")},R.createElement(Q.default,{affix:!1,onChange:()=>Je(!0)},(fe=Ie==null?void 0:Ie.exercise_questions)==null?void 0:fe.map(function(Ve,nt){if(Ve.question_type!==4)return R.createElement(Q.default.Link,{href:`#questionID-${Ve.q_position}`,title:Ve.q_position})})))),R.createElement(ie.Z,null,"\u603B\u5206 ",R.createElement("span",{className:"c-red bold"},(se=(he=Ie.exercise_scores)==null?void 0:he.exercise_types)==null?void 0:se.q_scores)," \u5206")),R.createElement("p",{className:"c-blue tr",onClick:()=>Je(!it)},it?"\u6536\u8D77\u7B54\u9898\u8BE6\u60C5":"\u5C55\u5F00\u67E5\u770B\u7B54\u9898\u8BE6\u60C5",R.createElement("span",{className:"iconfont icon-play-square-fill3x ml5"})),R.createElement(o.Z,null)),R.createElement(de.Z,{gutter:[10,10]},R.createElement(ie.Z,{flex:"1"},R.createElement("aside",null,R.createElement("strong",{className:"font14"},"\u4E3B\u89C2\u9898"),R.createElement("span",{className:q.greenTip},"\u5DF2\u8BC4"),R.createElement("span",{className:q.redTip},"\u672A\u8BC4")),R.createElement("aside",{className:[q.questionIcons,"mt10"].join(" ")},R.createElement(Q.default,{affix:!1},(Me=Ie==null?void 0:Ie.exercise_questions)==null?void 0:Me.map(function(Ve,nt){if(Ve.question_type===4)return R.createElement(Q.default.Link,{href:`#questionID-${Ve.q_position}`,title:Ve.q_position}," ")})))),R.createElement(ie.Z,null,"\u603B\u5206 ",R.createElement("span",{className:"c-red bold"},(F=($e=Ie.exercise_scores)==null?void 0:$e.exercise_types)==null?void 0:F.q_mains_scores)," \u5206")),(le=Ie.exercise_questions)==null?void 0:le.map(function(Ve,nt){var mt;return R.createElement("aside",{id:`questionID-${Ve.q_position}`,className:`${it||Ve.question_type===4?"":"hide"}`},R.createElement(de.Z,null,R.createElement(ie.Z,{flex:"1"},R.createElement("span",{className:"c-blue font14"},Ve.q_position,". ",ve[Ve.question_type]),R.createElement("span",{className:"c-light-black ml5"},"(",Ve.question_score,")")),R.createElement(ie.Z,null,Ve.standard_answer_show&&R.createElement("span",null,"\u6B63\u786E\u7B54\u6848\uFF1A",Ve.standard_answer_show),Ze(Ve),Ve.user_score&&R.createElement("span",null,"\u5F97\u5206",R.createElement("span",{className:"c-red"},Ve.user_score),"\u5206"),!Ve.user_score&&R.createElement("span",{className:"c-red"},"\u672A\u8BC4"))),R.createElement("div",null,R.createElement(D.Z,{value:Ve.question_title})),R.createElement("div",null,(mt=Ve.question_choices)==null?void 0:mt.map(function(gt,x){return R.createElement("div",null,R.createElement(U.ZP,{checked:Ve.user_answer.includes(gt.choice_id)},gt.choice_text))})),R.createElement(V,{data:Ve}),Oe[Ve.q_position]?R.createElement(E.default.TextArea,{onChange:gt=>{Oe.comment=String(gt.target.value),Qe(J({},Oe))},placeholder:"\u8BF7\u8F93\u5165\u8BC4\u8BED\u6700\u5927\u9650\u5236100\u4E2A\u5B57\u7B26",maxLength:100}):null,R.createElement(o.Z,null))})))};var j=(0,ae.connect)(({exercise:P,loading:K,user:k,globalSetting:ne})=>({exercise:P,globalSetting:ne,user:k,loading:K.effects}))(Ae)},24768:function(Nt,rt,w){"use strict";w.d(rt,{AL:function(){return ue},Iy:function(){return U},Qv:function(){return S},ez:function(){return Z},jb:function(){return E}});var $=w(32834),ae=w.n($),Se=w(11690),_e=w.n(Se);let O=1;function m(ye,pe){const ve=ye.match(/^(\s+)(?:```)/);if(ve===null)return pe;const Ae=ve[1];return pe.split(`
|
|
`).map(j=>{const P=j.match(/^\s+/);if(P===null)return j;const[K]=P;return K.length>=Ae.length?j.slice(Ae.length):j}).join(`
|
|
`)}let de=[],ie=["<ul>"];const o=new(ae()).Renderer,Q=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function U(){de.length=0,ie=["<ul>"]}const E={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function b(ye,pe,ve,Ae){if(pe>=ye.length||ye[pe].level<=ve)return pe;var j=ye[pe];Ae.push("<li><a href='#"+O+j.anchor+"'>"+j.text+"</a>"),pe++;var P=[];return pe=b(ye,pe,j.level,P),P.length>0&&(Ae.push("<ul>"),P.forEach(function(K){Ae.push(K)}),Ae.push("</ul>")),Ae.push("</li>"),pe=b(ye,pe,ve,Ae),pe}function S(){return b(de,0,0,ie),ie.push("</ul>"),ie.join("")}const D={heading(ye){const pe=Q.exec(ye);if(O+=1,pe)return{type:"heading",raw:pe[0],depth:pe[1].length,text:pe[2]}},fences(ye){const pe=this.rules.block.fences.exec(ye);if(pe){const ve=pe[0];let Ae=m(ve,pe[3]||"");const j=pe[2]?pe[2].trim():pe[2];if(["latex","katex","math"].indexOf(j)>=0){const P=B(),K=Ae;Ae=P,R[P]={type:"block",expression:K}}return{type:"code",raw:ve,lang:j,text:Ae}}}},V=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let q=0;const B=()=>`__special_katext_id_${q++}__`;let R={};function Z(){return R}function ue(){q=0,R={}}function M(ye){return ye=ye.replace(V,(pe,ve)=>{const Ae=B();return R[Ae]={type:"inline",expression:ve},Ae}),ye}const Y=o.listitem;o.listitem=function(ye){return Y(M(ye))};const oe=o.paragraph;o.paragraph=function(ye){return oe(M(ye))};const J=o.tablecell;o.tablecell=function(ye,pe){return J(M(ye),pe)},o.code=function(ye,pe,ve){const Ae=(pe||"").match(/\S*/)[0];return Ae?["latex","katex","math"].indexOf(Ae)>=0?`<p class='editormd-tex'>${ye}</p>`:`<pre class="prettyprint linenums"><code class="language-${pe}">${ve?ye:(0,Se.escape)(ye,!0)}</code></pre>
|
|
`:'<pre class="prettyprint linenums"><code>'+(ve?ye:(0,Se.escape)(ye,!0))+"</code></pre>"},o.heading=function(ye,pe,ve){let Ae=this.options.headerPrefix+ve.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return de.push({anchor:Ae,level:pe,text:ye}),"<h"+pe+' id="'+O+Ae+'">'+ye+"</h"+pe+">"},ae().setOptions({silent:!0,gfm:!0,pedantic:!1}),ae().use({tokenizer:D,renderer:o}),rt.ZP=ae()},36785:function(Nt,rt,w){"use strict";w.d(rt,{o2:function(){return O},yT:function(){return m}});var $=w(80702),ae=w(33166);const Se=ae.i.map(de=>`${de}-inverse`),_e=["success","processing","error","default","warning"];function O(de){return(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)?[].concat((0,$.Z)(Se),(0,$.Z)(ae.i)).includes(de):ae.i.includes(de)}function m(de){return _e.includes(de)}},13845:function(Nt,rt,w){"use strict";w.d(rt,{F:function(){return $},Z:function(){return ae}});function $(Se){return Se!=null&&Se===Se.window}function ae(Se,_e){var O,m;if(typeof window=="undefined")return 0;const de=_e?"scrollTop":"scrollLeft";let ie=0;return $(Se)?ie=Se[_e?"pageYOffset":"pageXOffset"]:Se instanceof Document?ie=Se.documentElement[de]:(Se instanceof HTMLElement||Se)&&(ie=Se[de]),Se&&!$(Se)&&typeof ie!="number"&&(ie=(m=((O=Se.ownerDocument)!==null&&O!==void 0?O:Se).documentElement)===null||m===void 0?void 0:m[de]),ie}},79676:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return m}});var $=w(19447);function ae(de,ie,o,Q){if(Q===!1)return{adjustX:!1,adjustY:!1};const U=Q&&typeof Q=="object"?Q:{},E={};switch(de){case"top":case"bottom":E.shiftX=ie.dropdownArrowOffset*2+o;break;case"left":case"right":E.shiftY=ie.dropdownArrowOffsetVertical*2+o;break}const b=Object.assign(Object.assign({},E),U);return b.shiftX||(b.adjustX=!0),b.shiftY||(b.adjustY=!0),b}const Se={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"]}},_e={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"]}},O=new Set(["topLeft","topRight","bottomLeft","bottomRight","leftTop","leftBottom","rightTop","rightBottom"]);function m(de){const{arrowWidth:ie,autoAdjustOverflow:o,arrowPointAtCenter:Q,offset:U,borderRadius:E,visibleFirst:b}=de,S=ie/2,D={};return Object.keys(Se).forEach(V=>{const q=Q&&_e[V]||Se[V],B=Object.assign(Object.assign({},q),{offset:[0,0]});switch(D[V]=B,O.has(V)&&(B.autoArrow=!1),V){case"top":case"topLeft":case"topRight":B.offset[1]=-S-U;break;case"bottom":case"bottomLeft":case"bottomRight":B.offset[1]=S+U;break;case"left":case"leftTop":case"leftBottom":B.offset[0]=-S-U;break;case"right":case"rightTop":case"rightBottom":B.offset[0]=S+U;break}const R=(0,$.fS)({contentRadius:E,limitVerticalRadius:!0});if(Q)switch(V){case"topLeft":case"bottomLeft":B.offset[0]=-R.dropdownArrowOffset-S;break;case"topRight":case"bottomRight":B.offset[0]=R.dropdownArrowOffset+S;break;case"leftTop":case"rightTop":B.offset[1]=-R.dropdownArrowOffset-S;break;case"leftBottom":case"rightBottom":B.offset[1]=R.dropdownArrowOffset+S;break}B.overflow=ae(V,R,ie,o),b&&(B.htmlRegion="visibleFirst")}),D}},68031:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return _e}});var $=w(16089);function ae(O,m,de,ie){const o=de-m;return O/=ie/2,O<1?o/2*O*O*O+m:o/2*((O-=2)*O*O+2)+m}var Se=w(13845);function _e(O){let m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const{getContainer:de=()=>window,callback:ie,duration:o=450}=m,Q=de(),U=(0,Se.Z)(Q,!0),E=Date.now(),b=()=>{const D=Date.now()-E,V=ae(D>o?o:D,U,O,o);(0,Se.F)(Q)?Q.scrollTo(window.pageXOffset,V):Q instanceof Document||Q.constructor.name==="HTMLDocument"?Q.documentElement.scrollTop=V:Q.scrollTop=V,D<o?(0,$.Z)(b):typeof ie=="function"&&ie()};(0,$.Z)(b)}},19080:function(Nt,rt,w){"use strict";w.d(rt,{F:function(){return O},Z:function(){return _e}});var $=w(92310),ae=w.n($);const Se=null;function _e(m,de,ie){return ae()({[`${m}-status-success`]:de==="success",[`${m}-status-warning`]:de==="warning",[`${m}-status-error`]:de==="error",[`${m}-status-validating`]:de==="validating",[`${m}-has-feedback`]:ie})}const O=(m,de)=>de||m},27666:function(Nt,rt,w){"use strict";var $=w(80702),ae=w(16089);function Se(_e){let O;const m=ie=>()=>{O=null,_e.apply(void 0,(0,$.Z)(ie))},de=function(){if(O==null){for(var ie=arguments.length,o=new Array(ie),Q=0;Q<ie;Q++)o[Q]=arguments[Q];O=(0,ae.Z)(m(o))}};return de.cancel=()=>{ae.Z.cancel(O),O=null},de}rt.Z=Se},81228:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return oe}});var $=w(96949),ae=w(55090),Se=w(77205),_e=w(38793),O=w(59301),m=w(92310),de=w.n(m),ie=w(29301),o=w(2738),Q=w(27666),U=w(36355),E=w(83116),b=w(37613);const S=J=>{const{componentCls:ye}=J;return{[ye]:{position:"fixed",zIndex:J.zIndexPopup}}};var D=(0,E.Z)("Affix",J=>{const ye=(0,b.TS)(J,{zIndexPopup:J.zIndexBase+10});return[S(ye)]});function V(J){return J!==window?J.getBoundingClientRect():{top:0,bottom:window.innerHeight}}function q(J,ye,pe){if(pe!==void 0&&ye.top>J.top-pe)return pe+ye.top}function B(J,ye,pe){if(pe!==void 0&&ye.bottom<J.bottom+pe){const ve=window.innerHeight-ye.bottom;return pe+ve}}const R=["resize","scroll","touchstart","touchmove","touchend","pageshow","load"];function Z(){return typeof window!="undefined"?window:null}var ue;(function(J){J[J.None=0]="None",J[J.Prepare=1]="Prepare"})(ue||(ue={}));let M=function(J){(0,Se.Z)(pe,J);var ye=(0,_e.Z)(pe);function pe(){var ve;return(0,$.Z)(this,pe),ve=ye.apply(this,arguments),ve.state={status:ue.None,lastAffix:!1,prevTarget:null},ve.placeholderNodeRef=(0,O.createRef)(),ve.fixedNodeRef=(0,O.createRef)(),ve.addListeners=()=>{const Ae=ve.getTargetFunc(),j=Ae==null?void 0:Ae(),{prevTarget:P}=ve.state;P!==j&&(R.forEach(K=>{P==null||P.removeEventListener(K,ve.lazyUpdatePosition),j==null||j.addEventListener(K,ve.lazyUpdatePosition)}),ve.updatePosition(),ve.setState({prevTarget:j}))},ve.removeListeners=()=>{ve.timer&&(clearTimeout(ve.timer),ve.timer=null);const{prevTarget:Ae}=ve.state,j=ve.getTargetFunc(),P=j==null?void 0:j();R.forEach(K=>{P==null||P.removeEventListener(K,ve.lazyUpdatePosition),Ae==null||Ae.removeEventListener(K,ve.lazyUpdatePosition)}),ve.updatePosition.cancel(),ve.lazyUpdatePosition.cancel()},ve.getOffsetTop=()=>{const{offsetBottom:Ae,offsetTop:j}=ve.props;return Ae===void 0&&j===void 0?0:j},ve.getOffsetBottom=()=>ve.props.offsetBottom,ve.measure=()=>{const{status:Ae,lastAffix:j}=ve.state,{onChange:P}=ve.props,K=ve.getTargetFunc();if(Ae!==ue.Prepare||!ve.fixedNodeRef.current||!ve.placeholderNodeRef.current||!K)return;const k=ve.getOffsetTop(),ne=ve.getOffsetBottom(),G=K();if(G){const v={status:ue.None},y=V(ve.placeholderNodeRef.current);if(y.top===0&&y.left===0&&y.width===0&&y.height===0)return;const N=V(G),te=q(y,N,k),Le=B(y,N,ne);te!==void 0?(v.affixStyle={position:"fixed",top:te,width:y.width,height:y.height},v.placeholderStyle={width:y.width,height:y.height}):Le!==void 0&&(v.affixStyle={position:"fixed",bottom:Le,width:y.width,height:y.height},v.placeholderStyle={width:y.width,height:y.height}),v.lastAffix=!!v.affixStyle,P&&j!==v.lastAffix&&P(v.lastAffix),ve.setState(v)}},ve.prepareMeasure=()=>{ve.setState({status:ue.Prepare,affixStyle:void 0,placeholderStyle:void 0})},ve.updatePosition=(0,Q.Z)(()=>{ve.prepareMeasure()}),ve.lazyUpdatePosition=(0,Q.Z)(()=>{const Ae=ve.getTargetFunc(),{affixStyle:j}=ve.state;if(Ae&&j){const P=ve.getOffsetTop(),K=ve.getOffsetBottom(),k=Ae();if(k&&ve.placeholderNodeRef.current){const ne=V(k),G=V(ve.placeholderNodeRef.current),v=q(G,ne,P),y=B(G,ne,K);if(v!==void 0&&j.top===v||y!==void 0&&j.bottom===y)return}}ve.prepareMeasure()}),ve}return(0,ae.Z)(pe,[{key:"getTargetFunc",value:function(){const{getTargetContainer:Ae}=this.context,{target:j}=this.props;return j!==void 0?j:Ae!=null?Ae:Z}},{key:"componentDidMount",value:function(){this.timer=setTimeout(this.addListeners)}},{key:"componentDidUpdate",value:function(Ae){this.addListeners(),(Ae.offsetTop!==this.props.offsetTop||Ae.offsetBottom!==this.props.offsetBottom)&&this.updatePosition(),this.measure()}},{key:"componentWillUnmount",value:function(){this.removeListeners()}},{key:"render",value:function(){const{affixStyle:Ae,placeholderStyle:j}=this.state,{affixPrefixCls:P,rootClassName:K,children:k}=this.props,ne=de()(Ae&&K,{[P]:!!Ae});let G=(0,o.Z)(this.props,["prefixCls","offsetTop","offsetBottom","target","onChange","affixPrefixCls","rootClassName"]);return O.createElement(ie.Z,{onResize:this.updatePosition},O.createElement("div",Object.assign({},G,{ref:this.placeholderNodeRef}),Ae&&O.createElement("div",{style:j,"aria-hidden":"true"}),O.createElement("div",{className:ne,ref:this.fixedNodeRef,style:Ae},O.createElement(ie.Z,{onResize:this.updatePosition},k))))}}]),pe}(O.Component);M.contextType=U.E_;var oe=(0,O.forwardRef)((J,ye)=>{const{prefixCls:pe,rootClassName:ve}=J,{getPrefixCls:Ae}=(0,O.useContext)(U.E_),j=Ae("affix",pe),[P,K]=D(j),k=Object.assign(Object.assign({},J),{affixPrefixCls:j,rootClassName:de()(ve,K)});return P(O.createElement(M,Object.assign({},k,{ref:ye})))})},79817:function(Nt,rt,w){"use strict";w.d(rt,{default:function(){return ve}});var $=w(80702),ae=w(92310),Se=w.n(ae),_e=w(70425),O=w(59301),m=w(16722),de=w(13845),ie=w(68031),o=w(81228),Q=w(36355),E=O.createContext(void 0),S=Ae=>{const{href:j,title:P,prefixCls:K,children:k,className:ne,target:G,replace:v}=Ae,y=O.useContext(E),{registerLink:N,unregisterLink:te,scrollTo:Le,onClick:Fe,activeLink:Ue,direction:Ye}=y||{};O.useEffect(()=>(N==null||N(j),()=>{te==null||te(j)}),[j]);const ut=At=>{v&&(At.preventDefault(),window.location.replace(j)),Fe==null||Fe(At,{title:P,href:j}),Le==null||Le(j)},{getPrefixCls:ot}=O.useContext(Q.E_),lt=ot("anchor",K),St=Ue===j,Lt=Se()(`${lt}-link`,ne,{[`${lt}-link-active`]:St}),_t=Se()(`${lt}-link-title`,{[`${lt}-link-title-active`]:St});return O.createElement("div",{className:Lt},O.createElement("a",{className:_t,href:j,title:typeof P=="string"?P:"",target:G,onClick:ut},P),Ye!=="horizontal"?k:null)},D=w(17313),V=w(83116),q=w(37613);const B=Ae=>{const{componentCls:j,holderOffsetBlock:P,motionDurationSlow:K,lineWidthBold:k,colorPrimary:ne,lineType:G,colorSplit:v}=Ae;return{[`${j}-wrapper`]:{marginBlockStart:-P,paddingBlockStart:P,[j]:Object.assign(Object.assign({},(0,D.Wf)(Ae)),{position:"relative",paddingInlineStart:k,[`${j}-link`]:{paddingBlock:Ae.linkPaddingBlock,paddingInline:`${Ae.linkPaddingInlineStart}px 0`,"&-title":Object.assign(Object.assign({},D.vS),{position:"relative",display:"block",marginBlockEnd:Ae.anchorTitleBlock,color:Ae.colorText,transition:`all ${Ae.motionDurationSlow}`,"&:only-child":{marginBlockEnd:0}}),[`&-active > ${j}-link-title`]:{color:Ae.colorPrimary},[`${j}-link`]:{paddingBlock:Ae.anchorPaddingBlockSecondary}}}),[`&:not(${j}-wrapper-horizontal)`]:{[j]:{"&::before":{position:"absolute",insetInlineStart:0,top:0,height:"100%",borderInlineStart:`${k}px ${G} ${v}`,content:'" "'},[`${j}-ink`]:{position:"absolute",insetInlineStart:0,display:"none",transform:"translateY(-50%)",transition:`top ${K} ease-in-out`,width:k,backgroundColor:ne,[`&${j}-ink-visible`]:{display:"inline-block"}}}},[`${j}-fixed ${j}-ink ${j}-ink`]:{display:"none"}}}},R=Ae=>{const{componentCls:j,motionDurationSlow:P,lineWidthBold:K,colorPrimary:k}=Ae;return{[`${j}-wrapper-horizontal`]:{position:"relative","&::before":{position:"absolute",left:{_skip_check_:!0,value:0},right:{_skip_check_:!0,value:0},bottom:0,borderBottom:`1px ${Ae.lineType} ${Ae.colorSplit}`,content:'" "'},[j]:{overflowX:"scroll",position:"relative",display:"flex",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},[`${j}-link:first-of-type`]:{paddingInline:0},[`${j}-ink`]:{position:"absolute",bottom:0,transition:`left ${P} ease-in-out, width ${P} ease-in-out`,height:K,backgroundColor:k}}}}};var Z=(0,V.Z)("Anchor",Ae=>{const{fontSize:j,fontSizeLG:P,paddingXXS:K}=Ae,k=(0,q.TS)(Ae,{holderOffsetBlock:K,anchorPaddingBlockSecondary:K/2,anchorTitleBlock:j/14*3,anchorBallSize:P/2});return[B(k),R(k)]},Ae=>({linkPaddingBlock:Ae.paddingXXS,linkPaddingInlineStart:Ae.padding}));function ue(){return window}function M(Ae,j){if(!Ae.getClientRects().length)return 0;const P=Ae.getBoundingClientRect();return P.width||P.height?j===window?(j=Ae.ownerDocument.documentElement,P.top-j.clientTop):P.top-j.getBoundingClientRect().top:P.top}const Y=/#([\S ]+)$/,oe=Ae=>{var j;const{rootClassName:P,anchorPrefixCls:K,className:k,style:ne,offsetTop:G,affix:v=!0,showInkInFixed:y=!1,children:N,items:te,direction:Le="vertical",bounds:Fe,targetOffset:Ue,onClick:Ye,onChange:ut,getContainer:ot,getCurrentAnchor:lt,replace:St}=Ae,[Lt,_t]=O.useState([]),[At,Pt]=O.useState(null),kt=O.useRef(At),fe=O.useRef(null),he=O.useRef(null),se=O.useRef(!1),{direction:Me,getTargetContainer:$e,anchor:F}=O.useContext(Q.E_),le=(j=ot!=null?ot:$e)!==null&&j!==void 0?j:ue,xe=JSON.stringify(Lt),we=(0,_e.useEvent)(gt=>{Lt.includes(gt)||_t(x=>[].concat((0,$.Z)(x),[gt]))}),Ie=(0,_e.useEvent)(gt=>{Lt.includes(gt)&&_t(x=>x.filter(T=>T!==gt))}),Oe=()=>{var gt;const x=(gt=fe.current)===null||gt===void 0?void 0:gt.querySelector(`.${K}-link-title-active`);if(x&&he.current){const{style:T}=he.current,et=Le==="horizontal";T.top=et?"":`${x.offsetTop+x.clientHeight/2}px`,T.height=et?"":`${x.clientHeight}px`,T.left=et?`${x.offsetLeft}px`:"",T.width=et?`${x.clientWidth}px`:"",et&&(0,m.Z)(x,{scrollMode:"if-needed",block:"nearest"})}},Qe=function(gt){let x=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:5;const et=[],W=le();return gt.forEach(Ee=>{const Bt=Y.exec(Ee==null?void 0:Ee.toString());if(!Bt)return;const Be=document.getElementById(Bt[1]);if(Be){const ze=M(Be,W);ze<x+T&&et.push({link:Ee,top:ze})}}),et.length?et.reduce((Bt,Be)=>Be.top>Bt.top?Be:Bt).link:""},it=(0,_e.useEvent)(gt=>{if(kt.current===gt)return;const x=typeof lt=="function"?lt(gt):gt;Pt(x),kt.current=x,ut==null||ut(gt)}),Je=O.useCallback(()=>{if(se.current)return;const gt=Qe(Lt,Ue!==void 0?Ue:G||0,Fe);it(gt)},[xe,Ue,G]),Ke=O.useCallback(gt=>{it(gt);const x=Y.exec(gt);if(!x)return;const T=document.getElementById(x[1]);if(!T)return;const et=le(),W=(0,de.Z)(et,!0),Ee=M(T,et);let Bt=W+Ee;Bt-=Ue!==void 0?Ue:G||0,se.current=!0,(0,ie.Z)(Bt,{getContainer:le,callback(){se.current=!1}})},[Ue,G]),yt=Se()(P,`${K}-wrapper`,{[`${K}-wrapper-horizontal`]:Le==="horizontal",[`${K}-rtl`]:Me==="rtl"},k,F==null?void 0:F.className),De=Se()(K,{[`${K}-fixed`]:!v&&!y}),Pe=Se()(`${K}-ink`,{[`${K}-ink-visible`]:At}),Ze=Object.assign(Object.assign({maxHeight:G?`calc(100vh - ${G}px)`:"100vh"},F==null?void 0:F.style),ne),Ve=gt=>Array.isArray(gt)?gt.map(x=>O.createElement(S,Object.assign({replace:St},x,{key:x.key}),Le==="vertical"&&Ve(x.children))):null,nt=O.createElement("div",{ref:fe,className:yt,style:Ze},O.createElement("div",{className:De},O.createElement("span",{className:Pe,ref:he}),"items"in Ae?Ve(te):N));O.useEffect(()=>{const gt=le();return Je(),gt==null||gt.addEventListener("scroll",Je),()=>{gt==null||gt.removeEventListener("scroll",Je)}},[xe]),O.useEffect(()=>{typeof lt=="function"&&it(lt(kt.current||""))},[lt]),O.useEffect(()=>{Oe()},[Le,lt,xe,At]);const mt=O.useMemo(()=>({registerLink:we,unregisterLink:Ie,scrollTo:Ke,activeLink:At,onClick:Ye,direction:Le}),[At,Ye,Ke,Le]);return O.createElement(E.Provider,{value:mt},v?O.createElement(o.Z,{offsetTop:G,target:le},nt):nt)};var ye=Ae=>{const{prefixCls:j,rootClassName:P}=Ae,{getPrefixCls:K}=O.useContext(Q.E_),k=K("anchor",j),[ne,G]=Z(k);return ne(O.createElement(oe,Object.assign({},Ae,{rootClassName:Se()(G,P),anchorPrefixCls:k})))};const pe=ye;pe.Link=S;var ve=pe},66104:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return K}});var $=w(92310),ae=w.n($),Se=w(11592),_e=w(26112),O=w(59301),m=w(92343),de=w(36355),ie=w(84105),o=w(91857);const Q=k=>{let{children:ne}=k;const{getPrefixCls:G}=O.useContext(de.E_),v=G("breadcrumb");return O.createElement("li",{className:`${v}-separator`,"aria-hidden":"true"},ne===""?ne:ne||"/")};Q.__ANT_BREADCRUMB_SEPARATOR=!0;var U=Q,E=function(k,ne){var G={};for(var v in k)Object.prototype.hasOwnProperty.call(k,v)&&ne.indexOf(v)<0&&(G[v]=k[v]);if(k!=null&&typeof Object.getOwnPropertySymbols=="function")for(var y=0,v=Object.getOwnPropertySymbols(k);y<v.length;y++)ne.indexOf(v[y])<0&&Object.prototype.propertyIsEnumerable.call(k,v[y])&&(G[v[y]]=k[v[y]]);return G};function b(k,ne){if(k.title===void 0||k.title===null)return null;const G=Object.keys(ne).join("|");return typeof k.title=="object"?k.title:String(k.title).replace(new RegExp(`:(${G})`,"g"),(v,y)=>ne[y]||v)}function S(k,ne,G,v){if(G==null)return null;const{className:y,onClick:N}=ne,te=E(ne,["className","onClick"]),Le=Object.assign(Object.assign({},(0,_e.Z)(te,{data:!0,aria:!0})),{onClick:N});return v!==void 0?O.createElement("a",Object.assign({},Le,{className:ae()(`${k}-link`,y),href:v}),G):O.createElement("span",Object.assign({},Le,{className:ae()(`${k}-link`,y)}),G)}function D(k,ne){return(v,y,N,te,Le)=>{if(ne)return ne(v,y,N,te);const Fe=b(v,y);return S(k,v,Fe,Le)}}var V=function(k,ne){var G={};for(var v in k)Object.prototype.hasOwnProperty.call(k,v)&&ne.indexOf(v)<0&&(G[v]=k[v]);if(k!=null&&typeof Object.getOwnPropertySymbols=="function")for(var y=0,v=Object.getOwnPropertySymbols(k);y<v.length;y++)ne.indexOf(v[y])<0&&Object.prototype.propertyIsEnumerable.call(k,v[y])&&(G[v[y]]=k[v[y]]);return G};const q=k=>{const{prefixCls:ne,separator:G="/",children:v,menu:y,overlay:N,dropdownProps:te,href:Le}=k,Ue=(Ye=>{if(y||N){const ut=Object.assign({},te);if(y){const ot=y||{},{items:lt}=ot,St=V(ot,["items"]);ut.menu=Object.assign(Object.assign({},St),{items:lt==null?void 0:lt.map((Lt,_t)=>{var{key:At,title:Pt,label:kt,path:fe}=Lt,he=V(Lt,["key","title","label","path"]);let se=kt!=null?kt:Pt;return fe&&(se=O.createElement("a",{href:`${Le}${fe}`},se)),Object.assign(Object.assign({},he),{key:At!=null?At:_t,label:se})})})}else N&&(ut.overlay=N);return O.createElement(o.Z,Object.assign({placement:"bottom"},ut),O.createElement("span",{className:`${ne}-overlay-link`},Ye,O.createElement(ie.Z,null)))}return Ye})(v);return Ue!=null?O.createElement(O.Fragment,null,O.createElement("li",null,Ue),G&&O.createElement(U,null,G)):null},B=k=>{const{prefixCls:ne,children:G,href:v}=k,y=V(k,["prefixCls","children","href"]),{getPrefixCls:N}=O.useContext(de.E_),te=N("breadcrumb",ne);return O.createElement(q,Object.assign({},y,{prefixCls:te}),S(te,y,G,v))};B.__ANT_BREADCRUMB_ITEM=!0;var R=B,Z=w(17313),ue=w(83116),M=w(37613);const Y=k=>{const{componentCls:ne,iconCls:G}=k;return{[ne]:Object.assign(Object.assign({},(0,Z.Wf)(k)),{color:k.itemColor,fontSize:k.fontSize,[G]:{fontSize:k.iconFontSize},ol:{display:"flex",flexWrap:"wrap",margin:0,padding:0,listStyle:"none"},a:Object.assign({color:k.linkColor,transition:`color ${k.motionDurationMid}`,padding:`0 ${k.paddingXXS}px`,borderRadius:k.borderRadiusSM,height:k.lineHeight*k.fontSize,display:"inline-block",marginInline:-k.marginXXS,"&:hover":{color:k.linkHoverColor,backgroundColor:k.colorBgTextHover}},(0,Z.Qy)(k)),"li:last-child":{color:k.lastItemColor},[`${ne}-separator`]:{marginInline:k.separatorMargin,color:k.separatorColor},[`${ne}-link`]:{[`
|
|
> ${G} + span,
|
|
> ${G} + a
|
|
`]:{marginInlineStart:k.marginXXS}},[`${ne}-overlay-link`]:{borderRadius:k.borderRadiusSM,height:k.lineHeight*k.fontSize,display:"inline-block",padding:`0 ${k.paddingXXS}px`,marginInline:-k.marginXXS,[`> ${G}`]:{marginInlineStart:k.marginXXS,fontSize:k.fontSizeIcon},"&:hover":{color:k.linkHoverColor,backgroundColor:k.colorBgTextHover,a:{color:k.linkHoverColor}},a:{"&:hover":{backgroundColor:"transparent"}}},[`&${k.componentCls}-rtl`]:{direction:"rtl"}})}};var oe=(0,ue.Z)("Breadcrumb",k=>{const ne=(0,M.TS)(k,{});return[Y(ne)]},k=>({itemColor:k.colorTextDescription,lastItemColor:k.colorText,iconFontSize:k.fontSize,linkColor:k.colorTextDescription,linkHoverColor:k.colorText,separatorColor:k.colorTextDescription,separatorMargin:k.marginXS})),J=function(k,ne){var G={};for(var v in k)Object.prototype.hasOwnProperty.call(k,v)&&ne.indexOf(v)<0&&(G[v]=k[v]);if(k!=null&&typeof Object.getOwnPropertySymbols=="function")for(var y=0,v=Object.getOwnPropertySymbols(k);y<v.length;y++)ne.indexOf(v[y])<0&&Object.prototype.propertyIsEnumerable.call(k,v[y])&&(G[v[y]]=k[v[y]]);return G};function ye(k){const{breadcrumbName:ne,children:G}=k,v=J(k,["breadcrumbName","children"]),y=Object.assign({title:ne},v);return G&&(y.menu={items:G.map(N=>{var{breadcrumbName:te}=N,Le=J(N,["breadcrumbName"]);return Object.assign(Object.assign({},Le),{title:te})})}),y}function pe(k,ne){return(0,O.useMemo)(()=>k||(ne?ne.map(ye):null),[k,ne])}var ve=function(k,ne){var G={};for(var v in k)Object.prototype.hasOwnProperty.call(k,v)&&ne.indexOf(v)<0&&(G[v]=k[v]);if(k!=null&&typeof Object.getOwnPropertySymbols=="function")for(var y=0,v=Object.getOwnPropertySymbols(k);y<v.length;y++)ne.indexOf(v[y])<0&&Object.prototype.propertyIsEnumerable.call(k,v[y])&&(G[v[y]]=k[v[y]]);return G};const Ae=(k,ne)=>{if(ne===void 0)return ne;let G=(ne||"").replace(/^\//,"");return Object.keys(k).forEach(v=>{G=G.replace(`:${v}`,k[v])}),G},j=k=>{const{prefixCls:ne,separator:G="/",style:v,className:y,rootClassName:N,routes:te,items:Le,children:Fe,itemRender:Ue,params:Ye={}}=k,ut=ve(k,["prefixCls","separator","style","className","rootClassName","routes","items","children","itemRender","params"]),{getPrefixCls:ot,direction:lt,breadcrumb:St}=O.useContext(de.E_);let Lt;const _t=ot("breadcrumb",ne),[At,Pt]=oe(_t),kt=pe(Le,te),fe=D(_t,Ue);if(kt&&kt.length>0){const Me=[],$e=Le||te;Lt=kt.map((F,le)=>{const{path:xe,key:we,type:Ie,menu:Oe,overlay:Qe,onClick:it,className:Je,separator:Ke,dropdownProps:yt}=F,De=Ae(Ye,xe);De!==void 0&&Me.push(De);const Pe=we!=null?we:le;if(Ie==="separator")return O.createElement(U,{key:Pe},Ke);const Ze={},Ve=le===kt.length-1;Oe?Ze.menu=Oe:Qe&&(Ze.overlay=Qe);let{href:nt}=F;return Me.length&&De!==void 0&&(nt=`#/${Me.join("/")}`),O.createElement(q,Object.assign({key:Pe},Ze,(0,_e.Z)(F,{data:!0,aria:!0}),{className:Je,dropdownProps:yt,href:nt,separator:Ve?"":G,onClick:it,prefixCls:_t}),fe(F,Ye,$e,Me,nt))})}else if(Fe){const Me=(0,Se.Z)(Fe).length;Lt=(0,Se.Z)(Fe).map(($e,F)=>{if(!$e)return $e;const le=F===Me-1;return(0,m.Tm)($e,{separator:le?"":G,key:F})})}const he=ae()(_t,St==null?void 0:St.className,{[`${_t}-rtl`]:lt==="rtl"},y,N,Pt),se=Object.assign(Object.assign({},St==null?void 0:St.style),v);return At(O.createElement("nav",Object.assign({className:he,style:se},ut),O.createElement("ol",null,Lt)))};j.Item=R,j.Separator=U;var P=j,K=P},28103:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return E}});var $=w(92310),ae=w.n($),Se=w(59301),_e=w(36355),O=w(17313),m=w(83116),de=w(37613);const ie=b=>{const{componentCls:S,sizePaddingEdgeHorizontal:D,colorSplit:V,lineWidth:q,textPaddingInline:B,orientationMargin:R,verticalMarginInline:Z}=b;return{[S]:Object.assign(Object.assign({},(0,O.Wf)(b)),{borderBlockStart:`${q}px solid ${V}`,"&-vertical":{position:"relative",top:"-0.06em",display:"inline-block",height:"0.9em",marginInline:Z,marginBlock:0,verticalAlign:"middle",borderTop:0,borderInlineStart:`${q}px solid ${V}`},"&-horizontal":{display:"flex",clear:"both",width:"100%",minWidth:"100%",margin:`${b.dividerHorizontalGutterMargin}px 0`},[`&-horizontal${S}-with-text`]:{display:"flex",alignItems:"center",margin:`${b.dividerHorizontalWithTextGutterMargin}px 0`,color:b.colorTextHeading,fontWeight:500,fontSize:b.fontSizeLG,whiteSpace:"nowrap",textAlign:"center",borderBlockStart:`0 ${V}`,"&::before, &::after":{position:"relative",width:"50%",borderBlockStart:`${q}px solid transparent`,borderBlockStartColor:"inherit",borderBlockEnd:0,transform:"translateY(50%)",content:"''"}},[`&-horizontal${S}-with-text-left`]:{"&::before":{width:`${R*100}%`},"&::after":{width:`${100-R*100}%`}},[`&-horizontal${S}-with-text-right`]:{"&::before":{width:`${100-R*100}%`},"&::after":{width:`${R*100}%`}},[`${S}-inner-text`]:{display:"inline-block",paddingBlock:0,paddingInline:B},"&-dashed":{background:"none",borderColor:V,borderStyle:"dashed",borderWidth:`${q}px 0 0`},[`&-horizontal${S}-with-text${S}-dashed`]:{"&::before, &::after":{borderStyle:"dashed none none"}},[`&-vertical${S}-dashed`]:{borderInlineStartWidth:q,borderInlineEnd:0,borderBlockStart:0,borderBlockEnd:0},[`&-plain${S}-with-text`]:{color:b.colorText,fontWeight:"normal",fontSize:b.fontSize},[`&-horizontal${S}-with-text-left${S}-no-default-orientation-margin-left`]:{"&::before":{width:0},"&::after":{width:"100%"},[`${S}-inner-text`]:{paddingInlineStart:D}},[`&-horizontal${S}-with-text-right${S}-no-default-orientation-margin-right`]:{"&::before":{width:"100%"},"&::after":{width:0},[`${S}-inner-text`]:{paddingInlineEnd:D}}})}};var o=(0,m.Z)("Divider",b=>{const S=(0,de.TS)(b,{dividerHorizontalWithTextGutterMargin:b.margin,dividerHorizontalGutterMargin:b.marginLG,sizePaddingEdgeHorizontal:0});return[ie(S)]},b=>({textPaddingInline:"1em",orientationMargin:.05,verticalMarginInline:b.marginXS})),Q=function(b,S){var D={};for(var V in b)Object.prototype.hasOwnProperty.call(b,V)&&S.indexOf(V)<0&&(D[V]=b[V]);if(b!=null&&typeof Object.getOwnPropertySymbols=="function")for(var q=0,V=Object.getOwnPropertySymbols(b);q<V.length;q++)S.indexOf(V[q])<0&&Object.prototype.propertyIsEnumerable.call(b,V[q])&&(D[V[q]]=b[V[q]]);return D},E=b=>{const{getPrefixCls:S,direction:D,divider:V}=Se.useContext(_e.E_),{prefixCls:q,type:B="horizontal",orientation:R="center",orientationMargin:Z,className:ue,rootClassName:M,children:Y,dashed:oe,plain:J,style:ye}=b,pe=Q(b,["prefixCls","type","orientation","orientationMargin","className","rootClassName","children","dashed","plain","style"]),ve=S("divider",q),[Ae,j]=o(ve),P=R.length>0?`-${R}`:R,K=!!Y,k=R==="left"&&Z!=null,ne=R==="right"&&Z!=null,G=ae()(ve,V==null?void 0:V.className,j,`${ve}-${B}`,{[`${ve}-with-text`]:K,[`${ve}-with-text${P}`]:K,[`${ve}-dashed`]:!!oe,[`${ve}-plain`]:!!J,[`${ve}-rtl`]:D==="rtl",[`${ve}-no-default-orientation-margin-left`]:k,[`${ve}-no-default-orientation-margin-right`]:ne},ue,M),v=Se.useMemo(()=>typeof Z=="number"?Z:/^\d+$/.test(Z)?Number(Z):Z,[Z]),y=Object.assign(Object.assign({},k&&{marginLeft:v}),ne&&{marginRight:v});return Ae(Se.createElement("div",Object.assign({className:G,style:Object.assign(Object.assign({},V==null?void 0:V.style),ye)},pe,{role:"separator"}),Y&&B!=="vertical"&&Se.createElement("span",{className:`${ve}-inner-text`,style:y},Y)))}},91857:function(Nt,rt,w){"use strict";var $=w(59301),ae=w(38819),Se=w(92310),_e=w.n(Se),O=w(31561),m=w(70425),de=w(18929),ie=w(2738),o=w(79676),Q=w(53487),U=w(92343),E=w(36355),b=w(20834),S=w(40875),D=w(88088),V=w(47211);const q=null,B=M=>{const{menu:Y,arrow:oe,prefixCls:J,children:ye,trigger:pe,disabled:ve,dropdownRender:Ae,getPopupContainer:j,overlayClassName:P,rootClassName:K,open:k,onOpenChange:ne,visible:G,onVisibleChange:v,mouseEnterDelay:y=.15,mouseLeaveDelay:N=.1,autoAdjustOverflow:te=!0,placement:Le="",overlay:Fe,transitionName:Ue}=M,{getPopupContainer:Ye,getPrefixCls:ut,direction:ot}=$.useContext(E.E_),lt=$.useMemo(()=>{const Oe=ut();return Ue!==void 0?Ue:Le.includes("top")?`${Oe}-slide-down`:`${Oe}-slide-up`},[ut,Le,Ue]),St=$.useMemo(()=>Le?Le.includes("Center")?Le.slice(0,Le.indexOf("Center")):Le:ot==="rtl"?"bottomRight":"bottomLeft",[Le,ot]),Lt=ut("dropdown",J),[_t,At]=(0,V.Z)(Lt),[,Pt]=(0,D.Z)(),kt=$.Children.only(ye),fe=(0,U.Tm)(kt,{className:_e()(`${Lt}-trigger`,{[`${Lt}-rtl`]:ot==="rtl"},kt.props.className),disabled:ve}),he=ve?[]:pe;let se;he&&he.includes("contextMenu")&&(se=!0);const[Me,$e]=(0,de.Z)(!1,{value:k!=null?k:G}),F=(0,m.useEvent)(Oe=>{ne==null||ne(Oe),v==null||v(Oe),$e(Oe)}),le=_e()(P,K,At,{[`${Lt}-rtl`]:ot==="rtl"}),xe=(0,o.Z)({arrowPointAtCenter:typeof oe=="object"&&oe.pointAtCenter,autoAdjustOverflow:te,offset:Pt.marginXXS,arrowWidth:oe?Pt.sizePopupArrow:0,borderRadius:Pt.borderRadius}),we=$.useCallback(()=>{$e(!1)},[]),Ie=()=>{let Oe;return Y!=null&&Y.items?Oe=$.createElement(b.default,Object.assign({},Y)):typeof Fe=="function"?Oe=Fe():Oe=Fe,Ae&&(Oe=Ae(Oe)),Oe=$.Children.only(typeof Oe=="string"?$.createElement("span",null,Oe):Oe),$.createElement(S.J,{prefixCls:`${Lt}-menu`,expandIcon:$.createElement("span",{className:`${Lt}-menu-submenu-arrow`},$.createElement(ae.Z,{className:`${Lt}-menu-submenu-arrow-icon`})),mode:"vertical",selectable:!1,onClick:we,validator:Qe=>{let{mode:it}=Qe}},Oe)};return _t($.createElement(O.Z,Object.assign({alignPoint:se},(0,ie.Z)(M,["rootClassName"]),{mouseEnterDelay:y,mouseLeaveDelay:N,visible:Me,builtinPlacements:xe,arrow:!!oe,overlayClassName:le,prefixCls:Lt,getPopupContainer:j||Ye,transitionName:lt,trigger:he,overlay:Ie,placement:St,onVisibleChange:F}),fe))};function R(M){return Object.assign(Object.assign({},M),{align:{overflow:{adjustX:!1,adjustY:!1}}})}const Z=(0,Q.Z)(B,"dropdown",M=>M,R),ue=M=>$.createElement(Z,Object.assign({},M),$.createElement("span",null));B._InternalPanelDoNotUseOrYouWillBeFired=ue,rt.Z=B},47211:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return U}});var $=w(17313),ae=w(13826),Se=w(92899),_e=w(29878),O=w(19447),m=w(83116),de=w(37613),o=E=>{const{componentCls:b,menuCls:S,colorError:D,colorTextLightSolid:V}=E,q=`${S}-item`;return{[`${b}, ${b}-menu-submenu`]:{[`${S} ${q}`]:{[`&${q}-danger:not(${q}-disabled)`]:{color:D,"&:hover":{color:V,backgroundColor:D}}}}}};const Q=E=>{const{componentCls:b,menuCls:S,zIndexPopup:D,dropdownArrowDistance:V,sizePopupArrow:q,antCls:B,iconCls:R,motionDurationMid:Z,dropdownPaddingVertical:ue,fontSize:M,dropdownEdgeChildPadding:Y,colorTextDisabled:oe,fontSizeIcon:J,controlPaddingHorizontal:ye,colorBgElevated:pe}=E;return[{[b]:Object.assign(Object.assign({},(0,$.Wf)(E)),{position:"absolute",top:-9999,left:{_skip_check_:!0,value:-9999},zIndex:D,display:"block","&::before":{position:"absolute",insetBlock:-V+q/2,zIndex:-9999,opacity:1e-4,content:'""'},[`&-trigger${B}-btn`]:{[`& > ${R}-down, & > ${B}-btn-icon > ${R}-down`]:{fontSize:J}},[`${b}-wrap`]:{position:"relative",[`${B}-btn > ${R}-down`]:{fontSize:J},[`${R}-down::before`]:{transition:`transform ${Z}`}},[`${b}-wrap-open`]:{[`${R}-down::before`]:{transform:"rotate(180deg)"}},"\n &-hidden,\n &-menu-hidden,\n &-menu-submenu-hidden\n ":{display:"none"},[`&${B}-slide-down-enter${B}-slide-down-enter-active${b}-placement-bottomLeft,
|
|
&${B}-slide-down-appear${B}-slide-down-appear-active${b}-placement-bottomLeft,
|
|
&${B}-slide-down-enter${B}-slide-down-enter-active${b}-placement-bottom,
|
|
&${B}-slide-down-appear${B}-slide-down-appear-active${b}-placement-bottom,
|
|
&${B}-slide-down-enter${B}-slide-down-enter-active${b}-placement-bottomRight,
|
|
&${B}-slide-down-appear${B}-slide-down-appear-active${b}-placement-bottomRight`]:{animationName:ae.fJ},[`&${B}-slide-up-enter${B}-slide-up-enter-active${b}-placement-topLeft,
|
|
&${B}-slide-up-appear${B}-slide-up-appear-active${b}-placement-topLeft,
|
|
&${B}-slide-up-enter${B}-slide-up-enter-active${b}-placement-top,
|
|
&${B}-slide-up-appear${B}-slide-up-appear-active${b}-placement-top,
|
|
&${B}-slide-up-enter${B}-slide-up-enter-active${b}-placement-topRight,
|
|
&${B}-slide-up-appear${B}-slide-up-appear-active${b}-placement-topRight`]:{animationName:ae.Qt},[`&${B}-slide-down-leave${B}-slide-down-leave-active${b}-placement-bottomLeft,
|
|
&${B}-slide-down-leave${B}-slide-down-leave-active${b}-placement-bottom,
|
|
&${B}-slide-down-leave${B}-slide-down-leave-active${b}-placement-bottomRight`]:{animationName:ae.Uw},[`&${B}-slide-up-leave${B}-slide-up-leave-active${b}-placement-topLeft,
|
|
&${B}-slide-up-leave${B}-slide-up-leave-active${b}-placement-top,
|
|
&${B}-slide-up-leave${B}-slide-up-leave-active${b}-placement-topRight`]:{animationName:ae.ly}})},(0,O.ZP)(E,{colorBg:pe,limitVerticalRadius:!0,arrowPlacement:{top:!0,bottom:!0}}),{[`${b} ${S}`]:{position:"relative",margin:0},[`${S}-submenu-popup`]:{position:"absolute",zIndex:D,background:"transparent",boxShadow:"none",transformOrigin:"0 0","ul, li":{listStyle:"none",margin:0}},[`${b}, ${b}-menu-submenu`]:{[S]:Object.assign(Object.assign({padding:Y,listStyleType:"none",backgroundColor:pe,backgroundClip:"padding-box",borderRadius:E.borderRadiusLG,outline:"none",boxShadow:E.boxShadowSecondary},(0,$.Qy)(E)),{[`${S}-item-group-title`]:{padding:`${ue}px ${ye}px`,color:E.colorTextDescription,transition:`all ${Z}`},[`${S}-item`]:{position:"relative",display:"flex",alignItems:"center"},[`${S}-item-icon`]:{minWidth:M,marginInlineEnd:E.marginXS,fontSize:E.fontSizeSM},[`${S}-title-content`]:{flex:"auto","> a":{color:"inherit",transition:`all ${Z}`,"&:hover":{color:"inherit"},"&::after":{position:"absolute",inset:0,content:'""'}}},[`${S}-item, ${S}-submenu-title`]:Object.assign(Object.assign({clear:"both",margin:0,padding:`${ue}px ${ye}px`,color:E.colorText,fontWeight:"normal",fontSize:M,lineHeight:E.lineHeight,cursor:"pointer",transition:`all ${Z}`,borderRadius:E.borderRadiusSM,"&:hover, &-active":{backgroundColor:E.controlItemBgHover}},(0,$.Qy)(E)),{"&-selected":{color:E.colorPrimary,backgroundColor:E.controlItemBgActive,"&:hover, &-active":{backgroundColor:E.controlItemBgActiveHover}},"&-disabled":{color:oe,cursor:"not-allowed","&:hover":{color:oe,backgroundColor:pe,cursor:"not-allowed"},a:{pointerEvents:"none"}},"&-divider":{height:1,margin:`${E.marginXXS}px 0`,overflow:"hidden",lineHeight:0,backgroundColor:E.colorSplit},[`${b}-menu-submenu-expand-icon`]:{position:"absolute",insetInlineEnd:E.paddingXS,[`${b}-menu-submenu-arrow-icon`]:{marginInlineEnd:"0 !important",color:E.colorTextDescription,fontSize:J,fontStyle:"normal"}}}),[`${S}-item-group-list`]:{margin:`0 ${E.marginXS}px`,padding:0,listStyle:"none"},[`${S}-submenu-title`]:{paddingInlineEnd:ye+E.fontSizeSM},[`${S}-submenu-vertical`]:{position:"relative"},[`${S}-submenu${S}-submenu-disabled ${b}-menu-submenu-title`]:{[`&, ${b}-menu-submenu-arrow-icon`]:{color:oe,backgroundColor:pe,cursor:"not-allowed"}},[`${S}-submenu-selected ${b}-menu-submenu-title`]:{color:E.colorPrimary}})}},[(0,ae.oN)(E,"slide-up"),(0,ae.oN)(E,"slide-down"),(0,Se.Fm)(E,"move-up"),(0,Se.Fm)(E,"move-down"),(0,_e._y)(E,"zoom-big")]]};var U=(0,m.Z)("Dropdown",(E,b)=>{let{rootPrefixCls:S}=b;const{marginXXS:D,sizePopupArrow:V,controlHeight:q,fontSize:B,lineHeight:R,paddingXXS:Z,componentCls:ue,borderRadiusLG:M}=E,Y=(q-B*R)/2,{dropdownArrowOffset:oe}=(0,O.fS)({contentRadius:M}),J=(0,de.TS)(E,{menuCls:`${ue}-menu`,rootPrefixCls:S,dropdownArrowDistance:V/2+D,dropdownArrowOffset:oe,dropdownPaddingVertical:Y,dropdownEdgeChildPadding:Z});return[Q(J),o(J)]},E=>({zIndexPopup:E.zIndexPopupBase+50}))},5871:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return yt}});var $=w(84105),ae=w(87395),Se=w(92310),_e=w.n(Se),O=w(72308),m=w(49618),de=w(62853),ie=w(52487),o=w(74416),Q=w(96949),U=w(55090);function E(){return typeof BigInt=="function"}function b(De){return!De&&De!==0&&!Number.isNaN(De)||!String(De).trim()}function S(De){var Pe=De.trim(),Ze=Pe.startsWith("-");Ze&&(Pe=Pe.slice(1)),Pe=Pe.replace(/(\.\d*[^0])0*$/,"$1").replace(/\.0*$/,"").replace(/^0+/,""),Pe.startsWith(".")&&(Pe="0".concat(Pe));var Ve=Pe||"0",nt=Ve.split("."),mt=nt[0]||"0",gt=nt[1]||"0";mt==="0"&>==="0"&&(Ze=!1);var x=Ze?"-":"";return{negative:Ze,negativeStr:x,trimStr:Ve,integerStr:mt,decimalStr:gt,fullStr:"".concat(x).concat(Ve)}}function D(De){var Pe=String(De);return!Number.isNaN(Number(Pe))&&Pe.includes("e")}function V(De){var Pe=String(De);if(D(De)){var Ze=Number(Pe.slice(Pe.indexOf("e-")+2)),Ve=Pe.match(/\.(\d+)/);return Ve!=null&&Ve[1]&&(Ze+=Ve[1].length),Ze}return Pe.includes(".")&&B(Pe)?Pe.length-Pe.indexOf(".")-1:0}function q(De){var Pe=String(De);if(D(De)){if(De>Number.MAX_SAFE_INTEGER)return String(E()?BigInt(De).toString():Number.MAX_SAFE_INTEGER);if(De<Number.MIN_SAFE_INTEGER)return String(E()?BigInt(De).toString():Number.MIN_SAFE_INTEGER);Pe=De.toFixed(V(Pe))}return S(Pe).fullStr}function B(De){return typeof De=="number"?!Number.isNaN(De):De?/^\s*-?\d+(\.\d+)?\s*$/.test(De)||/^\s*-?\d+\.\s*$/.test(De)||/^\s*-?\.\d+\s*$/.test(De):!1}var R=function(){function De(Pe){if((0,Q.Z)(this,De),(0,m.Z)(this,"origin",""),(0,m.Z)(this,"negative",void 0),(0,m.Z)(this,"integer",void 0),(0,m.Z)(this,"decimal",void 0),(0,m.Z)(this,"decimalLen",void 0),(0,m.Z)(this,"empty",void 0),(0,m.Z)(this,"nan",void 0),b(Pe)){this.empty=!0;return}if(this.origin=String(Pe),Pe==="-"||Number.isNaN(Pe)){this.nan=!0;return}var Ze=Pe;if(D(Ze)&&(Ze=Number(Ze)),Ze=typeof Ze=="string"?Ze:q(Ze),B(Ze)){var Ve=S(Ze);this.negative=Ve.negative;var nt=Ve.trimStr.split(".");this.integer=BigInt(nt[0]);var mt=nt[1]||"0";this.decimal=BigInt(mt),this.decimalLen=mt.length}else this.nan=!0}return(0,U.Z)(De,[{key:"getMark",value:function(){return this.negative?"-":""}},{key:"getIntegerStr",value:function(){return this.integer.toString()}},{key:"getDecimalStr",value:function(){return this.decimal.toString().padStart(this.decimalLen,"0")}},{key:"alignDecimal",value:function(Ze){var Ve="".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(Ze,"0"));return BigInt(Ve)}},{key:"negate",value:function(){var Ze=new De(this.toString());return Ze.negative=!Ze.negative,Ze}},{key:"cal",value:function(Ze,Ve,nt){var mt=Math.max(this.getDecimalStr().length,Ze.getDecimalStr().length),gt=this.alignDecimal(mt),x=Ze.alignDecimal(mt),T=Ve(gt,x).toString(),et=nt(mt),W=S(T),Ee=W.negativeStr,Bt=W.trimStr,Be="".concat(Ee).concat(Bt.padStart(et+1,"0"));return new De("".concat(Be.slice(0,-et),".").concat(Be.slice(-et)))}},{key:"add",value:function(Ze){if(this.isInvalidate())return new De(Ze);var Ve=new De(Ze);return Ve.isInvalidate()?this:this.cal(Ve,function(nt,mt){return nt+mt},function(nt){return nt})}},{key:"multi",value:function(Ze){var Ve=new De(Ze);return this.isInvalidate()||Ve.isInvalidate()?new De(NaN):this.cal(Ve,function(nt,mt){return nt*mt},function(nt){return nt*2})}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return this.nan}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(Ze){return this.toString()===(Ze==null?void 0:Ze.toString())}},{key:"lessEquals",value:function(Ze){return this.add(Ze.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.isNaN()?NaN:Number(this.toString())}},{key:"toString",value:function(){var Ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Ze?this.isInvalidate()?"":S("".concat(this.getMark()).concat(this.getIntegerStr(),".").concat(this.getDecimalStr())).fullStr:this.origin}}]),De}(),Z=function(){function De(Pe){if((0,Q.Z)(this,De),(0,m.Z)(this,"origin",""),(0,m.Z)(this,"number",void 0),(0,m.Z)(this,"empty",void 0),b(Pe)){this.empty=!0;return}this.origin=String(Pe),this.number=Number(Pe)}return(0,U.Z)(De,[{key:"negate",value:function(){return new De(-this.toNumber())}},{key:"add",value:function(Ze){if(this.isInvalidate())return new De(Ze);var Ve=Number(Ze);if(Number.isNaN(Ve))return this;var nt=this.number+Ve;if(nt>Number.MAX_SAFE_INTEGER)return new De(Number.MAX_SAFE_INTEGER);if(nt<Number.MIN_SAFE_INTEGER)return new De(Number.MIN_SAFE_INTEGER);var mt=Math.max(V(this.number),V(Ve));return new De(nt.toFixed(mt))}},{key:"multi",value:function(Ze){var Ve=Number(Ze);if(this.isInvalidate()||Number.isNaN(Ve))return new De(NaN);var nt=this.number*Ve;if(nt>Number.MAX_SAFE_INTEGER)return new De(Number.MAX_SAFE_INTEGER);if(nt<Number.MIN_SAFE_INTEGER)return new De(Number.MIN_SAFE_INTEGER);var mt=Math.max(V(this.number),V(Ve));return new De(nt.toFixed(mt))}},{key:"isEmpty",value:function(){return this.empty}},{key:"isNaN",value:function(){return Number.isNaN(this.number)}},{key:"isInvalidate",value:function(){return this.isEmpty()||this.isNaN()}},{key:"equals",value:function(Ze){return this.toNumber()===(Ze==null?void 0:Ze.toNumber())}},{key:"lessEquals",value:function(Ze){return this.add(Ze.negate().toString()).toNumber()<=0}},{key:"toNumber",value:function(){return this.number}},{key:"toString",value:function(){var Ze=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;return Ze?this.isInvalidate()?"":q(this.number):this.origin}}]),De}();function ue(De){return E()?new R(De):new Z(De)}function M(De,Pe,Ze){var Ve=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(De==="")return"";var nt=S(De),mt=nt.negativeStr,gt=nt.integerStr,x=nt.decimalStr,T="".concat(Pe).concat(x),et="".concat(mt).concat(gt);if(Ze>=0){var W=Number(x[Ze]);if(W>=5&&!Ve){var Ee=ue(De).add("".concat(mt,"0.").concat("0".repeat(Ze)).concat(10-W));return M(Ee.toString(),Pe,Ze,Ve)}return Ze===0?et:"".concat(et).concat(Pe).concat(x.padEnd(Ze,"0").slice(0,Ze))}return T===".0"?et:"".concat(et).concat(T)}var Y=ue,oe=w(93681),J=w(34280),ye=w(8654),pe=w(59301),ve=w(48736);function Ae(De,Pe){var Ze=(0,pe.useRef)(null);function Ve(){try{var mt=De.selectionStart,gt=De.selectionEnd,x=De.value,T=x.substring(0,mt),et=x.substring(gt);Ze.current={start:mt,end:gt,value:x,beforeTxt:T,afterTxt:et}}catch(W){}}function nt(){if(De&&Ze.current&&Pe)try{var mt=De.value,gt=Ze.current,x=gt.beforeTxt,T=gt.afterTxt,et=gt.start,W=mt.length;if(mt.endsWith(T))W=mt.length-Ze.current.afterTxt.length;else if(mt.startsWith(x))W=x.length;else{var Ee=x[et-1],Bt=mt.indexOf(Ee,et-1);Bt!==-1&&(W=Bt+1)}De.setSelectionRange(W,W)}catch(Be){(0,ve.ZP)(!1,"Something warning of cursor restore. Please fire issue about this: ".concat(Be.message))}}return[Ve,nt]}var j=w(49658),P=function(){var Pe=(0,pe.useState)(!1),Ze=(0,ie.Z)(Pe,2),Ve=Ze[0],nt=Ze[1];return(0,J.Z)(function(){nt((0,j.Z)())},[]),Ve},K=P,k=w(16089),ne=200,G=600;function v(De){var Pe=De.prefixCls,Ze=De.upNode,Ve=De.downNode,nt=De.upDisabled,mt=De.downDisabled,gt=De.onStep,x=pe.useRef(),T=pe.useRef([]),et=pe.useRef();et.current=gt;var W=function(){clearTimeout(x.current)},Ee=function(Ge,X){Ge.preventDefault(),W(),et.current(X);function Ct(){et.current(X),x.current=setTimeout(Ct,ne)}x.current=setTimeout(Ct,G)};pe.useEffect(function(){return function(){W(),T.current.forEach(function(me){return k.Z.cancel(me)})}},[]);var Bt=K();if(Bt)return null;var Be="".concat(Pe,"-handler"),ze=_e()(Be,"".concat(Be,"-up"),(0,m.Z)({},"".concat(Be,"-up-disabled"),nt)),qe=_e()(Be,"".concat(Be,"-down"),(0,m.Z)({},"".concat(Be,"-down-disabled"),mt)),ee=function(){return T.current.push((0,k.Z)(W))},be={unselectable:"on",role:"button",onMouseUp:ee,onMouseLeave:ee};return pe.createElement("div",{className:"".concat(Be,"-wrap")},pe.createElement("span",(0,O.Z)({},be,{onMouseDown:function(Ge){Ee(Ge,!0)},"aria-label":"Increase Value","aria-disabled":nt,className:ze}),Ze||pe.createElement("span",{unselectable:"on",className:"".concat(Pe,"-handler-up-inner")})),pe.createElement("span",(0,O.Z)({},be,{onMouseDown:function(Ge){Ee(Ge,!1)},"aria-label":"Decrease Value","aria-disabled":mt,className:qe}),Ve||pe.createElement("span",{unselectable:"on",className:"".concat(Pe,"-handler-down-inner")})))}function y(De){var Pe=typeof De=="number"?q(De):S(De).fullStr,Ze=Pe.includes(".");return Ze?S(Pe.replace(/(\d)\.(\d)/g,"$1$2.")).fullStr:De+"0"}var N=w(5643),te=function(){var De=(0,pe.useRef)(0),Pe=function(){k.Z.cancel(De.current)};return(0,pe.useEffect)(function(){return Pe},[]),function(Ze){Pe(),De.current=(0,k.Z)(function(){Ze()})}},Le=["prefixCls","className","style","min","max","step","defaultValue","value","disabled","readOnly","upHandler","downHandler","keyboard","controls","classNames","stringMode","parser","formatter","precision","decimalSeparator","onChange","onInput","onPressEnter","onStep"],Fe=["disabled","style","prefixCls","value","prefix","suffix","addonBefore","addonAfter","classes","className","classNames"],Ue=function(Pe,Ze){return Pe||Ze.isEmpty()?Ze.toString():Ze.toNumber()},Ye=function(Pe){var Ze=Y(Pe);return Ze.isInvalidate()?null:Ze},ut=pe.forwardRef(function(De,Pe){var Ze,Ve=De.prefixCls,nt=Ve===void 0?"rc-input-number":Ve,mt=De.className,gt=De.style,x=De.min,T=De.max,et=De.step,W=et===void 0?1:et,Ee=De.defaultValue,Bt=De.value,Be=De.disabled,ze=De.readOnly,qe=De.upHandler,ee=De.downHandler,be=De.keyboard,me=De.controls,Ge=me===void 0?!0:me,X=De.classNames,Ct=De.stringMode,Ce=De.parser,Ot=De.formatter,zt=De.precision,cr=De.decimalSeparator,sr=De.onChange,Kt=De.onInput,$t=De.onPressEnter,mr=De.onStep,Vr=(0,o.Z)(De,Le),Ur="".concat(nt,"-input"),jr=pe.useRef(null),Vt=pe.useState(!1),or=(0,ie.Z)(Vt,2),Ir=or[0],Kr=or[1],Lr=pe.useRef(!1),ln=pe.useRef(!1),Pr=pe.useRef(!1),Fn=pe.useState(function(){return Y(Bt!=null?Bt:Ee)}),un=(0,ie.Z)(Fn,2),zr=un[0],qt=un[1];function Xt(ir){Bt===void 0&&qt(ir)}var wr=pe.useCallback(function(ir,Xe){if(!Xe)return zt>=0?zt:Math.max(V(ir),V(W))},[zt,W]),Er=pe.useCallback(function(ir){var Xe=String(ir);if(Ce)return Ce(Xe);var Wt=Xe;return cr&&(Wt=Wt.replace(cr,".")),Wt.replace(/[^\w.-]+/g,"")},[Ce,cr]),_r=pe.useRef(""),On=pe.useCallback(function(ir,Xe){if(Ot)return Ot(ir,{userTyping:Xe,input:String(_r.current)});var Wt=typeof ir=="number"?q(ir):ir;if(!Xe){var Jt=wr(Wt,Xe);if(B(Wt)&&(cr||Jt>=0)){var yr=cr||".";Wt=M(Wt,yr,Jt)}}return Wt},[Ot,wr,cr]),Gr=pe.useState(function(){var ir=Ee!=null?Ee:Bt;return zr.isInvalidate()&&["string","number"].includes((0,de.Z)(ir))?Number.isNaN(ir)?"":ir:On(zr.toString(),!1)}),hr=(0,ie.Z)(Gr,2),st=hr[0],at=hr[1];_r.current=st;function bt(ir,Xe){at(On(ir.isInvalidate()?ir.toString(!1):ir.toString(!Xe),Xe))}var Dt=pe.useMemo(function(){return Ye(T)},[T,zt]),vt=pe.useMemo(function(){return Ye(x)},[x,zt]),Ut=pe.useMemo(function(){return!Dt||!zr||zr.isInvalidate()?!1:Dt.lessEquals(zr)},[Dt,zr]),wt=pe.useMemo(function(){return!vt||!zr||zr.isInvalidate()?!1:zr.lessEquals(vt)},[vt,zr]),Zt=Ae(jr.current,Ir),tr=(0,ie.Z)(Zt,2),Qt=tr[0],Tr=tr[1],gr=function(Xe){return Dt&&!Xe.lessEquals(Dt)?Dt:vt&&!vt.lessEquals(Xe)?vt:null},Fr=function(Xe){return!gr(Xe)},nr=function(Xe,Wt){var Jt=Xe,yr=Fr(Jt)||Jt.isEmpty();if(!Jt.isEmpty()&&!Wt&&(Jt=gr(Jt)||Jt,yr=!0),!ze&&!Be&&yr){var Sn=Jt.toString(),vn=wr(Sn,Wt);return vn>=0&&(Jt=Y(M(Sn,".",vn)),Fr(Jt)||(Jt=Y(M(Sn,".",vn,!0)))),Jt.equals(zr)||(Xt(Jt),sr==null||sr(Jt.isEmpty()?null:Ue(Ct,Jt)),Bt===void 0&&bt(Jt,Wt)),Jt}return zr},lr=te(),Zr=function ir(Xe){if(Qt(),_r.current=Xe,at(Xe),!ln.current){var Wt=Er(Xe),Jt=Y(Wt);Jt.isNaN()||nr(Jt,!0)}Kt==null||Kt(Xe),lr(function(){var yr=Xe;Ce||(yr=Xe.replace(/。/g,".")),yr!==Xe&&ir(yr)})},qr=function(){ln.current=!0},rn=function(){ln.current=!1,Zr(jr.current.value)},Yr=function(Xe){Zr(Xe.target.value)},kr=function(Xe){var Wt;if(!(Xe&&Ut||!Xe&&wt)){Lr.current=!1;var Jt=Y(Pr.current?y(W):W);Xe||(Jt=Jt.negate());var yr=(zr||Y(0)).add(Jt.toString()),Sn=nr(yr,!1);mr==null||mr(Ue(Ct,Sn),{offset:Pr.current?y(W):W,type:Xe?"up":"down"}),(Wt=jr.current)===null||Wt===void 0||Wt.focus()}},Mr=function(Xe){var Wt=Y(Er(st)),Jt=Wt;Wt.isNaN()?Jt=nr(zr,Xe):Jt=nr(Wt,Xe),Bt!==void 0?bt(zr,!1):Jt.isNaN()||bt(Jt,!1)},Or=function(){Lr.current=!0},Wr=function(Xe){var Wt=Xe.key,Jt=Xe.shiftKey;Lr.current=!0,Pr.current=Jt,Wt==="Enter"&&(ln.current||(Lr.current=!1),Mr(!1),$t==null||$t(Xe)),be!==!1&&!ln.current&&["Up","ArrowUp","Down","ArrowDown"].includes(Wt)&&(kr(Wt==="Up"||Wt==="ArrowUp"),Xe.preventDefault())},pn=function(){Lr.current=!1,Pr.current=!1},Qr=function(){Mr(!1),Kr(!1),Lr.current=!1};return(0,J.o)(function(){zr.isInvalidate()||bt(zr,!1)},[zt]),(0,J.o)(function(){var ir=Y(Bt);qt(ir);var Xe=Y(Er(st));(!ir.equals(Xe)||!Lr.current||Ot)&&bt(ir,Lr.current)},[Bt]),(0,J.o)(function(){Ot&&Tr()},[st]),pe.createElement("div",{className:_e()(nt,X==null?void 0:X.input,mt,(Ze={},(0,m.Z)(Ze,"".concat(nt,"-focused"),Ir),(0,m.Z)(Ze,"".concat(nt,"-disabled"),Be),(0,m.Z)(Ze,"".concat(nt,"-readonly"),ze),(0,m.Z)(Ze,"".concat(nt,"-not-a-number"),zr.isNaN()),(0,m.Z)(Ze,"".concat(nt,"-out-of-range"),!zr.isInvalidate()&&!Fr(zr)),Ze)),style:gt,onFocus:function(){Kr(!0)},onBlur:Qr,onKeyDown:Wr,onKeyUp:pn,onCompositionStart:qr,onCompositionEnd:rn,onBeforeInput:Or},Ge&&pe.createElement(v,{prefixCls:nt,upNode:qe,downNode:ee,upDisabled:Ut,downDisabled:wt,onStep:kr}),pe.createElement("div",{className:"".concat(Ur,"-wrap")},pe.createElement("input",(0,O.Z)({autoComplete:"off",role:"spinbutton","aria-valuemin":x,"aria-valuemax":T,"aria-valuenow":zr.isInvalidate()?null:zr.toString(),step:W},Vr,{ref:(0,ye.sQ)(jr,Pe),className:Ur,value:st,onChange:Yr,disabled:Be,readOnly:ze}))))}),ot=pe.forwardRef(function(De,Pe){var Ze=De.disabled,Ve=De.style,nt=De.prefixCls,mt=De.value,gt=De.prefix,x=De.suffix,T=De.addonBefore,et=De.addonAfter,W=De.classes,Ee=De.className,Bt=De.classNames,Be=(0,o.Z)(De,Fe),ze=pe.useRef(null),qe=function(be){ze.current&&(0,N.nH)(ze.current,be)};return pe.createElement(oe.BaseInput,{inputElement:pe.createElement(ut,(0,O.Z)({prefixCls:nt,disabled:Ze,classNames:Bt,ref:(0,ye.sQ)(ze,Pe)},Be)),className:Ee,triggerFocus:qe,prefixCls:nt,value:mt,disabled:Ze,style:Ve,prefix:gt,suffix:x,addonAfter:et,addonBefore:T,classes:W,classNames:Bt,components:{affixWrapper:"div",groupWrapper:"div",wrapper:"div",groupAddon:"div"}})});ot.displayName="InputNumber";var lt=ot,St=lt,Lt=w(19080),_t=w(36355),At=w(92736),Pt=w(1684),kt=w(19716),fe=w(32441),he=w(33234),se=w(9937),Me=w(17313),$e=w(74207),F=w(83116),le=w(37613);const xe=(De,Pe)=>{let{componentCls:Ze,borderRadiusSM:Ve,borderRadiusLG:nt}=De;const mt=Pe==="lg"?nt:Ve;return{[`&-${Pe}`]:{[`${Ze}-handler-wrap`]:{borderStartEndRadius:mt,borderEndEndRadius:mt},[`${Ze}-handler-up`]:{borderStartEndRadius:mt},[`${Ze}-handler-down`]:{borderEndEndRadius:mt}}}},we=De=>{const{componentCls:Pe,lineWidth:Ze,lineType:Ve,colorBorder:nt,borderRadius:mt,fontSizeLG:gt,controlHeightLG:x,controlHeightSM:T,colorError:et,paddingInlineSM:W,colorTextDescription:Ee,motionDurationMid:Bt,handleHoverColor:Be,paddingInline:ze,paddingBlock:qe,handleBg:ee,handleActiveBg:be,colorTextDisabled:me,borderRadiusSM:Ge,borderRadiusLG:X,controlWidth:Ct,handleVisible:Ce,handleBorderColor:Ot}=De;return[{[Pe]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,Me.Wf)(De)),(0,se.ik)(De)),(0,se.bi)(De,Pe)),{display:"inline-block",width:Ct,margin:0,padding:0,border:`${Ze}px ${Ve} ${nt}`,borderRadius:mt,"&-rtl":{direction:"rtl",[`${Pe}-input`]:{direction:"rtl"}},"&-lg":{padding:0,fontSize:gt,borderRadius:X,[`input${Pe}-input`]:{height:x-2*Ze}},"&-sm":{padding:0,borderRadius:Ge,[`input${Pe}-input`]:{height:T-2*Ze,padding:`0 ${W}px`}},"&:hover":Object.assign({},(0,se.pU)(De)),"&-focused":Object.assign({},(0,se.M1)(De)),"&-out-of-range":{[`${Pe}-input-wrap`]:{input:{color:et}}},"&-group":Object.assign(Object.assign(Object.assign({},(0,Me.Wf)(De)),(0,se.s7)(De)),{"&-wrapper":{display:"inline-block",textAlign:"start",verticalAlign:"top",[`${Pe}-affix-wrapper`]:{width:"100%"},"&-lg":{[`${Pe}-group-addon`]:{borderRadius:X,fontSize:De.fontSizeLG}},"&-sm":{[`${Pe}-group-addon`]:{borderRadius:Ge}},[`${Pe}-wrapper-disabled > ${Pe}-group-addon`]:Object.assign({},(0,se.Xy)(De))}}),[`&-disabled ${Pe}-input`]:{cursor:"not-allowed"},[Pe]:{"&-input":Object.assign(Object.assign(Object.assign(Object.assign({},(0,Me.Wf)(De)),{width:"100%",padding:`${qe}px ${ze}px`,textAlign:"start",backgroundColor:"transparent",border:0,borderRadius:mt,outline:0,transition:`all ${Bt} linear`,appearance:"textfield",fontSize:"inherit"}),(0,se.nz)(De.colorTextPlaceholder)),{'&[type="number"]::-webkit-inner-spin-button, &[type="number"]::-webkit-outer-spin-button':{margin:0,webkitAppearance:"none",appearance:"none"}})}})},{[Pe]:Object.assign(Object.assign(Object.assign({[`&:hover ${Pe}-handler-wrap, &-focused ${Pe}-handler-wrap`]:{opacity:1},[`${Pe}-handler-wrap`]:{position:"absolute",insetBlockStart:0,insetInlineEnd:0,width:De.handleWidth,height:"100%",background:ee,borderStartStartRadius:0,borderStartEndRadius:mt,borderEndEndRadius:mt,borderEndStartRadius:0,opacity:Ce===!0?1:0,display:"flex",flexDirection:"column",alignItems:"stretch",transition:`opacity ${Bt} linear ${Bt}`,[`${Pe}-handler`]:{display:"flex",alignItems:"center",justifyContent:"center",flex:"auto",height:"40%",[`
|
|
${Pe}-handler-up-inner,
|
|
${Pe}-handler-down-inner
|
|
`]:{marginInlineEnd:0,fontSize:De.handleFontSize}}},[`${Pe}-handler`]:{height:"50%",overflow:"hidden",color:Ee,fontWeight:"bold",lineHeight:0,textAlign:"center",cursor:"pointer",borderInlineStart:`${Ze}px ${Ve} ${Ot}`,transition:`all ${Bt} linear`,"&:active":{background:be},"&:hover":{height:"60%",[`
|
|
${Pe}-handler-up-inner,
|
|
${Pe}-handler-down-inner
|
|
`]:{color:Be}},"&-up-inner, &-down-inner":Object.assign(Object.assign({},(0,Me.Ro)()),{color:Ee,transition:`all ${Bt} linear`,userSelect:"none"})},[`${Pe}-handler-up`]:{borderStartEndRadius:mt},[`${Pe}-handler-down`]:{borderBlockStart:`${Ze}px ${Ve} ${Ot}`,borderEndEndRadius:mt}},xe(De,"lg")),xe(De,"sm")),{"&-disabled, &-readonly":{[`${Pe}-handler-wrap`]:{display:"none"},[`${Pe}-input`]:{color:"inherit"}},[`
|
|
${Pe}-handler-up-disabled,
|
|
${Pe}-handler-down-disabled
|
|
`]:{cursor:"not-allowed"},[`
|
|
${Pe}-handler-up-disabled:hover &-handler-up-inner,
|
|
${Pe}-handler-down-disabled:hover &-handler-down-inner
|
|
`]:{color:me}})},{[`${Pe}-borderless`]:{borderColor:"transparent",boxShadow:"none",[`${Pe}-handler-down`]:{borderBlockStartWidth:0}}}]},Ie=De=>{const{componentCls:Pe,paddingBlock:Ze,paddingInline:Ve,inputAffixPadding:nt,controlWidth:mt,borderRadiusLG:gt,borderRadiusSM:x}=De;return{[`${Pe}-affix-wrapper`]:Object.assign(Object.assign(Object.assign({},(0,se.ik)(De)),(0,se.bi)(De,`${Pe}-affix-wrapper`)),{position:"relative",display:"inline-flex",width:mt,padding:0,paddingInlineStart:Ve,"&-lg":{borderRadius:gt},"&-sm":{borderRadius:x},[`&:not(${Pe}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},(0,se.pU)(De)),{zIndex:1}),"&-focused, &:focus":{zIndex:1},[`&-disabled > ${Pe}-disabled`]:{background:"transparent"},[`> div${Pe}`]:{width:"100%",border:"none",outline:"none",[`&${Pe}-focused`]:{boxShadow:"none !important"}},[`input${Pe}-input`]:{padding:`${Ze}px 0`},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${Pe}-handler-wrap`]:{zIndex:2},[Pe]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center",pointerEvents:"none"},"&-prefix":{marginInlineEnd:nt},"&-suffix":{position:"absolute",insetBlockStart:0,insetInlineEnd:0,zIndex:1,height:"100%",marginInlineEnd:Ve,marginInlineStart:nt}}})}};var Oe=(0,F.Z)("InputNumber",De=>{const Pe=(0,le.TS)(De,(0,se.e5)(De));return[we(Pe),Ie(Pe),(0,$e.c)(Pe)]},De=>Object.assign(Object.assign({},(0,se.TM)(De)),{controlWidth:90,handleWidth:De.controlHeightSM-De.lineWidth*2,handleFontSize:De.fontSize/2,handleVisible:"auto",handleActiveBg:De.colorFillAlter,handleBg:De.colorBgContainer,handleHoverColor:De.colorPrimary,handleBorderColor:De.colorBorder})),Qe=function(De,Pe){var Ze={};for(var Ve in De)Object.prototype.hasOwnProperty.call(De,Ve)&&Pe.indexOf(Ve)<0&&(Ze[Ve]=De[Ve]);if(De!=null&&typeof Object.getOwnPropertySymbols=="function")for(var nt=0,Ve=Object.getOwnPropertySymbols(De);nt<Ve.length;nt++)Pe.indexOf(Ve[nt])<0&&Object.prototype.propertyIsEnumerable.call(De,Ve[nt])&&(Ze[Ve[nt]]=De[Ve[nt]]);return Ze};const it=pe.forwardRef((De,Pe)=>{const{getPrefixCls:Ze,direction:Ve}=pe.useContext(_t.E_),nt=pe.useRef(null);pe.useImperativeHandle(Pe,()=>nt.current);const{className:mt,rootClassName:gt,size:x,disabled:T,prefixCls:et,addonBefore:W,addonAfter:Ee,prefix:Bt,bordered:Be=!0,readOnly:ze,status:qe,controls:ee}=De,be=Qe(De,["className","rootClassName","size","disabled","prefixCls","addonBefore","addonAfter","prefix","bordered","readOnly","status","controls"]),me=Ze("input-number",et),[Ge,X]=Oe(me),{compactSize:Ct,compactItemClassnames:Ce}=(0,he.ri)(me,Ve);let Ot=pe.createElement(ae.Z,{className:`${me}-handler-up-inner`}),zt=pe.createElement($.Z,{className:`${me}-handler-down-inner`});const cr=typeof ee=="boolean"?ee:void 0;typeof ee=="object"&&(Ot=typeof ee.upIcon=="undefined"?Ot:pe.createElement("span",{className:`${me}-handler-up-inner`},ee.upIcon),zt=typeof ee.downIcon=="undefined"?zt:pe.createElement("span",{className:`${me}-handler-down-inner`},ee.downIcon));const{hasFeedback:sr,status:Kt,isFormItemInput:$t,feedbackIcon:mr}=pe.useContext(fe.aM),Vr=(0,Lt.F)(Kt,qe),Ur=(0,kt.Z)(Lr=>{var ln;return(ln=x!=null?x:Ct)!==null&&ln!==void 0?ln:Lr}),jr=pe.useContext(Pt.Z),Vt=T!=null?T:jr,or=_e()({[`${me}-lg`]:Ur==="large",[`${me}-sm`]:Ur==="small",[`${me}-rtl`]:Ve==="rtl",[`${me}-borderless`]:!Be,[`${me}-in-form-item`]:$t},(0,Lt.Z)(me,Vr),Ce,X),Ir=`${me}-group`,Kr=pe.createElement(St,Object.assign({ref:nt,disabled:Vt,className:_e()(mt,gt),upHandler:Ot,downHandler:zt,prefixCls:me,readOnly:ze,controls:cr,prefix:Bt,suffix:sr&&mr,addonAfter:Ee&&pe.createElement(he.BR,null,pe.createElement(fe.Ux,{override:!0,status:!0},Ee)),addonBefore:W&&pe.createElement(he.BR,null,pe.createElement(fe.Ux,{override:!0,status:!0},W)),classNames:{input:or},classes:{affixWrapper:_e()((0,Lt.Z)(`${me}-affix-wrapper`,Vr,sr),{[`${me}-affix-wrapper-sm`]:Ur==="small",[`${me}-affix-wrapper-lg`]:Ur==="large",[`${me}-affix-wrapper-rtl`]:Ve==="rtl",[`${me}-affix-wrapper-borderless`]:!Be},X),wrapper:_e()({[`${Ir}-rtl`]:Ve==="rtl",[`${me}-wrapper-disabled`]:Vt},X),group:_e()({[`${me}-group-wrapper-sm`]:Ur==="small",[`${me}-group-wrapper-lg`]:Ur==="large",[`${me}-group-wrapper-rtl`]:Ve==="rtl"},(0,Lt.Z)(`${me}-group-wrapper`,Vr,sr),X)}},be));return Ge(Kr)}),Je=it,Ke=De=>pe.createElement(At.ZP,{theme:{components:{InputNumber:{handleVisible:!0}}}},pe.createElement(it,Object.assign({},De)));Je._InternalPanelDoNotUseOrYouWillBeFired=Ke;var yt=Je},9432:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return R},n:function(){return q}});var $=w(19248),ae=w(92310),Se=w.n(ae),_e=w(93681),O=w(8654),m=w(59301),de=w(19080),ie=w(36355),o=w(1684),Q=w(19716),U=w(32441),E=w(33234),b=w(59412),S=w(9937);function D(Z){return!!(Z.prefix||Z.suffix||Z.allowClear)}var V=function(Z,ue){var M={};for(var Y in Z)Object.prototype.hasOwnProperty.call(Z,Y)&&ue.indexOf(Y)<0&&(M[Y]=Z[Y]);if(Z!=null&&typeof Object.getOwnPropertySymbols=="function")for(var oe=0,Y=Object.getOwnPropertySymbols(Z);oe<Y.length;oe++)ue.indexOf(Y[oe])<0&&Object.prototype.propertyIsEnumerable.call(Z,Y[oe])&&(M[Y[oe]]=Z[Y[oe]]);return M};function q(Z,ue){if(!Z)return;Z.focus(ue);const{cursor:M}=ue||{};if(M){const Y=Z.value.length;switch(M){case"start":Z.setSelectionRange(0,0);break;case"end":Z.setSelectionRange(Y,Y);break;default:Z.setSelectionRange(0,Y);break}}}var R=(0,m.forwardRef)((Z,ue)=>{var M;const{prefixCls:Y,bordered:oe=!0,status:J,size:ye,disabled:pe,onBlur:ve,onFocus:Ae,suffix:j,allowClear:P,addonAfter:K,addonBefore:k,className:ne,style:G,styles:v,rootClassName:y,onChange:N,classNames:te}=Z,Le=V(Z,["prefixCls","bordered","status","size","disabled","onBlur","onFocus","suffix","allowClear","addonAfter","addonBefore","className","style","styles","rootClassName","onChange","classNames"]),{getPrefixCls:Fe,direction:Ue,input:Ye}=m.useContext(ie.E_),ut=Fe("input",Y),ot=(0,m.useRef)(null),[lt,St]=(0,S.ZP)(ut),{compactSize:Lt,compactItemClassnames:_t}=(0,E.ri)(ut,Ue),At=(0,Q.Z)(it=>{var Je;return(Je=ye!=null?ye:Lt)!==null&&Je!==void 0?Je:it}),Pt=m.useContext(o.Z),kt=pe!=null?pe:Pt,{status:fe,hasFeedback:he,feedbackIcon:se}=(0,m.useContext)(U.aM),Me=(0,de.F)(fe,J),$e=D(Z)||!!he,F=(0,m.useRef)($e);(0,m.useEffect)(()=>{var it;$e&&F.current,F.current=$e},[$e]);const le=(0,b.Z)(ot,!0),xe=it=>{le(),ve==null||ve(it)},we=it=>{le(),Ae==null||Ae(it)},Ie=it=>{le(),N==null||N(it)},Oe=(he||j)&&m.createElement(m.Fragment,null,j,he&&se);let Qe;return typeof P=="object"&&(P!=null&&P.clearIcon)?Qe=P:P&&(Qe={clearIcon:m.createElement($.Z,null)}),lt(m.createElement(_e.default,Object.assign({ref:(0,O.sQ)(ue,ot),prefixCls:ut,autoComplete:Ye==null?void 0:Ye.autoComplete},Le,{disabled:kt,onBlur:xe,onFocus:we,style:Object.assign(Object.assign({},Ye==null?void 0:Ye.style),G),styles:Object.assign(Object.assign({},Ye==null?void 0:Ye.styles),v),suffix:Oe,allowClear:Qe,className:Se()(ne,y,_t,Ye==null?void 0:Ye.className),onChange:Ie,addonAfter:K&&m.createElement(E.BR,null,m.createElement(U.Ux,{override:!0,status:!0},K)),addonBefore:k&&m.createElement(E.BR,null,m.createElement(U.Ux,{override:!0,status:!0},k)),classNames:Object.assign(Object.assign(Object.assign({},te),Ye==null?void 0:Ye.classNames),{input:Se()({[`${ut}-sm`]:At==="small",[`${ut}-lg`]:At==="large",[`${ut}-rtl`]:Ue==="rtl",[`${ut}-borderless`]:!oe},!$e&&(0,de.Z)(ut,Me),te==null?void 0:te.input,(M=Ye==null?void 0:Ye.classNames)===null||M===void 0?void 0:M.input,St)}),classes:{affixWrapper:Se()({[`${ut}-affix-wrapper-sm`]:At==="small",[`${ut}-affix-wrapper-lg`]:At==="large",[`${ut}-affix-wrapper-rtl`]:Ue==="rtl",[`${ut}-affix-wrapper-borderless`]:!oe},(0,de.Z)(`${ut}-affix-wrapper`,Me,he),St),wrapper:Se()({[`${ut}-group-rtl`]:Ue==="rtl"},St),group:Se()({[`${ut}-group-wrapper-sm`]:At==="small",[`${ut}-group-wrapper-lg`]:At==="large",[`${ut}-group-wrapper-rtl`]:Ue==="rtl",[`${ut}-group-wrapper-disabled`]:kt},(0,de.Z)(`${ut}-group-wrapper`,Me,he),St)}})))})},1643:function(Nt,rt,w){"use strict";var $=w(19248),ae=w(92310),Se=w.n(ae),_e=w(9296),O=w(59301),m=w(19080),de=w(36355),ie=w(1684),o=w(19716),Q=w(32441),U=w(9432),E=w(9937),b=function(D,V){var q={};for(var B in D)Object.prototype.hasOwnProperty.call(D,B)&&V.indexOf(B)<0&&(q[B]=D[B]);if(D!=null&&typeof Object.getOwnPropertySymbols=="function")for(var R=0,B=Object.getOwnPropertySymbols(D);R<B.length;R++)V.indexOf(B[R])<0&&Object.prototype.propertyIsEnumerable.call(D,B[R])&&(q[B[R]]=D[B[R]]);return q};const S=(0,O.forwardRef)((D,V)=>{const{prefixCls:q,bordered:B=!0,size:R,disabled:Z,status:ue,allowClear:M,showCount:Y,classNames:oe,rootClassName:J,className:ye}=D,pe=b(D,["prefixCls","bordered","size","disabled","status","allowClear","showCount","classNames","rootClassName","className"]),{getPrefixCls:ve,direction:Ae}=O.useContext(de.E_),j=(0,o.Z)(R),P=O.useContext(ie.Z),K=Z!=null?Z:P,{status:k,hasFeedback:ne,feedbackIcon:G}=O.useContext(Q.aM),v=(0,m.F)(k,ue),y=O.useRef(null);O.useImperativeHandle(V,()=>{var Ue;return{resizableTextArea:(Ue=y.current)===null||Ue===void 0?void 0:Ue.resizableTextArea,focus:Ye=>{var ut,ot;(0,U.n)((ot=(ut=y.current)===null||ut===void 0?void 0:ut.resizableTextArea)===null||ot===void 0?void 0:ot.textArea,Ye)},blur:()=>{var Ye;return(Ye=y.current)===null||Ye===void 0?void 0:Ye.blur()}}});const N=ve("input",q);let te;typeof M=="object"&&(M!=null&&M.clearIcon)?te=M:M&&(te={clearIcon:O.createElement($.Z,null)});const[Le,Fe]=(0,E.ZP)(N);return Le(O.createElement(_e.default,Object.assign({},pe,{disabled:K,allowClear:te,className:Se()(ye,J),classes:{affixWrapper:Se()(`${N}-textarea-affix-wrapper`,{[`${N}-affix-wrapper-rtl`]:Ae==="rtl",[`${N}-affix-wrapper-borderless`]:!B,[`${N}-affix-wrapper-sm`]:j==="small",[`${N}-affix-wrapper-lg`]:j==="large",[`${N}-textarea-show-count`]:Y},(0,m.Z)(`${N}-affix-wrapper`,v),Fe)},classNames:Object.assign(Object.assign({},oe),{textarea:Se()({[`${N}-borderless`]:!B,[`${N}-sm`]:j==="small",[`${N}-lg`]:j==="large"},(0,m.Z)(N,v),Fe,oe==null?void 0:oe.textarea)}),prefixCls:N,suffix:ne&&O.createElement("span",{className:`${N}-textarea-suffix`},G),showCount:Y,ref:y})))});rt.Z=S},59412:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return ae}});var $=w(59301);function ae(Se,_e){const O=(0,$.useRef)([]),m=()=>{O.current.push(setTimeout(()=>{var de,ie,o,Q;!((de=Se.current)===null||de===void 0)&&de.input&&((ie=Se.current)===null||ie===void 0?void 0:ie.input.getAttribute("type"))==="password"&&(!((o=Se.current)===null||o===void 0)&&o.input.hasAttribute("value"))&&((Q=Se.current)===null||Q===void 0||Q.input.removeAttribute("value"))}))};return(0,$.useEffect)(()=>(_e&&m(),()=>O.current.forEach(de=>{de&&clearTimeout(de)})),[]),m}},92832:function(Nt,rt,w){"use strict";w.d(rt,{default:function(){return j}});var $=w(92310),ae=w.n($),Se=w(59301),_e=w(36355),O=w(32441),m=w(9937),ie=P=>{const{getPrefixCls:K,direction:k}=(0,Se.useContext)(_e.E_),{prefixCls:ne,className:G}=P,v=K("input-group",ne),y=K("input"),[N,te]=(0,m.ZP)(y),Le=ae()(v,{[`${v}-lg`]:P.size==="large",[`${v}-sm`]:P.size==="small",[`${v}-compact`]:P.compact,[`${v}-rtl`]:k==="rtl"},te,G),Fe=(0,Se.useContext)(O.aM),Ue=(0,Se.useMemo)(()=>Object.assign(Object.assign({},Fe),{isFormItemInput:!1}),[Fe]);return N(Se.createElement("span",{className:Le,style:P.style,onMouseEnter:P.onMouseEnter,onMouseLeave:P.onMouseLeave,onFocus:P.onFocus,onBlur:P.onBlur},Se.createElement(O.aM.Provider,{value:Ue},P.children)))},o=w(9432),Q=w(73331),U=w(15277),E=w(2738),b=w(8654),S=w(59412),D=function(P,K){var k={};for(var ne in P)Object.prototype.hasOwnProperty.call(P,ne)&&K.indexOf(ne)<0&&(k[ne]=P[ne]);if(P!=null&&typeof Object.getOwnPropertySymbols=="function")for(var G=0,ne=Object.getOwnPropertySymbols(P);G<ne.length;G++)K.indexOf(ne[G])<0&&Object.prototype.propertyIsEnumerable.call(P,ne[G])&&(k[ne[G]]=P[ne[G]]);return k};const V=P=>P?Se.createElement(U.Z,null):Se.createElement(Q.Z,null),q={click:"onClick",hover:"onMouseOver"};var R=Se.forwardRef((P,K)=>{const{visibilityToggle:k=!0}=P,ne=typeof k=="object"&&k.visible!==void 0,[G,v]=(0,Se.useState)(()=>ne?k.visible:!1),y=(0,Se.useRef)(null);Se.useEffect(()=>{ne&&v(k.visible)},[ne,k]);const N=(0,S.Z)(y),te=()=>{const{disabled:kt}=P;kt||(G&&N(),v(fe=>{var he;const se=!fe;return typeof k=="object"&&((he=k.onVisibleChange)===null||he===void 0||he.call(k,se)),se}))},Le=kt=>{const{action:fe="click",iconRender:he=V}=P,se=q[fe]||"",Me=he(G),$e={[se]:te,className:`${kt}-icon`,key:"passwordIcon",onMouseDown:F=>{F.preventDefault()},onMouseUp:F=>{F.preventDefault()}};return Se.cloneElement(Se.isValidElement(Me)?Me:Se.createElement("span",null,Me),$e)},{className:Fe,prefixCls:Ue,inputPrefixCls:Ye,size:ut}=P,ot=D(P,["className","prefixCls","inputPrefixCls","size"]),{getPrefixCls:lt}=Se.useContext(_e.E_),St=lt("input",Ye),Lt=lt("input-password",Ue),_t=k&&Le(Lt),At=ae()(Lt,Fe,{[`${Lt}-${ut}`]:!!ut}),Pt=Object.assign(Object.assign({},(0,E.Z)(ot,["suffix","iconRender","visibilityToggle"])),{type:G?"text":"password",className:At,prefixCls:St,suffix:_t});return ut&&(Pt.size=ut),Se.createElement(o.Z,Object.assign({ref:(0,b.sQ)(K,y)},Pt))}),Z=w(47472),ue=w(92343),M=w(3113),Y=w(19716),oe=w(33234),J=function(P,K){var k={};for(var ne in P)Object.prototype.hasOwnProperty.call(P,ne)&&K.indexOf(ne)<0&&(k[ne]=P[ne]);if(P!=null&&typeof Object.getOwnPropertySymbols=="function")for(var G=0,ne=Object.getOwnPropertySymbols(P);G<ne.length;G++)K.indexOf(ne[G])<0&&Object.prototype.propertyIsEnumerable.call(P,ne[G])&&(k[ne[G]]=P[ne[G]]);return k},pe=Se.forwardRef((P,K)=>{const{prefixCls:k,inputPrefixCls:ne,className:G,size:v,suffix:y,enterButton:N=!1,addonAfter:te,loading:Le,disabled:Fe,onSearch:Ue,onChange:Ye,onCompositionStart:ut,onCompositionEnd:ot}=P,lt=J(P,["prefixCls","inputPrefixCls","className","size","suffix","enterButton","addonAfter","loading","disabled","onSearch","onChange","onCompositionStart","onCompositionEnd"]),{getPrefixCls:St,direction:Lt}=Se.useContext(_e.E_),_t=Se.useRef(!1),At=St("input-search",k),Pt=St("input",ne),{compactSize:kt}=(0,oe.ri)(At,Lt),fe=(0,Y.Z)(Ke=>{var yt;return(yt=v!=null?v:kt)!==null&&yt!==void 0?yt:Ke}),he=Se.useRef(null),se=Ke=>{Ke&&Ke.target&&Ke.type==="click"&&Ue&&Ue(Ke.target.value,Ke,{source:"clear"}),Ye&&Ye(Ke)},Me=Ke=>{var yt;document.activeElement===((yt=he.current)===null||yt===void 0?void 0:yt.input)&&Ke.preventDefault()},$e=Ke=>{var yt,De;Ue&&Ue((De=(yt=he.current)===null||yt===void 0?void 0:yt.input)===null||De===void 0?void 0:De.value,Ke,{source:"input"})},F=Ke=>{_t.current||Le||$e(Ke)},le=typeof N=="boolean"?Se.createElement(Z.Z,null):null,xe=`${At}-button`;let we;const Ie=N||{},Oe=Ie.type&&Ie.type.__ANT_BUTTON===!0;Oe||Ie.type==="button"?we=(0,ue.Tm)(Ie,Object.assign({onMouseDown:Me,onClick:Ke=>{var yt,De;(De=(yt=Ie==null?void 0:Ie.props)===null||yt===void 0?void 0:yt.onClick)===null||De===void 0||De.call(yt,Ke),$e(Ke)},key:"enterButton"},Oe?{className:xe,size:fe}:{})):we=Se.createElement(M.ZP,{className:xe,type:N?"primary":void 0,size:fe,disabled:Fe,key:"enterButton",onMouseDown:Me,onClick:$e,loading:Le,icon:le},N),te&&(we=[we,(0,ue.Tm)(te,{key:"addonAfter"})]);const Qe=ae()(At,{[`${At}-rtl`]:Lt==="rtl",[`${At}-${fe}`]:!!fe,[`${At}-with-button`]:!!N},G),it=Ke=>{_t.current=!0,ut==null||ut(Ke)},Je=Ke=>{_t.current=!1,ot==null||ot(Ke)};return Se.createElement(o.Z,Object.assign({ref:(0,b.sQ)(he,K),onPressEnter:F},lt,{size:fe,onCompositionStart:it,onCompositionEnd:Je,prefixCls:Pt,addonAfter:we,suffix:y,onChange:se,className:Qe,disabled:Fe}))}),ve=w(1643);const Ae=o.Z;Ae.Group=ie,Ae.Search=pe,Ae.TextArea=ve.Z,Ae.Password=R;var j=Ae},9937:function(Nt,rt,w){"use strict";w.d(rt,{M1:function(){return de},TM:function(){return ue},Xy:function(){return ie},bi:function(){return U},e5:function(){return Z},ik:function(){return E},nz:function(){return O},pU:function(){return m},s7:function(){return b},x0:function(){return Q}});var $=w(17313),ae=w(74207),Se=w(37613),_e=w(83116);const O=M=>({"&::-moz-placeholder":{opacity:1},"&::placeholder":{color:M,userSelect:"none"},"&:placeholder-shown":{textOverflow:"ellipsis"}}),m=M=>({borderColor:M.hoverBorderColor}),de=M=>({borderColor:M.activeBorderColor,boxShadow:M.activeShadow,outline:0}),ie=M=>({color:M.colorTextDisabled,backgroundColor:M.colorBgContainerDisabled,borderColor:M.colorBorder,boxShadow:"none",cursor:"not-allowed",opacity:1,"&:hover":Object.assign({},m((0,Se.TS)(M,{hoverBorderColor:M.colorBorder})))}),o=M=>{const{paddingBlockLG:Y,fontSizeLG:oe,lineHeightLG:J,borderRadiusLG:ye,paddingInlineLG:pe}=M;return{padding:`${Y}px ${pe}px`,fontSize:oe,lineHeight:J,borderRadius:ye}},Q=M=>({padding:`${M.paddingBlockSM}px ${M.paddingInlineSM}px`,borderRadius:M.borderRadiusSM}),U=(M,Y)=>{const{componentCls:oe,colorError:J,colorWarning:ye,errorActiveShadow:pe,warningActiveShadow:ve,colorErrorBorderHover:Ae,colorWarningBorderHover:j}=M;return{[`&-status-error:not(${Y}-disabled):not(${Y}-borderless)${Y}`]:{borderColor:J,"&:hover":{borderColor:Ae},"&:focus, &-focused":Object.assign({},de((0,Se.TS)(M,{activeBorderColor:J,activeShadow:pe}))),[`${oe}-prefix, ${oe}-suffix`]:{color:J}},[`&-status-warning:not(${Y}-disabled):not(${Y}-borderless)${Y}`]:{borderColor:ye,"&:hover":{borderColor:j},"&:focus, &-focused":Object.assign({},de((0,Se.TS)(M,{activeBorderColor:ye,activeShadow:ve}))),[`${oe}-prefix, ${oe}-suffix`]:{color:ye}}}},E=M=>Object.assign(Object.assign({position:"relative",display:"inline-block",width:"100%",minWidth:0,padding:`${M.paddingBlock}px ${M.paddingInline}px`,color:M.colorText,fontSize:M.fontSize,lineHeight:M.lineHeight,backgroundColor:M.colorBgContainer,backgroundImage:"none",borderWidth:M.lineWidth,borderStyle:M.lineType,borderColor:M.colorBorder,borderRadius:M.borderRadius,transition:`all ${M.motionDurationMid}`},O(M.colorTextPlaceholder)),{"&:hover":Object.assign({},m(M)),"&:focus, &-focused":Object.assign({},de(M)),"&-disabled, &[disabled]":Object.assign({},ie(M)),"&-borderless":{"&, &:hover, &:focus, &-focused, &-disabled, &[disabled]":{backgroundColor:"transparent",border:"none",boxShadow:"none"}},"textarea&":{maxWidth:"100%",height:"auto",minHeight:M.controlHeight,lineHeight:M.lineHeight,verticalAlign:"bottom",transition:`all ${M.motionDurationSlow}, height 0s`,resize:"vertical"},"&-lg":Object.assign({},o(M)),"&-sm":Object.assign({},Q(M)),"&-rtl":{direction:"rtl"},"&-textarea-rtl":{direction:"rtl"}}),b=M=>{const{componentCls:Y,antCls:oe}=M;return{position:"relative",display:"table",width:"100%",borderCollapse:"separate",borderSpacing:0,"&[class*='col-']":{paddingInlineEnd:M.paddingXS,"&:last-child":{paddingInlineEnd:0}},[`&-lg ${Y}, &-lg > ${Y}-group-addon`]:Object.assign({},o(M)),[`&-sm ${Y}, &-sm > ${Y}-group-addon`]:Object.assign({},Q(M)),[`&-lg ${oe}-select-single ${oe}-select-selector`]:{height:M.controlHeightLG},[`&-sm ${oe}-select-single ${oe}-select-selector`]:{height:M.controlHeightSM},[`> ${Y}`]:{display:"table-cell","&:not(:first-child):not(:last-child)":{borderRadius:0}},[`${Y}-group`]:{"&-addon, &-wrap":{display:"table-cell",width:1,whiteSpace:"nowrap",verticalAlign:"middle","&:not(:first-child):not(:last-child)":{borderRadius:0}},"&-wrap > *":{display:"block !important"},"&-addon":{position:"relative",padding:`0 ${M.paddingInline}px`,color:M.colorText,fontWeight:"normal",fontSize:M.fontSize,textAlign:"center",backgroundColor:M.colorFillAlter,border:`${M.lineWidth}px ${M.lineType} ${M.colorBorder}`,borderRadius:M.borderRadius,transition:`all ${M.motionDurationSlow}`,lineHeight:1,[`${oe}-select`]:{margin:`-${M.paddingBlock+1}px -${M.paddingInline}px`,[`&${oe}-select-single:not(${oe}-select-customize-input)`]:{[`${oe}-select-selector`]:{backgroundColor:"inherit",border:`${M.lineWidth}px ${M.lineType} transparent`,boxShadow:"none"}},"&-open, &-focused":{[`${oe}-select-selector`]:{color:M.colorPrimary}}},[`${oe}-cascader-picker`]:{margin:`-9px -${M.paddingInline}px`,backgroundColor:"transparent",[`${oe}-cascader-input`]:{textAlign:"start",border:0,boxShadow:"none"}}},"&-addon:first-child":{borderInlineEnd:0},"&-addon:last-child":{borderInlineStart:0}},[`${Y}`]:{width:"100%",marginBottom:0,textAlign:"inherit","&:focus":{zIndex:1,borderInlineEndWidth:1},"&:hover":{zIndex:1,borderInlineEndWidth:1,[`${Y}-search-with-button &`]:{zIndex:0}}},[`> ${Y}:first-child, ${Y}-group-addon:first-child`]:{borderStartEndRadius:0,borderEndEndRadius:0,[`${oe}-select ${oe}-select-selector`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${Y}-affix-wrapper`]:{[`&:not(:first-child) ${Y}`]:{borderStartStartRadius:0,borderEndStartRadius:0},[`&:not(:last-child) ${Y}`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`> ${Y}:last-child, ${Y}-group-addon:last-child`]:{borderStartStartRadius:0,borderEndStartRadius:0,[`${oe}-select ${oe}-select-selector`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`${Y}-affix-wrapper`]:{"&:not(:last-child)":{borderStartEndRadius:0,borderEndEndRadius:0,[`${Y}-search &`]:{borderStartStartRadius:M.borderRadius,borderEndStartRadius:M.borderRadius}},[`&:not(:first-child), ${Y}-search &:not(:first-child)`]:{borderStartStartRadius:0,borderEndStartRadius:0}},[`&${Y}-group-compact`]:Object.assign(Object.assign({display:"block"},(0,$.dF)()),{[`${Y}-group-addon, ${Y}-group-wrap, > ${Y}`]:{"&:not(:first-child):not(:last-child)":{borderInlineEndWidth:M.lineWidth,"&:hover":{zIndex:1},"&:focus":{zIndex:1}}},"& > *":{display:"inline-block",float:"none",verticalAlign:"top",borderRadius:0},[`
|
|
& > ${Y}-affix-wrapper,
|
|
& > ${Y}-number-affix-wrapper,
|
|
& > ${oe}-picker-range
|
|
`]:{display:"inline-flex"},"& > *:not(:last-child)":{marginInlineEnd:-M.lineWidth,borderInlineEndWidth:M.lineWidth},[`${Y}`]:{float:"none"},[`& > ${oe}-select > ${oe}-select-selector,
|
|
& > ${oe}-select-auto-complete ${Y},
|
|
& > ${oe}-cascader-picker ${Y},
|
|
& > ${Y}-group-wrapper ${Y}`]:{borderInlineEndWidth:M.lineWidth,borderRadius:0,"&:hover":{zIndex:1},"&:focus":{zIndex:1}},[`& > ${oe}-select-focused`]:{zIndex:1},[`& > ${oe}-select > ${oe}-select-arrow`]:{zIndex:1},[`& > *:first-child,
|
|
& > ${oe}-select:first-child > ${oe}-select-selector,
|
|
& > ${oe}-select-auto-complete:first-child ${Y},
|
|
& > ${oe}-cascader-picker:first-child ${Y}`]:{borderStartStartRadius:M.borderRadius,borderEndStartRadius:M.borderRadius},[`& > *:last-child,
|
|
& > ${oe}-select:last-child > ${oe}-select-selector,
|
|
& > ${oe}-cascader-picker:last-child ${Y},
|
|
& > ${oe}-cascader-picker-focused:last-child ${Y}`]:{borderInlineEndWidth:M.lineWidth,borderStartEndRadius:M.borderRadius,borderEndEndRadius:M.borderRadius},[`& > ${oe}-select-auto-complete ${Y}`]:{verticalAlign:"top"},[`${Y}-group-wrapper + ${Y}-group-wrapper`]:{marginInlineStart:-M.lineWidth,[`${Y}-affix-wrapper`]:{borderRadius:0}},[`${Y}-group-wrapper:not(:last-child)`]:{[`&${Y}-search > ${Y}-group`]:{[`& > ${Y}-group-addon > ${Y}-search-button`]:{borderRadius:0},[`& > ${Y}`]:{borderStartStartRadius:M.borderRadius,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:M.borderRadius}}}})}},S=M=>{const{componentCls:Y,controlHeightSM:oe,lineWidth:J}=M,pe=(oe-J*2-16)/2;return{[Y]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,$.Wf)(M)),E(M)),U(M,Y)),{'&[type="color"]':{height:M.controlHeight,[`&${Y}-lg`]:{height:M.controlHeightLG},[`&${Y}-sm`]:{height:oe,paddingTop:pe,paddingBottom:pe}},'&[type="search"]::-webkit-search-cancel-button, &[type="search"]::-webkit-search-decoration':{"-webkit-appearance":"none"}})}},D=M=>{const{componentCls:Y}=M;return{[`${Y}-clear-icon`]:{margin:0,color:M.colorTextQuaternary,fontSize:M.fontSizeIcon,verticalAlign:-1,cursor:"pointer",transition:`color ${M.motionDurationSlow}`,"&:hover":{color:M.colorTextTertiary},"&:active":{color:M.colorText},"&-hidden":{visibility:"hidden"},"&-has-suffix":{margin:`0 ${M.inputAffixPadding}px`}}}},V=M=>{const{componentCls:Y,inputAffixPadding:oe,colorTextDescription:J,motionDurationSlow:ye,colorIcon:pe,colorIconHover:ve,iconCls:Ae}=M;return{[`${Y}-affix-wrapper`]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},E(M)),{display:"inline-flex",[`&:not(${Y}-affix-wrapper-disabled):hover`]:Object.assign(Object.assign({},m(M)),{zIndex:1,[`${Y}-search-with-button &`]:{zIndex:0}}),"&-focused, &:focus":{zIndex:1},"&-disabled":{[`${Y}[disabled]`]:{background:"transparent"}},[`> input${Y}`]:{padding:0,fontSize:"inherit",border:"none",borderRadius:0,outline:"none","&::-ms-reveal":{display:"none"},"&:focus":{boxShadow:"none !important"}},"&::before":{display:"inline-block",width:0,visibility:"hidden",content:'"\\a0"'},[`${Y}`]:{"&-prefix, &-suffix":{display:"flex",flex:"none",alignItems:"center","> *:not(:last-child)":{marginInlineEnd:M.paddingXS}},"&-show-count-suffix":{color:J},"&-show-count-has-suffix":{marginInlineEnd:M.paddingXXS},"&-prefix":{marginInlineEnd:oe},"&-suffix":{marginInlineStart:oe}}}),D(M)),{[`${Ae}${Y}-password-icon`]:{color:pe,cursor:"pointer",transition:`all ${ye}`,"&:hover":{color:ve}}}),U(M,`${Y}-affix-wrapper`))}},q=M=>{const{componentCls:Y,colorError:oe,colorWarning:J,borderRadiusLG:ye,borderRadiusSM:pe}=M;return{[`${Y}-group`]:Object.assign(Object.assign(Object.assign({},(0,$.Wf)(M)),b(M)),{"&-rtl":{direction:"rtl"},"&-wrapper":{display:"inline-block",width:"100%",textAlign:"start",verticalAlign:"top","&-rtl":{direction:"rtl"},"&-lg":{[`${Y}-group-addon`]:{borderRadius:ye,fontSize:M.fontSizeLG}},"&-sm":{[`${Y}-group-addon`]:{borderRadius:pe}},"&-status-error":{[`${Y}-group-addon`]:{color:oe,borderColor:oe}},"&-status-warning":{[`${Y}-group-addon`]:{color:J,borderColor:J}},"&-disabled":{[`${Y}-group-addon`]:Object.assign({},ie(M))},[`&:not(${Y}-compact-first-item):not(${Y}-compact-last-item)${Y}-compact-item`]:{[`${Y}, ${Y}-group-addon`]:{borderRadius:0}},[`&:not(${Y}-compact-last-item)${Y}-compact-first-item`]:{[`${Y}, ${Y}-group-addon`]:{borderStartEndRadius:0,borderEndEndRadius:0}},[`&:not(${Y}-compact-first-item)${Y}-compact-last-item`]:{[`${Y}, ${Y}-group-addon`]:{borderStartStartRadius:0,borderEndStartRadius:0}}}})}},B=M=>{const{componentCls:Y,antCls:oe}=M,J=`${Y}-search`;return{[J]:{[`${Y}`]:{"&:hover, &:focus":{borderColor:M.colorPrimaryHover,[`+ ${Y}-group-addon ${J}-button:not(${oe}-btn-primary)`]:{borderInlineStartColor:M.colorPrimaryHover}}},[`${Y}-affix-wrapper`]:{borderRadius:0},[`${Y}-lg`]:{lineHeight:M.lineHeightLG-2e-4},[`> ${Y}-group`]:{[`> ${Y}-group-addon:last-child`]:{insetInlineStart:-1,padding:0,border:0,[`${J}-button`]:{paddingTop:0,paddingBottom:0,borderStartStartRadius:0,borderStartEndRadius:M.borderRadius,borderEndEndRadius:M.borderRadius,borderEndStartRadius:0,boxShadow:"none"},[`${J}-button:not(${oe}-btn-primary)`]:{color:M.colorTextDescription,"&:hover":{color:M.colorPrimaryHover},"&:active":{color:M.colorPrimaryActive},[`&${oe}-btn-loading::before`]:{insetInlineStart:0,insetInlineEnd:0,insetBlockStart:0,insetBlockEnd:0}}}},[`${J}-button`]:{height:M.controlHeight,"&:hover, &:focus":{zIndex:1}},[`&-large ${J}-button`]:{height:M.controlHeightLG},[`&-small ${J}-button`]:{height:M.controlHeightSM},"&-rtl":{direction:"rtl"},[`&${Y}-compact-item`]:{[`&:not(${Y}-compact-last-item)`]:{[`${Y}-group-addon`]:{[`${Y}-search-button`]:{marginInlineEnd:-M.lineWidth,borderRadius:0}}},[`&:not(${Y}-compact-first-item)`]:{[`${Y},${Y}-affix-wrapper`]:{borderRadius:0}},[`> ${Y}-group-addon ${Y}-search-button,
|
|
> ${Y},
|
|
${Y}-affix-wrapper`]:{"&:hover,&:focus,&:active":{zIndex:2}},[`> ${Y}-affix-wrapper-focused`]:{zIndex:2}}}}},R=M=>{const{componentCls:Y,paddingLG:oe}=M,J=`${Y}-textarea`;return{[J]:{position:"relative","&-show-count":{[`> ${Y}`]:{height:"100%"},[`${Y}-data-count`]:{position:"absolute",bottom:-M.fontSize*M.lineHeight,insetInlineEnd:0,color:M.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},"&-allow-clear":{[`> ${Y}`]:{paddingInlineEnd:oe}},[`&-affix-wrapper${J}-has-feedback`]:{[`${Y}`]:{paddingInlineEnd:oe}},[`&-affix-wrapper${Y}-affix-wrapper`]:{padding:0,[`> textarea${Y}`]:{fontSize:"inherit",border:"none",outline:"none","&:focus":{boxShadow:"none !important"}},[`${Y}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${Y}-clear-icon`]:{position:"absolute",insetInlineEnd:M.paddingXS,insetBlockStart:M.paddingXS},[`${J}-suffix`]:{position:"absolute",top:0,insetInlineEnd:M.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}}}}};function Z(M){return(0,Se.TS)(M,{inputAffixPadding:M.paddingXXS})}const ue=M=>{const{controlHeight:Y,fontSize:oe,lineHeight:J,lineWidth:ye,controlHeightSM:pe,controlHeightLG:ve,fontSizeLG:Ae,lineHeightLG:j,paddingSM:P,controlPaddingHorizontalSM:K,controlPaddingHorizontal:k,colorFillAlter:ne,colorPrimaryHover:G,controlOutlineWidth:v,controlOutline:y,colorErrorOutline:N,colorWarningOutline:te}=M;return{paddingBlock:Math.max(Math.round((Y-oe*J)/2*10)/10-ye,3),paddingBlockSM:Math.max(Math.round((pe-oe*J)/2*10)/10-ye,0),paddingBlockLG:Math.ceil((ve-Ae*j)/2*10)/10-ye,paddingInline:P-ye,paddingInlineSM:K-ye,paddingInlineLG:k-ye,addonBg:ne,activeBorderColor:G,hoverBorderColor:G,activeShadow:`0 0 0 ${v}px ${y}`,errorActiveShadow:`0 0 0 ${v}px ${N}`,warningActiveShadow:`0 0 0 ${v}px ${te}`}};rt.ZP=(0,_e.Z)("Input",M=>{const Y=(0,Se.TS)(M,Z(M));return[S(Y),R(Y),V(Y),q(Y),B(Y),(0,ae.c)(Y)]},ue)},45818:function(Nt,rt,w){"use strict";w.d(rt,{D:function(){return Z},Z:function(){return Y}});var $=w(72308),ae=w(59301),Se={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"bars",theme:"outlined"},_e=Se,O=w(7657),m=function(J,ye){return ae.createElement(O.Z,(0,$.Z)({},J,{ref:ye,icon:_e}))},de=ae.forwardRef(m),ie=de,o=w(33853),Q=w(38819),U=w(92310),E=w.n(U),b=w(2738),D=oe=>!isNaN(parseFloat(oe))&&isFinite(oe),V=w(36355),q=w(84966),B=function(oe,J){var ye={};for(var pe in oe)Object.prototype.hasOwnProperty.call(oe,pe)&&J.indexOf(pe)<0&&(ye[pe]=oe[pe]);if(oe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ve=0,pe=Object.getOwnPropertySymbols(oe);ve<pe.length;ve++)J.indexOf(pe[ve])<0&&Object.prototype.propertyIsEnumerable.call(oe,pe[ve])&&(ye[pe[ve]]=oe[pe[ve]]);return ye};const R={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px"},Z=ae.createContext({}),ue=(()=>{let oe=0;return function(){let J=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return oe+=1,`${J}${oe}`}})();var Y=ae.forwardRef((oe,J)=>{const{prefixCls:ye,className:pe,trigger:ve,children:Ae,defaultCollapsed:j=!1,theme:P="dark",style:K={},collapsible:k=!1,reverseArrow:ne=!1,width:G=200,collapsedWidth:v=80,zeroWidthTriggerStyle:y,breakpoint:N,onCollapse:te,onBreakpoint:Le}=oe,Fe=B(oe,["prefixCls","className","trigger","children","defaultCollapsed","theme","style","collapsible","reverseArrow","width","collapsedWidth","zeroWidthTriggerStyle","breakpoint","onCollapse","onBreakpoint"]),{siderHook:Ue}=(0,ae.useContext)(q.Gs),[Ye,ut]=(0,ae.useState)("collapsed"in oe?oe.collapsed:j),[ot,lt]=(0,ae.useState)(!1);(0,ae.useEffect)(()=>{"collapsed"in oe&&ut(oe.collapsed)},[oe.collapsed]);const St=(fe,he)=>{"collapsed"in oe||ut(fe),te==null||te(fe,he)},Lt=(0,ae.useRef)();Lt.current=fe=>{lt(fe.matches),Le==null||Le(fe.matches),Ye!==fe.matches&&St(fe.matches,"responsive")},(0,ae.useEffect)(()=>{function fe(se){return Lt.current(se)}let he;if(typeof window!="undefined"){const{matchMedia:se}=window;if(se&&N&&N in R){he=se(`(max-width: ${R[N]})`);try{he.addEventListener("change",fe)}catch(Me){he.addListener(fe)}fe(he)}}return()=>{try{he==null||he.removeEventListener("change",fe)}catch(se){he==null||he.removeListener(fe)}}},[N]),(0,ae.useEffect)(()=>{const fe=ue("ant-sider-");return Ue.addSider(fe),()=>Ue.removeSider(fe)},[]);const _t=()=>{St(!Ye,"clickTrigger")},{getPrefixCls:At}=(0,ae.useContext)(V.E_),Pt=()=>{const fe=At("layout-sider",ye),he=(0,b.Z)(Fe,["collapsed"]),se=Ye?v:G,Me=D(se)?`${se}px`:String(se),$e=parseFloat(String(v||0))===0?ae.createElement("span",{onClick:_t,className:E()(`${fe}-zero-width-trigger`,`${fe}-zero-width-trigger-${ne?"right":"left"}`),style:y},ve||ae.createElement(ie,null)):null,xe={expanded:ne?ae.createElement(Q.Z,null):ae.createElement(o.Z,null),collapsed:ne?ae.createElement(o.Z,null):ae.createElement(Q.Z,null)}[Ye?"collapsed":"expanded"],we=ve!==null?$e||ae.createElement("div",{className:`${fe}-trigger`,onClick:_t,style:{width:Me}},ve||xe):null,Ie=Object.assign(Object.assign({},K),{flex:`0 0 ${Me}`,maxWidth:Me,minWidth:Me,width:Me}),Oe=E()(fe,`${fe}-${P}`,{[`${fe}-collapsed`]:!!Ye,[`${fe}-has-trigger`]:k&&ve!==null&&!$e,[`${fe}-below`]:!!ot,[`${fe}-zero-width`]:parseFloat(Me)===0},pe);return ae.createElement("aside",Object.assign({className:Oe},he,{style:Ie,ref:J}),ae.createElement("div",{className:`${fe}-children`},Ae),k||ot&&$e?we:null)},kt=ae.useMemo(()=>({siderCollapsed:Ye}),[Ye]);return ae.createElement(Z.Provider,{value:kt},Pt())})},84966:function(Nt,rt,w){"use strict";w.d(rt,{VY:function(){return Z},$_:function(){return R},h4:function(){return B},Gs:function(){return b},ZP:function(){return ue}});var $=w(80702),ae=w(92310),Se=w.n(ae),_e=w(2738),O=w(59301),m=w(36355),de=w(83116),o=M=>{const{componentCls:Y,bodyBg:oe,lightSiderBg:J,lightTriggerBg:ye,lightTriggerColor:pe}=M;return{[`${Y}-sider-light`]:{background:J,[`${Y}-sider-trigger`]:{color:pe,background:ye},[`${Y}-sider-zero-width-trigger`]:{color:pe,background:ye,border:`1px solid ${oe}`,borderInlineStart:0}}}};const Q=M=>{const{antCls:Y,componentCls:oe,colorText:J,triggerColor:ye,footerBg:pe,triggerBg:ve,headerHeight:Ae,headerPadding:j,headerColor:P,footerPadding:K,triggerHeight:k,zeroTriggerHeight:ne,zeroTriggerWidth:G,motionDurationMid:v,motionDurationSlow:y,fontSize:N,borderRadius:te,bodyBg:Le,headerBg:Fe,siderBg:Ue}=M;return{[oe]:Object.assign(Object.assign({display:"flex",flex:"auto",flexDirection:"column",minHeight:0,background:Le,"&, *":{boxSizing:"border-box"},[`&${oe}-has-sider`]:{flexDirection:"row",[`> ${oe}, > ${oe}-content`]:{width:0}},[`${oe}-header, &${oe}-footer`]:{flex:"0 0 auto"},[`${oe}-sider`]:{position:"relative",minWidth:0,background:Ue,transition:`all ${v}, background 0s`,"&-children":{height:"100%",marginTop:-.1,paddingTop:.1,[`${Y}-menu${Y}-menu-inline-collapsed`]:{width:"auto"}},"&-has-trigger":{paddingBottom:k},"&-right":{order:1},"&-trigger":{position:"fixed",bottom:0,zIndex:1,height:k,color:ye,lineHeight:`${k}px`,textAlign:"center",background:ve,cursor:"pointer",transition:`all ${v}`},"&-zero-width":{"> *":{overflow:"hidden"},"&-trigger":{position:"absolute",top:Ae,insetInlineEnd:-G,zIndex:1,width:G,height:ne,color:ye,fontSize:M.fontSizeXL,display:"flex",alignItems:"center",justifyContent:"center",background:Ue,borderStartStartRadius:0,borderStartEndRadius:te,borderEndEndRadius:te,borderEndStartRadius:0,cursor:"pointer",transition:`background ${y} ease`,"&::after":{position:"absolute",inset:0,background:"transparent",transition:`all ${y}`,content:'""'},"&:hover::after":{background:"rgba(255, 255, 255, 0.2)"},"&-right":{insetInlineStart:-G,borderStartStartRadius:te,borderStartEndRadius:0,borderEndEndRadius:0,borderEndStartRadius:te}}}}},o(M)),{"&-rtl":{direction:"rtl"}}),[`${oe}-header`]:{height:Ae,padding:j,color:P,lineHeight:`${Ae}px`,background:Fe,[`${Y}-menu`]:{lineHeight:"inherit"}},[`${oe}-footer`]:{padding:K,color:J,fontSize:N,background:pe},[`${oe}-content`]:{flex:"auto",minHeight:0}}};var U=(0,de.Z)("Layout",M=>[Q(M)],M=>{const{colorBgLayout:Y,controlHeight:oe,controlHeightLG:J,colorText:ye,controlHeightSM:pe,marginXXS:ve,colorTextLightSolid:Ae,colorBgContainer:j}=M,P=J*1.25;return{colorBgHeader:"#001529",colorBgBody:Y,colorBgTrigger:"#002140",bodyBg:Y,headerBg:"#001529",headerHeight:oe*2,headerPadding:`0 ${P}px`,headerColor:ye,footerPadding:`${pe}px ${P}px`,footerBg:Y,siderBg:"#001529",triggerHeight:J+ve*2,triggerBg:"#002140",triggerColor:Ae,zeroTriggerWidth:J,zeroTriggerHeight:J,lightSiderBg:j,lightTriggerBg:j,lightTriggerColor:ye}},{deprecatedTokens:[["colorBgBody","bodyBg"],["colorBgHeader","headerBg"],["colorBgTrigger","triggerBg"]]}),E=function(M,Y){var oe={};for(var J in M)Object.prototype.hasOwnProperty.call(M,J)&&Y.indexOf(J)<0&&(oe[J]=M[J]);if(M!=null&&typeof Object.getOwnPropertySymbols=="function")for(var ye=0,J=Object.getOwnPropertySymbols(M);ye<J.length;ye++)Y.indexOf(J[ye])<0&&Object.prototype.propertyIsEnumerable.call(M,J[ye])&&(oe[J[ye]]=M[J[ye]]);return oe};const b=O.createContext({siderHook:{addSider:()=>null,removeSider:()=>null}});function S(M){let{suffixCls:Y,tagName:oe,displayName:J}=M;return ye=>O.forwardRef((ve,Ae)=>O.createElement(ye,Object.assign({ref:Ae,suffixCls:Y,tagName:oe},ve)))}const D=O.forwardRef((M,Y)=>{const{prefixCls:oe,suffixCls:J,className:ye,tagName:pe}=M,ve=E(M,["prefixCls","suffixCls","className","tagName"]),{getPrefixCls:Ae}=O.useContext(m.E_),j=Ae("layout",oe),[P,K]=U(j),k=J?`${j}-${J}`:j;return P(O.createElement(pe,Object.assign({className:Se()(oe||k,ye,K),ref:Y},ve)))}),V=O.forwardRef((M,Y)=>{const{direction:oe}=O.useContext(m.E_),[J,ye]=O.useState([]),{prefixCls:pe,className:ve,rootClassName:Ae,children:j,hasSider:P,tagName:K,style:k}=M,ne=E(M,["prefixCls","className","rootClassName","children","hasSider","tagName","style"]),G=(0,_e.Z)(ne,["suffixCls"]),{getPrefixCls:v,layout:y}=O.useContext(m.E_),N=v("layout",pe),[te,Le]=U(N),Fe=Se()(N,{[`${N}-has-sider`]:typeof P=="boolean"?P:J.length>0,[`${N}-rtl`]:oe==="rtl"},y==null?void 0:y.className,ve,Ae,Le),Ue=O.useMemo(()=>({siderHook:{addSider:Ye=>{ye(ut=>[].concat((0,$.Z)(ut),[Ye]))},removeSider:Ye=>{ye(ut=>ut.filter(ot=>ot!==Ye))}}}),[]);return te(O.createElement(b.Provider,{value:Ue},O.createElement(K,Object.assign({ref:Y,className:Fe,style:Object.assign(Object.assign({},y==null?void 0:y.style),k)},G),j)))}),q=S({tagName:"div",displayName:"Layout"})(V),B=S({suffixCls:"header",tagName:"header",displayName:"Header"})(D),R=S({suffixCls:"footer",tagName:"footer",displayName:"Footer"})(D),Z=S({suffixCls:"content",tagName:"main",displayName:"Content"})(D);var ue=q},40875:function(Nt,rt,w){"use strict";w.d(rt,{J:function(){return m}});var $=w(59301),ae=w(33234),Se=w(70425),_e=function(de,ie){var o={};for(var Q in de)Object.prototype.hasOwnProperty.call(de,Q)&&ie.indexOf(Q)<0&&(o[Q]=de[Q]);if(de!=null&&typeof Object.getOwnPropertySymbols=="function")for(var U=0,Q=Object.getOwnPropertySymbols(de);U<Q.length;U++)ie.indexOf(Q[U])<0&&Object.prototype.propertyIsEnumerable.call(de,Q[U])&&(o[Q[U]]=de[Q[U]]);return o};const O=$.createContext(null),m=$.forwardRef((de,ie)=>{const{children:o}=de,Q=_e(de,["children"]),U=$.useContext(O),E=$.useMemo(()=>Object.assign(Object.assign({},U),Q),[U,Q.prefixCls,Q.mode,Q.selectable]);return $.createElement(O.Provider,{value:E},$.createElement(ae.BR,null,(0,Se.supportNodeRef)(o)?$.cloneElement(o,{ref:ie}):o))});rt.Z=O},20834:function(Nt,rt,w){"use strict";w.d(rt,{default:function(){return kt}});var $=w(15285),ae=w(59301),Se=w(45818),_e=w(92310),O=w.n(_e),m=w(36355),de=function(fe,he){var se={};for(var Me in fe)Object.prototype.hasOwnProperty.call(fe,Me)&&he.indexOf(Me)<0&&(se[Me]=fe[Me]);if(fe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $e=0,Me=Object.getOwnPropertySymbols(fe);$e<Me.length;$e++)he.indexOf(Me[$e])<0&&Object.prototype.propertyIsEnumerable.call(fe,Me[$e])&&(se[Me[$e]]=fe[Me[$e]]);return se},o=fe=>{const{prefixCls:he,className:se,dashed:Me}=fe,$e=de(fe,["prefixCls","className","dashed"]),{getPrefixCls:F}=ae.useContext(m.E_),le=F("menu",he),xe=O()({[`${le}-item-divider-dashed`]:!!Me},se);return ae.createElement($.iz,Object.assign({className:xe},$e))},Q=w(11592),U=w(2738),E=w(6848),b=w(92343),D=(0,ae.createContext)({prefixCls:"",firstLevel:!0,inlineCollapsed:!1}),q=fe=>{var he;const{className:se,children:Me,icon:$e,title:F,danger:le}=fe,{prefixCls:xe,firstLevel:we,direction:Ie,disableMenuItemTitleTooltip:Oe,inlineCollapsed:Qe}=ae.useContext(D),it=Ze=>{const Ve=ae.createElement("span",{className:`${xe}-title-content`},Me);return(!$e||(0,b.l$)(Me)&&Me.type==="span")&&Me&&Ze&&we&&typeof Me=="string"?ae.createElement("div",{className:`${xe}-inline-collapsed-noicon`},Me.charAt(0)):Ve},{siderCollapsed:Je}=ae.useContext(Se.D);let Ke=F;typeof F=="undefined"?Ke=we?Me:"":F===!1&&(Ke="");const yt={title:Ke};!Je&&!Qe&&(yt.title=null,yt.open=!1);const De=(0,Q.Z)(Me).length;let Pe=ae.createElement($.ck,Object.assign({},(0,U.Z)(fe,["title","icon","danger"]),{className:O()({[`${xe}-item-danger`]:le,[`${xe}-item-only-child`]:($e?De+1:De)===1},se),title:typeof F=="string"?F:void 0}),(0,b.Tm)($e,{className:O()((0,b.l$)($e)?(he=$e.props)===null||he===void 0?void 0:he.className:"",`${xe}-item-icon`)}),it(Qe));return Oe||(Pe=ae.createElement(E.Z,Object.assign({},yt,{placement:Ie==="rtl"?"left":"right",overlayClassName:`${xe}-inline-collapsed-tooltip`}),Pe)),Pe},R=fe=>{var he;const{popupClassName:se,icon:Me,title:$e,theme:F}=fe,le=ae.useContext(D),{prefixCls:xe,inlineCollapsed:we,theme:Ie}=le,Oe=(0,$.Xl)();let Qe;if(!Me)Qe=we&&!Oe.length&&$e&&typeof $e=="string"?ae.createElement("div",{className:`${xe}-inline-collapsed-noicon`},$e.charAt(0)):ae.createElement("span",{className:`${xe}-title-content`},$e);else{const Je=(0,b.l$)($e)&&$e.type==="span";Qe=ae.createElement(ae.Fragment,null,(0,b.Tm)(Me,{className:O()((0,b.l$)(Me)?(he=Me.props)===null||he===void 0?void 0:he.className:"",`${xe}-item-icon`)}),Je?$e:ae.createElement("span",{className:`${xe}-title-content`},$e))}const it=ae.useMemo(()=>Object.assign(Object.assign({},le),{firstLevel:!1}),[le]);return ae.createElement(D.Provider,{value:it},ae.createElement($.Wd,Object.assign({},(0,U.Z)(fe,["icon"]),{title:Qe,popupClassName:O()(xe,se,`${xe}-${F||Ie}`)})))},Z=w(18785),ue=w(70425),M=w(62892),Y=w(40875),oe=function(fe,he){var se={};for(var Me in fe)Object.prototype.hasOwnProperty.call(fe,Me)&&he.indexOf(Me)<0&&(se[Me]=fe[Me]);if(fe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $e=0,Me=Object.getOwnPropertySymbols(fe);$e<Me.length;$e++)he.indexOf(Me[$e])<0&&Object.prototype.propertyIsEnumerable.call(fe,Me[$e])&&(se[Me[$e]]=fe[Me[$e]]);return se};function J(fe){return(fe||[]).map((he,se)=>{if(he&&typeof he=="object"){const Me=he,{label:$e,children:F,key:le,type:xe}=Me,we=oe(Me,["label","children","key","type"]),Ie=le!=null?le:`tmp-${se}`;return F||xe==="group"?xe==="group"?ae.createElement($.BW,Object.assign({key:Ie},we,{title:$e}),J(F)):ae.createElement(R,Object.assign({key:Ie},we,{title:$e}),J(F)):xe==="divider"?ae.createElement(o,Object.assign({key:Ie},we)):ae.createElement(q,Object.assign({key:Ie},we),$e)}return null}).filter(he=>he)}function ye(fe){return ae.useMemo(()=>fe&&J(fe),[fe])}var pe=w(64993),ve=w(17313),Ae=w(8378),j=w(13826),P=w(29878),K=w(83116),k=w(37613),G=fe=>{const{componentCls:he,motionDurationSlow:se,horizontalLineHeight:Me,colorSplit:$e,lineWidth:F,lineType:le,itemPaddingInline:xe}=fe;return{[`${he}-horizontal`]:{lineHeight:Me,border:0,borderBottom:`${F}px ${le} ${$e}`,boxShadow:"none","&::after":{display:"block",clear:"both",height:0,content:'"\\20"'},[`${he}-item, ${he}-submenu`]:{position:"relative",display:"inline-block",verticalAlign:"bottom",paddingInline:xe},[`> ${he}-item:hover,
|
|
> ${he}-item-active,
|
|
> ${he}-submenu ${he}-submenu-title:hover`]:{backgroundColor:"transparent"},[`${he}-item, ${he}-submenu-title`]:{transition:[`border-color ${se}`,`background ${se}`].join(",")},[`${he}-submenu-arrow`]:{display:"none"}}}},y=fe=>{let{componentCls:he,menuArrowOffset:se}=fe;return{[`${he}-rtl`]:{direction:"rtl"},[`${he}-submenu-rtl`]:{transformOrigin:"100% 0"},[`${he}-rtl${he}-vertical,
|
|
${he}-submenu-rtl ${he}-vertical`]:{[`${he}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateY(-${se})`},"&::after":{transform:`rotate(45deg) translateY(${se})`}}}}};const N=fe=>Object.assign({},(0,ve.oN)(fe));var Le=(fe,he)=>{const{componentCls:se,itemColor:Me,itemSelectedColor:$e,groupTitleColor:F,itemBg:le,subMenuItemBg:xe,itemSelectedBg:we,activeBarHeight:Ie,activeBarWidth:Oe,activeBarBorderWidth:Qe,motionDurationSlow:it,motionEaseInOut:Je,motionEaseOut:Ke,itemPaddingInline:yt,motionDurationMid:De,itemHoverColor:Pe,lineType:Ze,colorSplit:Ve,itemDisabledColor:nt,dangerItemColor:mt,dangerItemHoverColor:gt,dangerItemSelectedColor:x,dangerItemActiveBg:T,dangerItemSelectedBg:et,itemHoverBg:W,itemActiveBg:Ee,menuSubMenuBg:Bt,horizontalItemSelectedColor:Be,horizontalItemSelectedBg:ze,horizontalItemBorderRadius:qe,horizontalItemHoverBg:ee,popupBg:be}=fe;return{[`${se}-${he}, ${se}-${he} > ${se}`]:{color:Me,background:le,[`&${se}-root:focus-visible`]:Object.assign({},N(fe)),[`${se}-item-group-title`]:{color:F},[`${se}-submenu-selected`]:{[`> ${se}-submenu-title`]:{color:$e}},[`${se}-item-disabled, ${se}-submenu-disabled`]:{color:`${nt} !important`},[`${se}-item:not(${se}-item-selected):not(${se}-submenu-selected)`]:{[`&:hover, > ${se}-submenu-title:hover`]:{color:Pe}},[`&:not(${se}-horizontal)`]:{[`${se}-item:not(${se}-item-selected)`]:{"&:hover":{backgroundColor:W},"&:active":{backgroundColor:Ee}},[`${se}-submenu-title`]:{"&:hover":{backgroundColor:W},"&:active":{backgroundColor:Ee}}},[`${se}-item-danger`]:{color:mt,[`&${se}-item:hover`]:{[`&:not(${se}-item-selected):not(${se}-submenu-selected)`]:{color:gt}},[`&${se}-item:active`]:{background:T}},[`${se}-item a`]:{"&, &:hover":{color:"inherit"}},[`${se}-item-selected`]:{color:$e,[`&${se}-item-danger`]:{color:x},"a, a:hover":{color:"inherit"}},[`& ${se}-item-selected`]:{backgroundColor:we,[`&${se}-item-danger`]:{backgroundColor:et}},[`${se}-item, ${se}-submenu-title`]:{[`&:not(${se}-item-disabled):focus-visible`]:Object.assign({},N(fe))},[`&${se}-submenu > ${se}`]:{backgroundColor:Bt},[`&${se}-popup > ${se}`]:{backgroundColor:be},[`&${se}-horizontal`]:Object.assign(Object.assign({},he==="dark"?{borderBottom:0}:{}),{[`> ${se}-item, > ${se}-submenu`]:{top:Qe,marginTop:-Qe,marginBottom:0,borderRadius:qe,"&::after":{position:"absolute",insetInline:yt,bottom:0,borderBottom:`${Ie}px solid transparent`,transition:`border-color ${it} ${Je}`,content:'""'},"&:hover, &-active, &-open":{background:ee,"&::after":{borderBottomWidth:Ie,borderBottomColor:Be}},"&-selected":{color:Be,backgroundColor:ze,"&:hover":{backgroundColor:ze},"&::after":{borderBottomWidth:Ie,borderBottomColor:Be}}}}),[`&${se}-root`]:{[`&${se}-inline, &${se}-vertical`]:{borderInlineEnd:`${Qe}px ${Ze} ${Ve}`}},[`&${se}-inline`]:{[`${se}-sub${se}-inline`]:{background:xe},[`${se}-item, ${se}-submenu-title`]:Qe&&Oe?{width:`calc(100% + ${Qe}px)`}:{},[`${se}-item`]:{position:"relative","&::after":{position:"absolute",insetBlock:0,insetInlineEnd:0,borderInlineEnd:`${Oe}px solid ${$e}`,transform:"scaleY(0.0001)",opacity:0,transition:[`transform ${De} ${Ke}`,`opacity ${De} ${Ke}`].join(","),content:'""'},[`&${se}-item-danger`]:{"&::after":{borderInlineEndColor:x}}},[`${se}-selected, ${se}-item-selected`]:{"&::after":{transform:"scaleY(1)",opacity:1,transition:[`transform ${De} ${Je}`,`opacity ${De} ${Je}`].join(",")}}}}}};const Fe=fe=>{const{componentCls:he,itemHeight:se,itemMarginInline:Me,padding:$e,menuArrowSize:F,marginXS:le,itemMarginBlock:xe}=fe,we=$e+F+le;return{[`${he}-item`]:{position:"relative",overflow:"hidden"},[`${he}-item, ${he}-submenu-title`]:{height:se,lineHeight:`${se}px`,paddingInline:$e,overflow:"hidden",textOverflow:"ellipsis",marginInline:Me,marginBlock:xe,width:`calc(100% - ${Me*2}px)`},[`> ${he}-item,
|
|
> ${he}-submenu > ${he}-submenu-title`]:{height:se,lineHeight:`${se}px`},[`${he}-item-group-list ${he}-submenu-title,
|
|
${he}-submenu-title`]:{paddingInlineEnd:we}}};var Ye=fe=>{const{componentCls:he,iconCls:se,itemHeight:Me,colorTextLightSolid:$e,dropdownWidth:F,controlHeightLG:le,motionDurationMid:xe,motionEaseOut:we,paddingXL:Ie,itemMarginInline:Oe,fontSizeLG:Qe,motionDurationSlow:it,paddingXS:Je,boxShadowSecondary:Ke,collapsedWidth:yt,collapsedIconSize:De}=fe,Pe={height:Me,lineHeight:`${Me}px`,listStylePosition:"inside",listStyleType:"disc"};return[{[he]:{"&-inline, &-vertical":Object.assign({[`&${he}-root`]:{boxShadow:"none"}},Fe(fe))},[`${he}-submenu-popup`]:{[`${he}-vertical`]:Object.assign(Object.assign({},Fe(fe)),{boxShadow:Ke})}},{[`${he}-submenu-popup ${he}-vertical${he}-sub`]:{minWidth:F,maxHeight:`calc(100vh - ${le*2.5}px)`,padding:"0",overflow:"hidden",borderInlineEnd:0,"&:not([class*='-active'])":{overflowX:"hidden",overflowY:"auto"}}},{[`${he}-inline`]:{width:"100%",[`&${he}-root`]:{[`${he}-item, ${he}-submenu-title`]:{display:"flex",alignItems:"center",transition:[`border-color ${it}`,`background ${it}`,`padding ${xe} ${we}`].join(","),[`> ${he}-title-content`]:{flex:"auto",minWidth:0,overflow:"hidden",textOverflow:"ellipsis"},"> *":{flex:"none"}}},[`${he}-sub${he}-inline`]:{padding:0,border:0,borderRadius:0,boxShadow:"none",[`& > ${he}-submenu > ${he}-submenu-title`]:Pe,[`& ${he}-item-group-title`]:{paddingInlineStart:Ie}},[`${he}-item`]:Pe}},{[`${he}-inline-collapsed`]:{width:yt,[`&${he}-root`]:{[`${he}-item, ${he}-submenu ${he}-submenu-title`]:{[`> ${he}-inline-collapsed-noicon`]:{fontSize:Qe,textAlign:"center"}}},[`> ${he}-item,
|
|
> ${he}-item-group > ${he}-item-group-list > ${he}-item,
|
|
> ${he}-item-group > ${he}-item-group-list > ${he}-submenu > ${he}-submenu-title,
|
|
> ${he}-submenu > ${he}-submenu-title`]:{insetInlineStart:0,paddingInline:`calc(50% - ${Qe/2}px - ${Oe}px)`,textOverflow:"clip",[`
|
|
${he}-submenu-arrow,
|
|
${he}-submenu-expand-icon
|
|
`]:{opacity:0},[`${he}-item-icon, ${se}`]:{margin:0,fontSize:De,lineHeight:`${Me}px`,"+ span":{display:"inline-block",opacity:0}}},[`${he}-item-icon, ${se}`]:{display:"inline-block"},"&-tooltip":{pointerEvents:"none",[`${he}-item-icon, ${se}`]:{display:"none"},"a, a:hover":{color:$e}},[`${he}-item-group-title`]:Object.assign(Object.assign({},ve.vS),{paddingInline:Je})}}]};const ut=fe=>{const{componentCls:he,motionDurationSlow:se,motionDurationMid:Me,motionEaseInOut:$e,motionEaseOut:F,iconCls:le,iconSize:xe,iconMarginInlineEnd:we}=fe;return{[`${he}-item, ${he}-submenu-title`]:{position:"relative",display:"block",margin:0,whiteSpace:"nowrap",cursor:"pointer",transition:[`border-color ${se}`,`background ${se}`,`padding ${se} ${$e}`].join(","),[`${he}-item-icon, ${le}`]:{minWidth:xe,fontSize:xe,transition:[`font-size ${Me} ${F}`,`margin ${se} ${$e}`,`color ${se}`].join(","),"+ span":{marginInlineStart:we,opacity:1,transition:[`opacity ${se} ${$e}`,`margin ${se}`,`color ${se}`].join(",")}},[`${he}-item-icon`]:Object.assign({},(0,ve.Ro)()),[`&${he}-item-only-child`]:{[`> ${le}, > ${he}-item-icon`]:{marginInlineEnd:0}}},[`${he}-item-disabled, ${he}-submenu-disabled`]:{background:"none !important",cursor:"not-allowed","&::after":{borderColor:"transparent !important"},a:{color:"inherit !important"},[`> ${he}-submenu-title`]:{color:"inherit !important",cursor:"not-allowed"}}}},ot=fe=>{const{componentCls:he,motionDurationSlow:se,motionEaseInOut:Me,borderRadius:$e,menuArrowSize:F,menuArrowOffset:le}=fe;return{[`${he}-submenu`]:{"&-expand-icon, &-arrow":{position:"absolute",top:"50%",insetInlineEnd:fe.margin,width:F,color:"currentcolor",transform:"translateY(-50%)",transition:`transform ${se} ${Me}, opacity ${se}`},"&-arrow":{"&::before, &::after":{position:"absolute",width:F*.6,height:F*.15,backgroundColor:"currentcolor",borderRadius:$e,transition:[`background ${se} ${Me}`,`transform ${se} ${Me}`,`top ${se} ${Me}`,`color ${se} ${Me}`].join(","),content:'""'},"&::before":{transform:`rotate(45deg) translateY(-${le})`},"&::after":{transform:`rotate(-45deg) translateY(${le})`}}}}},lt=fe=>{const{antCls:he,componentCls:se,fontSize:Me,motionDurationSlow:$e,motionDurationMid:F,motionEaseInOut:le,paddingXS:xe,padding:we,colorSplit:Ie,lineWidth:Oe,zIndexPopup:Qe,borderRadiusLG:it,subMenuItemBorderRadius:Je,menuArrowSize:Ke,menuArrowOffset:yt,lineType:De,menuPanelMaskInset:Pe,groupTitleLineHeight:Ze,groupTitleFontSize:Ve}=fe;return[{"":{[`${se}`]:Object.assign(Object.assign({},(0,ve.dF)()),{"&-hidden":{display:"none"}})},[`${se}-submenu-hidden`]:{display:"none"}},{[se]:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},(0,ve.Wf)(fe)),(0,ve.dF)()),{marginBottom:0,paddingInlineStart:0,fontSize:Me,lineHeight:0,listStyle:"none",outline:"none",transition:`width ${$e} cubic-bezier(0.2, 0, 0, 1) 0s`,"ul, ol":{margin:0,padding:0,listStyle:"none"},"&-overflow":{display:"flex",[`${se}-item`]:{flex:"none"}},[`${se}-item, ${se}-submenu, ${se}-submenu-title`]:{borderRadius:fe.itemBorderRadius},[`${se}-item-group-title`]:{padding:`${xe}px ${we}px`,fontSize:Ve,lineHeight:Ze,transition:`all ${$e}`},[`&-horizontal ${se}-submenu`]:{transition:[`border-color ${$e} ${le}`,`background ${$e} ${le}`].join(",")},[`${se}-submenu, ${se}-submenu-inline`]:{transition:[`border-color ${$e} ${le}`,`background ${$e} ${le}`,`padding ${F} ${le}`].join(",")},[`${se}-submenu ${se}-sub`]:{cursor:"initial",transition:[`background ${$e} ${le}`,`padding ${$e} ${le}`].join(",")},[`${se}-title-content`]:{transition:`color ${$e}`},[`${se}-item a`]:{"&::before":{position:"absolute",inset:0,backgroundColor:"transparent",content:'""'}},[`${se}-item-divider`]:{overflow:"hidden",lineHeight:0,borderColor:Ie,borderStyle:De,borderWidth:0,borderTopWidth:Oe,marginBlock:Oe,padding:0,"&-dashed":{borderStyle:"dashed"}}}),ut(fe)),{[`${se}-item-group`]:{[`${se}-item-group-list`]:{margin:0,padding:0,[`${se}-item, ${se}-submenu-title`]:{paddingInline:`${Me*2}px ${we}px`}}},"&-submenu":{"&-popup":{position:"absolute",zIndex:Qe,borderRadius:it,boxShadow:"none",transformOrigin:"0 0",[`&${se}-submenu`]:{background:"transparent"},"&::before":{position:"absolute",inset:`${Pe}px 0 0`,zIndex:-1,width:"100%",height:"100%",opacity:0,content:'""'}},"&-placement-rightTop::before":{top:0,insetInlineStart:Pe},"\n &-placement-leftTop,\n &-placement-bottomRight,\n ":{transformOrigin:"100% 0"},"\n &-placement-leftBottom,\n &-placement-topRight,\n ":{transformOrigin:"100% 100%"},"\n &-placement-rightBottom,\n &-placement-topLeft,\n ":{transformOrigin:"0 100%"},"\n &-placement-bottomLeft,\n &-placement-rightTop,\n ":{transformOrigin:"0 0"},"\n &-placement-leftTop,\n &-placement-leftBottom\n ":{paddingInlineEnd:fe.paddingXS},"\n &-placement-rightTop,\n &-placement-rightBottom\n ":{paddingInlineStart:fe.paddingXS},"\n &-placement-topRight,\n &-placement-topLeft\n ":{paddingBottom:fe.paddingXS},"\n &-placement-bottomRight,\n &-placement-bottomLeft\n ":{paddingTop:fe.paddingXS},[`> ${se}`]:Object.assign(Object.assign(Object.assign({borderRadius:it},ut(fe)),ot(fe)),{[`${se}-item, ${se}-submenu > ${se}-submenu-title`]:{borderRadius:Je},[`${se}-submenu-title::after`]:{transition:`transform ${$e} ${le}`}})}}),ot(fe)),{[`&-inline-collapsed ${se}-submenu-arrow,
|
|
&-inline ${se}-submenu-arrow`]:{"&::before":{transform:`rotate(-45deg) translateX(${yt})`},"&::after":{transform:`rotate(45deg) translateX(-${yt})`}},[`${se}-submenu-open${se}-submenu-inline > ${se}-submenu-title > ${se}-submenu-arrow`]:{transform:`translateY(-${Ke*.2}px)`,"&::after":{transform:`rotate(-45deg) translateX(-${yt})`},"&::before":{transform:`rotate(45deg) translateX(${yt})`}}})},{[`${he}-layout-header`]:{[se]:{lineHeight:"inherit"}}}]};var St=(fe,he)=>(0,K.Z)("Menu",Me=>{if(he===!1)return[];const{colorBgElevated:$e,colorPrimary:F,colorTextLightSolid:le,controlHeightLG:xe,fontSize:we,darkItemColor:Ie,darkDangerItemColor:Oe,darkItemBg:Qe,darkSubMenuItemBg:it,darkItemSelectedColor:Je,darkItemSelectedBg:Ke,darkDangerItemSelectedBg:yt,darkItemHoverBg:De,darkGroupTitleColor:Pe,darkItemHoverColor:Ze,darkItemDisabledColor:Ve,darkDangerItemHoverColor:nt,darkDangerItemSelectedColor:mt,darkDangerItemActiveBg:gt}=Me,x=we/7*5,T=(0,k.TS)(Me,{menuArrowSize:x,menuHorizontalHeight:xe*1.15,menuArrowOffset:`${x*.25}px`,menuPanelMaskInset:-7,menuSubMenuBg:$e}),et=(0,k.TS)(T,{itemColor:Ie,itemHoverColor:Ze,groupTitleColor:Pe,itemSelectedColor:Je,itemBg:Qe,popupBg:Qe,subMenuItemBg:it,itemActiveBg:"transparent",itemSelectedBg:Ke,activeBarHeight:0,activeBarBorderWidth:0,itemHoverBg:De,itemDisabledColor:Ve,dangerItemColor:Oe,dangerItemHoverColor:nt,dangerItemSelectedColor:mt,dangerItemActiveBg:gt,dangerItemSelectedBg:yt,menuSubMenuBg:it,horizontalItemSelectedColor:le,horizontalItemSelectedBg:F});return[lt(T),G(T),Ye(T),Le(T,"light"),Le(et,"dark"),y(T),(0,Ae.Z)(T),(0,j.oN)(T,"slide-up"),(0,j.oN)(T,"slide-down"),(0,P._y)(T,"zoom-big")]},Me=>{const{colorPrimary:$e,colorError:F,colorTextDisabled:le,colorErrorBg:xe,colorText:we,colorTextDescription:Ie,colorBgContainer:Oe,colorFillAlter:Qe,colorFillContent:it,lineWidth:Je,lineWidthBold:Ke,controlItemBgActive:yt,colorBgTextHover:De,controlHeightLG:Pe,lineHeight:Ze,colorBgElevated:Ve,marginXXS:nt,padding:mt,fontSize:gt,controlHeightSM:x,fontSizeLG:T,colorTextLightSolid:et,colorErrorHover:W}=Me,Ee=new pe.C(et).setAlpha(.65).toRgbString();return{dropdownWidth:160,zIndexPopup:Me.zIndexPopupBase+50,radiusItem:Me.borderRadiusLG,itemBorderRadius:Me.borderRadiusLG,radiusSubMenuItem:Me.borderRadiusSM,subMenuItemBorderRadius:Me.borderRadiusSM,colorItemText:we,itemColor:we,colorItemTextHover:we,itemHoverColor:we,colorItemTextHoverHorizontal:$e,horizontalItemHoverColor:$e,colorGroupTitle:Ie,groupTitleColor:Ie,colorItemTextSelected:$e,itemSelectedColor:$e,colorItemTextSelectedHorizontal:$e,horizontalItemSelectedColor:$e,colorItemBg:Oe,itemBg:Oe,colorItemBgHover:De,itemHoverBg:De,colorItemBgActive:it,itemActiveBg:yt,colorSubItemBg:Qe,subMenuItemBg:Qe,colorItemBgSelected:yt,itemSelectedBg:yt,colorItemBgSelectedHorizontal:"transparent",horizontalItemSelectedBg:"transparent",colorActiveBarWidth:0,activeBarWidth:0,colorActiveBarHeight:Ke,activeBarHeight:Ke,colorActiveBarBorderSize:Je,activeBarBorderWidth:Je,colorItemTextDisabled:le,itemDisabledColor:le,colorDangerItemText:F,dangerItemColor:F,colorDangerItemTextHover:F,dangerItemHoverColor:F,colorDangerItemTextSelected:F,dangerItemSelectedColor:F,colorDangerItemBgActive:xe,dangerItemActiveBg:xe,colorDangerItemBgSelected:xe,dangerItemSelectedBg:xe,itemMarginInline:Me.marginXXS,horizontalItemBorderRadius:0,horizontalItemHoverBg:"transparent",itemHeight:Pe,groupTitleLineHeight:Ze,collapsedWidth:Pe*2,popupBg:Ve,itemMarginBlock:nt,itemPaddingInline:mt,horizontalLineHeight:`${Pe*1.15}px`,iconSize:gt,iconMarginInlineEnd:x-gt,collapsedIconSize:T,groupTitleFontSize:gt,darkItemDisabledColor:new pe.C(et).setAlpha(.25).toRgbString(),darkItemColor:Ee,darkDangerItemColor:F,darkItemBg:"#001529",darkSubMenuItemBg:"#000c17",darkItemSelectedColor:et,darkItemSelectedBg:$e,darkDangerItemSelectedBg:F,darkItemHoverBg:"transparent",darkGroupTitleColor:Ee,darkItemHoverColor:et,darkDangerItemHoverColor:W,darkDangerItemSelectedColor:et,darkDangerItemActiveBg:F}},{deprecatedTokens:[["colorGroupTitle","groupTitleColor"],["radiusItem","itemBorderRadius"],["radiusSubMenuItem","subMenuItemBorderRadius"],["colorItemText","itemColor"],["colorItemTextHover","itemHoverColor"],["colorItemTextHoverHorizontal","horizontalItemHoverColor"],["colorItemTextSelected","itemSelectedColor"],["colorItemTextSelectedHorizontal","horizontalItemSelectedColor"],["colorItemTextDisabled","itemDisabledColor"],["colorDangerItemText","dangerItemColor"],["colorDangerItemTextHover","dangerItemHoverColor"],["colorDangerItemTextSelected","dangerItemSelectedColor"],["colorDangerItemBgActive","dangerItemActiveBg"],["colorDangerItemBgSelected","dangerItemSelectedBg"],["colorItemBg","itemBg"],["colorItemBgHover","itemHoverBg"],["colorSubItemBg","subMenuItemBg"],["colorItemBgActive","itemActiveBg"],["colorItemBgSelectedHorizontal","horizontalItemSelectedBg"],["colorActiveBarWidth","activeBarWidth"],["colorActiveBarHeight","activeBarHeight"],["colorActiveBarBorderSize","activeBarBorderWidth"],["colorItemBgSelected","itemSelectedBg"]]})(fe),Lt=function(fe,he){var se={};for(var Me in fe)Object.prototype.hasOwnProperty.call(fe,Me)&&he.indexOf(Me)<0&&(se[Me]=fe[Me]);if(fe!=null&&typeof Object.getOwnPropertySymbols=="function")for(var $e=0,Me=Object.getOwnPropertySymbols(fe);$e<Me.length;$e++)he.indexOf(Me[$e])<0&&Object.prototype.propertyIsEnumerable.call(fe,Me[$e])&&(se[Me[$e]]=fe[Me[$e]]);return se},At=(0,ae.forwardRef)((fe,he)=>{var se,Me;const $e=ae.useContext(Y.Z),F=$e||{},{getPrefixCls:le,getPopupContainer:xe,direction:we,menu:Ie}=ae.useContext(m.E_),Oe=le(),{prefixCls:Qe,className:it,style:Je,theme:Ke="light",expandIcon:yt,_internalDisableMenuItemTitleTooltip:De,inlineCollapsed:Pe,siderCollapsed:Ze,items:Ve,children:nt,rootClassName:mt,mode:gt,selectable:x,onClick:T,overflowedIndicatorPopupClassName:et}=fe,W=Lt(fe,["prefixCls","className","style","theme","expandIcon","_internalDisableMenuItemTitleTooltip","inlineCollapsed","siderCollapsed","items","children","rootClassName","mode","selectable","onClick","overflowedIndicatorPopupClassName"]),Ee=(0,U.Z)(W,["collapsedWidth"]),Bt=ye(Ve)||nt;(se=F.validator)===null||se===void 0||se.call(F,{mode:gt});const Be=(0,ue.useEvent)(function(){var zt;T==null||T.apply(void 0,arguments),(zt=F.onClick)===null||zt===void 0||zt.call(F)}),ze=F.mode||gt,qe=x!=null?x:F.selectable,ee=ae.useMemo(()=>Ze!==void 0?Ze:Pe,[Pe,Ze]),be={horizontal:{motionName:`${Oe}-slide-up`},inline:(0,M.Z)(Oe),other:{motionName:`${Oe}-zoom-big`}},me=le("menu",Qe||F.prefixCls),[Ge,X]=St(me,!$e),Ct=O()(`${me}-${Ke}`,Ie==null?void 0:Ie.className,it);let Ce;if(typeof yt=="function")Ce=yt;else if(yt===null||yt===!1)Ce=null;else if(F.expandIcon===null||F.expandIcon===!1)Ce=null;else{const zt=yt!=null?yt:F.expandIcon;Ce=(0,b.Tm)(zt,{className:O()(`${me}-submenu-expand-icon`,(0,b.l$)(zt)?(Me=zt.props)===null||Me===void 0?void 0:Me.className:"")})}const Ot=ae.useMemo(()=>({prefixCls:me,inlineCollapsed:ee||!1,direction:we,firstLevel:!0,theme:Ke,mode:ze,disableMenuItemTitleTooltip:De}),[me,ee,we,De,Ke]);return Ge(ae.createElement(Y.Z.Provider,{value:null},ae.createElement(D.Provider,{value:Ot},ae.createElement($.ZP,Object.assign({getPopupContainer:xe,overflowedIndicator:ae.createElement(Z.Z,null),overflowedIndicatorPopupClassName:O()(me,`${me}-${Ke}`,et),mode:ze,selectable:qe,onClick:Be},Ee,{inlineCollapsed:ee,style:Object.assign(Object.assign({},Ie==null?void 0:Ie.style),Je),className:Ct,prefixCls:me,direction:we,defaultMotions:be,expandIcon:Ce,ref:he,rootClassName:O()(mt,X)}),Bt))))});const Pt=(0,ae.forwardRef)((fe,he)=>{const se=(0,ae.useRef)(null),Me=ae.useContext(Se.D);return(0,ae.useImperativeHandle)(he,()=>({menu:se.current,focus:$e=>{var F;(F=se.current)===null||F===void 0||F.focus($e)}})),ae.createElement(At,Object.assign({ref:se},fe,Me))});Pt.Item=q,Pt.SubMenu=R,Pt.Divider=o,Pt.ItemGroup=$.BW;var kt=Pt},5112:function(Nt,rt,w){"use strict";w.d(rt,{ZP:function(){return y}});var $=w(92310),ae=w.n($),Se=w(18929),_e=w(26112),O=w(59301),m=w(36355),de=w(19716);const ie=O.createContext(null),o=ie.Provider;var Q=ie;const U=O.createContext(null),E=U.Provider;var b=w(5630),S=w(8654),D=w(1684),V=w(32441),q=w(17313),B=w(83116),R=w(37613);const Z=N=>{const{componentCls:te,antCls:Le}=N,Fe=`${te}-group`;return{[Fe]:Object.assign(Object.assign({},(0,q.Wf)(N)),{display:"inline-block",fontSize:0,[`&${Fe}-rtl`]:{direction:"rtl"},[`${Le}-badge ${Le}-badge-count`]:{zIndex:1},[`> ${Le}-badge:not(:first-child) > ${Le}-button-wrapper`]:{borderInlineStart:"none"}})}},ue=N=>{const{componentCls:te,wrapperMarginInlineEnd:Le,colorPrimary:Fe,radioSize:Ue,motionDurationSlow:Ye,motionDurationMid:ut,motionEaseInOutCirc:ot,colorBgContainer:lt,colorBorder:St,lineWidth:Lt,dotSize:_t,colorBgContainerDisabled:At,colorTextDisabled:Pt,paddingXS:kt,dotColorDisabled:fe,lineType:he,radioDotDisabledSize:se,wireframe:Me,colorWhite:$e}=N,F=`${te}-inner`;return{[`${te}-wrapper`]:Object.assign(Object.assign({},(0,q.Wf)(N)),{display:"inline-flex",alignItems:"baseline",marginInlineStart:0,marginInlineEnd:Le,cursor:"pointer",[`&${te}-wrapper-rtl`]:{direction:"rtl"},"&-disabled":{cursor:"not-allowed",color:N.colorTextDisabled},"&::after":{display:"inline-block",width:0,overflow:"hidden",content:'"\\a0"'},[`${te}-checked::after`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,width:"100%",height:"100%",border:`${Lt}px ${he} ${Fe}`,borderRadius:"50%",visibility:"hidden",content:'""'},[te]:Object.assign(Object.assign({},(0,q.Wf)(N)),{position:"relative",display:"inline-block",outline:"none",cursor:"pointer",alignSelf:"center",borderRadius:"50%"}),[`${te}-wrapper:hover &,
|
|
&:hover ${F}`]:{borderColor:Fe},[`${te}-input:focus-visible + ${F}`]:Object.assign({},(0,q.oN)(N)),[`${te}:hover::after, ${te}-wrapper:hover &::after`]:{visibility:"visible"},[`${te}-inner`]:{"&::after":{boxSizing:"border-box",position:"absolute",insetBlockStart:"50%",insetInlineStart:"50%",display:"block",width:Ue,height:Ue,marginBlockStart:Ue/-2,marginInlineStart:Ue/-2,backgroundColor:Me?Fe:$e,borderBlockStart:0,borderInlineStart:0,borderRadius:Ue,transform:"scale(0)",opacity:0,transition:`all ${Ye} ${ot}`,content:'""'},boxSizing:"border-box",position:"relative",insetBlockStart:0,insetInlineStart:0,display:"block",width:Ue,height:Ue,backgroundColor:lt,borderColor:St,borderStyle:"solid",borderWidth:Lt,borderRadius:"50%",transition:`all ${ut}`},[`${te}-input`]:{position:"absolute",inset:0,zIndex:1,cursor:"pointer",opacity:0},[`${te}-checked`]:{[F]:{borderColor:Fe,backgroundColor:Me?lt:Fe,"&::after":{transform:`scale(${_t/Ue})`,opacity:1,transition:`all ${Ye} ${ot}`}}},[`${te}-disabled`]:{cursor:"not-allowed",[F]:{backgroundColor:At,borderColor:St,cursor:"not-allowed","&::after":{backgroundColor:fe}},[`${te}-input`]:{cursor:"not-allowed"},[`${te}-disabled + span`]:{color:Pt,cursor:"not-allowed"},[`&${te}-checked`]:{[F]:{"&::after":{transform:`scale(${se/Ue})`}}}},[`span${te} + *`]:{paddingInlineStart:kt,paddingInlineEnd:kt}})}},M=N=>{const{buttonColor:te,controlHeight:Le,componentCls:Fe,lineWidth:Ue,lineType:Ye,colorBorder:ut,motionDurationSlow:ot,motionDurationMid:lt,buttonPaddingInline:St,fontSize:Lt,buttonBg:_t,fontSizeLG:At,controlHeightLG:Pt,controlHeightSM:kt,paddingXS:fe,borderRadius:he,borderRadiusSM:se,borderRadiusLG:Me,buttonCheckedBg:$e,buttonSolidCheckedColor:F,colorTextDisabled:le,colorBgContainerDisabled:xe,buttonCheckedBgDisabled:we,buttonCheckedColorDisabled:Ie,colorPrimary:Oe,colorPrimaryHover:Qe,colorPrimaryActive:it,buttonSolidCheckedBg:Je,buttonSolidCheckedHoverBg:Ke,buttonSolidCheckedActiveBg:yt}=N;return{[`${Fe}-button-wrapper`]:{position:"relative",display:"inline-block",height:Le,margin:0,paddingInline:St,paddingBlock:0,color:te,fontSize:Lt,lineHeight:`${Le-Ue*2}px`,background:_t,border:`${Ue}px ${Ye} ${ut}`,borderBlockStartWidth:Ue+.02,borderInlineStartWidth:0,borderInlineEndWidth:Ue,cursor:"pointer",transition:[`color ${lt}`,`background ${lt}`,`box-shadow ${lt}`].join(","),a:{color:te},[`> ${Fe}-button`]:{position:"absolute",insetBlockStart:0,insetInlineStart:0,zIndex:-1,width:"100%",height:"100%"},"&:not(:first-child)":{"&::before":{position:"absolute",insetBlockStart:-Ue,insetInlineStart:-Ue,display:"block",boxSizing:"content-box",width:1,height:"100%",paddingBlock:Ue,paddingInline:0,backgroundColor:ut,transition:`background-color ${ot}`,content:'""'}},"&:first-child":{borderInlineStart:`${Ue}px ${Ye} ${ut}`,borderStartStartRadius:he,borderEndStartRadius:he},"&:last-child":{borderStartEndRadius:he,borderEndEndRadius:he},"&:first-child:last-child":{borderRadius:he},[`${Fe}-group-large &`]:{height:Pt,fontSize:At,lineHeight:`${Pt-Ue*2}px`,"&:first-child":{borderStartStartRadius:Me,borderEndStartRadius:Me},"&:last-child":{borderStartEndRadius:Me,borderEndEndRadius:Me}},[`${Fe}-group-small &`]:{height:kt,paddingInline:fe-Ue,paddingBlock:0,lineHeight:`${kt-Ue*2}px`,"&:first-child":{borderStartStartRadius:se,borderEndStartRadius:se},"&:last-child":{borderStartEndRadius:se,borderEndEndRadius:se}},"&:hover":{position:"relative",color:Oe},"&:has(:focus-visible)":Object.assign({},(0,q.oN)(N)),[`${Fe}-inner, input[type='checkbox'], input[type='radio']`]:{width:0,height:0,opacity:0,pointerEvents:"none"},[`&-checked:not(${Fe}-button-wrapper-disabled)`]:{zIndex:1,color:Oe,background:$e,borderColor:Oe,"&::before":{backgroundColor:Oe},"&:first-child":{borderColor:Oe},"&:hover":{color:Qe,borderColor:Qe,"&::before":{backgroundColor:Qe}},"&:active":{color:it,borderColor:it,"&::before":{backgroundColor:it}}},[`${Fe}-group-solid &-checked:not(${Fe}-button-wrapper-disabled)`]:{color:F,background:Je,borderColor:Je,"&:hover":{color:F,background:Ke,borderColor:Ke},"&:active":{color:F,background:yt,borderColor:yt}},"&-disabled":{color:le,backgroundColor:xe,borderColor:ut,cursor:"not-allowed","&:first-child, &:hover":{color:le,backgroundColor:xe,borderColor:ut}},[`&-disabled${Fe}-button-wrapper-checked`]:{color:Ie,backgroundColor:we,borderColor:ut,boxShadow:"none"}}}},Y=N=>N-4*2;var oe=(0,B.Z)("Radio",N=>{const{controlOutline:te,controlOutlineWidth:Le,radioSize:Fe}=N,Ue=`0 0 0 ${Le}px ${te}`,Ye=Ue,ut=Y(Fe),ot=(0,R.TS)(N,{radioDotDisabledSize:ut,radioFocusShadow:Ue,radioButtonFocusShadow:Ye});return[Z(ot),ue(ot),M(ot)]},N=>{const{wireframe:te,padding:Le,marginXS:Fe,lineWidth:Ue,fontSizeLG:Ye,colorText:ut,colorBgContainer:ot,colorTextDisabled:lt,controlItemBgActiveDisabled:St,colorTextLightSolid:Lt,colorPrimary:_t,colorPrimaryHover:At,colorPrimaryActive:Pt}=N,kt=4,fe=Ye,he=te?Y(fe):fe-(kt+Ue)*2;return{radioSize:fe,dotSize:he,dotColorDisabled:lt,buttonSolidCheckedColor:Lt,buttonSolidCheckedBg:_t,buttonSolidCheckedHoverBg:At,buttonSolidCheckedActiveBg:Pt,buttonBg:ot,buttonCheckedBg:ot,buttonColor:ut,buttonCheckedBgDisabled:St,buttonCheckedColorDisabled:lt,buttonPaddingInline:Le-Ue,wrapperMarginInlineEnd:Fe}}),J=w(14088),ye=w(4572),pe=function(N,te){var Le={};for(var Fe in N)Object.prototype.hasOwnProperty.call(N,Fe)&&te.indexOf(Fe)<0&&(Le[Fe]=N[Fe]);if(N!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ue=0,Fe=Object.getOwnPropertySymbols(N);Ue<Fe.length;Ue++)te.indexOf(Fe[Ue])<0&&Object.prototype.propertyIsEnumerable.call(N,Fe[Ue])&&(Le[Fe[Ue]]=N[Fe[Ue]]);return Le};const ve=(N,te)=>{var Le,Fe;const Ue=O.useContext(Q),Ye=O.useContext(U),{getPrefixCls:ut,direction:ot,radio:lt}=O.useContext(m.E_),St=O.useRef(null),Lt=(0,S.sQ)(te,St),{isFormItemInput:_t}=O.useContext(V.aM),At=it=>{var Je,Ke;(Je=N.onChange)===null||Je===void 0||Je.call(N,it),(Ke=Ue==null?void 0:Ue.onChange)===null||Ke===void 0||Ke.call(Ue,it)},{prefixCls:Pt,className:kt,rootClassName:fe,children:he,style:se}=N,Me=pe(N,["prefixCls","className","rootClassName","children","style"]),$e=ut("radio",Pt),F=((Ue==null?void 0:Ue.optionType)||Ye)==="button",le=F?`${$e}-button`:$e,[xe,we]=oe($e),Ie=Object.assign({},Me),Oe=O.useContext(D.Z);Ue&&(Ie.name=Ue.name,Ie.onChange=At,Ie.checked=N.value===Ue.value,Ie.disabled=(Le=Ie.disabled)!==null&&Le!==void 0?Le:Ue.disabled),Ie.disabled=(Fe=Ie.disabled)!==null&&Fe!==void 0?Fe:Oe;const Qe=ae()(`${le}-wrapper`,{[`${le}-wrapper-checked`]:Ie.checked,[`${le}-wrapper-disabled`]:Ie.disabled,[`${le}-wrapper-rtl`]:ot==="rtl",[`${le}-wrapper-in-form-item`]:_t},lt==null?void 0:lt.className,kt,fe,we);return xe(O.createElement(J.Z,{component:"Radio",disabled:Ie.disabled},O.createElement("label",{className:Qe,style:Object.assign(Object.assign({},lt==null?void 0:lt.style),se),onMouseEnter:N.onMouseEnter,onMouseLeave:N.onMouseLeave},O.createElement(b.Z,Object.assign({},Ie,{className:ae()(Ie.className,!F&&ye.A),type:"radio",prefixCls:le,ref:Lt})),he!==void 0?O.createElement("span",null,he):null)))};var j=O.forwardRef(ve);const P=O.forwardRef((N,te)=>{const{getPrefixCls:Le,direction:Fe}=O.useContext(m.E_),[Ue,Ye]=(0,Se.Z)(N.defaultValue,{value:N.value}),ut=Je=>{const Ke=Ue,yt=Je.target.value;"value"in N||Ye(yt);const{onChange:De}=N;De&&yt!==Ke&&De(Je)},{prefixCls:ot,className:lt,rootClassName:St,options:Lt,buttonStyle:_t="outline",disabled:At,children:Pt,size:kt,style:fe,id:he,onMouseEnter:se,onMouseLeave:Me,onFocus:$e,onBlur:F}=N,le=Le("radio",ot),xe=`${le}-group`,[we,Ie]=oe(le);let Oe=Pt;Lt&&Lt.length>0&&(Oe=Lt.map(Je=>typeof Je=="string"||typeof Je=="number"?O.createElement(j,{key:Je.toString(),prefixCls:le,disabled:At,value:Je,checked:Ue===Je},Je):O.createElement(j,{key:`radio-group-value-options-${Je.value}`,prefixCls:le,disabled:Je.disabled||At,value:Je.value,checked:Ue===Je.value,title:Je.title,style:Je.style},Je.label)));const Qe=(0,de.Z)(kt),it=ae()(xe,`${xe}-${_t}`,{[`${xe}-${Qe}`]:Qe,[`${xe}-rtl`]:Fe==="rtl"},lt,St,Ie);return we(O.createElement("div",Object.assign({},(0,_e.Z)(N,{aria:!0,data:!0}),{className:it,style:fe,onMouseEnter:se,onMouseLeave:Me,onFocus:$e,onBlur:F,id:he,ref:te}),O.createElement(o,{value:{onChange:ut,value:Ue,disabled:N.disabled,name:N.name,optionType:N.optionType}},Oe)))});var K=O.memo(P),k=function(N,te){var Le={};for(var Fe in N)Object.prototype.hasOwnProperty.call(N,Fe)&&te.indexOf(Fe)<0&&(Le[Fe]=N[Fe]);if(N!=null&&typeof Object.getOwnPropertySymbols=="function")for(var Ue=0,Fe=Object.getOwnPropertySymbols(N);Ue<Fe.length;Ue++)te.indexOf(Fe[Ue])<0&&Object.prototype.propertyIsEnumerable.call(N,Fe[Ue])&&(Le[Fe[Ue]]=N[Fe[Ue]]);return Le};const ne=(N,te)=>{const{getPrefixCls:Le}=O.useContext(m.E_),{prefixCls:Fe}=N,Ue=k(N,["prefixCls"]),Ye=Le("radio",Fe);return O.createElement(E,{value:"button"},O.createElement(j,Object.assign({prefixCls:Ye},Ue,{type:"radio",ref:te})))};var G=O.forwardRef(ne);const v=j;v.Button=G,v.Group=K,v.__ANT_RADIO=!0;var y=v},8378:function(Nt,rt){"use strict";const w=$=>({[$.componentCls]:{[`${$.antCls}-motion-collapse-legacy`]:{overflow:"hidden","&-active":{transition:`height ${$.motionDurationMid} ${$.motionEaseInOut},
|
|
opacity ${$.motionDurationMid} ${$.motionEaseInOut} !important`}},[`${$.antCls}-motion-collapse`]:{overflow:"hidden",transition:`height ${$.motionDurationMid} ${$.motionEaseInOut},
|
|
opacity ${$.motionDurationMid} ${$.motionEaseInOut} !important`}}});rt.Z=w},92899:function(Nt,rt,w){"use strict";w.d(rt,{Fm:function(){return E}});var $=w(93083),ae=w(95406);const Se=new $.Keyframes("antMoveDownIn",{"0%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),_e=new $.Keyframes("antMoveDownOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, 100%, 0)",transformOrigin:"0 0",opacity:0}}),O=new $.Keyframes("antMoveLeftIn",{"0%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),m=new $.Keyframes("antMoveLeftOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(-100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),de=new $.Keyframes("antMoveRightIn",{"0%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),ie=new $.Keyframes("antMoveRightOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(100%, 0, 0)",transformOrigin:"0 0",opacity:0}}),o=new $.Keyframes("antMoveUpIn",{"0%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0},"100%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1}}),Q=new $.Keyframes("antMoveUpOut",{"0%":{transform:"translate3d(0, 0, 0)",transformOrigin:"0 0",opacity:1},"100%":{transform:"translate3d(0, -100%, 0)",transformOrigin:"0 0",opacity:0}}),U={"move-up":{inKeyframes:o,outKeyframes:Q},"move-down":{inKeyframes:Se,outKeyframes:_e},"move-left":{inKeyframes:O,outKeyframes:m},"move-right":{inKeyframes:de,outKeyframes:ie}},E=(b,S)=>{const{antCls:D}=b,V=`${D}-${S}`,{inKeyframes:q,outKeyframes:B}=U[S];return[(0,ae.R)(V,q,B,b.motionDurationMid),{[`
|
|
${V}-enter,
|
|
${V}-appear
|
|
`]:{opacity:0,animationTimingFunction:b.motionEaseOutCirc},[`${V}-leave`]:{animationTimingFunction:b.motionEaseInOutCirc}}]}},13826:function(Nt,rt,w){"use strict";w.d(rt,{Qt:function(){return O},Uw:function(){return _e},fJ:function(){return Se},ly:function(){return m},oN:function(){return E}});var $=w(93083),ae=w(95406);const Se=new $.Keyframes("antSlideUpIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1}}),_e=new $.Keyframes("antSlideUpOut",{"0%":{transform:"scaleY(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"0% 0%",opacity:0}}),O=new $.Keyframes("antSlideDownIn",{"0%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0},"100%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1}}),m=new $.Keyframes("antSlideDownOut",{"0%":{transform:"scaleY(1)",transformOrigin:"100% 100%",opacity:1},"100%":{transform:"scaleY(0.8)",transformOrigin:"100% 100%",opacity:0}}),de=new $.Keyframes("antSlideLeftIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1}}),ie=new $.Keyframes("antSlideLeftOut",{"0%":{transform:"scaleX(1)",transformOrigin:"0% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"0% 0%",opacity:0}}),o=new $.Keyframes("antSlideRightIn",{"0%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0},"100%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1}}),Q=new $.Keyframes("antSlideRightOut",{"0%":{transform:"scaleX(1)",transformOrigin:"100% 0%",opacity:1},"100%":{transform:"scaleX(0.8)",transformOrigin:"100% 0%",opacity:0}}),U={"slide-up":{inKeyframes:Se,outKeyframes:_e},"slide-down":{inKeyframes:O,outKeyframes:m},"slide-left":{inKeyframes:de,outKeyframes:ie},"slide-right":{inKeyframes:o,outKeyframes:Q}},E=(b,S)=>{const{antCls:D}=b,V=`${D}-${S}`,{inKeyframes:q,outKeyframes:B}=U[S];return[(0,ae.R)(V,q,B,b.motionDurationMid),{[`
|
|
${V}-enter,
|
|
${V}-appear
|
|
`]:{transform:"scale(0)",transformOrigin:"0% 0%",opacity:0,animationTimingFunction:b.motionEaseOutQuint,"&-prepare":{transform:"scale(1)"}},[`${V}-leave`]:{animationTimingFunction:b.motionEaseInQuint}}]}},19447:function(Nt,rt,w){"use strict";w.d(rt,{ZP:function(){return O},fS:function(){return Se},qN:function(){return ae}});var $=w(47585);const ae=8;function Se(m){const de=ae,{contentRadius:ie,limitVerticalRadius:o}=m,Q=ie>12?ie+2:12;return{dropdownArrowOffset:Q,dropdownArrowOffsetVertical:o?de:Q}}function _e(m,de){return m?de:{}}function O(m,de){const{componentCls:ie,sizePopupArrow:o,borderRadiusXS:Q,borderRadiusOuter:U,boxShadowPopoverArrow:E}=m,{colorBg:b,contentRadius:S=m.borderRadiusLG,limitVerticalRadius:D,arrowDistance:V=0,arrowPlacement:q={left:!0,right:!0,top:!0,bottom:!0}}=de,{dropdownArrowOffsetVertical:B,dropdownArrowOffset:R}=Se({contentRadius:S,limitVerticalRadius:D});return{[ie]:Object.assign(Object.assign(Object.assign(Object.assign({[`${ie}-arrow`]:[Object.assign(Object.assign({position:"absolute",zIndex:1,display:"block"},(0,$.r)(o,Q,U,b,E)),{"&:before":{background:b}})]},_e(!!q.top,{[[`&-placement-top ${ie}-arrow`,`&-placement-topLeft ${ie}-arrow`,`&-placement-topRight ${ie}-arrow`].join(",")]:{bottom:V,transform:"translateY(100%) rotate(180deg)"},[`&-placement-top ${ie}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(100%) rotate(180deg)"},[`&-placement-topLeft ${ie}-arrow`]:{left:{_skip_check_:!0,value:R}},[`&-placement-topRight ${ie}-arrow`]:{right:{_skip_check_:!0,value:R}}})),_e(!!q.bottom,{[[`&-placement-bottom ${ie}-arrow`,`&-placement-bottomLeft ${ie}-arrow`,`&-placement-bottomRight ${ie}-arrow`].join(",")]:{top:V,transform:"translateY(-100%)"},[`&-placement-bottom ${ie}-arrow`]:{left:{_skip_check_:!0,value:"50%"},transform:"translateX(-50%) translateY(-100%)"},[`&-placement-bottomLeft ${ie}-arrow`]:{left:{_skip_check_:!0,value:R}},[`&-placement-bottomRight ${ie}-arrow`]:{right:{_skip_check_:!0,value:R}}})),_e(!!q.left,{[[`&-placement-left ${ie}-arrow`,`&-placement-leftTop ${ie}-arrow`,`&-placement-leftBottom ${ie}-arrow`].join(",")]:{right:{_skip_check_:!0,value:V},transform:"translateX(100%) rotate(90deg)"},[`&-placement-left ${ie}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(100%) rotate(90deg)"},[`&-placement-leftTop ${ie}-arrow`]:{top:B},[`&-placement-leftBottom ${ie}-arrow`]:{bottom:B}})),_e(!!q.right,{[[`&-placement-right ${ie}-arrow`,`&-placement-rightTop ${ie}-arrow`,`&-placement-rightBottom ${ie}-arrow`].join(",")]:{left:{_skip_check_:!0,value:V},transform:"translateX(-100%) rotate(-90deg)"},[`&-placement-right ${ie}-arrow`]:{top:{_skip_check_:!0,value:"50%"},transform:"translateY(-50%) translateX(-100%) rotate(-90deg)"},[`&-placement-rightTop ${ie}-arrow`]:{top:B},[`&-placement-rightBottom ${ie}-arrow`]:{bottom:B}}))}}},47585:function(Nt,rt,w){"use strict";w.d(rt,{r:function(){return $}});const $=(ae,Se,_e,O,m)=>{const de=ae/2,ie=0,o=de,Q=_e*1/Math.sqrt(2),U=de-_e*(1-1/Math.sqrt(2)),E=de-Se*(1/Math.sqrt(2)),b=_e*(Math.sqrt(2)-1)+Se*(1/Math.sqrt(2)),S=2*de-E,D=b,V=2*de-Q,q=U,B=2*de-ie,R=o,Z=de*Math.sqrt(2)+_e*(Math.sqrt(2)-2),ue=_e*(Math.sqrt(2)-1);return{pointerEvents:"none",width:ae,height:ae,overflow:"hidden","&::before":{position:"absolute",bottom:0,insetInlineStart:0,width:ae,height:ae/2,background:O,clipPath:{_multi_value_:!0,value:[`polygon(${ue}px 100%, 50% ${ue}px, ${2*de-ue}px 100%, ${ue}px 100%)`,`path('M ${ie} ${o} A ${_e} ${_e} 0 0 0 ${Q} ${U} L ${E} ${b} A ${Se} ${Se} 0 0 1 ${S} ${D} L ${V} ${q} A ${_e} ${_e} 0 0 0 ${B} ${R} Z')`]},content:'""'},"&::after":{content:'""',position:"absolute",width:Z,height:Z,bottom:0,insetInline:0,margin:"auto",borderRadius:{_skip_check_:!0,value:`0 0 ${Se}px 0`},transform:"translateY(50%) rotate(-135deg)",boxShadow:m,zIndex:0,background:"transparent"}}}},33166:function(Nt,rt,w){"use strict";w.d(rt,{i:function(){return $}});const $=["blue","purple","cyan","green","magenta","pink","red","orange","yellow","volcano","geekblue","lime","gold"]},45157:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return ae}});var $=w(33166);function ae(Se,_e){return $.i.reduce((O,m)=>{const de=Se[`${m}1`],ie=Se[`${m}3`],o=Se[`${m}6`],Q=Se[`${m}7`];return Object.assign(Object.assign({},O),_e(m,{lightColor:de,lightBorderColor:ie,darkColor:o,textColor:Q}))},{})}},6848:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return ve}});var $=w(59301),ae=w(92310),Se=w.n(ae),_e=w(55477),O=w(18929),m=w(62892),de=w(79676),ie=w(92343),o=w(36355),Q=w(33234),U=w(88088),E=w(17313),b=w(29878),S=w(19447),D=w(45157),V=w(37613),q=w(83116);const B=Ae=>{const{componentCls:j,tooltipMaxWidth:P,tooltipColor:K,tooltipBg:k,tooltipBorderRadius:ne,zIndexPopup:G,controlHeight:v,boxShadowSecondary:y,paddingSM:N,paddingXS:te,tooltipRadiusOuter:Le}=Ae;return[{[j]:Object.assign(Object.assign(Object.assign(Object.assign({},(0,E.Wf)(Ae)),{position:"absolute",zIndex:G,display:"block",width:"max-content",maxWidth:P,visibility:"visible",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","&-hidden":{display:"none"},"--antd-arrow-background-color":k,[`${j}-inner`]:{minWidth:v,minHeight:v,padding:`${N/2}px ${te}px`,color:K,textAlign:"start",textDecoration:"none",wordWrap:"break-word",backgroundColor:k,borderRadius:ne,boxShadow:y,boxSizing:"border-box"},[["&-placement-left","&-placement-leftTop","&-placement-leftBottom","&-placement-right","&-placement-rightTop","&-placement-rightBottom"].join(",")]:{[`${j}-inner`]:{borderRadius:Math.min(ne,S.qN)}},[`${j}-content`]:{position:"relative"}}),(0,D.Z)(Ae,(Fe,Ue)=>{let{darkColor:Ye}=Ue;return{[`&${j}-${Fe}`]:{[`${j}-inner`]:{backgroundColor:Ye},[`${j}-arrow`]:{"--antd-arrow-background-color":Ye}}}})),{"&-rtl":{direction:"rtl"}})},(0,S.ZP)((0,V.TS)(Ae,{borderRadiusOuter:Le}),{colorBg:"var(--antd-arrow-background-color)",contentRadius:ne,limitVerticalRadius:!0}),{[`${j}-pure`]:{position:"relative",maxWidth:"none",margin:Ae.sizePopupArrow}}]};var R=(Ae,j)=>(0,q.Z)("Tooltip",K=>{if(j===!1)return[];const{borderRadius:k,colorTextLightSolid:ne,colorBgDefault:G,borderRadiusOuter:v}=K,y=(0,V.TS)(K,{tooltipMaxWidth:250,tooltipColor:ne,tooltipBorderRadius:k,tooltipBg:G,tooltipRadiusOuter:v>4?4:v});return[B(y),(0,b._y)(K,"zoom-big-fast")]},K=>{let{zIndexPopupBase:k,colorBgSpotlight:ne}=K;return{zIndexPopup:k+70,colorBgDefault:ne}},{resetStyle:!1})(Ae),Z=w(36785);function ue(Ae,j){const P=(0,Z.o2)(j),K=Se()({[`${Ae}-${j}`]:j&&P}),k={},ne={};return j&&!P&&(k.background=j,ne["--antd-arrow-background-color"]=j),{className:K,overlayStyle:k,arrowStyle:ne}}var Y=Ae=>{const{prefixCls:j,className:P,placement:K="top",title:k,color:ne,overlayInnerStyle:G}=Ae,{getPrefixCls:v}=$.useContext(o.E_),y=v("tooltip",j),[N,te]=R(y,!0),Le=ue(y,ne),Fe=Le.arrowStyle,Ue=Object.assign(Object.assign({},G),Le.overlayStyle),Ye=Se()(te,y,`${y}-pure`,`${y}-placement-${K}`,P,Le.className);return N($.createElement("div",{className:Ye,style:Fe},$.createElement("div",{className:`${y}-arrow`}),$.createElement(_e.G,Object.assign({},Ae,{className:te,prefixCls:y,overlayInnerStyle:Ue}),k)))},oe=function(Ae,j){var P={};for(var K in Ae)Object.prototype.hasOwnProperty.call(Ae,K)&&j.indexOf(K)<0&&(P[K]=Ae[K]);if(Ae!=null&&typeof Object.getOwnPropertySymbols=="function")for(var k=0,K=Object.getOwnPropertySymbols(Ae);k<K.length;k++)j.indexOf(K[k])<0&&Object.prototype.propertyIsEnumerable.call(Ae,K[k])&&(P[K[k]]=Ae[K[k]]);return P};const J=(Ae,j)=>{const P={},K=Object.assign({},Ae);return j.forEach(k=>{Ae&&k in Ae&&(P[k]=Ae[k],delete K[k])}),{picked:P,omitted:K}};function ye(Ae,j){const P=Ae.type;if((P.__ANT_BUTTON===!0||Ae.type==="button")&&Ae.props.disabled||P.__ANT_SWITCH===!0&&(Ae.props.disabled||Ae.props.loading)||P.__ANT_RADIO===!0&&Ae.props.disabled){const{picked:K,omitted:k}=J(Ae.props.style,["position","left","right","top","bottom","float","display","zIndex"]),ne=Object.assign(Object.assign({display:"inline-block"},K),{cursor:"not-allowed",width:Ae.props.block?"100%":void 0}),G=Object.assign(Object.assign({},k),{pointerEvents:"none"}),v=(0,ie.Tm)(Ae,{style:G,className:null});return $.createElement("span",{style:ne,className:Se()(Ae.props.className,`${j}-disabled-compatible-wrapper`)},v)}return Ae}const pe=$.forwardRef((Ae,j)=>{var P,K;const{prefixCls:k,openClassName:ne,getTooltipContainer:G,overlayClassName:v,color:y,overlayInnerStyle:N,children:te,afterOpenChange:Le,afterVisibleChange:Fe,destroyTooltipOnHide:Ue,arrow:Ye=!0,title:ut,overlay:ot,builtinPlacements:lt,arrowPointAtCenter:St=!1,autoAdjustOverflow:Lt=!0}=Ae,_t=!!Ye,[,At]=(0,U.Z)(),{getPopupContainer:Pt,getPrefixCls:kt,direction:fe}=$.useContext(o.E_),he=$.useRef(null),se=()=>{var ze;(ze=he.current)===null||ze===void 0||ze.forceAlign()};$.useImperativeHandle(j,()=>({forceAlign:se,forcePopupAlign:()=>{se()}}));const[Me,$e]=(0,O.Z)(!1,{value:(P=Ae.open)!==null&&P!==void 0?P:Ae.visible,defaultValue:(K=Ae.defaultOpen)!==null&&K!==void 0?K:Ae.defaultVisible}),F=!ut&&!ot&&ut!==0,le=ze=>{var qe,ee;$e(F?!1:ze),F||((qe=Ae.onOpenChange)===null||qe===void 0||qe.call(Ae,ze),(ee=Ae.onVisibleChange)===null||ee===void 0||ee.call(Ae,ze))},xe=$.useMemo(()=>{var ze,qe;let ee=St;return typeof Ye=="object"&&(ee=(qe=(ze=Ye.pointAtCenter)!==null&&ze!==void 0?ze:Ye.arrowPointAtCenter)!==null&&qe!==void 0?qe:St),lt||(0,de.Z)({arrowPointAtCenter:ee,autoAdjustOverflow:Lt,arrowWidth:_t?At.sizePopupArrow:0,borderRadius:At.borderRadius,offset:At.marginXXS,visibleFirst:!0})},[St,Ye,lt,At]),we=$.useMemo(()=>ut===0?ut:ot||ut||"",[ot,ut]),Ie=$.createElement(Q.BR,null,typeof we=="function"?we():we),{getPopupContainer:Oe,placement:Qe="top",mouseEnterDelay:it=.1,mouseLeaveDelay:Je=.1,overlayStyle:Ke,rootClassName:yt}=Ae,De=oe(Ae,["getPopupContainer","placement","mouseEnterDelay","mouseLeaveDelay","overlayStyle","rootClassName"]),Pe=kt("tooltip",k),Ze=kt(),Ve=Ae["data-popover-inject"];let nt=Me;!("open"in Ae)&&!("visible"in Ae)&&F&&(nt=!1);const mt=ye((0,ie.l$)(te)&&!(0,ie.M2)(te)?te:$.createElement("span",null,te),Pe),gt=mt.props,x=!gt.className||typeof gt.className=="string"?Se()(gt.className,ne||`${Pe}-open`):gt.className,[T,et]=R(Pe,!Ve),W=ue(Pe,y),Ee=W.arrowStyle,Bt=Object.assign(Object.assign({},N),W.overlayStyle),Be=Se()(v,{[`${Pe}-rtl`]:fe==="rtl"},W.className,yt,et);return T($.createElement(_e.Z,Object.assign({},De,{showArrow:_t,placement:Qe,mouseEnterDelay:it,mouseLeaveDelay:Je,prefixCls:Pe,overlayClassName:Be,overlayStyle:Object.assign(Object.assign({},Ee),Ke),getTooltipContainer:Oe||G||Pt,ref:he,builtinPlacements:xe,overlay:Ie,visible:nt,onVisibleChange:le,afterVisibleChange:Le!=null?Le:Fe,overlayInnerStyle:Bt,arrowContent:$.createElement("span",{className:`${Pe}-arrow-content`}),motion:{motionName:(0,m.m)(Ze,"zoom-big-fast",Ae.transitionName),motionDeadline:1e3},destroyTooltipOnHide:!!Ue}),nt?(0,ie.Tm)(mt,{className:x}):mt))});pe._InternalPanelDoNotUseOrYouWillBeFired=Y;var ve=pe},64018:function(){var Nt,rt,w,$=!1,ae,Se;window.PR_SHOULD_USE_CONTINUATION=!0;var _e,O;(function(){var m=window,de=["break,continue,do,else,for,if,return,while"],ie=[de,"auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,restrict,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],o=[ie,"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],Q=[o,"alignas,alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,noexcept,noreturn,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],U=[o,"abstract,assert,boolean,byte,extends,finally,final,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient"],E=[o,"abstract,add,alias,as,ascending,async,await,base,bool,by,byte,checked,decimal,delegate,descending,dynamic,event,finally,fixed,foreach,from,get,global,group,implicit,in,interface,internal,into,is,join,let,lock,null,object,out,override,orderby,params,partial,readonly,ref,remove,sbyte,sealed,select,set,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,value,var,virtual,where,yield"],b="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",S=[o,"abstract,async,await,constructor,debugger,enum,eval,export,function,get,implements,instanceof,interface,let,null,set,undefined,var,with,yield,Infinity,NaN"],D="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",V=[de,"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"],q=[de,"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"],B=[de,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],R=[Q,E,U,S,D,V,q,B],Z=/^(DIR|FILE|array|vector|(de|priority_)?queue|(forward_)?list|stack|(const_)?(reverse_)?iterator|(unordered_)?(multi)?(set|map)|bitset|u?(int|float)\d*)\b/,ue="str",M="kwd",Y="com",oe="typ",J="lit",ye="pun",pe="pln",ve="tag",Ae="dec",j="src",P="atn",K="atv",k="nocode",ne="(?:^^\\.?|[+-]|[!=]=?=?|\\#|%=?|&&?=?|\\(|\\*=?|[+\\-]=|->|\\/=?|::?|<<?=?|>>?>?=?|,|;|\\?|@|\\[|~|{|\\^\\^?=?|\\|\\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*";function G(fe){for(var he=0,se=!1,Me=!1,$e=0,F=fe.length;$e<F;++$e){var le=fe[$e];if(le.ignoreCase)Me=!0;else if(/[a-z]/i.test(le.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){se=!0,Me=!1;break}}var xe={b:8,t:9,n:10,v:11,f:12,r:13};function we(Je){var Ke=Je.charCodeAt(0);if(Ke!==92)return Ke;var yt=Je.charAt(1);return Ke=xe[yt],Ke||("0"<=yt&&yt<="7"?parseInt(Je.substring(1),8):yt==="u"||yt==="x"?parseInt(Je.substring(2),16):Je.charCodeAt(1))}function Ie(Je){if(Je<32)return(Je<16?"\\x0":"\\x")+Je.toString(16);var Ke=String.fromCharCode(Je);return Ke==="\\"||Ke==="-"||Ke==="]"||Ke==="^"?"\\"+Ke:Ke}function Oe(Je){var Ke=Je.substring(1,Je.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),yt=[],De=Ke[0]==="^",Pe=["["];De&&Pe.push("^");for(var Ze=De?1:0,Ve=Ke.length;Ze<Ve;++Ze){var nt=Ke[Ze];if(/\\[bdsw]/i.test(nt))Pe.push(nt);else{var mt=we(nt),gt;Ze+2<Ve&&Ke[Ze+1]==="-"?(gt=we(Ke[Ze+2]),Ze+=2):gt=mt,yt.push([mt,gt]),gt<65||mt>122||(gt<65||mt>90||yt.push([Math.max(65,mt)|32,Math.min(gt,90)|32]),gt<97||mt>122||yt.push([Math.max(97,mt)&-33,Math.min(gt,122)&-33]))}}yt.sort(function(W,Ee){return W[0]-Ee[0]||Ee[1]-W[1]});for(var x=[],T=[],Ze=0;Ze<yt.length;++Ze){var et=yt[Ze];et[0]<=T[1]+1?T[1]=Math.max(T[1],et[1]):x.push(T=et)}for(var Ze=0;Ze<x.length;++Ze){var et=x[Ze];Pe.push(Ie(et[0])),et[1]>et[0]&&(et[1]+1>et[0]&&Pe.push("-"),Pe.push(Ie(et[1])))}return Pe.push("]"),Pe.join("")}function Qe(Je){for(var Ke=Je.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),yt=Ke.length,De=[],Pe=0,Ze=0;Pe<yt;++Pe){var Ve=Ke[Pe];if(Ve==="(")++Ze;else if(Ve.charAt(0)==="\\"){var nt=+Ve.substring(1);nt&&(nt<=Ze?De[nt]=-1:Ke[Pe]=Ie(nt))}}for(var Pe=1;Pe<De.length;++Pe)De[Pe]===-1&&(De[Pe]=++he);for(var Pe=0,Ze=0;Pe<yt;++Pe){var Ve=Ke[Pe];if(Ve==="(")++Ze,De[Ze]||(Ke[Pe]="(?:");else if(Ve.charAt(0)==="\\"){var nt=+Ve.substring(1);nt&&nt<=Ze&&(Ke[Pe]="\\"+De[nt])}}for(var Pe=0;Pe<yt;++Pe)Ke[Pe]==="^"&&Ke[Pe+1]!=="^"&&(Ke[Pe]="");if(Je.ignoreCase&&se)for(var Pe=0;Pe<yt;++Pe){var Ve=Ke[Pe],mt=Ve.charAt(0);Ve.length>=2&&mt==="["?Ke[Pe]=Oe(Ve):mt!=="\\"&&(Ke[Pe]=Ve.replace(/[a-zA-Z]/g,function(T){var et=T.charCodeAt(0);return"["+String.fromCharCode(et&-33,et|32)+"]"}))}return Ke.join("")}for(var it=[],$e=0,F=fe.length;$e<F;++$e){var le=fe[$e];if(le.global||le.multiline)throw new Error(""+le);it.push("(?:"+Qe(le)+")")}return new RegExp(it.join("|"),Me?"gi":"g")}function v(fe,he){var se=/(?:^|\s)nocode(?:\s|$)/,Me=[],$e=0,F=[],le=0;function xe(we){var Ie=we.nodeType;if(Ie==1){if(se.test(we.className))return;for(var Oe=we.firstChild;Oe;Oe=Oe.nextSibling)xe(Oe);var Qe=we.nodeName.toLowerCase();(Qe==="br"||Qe==="li")&&(Me[le]=`
|
|
`,F[le<<1]=$e++,F[le++<<1|1]=we)}else if(Ie==3||Ie==4){var it=we.nodeValue;it.length&&(he?it=it.replace(/\r\n?/g,`
|
|
`):it=it.replace(/[ \t\r\n]+/g," "),Me[le]=it,F[le<<1]=$e,$e+=it.length,F[le++<<1|1]=we)}}return xe(fe),{sourceCode:Me.join("").replace(/\n$/,""),spans:F}}function y(fe,he,se,Me,$e){if(se){var F={sourceNode:fe,pre:1,langExtension:null,numberLines:null,sourceCode:se,spans:null,basePos:he,decorations:null};Me(F),$e.push.apply($e,F.decorations)}}var N=/\S/;function te(fe){for(var he=void 0,se=fe.firstChild;se;se=se.nextSibling){var Me=se.nodeType;he=Me===1?he?fe:se:Me===3&&N.test(se.nodeValue)?fe:he}return he===fe?void 0:he}function Le(fe,he){var se={},Me;(function(){for(var le=fe.concat(he),xe=[],we={},Ie=0,Oe=le.length;Ie<Oe;++Ie){var Qe=le[Ie],it=Qe[3];if(it)for(var Je=it.length;--Je>=0;)se[it.charAt(Je)]=Qe;var Ke=Qe[1],yt=""+Ke;we.hasOwnProperty(yt)||(xe.push(Ke),we[yt]=null)}xe.push(/[\0-\uffff]/),Me=G(xe)})();var $e=he.length,F=function(le){for(var xe=le.sourceCode,we=le.basePos,Ie=le.sourceNode,Oe=[we,pe],Qe=0,it=xe.match(Me)||[],Je={},Ke=0,yt=it.length;Ke<yt;++Ke){var De=it[Ke],Pe=Je[De],Ze=void 0,Ve;if(typeof Pe=="string")Ve=!1;else{var nt=se[De.charAt(0)];if(nt)Ze=De.match(nt[1]),Pe=nt[0];else{for(var mt=0;mt<$e;++mt)if(nt=he[mt],Ze=De.match(nt[1]),Ze){Pe=nt[0];break}Ze||(Pe=pe)}Ve=Pe.length>=5&&Pe.substring(0,5)==="lang-",Ve&&!(Ze&&typeof Ze[1]=="string")&&(Ve=!1,Pe=j),Ve||(Je[De]=Pe)}var gt=Qe;if(Qe+=De.length,!Ve)Oe.push(we+gt,Pe);else{var x=Ze[1],T=De.indexOf(x),et=T+x.length;Ze[2]&&(et=De.length-Ze[2].length,T=et-x.length);var W=Pe.substring(5);y(Ie,we+gt,De.substring(0,T),F,Oe),y(Ie,we+gt+T,x,St(W,x),Oe),y(Ie,we+gt+et,De.substring(et),F,Oe)}}le.decorations=Oe};return F}function Fe(fe){var he=[],se=[];fe.tripleQuotedStrings?he.push([ue,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,`'"`]):fe.multiLineStrings?he.push([ue,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):he.push([ue,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,`"'`]),fe.verbatimStrings&&se.push([ue,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);var Me=fe.hashComments;Me&&(fe.cStyleComments?(Me>1?he.push([Y,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,null,"#"]):he.push([Y,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),se.push([ue,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h(?:h|pp|\+\+)?|[a-z]\w*)>/,null])):he.push([Y,/^#[^\r\n]*/,null,"#"])),fe.cStyleComments&&(se.push([Y,/^\/\/[^\r\n]*/,null]),se.push([Y,/^\/\*[\s\S]*?(?:\*\/|$)/,null]));var $e=fe.regexLiterals;if($e){var F=$e>1?"":`
|
|
\r`,le=F?".":"[\\S\\s]",xe="/(?=[^/*"+F+"])(?:[^/\\x5B\\x5C"+F+"]|\\x5C"+le+"|\\x5B(?:[^\\x5C\\x5D"+F+"]|\\x5C"+le+")*(?:\\x5D|$))+/";se.push(["lang-regex",RegExp("^"+ne+"("+xe+")")])}var we=fe.types;we&&se.push([oe,we]);var Ie=(""+fe.keywords).replace(/^ | $/g,"");Ie.length&&se.push([M,new RegExp("^(?:"+Ie.replace(/[\s,]+/g,"|")+")\\b"),null]),he.push([pe,/^\s+/,null,` \r
|
|
\xA0`]);var Oe="^.[^\\s\\w.$@'\"`/\\\\]*";return fe.regexLiterals&&(Oe+="(?!s*/)"),se.push([J,/^@[a-z_$][a-z_$@0-9]*/i,null],[oe,/^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/,null],[pe,/^[a-z_$][a-z_$@0-9]*/i,null],[J,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[pe,/^\\[\s\S]?/,null],[ye,new RegExp(Oe),null]),Le(he,se)}var Ue=Fe({keywords:R,hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});function Ye(fe,he,se){for(var Me=/(?:^|\s)nocode(?:\s|$)/,$e=/\r\n?|\n/,F=fe.ownerDocument,le=F.createElement("li");fe.firstChild;)le.appendChild(fe.firstChild);var xe=[le];function we(Ke){var yt=Ke.nodeType;if(yt==1&&!Me.test(Ke.className))if(Ke.nodeName==="br")Ie(Ke),Ke.parentNode&&Ke.parentNode.removeChild(Ke);else for(var De=Ke.firstChild;De;De=De.nextSibling)we(De);else if((yt==3||yt==4)&&se){var Pe=Ke.nodeValue,Ze=Pe.match($e);if(Ze){var Ve=Pe.substring(0,Ze.index);Ke.nodeValue=Ve;var nt=Pe.substring(Ze.index+Ze[0].length);if(nt){var mt=Ke.parentNode;mt.insertBefore(F.createTextNode(nt),Ke.nextSibling)}Ie(Ke),Ve||Ke.parentNode.removeChild(Ke)}}}function Ie(Ke){for(;!Ke.nextSibling;)if(Ke=Ke.parentNode,!Ke)return;function yt(Ze,Ve){var nt=Ve?Ze.cloneNode(!1):Ze,mt=Ze.parentNode;if(mt){var gt=yt(mt,1),x=Ze.nextSibling;gt.appendChild(nt);for(var T=x;T;T=x)x=T.nextSibling,gt.appendChild(T)}return nt}for(var De=yt(Ke.nextSibling,0),Pe;(Pe=De.parentNode)&&Pe.nodeType===1;)De=Pe;xe.push(De)}for(var Oe=0;Oe<xe.length;++Oe)we(xe[Oe]);he===(he|0)&&xe[0].setAttribute("value",he);var Qe=F.createElement("ol");Qe.className="linenums";for(var it=Math.max(0,he-1|0)||0,Oe=0,Je=xe.length;Oe<Je;++Oe)le=xe[Oe],le.className="L"+(Oe+it)%10,le.firstChild||le.appendChild(F.createTextNode("\xA0")),Qe.appendChild(le);fe.appendChild(Qe)}function ut(fe){var he=/\bMSIE\s(\d+)/.exec(navigator.userAgent);he=he&&+he[1]<=8;var se=/\n/g,Me=fe.sourceCode,$e=Me.length,F=0,le=fe.spans,xe=le.length,we=0,Ie=fe.decorations,Oe=Ie.length,Qe=0;Ie[Oe]=$e;var it,Je;for(Je=it=0;Je<Oe;)Ie[Je]!==Ie[Je+2]?(Ie[it++]=Ie[Je++],Ie[it++]=Ie[Je++]):Je+=2;for(Oe=it,Je=it=0;Je<Oe;){for(var Ke=Ie[Je],yt=Ie[Je+1],De=Je+2;De+2<=Oe&&Ie[De+1]===yt;)De+=2;Ie[it++]=Ke,Ie[it++]=yt,Je=De}Oe=Ie.length=it;var Pe=fe.sourceNode,Ze="";Pe&&(Ze=Pe.style.display,Pe.style.display="none");try{for(var Ve=null;we<xe;){var nt=le[we],mt=le[we+2]||$e,gt=Ie[Qe+2]||$e,De=Math.min(mt,gt),x=le[we+1],T;if(x.nodeType!==1&&(T=Me.substring(F,De))){he&&(T=T.replace(se,"\r")),x.nodeValue=T;var et=x.ownerDocument,W=et.createElement("span");W.className=Ie[Qe+1];var Ee=x.parentNode;Ee.replaceChild(W,x),W.appendChild(x),F<mt&&(le[we+1]=x=et.createTextNode(Me.substring(De,mt)),Ee.insertBefore(x,W.nextSibling))}F=De,F>=mt&&(we+=2),F>=gt&&(Qe+=2)}}finally{Pe&&(Pe.style.display=Ze)}}var ot={};function lt(fe,he){for(var se=he.length;--se>=0;){var Me=he[se];ot.hasOwnProperty(Me)?m.console&&console.warn("cannot override language handler %s",Me):ot[Me]=fe}}function St(fe,he){return fe&&ot.hasOwnProperty(fe)||(fe=/^\s*</.test(he)?"default-markup":"default-code"),ot[fe]}lt(Ue,["default-code"]),lt(Le([],[[pe,/^[^<?]+/],[Ae,/^<!\w[^>]*(?:>|$)/],[Y,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[ye,/^(?:<[%?]|[%?]>)/],["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"]),lt(Le([[pe,/^[\s]+/,null,` \r
|
|
`],[K,/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,`"'`]],[[ve,/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],[P,/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[ye,/^[=<>\/]+/],["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"]),lt(Le([],[[K,/^[\s\S]+/]]),["uq.val"]),lt(Fe({keywords:Q,hashComments:!0,cStyleComments:!0,types:Z}),["c","cc","cpp","cxx","cyc","m"]),lt(Fe({keywords:"null,true,false"}),["json"]),lt(Fe({keywords:E,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:Z}),["cs"]),lt(Fe({keywords:U,cStyleComments:!0}),["java"]),lt(Fe({keywords:B,hashComments:!0,multiLineStrings:!0}),["bash","bsh","csh","sh"]),lt(Fe({keywords:V,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py","python"]),lt(Fe({keywords:D,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),["perl","pl","pm"]),lt(Fe({keywords:q,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb","ruby"]),lt(Fe({keywords:S,cStyleComments:!0,regexLiterals:!0}),["javascript","js","ts","typescript"]),lt(Fe({keywords:b,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]),lt(Le([],[[ue,/^[\s\S]+/]]),["regex"]);function Lt(fe){var he=fe.langExtension;try{var se=v(fe.sourceNode,fe.pre),Me=se.sourceCode;fe.sourceCode=Me,fe.spans=se.spans,fe.basePos=0,St(he,Me)(fe),ut(fe)}catch($e){m.console&&console.log($e&&$e.stack||$e)}}function _t(fe,he,se){var Me=se||!1,$e=he||null,F=document.createElement("div");F.innerHTML="<pre>"+fe+"</pre>",F=F.firstChild,Me&&Ye(F,Me,!0);var le={langExtension:$e,numberLines:Me,sourceNode:F,pre:1,sourceCode:null,basePos:null,spans:null,decorations:null};return Lt(le),F.innerHTML}function At(fe,he){var se=he||document.body,Me=se.ownerDocument||document;function $e(nt){return se.getElementsByTagName(nt)}for(var F=[$e("pre"),$e("code"),$e("xmp")],le=[],xe=0;xe<F.length;++xe)for(var we=0,Ie=F[xe].length;we<Ie;++we)le.push(F[xe][we]);F=null;var Oe=Date;Oe.now||(Oe={now:function(){return+new Date}});var Qe=0,it=/\blang(?:uage)?-([\w.]+)(?!\S)/,Je=/\bprettyprint\b/,Ke=/\bprettyprinted\b/,yt=/pre|xmp/i,De=/^code$/i,Pe=/^(?:pre|code|xmp)$/i,Ze={};function Ve(){for(var nt=m.PR_SHOULD_USE_CONTINUATION?Oe.now()+250:1/0;Qe<le.length&&Oe.now()<nt;Qe++){for(var mt=le[Qe],gt=Ze,x=mt;x=x.previousSibling;){var T=x.nodeType,et=(T===7||T===8)&&x.nodeValue;if(et?!/^\??prettify\b/.test(et):T!==3||/\S/.test(x.nodeValue))break;if(et){gt={},et.replace(/\b(\w+)=([\w:.%+-]+)/g,function(Ce,Ot,zt){gt[Ot]=zt});break}}var W=mt.className;if((gt!==Ze||Je.test(W))&&!Ke.test(W)){for(var Ee=!1,Bt=mt.parentNode;Bt;Bt=Bt.parentNode){var Be=Bt.tagName;if(Pe.test(Be)&&Bt.className&&Je.test(Bt.className)){Ee=!0;break}}if(!Ee){mt.className+=" prettyprinted";var ze=gt.lang;if(!ze){ze=W.match(it);var qe;!ze&&(qe=te(mt))&&De.test(qe.tagName)&&(ze=qe.className.match(it)),ze&&(ze=ze[1])}var ee;if(yt.test(mt.tagName))ee=1;else{var be=mt.currentStyle,me=Me.defaultView,Ge=be?be.whiteSpace:me&&me.getComputedStyle?me.getComputedStyle(mt,null).getPropertyValue("white-space"):0;ee=Ge&&Ge.substring(0,3)==="pre"}var X=gt.linenums;(X=X==="true"||+X)||(X=W.match(/\blinenums\b(?::(\d+))?/),X=X?X[1]&&X[1].length?+X[1]:!0:!1),X&&Ye(mt,X,ee);var Ct={langExtension:ze,sourceNode:mt,numberLines:X,pre:ee,sourceCode:null,basePos:null,spans:null,decorations:null};Lt(Ct)}}}Qe<le.length?m.setTimeout(Ve,250):typeof fe=="function"&&fe()}Ve()}var Pt=m.PR={createSimpleLexer:Le,registerLangHandler:lt,sourceDecorator:Fe,PR_ATTRIB_NAME:P,PR_ATTRIB_VALUE:K,PR_COMMENT:Y,PR_DECLARATION:Ae,PR_KEYWORD:M,PR_LITERAL:J,PR_NOCODE:k,PR_PLAIN:pe,PR_PUNCTUATION:ye,PR_SOURCE:j,PR_STRING:ue,PR_TAG:ve,PR_TYPE:oe,prettyPrintOne:$?m.prettyPrintOne=_t:_e=_t,prettyPrint:O=$?m.prettyPrint=At:O=At},kt=m.define;typeof kt=="function"&&kt.amd&&kt("google-code-prettify",[],function(){return Pt})})()},25769:function(Nt,rt,w){"use strict";var $=w(98040),ae={"text/plain":"Text","text/html":"Url",default:"Text"},Se="Copy to clipboard: #{key}, Enter";function _e(m){var de=(/mac os x/i.test(navigator.userAgent)?"\u2318":"Ctrl")+"+C";return m.replace(/#{\s*key\s*}/g,de)}function O(m,de){var ie,o,Q,U,E,b,S=!1;de||(de={}),ie=de.debug||!1;try{Q=$(),U=document.createRange(),E=document.getSelection(),b=document.createElement("span"),b.textContent=m,b.ariaHidden="true",b.style.all="unset",b.style.position="fixed",b.style.top=0,b.style.clip="rect(0, 0, 0, 0)",b.style.whiteSpace="pre",b.style.webkitUserSelect="text",b.style.MozUserSelect="text",b.style.msUserSelect="text",b.style.userSelect="text",b.addEventListener("copy",function(V){if(V.stopPropagation(),de.format)if(V.preventDefault(),typeof V.clipboardData=="undefined"){ie&&console.warn("unable to use e.clipboardData"),ie&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var q=ae[de.format]||ae.default;window.clipboardData.setData(q,m)}else V.clipboardData.clearData(),V.clipboardData.setData(de.format,m);de.onCopy&&(V.preventDefault(),de.onCopy(V.clipboardData))}),document.body.appendChild(b),U.selectNodeContents(b),E.addRange(U);var D=document.execCommand("copy");if(!D)throw new Error("copy command was unsuccessful");S=!0}catch(V){ie&&console.error("unable to copy using execCommand: ",V),ie&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(de.format||"text",m),de.onCopy&&de.onCopy(window.clipboardData),S=!0}catch(q){ie&&console.error("unable to copy using clipboardData: ",q),ie&&console.error("falling back to prompt"),o=_e("message"in de?de.message:Se),window.prompt(o,m)}}finally{E&&(typeof E.removeRange=="function"?E.removeRange(U):E.removeAllRanges()),b&&document.body.removeChild(b),Q()}return S}Nt.exports=O},53184:function(Nt,rt,w){"use strict";var $,ae;function Se(_e,O,m){var de=function(ie,o){return _e.js_beautify(ie,o)};return de.js=_e.js_beautify,de.css=O.css_beautify,de.html=m.html_beautify,de.js_beautify=_e.js_beautify,de.css_beautify=O.css_beautify,de.html_beautify=m.html_beautify,de}$=[w(58553),w(87804),w(40998)],ae=function(_e,O,m){return Se(_e,O,m)}.apply(rt,$),ae!==void 0&&(Nt.exports=ae)},87804:function(Nt,rt){var w,$;(function(){var ae;(function(){"use strict";var _e=[,,function(ie){function o(E){this.__parent=E,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}o.prototype.clone_empty=function(){var E=new o(this.__parent);return E.set_indent(this.__indent_count,this.__alignment_count),E},o.prototype.item=function(E){return E<0?this.__items[this.__items.length+E]:this.__items[E]},o.prototype.has_match=function(E){for(var b=this.__items.length-1;b>=0;b--)if(this.__items[b].match(E))return!0;return!1},o.prototype.set_indent=function(E,b){this.is_empty()&&(this.__indent_count=E||0,this.__alignment_count=b||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},o.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},o.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},o.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var E=this.__parent.current_line;return E.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),E.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),E.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,E.__items[0]===" "&&(E.__items.splice(0,1),E.__character_count-=1),!0}return!1},o.prototype.is_empty=function(){return this.__items.length===0},o.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},o.prototype.push=function(E){this.__items.push(E);var b=E.lastIndexOf(`
|
|
`);b!==-1?this.__character_count=E.length-b:this.__character_count+=E.length},o.prototype.pop=function(){var E=null;return this.is_empty()||(E=this.__items.pop(),this.__character_count-=E.length),E},o.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},o.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},o.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},o.prototype.toString=function(){var E="";return this.is_empty()?this.__parent.indent_empty_lines&&(E=this.__parent.get_indent_string(this.__indent_count)):(E=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),E+=this.__items.join("")),E};function Q(E,b){this.__cache=[""],this.__indent_size=E.indent_size,this.__indent_string=E.indent_char,E.indent_with_tabs||(this.__indent_string=new Array(E.indent_size+1).join(E.indent_char)),b=b||"",E.indent_level>0&&(b=new Array(E.indent_level+1).join(this.__indent_string)),this.__base_string=b,this.__base_string_length=b.length}Q.prototype.get_indent_size=function(E,b){var S=this.__base_string_length;return b=b||0,E<0&&(S=0),S+=E*this.__indent_size,S+=b,S},Q.prototype.get_indent_string=function(E,b){var S=this.__base_string;return b=b||0,E<0&&(E=0,S=""),b+=E*this.__indent_size,this.__ensure_cache(b),S+=this.__cache[b],S},Q.prototype.__ensure_cache=function(E){for(;E>=this.__cache.length;)this.__add_column()},Q.prototype.__add_column=function(){var E=this.__cache.length,b=0,S="";this.__indent_size&&E>=this.__indent_size&&(b=Math.floor(E/this.__indent_size),E-=b*this.__indent_size,S=new Array(b+1).join(this.__indent_string)),E&&(S+=new Array(E+1).join(" ")),this.__cache.push(S)};function U(E,b){this.__indent_cache=new Q(E,b),this.raw=!1,this._end_with_newline=E.end_with_newline,this.indent_size=E.indent_size,this.wrap_line_length=E.wrap_line_length,this.indent_empty_lines=E.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}U.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},U.prototype.get_line_number=function(){return this.__lines.length},U.prototype.get_indent_string=function(E,b){return this.__indent_cache.get_indent_string(E,b)},U.prototype.get_indent_size=function(E,b){return this.__indent_cache.get_indent_size(E,b)},U.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},U.prototype.add_new_line=function(E){return this.is_empty()||!E&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},U.prototype.get_code=function(E){this.trim(!0);var b=this.current_line.pop();b&&(b[b.length-1]===`
|
|
`&&(b=b.replace(/\n+$/g,"")),this.current_line.push(b)),this._end_with_newline&&this.__add_outputline();var S=this.__lines.join(`
|
|
`);return E!==`
|
|
`&&(S=S.replace(/[\n]/g,E)),S},U.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},U.prototype.set_indent=function(E,b){return E=E||0,b=b||0,this.next_line.set_indent(E,b),this.__lines.length>1?(this.current_line.set_indent(E,b),!0):(this.current_line.set_indent(),!1)},U.prototype.add_raw_token=function(E){for(var b=0;b<E.newlines;b++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(E.whitespace_before),this.current_line.push(E.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},U.prototype.add_token=function(E){this.__add_space_before_token(),this.current_line.push(E),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},U.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(" "))},U.prototype.remove_indent=function(E){for(var b=this.__lines.length;E<b;)this.__lines[E]._remove_indent(),E++;this.current_line._remove_wrap_indent()},U.prototype.trim=function(E){for(E=E===void 0?!1:E,this.current_line.trim();E&&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},U.prototype.just_added_newline=function(){return this.current_line.is_empty()},U.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},U.prototype.ensure_empty_line_above=function(E,b){for(var S=this.__lines.length-2;S>=0;){var D=this.__lines[S];if(D.is_empty())break;if(D.item(0).indexOf(E)!==0&&D.item(-1)!==b){this.__lines.splice(S+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}S--}},ie.exports.Output=U},,,,function(ie){function o(E,b){this.raw_options=Q(E,b),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}o.prototype._get_array=function(E,b){var S=this.raw_options[E],D=b||[];return typeof S=="object"?S!==null&&typeof S.concat=="function"&&(D=S.concat()):typeof S=="string"&&(D=S.split(/[^a-zA-Z0-9_\/\-]+/)),D},o.prototype._get_boolean=function(E,b){var S=this.raw_options[E],D=S===void 0?!!b:!!S;return D},o.prototype._get_characters=function(E,b){var S=this.raw_options[E],D=b||"";return typeof S=="string"&&(D=S.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),D},o.prototype._get_number=function(E,b){var S=this.raw_options[E];b=parseInt(b,10),isNaN(b)&&(b=0);var D=parseInt(S,10);return isNaN(D)&&(D=b),D},o.prototype._get_selection=function(E,b,S){var D=this._get_selection_list(E,b,S);if(D.length!==1)throw new Error("Invalid Option Value: The option '"+E+`' can only be one of the following values:
|
|
`+b+`
|
|
You passed in: '`+this.raw_options[E]+"'");return D[0]},o.prototype._get_selection_list=function(E,b,S){if(!b||b.length===0)throw new Error("Selection list cannot be empty.");if(S=S||[b[0]],!this._is_valid_selection(S,b))throw new Error("Invalid Default Value!");var D=this._get_array(E,S);if(!this._is_valid_selection(D,b))throw new Error("Invalid Option Value: The option '"+E+`' can contain only the following values:
|
|
`+b+`
|
|
You passed in: '`+this.raw_options[E]+"'");return D},o.prototype._is_valid_selection=function(E,b){return E.length&&b.length&&!E.some(function(S){return b.indexOf(S)===-1})};function Q(E,b){var S={};E=U(E);var D;for(D in E)D!==b&&(S[D]=E[D]);if(b&&E[b])for(D in E[b])S[D]=E[b][D];return S}function U(E){var b={},S;for(S in E){var D=S.replace(/-/g,"_");b[D]=E[S]}return b}ie.exports.Options=o,ie.exports.normalizeOpts=U,ie.exports.mergeOpts=Q},,function(ie){var o=RegExp.prototype.hasOwnProperty("sticky");function Q(U){this.__input=U||"",this.__input_length=this.__input.length,this.__position=0}Q.prototype.restart=function(){this.__position=0},Q.prototype.back=function(){this.__position>0&&(this.__position-=1)},Q.prototype.hasNext=function(){return this.__position<this.__input_length},Q.prototype.next=function(){var U=null;return this.hasNext()&&(U=this.__input.charAt(this.__position),this.__position+=1),U},Q.prototype.peek=function(U){var E=null;return U=U||0,U+=this.__position,U>=0&&U<this.__input_length&&(E=this.__input.charAt(U)),E},Q.prototype.__match=function(U,E){U.lastIndex=E;var b=U.exec(this.__input);return b&&!(o&&U.sticky)&&b.index!==E&&(b=null),b},Q.prototype.test=function(U,E){return E=E||0,E+=this.__position,E>=0&&E<this.__input_length?!!this.__match(U,E):!1},Q.prototype.testChar=function(U,E){var b=this.peek(E);return U.lastIndex=0,b!==null&&U.test(b)},Q.prototype.match=function(U){var E=this.__match(U,this.__position);return E?this.__position+=E[0].length:E=null,E},Q.prototype.read=function(U,E,b){var S="",D;return U&&(D=this.match(U),D&&(S+=D[0])),E&&(D||!U)&&(S+=this.readUntil(E,b)),S},Q.prototype.readUntil=function(U,E){var b="",S=this.__position;U.lastIndex=this.__position;var D=U.exec(this.__input);return D?(S=D.index,E&&(S+=D[0].length)):S=this.__input_length,b=this.__input.substring(this.__position,S),this.__position=S,b},Q.prototype.readUntilAfter=function(U){return this.readUntil(U,!0)},Q.prototype.get_regexp=function(U,E){var b=null,S="g";return E&&o&&(S="y"),typeof U=="string"&&U!==""?b=new RegExp(U,S):U&&(b=new RegExp(U.source,S)),b},Q.prototype.get_literal_regexp=function(U){return RegExp(U.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},Q.prototype.peekUntilAfter=function(U){var E=this.__position,b=this.readUntilAfter(U);return this.__position=E,b},Q.prototype.lookBack=function(U){var E=this.__position-1;return E>=U.length&&this.__input.substring(E-U.length,E).toLowerCase()===U},ie.exports.InputScanner=Q},,,,,function(ie){function o(Q,U){Q=typeof Q=="string"?Q:Q.source,U=typeof U=="string"?U:U.source,this.__directives_block_pattern=new RegExp(Q+/ beautify( \w+[:]\w+)+ /.source+U,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(Q+/\sbeautify\signore:end\s/.source+U,"g")}o.prototype.get_directives=function(Q){if(!Q.match(this.__directives_block_pattern))return null;var U={};this.__directive_pattern.lastIndex=0;for(var E=this.__directive_pattern.exec(Q);E;)U[E[1]]=E[2],E=this.__directive_pattern.exec(Q);return U},o.prototype.readIgnored=function(Q){return Q.readUntilAfter(this.__directives_end_ignore_pattern)},ie.exports.Directives=o},,function(ie,o,Q){var U=Q(16).Beautifier,E=Q(17).Options;function b(S,D){var V=new U(S,D);return V.beautify()}ie.exports=b,ie.exports.defaultOptions=function(){return new E}},function(ie,o,Q){var U=Q(17).Options,E=Q(2).Output,b=Q(8).InputScanner,S=Q(13).Directives,D=new S(/\/\*/,/\*\//),V=/\r\n|[\r\n]/,q=/\r\n|[\r\n]/g,B=/\s/,R=/(?:\s|\n)+/g,Z=/\/\*(?:[\s\S]*?)((?:\*\/)|$)/g,ue=/\/\/(?:[^\n\r\u2028\u2029]*)/g;function M(Y,oe){this._source_text=Y||"",this._options=new U(oe),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"]}M.prototype.eatString=function(Y){var oe="";for(this._ch=this._input.next();this._ch;){if(oe+=this._ch,this._ch==="\\")oe+=this._input.next();else if(Y.indexOf(this._ch)!==-1||this._ch===`
|
|
`)break;this._ch=this._input.next()}return oe},M.prototype.eatWhitespace=function(Y){for(var oe=B.test(this._input.peek()),J=0;B.test(this._input.peek());)this._ch=this._input.next(),Y&&this._ch===`
|
|
`&&(J===0||J<this._options.max_preserve_newlines)&&(J++,this._output.add_new_line(!0));return oe},M.prototype.foundNestedPseudoClass=function(){for(var Y=0,oe=1,J=this._input.peek(oe);J;){if(J==="{")return!0;if(J==="(")Y+=1;else if(J===")"){if(Y===0)return!1;Y-=1}else if(J===";"||J==="}")return!1;oe++,J=this._input.peek(oe)}return!1},M.prototype.print_string=function(Y){this._output.set_indent(this._indentLevel),this._output.non_breaking_space=!0,this._output.add_token(Y)},M.prototype.preserveSingleSpace=function(Y){Y&&(this._output.space_before_token=!0)},M.prototype.indent=function(){this._indentLevel++},M.prototype.outdent=function(){this._indentLevel>0&&this._indentLevel--},M.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var Y=this._source_text,oe=this._options.eol;oe==="auto"&&(oe=`
|
|
`,Y&&V.test(Y||"")&&(oe=Y.match(V)[0])),Y=Y.replace(q,`
|
|
`);var J=Y.match(/^[\t ]*/)[0];this._output=new E(this._options,J),this._input=new b(Y),this._indentLevel=0,this._nestedLevel=0,this._ch=null;for(var ye=0,pe=!1,ve=!1,Ae=!1,j=!1,P=!1,K=this._ch,k=!1,ne,G,v;ne=this._input.read(R),G=ne!=="",v=K,this._ch=this._input.next(),this._ch==="\\"&&this._input.hasNext()&&(this._ch+=this._input.next()),K=this._ch,this._ch;)if(this._ch==="/"&&this._input.peek()==="*"){this._output.add_new_line(),this._input.back();var y=this._input.read(Z),N=D.get_directives(y);N&&N.ignore==="start"&&(y+=D.readIgnored(this._input)),this.print_string(y),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(ue)),this.eatWhitespace(!0);else if(this._ch==="$"){this.preserveSingleSpace(G),this.print_string(this._ch);var te=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);te.match(/[ :]$/)&&(te=this.eatString(": ").replace(/\s+$/,""),this.print_string(te),this._output.space_before_token=!0),ye===0&&te.indexOf(":")!==-1&&(ve=!0,this.indent())}else if(this._ch==="@")if(this.preserveSingleSpace(G),this._input.peek()==="{")this.print_string(this._ch+this.eatString("}"));else{this.print_string(this._ch);var Le=this._input.peekUntilAfter(/[: ,;{}()[\]\/='"]/g);Le.match(/[ :]$/)&&(Le=this.eatString(": ").replace(/\s+$/,""),this.print_string(Le),this._output.space_before_token=!0),ye===0&&Le.indexOf(":")!==-1?(ve=!0,this.indent()):Le in this.NESTED_AT_RULE?(this._nestedLevel+=1,Le in this.CONDITIONAL_GROUP_RULE&&(Ae=!0)):ye===0&&!ve&&(j=!0)}else if(this._ch==="#"&&this._input.peek()==="{")this.preserveSingleSpace(G),this.print_string(this._ch+this.eatString("}"));else if(this._ch==="{")ve&&(ve=!1,this.outdent()),j=!1,Ae?(Ae=!1,pe=this._indentLevel>=this._nestedLevel):pe=this._indentLevel>=this._nestedLevel-1,this._options.newline_between_rules&&pe&&this._output.previous_line&&this._output.previous_line.item(-1)!=="{"&&this._output.ensure_empty_line_above("/",","),this._output.space_before_token=!0,this._options.brace_style==="expand"?(this._output.add_new_line(),this.print_string(this._ch),this.indent(),this._output.set_indent(this._indentLevel)):(v==="("?this._output.space_before_token=!1:v!==","&&this.indent(),this.print_string(this._ch)),this.eatWhitespace(!0),this._output.add_new_line();else if(this._ch==="}")this.outdent(),this._output.add_new_line(),v==="{"&&this._output.trim(!0),ve&&(this.outdent(),ve=!1),this.print_string(this._ch),pe=!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 Fe=0;Fe<this.NON_SEMICOLON_NEWLINE_PROPERTY.length;Fe++)if(this._input.lookBack(this.NON_SEMICOLON_NEWLINE_PROPERTY[Fe])){k=!0;break}(pe||Ae)&&!(this._input.lookBack("&")||this.foundNestedPseudoClass())&&!this._input.lookBack("(")&&!j&&ye===0?(this.print_string(":"),ve||(ve=!0,this._output.space_before_token=!0,this.eatWhitespace(!0),this.indent())):(this._input.lookBack(" ")&&(this._output.space_before_token=!0),this._input.peek()===":"?(this._ch=this._input.next(),this.print_string("::")):this.print_string(":"))}else if(this._ch==='"'||this._ch==="'"){var Ue=v==='"'||v==="'";this.preserveSingleSpace(Ue||G),this.print_string(this._ch+this.eatString(this._ch)),this.eatWhitespace(!0)}else if(this._ch===";")k=!1,ye===0?(ve&&(this.outdent(),ve=!1),j=!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(),ye++,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(")")),ye&&(ye--,this.outdent()));else{var Ye=!1;this._input.lookBack("with")&&(Ye=!0),this.preserveSingleSpace(G||Ye),this.print_string(this._ch),ve&&v==="$"&&this._options.selector_separator_newline?(this._output.add_new_line(),P=!0):(this.eatWhitespace(),ye++,this.indent())}else if(this._ch===")")ye&&(ye--,this.outdent()),P&&this._input.peek()===";"&&this._options.selector_separator_newline&&(P=!1,this.outdent(),this._output.add_new_line()),this.print_string(this._ch);else if(this._ch===",")this.print_string(this._ch),this.eatWhitespace(!0),this._options.selector_separator_newline&&(!ve||P)&&ye===0&&!j?this._output.add_new_line():this._output.space_before_token=!0;else if((this._ch===">"||this._ch==="+"||this._ch==="~")&&!ve&&ye===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&&B.test(this._ch)&&(this._ch=""));else if(this._ch==="]")this.print_string(this._ch);else if(this._ch==="[")this.preserveSingleSpace(G),this.print_string(this._ch);else if(this._ch==="=")this.eatWhitespace(),this.print_string("="),B.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 ut=v==='"'||v==="'";this.preserveSingleSpace(ut||G),this.print_string(this._ch),!this._output.just_added_newline()&&this._input.peek()===`
|
|
`&&k&&this._output.add_new_line()}var ot=this._output.get_code(oe);return ot},ie.exports.Beautifier=M},function(ie,o,Q){var U=Q(6).Options;function E(b){U.call(this,b,"css"),this.selector_separator_newline=this._get_boolean("selector_separator_newline",!0),this.newline_between_rules=this._get_boolean("newline_between_rules",!0);var S=this._get_boolean("space_around_selector_separator");this.space_around_combinator=this._get_boolean("space_around_combinator")||S;var D=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_style="collapse";for(var V=0;V<D.length;V++)D[V]!=="expand"?this.brace_style="collapse":this.brace_style=D[V]}E.prototype=new U,ie.exports.Options=E}],O={};function m(ie){var o=O[ie];if(o!==void 0)return o.exports;var Q=O[ie]={exports:{}};return _e[ie](Q,Q.exports,m),Q.exports}var de=m(15);ae=de})();var Se=ae;w=[],$=function(){return{css_beautify:Se}}.apply(rt,w),$!==void 0&&(Nt.exports=$)})()},40998:function(Nt,rt,w){var $,ae;(function(){var Se;(function(){"use strict";var de=[,,function(U){function E(D){this.__parent=D,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=[]}E.prototype.clone_empty=function(){var D=new E(this.__parent);return D.set_indent(this.__indent_count,this.__alignment_count),D},E.prototype.item=function(D){return D<0?this.__items[this.__items.length+D]:this.__items[D]},E.prototype.has_match=function(D){for(var V=this.__items.length-1;V>=0;V--)if(this.__items[V].match(D))return!0;return!1},E.prototype.set_indent=function(D,V){this.is_empty()&&(this.__indent_count=D||0,this.__alignment_count=V||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},E.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)},E.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},E.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var D=this.__parent.current_line;return D.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),D.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),D.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,D.__items[0]===" "&&(D.__items.splice(0,1),D.__character_count-=1),!0}return!1},E.prototype.is_empty=function(){return this.__items.length===0},E.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},E.prototype.push=function(D){this.__items.push(D);var V=D.lastIndexOf(`
|
|
`);V!==-1?this.__character_count=D.length-V:this.__character_count+=D.length},E.prototype.pop=function(){var D=null;return this.is_empty()||(D=this.__items.pop(),this.__character_count-=D.length),D},E.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},E.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},E.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},E.prototype.toString=function(){var D="";return this.is_empty()?this.__parent.indent_empty_lines&&(D=this.__parent.get_indent_string(this.__indent_count)):(D=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),D+=this.__items.join("")),D};function b(D,V){this.__cache=[""],this.__indent_size=D.indent_size,this.__indent_string=D.indent_char,D.indent_with_tabs||(this.__indent_string=new Array(D.indent_size+1).join(D.indent_char)),V=V||"",D.indent_level>0&&(V=new Array(D.indent_level+1).join(this.__indent_string)),this.__base_string=V,this.__base_string_length=V.length}b.prototype.get_indent_size=function(D,V){var q=this.__base_string_length;return V=V||0,D<0&&(q=0),q+=D*this.__indent_size,q+=V,q},b.prototype.get_indent_string=function(D,V){var q=this.__base_string;return V=V||0,D<0&&(D=0,q=""),V+=D*this.__indent_size,this.__ensure_cache(V),q+=this.__cache[V],q},b.prototype.__ensure_cache=function(D){for(;D>=this.__cache.length;)this.__add_column()},b.prototype.__add_column=function(){var D=this.__cache.length,V=0,q="";this.__indent_size&&D>=this.__indent_size&&(V=Math.floor(D/this.__indent_size),D-=V*this.__indent_size,q=new Array(V+1).join(this.__indent_string)),D&&(q+=new Array(D+1).join(" ")),this.__cache.push(q)};function S(D,V){this.__indent_cache=new b(D,V),this.raw=!1,this._end_with_newline=D.end_with_newline,this.indent_size=D.indent_size,this.wrap_line_length=D.wrap_line_length,this.indent_empty_lines=D.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new E(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}S.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},S.prototype.get_line_number=function(){return this.__lines.length},S.prototype.get_indent_string=function(D,V){return this.__indent_cache.get_indent_string(D,V)},S.prototype.get_indent_size=function(D,V){return this.__indent_cache.get_indent_size(D,V)},S.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},S.prototype.add_new_line=function(D){return this.is_empty()||!D&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},S.prototype.get_code=function(D){this.trim(!0);var V=this.current_line.pop();V&&(V[V.length-1]===`
|
|
`&&(V=V.replace(/\n+$/g,"")),this.current_line.push(V)),this._end_with_newline&&this.__add_outputline();var q=this.__lines.join(`
|
|
`);return D!==`
|
|
`&&(q=q.replace(/[\n]/g,D)),q},S.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},S.prototype.set_indent=function(D,V){return D=D||0,V=V||0,this.next_line.set_indent(D,V),this.__lines.length>1?(this.current_line.set_indent(D,V),!0):(this.current_line.set_indent(),!1)},S.prototype.add_raw_token=function(D){for(var V=0;V<D.newlines;V++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(D.whitespace_before),this.current_line.push(D.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},S.prototype.add_token=function(D){this.__add_space_before_token(),this.current_line.push(D),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},S.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(" "))},S.prototype.remove_indent=function(D){for(var V=this.__lines.length;D<V;)this.__lines[D]._remove_indent(),D++;this.current_line._remove_wrap_indent()},S.prototype.trim=function(D){for(D=D===void 0?!1:D,this.current_line.trim();D&&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},S.prototype.just_added_newline=function(){return this.current_line.is_empty()},S.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},S.prototype.ensure_empty_line_above=function(D,V){for(var q=this.__lines.length-2;q>=0;){var B=this.__lines[q];if(B.is_empty())break;if(B.item(0).indexOf(D)!==0&&B.item(-1)!==V){this.__lines.splice(q+1,0,new E(this)),this.previous_line=this.__lines[this.__lines.length-2];break}q--}},U.exports.Output=S},function(U){function E(b,S,D,V){this.type=b,this.text=S,this.comments_before=null,this.newlines=D||0,this.whitespace_before=V||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}U.exports.Token=E},,,function(U){function E(D,V){this.raw_options=b(D,V),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"])}E.prototype._get_array=function(D,V){var q=this.raw_options[D],B=V||[];return typeof q=="object"?q!==null&&typeof q.concat=="function"&&(B=q.concat()):typeof q=="string"&&(B=q.split(/[^a-zA-Z0-9_\/\-]+/)),B},E.prototype._get_boolean=function(D,V){var q=this.raw_options[D],B=q===void 0?!!V:!!q;return B},E.prototype._get_characters=function(D,V){var q=this.raw_options[D],B=V||"";return typeof q=="string"&&(B=q.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),B},E.prototype._get_number=function(D,V){var q=this.raw_options[D];V=parseInt(V,10),isNaN(V)&&(V=0);var B=parseInt(q,10);return isNaN(B)&&(B=V),B},E.prototype._get_selection=function(D,V,q){var B=this._get_selection_list(D,V,q);if(B.length!==1)throw new Error("Invalid Option Value: The option '"+D+`' can only be one of the following values:
|
|
`+V+`
|
|
You passed in: '`+this.raw_options[D]+"'");return B[0]},E.prototype._get_selection_list=function(D,V,q){if(!V||V.length===0)throw new Error("Selection list cannot be empty.");if(q=q||[V[0]],!this._is_valid_selection(q,V))throw new Error("Invalid Default Value!");var B=this._get_array(D,q);if(!this._is_valid_selection(B,V))throw new Error("Invalid Option Value: The option '"+D+`' can contain only the following values:
|
|
`+V+`
|
|
You passed in: '`+this.raw_options[D]+"'");return B},E.prototype._is_valid_selection=function(D,V){return D.length&&V.length&&!D.some(function(q){return V.indexOf(q)===-1})};function b(D,V){var q={};D=S(D);var B;for(B in D)B!==V&&(q[B]=D[B]);if(V&&D[V])for(B in D[V])q[B]=D[V][B];return q}function S(D){var V={},q;for(q in D){var B=q.replace(/-/g,"_");V[B]=D[q]}return V}U.exports.Options=E,U.exports.normalizeOpts=S,U.exports.mergeOpts=b},,function(U){var E=RegExp.prototype.hasOwnProperty("sticky");function b(S){this.__input=S||"",this.__input_length=this.__input.length,this.__position=0}b.prototype.restart=function(){this.__position=0},b.prototype.back=function(){this.__position>0&&(this.__position-=1)},b.prototype.hasNext=function(){return this.__position<this.__input_length},b.prototype.next=function(){var S=null;return this.hasNext()&&(S=this.__input.charAt(this.__position),this.__position+=1),S},b.prototype.peek=function(S){var D=null;return S=S||0,S+=this.__position,S>=0&&S<this.__input_length&&(D=this.__input.charAt(S)),D},b.prototype.__match=function(S,D){S.lastIndex=D;var V=S.exec(this.__input);return V&&!(E&&S.sticky)&&V.index!==D&&(V=null),V},b.prototype.test=function(S,D){return D=D||0,D+=this.__position,D>=0&&D<this.__input_length?!!this.__match(S,D):!1},b.prototype.testChar=function(S,D){var V=this.peek(D);return S.lastIndex=0,V!==null&&S.test(V)},b.prototype.match=function(S){var D=this.__match(S,this.__position);return D?this.__position+=D[0].length:D=null,D},b.prototype.read=function(S,D,V){var q="",B;return S&&(B=this.match(S),B&&(q+=B[0])),D&&(B||!S)&&(q+=this.readUntil(D,V)),q},b.prototype.readUntil=function(S,D){var V="",q=this.__position;S.lastIndex=this.__position;var B=S.exec(this.__input);return B?(q=B.index,D&&(q+=B[0].length)):q=this.__input_length,V=this.__input.substring(this.__position,q),this.__position=q,V},b.prototype.readUntilAfter=function(S){return this.readUntil(S,!0)},b.prototype.get_regexp=function(S,D){var V=null,q="g";return D&&E&&(q="y"),typeof S=="string"&&S!==""?V=new RegExp(S,q):S&&(V=new RegExp(S.source,q)),V},b.prototype.get_literal_regexp=function(S){return RegExp(S.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},b.prototype.peekUntilAfter=function(S){var D=this.__position,V=this.readUntilAfter(S);return this.__position=D,V},b.prototype.lookBack=function(S){var D=this.__position-1;return D>=S.length&&this.__input.substring(D-S.length,D).toLowerCase()===S},U.exports.InputScanner=b},function(U,E,b){var S=b(8).InputScanner,D=b(3).Token,V=b(10).TokenStream,q=b(11).WhitespacePattern,B={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},R=function(Z,ue){this._input=new S(Z),this._options=ue||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new q(this._input)};R.prototype.tokenize=function(){this._input.restart(),this.__tokens=new V,this._reset();for(var Z,ue=new D(B.START,""),M=null,Y=[],oe=new V;ue.type!==B.EOF;){for(Z=this._get_next_token(ue,M);this._is_comment(Z);)oe.add(Z),Z=this._get_next_token(ue,M);oe.isEmpty()||(Z.comments_before=oe,oe=new V),Z.parent=M,this._is_opening(Z)?(Y.push(M),M=Z):M&&this._is_closing(Z,M)&&(Z.opened=M,M.closed=Z,M=Y.pop(),Z.parent=M),Z.previous=ue,ue.next=Z,this.__tokens.add(Z),ue=Z}return this.__tokens},R.prototype._is_first_token=function(){return this.__tokens.isEmpty()},R.prototype._reset=function(){},R.prototype._get_next_token=function(Z,ue){this._readWhitespace();var M=this._input.read(/.+/g);return M?this._create_token(B.RAW,M):this._create_token(B.EOF,"")},R.prototype._is_comment=function(Z){return!1},R.prototype._is_opening=function(Z){return!1},R.prototype._is_closing=function(Z,ue){return!1},R.prototype._create_token=function(Z,ue){var M=new D(Z,ue,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return M},R.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},U.exports.Tokenizer=R,U.exports.TOKEN=B},function(U){function E(b){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=b}E.prototype.restart=function(){this.__position=0},E.prototype.isEmpty=function(){return this.__tokens_length===0},E.prototype.hasNext=function(){return this.__position<this.__tokens_length},E.prototype.next=function(){var b=null;return this.hasNext()&&(b=this.__tokens[this.__position],this.__position+=1),b},E.prototype.peek=function(b){var S=null;return b=b||0,b+=this.__position,b>=0&&b<this.__tokens_length&&(S=this.__tokens[b]),S},E.prototype.add=function(b){this.__parent_token&&(b.parent=this.__parent_token),this.__tokens.push(b),this.__tokens_length+=1},U.exports.TokenStream=E},function(U,E,b){var S=b(12).Pattern;function D(V,q){S.call(this,V,q),q?this._line_regexp=this._input.get_regexp(q._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}D.prototype=new S,D.prototype.__set_whitespace_patterns=function(V,q){V+="\\t ",q+="\\n\\r",this._match_pattern=this._input.get_regexp("["+V+q+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+q+"]")},D.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var V=this._input.read(this._match_pattern);if(V===" ")this.whitespace_before_token=" ";else if(V){var q=this.__split(this._newline_regexp,V);this.newline_count=q.length-1,this.whitespace_before_token=q[this.newline_count]}return V},D.prototype.matching=function(V,q){var B=this._create();return B.__set_whitespace_patterns(V,q),B._update(),B},D.prototype._create=function(){return new D(this._input,this)},D.prototype.__split=function(V,q){V.lastIndex=0;for(var B=0,R=[],Z=V.exec(q);Z;)R.push(q.substring(B,Z.index)),B=Z.index+Z[0].length,Z=V.exec(q);return B<q.length?R.push(q.substring(B,q.length)):R.push(""),R},U.exports.WhitespacePattern=D},function(U){function E(b,S){this._input=b,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,S&&(this._starting_pattern=this._input.get_regexp(S._starting_pattern,!0),this._match_pattern=this._input.get_regexp(S._match_pattern,!0),this._until_pattern=this._input.get_regexp(S._until_pattern),this._until_after=S._until_after)}E.prototype.read=function(){var b=this._input.read(this._starting_pattern);return(!this._starting_pattern||b)&&(b+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),b},E.prototype.read_match=function(){return this._input.match(this._match_pattern)},E.prototype.until_after=function(b){var S=this._create();return S._until_after=!0,S._until_pattern=this._input.get_regexp(b),S._update(),S},E.prototype.until=function(b){var S=this._create();return S._until_after=!1,S._until_pattern=this._input.get_regexp(b),S._update(),S},E.prototype.starting_with=function(b){var S=this._create();return S._starting_pattern=this._input.get_regexp(b,!0),S._update(),S},E.prototype.matching=function(b){var S=this._create();return S._match_pattern=this._input.get_regexp(b,!0),S._update(),S},E.prototype._create=function(){return new E(this._input,this)},E.prototype._update=function(){},U.exports.Pattern=E},function(U){function E(b,S){b=typeof b=="string"?b:b.source,S=typeof S=="string"?S:S.source,this.__directives_block_pattern=new RegExp(b+/ beautify( \w+[:]\w+)+ /.source+S,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(b+/\sbeautify\signore:end\s/.source+S,"g")}E.prototype.get_directives=function(b){if(!b.match(this.__directives_block_pattern))return null;var S={};this.__directive_pattern.lastIndex=0;for(var D=this.__directive_pattern.exec(b);D;)S[D[1]]=D[2],D=this.__directive_pattern.exec(b);return S},E.prototype.readIgnored=function(b){return b.readUntilAfter(this.__directives_end_ignore_pattern)},U.exports.Directives=E},function(U,E,b){var S=b(12).Pattern,D={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function V(q,B){S.call(this,q,B),this.__template_pattern=null,this._disabled=Object.assign({},D),this._excluded=Object.assign({},D),B&&(this.__template_pattern=this._input.get_regexp(B.__template_pattern),this._excluded=Object.assign(this._excluded,B._excluded),this._disabled=Object.assign(this._disabled,B._disabled));var R=new S(q);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}/)}}V.prototype=new S,V.prototype._create=function(){return new V(this._input,this)},V.prototype._update=function(){this.__set_templated_pattern()},V.prototype.disable=function(q){var B=this._create();return B._disabled[q]=!0,B._update(),B},V.prototype.read_options=function(q){var B=this._create();for(var R in D)B._disabled[R]=q.templating.indexOf(R)===-1;return B._update(),B},V.prototype.exclude=function(q){var B=this._create();return B._excluded[q]=!0,B._update(),B},V.prototype.read=function(){var q="";this._match_pattern?q=this._input.read(this._starting_pattern):q=this._input.read(this._starting_pattern,this.__template_pattern);for(var B=this._read_template();B;)this._match_pattern?B+=this._input.read(this._match_pattern):B+=this._input.readUntil(this.__template_pattern),q+=B,B=this._read_template();return this._until_after&&(q+=this._input.readUntilAfter(this._until_pattern)),q},V.prototype.__set_templated_pattern=function(){var q=[];this._disabled.php||q.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||q.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||q.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||q.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(q.push(this.__patterns.django._starting_pattern.source),q.push(this.__patterns.django_value._starting_pattern.source),q.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||q.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&q.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+q.join("|")+")")},V.prototype._read_template=function(){var q="",B=this._input.peek();if(B==="<"){var R=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&R==="?"&&(q=q||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&R==="%"&&(q=q||this.__patterns.erb.read())}else B==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(q=q||this.__patterns.handlebars_comment.read(),q=q||this.__patterns.handlebars_unescaped.read(),q=q||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(q=q||this.__patterns.django_value.read()),this._excluded.django||(q=q||this.__patterns.django_comment.read(),q=q||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(q=q||this.__patterns.smarty_comment.read(),q=q||this.__patterns.smarty_literal.read(),q=q||this.__patterns.smarty.read()));return q},U.exports.TemplatablePattern=V},,,,function(U,E,b){var S=b(19).Beautifier,D=b(20).Options;function V(q,B,R,Z){var ue=new S(q,B,R,Z);return ue.beautify()}U.exports=V,U.exports.defaultOptions=function(){return new D}},function(U,E,b){var S=b(20).Options,D=b(2).Output,V=b(21).Tokenizer,q=b(21).TOKEN,B=/\r\n|[\r\n]/,R=/\r\n|[\r\n]/g,Z=function(j,P){this.indent_level=0,this.alignment_size=0,this.max_preserve_newlines=j.max_preserve_newlines,this.preserve_newlines=j.preserve_newlines,this._output=new D(j,P)};Z.prototype.current_line_has_match=function(j){return this._output.current_line.has_match(j)},Z.prototype.set_space_before_token=function(j,P){this._output.space_before_token=j,this._output.non_breaking_space=P},Z.prototype.set_wrap_point=function(){this._output.set_indent(this.indent_level,this.alignment_size),this._output.set_wrap_point()},Z.prototype.add_raw_token=function(j){this._output.add_raw_token(j)},Z.prototype.print_preserved_newlines=function(j){var P=0;j.type!==q.TEXT&&j.previous.type!==q.TEXT&&(P=j.newlines?1:0),this.preserve_newlines&&(P=j.newlines<this.max_preserve_newlines+1?j.newlines:this.max_preserve_newlines+1);for(var K=0;K<P;K++)this.print_newline(K>0);return P!==0},Z.prototype.traverse_whitespace=function(j){return j.whitespace_before||j.newlines?(this.print_preserved_newlines(j)||(this._output.space_before_token=!0),!0):!1},Z.prototype.previous_token_wrapped=function(){return this._output.previous_token_wrapped},Z.prototype.print_newline=function(j){this._output.add_new_line(j)},Z.prototype.print_token=function(j){j.text&&(this._output.set_indent(this.indent_level,this.alignment_size),this._output.add_token(j.text))},Z.prototype.indent=function(){this.indent_level++},Z.prototype.deindent=function(){this.indent_level>0&&(this.indent_level--,this._output.set_indent(this.indent_level,this.alignment_size))},Z.prototype.get_full_indent=function(j){return j=this.indent_level+(j||0),j<1?"":this._output.get_indent_string(j)};var ue=function(j){for(var P=null,K=j.next;K.type!==q.EOF&&j.closed!==K;){if(K.type===q.ATTRIBUTE&&K.text==="type"){K.next&&K.next.type===q.EQUALS&&K.next.next&&K.next.next.type===q.VALUE&&(P=K.next.next.text);break}K=K.next}return P},M=function(j,P){var K=null,k=null;return P.closed?(j==="script"?K="text/javascript":j==="style"&&(K="text/css"),K=ue(P)||K,K.search("text/css")>-1?k="css":K.search(/module|((text|application|dojo)\/(x-)?(javascript|ecmascript|jscript|livescript|(ld\+)?json|method|aspect))/)>-1?k="javascript":K.search(/(text|application|dojo)\/(x-)?(html)/)>-1?k="html":K.search(/test\/null/)>-1&&(k="null"),k):null};function Y(j,P){return P.indexOf(j)!==-1}function oe(j,P,K){this.parent=j||null,this.tag=P?P.tag_name:"",this.indent_level=K||0,this.parser_token=P||null}function J(j){this._printer=j,this._current_frame=null}J.prototype.get_parser_token=function(){return this._current_frame?this._current_frame.parser_token:null},J.prototype.record_tag=function(j){var P=new oe(this._current_frame,j,this._printer.indent_level);this._current_frame=P},J.prototype._try_pop_frame=function(j){var P=null;return j&&(P=j.parser_token,this._printer.indent_level=j.indent_level,this._current_frame=j.parent),P},J.prototype._get_frame=function(j,P){for(var K=this._current_frame;K&&j.indexOf(K.tag)===-1;){if(P&&P.indexOf(K.tag)!==-1){K=null;break}K=K.parent}return K},J.prototype.try_pop=function(j,P){var K=this._get_frame([j],P);return this._try_pop_frame(K)},J.prototype.indent_to_tag=function(j){var P=this._get_frame(j);P&&(this._printer.indent_level=P.indent_level)};function ye(j,P,K,k){this._source_text=j||"",P=P||{},this._js_beautify=K,this._css_beautify=k,this._tag_stack=null;var ne=new S(P,"html");this._options=ne,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"}ye.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var j=this._source_text,P=this._options.eol;this._options.eol==="auto"&&(P=`
|
|
`,j&&B.test(j)&&(P=j.match(B)[0])),j=j.replace(R,`
|
|
`);var K=j.match(/^[\t ]*/)[0],k={text:"",type:""},ne=new pe(this._options),G=new Z(this._options,K),v=new V(j,this._options).tokenize();this._tag_stack=new J(G);for(var y=null,N=v.next();N.type!==q.EOF;)N.type===q.TAG_OPEN||N.type===q.COMMENT?(y=this._handle_tag_open(G,N,ne,k,v),ne=y):N.type===q.ATTRIBUTE||N.type===q.EQUALS||N.type===q.VALUE||N.type===q.TEXT&&!ne.tag_complete?y=this._handle_inside_tag(G,N,ne,k):N.type===q.TAG_CLOSE?y=this._handle_tag_close(G,N,ne):N.type===q.TEXT?y=this._handle_text(G,N,ne):N.type===q.CONTROL_FLOW_OPEN?y=this._handle_control_flow_open(G,N):N.type===q.CONTROL_FLOW_CLOSE?y=this._handle_control_flow_close(G,N):G.add_raw_token(N),k=y,N=v.next();var te=G._output.get_code(P);return te},ye.prototype._handle_control_flow_open=function(j,P){var K={text:P.text,type:P.type};return j.set_space_before_token(P.newlines||P.whitespace_before!=="",!0),P.newlines?j.print_preserved_newlines(P):j.set_space_before_token(P.newlines||P.whitespace_before!=="",!0),j.print_token(P),j.indent(),K},ye.prototype._handle_control_flow_close=function(j,P){var K={text:P.text,type:P.type};return j.deindent(),P.newlines?j.print_preserved_newlines(P):j.set_space_before_token(P.newlines||P.whitespace_before!=="",!0),j.print_token(P),K},ye.prototype._handle_tag_close=function(j,P,K){var k={text:P.text,type:P.type};return j.alignment_size=0,K.tag_complete=!0,j.set_space_before_token(P.newlines||P.whitespace_before!=="",!0),K.is_unformatted?j.add_raw_token(P):(K.tag_start_char==="<"&&(j.set_space_before_token(P.text[0]==="/",!0),this._is_wrap_attributes_force_expand_multiline&&K.has_wrapped_attrs&&j.print_newline(!1)),j.print_token(P)),K.indent_content&&!(K.is_unformatted||K.is_content_unformatted)&&(j.indent(),K.indent_content=!1),!K.is_inline_element&&!(K.is_unformatted||K.is_content_unformatted)&&j.set_wrap_point(),k},ye.prototype._handle_inside_tag=function(j,P,K,k){var ne=K.has_wrapped_attrs,G={text:P.text,type:P.type};return j.set_space_before_token(P.newlines||P.whitespace_before!=="",!0),K.is_unformatted?j.add_raw_token(P):K.tag_start_char==="{"&&P.type===q.TEXT?j.print_preserved_newlines(P)?(P.newlines=0,j.add_raw_token(P)):j.print_token(P):(P.type===q.ATTRIBUTE?j.set_space_before_token(!0):(P.type===q.EQUALS||P.type===q.VALUE&&P.previous.type===q.EQUALS)&&j.set_space_before_token(!1),P.type===q.ATTRIBUTE&&K.tag_start_char==="<"&&((this._is_wrap_attributes_preserve||this._is_wrap_attributes_preserve_aligned)&&(j.traverse_whitespace(P),ne=ne||P.newlines!==0),this._is_wrap_attributes_force&&K.attr_count>=this._options.wrap_attributes_min_attrs&&(k.type!==q.TAG_OPEN||this._is_wrap_attributes_force_expand_multiline)&&(j.print_newline(!1),ne=!0)),j.print_token(P),ne=ne||j.previous_token_wrapped(),K.has_wrapped_attrs=ne),G},ye.prototype._handle_text=function(j,P,K){var k={text:P.text,type:"TK_CONTENT"};return K.custom_beautifier_name?this._print_custom_beatifier_text(j,P,K):K.is_unformatted||K.is_content_unformatted?j.add_raw_token(P):(j.traverse_whitespace(P),j.print_token(P)),k},ye.prototype._print_custom_beatifier_text=function(j,P,K){var k=this;if(P.text!==""){var ne=P.text,G,v=1,y="",N="";K.custom_beautifier_name==="javascript"&&typeof this._js_beautify=="function"?G=this._js_beautify:K.custom_beautifier_name==="css"&&typeof this._css_beautify=="function"?G=this._css_beautify:K.custom_beautifier_name==="html"&&(G=function(ut,ot){var lt=new ye(ut,ot,k._js_beautify,k._css_beautify);return lt.beautify()}),this._options.indent_scripts==="keep"?v=0:this._options.indent_scripts==="separate"&&(v=-j.indent_level);var te=j.get_full_indent(v);if(ne=ne.replace(/\n[ \t]*$/,""),K.custom_beautifier_name!=="html"&&ne[0]==="<"&&ne.match(/^(<!--|<!\[CDATA\[)/)){var Le=/^(<!--[^\n]*|<!\[CDATA\[)(\n?)([ \t\n]*)([\s\S]*)(-->|]]>)$/.exec(ne);if(!Le){j.add_raw_token(P);return}y=te+Le[1]+`
|
|
`,ne=Le[4],Le[5]&&(N=te+Le[5]),ne=ne.replace(/\n[ \t]*$/,""),(Le[2]||Le[3].indexOf(`
|
|
`)!==-1)&&(Le=Le[3].match(/[ \t]+$/),Le&&(P.whitespace_before=Le[0]))}if(ne)if(G){var Fe=function(){this.eol=`
|
|
`};Fe.prototype=this._options.raw_options;var Ue=new Fe;ne=G(te+ne,Ue)}else{var Ye=P.whitespace_before;Ye&&(ne=ne.replace(new RegExp(`
|
|
(`+Ye+")?","g"),`
|
|
`)),ne=te+ne.replace(/\n/g,`
|
|
`+te)}y&&(ne?ne=y+ne+`
|
|
`+N:ne=y+N),j.print_newline(!1),ne&&(P.text=ne,P.whitespace_before="",P.newlines=0,j.add_raw_token(P),j.print_newline(!0))}},ye.prototype._handle_tag_open=function(j,P,K,k,ne){var G=this._get_tag_open_token(P);if((K.is_unformatted||K.is_content_unformatted)&&!K.is_empty_element&&P.type===q.TAG_OPEN&&!G.is_start_tag?(j.add_raw_token(P),G.start_tag_token=this._tag_stack.try_pop(G.tag_name)):(j.traverse_whitespace(P),this._set_tag_position(j,P,G,K,k),G.is_inline_element||j.set_wrap_point(),j.print_token(P)),G.is_start_tag&&this._is_wrap_attributes_force){var v=0,y;do y=ne.peek(v),y.type===q.ATTRIBUTE&&(G.attr_count+=1),v+=1;while(y.type!==q.EOF&&y.type!==q.TAG_CLOSE)}return(this._is_wrap_attributes_force_aligned||this._is_wrap_attributes_aligned_multiple||this._is_wrap_attributes_preserve_aligned)&&(G.alignment_size=P.text.length+1),!G.tag_complete&&!G.is_unformatted&&(j.alignment_size=G.alignment_size),G};var pe=function(j,P,K){if(this.parent=P||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="",!K)this.tag_complete=!0;else{var k;this.tag_start_char=K.text[0],this.text=K.text,this.tag_start_char==="<"?(k=K.text.match(/^<([^\s>]*)/),this.tag_check=k?k[1]:""):(k=K.text.match(/^{{~?(?:[\^]|#\*?)?([^\s}]+)/),this.tag_check=k?k[1]:"",(K.text.startsWith("{{#>")||K.text.startsWith("{{~#>"))&&this.tag_check[0]===">"&&(this.tag_check===">"&&K.next!==null?this.tag_check=K.next.text.split(" ")[0]:this.tag_check=K.text.split(">")[1])),this.tag_check=this.tag_check.toLowerCase(),K.type===q.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||K.closed&&K.closed.text==="/>";var ne=2;this.tag_start_char==="{"&&this.text.length>=3&&this.text.charAt(2)==="~"&&(ne=3),this.is_end_tag=this.is_end_tag||this.tag_start_char==="{"&&(!j.indent_handlebars||this.text.length<3||/[^#\^]/.test(this.text.charAt(ne)))}};ye.prototype._get_tag_open_token=function(j){var P=new pe(this._options,this._tag_stack.get_parser_token(),j);return P.alignment_size=this._options.wrap_attributes_indent_size,P.is_end_tag=P.is_end_tag||Y(P.tag_check,this._options.void_elements),P.is_empty_element=P.tag_complete||P.is_start_tag&&P.is_end_tag,P.is_unformatted=!P.tag_complete&&Y(P.tag_check,this._options.unformatted),P.is_content_unformatted=!P.is_empty_element&&Y(P.tag_check,this._options.content_unformatted),P.is_inline_element=Y(P.tag_name,this._options.inline)||this._options.inline_custom_elements&&P.tag_name.includes("-")||P.tag_start_char==="{",P},ye.prototype._set_tag_position=function(j,P,K,k,ne){if(K.is_empty_element||(K.is_end_tag?K.start_tag_token=this._tag_stack.try_pop(K.tag_name):(this._do_optional_end_element(K)&&(K.is_inline_element||j.print_newline(!1)),this._tag_stack.record_tag(K),(K.tag_name==="script"||K.tag_name==="style")&&!(K.is_unformatted||K.is_content_unformatted)&&(K.custom_beautifier_name=M(K.tag_check,P)))),Y(K.tag_check,this._options.extra_liners)&&(j.print_newline(!1),j._output.just_added_blankline()||j.print_newline(!0)),K.is_empty_element){if(K.tag_start_char==="{"&&K.tag_check==="else"){this._tag_stack.indent_to_tag(["if","unless","each"]),K.indent_content=!0;var G=j.current_line_has_match(/{{#if/);G||j.print_newline(!1)}K.tag_name==="!--"&&ne.type===q.TAG_CLOSE&&k.is_end_tag&&K.text.indexOf(`
|
|
`)===-1||(K.is_inline_element||K.is_unformatted||j.print_newline(!1),this._calcluate_parent_multiline(j,K))}else if(K.is_end_tag){var v=!1;v=K.start_tag_token&&K.start_tag_token.multiline_content,v=v||!K.is_inline_element&&!(k.is_inline_element||k.is_unformatted)&&!(ne.type===q.TAG_CLOSE&&K.start_tag_token===k)&&ne.type!=="TK_CONTENT",(K.is_content_unformatted||K.is_unformatted)&&(v=!1),v&&j.print_newline(!1)}else K.indent_content=!K.custom_beautifier_name,K.tag_start_char==="<"&&(K.tag_name==="html"?K.indent_content=this._options.indent_inner_html:K.tag_name==="head"?K.indent_content=this._options.indent_head_inner_html:K.tag_name==="body"&&(K.indent_content=this._options.indent_body_inner_html)),!(K.is_inline_element||K.is_unformatted)&&(ne.type!=="TK_CONTENT"||K.is_content_unformatted)&&j.print_newline(!1),this._calcluate_parent_multiline(j,K)},ye.prototype._calcluate_parent_multiline=function(j,P){P.parent&&j._output.just_added_newline()&&!((P.is_inline_element||P.is_unformatted)&&P.parent.is_inline_element)&&(P.parent.multiline_content=!0)};var ve=["address","article","aside","blockquote","details","div","dl","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hr","main","menu","nav","ol","p","pre","section","table","ul"],Ae=["a","audio","del","ins","map","noscript","video"];ye.prototype._do_optional_end_element=function(j){var P=null;if(!(j.is_empty_element||!j.is_start_tag||!j.parent)){if(j.tag_name==="body")P=P||this._tag_stack.try_pop("head");else if(j.tag_name==="li")P=P||this._tag_stack.try_pop("li",["ol","ul","menu"]);else if(j.tag_name==="dd"||j.tag_name==="dt")P=P||this._tag_stack.try_pop("dt",["dl"]),P=P||this._tag_stack.try_pop("dd",["dl"]);else if(j.parent.tag_name==="p"&&ve.indexOf(j.tag_name)!==-1){var K=j.parent.parent;(!K||Ae.indexOf(K.tag_name)===-1)&&(P=P||this._tag_stack.try_pop("p"))}else j.tag_name==="rp"||j.tag_name==="rt"?(P=P||this._tag_stack.try_pop("rt",["ruby","rtc"]),P=P||this._tag_stack.try_pop("rp",["ruby","rtc"])):j.tag_name==="optgroup"?P=P||this._tag_stack.try_pop("optgroup",["select"]):j.tag_name==="option"?P=P||this._tag_stack.try_pop("option",["select","datalist","optgroup"]):j.tag_name==="colgroup"?P=P||this._tag_stack.try_pop("caption",["table"]):j.tag_name==="thead"?(P=P||this._tag_stack.try_pop("caption",["table"]),P=P||this._tag_stack.try_pop("colgroup",["table"])):j.tag_name==="tbody"||j.tag_name==="tfoot"?(P=P||this._tag_stack.try_pop("caption",["table"]),P=P||this._tag_stack.try_pop("colgroup",["table"]),P=P||this._tag_stack.try_pop("thead",["table"]),P=P||this._tag_stack.try_pop("tbody",["table"])):j.tag_name==="tr"?(P=P||this._tag_stack.try_pop("caption",["table"]),P=P||this._tag_stack.try_pop("colgroup",["table"]),P=P||this._tag_stack.try_pop("tr",["table","thead","tbody","tfoot"])):(j.tag_name==="th"||j.tag_name==="td")&&(P=P||this._tag_stack.try_pop("td",["table","thead","tbody","tfoot","tr"]),P=P||this._tag_stack.try_pop("th",["table","thead","tbody","tfoot","tr"]));return j.parent=this._tag_stack.get_parser_token(),P}},U.exports.Beautifier=ye},function(U,E,b){var S=b(6).Options;function D(V){S.call(this,V,"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"])}D.prototype=new S,U.exports.Options=D},function(U,E,b){var S=b(9).Tokenizer,D=b(9).TOKEN,V=b(13).Directives,q=b(14).TemplatablePattern,B=b(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:D.START,RAW:D.RAW,EOF:D.EOF},Z=new V(/<\!--/,/-->/),ue=function(M,Y){S.call(this,M,Y),this._current_tag_name="";var oe=new q(this._input).read_options(this._options),J=new B(this._input);if(this.__patterns={word:oe.until(/[\n\r\t <]/),word_control_flow_close_excluded:oe.until(/[\n\r\t <}]/),single_quote:oe.until_after(/'/),double_quote:oe.until_after(/"/),attribute:oe.until(/[\n\r\t =>]|\/>/),element_name:oe.until(/[\n\r\t >\/]/),angular_control_flow_start:J.matching(/\@[a-zA-Z]+[^({]*[({]/),handlebars_comment:J.starting_with(/{{!--/).until_after(/--}}/),handlebars:J.starting_with(/{{/).until_after(/}}/),handlebars_open:J.until(/[\n\r\t }]/),handlebars_raw_close:J.until(/}}/),comment:J.starting_with(/<!--/).until_after(/-->/),cdata:J.starting_with(/<!\[CDATA\[/).until_after(/]]>/),conditional_comment:J.starting_with(/<!\[/).until_after(/]>/),processing:J.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 ye=this._input.get_literal_regexp(this._options.unformatted_content_delimiter);this.__patterns.unformatted_content_delimiter=J.matching(ye).until_after(ye)}};ue.prototype=new S,ue.prototype._is_comment=function(M){return!1},ue.prototype._is_opening=function(M){return M.type===R.TAG_OPEN||M.type===R.CONTROL_FLOW_OPEN},ue.prototype._is_closing=function(M,Y){return M.type===R.TAG_CLOSE&&Y&&((M.text===">"||M.text==="/>")&&Y.text[0]==="<"||M.text==="}}"&&Y.text[0]==="{"&&Y.text[1]==="{")||M.type===R.CONTROL_FLOW_CLOSE&&M.text==="}"&&Y.text.endsWith("{")},ue.prototype._reset=function(){this._current_tag_name=""},ue.prototype._get_next_token=function(M,Y){var oe=null;this._readWhitespace();var J=this._input.peek();return J===null?this._create_token(R.EOF,""):(oe=oe||this._read_open_handlebars(J,Y),oe=oe||this._read_attribute(J,M,Y),oe=oe||this._read_close(J,Y),oe=oe||this._read_script_and_style(J,M),oe=oe||this._read_control_flows(J,Y),oe=oe||this._read_raw_content(J,M,Y),oe=oe||this._read_content_word(J,Y),oe=oe||this._read_comment_or_cdata(J),oe=oe||this._read_processing(J),oe=oe||this._read_open(J,Y),oe=oe||this._create_token(R.UNKNOWN,this._input.next()),oe)},ue.prototype._read_comment_or_cdata=function(M){var Y=null,oe=null,J=null;if(M==="<"){var ye=this._input.peek(1);ye==="!"&&(oe=this.__patterns.comment.read(),oe?(J=Z.get_directives(oe),J&&J.ignore==="start"&&(oe+=Z.readIgnored(this._input))):oe=this.__patterns.cdata.read()),oe&&(Y=this._create_token(R.COMMENT,oe),Y.directives=J)}return Y},ue.prototype._read_processing=function(M){var Y=null,oe=null,J=null;if(M==="<"){var ye=this._input.peek(1);(ye==="!"||ye==="?")&&(oe=this.__patterns.conditional_comment.read(),oe=oe||this.__patterns.processing.read()),oe&&(Y=this._create_token(R.COMMENT,oe),Y.directives=J)}return Y},ue.prototype._read_open=function(M,Y){var oe=null,J=null;return(!Y||Y.type===R.CONTROL_FLOW_OPEN)&&M==="<"&&(oe=this._input.next(),this._input.peek()==="/"&&(oe+=this._input.next()),oe+=this.__patterns.element_name.read(),J=this._create_token(R.TAG_OPEN,oe)),J},ue.prototype._read_open_handlebars=function(M,Y){var oe=null,J=null;return(!Y||Y.type===R.CONTROL_FLOW_OPEN)&&(this._options.templating.includes("angular")||this._options.indent_handlebars)&&M==="{"&&this._input.peek(1)==="{"&&(this._options.indent_handlebars&&this._input.peek(2)==="!"?(oe=this.__patterns.handlebars_comment.read(),oe=oe||this.__patterns.handlebars.read(),J=this._create_token(R.COMMENT,oe)):(oe=this.__patterns.handlebars_open.read(),J=this._create_token(R.TAG_OPEN,oe))),J},ue.prototype._read_control_flows=function(M,Y){var oe="",J=null;if(!this._options.templating.includes("angular"))return J;if(M==="@"){if(oe=this.__patterns.angular_control_flow_start.read(),oe==="")return J;for(var ye=oe.endsWith("(")?1:0,pe=0;!(oe.endsWith("{")&&ye===pe);){var ve=this._input.next();if(ve===null)break;ve==="("?ye++:ve===")"&&pe++,oe+=ve}J=this._create_token(R.CONTROL_FLOW_OPEN,oe)}else M==="}"&&Y&&Y.type===R.CONTROL_FLOW_OPEN&&(oe=this._input.next(),J=this._create_token(R.CONTROL_FLOW_CLOSE,oe));return J},ue.prototype._read_close=function(M,Y){var oe=null,J=null;return Y&&Y.type===R.TAG_OPEN&&(Y.text[0]==="<"&&(M===">"||M==="/"&&this._input.peek(1)===">")?(oe=this._input.next(),M==="/"&&(oe+=this._input.next()),J=this._create_token(R.TAG_CLOSE,oe)):Y.text[0]==="{"&&M==="}"&&this._input.peek(1)==="}"&&(this._input.next(),this._input.next(),J=this._create_token(R.TAG_CLOSE,"}}"))),J},ue.prototype._read_attribute=function(M,Y,oe){var J=null,ye="";if(oe&&oe.text[0]==="<")if(M==="=")J=this._create_token(R.EQUALS,this._input.next());else if(M==='"'||M==="'"){var pe=this._input.next();M==='"'?pe+=this.__patterns.double_quote.read():pe+=this.__patterns.single_quote.read(),J=this._create_token(R.VALUE,pe)}else ye=this.__patterns.attribute.read(),ye&&(Y.type===R.EQUALS?J=this._create_token(R.VALUE,ye):J=this._create_token(R.ATTRIBUTE,ye));return J},ue.prototype._is_content_unformatted=function(M){return this._options.void_elements.indexOf(M)===-1&&(this._options.content_unformatted.indexOf(M)!==-1||this._options.unformatted.indexOf(M)!==-1)},ue.prototype._read_raw_content=function(M,Y,oe){var J="";if(oe&&oe.text[0]==="{")J=this.__patterns.handlebars_raw_close.read();else if(Y.type===R.TAG_CLOSE&&Y.opened.text[0]==="<"&&Y.text[0]!=="/"){var ye=Y.opened.text.substr(1).toLowerCase();this._is_content_unformatted(ye)&&(J=this._input.readUntil(new RegExp("</"+ye+"[\\n\\r\\t ]*?>","ig")))}return J?this._create_token(R.TEXT,J):null},ue.prototype._read_script_and_style=function(M,Y){if(Y.type===R.TAG_CLOSE&&Y.opened.text[0]==="<"&&Y.text[0]!=="/"){var oe=Y.opened.text.substr(1).toLowerCase();if(oe==="script"||oe==="style"){var J=this._read_comment_or_cdata(M);if(J)return J.type=R.TEXT,J;var ye=this._input.readUntil(new RegExp("</"+oe+"[\\n\\r\\t ]*?>","ig"));if(ye)return this._create_token(R.TEXT,ye)}}return null},ue.prototype._read_content_word=function(M,Y){var oe="";return this._options.unformatted_content_delimiter&&M===this._options.unformatted_content_delimiter[0]&&(oe=this.__patterns.unformatted_content_delimiter.read()),oe||(oe=Y&&Y.type===R.CONTROL_FLOW_OPEN?this.__patterns.word_control_flow_close_excluded.read():this.__patterns.word.read()),oe?this._create_token(R.TEXT,oe):null},U.exports.Tokenizer=ue,U.exports.TOKEN=R}],ie={};function o(U){var E=ie[U];if(E!==void 0)return E.exports;var b=ie[U]={exports:{}};return de[U](b,b.exports,o),b.exports}var Q=o(18);Se=Q})();var _e=Se;if(1)$=[w,w(58553),w(87804)],ae=function(de){var ie=w(58553),o=w(87804);return{html_beautify:function(Q,U){return _e(Q,U,ie.js_beautify,o.css_beautify)}}}.apply(rt,$),ae!==void 0&&(Nt.exports=ae);else var O,m})()},58553:function(Nt,rt){var w,$;(function(){var ae;(function(){"use strict";var _e=[function(ie,o,Q){var U=Q(1).Beautifier,E=Q(5).Options;function b(S,D){var V=new U(S,D);return V.beautify()}ie.exports=b,ie.exports.defaultOptions=function(){return new E}},function(ie,o,Q){var U=Q(2).Output,E=Q(3).Token,b=Q(4),S=Q(5).Options,D=Q(7).Tokenizer,V=Q(7).line_starters,q=Q(7).positionable_operators,B=Q(7).TOKEN;function R(y,N){return N.indexOf(y)!==-1}function Z(y){return y.replace(/^\s+/g,"")}function ue(y){for(var N={},te=0;te<y.length;te++)N[y[te].replace(/-/g,"_")]=y[te];return N}function M(y,N){return y&&y.type===B.RESERVED&&y.text===N}function Y(y,N){return y&&y.type===B.RESERVED&&R(y.text,N)}var oe=["case","return","do","if","throw","else","await","break","continue","async"],J=["before-newline","after-newline","preserve-newline"],ye=ue(J),pe=[ye.before_newline,ye.preserve_newline],ve={BlockStatement:"BlockStatement",Statement:"Statement",ObjectLiteral:"ObjectLiteral",ArrayLiteral:"ArrayLiteral",ForInitializer:"ForInitializer",Conditional:"Conditional",Expression:"Expression"};function Ae(y,N){N.multiline_frame||N.mode===ve.ForInitializer||N.mode===ve.Conditional||y.remove_indent(N.start_line_index)}function j(y){y=y.replace(b.allLineBreaks,`
|
|
`);for(var N=[],te=y.indexOf(`
|
|
`);te!==-1;)N.push(y.substring(0,te)),y=y.substring(te+1),te=y.indexOf(`
|
|
`);return y.length&&N.push(y),N}function P(y){return y===ve.ArrayLiteral}function K(y){return R(y,[ve.Expression,ve.ForInitializer,ve.Conditional])}function k(y,N){for(var te=0;te<y.length;te++){var Le=y[te].trim();if(Le.charAt(0)!==N)return!1}return!0}function ne(y,N){for(var te=0,Le=y.length,Fe;te<Le;te++)if(Fe=y[te],Fe&&Fe.indexOf(N)!==0)return!1;return!0}function G(y,N){N=N||{},this._source_text=y||"",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 S(N)}G.prototype.create_flags=function(y,N){var te=0;y&&(te=y.indentation_level,!this._output.just_added_newline()&&y.line_indent_level>te&&(te=y.line_indent_level));var Le={mode:N,parent:y,last_token:y?y.last_token:new E(B.START_BLOCK,""),last_word:y?y.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:te,alignment:0,line_indent_level:y?y.line_indent_level:te,start_line_index:this._output.get_line_number(),ternary_depth:0};return Le},G.prototype._reset=function(y){var N=y.match(/^[\t ]*/)[0];this._last_last_text="",this._output=new U(this._options,N),this._output.raw=this._options.test_output_raw,this._flag_store=[],this.set_mode(ve.BlockStatement);var te=new D(y,this._options);return this._tokens=te.tokenize(),y},G.prototype.beautify=function(){if(this._options.disabled)return this._source_text;var y,N=this._reset(this._source_text),te=this._options.eol;this._options.eol==="auto"&&(te=`
|
|
`,N&&b.lineBreak.test(N||"")&&(te=N.match(b.lineBreak)[0]));for(var Le=this._tokens.next();Le;)this.handle_token(Le),this._last_last_text=this._flags.last_token.text,this._flags.last_token=Le,Le=this._tokens.next();return y=this._output.get_code(te),y},G.prototype.handle_token=function(y,N){y.type===B.START_EXPR?this.handle_start_expr(y):y.type===B.END_EXPR?this.handle_end_expr(y):y.type===B.START_BLOCK?this.handle_start_block(y):y.type===B.END_BLOCK?this.handle_end_block(y):y.type===B.WORD?this.handle_word(y):y.type===B.RESERVED?this.handle_word(y):y.type===B.SEMICOLON?this.handle_semicolon(y):y.type===B.STRING?this.handle_string(y):y.type===B.EQUALS?this.handle_equals(y):y.type===B.OPERATOR?this.handle_operator(y):y.type===B.COMMA?this.handle_comma(y):y.type===B.BLOCK_COMMENT?this.handle_block_comment(y,N):y.type===B.COMMENT?this.handle_comment(y,N):y.type===B.DOT?this.handle_dot(y):y.type===B.EOF?this.handle_eof(y):y.type===B.UNKNOWN?this.handle_unknown(y,N):this.handle_unknown(y,N)},G.prototype.handle_whitespace_and_comments=function(y,N){var te=y.newlines,Le=this._options.keep_array_indentation&&P(this._flags.mode);if(y.comments_before)for(var Fe=y.comments_before.next();Fe;)this.handle_whitespace_and_comments(Fe,N),this.handle_token(Fe,N),Fe=y.comments_before.next();if(Le)for(var Ue=0;Ue<te;Ue+=1)this.print_newline(Ue>0,N);else if(this._options.max_preserve_newlines&&te>this._options.max_preserve_newlines&&(te=this._options.max_preserve_newlines),this._options.preserve_newlines&&te>1){this.print_newline(!1,N);for(var Ye=1;Ye<te;Ye+=1)this.print_newline(!0,N)}};var v=["async","break","continue","return","throw","yield"];G.prototype.allow_wrap_or_preserved_newline=function(y,N){if(N=N===void 0?!1:N,!this._output.just_added_newline()){var te=this._options.preserve_newlines&&y.newlines||N,Le=R(this._flags.last_token.text,q)||R(y.text,q);if(Le){var Fe=R(this._flags.last_token.text,q)&&R(this._options.operator_position,pe)||R(y.text,q);te=te&&Fe}if(te)this.print_newline(!1,!0);else if(this._options.wrap_line_length){if(Y(this._flags.last_token,v))return;this._output.set_wrap_point()}}},G.prototype.print_newline=function(y,N){if(!N&&this._flags.last_token.text!==";"&&this._flags.last_token.text!==","&&this._flags.last_token.text!=="="&&(this._flags.last_token.type!==B.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++"))for(var te=this._tokens.peek();this._flags.mode===ve.Statement&&!(this._flags.if_block&&M(te,"else"))&&!this._flags.do_block;)this.restore_mode();this._output.add_new_line(y)&&(this._flags.multiline_frame=!0)},G.prototype.print_token_line_indentation=function(y){this._output.just_added_newline()&&(this._options.keep_array_indentation&&y.newlines&&(y.text==="["||P(this._flags.mode))?(this._output.current_line.set_indent(-1),this._output.current_line.push(y.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))},G.prototype.print_token=function(y){if(this._output.raw){this._output.add_raw_token(y);return}if(this._options.comma_first&&y.previous&&y.previous.type===B.COMMA&&this._output.just_added_newline()&&this._output.previous_line.last()===","){var N=this._output.previous_line.pop();this._output.previous_line.is_empty()&&(this._output.previous_line.push(N),this._output.trim(!0),this._output.current_line.pop(),this._output.trim()),this.print_token_line_indentation(y),this._output.add_token(","),this._output.space_before_token=!0}this.print_token_line_indentation(y),this._output.non_breaking_space=!0,this._output.add_token(y.text),this._output.previous_token_wrapped&&(this._flags.multiline_frame=!0)},G.prototype.indent=function(){this._flags.indentation_level+=1,this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},G.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))},G.prototype.set_mode=function(y){this._flags?(this._flag_store.push(this._flags),this._previous_flags=this._flags):this._previous_flags=this.create_flags(null,y),this._flags=this.create_flags(this._previous_flags,y),this._output.set_indent(this._flags.indentation_level,this._flags.alignment)},G.prototype.restore_mode=function(){this._flag_store.length>0&&(this._previous_flags=this._flags,this._flags=this._flag_store.pop(),this._previous_flags.mode===ve.Statement&&Ae(this._output,this._previous_flags),this._output.set_indent(this._flags.indentation_level,this._flags.alignment))},G.prototype.start_of_object_property=function(){return this._flags.parent.mode===ve.ObjectLiteral&&this._flags.mode===ve.Statement&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||Y(this._flags.last_token,["get","set"]))},G.prototype.start_of_statement=function(y){var N=!1;return N=N||Y(this._flags.last_token,["var","let","const"])&&y.type===B.WORD,N=N||M(this._flags.last_token,"do"),N=N||!(this._flags.parent.mode===ve.ObjectLiteral&&this._flags.mode===ve.Statement)&&Y(this._flags.last_token,v)&&!y.newlines,N=N||M(this._flags.last_token,"else")&&!(M(y,"if")&&!y.comments_before),N=N||this._flags.last_token.type===B.END_EXPR&&(this._previous_flags.mode===ve.ForInitializer||this._previous_flags.mode===ve.Conditional),N=N||this._flags.last_token.type===B.WORD&&this._flags.mode===ve.BlockStatement&&!this._flags.in_case&&!(y.text==="--"||y.text==="++")&&this._last_last_text!=="function"&&y.type!==B.WORD&&y.type!==B.RESERVED,N=N||this._flags.mode===ve.ObjectLiteral&&(this._flags.last_token.text===":"&&this._flags.ternary_depth===0||Y(this._flags.last_token,["get","set"])),N?(this.set_mode(ve.Statement),this.indent(),this.handle_whitespace_and_comments(y,!0),this.start_of_object_property()||this.allow_wrap_or_preserved_newline(y,Y(y,["do","for","if","while"])),!0):!1},G.prototype.handle_start_expr=function(y){this.start_of_statement(y)||this.handle_whitespace_and_comments(y);var N=ve.Expression;if(y.text==="["){if(this._flags.last_token.type===B.WORD||this._flags.last_token.text===")"){Y(this._flags.last_token,V)&&(this._output.space_before_token=!0),this.print_token(y),this.set_mode(N),this.indent(),this._options.space_in_paren&&(this._output.space_before_token=!0);return}N=ve.ArrayLiteral,P(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,[B.START_EXPR,B.END_EXPR,B.WORD,B.OPERATOR,B.DOT])||(this._output.space_before_token=!0)}else{if(this._flags.last_token.type===B.RESERVED)this._flags.last_token.text==="for"?(this._output.space_before_token=this._options.space_before_conditional,N=ve.ForInitializer):R(this._flags.last_token.text,["if","while","switch"])?(this._output.space_before_token=this._options.space_before_conditional,N=ve.Conditional):R(this._flags.last_word,["await","async"])?this._output.space_before_token=!0:this._flags.last_token.text==="import"&&y.whitespace_before===""?this._output.space_before_token=!1:(R(this._flags.last_token.text,V)||this._flags.last_token.text==="catch")&&(this._output.space_before_token=!0);else if(this._flags.last_token.type===B.EQUALS||this._flags.last_token.type===B.OPERATOR)this.start_of_object_property()||this.allow_wrap_or_preserved_newline(y);else if(this._flags.last_token.type===B.WORD){this._output.space_before_token=!1;var te=this._tokens.peek(-3);if(this._options.space_after_named_function&&te){var Le=this._tokens.peek(-4);Y(te,["async","function"])||te.text==="*"&&Y(Le,["async","function"])?this._output.space_before_token=!0:this._flags.mode===ve.ObjectLiteral?(te.text==="{"||te.text===","||te.text==="*"&&(Le.text==="{"||Le.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(y);(this._flags.last_token.type===B.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===ve.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===B.START_BLOCK?this.print_newline():(this._flags.last_token.type===B.END_EXPR||this._flags.last_token.type===B.START_EXPR||this._flags.last_token.type===B.END_BLOCK||this._flags.last_token.text==="."||this._flags.last_token.type===B.COMMA)&&this.allow_wrap_or_preserved_newline(y,y.newlines),this.print_token(y),this.set_mode(N),this._options.space_in_paren&&(this._output.space_before_token=!0),this.indent()},G.prototype.handle_end_expr=function(y){for(;this._flags.mode===ve.Statement;)this.restore_mode();this.handle_whitespace_and_comments(y),this._flags.multiline_frame&&this.allow_wrap_or_preserved_newline(y,y.text==="]"&&P(this._flags.mode)&&!this._options.keep_array_indentation),this._options.space_in_paren&&(this._flags.last_token.type===B.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(y),this.restore_mode(),Ae(this._output,this._previous_flags),this._flags.do_while&&this._previous_flags.mode===ve.Conditional&&(this._previous_flags.mode=ve.Expression,this._flags.do_block=!1,this._flags.do_while=!1)},G.prototype.handle_start_block=function(y){this.handle_whitespace_and_comments(y);var N=this._tokens.peek(),te=this._tokens.peek(1);this._flags.last_word==="switch"&&this._flags.last_token.type===B.END_EXPR?(this.set_mode(ve.BlockStatement),this._flags.in_case_statement=!0):this._flags.case_body?this.set_mode(ve.BlockStatement):te&&(R(te.text,[":",","])&&R(N.type,[B.STRING,B.WORD,B.RESERVED])||R(N.text,["get","set","..."])&&R(te.type,[B.WORD,B.RESERVED]))?R(this._last_last_text,["class","interface"])&&!R(te.text,[":",","])?this.set_mode(ve.BlockStatement):this.set_mode(ve.ObjectLiteral):this._flags.last_token.type===B.OPERATOR&&this._flags.last_token.text==="=>"?this.set_mode(ve.BlockStatement):R(this._flags.last_token.type,[B.EQUALS,B.START_EXPR,B.COMMA,B.OPERATOR])||Y(this._flags.last_token,["return","throw","import","default"])?this.set_mode(ve.ObjectLiteral):this.set_mode(ve.BlockStatement),this._flags.last_token&&Y(this._flags.last_token.previous,["class","extends"])&&(this._flags.class_start_block=!0);var Le=!N.comments_before&&N.text==="}",Fe=Le&&this._flags.last_word==="function"&&this._flags.last_token.type===B.END_EXPR;if(this._options.brace_preserve_inline){var Ue=0,Ye=null;this._flags.inline_frame=!0;do if(Ue+=1,Ye=this._tokens.peek(Ue-1),Ye.newlines){this._flags.inline_frame=!1;break}while(Ye.type!==B.EOF&&!(Ye.type===B.END_BLOCK&&Ye.opened===y))}(this._options.brace_style==="expand"||this._options.brace_style==="none"&&y.newlines)&&!this._flags.inline_frame?this._flags.last_token.type!==B.OPERATOR&&(Fe||this._flags.last_token.type===B.EQUALS||Y(this._flags.last_token,oe)&&this._flags.last_token.text!=="else")?this._output.space_before_token=!0:this.print_newline(!1,!0):(P(this._previous_flags.mode)&&(this._flags.last_token.type===B.START_EXPR||this._flags.last_token.type===B.COMMA)&&((this._flags.last_token.type===B.COMMA||this._options.space_in_paren)&&(this._output.space_before_token=!0),(this._flags.last_token.type===B.COMMA||this._flags.last_token.type===B.START_EXPR&&this._flags.inline_frame)&&(this.allow_wrap_or_preserved_newline(y),this._previous_flags.multiline_frame=this._previous_flags.multiline_frame||this._flags.multiline_frame,this._flags.multiline_frame=!1)),this._flags.last_token.type!==B.OPERATOR&&this._flags.last_token.type!==B.START_EXPR&&(R(this._flags.last_token.type,[B.START_BLOCK,B.SEMICOLON])&&!this._flags.inline_frame?this.print_newline():this._output.space_before_token=!0)),this.print_token(y),this.indent(),!Le&&!(this._options.brace_preserve_inline&&this._flags.inline_frame)&&this.print_newline()},G.prototype.handle_end_block=function(y){for(this.handle_whitespace_and_comments(y);this._flags.mode===ve.Statement;)this.restore_mode();var N=this._flags.last_token.type===B.START_BLOCK;this._flags.inline_frame&&!N?this._output.space_before_token=!0:this._options.brace_style==="expand"?N||this.print_newline():N||(P(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(y)},G.prototype.handle_word=function(y){if(y.type===B.RESERVED){if(R(y.text,["set","get"])&&this._flags.mode!==ve.ObjectLiteral)y.type=B.WORD;else if(y.text==="import"&&R(this._tokens.peek().text,["(","."]))y.type=B.WORD;else if(R(y.text,["as","from"])&&!this._flags.import_block)y.type=B.WORD;else if(this._flags.mode===ve.ObjectLiteral){var N=this._tokens.peek();N.text===":"&&(y.type=B.WORD)}}if(this.start_of_statement(y)?Y(this._flags.last_token,["var","let","const"])&&y.type===B.WORD&&(this._flags.declaration_statement=!0):y.newlines&&!K(this._flags.mode)&&(this._flags.last_token.type!==B.OPERATOR||this._flags.last_token.text==="--"||this._flags.last_token.text==="++")&&this._flags.last_token.type!==B.EQUALS&&(this._options.preserve_newlines||!Y(this._flags.last_token,["var","let","const","set","get"]))?(this.handle_whitespace_and_comments(y),this.print_newline()):this.handle_whitespace_and_comments(y),this._flags.do_block&&!this._flags.do_while)if(M(y,"while")){this._output.space_before_token=!0,this.print_token(y),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&&M(y,"else"))this._flags.else_block=!0;else{for(;this._flags.mode===ve.Statement;)this.restore_mode();this._flags.if_block=!1,this._flags.else_block=!1}if(this._flags.in_case_statement&&Y(y,["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(y),this._flags.in_case=!0;return}if((this._flags.last_token.type===B.COMMA||this._flags.last_token.type===B.START_EXPR||this._flags.last_token.type===B.EQUALS||this._flags.last_token.type===B.OPERATOR)&&!this.start_of_object_property()&&!(R(this._flags.last_token.text,["+","-"])&&this._last_last_text===":"&&this._flags.parent.mode===ve.ObjectLiteral)&&this.allow_wrap_or_preserved_newline(y),M(y,"function")){(R(this._flags.last_token.text,["}",";"])||this._output.just_added_newline()&&!(R(this._flags.last_token.text,["(","[","{",":","=",","])||this._flags.last_token.type===B.OPERATOR))&&!this._output.just_added_blankline()&&!y.comments_before&&(this.print_newline(),this.print_newline(!0)),this._flags.last_token.type===B.RESERVED||this._flags.last_token.type===B.WORD?Y(this._flags.last_token,["get","set","new","export"])||Y(this._flags.last_token,v)?this._output.space_before_token=!0:M(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===B.OPERATOR||this._flags.last_token.text==="="?this._output.space_before_token=!0:!this._flags.multiline_frame&&(K(this._flags.mode)||P(this._flags.mode))||this.print_newline(),this.print_token(y),this._flags.last_word=y.text;return}var te="NONE";if(this._flags.last_token.type===B.END_BLOCK?this._previous_flags.inline_frame?te="SPACE":Y(y,["else","catch","finally","from"])?this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&y.newlines?te="NEWLINE":(te="SPACE",this._output.space_before_token=!0):te="NEWLINE":this._flags.last_token.type===B.SEMICOLON&&this._flags.mode===ve.BlockStatement?te="NEWLINE":this._flags.last_token.type===B.SEMICOLON&&K(this._flags.mode)?te="SPACE":this._flags.last_token.type===B.STRING?te="NEWLINE":this._flags.last_token.type===B.RESERVED||this._flags.last_token.type===B.WORD||this._flags.last_token.text==="*"&&(R(this._last_last_text,["function","yield"])||this._flags.mode===ve.ObjectLiteral&&R(this._last_last_text,["{",","]))?te="SPACE":this._flags.last_token.type===B.START_BLOCK?this._flags.inline_frame?te="SPACE":te="NEWLINE":this._flags.last_token.type===B.END_EXPR&&(this._output.space_before_token=!0,te="NEWLINE"),Y(y,V)&&this._flags.last_token.text!==")"&&(this._flags.inline_frame||this._flags.last_token.text==="else"||this._flags.last_token.text==="export"?te="SPACE":te="NEWLINE"),Y(y,["else","catch","finally"]))if((!(this._flags.last_token.type===B.END_BLOCK&&this._previous_flags.mode===ve.BlockStatement)||this._options.brace_style==="expand"||this._options.brace_style==="end-expand"||this._options.brace_style==="none"&&y.newlines)&&!this._flags.inline_frame)this.print_newline();else{this._output.trim(!0);var Le=this._output.current_line;Le.last()!=="}"&&this.print_newline(),this._output.space_before_token=!0}else te==="NEWLINE"?Y(this._flags.last_token,oe)?this._output.space_before_token=!0:this._flags.last_token.text==="declare"&&Y(y,["var","let","const"])?this._output.space_before_token=!0:this._flags.last_token.type!==B.END_EXPR?(this._flags.last_token.type!==B.START_EXPR||!Y(y,["var","let","const"]))&&this._flags.last_token.text!==":"&&(M(y,"if")&&M(y.previous,"else")?this._output.space_before_token=!0:this.print_newline()):Y(y,V)&&this._flags.last_token.text!==")"&&this.print_newline():this._flags.multiline_frame&&P(this._flags.mode)&&this._flags.last_token.text===","&&this._last_last_text==="}"?this.print_newline():te==="SPACE"&&(this._output.space_before_token=!0);y.previous&&(y.previous.type===B.WORD||y.previous.type===B.RESERVED)&&(this._output.space_before_token=!0),this.print_token(y),this._flags.last_word=y.text,y.type===B.RESERVED&&(y.text==="do"?this._flags.do_block=!0:y.text==="if"?this._flags.if_block=!0:y.text==="import"?this._flags.import_block=!0:this._flags.import_block&&M(y,"from")&&(this._flags.import_block=!1))},G.prototype.handle_semicolon=function(y){this.start_of_statement(y)?this._output.space_before_token=!1:this.handle_whitespace_and_comments(y);for(var N=this._tokens.peek();this._flags.mode===ve.Statement&&!(this._flags.if_block&&M(N,"else"))&&!this._flags.do_block;)this.restore_mode();this._flags.import_block&&(this._flags.import_block=!1),this.print_token(y)},G.prototype.handle_string=function(y){y.text.startsWith("`")&&y.newlines===0&&y.whitespace_before===""&&(y.previous.text===")"||this._flags.last_token.type===B.WORD)||(this.start_of_statement(y)?this._output.space_before_token=!0:(this.handle_whitespace_and_comments(y),this._flags.last_token.type===B.RESERVED||this._flags.last_token.type===B.WORD||this._flags.inline_frame?this._output.space_before_token=!0:this._flags.last_token.type===B.COMMA||this._flags.last_token.type===B.START_EXPR||this._flags.last_token.type===B.EQUALS||this._flags.last_token.type===B.OPERATOR?this.start_of_object_property()||this.allow_wrap_or_preserved_newline(y):y.text.startsWith("`")&&this._flags.last_token.type===B.END_EXPR&&(y.previous.text==="]"||y.previous.text===")")&&y.newlines===0?this._output.space_before_token=!0:this.print_newline())),this.print_token(y)},G.prototype.handle_equals=function(y){this.start_of_statement(y)||this.handle_whitespace_and_comments(y),this._flags.declaration_statement&&(this._flags.declaration_assignment=!0),this._output.space_before_token=!0,this.print_token(y),this._output.space_before_token=!0},G.prototype.handle_comma=function(y){this.handle_whitespace_and_comments(y,!0),this.print_token(y),this._output.space_before_token=!0,this._flags.declaration_statement?(K(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(y)):this._flags.mode===ve.ObjectLiteral||this._flags.mode===ve.Statement&&this._flags.parent.mode===ve.ObjectLiteral?(this._flags.mode===ve.Statement&&this.restore_mode(),this._flags.inline_frame||this.print_newline()):this._options.comma_first&&this.allow_wrap_or_preserved_newline(y)},G.prototype.handle_operator=function(y){var N=y.text==="*"&&(Y(this._flags.last_token,["function","yield"])||R(this._flags.last_token.type,[B.START_BLOCK,B.COMMA,B.END_BLOCK,B.SEMICOLON])),te=R(y.text,["-","+"])&&(R(this._flags.last_token.type,[B.START_BLOCK,B.START_EXPR,B.EQUALS,B.OPERATOR])||R(this._flags.last_token.text,V)||this._flags.last_token.text===",");if(!this.start_of_statement(y)){var Le=!N;this.handle_whitespace_and_comments(y,Le)}if(y.text==="*"&&this._flags.last_token.type===B.DOT){this.print_token(y);return}if(y.text==="::"){this.print_token(y);return}if(R(y.text,["-","+"])&&this.start_of_object_property()){this.print_token(y);return}if(this._flags.last_token.type===B.OPERATOR&&R(this._options.operator_position,pe)&&this.allow_wrap_or_preserved_newline(y),y.text===":"&&this._flags.in_case){this.print_token(y),this._flags.in_case=!1,this._flags.case_body=!0,this._tokens.peek().type!==B.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 Fe=!0,Ue=!0,Ye=!1;if(y.text===":"?this._flags.ternary_depth===0?Fe=!1:(this._flags.ternary_depth-=1,Ye=!0):y.text==="?"&&(this._flags.ternary_depth+=1),!te&&!N&&this._options.preserve_newlines&&R(y.text,q)){var ut=y.text===":",ot=ut&&Ye,lt=ut&&!Ye;switch(this._options.operator_position){case ye.before_newline:this._output.space_before_token=!lt,this.print_token(y),(!ut||ot)&&this.allow_wrap_or_preserved_newline(y),this._output.space_before_token=!0;return;case ye.after_newline:this._output.space_before_token=!0,!ut||ot?this._tokens.peek().newlines?this.print_newline(!1,!0):this.allow_wrap_or_preserved_newline(y):this._output.space_before_token=!1,this.print_token(y),this._output.space_before_token=!0;return;case ye.preserve_newline:lt||this.allow_wrap_or_preserved_newline(y),Fe=!(this._output.just_added_newline()||lt),this._output.space_before_token=Fe,this.print_token(y),this._output.space_before_token=!0;return}}if(N){this.allow_wrap_or_preserved_newline(y),Fe=!1;var St=this._tokens.peek();Ue=St&&R(St.type,[B.WORD,B.RESERVED])}else if(y.text==="...")this.allow_wrap_or_preserved_newline(y),Fe=this._flags.last_token.type===B.START_BLOCK,Ue=!1;else if(R(y.text,["--","++","!","~"])||te){if((this._flags.last_token.type===B.COMMA||this._flags.last_token.type===B.START_EXPR)&&this.allow_wrap_or_preserved_newline(y),Fe=!1,Ue=!1,y.newlines&&(y.text==="--"||y.text==="++"||y.text==="~")){var Lt=Y(this._flags.last_token,oe)&&y.newlines;Lt&&(this._previous_flags.if_block||this._previous_flags.else_block)&&this.restore_mode(),this.print_newline(Lt,!0)}this._flags.last_token.text===";"&&K(this._flags.mode)&&(Fe=!0),this._flags.last_token.type===B.RESERVED?Fe=!0:this._flags.last_token.type===B.END_EXPR?Fe=!(this._flags.last_token.text==="]"&&(y.text==="--"||y.text==="++")):this._flags.last_token.type===B.OPERATOR&&(Fe=R(y.text,["--","-","++","+"])&&R(this._flags.last_token.text,["--","-","++","+"]),R(y.text,["+","-"])&&R(this._flags.last_token.text,["--","++"])&&(Ue=!0)),(this._flags.mode===ve.BlockStatement&&!this._flags.inline_frame||this._flags.mode===ve.Statement)&&(this._flags.last_token.text==="{"||this._flags.last_token.text===";")&&this.print_newline()}this._output.space_before_token=this._output.space_before_token||Fe,this.print_token(y),this._output.space_before_token=Ue},G.prototype.handle_block_comment=function(y,N){if(this._output.raw){this._output.add_raw_token(y),y.directives&&y.directives.preserve==="end"&&(this._output.raw=this._options.test_output_raw);return}if(y.directives){this.print_newline(!1,N),this.print_token(y),y.directives.preserve==="start"&&(this._output.raw=!0),this.print_newline(!1,!0);return}if(!b.newline.test(y.text)&&!y.newlines){this._output.space_before_token=!0,this.print_token(y),this._output.space_before_token=!0;return}else this.print_block_commment(y,N)},G.prototype.print_block_commment=function(y,N){var te=j(y.text),Le,Fe=!1,Ue=!1,Ye=y.whitespace_before,ut=Ye.length;if(this.print_newline(!1,N),this.print_token_line_indentation(y),this._output.add_token(te[0]),this.print_newline(!1,N),te.length>1){for(te=te.slice(1),Fe=k(te,"*"),Ue=ne(te,Ye),Fe&&(this._flags.alignment=1),Le=0;Le<te.length;Le++)Fe?(this.print_token_line_indentation(y),this._output.add_token(Z(te[Le]))):Ue&&te[Le]?(this.print_token_line_indentation(y),this._output.add_token(te[Le].substring(ut))):(this._output.current_line.set_indent(-1),this._output.add_token(te[Le])),this.print_newline(!1,N);this._flags.alignment=0}},G.prototype.handle_comment=function(y,N){y.newlines?this.print_newline(!1,N):this._output.trim(!0),this._output.space_before_token=!0,this.print_token(y),this.print_newline(!1,N)},G.prototype.handle_dot=function(y){this.start_of_statement(y)||this.handle_whitespace_and_comments(y,!0),this._flags.last_token.text.match("^[0-9]+$")&&(this._output.space_before_token=!0),Y(this._flags.last_token,oe)?this._output.space_before_token=!1:this.allow_wrap_or_preserved_newline(y,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(y)},G.prototype.handle_unknown=function(y,N){this.print_token(y),y.text[y.text.length-1]===`
|
|
`&&this.print_newline(!1,N)},G.prototype.handle_eof=function(y){for(;this._flags.mode===ve.Statement;)this.restore_mode();this.handle_whitespace_and_comments(y)},ie.exports.Beautifier=G},function(ie){function o(E){this.__parent=E,this.__character_count=0,this.__indent_count=-1,this.__alignment_count=0,this.__wrap_point_index=0,this.__wrap_point_character_count=0,this.__wrap_point_indent_count=-1,this.__wrap_point_alignment_count=0,this.__items=[]}o.prototype.clone_empty=function(){var E=new o(this.__parent);return E.set_indent(this.__indent_count,this.__alignment_count),E},o.prototype.item=function(E){return E<0?this.__items[this.__items.length+E]:this.__items[E]},o.prototype.has_match=function(E){for(var b=this.__items.length-1;b>=0;b--)if(this.__items[b].match(E))return!0;return!1},o.prototype.set_indent=function(E,b){this.is_empty()&&(this.__indent_count=E||0,this.__alignment_count=b||0,this.__character_count=this.__parent.get_indent_size(this.__indent_count,this.__alignment_count))},o.prototype._set_wrap_point=function(){this.__parent.wrap_line_length&&(this.__wrap_point_index=this.__items.length,this.__wrap_point_character_count=this.__character_count,this.__wrap_point_indent_count=this.__parent.next_line.__indent_count,this.__wrap_point_alignment_count=this.__parent.next_line.__alignment_count)},o.prototype._should_wrap=function(){return this.__wrap_point_index&&this.__character_count>this.__parent.wrap_line_length&&this.__wrap_point_character_count>this.__parent.next_line.__character_count},o.prototype._allow_wrap=function(){if(this._should_wrap()){this.__parent.add_new_line();var E=this.__parent.current_line;return E.set_indent(this.__wrap_point_indent_count,this.__wrap_point_alignment_count),E.__items=this.__items.slice(this.__wrap_point_index),this.__items=this.__items.slice(0,this.__wrap_point_index),E.__character_count+=this.__character_count-this.__wrap_point_character_count,this.__character_count=this.__wrap_point_character_count,E.__items[0]===" "&&(E.__items.splice(0,1),E.__character_count-=1),!0}return!1},o.prototype.is_empty=function(){return this.__items.length===0},o.prototype.last=function(){return this.is_empty()?null:this.__items[this.__items.length-1]},o.prototype.push=function(E){this.__items.push(E);var b=E.lastIndexOf(`
|
|
`);b!==-1?this.__character_count=E.length-b:this.__character_count+=E.length},o.prototype.pop=function(){var E=null;return this.is_empty()||(E=this.__items.pop(),this.__character_count-=E.length),E},o.prototype._remove_indent=function(){this.__indent_count>0&&(this.__indent_count-=1,this.__character_count-=this.__parent.indent_size)},o.prototype._remove_wrap_indent=function(){this.__wrap_point_indent_count>0&&(this.__wrap_point_indent_count-=1)},o.prototype.trim=function(){for(;this.last()===" ";)this.__items.pop(),this.__character_count-=1},o.prototype.toString=function(){var E="";return this.is_empty()?this.__parent.indent_empty_lines&&(E=this.__parent.get_indent_string(this.__indent_count)):(E=this.__parent.get_indent_string(this.__indent_count,this.__alignment_count),E+=this.__items.join("")),E};function Q(E,b){this.__cache=[""],this.__indent_size=E.indent_size,this.__indent_string=E.indent_char,E.indent_with_tabs||(this.__indent_string=new Array(E.indent_size+1).join(E.indent_char)),b=b||"",E.indent_level>0&&(b=new Array(E.indent_level+1).join(this.__indent_string)),this.__base_string=b,this.__base_string_length=b.length}Q.prototype.get_indent_size=function(E,b){var S=this.__base_string_length;return b=b||0,E<0&&(S=0),S+=E*this.__indent_size,S+=b,S},Q.prototype.get_indent_string=function(E,b){var S=this.__base_string;return b=b||0,E<0&&(E=0,S=""),b+=E*this.__indent_size,this.__ensure_cache(b),S+=this.__cache[b],S},Q.prototype.__ensure_cache=function(E){for(;E>=this.__cache.length;)this.__add_column()},Q.prototype.__add_column=function(){var E=this.__cache.length,b=0,S="";this.__indent_size&&E>=this.__indent_size&&(b=Math.floor(E/this.__indent_size),E-=b*this.__indent_size,S=new Array(b+1).join(this.__indent_string)),E&&(S+=new Array(E+1).join(" ")),this.__cache.push(S)};function U(E,b){this.__indent_cache=new Q(E,b),this.raw=!1,this._end_with_newline=E.end_with_newline,this.indent_size=E.indent_size,this.wrap_line_length=E.wrap_line_length,this.indent_empty_lines=E.indent_empty_lines,this.__lines=[],this.previous_line=null,this.current_line=null,this.next_line=new o(this),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1,this.__add_outputline()}U.prototype.__add_outputline=function(){this.previous_line=this.current_line,this.current_line=this.next_line.clone_empty(),this.__lines.push(this.current_line)},U.prototype.get_line_number=function(){return this.__lines.length},U.prototype.get_indent_string=function(E,b){return this.__indent_cache.get_indent_string(E,b)},U.prototype.get_indent_size=function(E,b){return this.__indent_cache.get_indent_size(E,b)},U.prototype.is_empty=function(){return!this.previous_line&&this.current_line.is_empty()},U.prototype.add_new_line=function(E){return this.is_empty()||!E&&this.just_added_newline()?!1:(this.raw||this.__add_outputline(),!0)},U.prototype.get_code=function(E){this.trim(!0);var b=this.current_line.pop();b&&(b[b.length-1]===`
|
|
`&&(b=b.replace(/\n+$/g,"")),this.current_line.push(b)),this._end_with_newline&&this.__add_outputline();var S=this.__lines.join(`
|
|
`);return E!==`
|
|
`&&(S=S.replace(/[\n]/g,E)),S},U.prototype.set_wrap_point=function(){this.current_line._set_wrap_point()},U.prototype.set_indent=function(E,b){return E=E||0,b=b||0,this.next_line.set_indent(E,b),this.__lines.length>1?(this.current_line.set_indent(E,b),!0):(this.current_line.set_indent(),!1)},U.prototype.add_raw_token=function(E){for(var b=0;b<E.newlines;b++)this.__add_outputline();this.current_line.set_indent(-1),this.current_line.push(E.whitespace_before),this.current_line.push(E.text),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=!1},U.prototype.add_token=function(E){this.__add_space_before_token(),this.current_line.push(E),this.space_before_token=!1,this.non_breaking_space=!1,this.previous_token_wrapped=this.current_line._allow_wrap()},U.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(" "))},U.prototype.remove_indent=function(E){for(var b=this.__lines.length;E<b;)this.__lines[E]._remove_indent(),E++;this.current_line._remove_wrap_indent()},U.prototype.trim=function(E){for(E=E===void 0?!1:E,this.current_line.trim();E&&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},U.prototype.just_added_newline=function(){return this.current_line.is_empty()},U.prototype.just_added_blankline=function(){return this.is_empty()||this.current_line.is_empty()&&this.previous_line.is_empty()},U.prototype.ensure_empty_line_above=function(E,b){for(var S=this.__lines.length-2;S>=0;){var D=this.__lines[S];if(D.is_empty())break;if(D.item(0).indexOf(E)!==0&&D.item(-1)!==b){this.__lines.splice(S+1,0,new o(this)),this.previous_line=this.__lines[this.__lines.length-2];break}S--}},ie.exports.Output=U},function(ie){function o(Q,U,E,b){this.type=Q,this.text=U,this.comments_before=null,this.newlines=E||0,this.whitespace_before=b||"",this.parent=null,this.next=null,this.previous=null,this.opened=null,this.closed=null,this.directives=null}ie.exports.Token=o},function(ie,o){var Q="\\x23\\x24\\x40\\x41-\\x5a\\x5f\\x61-\\x7a",U="\\x24\\x30-\\x39\\x41-\\x5a\\x5f\\x61-\\x7a",E="\\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",b="\\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",S="\\\\u[0-9a-fA-F]{4}|\\\\u\\{[0-9a-fA-F]+\\}",D="(?:"+S+"|["+Q+E+"])",V="(?:"+S+"|["+U+E+b+"])*";o.identifier=new RegExp(D+V,"g"),o.identifierStart=new RegExp(D),o.identifierMatch=new RegExp("(?:"+S+"|["+U+E+b+"])+");var q=/[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/;o.newline=/[\n\r\u2028\u2029]/,o.lineBreak=new RegExp(`\r
|
|
|`+o.newline.source),o.allLineBreaks=new RegExp(o.lineBreak.source,"g")},function(ie,o,Q){var U=Q(6).Options,E=["before-newline","after-newline","preserve-newline"];function b(S){U.call(this,S,"js");var D=this.raw_options.brace_style||null;D==="expand-strict"?this.raw_options.brace_style="expand":D==="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 V=this._get_selection_list("brace_style",["collapse","expand","end-expand","none","preserve-inline"]);this.brace_preserve_inline=!1,this.brace_style="collapse";for(var q=0;q<V.length;q++)V[q]==="preserve-inline"?this.brace_preserve_inline=!0:this.brace_style=V[q];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",E),this.test_output_raw=this._get_boolean("test_output_raw"),this.jslint_happy&&(this.space_after_anon_function=!0)}b.prototype=new U,ie.exports.Options=b},function(ie){function o(E,b){this.raw_options=Q(E,b),this.disabled=this._get_boolean("disabled"),this.eol=this._get_characters("eol","auto"),this.end_with_newline=this._get_boolean("end_with_newline"),this.indent_size=this._get_number("indent_size",4),this.indent_char=this._get_characters("indent_char"," "),this.indent_level=this._get_number("indent_level"),this.preserve_newlines=this._get_boolean("preserve_newlines",!0),this.max_preserve_newlines=this._get_number("max_preserve_newlines",32786),this.preserve_newlines||(this.max_preserve_newlines=0),this.indent_with_tabs=this._get_boolean("indent_with_tabs",this.indent_char===" "),this.indent_with_tabs&&(this.indent_char=" ",this.indent_size===1&&(this.indent_size=4)),this.wrap_line_length=this._get_number("wrap_line_length",this._get_number("max_char")),this.indent_empty_lines=this._get_boolean("indent_empty_lines"),this.templating=this._get_selection_list("templating",["auto","none","angular","django","erb","handlebars","php","smarty"],["auto"])}o.prototype._get_array=function(E,b){var S=this.raw_options[E],D=b||[];return typeof S=="object"?S!==null&&typeof S.concat=="function"&&(D=S.concat()):typeof S=="string"&&(D=S.split(/[^a-zA-Z0-9_\/\-]+/)),D},o.prototype._get_boolean=function(E,b){var S=this.raw_options[E],D=S===void 0?!!b:!!S;return D},o.prototype._get_characters=function(E,b){var S=this.raw_options[E],D=b||"";return typeof S=="string"&&(D=S.replace(/\\r/,"\r").replace(/\\n/,`
|
|
`).replace(/\\t/," ")),D},o.prototype._get_number=function(E,b){var S=this.raw_options[E];b=parseInt(b,10),isNaN(b)&&(b=0);var D=parseInt(S,10);return isNaN(D)&&(D=b),D},o.prototype._get_selection=function(E,b,S){var D=this._get_selection_list(E,b,S);if(D.length!==1)throw new Error("Invalid Option Value: The option '"+E+`' can only be one of the following values:
|
|
`+b+`
|
|
You passed in: '`+this.raw_options[E]+"'");return D[0]},o.prototype._get_selection_list=function(E,b,S){if(!b||b.length===0)throw new Error("Selection list cannot be empty.");if(S=S||[b[0]],!this._is_valid_selection(S,b))throw new Error("Invalid Default Value!");var D=this._get_array(E,S);if(!this._is_valid_selection(D,b))throw new Error("Invalid Option Value: The option '"+E+`' can contain only the following values:
|
|
`+b+`
|
|
You passed in: '`+this.raw_options[E]+"'");return D},o.prototype._is_valid_selection=function(E,b){return E.length&&b.length&&!E.some(function(S){return b.indexOf(S)===-1})};function Q(E,b){var S={};E=U(E);var D;for(D in E)D!==b&&(S[D]=E[D]);if(b&&E[b])for(D in E[b])S[D]=E[b][D];return S}function U(E){var b={},S;for(S in E){var D=S.replace(/-/g,"_");b[D]=E[S]}return b}ie.exports.Options=o,ie.exports.normalizeOpts=U,ie.exports.mergeOpts=Q},function(ie,o,Q){var U=Q(8).InputScanner,E=Q(9).Tokenizer,b=Q(9).TOKEN,S=Q(13).Directives,D=Q(4),V=Q(12).Pattern,q=Q(14).TemplatablePattern;function B(k,ne){return ne.indexOf(k)!==-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:b.START,RAW:b.RAW,EOF:b.EOF},Z=new S(/\/\*/,/\*\//),ue=/0[xX][0123456789abcdefABCDEF_]*n?|0[oO][01234567_]*n?|0[bB][01_]*n?|\d[\d_]*n|(?:\.\d[\d_]*|\d[\d_]*\.?[\d_]*)(?:[eE][+-]?[\d_]+)?/,M=/[0-9]/,Y=/[^\d\.]/,oe=">>> === !== &&= ??= ||= << && >= ** != == <= >> || ?? |> < / - + > : & % ? ^ | *".split(" "),J=">>>= ... >>= <<= === >>> !== **= &&= ??= ||= => ^= :: /= << <= == && -= >= >> != -- += ** || ?? ++ %= &= *= |= |> = ! ? > < : / ^ - + * & % ~ |";J=J.replace(/[-[\]{}()*+?.,\\^$|#]/g,"\\$&"),J="\\?\\.(?!\\d) "+J,J=J.replace(/ /g,"|");var ye=new RegExp(J),pe="continue,try,throw,return,var,let,const,if,switch,case,default,for,while,break,function,import,export".split(","),ve=pe.concat(["do","in","of","else","get","set","new","catch","finally","typeof","yield","async","await","from","as","class","extends"]),Ae=new RegExp("^(?:"+ve.join("|")+")$"),j,P=function(k,ne){E.call(this,k,ne),this._patterns.whitespace=this._patterns.whitespace.matching(/\u00A0\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff/.source,/\u2028\u2029/.source);var G=new V(this._input),v=new q(this._input).read_options(this._options);this.__patterns={template:v,identifier:v.starting_with(D.identifier).matching(D.identifierMatch),number:G.matching(ue),punct:G.matching(ye),comment:G.starting_with(/\/\//).until(/[\n\r\u2028\u2029]/),block_comment:G.starting_with(/\/\*/).until_after(/\*\//),html_comment_start:G.matching(/<!--/),html_comment_end:G.matching(/-->/),include:G.starting_with(/#include/).until_after(D.lineBreak),shebang:G.starting_with(/#!/).until_after(D.lineBreak),xml:G.matching(/[\s\S]*?<(\/?)([-a-zA-Z:0-9_.]+|{[^}]+?}|!\[CDATA\[[^\]]*?\]\]|)(\s*{[^}]+?}|\s+[-a-zA-Z:0-9_.]+|\s+[-a-zA-Z:0-9_.]+\s*=\s*('[^']*'|"[^"]*"|{([^{}]|{[^}]+?})+?}))*\s*(\/?)\s*>/),single_quote:v.until(/['\\\n\r\u2028\u2029]/),double_quote:v.until(/["\\\n\r\u2028\u2029]/),template_text:v.until(/[`\\$]/),template_expression:v.until(/[`}\\]/)}};P.prototype=new E,P.prototype._is_comment=function(k){return k.type===R.COMMENT||k.type===R.BLOCK_COMMENT||k.type===R.UNKNOWN},P.prototype._is_opening=function(k){return k.type===R.START_BLOCK||k.type===R.START_EXPR},P.prototype._is_closing=function(k,ne){return(k.type===R.END_BLOCK||k.type===R.END_EXPR)&&ne&&(k.text==="]"&&ne.text==="["||k.text===")"&&ne.text==="("||k.text==="}"&&ne.text==="{")},P.prototype._reset=function(){j=!1},P.prototype._get_next_token=function(k,ne){var G=null;this._readWhitespace();var v=this._input.peek();return v===null?this._create_token(R.EOF,""):(G=G||this._read_non_javascript(v),G=G||this._read_string(v),G=G||this._read_pair(v,this._input.peek(1)),G=G||this._read_word(k),G=G||this._read_singles(v),G=G||this._read_comment(v),G=G||this._read_regexp(v,k),G=G||this._read_xml(v,k),G=G||this._read_punctuation(),G=G||this._create_token(R.UNKNOWN,this._input.next()),G)},P.prototype._read_word=function(k){var ne;if(ne=this.__patterns.identifier.read(),ne!=="")return ne=ne.replace(D.allLineBreaks,`
|
|
`),!(k.type===R.DOT||k.type===R.RESERVED&&(k.text==="set"||k.text==="get"))&&Ae.test(ne)?(ne==="in"||ne==="of")&&(k.type===R.WORD||k.type===R.STRING)?this._create_token(R.OPERATOR,ne):this._create_token(R.RESERVED,ne):this._create_token(R.WORD,ne);if(ne=this.__patterns.number.read(),ne!=="")return this._create_token(R.WORD,ne)},P.prototype._read_singles=function(k){var ne=null;return k==="("||k==="["?ne=this._create_token(R.START_EXPR,k):k===")"||k==="]"?ne=this._create_token(R.END_EXPR,k):k==="{"?ne=this._create_token(R.START_BLOCK,k):k==="}"?ne=this._create_token(R.END_BLOCK,k):k===";"?ne=this._create_token(R.SEMICOLON,k):k==="."&&Y.test(this._input.peek(1))?ne=this._create_token(R.DOT,k):k===","&&(ne=this._create_token(R.COMMA,k)),ne&&this._input.next(),ne},P.prototype._read_pair=function(k,ne){var G=null;return k==="#"&&ne==="{"&&(G=this._create_token(R.START_BLOCK,k+ne)),G&&(this._input.next(),this._input.next()),G},P.prototype._read_punctuation=function(){var k=this.__patterns.punct.read();if(k!=="")return k==="="?this._create_token(R.EQUALS,k):k==="?."?this._create_token(R.DOT,k):this._create_token(R.OPERATOR,k)},P.prototype._read_non_javascript=function(k){var ne="";if(k==="#"){if(this._is_first_token()&&(ne=this.__patterns.shebang.read(),ne))return this._create_token(R.UNKNOWN,ne.trim()+`
|
|
`);if(ne=this.__patterns.include.read(),ne)return this._create_token(R.UNKNOWN,ne.trim()+`
|
|
`);k=this._input.next();var G="#";if(this._input.hasNext()&&this._input.testChar(M)){do k=this._input.next(),G+=k;while(this._input.hasNext()&&k!=="#"&&k!=="=");return k==="#"||(this._input.peek()==="["&&this._input.peek(1)==="]"?(G+="[]",this._input.next(),this._input.next()):this._input.peek()==="{"&&this._input.peek(1)==="}"&&(G+="{}",this._input.next(),this._input.next())),this._create_token(R.WORD,G)}this._input.back()}else if(k==="<"&&this._is_first_token()){if(ne=this.__patterns.html_comment_start.read(),ne){for(;this._input.hasNext()&&!this._input.testChar(D.newline);)ne+=this._input.next();return j=!0,this._create_token(R.COMMENT,ne)}}else if(j&&k==="-"&&(ne=this.__patterns.html_comment_end.read(),ne))return j=!1,this._create_token(R.COMMENT,ne);return null},P.prototype._read_comment=function(k){var ne=null;if(k==="/"){var G="";if(this._input.peek(1)==="*"){G=this.__patterns.block_comment.read();var v=Z.get_directives(G);v&&v.ignore==="start"&&(G+=Z.readIgnored(this._input)),G=G.replace(D.allLineBreaks,`
|
|
`),ne=this._create_token(R.BLOCK_COMMENT,G),ne.directives=v}else this._input.peek(1)==="/"&&(G=this.__patterns.comment.read(),ne=this._create_token(R.COMMENT,G))}return ne},P.prototype._read_string=function(k){if(k==="`"||k==="'"||k==='"'){var ne=this._input.next();return this.has_char_escapes=!1,k==="`"?ne+=this._read_string_recursive("`",!0,"${"):ne+=this._read_string_recursive(k),this.has_char_escapes&&this._options.unescape_strings&&(ne=K(ne)),this._input.peek()===k&&(ne+=this._input.next()),ne=ne.replace(D.allLineBreaks,`
|
|
`),this._create_token(R.STRING,ne)}return null},P.prototype._allow_regexp_or_xml=function(k){return k.type===R.RESERVED&&B(k.text,["return","case","throw","else","do","typeof","yield"])||k.type===R.END_EXPR&&k.text===")"&&k.opened.previous.type===R.RESERVED&&B(k.opened.previous.text,["if","while","for"])||B(k.type,[R.COMMENT,R.START_EXPR,R.START_BLOCK,R.START,R.END_BLOCK,R.OPERATOR,R.EQUALS,R.EOF,R.SEMICOLON,R.COMMA])},P.prototype._read_regexp=function(k,ne){if(k==="/"&&this._allow_regexp_or_xml(ne)){for(var G=this._input.next(),v=!1,y=!1;this._input.hasNext()&&(v||y||this._input.peek()!==k)&&!this._input.testChar(D.newline);)G+=this._input.peek(),v?v=!1:(v=this._input.peek()==="\\",this._input.peek()==="["?y=!0:this._input.peek()==="]"&&(y=!1)),this._input.next();return this._input.peek()===k&&(G+=this._input.next(),G+=this._input.read(D.identifier)),this._create_token(R.STRING,G)}return null},P.prototype._read_xml=function(k,ne){if(this._options.e4x&&k==="<"&&this._allow_regexp_or_xml(ne)){var G="",v=this.__patterns.xml.read_match();if(v){for(var y=v[2].replace(/^{\s+/,"{").replace(/\s+}$/,"}"),N=y.indexOf("{")===0,te=0;v;){var Le=!!v[1],Fe=v[2],Ue=!!v[v.length-1]||Fe.slice(0,8)==="![CDATA[";if(!Ue&&(Fe===y||N&&Fe.replace(/^{\s+/,"{").replace(/\s+}$/,"}"))&&(Le?--te:++te),G+=v[0],te<=0)break;v=this.__patterns.xml.read_match()}return v||(G+=this._input.match(/[\s\S]*/g)[0]),G=G.replace(D.allLineBreaks,`
|
|
`),this._create_token(R.STRING,G)}}return null};function K(k){for(var ne="",G=0,v=new U(k),y=null;v.hasNext();)if(y=v.match(/([\s]|[^\\]|\\\\)+/g),y&&(ne+=y[0]),v.peek()==="\\"){if(v.next(),v.peek()==="x")y=v.match(/x([0-9A-Fa-f]{2})/g);else if(v.peek()==="u")y=v.match(/u([0-9A-Fa-f]{4})/g),y||(y=v.match(/u\{([0-9A-Fa-f]+)\}/g));else{ne+="\\",v.hasNext()&&(ne+=v.next());continue}if(!y||(G=parseInt(y[1],16),G>126&&G<=255&&y[0].indexOf("x")===0))return k;G>=0&&G<32||G>1114111?ne+="\\"+y[0]:G===34||G===39||G===92?ne+="\\"+String.fromCharCode(G):ne+=String.fromCharCode(G)}return ne}P.prototype._read_string_recursive=function(k,ne,G){var v,y;k==="'"?y=this.__patterns.single_quote:k==='"'?y=this.__patterns.double_quote:k==="`"?y=this.__patterns.template_text:k==="}"&&(y=this.__patterns.template_expression);for(var N=y.read(),te="";this._input.hasNext();){if(te=this._input.next(),te===k||!ne&&D.newline.test(te)){this._input.back();break}else te==="\\"&&this._input.hasNext()?(v=this._input.peek(),v==="x"||v==="u"?this.has_char_escapes=!0:v==="\r"&&this._input.peek(1)===`
|
|
`&&this._input.next(),te+=this._input.next()):G&&(G==="${"&&te==="$"&&this._input.peek()==="{"&&(te+=this._input.next()),G===te&&(k==="`"?te+=this._read_string_recursive("}",ne,"`"):te+=this._read_string_recursive("`",ne,"${"),this._input.hasNext()&&(te+=this._input.next())));te+=y.read(),N+=te}return N},ie.exports.Tokenizer=P,ie.exports.TOKEN=R,ie.exports.positionable_operators=oe.slice(),ie.exports.line_starters=pe.slice()},function(ie){var o=RegExp.prototype.hasOwnProperty("sticky");function Q(U){this.__input=U||"",this.__input_length=this.__input.length,this.__position=0}Q.prototype.restart=function(){this.__position=0},Q.prototype.back=function(){this.__position>0&&(this.__position-=1)},Q.prototype.hasNext=function(){return this.__position<this.__input_length},Q.prototype.next=function(){var U=null;return this.hasNext()&&(U=this.__input.charAt(this.__position),this.__position+=1),U},Q.prototype.peek=function(U){var E=null;return U=U||0,U+=this.__position,U>=0&&U<this.__input_length&&(E=this.__input.charAt(U)),E},Q.prototype.__match=function(U,E){U.lastIndex=E;var b=U.exec(this.__input);return b&&!(o&&U.sticky)&&b.index!==E&&(b=null),b},Q.prototype.test=function(U,E){return E=E||0,E+=this.__position,E>=0&&E<this.__input_length?!!this.__match(U,E):!1},Q.prototype.testChar=function(U,E){var b=this.peek(E);return U.lastIndex=0,b!==null&&U.test(b)},Q.prototype.match=function(U){var E=this.__match(U,this.__position);return E?this.__position+=E[0].length:E=null,E},Q.prototype.read=function(U,E,b){var S="",D;return U&&(D=this.match(U),D&&(S+=D[0])),E&&(D||!U)&&(S+=this.readUntil(E,b)),S},Q.prototype.readUntil=function(U,E){var b="",S=this.__position;U.lastIndex=this.__position;var D=U.exec(this.__input);return D?(S=D.index,E&&(S+=D[0].length)):S=this.__input_length,b=this.__input.substring(this.__position,S),this.__position=S,b},Q.prototype.readUntilAfter=function(U){return this.readUntil(U,!0)},Q.prototype.get_regexp=function(U,E){var b=null,S="g";return E&&o&&(S="y"),typeof U=="string"&&U!==""?b=new RegExp(U,S):U&&(b=new RegExp(U.source,S)),b},Q.prototype.get_literal_regexp=function(U){return RegExp(U.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"))},Q.prototype.peekUntilAfter=function(U){var E=this.__position,b=this.readUntilAfter(U);return this.__position=E,b},Q.prototype.lookBack=function(U){var E=this.__position-1;return E>=U.length&&this.__input.substring(E-U.length,E).toLowerCase()===U},ie.exports.InputScanner=Q},function(ie,o,Q){var U=Q(8).InputScanner,E=Q(3).Token,b=Q(10).TokenStream,S=Q(11).WhitespacePattern,D={START:"TK_START",RAW:"TK_RAW",EOF:"TK_EOF"},V=function(q,B){this._input=new U(q),this._options=B||{},this.__tokens=null,this._patterns={},this._patterns.whitespace=new S(this._input)};V.prototype.tokenize=function(){this._input.restart(),this.__tokens=new b,this._reset();for(var q,B=new E(D.START,""),R=null,Z=[],ue=new b;B.type!==D.EOF;){for(q=this._get_next_token(B,R);this._is_comment(q);)ue.add(q),q=this._get_next_token(B,R);ue.isEmpty()||(q.comments_before=ue,ue=new b),q.parent=R,this._is_opening(q)?(Z.push(R),R=q):R&&this._is_closing(q,R)&&(q.opened=R,R.closed=q,R=Z.pop(),q.parent=R),q.previous=B,B.next=q,this.__tokens.add(q),B=q}return this.__tokens},V.prototype._is_first_token=function(){return this.__tokens.isEmpty()},V.prototype._reset=function(){},V.prototype._get_next_token=function(q,B){this._readWhitespace();var R=this._input.read(/.+/g);return R?this._create_token(D.RAW,R):this._create_token(D.EOF,"")},V.prototype._is_comment=function(q){return!1},V.prototype._is_opening=function(q){return!1},V.prototype._is_closing=function(q,B){return!1},V.prototype._create_token=function(q,B){var R=new E(q,B,this._patterns.whitespace.newline_count,this._patterns.whitespace.whitespace_before_token);return R},V.prototype._readWhitespace=function(){return this._patterns.whitespace.read()},ie.exports.Tokenizer=V,ie.exports.TOKEN=D},function(ie){function o(Q){this.__tokens=[],this.__tokens_length=this.__tokens.length,this.__position=0,this.__parent_token=Q}o.prototype.restart=function(){this.__position=0},o.prototype.isEmpty=function(){return this.__tokens_length===0},o.prototype.hasNext=function(){return this.__position<this.__tokens_length},o.prototype.next=function(){var Q=null;return this.hasNext()&&(Q=this.__tokens[this.__position],this.__position+=1),Q},o.prototype.peek=function(Q){var U=null;return Q=Q||0,Q+=this.__position,Q>=0&&Q<this.__tokens_length&&(U=this.__tokens[Q]),U},o.prototype.add=function(Q){this.__parent_token&&(Q.parent=this.__parent_token),this.__tokens.push(Q),this.__tokens_length+=1},ie.exports.TokenStream=o},function(ie,o,Q){var U=Q(12).Pattern;function E(b,S){U.call(this,b,S),S?this._line_regexp=this._input.get_regexp(S._line_regexp):this.__set_whitespace_patterns("",""),this.newline_count=0,this.whitespace_before_token=""}E.prototype=new U,E.prototype.__set_whitespace_patterns=function(b,S){b+="\\t ",S+="\\n\\r",this._match_pattern=this._input.get_regexp("["+b+S+"]+",!0),this._newline_regexp=this._input.get_regexp("\\r\\n|["+S+"]")},E.prototype.read=function(){this.newline_count=0,this.whitespace_before_token="";var b=this._input.read(this._match_pattern);if(b===" ")this.whitespace_before_token=" ";else if(b){var S=this.__split(this._newline_regexp,b);this.newline_count=S.length-1,this.whitespace_before_token=S[this.newline_count]}return b},E.prototype.matching=function(b,S){var D=this._create();return D.__set_whitespace_patterns(b,S),D._update(),D},E.prototype._create=function(){return new E(this._input,this)},E.prototype.__split=function(b,S){b.lastIndex=0;for(var D=0,V=[],q=b.exec(S);q;)V.push(S.substring(D,q.index)),D=q.index+q[0].length,q=b.exec(S);return D<S.length?V.push(S.substring(D,S.length)):V.push(""),V},ie.exports.WhitespacePattern=E},function(ie){function o(Q,U){this._input=Q,this._starting_pattern=null,this._match_pattern=null,this._until_pattern=null,this._until_after=!1,U&&(this._starting_pattern=this._input.get_regexp(U._starting_pattern,!0),this._match_pattern=this._input.get_regexp(U._match_pattern,!0),this._until_pattern=this._input.get_regexp(U._until_pattern),this._until_after=U._until_after)}o.prototype.read=function(){var Q=this._input.read(this._starting_pattern);return(!this._starting_pattern||Q)&&(Q+=this._input.read(this._match_pattern,this._until_pattern,this._until_after)),Q},o.prototype.read_match=function(){return this._input.match(this._match_pattern)},o.prototype.until_after=function(Q){var U=this._create();return U._until_after=!0,U._until_pattern=this._input.get_regexp(Q),U._update(),U},o.prototype.until=function(Q){var U=this._create();return U._until_after=!1,U._until_pattern=this._input.get_regexp(Q),U._update(),U},o.prototype.starting_with=function(Q){var U=this._create();return U._starting_pattern=this._input.get_regexp(Q,!0),U._update(),U},o.prototype.matching=function(Q){var U=this._create();return U._match_pattern=this._input.get_regexp(Q,!0),U._update(),U},o.prototype._create=function(){return new o(this._input,this)},o.prototype._update=function(){},ie.exports.Pattern=o},function(ie){function o(Q,U){Q=typeof Q=="string"?Q:Q.source,U=typeof U=="string"?U:U.source,this.__directives_block_pattern=new RegExp(Q+/ beautify( \w+[:]\w+)+ /.source+U,"g"),this.__directive_pattern=/ (\w+)[:](\w+)/g,this.__directives_end_ignore_pattern=new RegExp(Q+/\sbeautify\signore:end\s/.source+U,"g")}o.prototype.get_directives=function(Q){if(!Q.match(this.__directives_block_pattern))return null;var U={};this.__directive_pattern.lastIndex=0;for(var E=this.__directive_pattern.exec(Q);E;)U[E[1]]=E[2],E=this.__directive_pattern.exec(Q);return U},o.prototype.readIgnored=function(Q){return Q.readUntilAfter(this.__directives_end_ignore_pattern)},ie.exports.Directives=o},function(ie,o,Q){var U=Q(12).Pattern,E={django:!1,erb:!1,handlebars:!1,php:!1,smarty:!1,angular:!1};function b(S,D){U.call(this,S,D),this.__template_pattern=null,this._disabled=Object.assign({},E),this._excluded=Object.assign({},E),D&&(this.__template_pattern=this._input.get_regexp(D.__template_pattern),this._excluded=Object.assign(this._excluded,D._excluded),this._disabled=Object.assign(this._disabled,D._disabled));var V=new U(S);this.__patterns={handlebars_comment:V.starting_with(/{{!--/).until_after(/--}}/),handlebars_unescaped:V.starting_with(/{{{/).until_after(/}}}/),handlebars:V.starting_with(/{{/).until_after(/}}/),php:V.starting_with(/<\?(?:[= ]|php)/).until_after(/\?>/),erb:V.starting_with(/<%[^%]/).until_after(/[^%]%>/),django:V.starting_with(/{%/).until_after(/%}/),django_value:V.starting_with(/{{/).until_after(/}}/),django_comment:V.starting_with(/{#/).until_after(/#}/),smarty:V.starting_with(/{(?=[^}{\s\n])/).until_after(/[^\s\n]}/),smarty_comment:V.starting_with(/{\*/).until_after(/\*}/),smarty_literal:V.starting_with(/{literal}/).until_after(/{\/literal}/)}}b.prototype=new U,b.prototype._create=function(){return new b(this._input,this)},b.prototype._update=function(){this.__set_templated_pattern()},b.prototype.disable=function(S){var D=this._create();return D._disabled[S]=!0,D._update(),D},b.prototype.read_options=function(S){var D=this._create();for(var V in E)D._disabled[V]=S.templating.indexOf(V)===-1;return D._update(),D},b.prototype.exclude=function(S){var D=this._create();return D._excluded[S]=!0,D._update(),D},b.prototype.read=function(){var S="";this._match_pattern?S=this._input.read(this._starting_pattern):S=this._input.read(this._starting_pattern,this.__template_pattern);for(var D=this._read_template();D;)this._match_pattern?D+=this._input.read(this._match_pattern):D+=this._input.readUntil(this.__template_pattern),S+=D,D=this._read_template();return this._until_after&&(S+=this._input.readUntilAfter(this._until_pattern)),S},b.prototype.__set_templated_pattern=function(){var S=[];this._disabled.php||S.push(this.__patterns.php._starting_pattern.source),this._disabled.handlebars||S.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.angular||S.push(this.__patterns.handlebars._starting_pattern.source),this._disabled.erb||S.push(this.__patterns.erb._starting_pattern.source),this._disabled.django||(S.push(this.__patterns.django._starting_pattern.source),S.push(this.__patterns.django_value._starting_pattern.source),S.push(this.__patterns.django_comment._starting_pattern.source)),this._disabled.smarty||S.push(this.__patterns.smarty._starting_pattern.source),this._until_pattern&&S.push(this._until_pattern.source),this.__template_pattern=this._input.get_regexp("(?:"+S.join("|")+")")},b.prototype._read_template=function(){var S="",D=this._input.peek();if(D==="<"){var V=this._input.peek(1);!this._disabled.php&&!this._excluded.php&&V==="?"&&(S=S||this.__patterns.php.read()),!this._disabled.erb&&!this._excluded.erb&&V==="%"&&(S=S||this.__patterns.erb.read())}else D==="{"&&(!this._disabled.handlebars&&!this._excluded.handlebars&&(S=S||this.__patterns.handlebars_comment.read(),S=S||this.__patterns.handlebars_unescaped.read(),S=S||this.__patterns.handlebars.read()),this._disabled.django||(!this._excluded.django&&!this._excluded.handlebars&&(S=S||this.__patterns.django_value.read()),this._excluded.django||(S=S||this.__patterns.django_comment.read(),S=S||this.__patterns.django.read())),this._disabled.smarty||this._disabled.django&&this._disabled.handlebars&&(S=S||this.__patterns.smarty_comment.read(),S=S||this.__patterns.smarty_literal.read(),S=S||this.__patterns.smarty.read()));return S},ie.exports.TemplatablePattern=b}],O={};function m(ie){var o=O[ie];if(o!==void 0)return o.exports;var Q=O[ie]={exports:{}};return _e[ie](Q,Q.exports,m),Q.exports}var de=m(0);ae=de})();var Se=ae;w=[],$=function(){return{js_beautify:Se}}.apply(rt,w),$!==void 0&&(Nt.exports=$)})()},15342:function(Nt){(function(w,$){Nt.exports=$()})(typeof self!="undefined"?self:this,function(){return function(rt){var w={};function $(ae){if(w[ae])return w[ae].exports;var Se=w[ae]={i:ae,l:!1,exports:{}};return rt[ae].call(Se.exports,Se,Se.exports,$),Se.l=!0,Se.exports}return $.m=rt,$.c=w,$.d=function(ae,Se,_e){$.o(ae,Se)||Object.defineProperty(ae,Se,{enumerable:!0,get:_e})},$.r=function(ae){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(ae,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(ae,"__esModule",{value:!0})},$.t=function(ae,Se){if(Se&1&&(ae=$(ae)),Se&8||Se&4&&typeof ae=="object"&&ae&&ae.__esModule)return ae;var _e=Object.create(null);if($.r(_e),Object.defineProperty(_e,"default",{enumerable:!0,value:ae}),Se&2&&typeof ae!="string")for(var O in ae)$.d(_e,O,function(m){return ae[m]}.bind(null,O));return _e},$.n=function(ae){var Se=ae&&ae.__esModule?function(){return ae.default}:function(){return ae};return $.d(Se,"a",Se),Se},$.o=function(ae,Se){return Object.prototype.hasOwnProperty.call(ae,Se)},$.p="",$($.s=1)}([function(rt,w,$){},function(rt,w,$){"use strict";$.r(w);var ae=$(0),Se=function(){function H(u,d,f){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=u,this.start=d,this.end=f}return H.range=function(d,f){return f?!d||!d.loc||!f.loc||d.loc.lexer!==f.loc.lexer?null:new H(d.loc.lexer,d.loc.start,f.loc.end):d&&d.loc},H}(),_e=function(){function H(d,f){this.text=void 0,this.loc=void 0,this.text=d,this.loc=f}var u=H.prototype;return u.range=function(f,g){return new H(g,Se.range(this,f))},H}(),O=function H(u,d){this.position=void 0;var f="KaTeX parse error: "+u,g,C=d&&d.loc;if(C&&C.start<=C.end){var z=C.lexer.input;g=C.start;var ge=C.end;g===z.length?f+=" at end of input: ":f+=" at position "+(g+1)+": ";var Te=z.slice(g,ge).replace(/[^]/g,"$&\u0332"),Ne;g>15?Ne="\u2026"+z.slice(g-15,g):Ne=z.slice(0,g);var tt;ge+15<z.length?tt=z.slice(ge,ge+15)+"\u2026":tt=z.slice(ge),f+=Ne+Te+tt}var ft=new Error(f);return ft.name="ParseError",ft.__proto__=H.prototype,ft.position=g,ft};O.prototype.__proto__=Error.prototype;var m=O,de=function(u,d){return u.indexOf(d)!==-1},ie=function(u,d){return u===void 0?d:u},o=/([A-Z])/g,Q=function(u){return u.replace(o,"-$1").toLowerCase()},U={"&":"&",">":">","<":"<",'"':""","'":"'"},E=/[&><"']/g;function b(H){return String(H).replace(E,function(u){return U[u]})}var S=function H(u){return u.type==="ordgroup"||u.type==="color"?u.body.length===1?H(u.body[0]):u:u.type==="font"?H(u.body):u},D=function(u){var d=S(u);return d.type==="mathord"||d.type==="textord"||d.type==="atom"},V=function(u){if(!u)throw new Error("Expected non-null, but got "+String(u));return u},q=function(u){var d=/^\s*([^\\/#]*?)(?::|�*58|�*3a)/i.exec(u);return d!=null?d[1]:"_relative"},B={contains:de,deflt:ie,escape:b,hyphenate:Q,getBaseElem:S,isCharacterBox:D,protocolFromUrl:q},R=function(){function H(d){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,d=d||{},this.displayMode=B.deflt(d.displayMode,!1),this.output=B.deflt(d.output,"htmlAndMathml"),this.leqno=B.deflt(d.leqno,!1),this.fleqn=B.deflt(d.fleqn,!1),this.throwOnError=B.deflt(d.throwOnError,!0),this.errorColor=B.deflt(d.errorColor,"#cc0000"),this.macros=d.macros||{},this.minRuleThickness=Math.max(0,B.deflt(d.minRuleThickness,0)),this.colorIsTextColor=B.deflt(d.colorIsTextColor,!1),this.strict=B.deflt(d.strict,"warn"),this.trust=B.deflt(d.trust,!1),this.maxSize=Math.max(0,B.deflt(d.maxSize,1/0)),this.maxExpand=Math.max(0,B.deflt(d.maxExpand,1e3))}var u=H.prototype;return u.reportNonstrict=function(f,g,C){var z=this.strict;if(typeof z=="function"&&(z=z(f,g,C)),!(!z||z==="ignore")){if(z===!0||z==="error")throw new m("LaTeX-incompatible input and strict mode is set to 'error': "+(g+" ["+f+"]"),C);z==="warn"?typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(g+" ["+f+"]")):typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+z+"': "+g+" ["+f+"]"))}},u.useStrictBehavior=function(f,g,C){var z=this.strict;if(typeof z=="function")try{z=z(f,g,C)}catch(ge){z="error"}return!z||z==="ignore"?!1:z===!0||z==="error"?!0:z==="warn"?(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(g+" ["+f+"]")),!1):(typeof console!="undefined"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+z+"': "+g+" ["+f+"]")),!1)},u.isTrusted=function(f){f.url&&!f.protocol&&(f.protocol=B.protocolFromUrl(f.url));var g=typeof this.trust=="function"?this.trust(f):this.trust;return!!g},H}(),Z=function(){function H(d,f,g){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=d,this.size=f,this.cramped=g}var u=H.prototype;return u.sup=function(){return Ae[j[this.id]]},u.sub=function(){return Ae[P[this.id]]},u.fracNum=function(){return Ae[K[this.id]]},u.fracDen=function(){return Ae[k[this.id]]},u.cramp=function(){return Ae[ne[this.id]]},u.text=function(){return Ae[G[this.id]]},u.isTight=function(){return this.size>=2},H}(),ue=0,M=1,Y=2,oe=3,J=4,ye=5,pe=6,ve=7,Ae=[new Z(ue,0,!1),new Z(M,0,!0),new Z(Y,1,!1),new Z(oe,1,!0),new Z(J,2,!1),new Z(ye,2,!0),new Z(pe,3,!1),new Z(ve,3,!0)],j=[J,ye,J,ye,pe,ve,pe,ve],P=[ye,ye,ye,ye,ve,ve,ve,ve],K=[Y,oe,J,ye,pe,ve,pe,ve],k=[oe,oe,ye,ye,ve,ve,ve,ve],ne=[M,M,oe,oe,ye,ye,ve,ve],G=[ue,M,Y,oe,Y,oe,Y,oe],v={DISPLAY:Ae[ue],TEXT:Ae[Y],SCRIPT:Ae[J],SCRIPTSCRIPT:Ae[pe]},y=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function N(H){for(var u=0;u<y.length;u++)for(var d=y[u],f=0;f<d.blocks.length;f++){var g=d.blocks[f];if(H>=g[0]&&H<=g[1])return d.name}return null}var te=[];y.forEach(function(H){return H.blocks.forEach(function(u){return te.push.apply(te,u)})});function Le(H){for(var u=0;u<te.length;u+=2)if(H>=te[u]&&H<=te[u+1])return!0;return!1}var Fe=80,Ue=function(u,d){return"M95,"+(622+u+d)+`
|
|
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`+u/2.075+" -"+u+`
|
|
c5.3,-9.3,12,-14,20,-14
|
|
H400000v`+(40+u)+`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+u)+" "+d+"h400000v"+(40+u)+"h-400000z"},Ye=function(u,d){return"M263,"+(601+u+d)+`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`+u/2.084+" -"+u+`
|
|
c4.7,-7.3,11,-11,19,-11
|
|
H40000v`+(40+u)+`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+u)+" "+d+"h400000v"+(40+u)+"h-400000z"},ut=function(u,d){return"M983 "+(10+u+d)+`
|
|
l`+u/3.13+" -"+u+`
|
|
c4,-6.7,10,-10,18,-10 H400000v`+(40+u)+`
|
|
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+u)+" "+d+"h400000v"+(40+u)+"h-400000z"},ot=function(u,d){return"M424,"+(2398+u+d)+`
|
|
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`+u/4.223+" -"+u+`c4,-6.7,10,-10,18,-10 H400000
|
|
v`+(40+u)+`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+u)+" "+d+`
|
|
h400000v`+(40+u)+"h-400000z"},lt=function(u,d){return"M473,"+(2713+u+d)+`
|
|
c339.3,-1799.3,509.3,-2700,510,-2702 l`+u/5.298+" -"+u+`
|
|
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+u)+`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+u)+" "+d+"h400000v"+(40+u)+"H1017.7z"},St=function(u,d,f){var g=f-54-d-u;return"M702 "+(u+d)+"H400000"+(40+u)+`
|
|
H742v`+g+`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 `+d+"H400000v"+(40+u)+"H742z"},Lt=function(u,d,f){d=1e3*d;var g="";switch(u){case"sqrtMain":g=Ue(d,Fe);break;case"sqrtSize1":g=Ye(d,Fe);break;case"sqrtSize2":g=ut(d,Fe);break;case"sqrtSize3":g=ot(d,Fe);break;case"sqrtSize4":g=lt(d,Fe);break;case"sqrtTall":g=St(d,Fe,f)}return g},_t={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`},At=function(){function H(d){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=d,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}var u=H.prototype;return u.hasClass=function(f){return B.contains(this.classes,f)},u.toNode=function(){for(var f=document.createDocumentFragment(),g=0;g<this.children.length;g++)f.appendChild(this.children[g].toNode());return f},u.toMarkup=function(){for(var f="",g=0;g<this.children.length;g++)f+=this.children[g].toMarkup();return f},u.toText=function(){var f=function(C){return C.toText()};return this.children.map(f).join("")},H}(),Pt=function(u){return u.filter(function(d){return d}).join(" ")},kt=function(u,d,f){if(this.classes=u||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=f||{},d){d.style.isTight()&&this.classes.push("mtight");var g=d.getColor();g&&(this.style.color=g)}},fe=function(u){var d=document.createElement(u);d.className=Pt(this.classes);for(var f in this.style)this.style.hasOwnProperty(f)&&(d.style[f]=this.style[f]);for(var g in this.attributes)this.attributes.hasOwnProperty(g)&&d.setAttribute(g,this.attributes[g]);for(var C=0;C<this.children.length;C++)d.appendChild(this.children[C].toNode());return d},he=function(u){var d="<"+u;this.classes.length&&(d+=' class="'+B.escape(Pt(this.classes))+'"');var f="";for(var g in this.style)this.style.hasOwnProperty(g)&&(f+=B.hyphenate(g)+":"+this.style[g]+";");f&&(d+=' style="'+B.escape(f)+'"');for(var C in this.attributes)this.attributes.hasOwnProperty(C)&&(d+=" "+C+'="'+B.escape(this.attributes[C])+'"');d+=">";for(var z=0;z<this.children.length;z++)d+=this.children[z].toMarkup();return d+="</"+u+">",d},se=function(){function H(d,f,g,C){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,d,g,C),this.children=f||[]}var u=H.prototype;return u.setAttribute=function(f,g){this.attributes[f]=g},u.hasClass=function(f){return B.contains(this.classes,f)},u.toNode=function(){return fe.call(this,"span")},u.toMarkup=function(){return he.call(this,"span")},H}(),Me=function(){function H(d,f,g,C){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,f,C),this.children=g||[],this.setAttribute("href",d)}var u=H.prototype;return u.setAttribute=function(f,g){this.attributes[f]=g},u.hasClass=function(f){return B.contains(this.classes,f)},u.toNode=function(){return fe.call(this,"a")},u.toMarkup=function(){return he.call(this,"a")},H}(),$e=function(){function H(d,f,g){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=f,this.src=d,this.classes=["mord"],this.style=g}var u=H.prototype;return u.hasClass=function(f){return B.contains(this.classes,f)},u.toNode=function(){var f=document.createElement("img");f.src=this.src,f.alt=this.alt,f.className="mord";for(var g in this.style)this.style.hasOwnProperty(g)&&(f.style[g]=this.style[g]);return f},u.toMarkup=function(){var f="<img src='"+this.src+" 'alt='"+this.alt+"' ",g="";for(var C in this.style)this.style.hasOwnProperty(C)&&(g+=B.hyphenate(C)+":"+this.style[C]+";");return g&&(f+=' style="'+B.escape(g)+'"'),f+="'/>",f},H}(),F={\u00EE:"\u0131\u0302",\u00EF:"\u0131\u0308",\u00ED:"\u0131\u0301",\u00EC:"\u0131\u0300"},le=function(){function H(d,f,g,C,z,ge,Te,Ne){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=d,this.height=f||0,this.depth=g||0,this.italic=C||0,this.skew=z||0,this.width=ge||0,this.classes=Te||[],this.style=Ne||{},this.maxFontSize=0;var tt=N(this.text.charCodeAt(0));tt&&this.classes.push(tt+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=F[this.text])}var u=H.prototype;return u.hasClass=function(f){return B.contains(this.classes,f)},u.toNode=function(){var f=document.createTextNode(this.text),g=null;this.italic>0&&(g=document.createElement("span"),g.style.marginRight=this.italic+"em"),this.classes.length>0&&(g=g||document.createElement("span"),g.className=Pt(this.classes));for(var C in this.style)this.style.hasOwnProperty(C)&&(g=g||document.createElement("span"),g.style[C]=this.style[C]);return g?(g.appendChild(f),g):f},u.toMarkup=function(){var f=!1,g="<span";this.classes.length&&(f=!0,g+=' class="',g+=B.escape(Pt(this.classes)),g+='"');var C="";this.italic>0&&(C+="margin-right:"+this.italic+"em;");for(var z in this.style)this.style.hasOwnProperty(z)&&(C+=B.hyphenate(z)+":"+this.style[z]+";");C&&(f=!0,g+=' style="'+B.escape(C)+'"');var ge=B.escape(this.text);return f?(g+=">",g+=ge,g+="</span>",g):ge},H}(),xe=function(){function H(d,f){this.children=void 0,this.attributes=void 0,this.children=d||[],this.attributes=f||{}}var u=H.prototype;return u.toNode=function(){var f="http://www.w3.org/2000/svg",g=document.createElementNS(f,"svg");for(var C in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,C)&&g.setAttribute(C,this.attributes[C]);for(var z=0;z<this.children.length;z++)g.appendChild(this.children[z].toNode());return g},u.toMarkup=function(){var f="<svg";for(var g in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,g)&&(f+=" "+g+"='"+this.attributes[g]+"'");f+=">";for(var C=0;C<this.children.length;C++)f+=this.children[C].toMarkup();return f+="</svg>",f},H}(),we=function(){function H(d,f){this.pathName=void 0,this.alternate=void 0,this.pathName=d,this.alternate=f}var u=H.prototype;return u.toNode=function(){var f="http://www.w3.org/2000/svg",g=document.createElementNS(f,"path");return this.alternate?g.setAttribute("d",this.alternate):g.setAttribute("d",_t[this.pathName]),g},u.toMarkup=function(){return this.alternate?"<path d='"+this.alternate+"'/>":"<path d='"+_t[this.pathName]+"'/>"},H}(),Ie=function(){function H(d){this.attributes=void 0,this.attributes=d||{}}var u=H.prototype;return u.toNode=function(){var f="http://www.w3.org/2000/svg",g=document.createElementNS(f,"line");for(var C in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,C)&&g.setAttribute(C,this.attributes[C]);return g},u.toMarkup=function(){var f="<line";for(var g in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,g)&&(f+=" "+g+"='"+this.attributes[g]+"'");return f+="/>",f},H}();function Oe(H){if(H instanceof le)return H;throw new Error("Expected symbolNode but got "+String(H)+".")}function Qe(H){if(H instanceof se)return H;throw new Error("Expected span<HtmlDomNode> but got "+String(H)+".")}var it={"AMS-Regular":{65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,.68889,0,0,.55556],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{48:[0,.43056,0,0,.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473]},"Fraktur-Regular":{33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],8216:[0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],163:[0,.69444,0,0,.86853],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],163:[0,.69444,0,0,.76909],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],305:[0,.43056,0,.02778,.32246],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],567:[.19444,.43056,0,.08334,.38403],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.12,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,1],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.67,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.9,0,0,.278],8943:[-.19,.31,0,0,1.172],8945:[-.1,.82,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.744,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],10223:[.244,.744,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333]},"Math-Italic":{65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059]},"Math-Regular":{65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059]},"SansSerif-Bold":{33:[0,.69444,0,0,.36667],34:[0,.69444,0,0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,0,0,.55834]},"SansSerif-Italic":{33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212]},"Size1-Regular":{40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,0,0,.80556],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},Je={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},Ke={\u00C5:"A",\u00C7:"C",\u00D0:"D",\u00DE:"o",\u00E5:"a",\u00E7:"c",\u00F0:"d",\u00FE:"o",\u0410:"A",\u0411:"B",\u0412:"B",\u0413:"F",\u0414:"A",\u0415:"E",\u0416:"K",\u0417:"3",\u0418:"N",\u0419:"N",\u041A:"K",\u041B:"N",\u041C:"M",\u041D:"H",\u041E:"O",\u041F:"N",\u0420:"P",\u0421:"C",\u0422:"T",\u0423:"y",\u0424:"O",\u0425:"X",\u0426:"U",\u0427:"h",\u0428:"W",\u0429:"W",\u042A:"B",\u042B:"X",\u042C:"B",\u042D:"3",\u042E:"X",\u042F:"R",\u0430:"a",\u0431:"b",\u0432:"a",\u0433:"r",\u0434:"y",\u0435:"e",\u0436:"m",\u0437:"e",\u0438:"n",\u0439:"n",\u043A:"n",\u043B:"n",\u043C:"m",\u043D:"n",\u043E:"o",\u043F:"n",\u0440:"p",\u0441:"c",\u0442:"o",\u0443:"y",\u0444:"b",\u0445:"x",\u0446:"n",\u0447:"n",\u0448:"w",\u0449:"w",\u044A:"a",\u044B:"m",\u044C:"a",\u044D:"e",\u044E:"m",\u044F:"r"};function yt(H,u){it[H]=u}function De(H,u,d){if(!it[u])throw new Error("Font metrics not found for font: "+u+".");var f=H.charCodeAt(0),g=it[u][f];if(!g&&H[0]in Ke&&(f=Ke[H[0]].charCodeAt(0),g=it[u][f]),!g&&d==="text"&&Le(f)&&(g=it[u][77]),g)return{depth:g[0],height:g[1],italic:g[2],skew:g[3],width:g[4]}}var Pe={};function Ze(H){var u;if(H>=5?u=0:H>=3?u=1:u=2,!Pe[u]){var d=Pe[u]={cssEmPerMu:Je.quad[u]/18};for(var f in Je)Je.hasOwnProperty(f)&&(d[f]=Je[f][u])}return Pe[u]}var Ve={bin:1,close:1,inner:1,open:1,punct:1,rel:1},nt={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},mt={math:{},text:{}},gt=mt;function x(H,u,d,f,g,C){mt[H][g]={font:u,group:d,replace:f},C&&f&&(mt[H][f]=mt[H][g])}var T="math",et="text",W="main",Ee="ams",Bt="accent-token",Be="bin",ze="close",qe="inner",ee="mathord",be="op-token",me="open",Ge="punct",X="rel",Ct="spacing",Ce="textord";x(T,W,X,"\u2261","\\equiv",!0),x(T,W,X,"\u227A","\\prec",!0),x(T,W,X,"\u227B","\\succ",!0),x(T,W,X,"\u223C","\\sim",!0),x(T,W,X,"\u22A5","\\perp"),x(T,W,X,"\u2AAF","\\preceq",!0),x(T,W,X,"\u2AB0","\\succeq",!0),x(T,W,X,"\u2243","\\simeq",!0),x(T,W,X,"\u2223","\\mid",!0),x(T,W,X,"\u226A","\\ll",!0),x(T,W,X,"\u226B","\\gg",!0),x(T,W,X,"\u224D","\\asymp",!0),x(T,W,X,"\u2225","\\parallel"),x(T,W,X,"\u22C8","\\bowtie",!0),x(T,W,X,"\u2323","\\smile",!0),x(T,W,X,"\u2291","\\sqsubseteq",!0),x(T,W,X,"\u2292","\\sqsupseteq",!0),x(T,W,X,"\u2250","\\doteq",!0),x(T,W,X,"\u2322","\\frown",!0),x(T,W,X,"\u220B","\\ni",!0),x(T,W,X,"\u221D","\\propto",!0),x(T,W,X,"\u22A2","\\vdash",!0),x(T,W,X,"\u22A3","\\dashv",!0),x(T,W,X,"\u220B","\\owns"),x(T,W,Ge,".","\\ldotp"),x(T,W,Ge,"\u22C5","\\cdotp"),x(T,W,Ce,"#","\\#"),x(et,W,Ce,"#","\\#"),x(T,W,Ce,"&","\\&"),x(et,W,Ce,"&","\\&"),x(T,W,Ce,"\u2135","\\aleph",!0),x(T,W,Ce,"\u2200","\\forall",!0),x(T,W,Ce,"\u210F","\\hbar",!0),x(T,W,Ce,"\u2203","\\exists",!0),x(T,W,Ce,"\u2207","\\nabla",!0),x(T,W,Ce,"\u266D","\\flat",!0),x(T,W,Ce,"\u2113","\\ell",!0),x(T,W,Ce,"\u266E","\\natural",!0),x(T,W,Ce,"\u2663","\\clubsuit",!0),x(T,W,Ce,"\u2118","\\wp",!0),x(T,W,Ce,"\u266F","\\sharp",!0),x(T,W,Ce,"\u2662","\\diamondsuit",!0),x(T,W,Ce,"\u211C","\\Re",!0),x(T,W,Ce,"\u2661","\\heartsuit",!0),x(T,W,Ce,"\u2111","\\Im",!0),x(T,W,Ce,"\u2660","\\spadesuit",!0),x(et,W,Ce,"\xA7","\\S",!0),x(et,W,Ce,"\xB6","\\P",!0),x(T,W,Ce,"\u2020","\\dag"),x(et,W,Ce,"\u2020","\\dag"),x(et,W,Ce,"\u2020","\\textdagger"),x(T,W,Ce,"\u2021","\\ddag"),x(et,W,Ce,"\u2021","\\ddag"),x(et,W,Ce,"\u2021","\\textdaggerdbl"),x(T,W,ze,"\u23B1","\\rmoustache",!0),x(T,W,me,"\u23B0","\\lmoustache",!0),x(T,W,ze,"\u27EF","\\rgroup",!0),x(T,W,me,"\u27EE","\\lgroup",!0),x(T,W,Be,"\u2213","\\mp",!0),x(T,W,Be,"\u2296","\\ominus",!0),x(T,W,Be,"\u228E","\\uplus",!0),x(T,W,Be,"\u2293","\\sqcap",!0),x(T,W,Be,"\u2217","\\ast"),x(T,W,Be,"\u2294","\\sqcup",!0),x(T,W,Be,"\u25EF","\\bigcirc"),x(T,W,Be,"\u2219","\\bullet"),x(T,W,Be,"\u2021","\\ddagger"),x(T,W,Be,"\u2240","\\wr",!0),x(T,W,Be,"\u2A3F","\\amalg"),x(T,W,Be,"&","\\And"),x(T,W,X,"\u27F5","\\longleftarrow",!0),x(T,W,X,"\u21D0","\\Leftarrow",!0),x(T,W,X,"\u27F8","\\Longleftarrow",!0),x(T,W,X,"\u27F6","\\longrightarrow",!0),x(T,W,X,"\u21D2","\\Rightarrow",!0),x(T,W,X,"\u27F9","\\Longrightarrow",!0),x(T,W,X,"\u2194","\\leftrightarrow",!0),x(T,W,X,"\u27F7","\\longleftrightarrow",!0),x(T,W,X,"\u21D4","\\Leftrightarrow",!0),x(T,W,X,"\u27FA","\\Longleftrightarrow",!0),x(T,W,X,"\u21A6","\\mapsto",!0),x(T,W,X,"\u27FC","\\longmapsto",!0),x(T,W,X,"\u2197","\\nearrow",!0),x(T,W,X,"\u21A9","\\hookleftarrow",!0),x(T,W,X,"\u21AA","\\hookrightarrow",!0),x(T,W,X,"\u2198","\\searrow",!0),x(T,W,X,"\u21BC","\\leftharpoonup",!0),x(T,W,X,"\u21C0","\\rightharpoonup",!0),x(T,W,X,"\u2199","\\swarrow",!0),x(T,W,X,"\u21BD","\\leftharpoondown",!0),x(T,W,X,"\u21C1","\\rightharpoondown",!0),x(T,W,X,"\u2196","\\nwarrow",!0),x(T,W,X,"\u21CC","\\rightleftharpoons",!0),x(T,Ee,X,"\u226E","\\nless",!0),x(T,Ee,X,"\uE010","\\@nleqslant"),x(T,Ee,X,"\uE011","\\@nleqq"),x(T,Ee,X,"\u2A87","\\lneq",!0),x(T,Ee,X,"\u2268","\\lneqq",!0),x(T,Ee,X,"\uE00C","\\@lvertneqq"),x(T,Ee,X,"\u22E6","\\lnsim",!0),x(T,Ee,X,"\u2A89","\\lnapprox",!0),x(T,Ee,X,"\u2280","\\nprec",!0),x(T,Ee,X,"\u22E0","\\npreceq",!0),x(T,Ee,X,"\u22E8","\\precnsim",!0),x(T,Ee,X,"\u2AB9","\\precnapprox",!0),x(T,Ee,X,"\u2241","\\nsim",!0),x(T,Ee,X,"\uE006","\\@nshortmid"),x(T,Ee,X,"\u2224","\\nmid",!0),x(T,Ee,X,"\u22AC","\\nvdash",!0),x(T,Ee,X,"\u22AD","\\nvDash",!0),x(T,Ee,X,"\u22EA","\\ntriangleleft"),x(T,Ee,X,"\u22EC","\\ntrianglelefteq",!0),x(T,Ee,X,"\u228A","\\subsetneq",!0),x(T,Ee,X,"\uE01A","\\@varsubsetneq"),x(T,Ee,X,"\u2ACB","\\subsetneqq",!0),x(T,Ee,X,"\uE017","\\@varsubsetneqq"),x(T,Ee,X,"\u226F","\\ngtr",!0),x(T,Ee,X,"\uE00F","\\@ngeqslant"),x(T,Ee,X,"\uE00E","\\@ngeqq"),x(T,Ee,X,"\u2A88","\\gneq",!0),x(T,Ee,X,"\u2269","\\gneqq",!0),x(T,Ee,X,"\uE00D","\\@gvertneqq"),x(T,Ee,X,"\u22E7","\\gnsim",!0),x(T,Ee,X,"\u2A8A","\\gnapprox",!0),x(T,Ee,X,"\u2281","\\nsucc",!0),x(T,Ee,X,"\u22E1","\\nsucceq",!0),x(T,Ee,X,"\u22E9","\\succnsim",!0),x(T,Ee,X,"\u2ABA","\\succnapprox",!0),x(T,Ee,X,"\u2246","\\ncong",!0),x(T,Ee,X,"\uE007","\\@nshortparallel"),x(T,Ee,X,"\u2226","\\nparallel",!0),x(T,Ee,X,"\u22AF","\\nVDash",!0),x(T,Ee,X,"\u22EB","\\ntriangleright"),x(T,Ee,X,"\u22ED","\\ntrianglerighteq",!0),x(T,Ee,X,"\uE018","\\@nsupseteqq"),x(T,Ee,X,"\u228B","\\supsetneq",!0),x(T,Ee,X,"\uE01B","\\@varsupsetneq"),x(T,Ee,X,"\u2ACC","\\supsetneqq",!0),x(T,Ee,X,"\uE019","\\@varsupsetneqq"),x(T,Ee,X,"\u22AE","\\nVdash",!0),x(T,Ee,X,"\u2AB5","\\precneqq",!0),x(T,Ee,X,"\u2AB6","\\succneqq",!0),x(T,Ee,X,"\uE016","\\@nsubseteqq"),x(T,Ee,Be,"\u22B4","\\unlhd"),x(T,Ee,Be,"\u22B5","\\unrhd"),x(T,Ee,X,"\u219A","\\nleftarrow",!0),x(T,Ee,X,"\u219B","\\nrightarrow",!0),x(T,Ee,X,"\u21CD","\\nLeftarrow",!0),x(T,Ee,X,"\u21CF","\\nRightarrow",!0),x(T,Ee,X,"\u21AE","\\nleftrightarrow",!0),x(T,Ee,X,"\u21CE","\\nLeftrightarrow",!0),x(T,Ee,X,"\u25B3","\\vartriangle"),x(T,Ee,Ce,"\u210F","\\hslash"),x(T,Ee,Ce,"\u25BD","\\triangledown"),x(T,Ee,Ce,"\u25CA","\\lozenge"),x(T,Ee,Ce,"\u24C8","\\circledS"),x(T,Ee,Ce,"\xAE","\\circledR"),x(et,Ee,Ce,"\xAE","\\circledR"),x(T,Ee,Ce,"\u2221","\\measuredangle",!0),x(T,Ee,Ce,"\u2204","\\nexists"),x(T,Ee,Ce,"\u2127","\\mho"),x(T,Ee,Ce,"\u2132","\\Finv",!0),x(T,Ee,Ce,"\u2141","\\Game",!0),x(T,Ee,Ce,"\u2035","\\backprime"),x(T,Ee,Ce,"\u25B2","\\blacktriangle"),x(T,Ee,Ce,"\u25BC","\\blacktriangledown"),x(T,Ee,Ce,"\u25A0","\\blacksquare"),x(T,Ee,Ce,"\u29EB","\\blacklozenge"),x(T,Ee,Ce,"\u2605","\\bigstar"),x(T,Ee,Ce,"\u2222","\\sphericalangle",!0),x(T,Ee,Ce,"\u2201","\\complement",!0),x(T,Ee,Ce,"\xF0","\\eth",!0),x(T,Ee,Ce,"\u2571","\\diagup"),x(T,Ee,Ce,"\u2572","\\diagdown"),x(T,Ee,Ce,"\u25A1","\\square"),x(T,Ee,Ce,"\u25A1","\\Box"),x(T,Ee,Ce,"\u25CA","\\Diamond"),x(T,Ee,Ce,"\xA5","\\yen",!0),x(et,Ee,Ce,"\xA5","\\yen",!0),x(T,Ee,Ce,"\u2713","\\checkmark",!0),x(et,Ee,Ce,"\u2713","\\checkmark"),x(T,Ee,Ce,"\u2136","\\beth",!0),x(T,Ee,Ce,"\u2138","\\daleth",!0),x(T,Ee,Ce,"\u2137","\\gimel",!0),x(T,Ee,Ce,"\u03DD","\\digamma",!0),x(T,Ee,Ce,"\u03F0","\\varkappa"),x(T,Ee,me,"\u250C","\\ulcorner",!0),x(T,Ee,ze,"\u2510","\\urcorner",!0),x(T,Ee,me,"\u2514","\\llcorner",!0),x(T,Ee,ze,"\u2518","\\lrcorner",!0),x(T,Ee,X,"\u2266","\\leqq",!0),x(T,Ee,X,"\u2A7D","\\leqslant",!0),x(T,Ee,X,"\u2A95","\\eqslantless",!0),x(T,Ee,X,"\u2272","\\lesssim",!0),x(T,Ee,X,"\u2A85","\\lessapprox",!0),x(T,Ee,X,"\u224A","\\approxeq",!0),x(T,Ee,Be,"\u22D6","\\lessdot"),x(T,Ee,X,"\u22D8","\\lll",!0),x(T,Ee,X,"\u2276","\\lessgtr",!0),x(T,Ee,X,"\u22DA","\\lesseqgtr",!0),x(T,Ee,X,"\u2A8B","\\lesseqqgtr",!0),x(T,Ee,X,"\u2251","\\doteqdot"),x(T,Ee,X,"\u2253","\\risingdotseq",!0),x(T,Ee,X,"\u2252","\\fallingdotseq",!0),x(T,Ee,X,"\u223D","\\backsim",!0),x(T,Ee,X,"\u22CD","\\backsimeq",!0),x(T,Ee,X,"\u2AC5","\\subseteqq",!0),x(T,Ee,X,"\u22D0","\\Subset",!0),x(T,Ee,X,"\u228F","\\sqsubset",!0),x(T,Ee,X,"\u227C","\\preccurlyeq",!0),x(T,Ee,X,"\u22DE","\\curlyeqprec",!0),x(T,Ee,X,"\u227E","\\precsim",!0),x(T,Ee,X,"\u2AB7","\\precapprox",!0),x(T,Ee,X,"\u22B2","\\vartriangleleft"),x(T,Ee,X,"\u22B4","\\trianglelefteq"),x(T,Ee,X,"\u22A8","\\vDash",!0),x(T,Ee,X,"\u22AA","\\Vvdash",!0),x(T,Ee,X,"\u2323","\\smallsmile"),x(T,Ee,X,"\u2322","\\smallfrown"),x(T,Ee,X,"\u224F","\\bumpeq",!0),x(T,Ee,X,"\u224E","\\Bumpeq",!0),x(T,Ee,X,"\u2267","\\geqq",!0),x(T,Ee,X,"\u2A7E","\\geqslant",!0),x(T,Ee,X,"\u2A96","\\eqslantgtr",!0),x(T,Ee,X,"\u2273","\\gtrsim",!0),x(T,Ee,X,"\u2A86","\\gtrapprox",!0),x(T,Ee,Be,"\u22D7","\\gtrdot"),x(T,Ee,X,"\u22D9","\\ggg",!0),x(T,Ee,X,"\u2277","\\gtrless",!0),x(T,Ee,X,"\u22DB","\\gtreqless",!0),x(T,Ee,X,"\u2A8C","\\gtreqqless",!0),x(T,Ee,X,"\u2256","\\eqcirc",!0),x(T,Ee,X,"\u2257","\\circeq",!0),x(T,Ee,X,"\u225C","\\triangleq",!0),x(T,Ee,X,"\u223C","\\thicksim"),x(T,Ee,X,"\u2248","\\thickapprox"),x(T,Ee,X,"\u2AC6","\\supseteqq",!0),x(T,Ee,X,"\u22D1","\\Supset",!0),x(T,Ee,X,"\u2290","\\sqsupset",!0),x(T,Ee,X,"\u227D","\\succcurlyeq",!0),x(T,Ee,X,"\u22DF","\\curlyeqsucc",!0),x(T,Ee,X,"\u227F","\\succsim",!0),x(T,Ee,X,"\u2AB8","\\succapprox",!0),x(T,Ee,X,"\u22B3","\\vartriangleright"),x(T,Ee,X,"\u22B5","\\trianglerighteq"),x(T,Ee,X,"\u22A9","\\Vdash",!0),x(T,Ee,X,"\u2223","\\shortmid"),x(T,Ee,X,"\u2225","\\shortparallel"),x(T,Ee,X,"\u226C","\\between",!0),x(T,Ee,X,"\u22D4","\\pitchfork",!0),x(T,Ee,X,"\u221D","\\varpropto"),x(T,Ee,X,"\u25C0","\\blacktriangleleft"),x(T,Ee,X,"\u2234","\\therefore",!0),x(T,Ee,X,"\u220D","\\backepsilon"),x(T,Ee,X,"\u25B6","\\blacktriangleright"),x(T,Ee,X,"\u2235","\\because",!0),x(T,Ee,X,"\u22D8","\\llless"),x(T,Ee,X,"\u22D9","\\gggtr"),x(T,Ee,Be,"\u22B2","\\lhd"),x(T,Ee,Be,"\u22B3","\\rhd"),x(T,Ee,X,"\u2242","\\eqsim",!0),x(T,W,X,"\u22C8","\\Join"),x(T,Ee,X,"\u2251","\\Doteq",!0),x(T,Ee,Be,"\u2214","\\dotplus",!0),x(T,Ee,Be,"\u2216","\\smallsetminus"),x(T,Ee,Be,"\u22D2","\\Cap",!0),x(T,Ee,Be,"\u22D3","\\Cup",!0),x(T,Ee,Be,"\u2A5E","\\doublebarwedge",!0),x(T,Ee,Be,"\u229F","\\boxminus",!0),x(T,Ee,Be,"\u229E","\\boxplus",!0),x(T,Ee,Be,"\u22C7","\\divideontimes",!0),x(T,Ee,Be,"\u22C9","\\ltimes",!0),x(T,Ee,Be,"\u22CA","\\rtimes",!0),x(T,Ee,Be,"\u22CB","\\leftthreetimes",!0),x(T,Ee,Be,"\u22CC","\\rightthreetimes",!0),x(T,Ee,Be,"\u22CF","\\curlywedge",!0),x(T,Ee,Be,"\u22CE","\\curlyvee",!0),x(T,Ee,Be,"\u229D","\\circleddash",!0),x(T,Ee,Be,"\u229B","\\circledast",!0),x(T,Ee,Be,"\u22C5","\\centerdot"),x(T,Ee,Be,"\u22BA","\\intercal",!0),x(T,Ee,Be,"\u22D2","\\doublecap"),x(T,Ee,Be,"\u22D3","\\doublecup"),x(T,Ee,Be,"\u22A0","\\boxtimes",!0),x(T,Ee,X,"\u21E2","\\dashrightarrow",!0),x(T,Ee,X,"\u21E0","\\dashleftarrow",!0),x(T,Ee,X,"\u21C7","\\leftleftarrows",!0),x(T,Ee,X,"\u21C6","\\leftrightarrows",!0),x(T,Ee,X,"\u21DA","\\Lleftarrow",!0),x(T,Ee,X,"\u219E","\\twoheadleftarrow",!0),x(T,Ee,X,"\u21A2","\\leftarrowtail",!0),x(T,Ee,X,"\u21AB","\\looparrowleft",!0),x(T,Ee,X,"\u21CB","\\leftrightharpoons",!0),x(T,Ee,X,"\u21B6","\\curvearrowleft",!0),x(T,Ee,X,"\u21BA","\\circlearrowleft",!0),x(T,Ee,X,"\u21B0","\\Lsh",!0),x(T,Ee,X,"\u21C8","\\upuparrows",!0),x(T,Ee,X,"\u21BF","\\upharpoonleft",!0),x(T,Ee,X,"\u21C3","\\downharpoonleft",!0),x(T,Ee,X,"\u22B8","\\multimap",!0),x(T,Ee,X,"\u21AD","\\leftrightsquigarrow",!0),x(T,Ee,X,"\u21C9","\\rightrightarrows",!0),x(T,Ee,X,"\u21C4","\\rightleftarrows",!0),x(T,Ee,X,"\u21A0","\\twoheadrightarrow",!0),x(T,Ee,X,"\u21A3","\\rightarrowtail",!0),x(T,Ee,X,"\u21AC","\\looparrowright",!0),x(T,Ee,X,"\u21B7","\\curvearrowright",!0),x(T,Ee,X,"\u21BB","\\circlearrowright",!0),x(T,Ee,X,"\u21B1","\\Rsh",!0),x(T,Ee,X,"\u21CA","\\downdownarrows",!0),x(T,Ee,X,"\u21BE","\\upharpoonright",!0),x(T,Ee,X,"\u21C2","\\downharpoonright",!0),x(T,Ee,X,"\u21DD","\\rightsquigarrow",!0),x(T,Ee,X,"\u21DD","\\leadsto"),x(T,Ee,X,"\u21DB","\\Rrightarrow",!0),x(T,Ee,X,"\u21BE","\\restriction"),x(T,W,Ce,"\u2018","`"),x(T,W,Ce,"$","\\$"),x(et,W,Ce,"$","\\$"),x(et,W,Ce,"$","\\textdollar"),x(T,W,Ce,"%","\\%"),x(et,W,Ce,"%","\\%"),x(T,W,Ce,"_","\\_"),x(et,W,Ce,"_","\\_"),x(et,W,Ce,"_","\\textunderscore"),x(T,W,Ce,"\u2220","\\angle",!0),x(T,W,Ce,"\u221E","\\infty",!0),x(T,W,Ce,"\u2032","\\prime"),x(T,W,Ce,"\u25B3","\\triangle"),x(T,W,Ce,"\u0393","\\Gamma",!0),x(T,W,Ce,"\u0394","\\Delta",!0),x(T,W,Ce,"\u0398","\\Theta",!0),x(T,W,Ce,"\u039B","\\Lambda",!0),x(T,W,Ce,"\u039E","\\Xi",!0),x(T,W,Ce,"\u03A0","\\Pi",!0),x(T,W,Ce,"\u03A3","\\Sigma",!0),x(T,W,Ce,"\u03A5","\\Upsilon",!0),x(T,W,Ce,"\u03A6","\\Phi",!0),x(T,W,Ce,"\u03A8","\\Psi",!0),x(T,W,Ce,"\u03A9","\\Omega",!0),x(T,W,Ce,"A","\u0391"),x(T,W,Ce,"B","\u0392"),x(T,W,Ce,"E","\u0395"),x(T,W,Ce,"Z","\u0396"),x(T,W,Ce,"H","\u0397"),x(T,W,Ce,"I","\u0399"),x(T,W,Ce,"K","\u039A"),x(T,W,Ce,"M","\u039C"),x(T,W,Ce,"N","\u039D"),x(T,W,Ce,"O","\u039F"),x(T,W,Ce,"P","\u03A1"),x(T,W,Ce,"T","\u03A4"),x(T,W,Ce,"X","\u03A7"),x(T,W,Ce,"\xAC","\\neg",!0),x(T,W,Ce,"\xAC","\\lnot"),x(T,W,Ce,"\u22A4","\\top"),x(T,W,Ce,"\u22A5","\\bot"),x(T,W,Ce,"\u2205","\\emptyset"),x(T,Ee,Ce,"\u2205","\\varnothing"),x(T,W,ee,"\u03B1","\\alpha",!0),x(T,W,ee,"\u03B2","\\beta",!0),x(T,W,ee,"\u03B3","\\gamma",!0),x(T,W,ee,"\u03B4","\\delta",!0),x(T,W,ee,"\u03F5","\\epsilon",!0),x(T,W,ee,"\u03B6","\\zeta",!0),x(T,W,ee,"\u03B7","\\eta",!0),x(T,W,ee,"\u03B8","\\theta",!0),x(T,W,ee,"\u03B9","\\iota",!0),x(T,W,ee,"\u03BA","\\kappa",!0),x(T,W,ee,"\u03BB","\\lambda",!0),x(T,W,ee,"\u03BC","\\mu",!0),x(T,W,ee,"\u03BD","\\nu",!0),x(T,W,ee,"\u03BE","\\xi",!0),x(T,W,ee,"\u03BF","\\omicron",!0),x(T,W,ee,"\u03C0","\\pi",!0),x(T,W,ee,"\u03C1","\\rho",!0),x(T,W,ee,"\u03C3","\\sigma",!0),x(T,W,ee,"\u03C4","\\tau",!0),x(T,W,ee,"\u03C5","\\upsilon",!0),x(T,W,ee,"\u03D5","\\phi",!0),x(T,W,ee,"\u03C7","\\chi",!0),x(T,W,ee,"\u03C8","\\psi",!0),x(T,W,ee,"\u03C9","\\omega",!0),x(T,W,ee,"\u03B5","\\varepsilon",!0),x(T,W,ee,"\u03D1","\\vartheta",!0),x(T,W,ee,"\u03D6","\\varpi",!0),x(T,W,ee,"\u03F1","\\varrho",!0),x(T,W,ee,"\u03C2","\\varsigma",!0),x(T,W,ee,"\u03C6","\\varphi",!0),x(T,W,Be,"\u2217","*"),x(T,W,Be,"+","+"),x(T,W,Be,"\u2212","-"),x(T,W,Be,"\u22C5","\\cdot",!0),x(T,W,Be,"\u2218","\\circ"),x(T,W,Be,"\xF7","\\div",!0),x(T,W,Be,"\xB1","\\pm",!0),x(T,W,Be,"\xD7","\\times",!0),x(T,W,Be,"\u2229","\\cap",!0),x(T,W,Be,"\u222A","\\cup",!0),x(T,W,Be,"\u2216","\\setminus"),x(T,W,Be,"\u2227","\\land"),x(T,W,Be,"\u2228","\\lor"),x(T,W,Be,"\u2227","\\wedge",!0),x(T,W,Be,"\u2228","\\vee",!0),x(T,W,Ce,"\u221A","\\surd"),x(T,W,me,"(","("),x(T,W,me,"[","["),x(T,W,me,"\u27E8","\\langle",!0),x(T,W,me,"\u2223","\\lvert"),x(T,W,me,"\u2225","\\lVert"),x(T,W,ze,")",")"),x(T,W,ze,"]","]"),x(T,W,ze,"?","?"),x(T,W,ze,"!","!"),x(T,W,ze,"\u27E9","\\rangle",!0),x(T,W,ze,"\u2223","\\rvert"),x(T,W,ze,"\u2225","\\rVert"),x(T,W,X,"=","="),x(T,W,X,"<","<"),x(T,W,X,">",">"),x(T,W,X,":",":"),x(T,W,X,"\u2248","\\approx",!0),x(T,W,X,"\u2245","\\cong",!0),x(T,W,X,"\u2265","\\ge"),x(T,W,X,"\u2265","\\geq",!0),x(T,W,X,"\u2190","\\gets"),x(T,W,X,">","\\gt"),x(T,W,X,"\u2208","\\in",!0),x(T,W,X,"\uE020","\\@not"),x(T,W,X,"\u2282","\\subset",!0),x(T,W,X,"\u2283","\\supset",!0),x(T,W,X,"\u2286","\\subseteq",!0),x(T,W,X,"\u2287","\\supseteq",!0),x(T,Ee,X,"\u2288","\\nsubseteq",!0),x(T,Ee,X,"\u2289","\\nsupseteq",!0),x(T,W,X,"\u22A8","\\models"),x(T,W,X,"\u2190","\\leftarrow",!0),x(T,W,X,"\u2264","\\le"),x(T,W,X,"\u2264","\\leq",!0),x(T,W,X,"<","\\lt"),x(T,W,X,"\u2192","\\rightarrow",!0),x(T,W,X,"\u2192","\\to"),x(T,Ee,X,"\u2271","\\ngeq",!0),x(T,Ee,X,"\u2270","\\nleq",!0),x(T,W,Ct,"\xA0","\\ "),x(T,W,Ct,"\xA0","~"),x(T,W,Ct,"\xA0","\\space"),x(T,W,Ct,"\xA0","\\nobreakspace"),x(et,W,Ct,"\xA0","\\ "),x(et,W,Ct,"\xA0","~"),x(et,W,Ct,"\xA0","\\space"),x(et,W,Ct,"\xA0","\\nobreakspace"),x(T,W,Ct,null,"\\nobreak"),x(T,W,Ct,null,"\\allowbreak"),x(T,W,Ge,",",","),x(T,W,Ge,";",";"),x(T,Ee,Be,"\u22BC","\\barwedge",!0),x(T,Ee,Be,"\u22BB","\\veebar",!0),x(T,W,Be,"\u2299","\\odot",!0),x(T,W,Be,"\u2295","\\oplus",!0),x(T,W,Be,"\u2297","\\otimes",!0),x(T,W,Ce,"\u2202","\\partial",!0),x(T,W,Be,"\u2298","\\oslash",!0),x(T,Ee,Be,"\u229A","\\circledcirc",!0),x(T,Ee,Be,"\u22A1","\\boxdot",!0),x(T,W,Be,"\u25B3","\\bigtriangleup"),x(T,W,Be,"\u25BD","\\bigtriangledown"),x(T,W,Be,"\u2020","\\dagger"),x(T,W,Be,"\u22C4","\\diamond"),x(T,W,Be,"\u22C6","\\star"),x(T,W,Be,"\u25C3","\\triangleleft"),x(T,W,Be,"\u25B9","\\triangleright"),x(T,W,me,"{","\\{"),x(et,W,Ce,"{","\\{"),x(et,W,Ce,"{","\\textbraceleft"),x(T,W,ze,"}","\\}"),x(et,W,Ce,"}","\\}"),x(et,W,Ce,"}","\\textbraceright"),x(T,W,me,"{","\\lbrace"),x(T,W,ze,"}","\\rbrace"),x(T,W,me,"[","\\lbrack"),x(et,W,Ce,"[","\\lbrack"),x(T,W,ze,"]","\\rbrack"),x(et,W,Ce,"]","\\rbrack"),x(T,W,me,"(","\\lparen"),x(T,W,ze,")","\\rparen"),x(et,W,Ce,"<","\\textless"),x(et,W,Ce,">","\\textgreater"),x(T,W,me,"\u230A","\\lfloor",!0),x(T,W,ze,"\u230B","\\rfloor",!0),x(T,W,me,"\u2308","\\lceil",!0),x(T,W,ze,"\u2309","\\rceil",!0),x(T,W,Ce,"\\","\\backslash"),x(T,W,Ce,"\u2223","|"),x(T,W,Ce,"\u2223","\\vert"),x(et,W,Ce,"|","\\textbar"),x(T,W,Ce,"\u2225","\\|"),x(T,W,Ce,"\u2225","\\Vert"),x(et,W,Ce,"\u2225","\\textbardbl"),x(et,W,Ce,"~","\\textasciitilde"),x(et,W,Ce,"\\","\\textbackslash"),x(et,W,Ce,"^","\\textasciicircum"),x(T,W,X,"\u2191","\\uparrow",!0),x(T,W,X,"\u21D1","\\Uparrow",!0),x(T,W,X,"\u2193","\\downarrow",!0),x(T,W,X,"\u21D3","\\Downarrow",!0),x(T,W,X,"\u2195","\\updownarrow",!0),x(T,W,X,"\u21D5","\\Updownarrow",!0),x(T,W,be,"\u2210","\\coprod"),x(T,W,be,"\u22C1","\\bigvee"),x(T,W,be,"\u22C0","\\bigwedge"),x(T,W,be,"\u2A04","\\biguplus"),x(T,W,be,"\u22C2","\\bigcap"),x(T,W,be,"\u22C3","\\bigcup"),x(T,W,be,"\u222B","\\int"),x(T,W,be,"\u222B","\\intop"),x(T,W,be,"\u222C","\\iint"),x(T,W,be,"\u222D","\\iiint"),x(T,W,be,"\u220F","\\prod"),x(T,W,be,"\u2211","\\sum"),x(T,W,be,"\u2A02","\\bigotimes"),x(T,W,be,"\u2A01","\\bigoplus"),x(T,W,be,"\u2A00","\\bigodot"),x(T,W,be,"\u222E","\\oint"),x(T,W,be,"\u222F","\\oiint"),x(T,W,be,"\u2230","\\oiiint"),x(T,W,be,"\u2A06","\\bigsqcup"),x(T,W,be,"\u222B","\\smallint"),x(et,W,qe,"\u2026","\\textellipsis"),x(T,W,qe,"\u2026","\\mathellipsis"),x(et,W,qe,"\u2026","\\ldots",!0),x(T,W,qe,"\u2026","\\ldots",!0),x(T,W,qe,"\u22EF","\\@cdots",!0),x(T,W,qe,"\u22F1","\\ddots",!0),x(T,W,Ce,"\u22EE","\\varvdots"),x(T,W,Bt,"\u02CA","\\acute"),x(T,W,Bt,"\u02CB","\\grave"),x(T,W,Bt,"\xA8","\\ddot"),x(T,W,Bt,"~","\\tilde"),x(T,W,Bt,"\u02C9","\\bar"),x(T,W,Bt,"\u02D8","\\breve"),x(T,W,Bt,"\u02C7","\\check"),x(T,W,Bt,"^","\\hat"),x(T,W,Bt,"\u20D7","\\vec"),x(T,W,Bt,"\u02D9","\\dot"),x(T,W,Bt,"\u02DA","\\mathring"),x(T,W,ee,"\u0131","\\imath",!0),x(T,W,ee,"\u0237","\\jmath",!0),x(et,W,Ce,"\u0131","\\i",!0),x(et,W,Ce,"\u0237","\\j",!0),x(et,W,Ce,"\xDF","\\ss",!0),x(et,W,Ce,"\xE6","\\ae",!0),x(et,W,Ce,"\xE6","\\ae",!0),x(et,W,Ce,"\u0153","\\oe",!0),x(et,W,Ce,"\xF8","\\o",!0),x(et,W,Ce,"\xC6","\\AE",!0),x(et,W,Ce,"\u0152","\\OE",!0),x(et,W,Ce,"\xD8","\\O",!0),x(et,W,Bt,"\u02CA","\\'"),x(et,W,Bt,"\u02CB","\\`"),x(et,W,Bt,"\u02C6","\\^"),x(et,W,Bt,"\u02DC","\\~"),x(et,W,Bt,"\u02C9","\\="),x(et,W,Bt,"\u02D8","\\u"),x(et,W,Bt,"\u02D9","\\."),x(et,W,Bt,"\u02DA","\\r"),x(et,W,Bt,"\u02C7","\\v"),x(et,W,Bt,"\xA8",'\\"'),x(et,W,Bt,"\u02DD","\\H"),x(et,W,Bt,"\u25EF","\\textcircled");var Ot={"--":!0,"---":!0,"``":!0,"''":!0};x(et,W,Ce,"\u2013","--"),x(et,W,Ce,"\u2013","\\textendash"),x(et,W,Ce,"\u2014","---"),x(et,W,Ce,"\u2014","\\textemdash"),x(et,W,Ce,"\u2018","`"),x(et,W,Ce,"\u2018","\\textquoteleft"),x(et,W,Ce,"\u2019","'"),x(et,W,Ce,"\u2019","\\textquoteright"),x(et,W,Ce,"\u201C","``"),x(et,W,Ce,"\u201C","\\textquotedblleft"),x(et,W,Ce,"\u201D","''"),x(et,W,Ce,"\u201D","\\textquotedblright"),x(T,W,Ce,"\xB0","\\degree",!0),x(et,W,Ce,"\xB0","\\degree"),x(et,W,Ce,"\xB0","\\textdegree",!0),x(T,W,ee,"\xA3","\\pounds"),x(T,W,ee,"\xA3","\\mathsterling",!0),x(et,W,ee,"\xA3","\\pounds"),x(et,W,ee,"\xA3","\\textsterling",!0),x(T,Ee,Ce,"\u2720","\\maltese"),x(et,Ee,Ce,"\u2720","\\maltese"),x(et,W,Ct,"\xA0","\\ "),x(et,W,Ct,"\xA0"," "),x(et,W,Ct,"\xA0","~");for(var zt='0123456789/@."',cr=0;cr<zt.length;cr++){var sr=zt.charAt(cr);x(T,W,Ce,sr,sr)}for(var Kt='0123456789!@*()-=+[]<>|";:?/.,',$t=0;$t<Kt.length;$t++){var mr=Kt.charAt($t);x(et,W,Ce,mr,mr)}for(var Vr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",Ur=0;Ur<Vr.length;Ur++){var jr=Vr.charAt(Ur);x(T,W,ee,jr,jr),x(et,W,Ce,jr,jr)}x(T,Ee,Ce,"C","\u2102"),x(et,Ee,Ce,"C","\u2102"),x(T,Ee,Ce,"H","\u210D"),x(et,Ee,Ce,"H","\u210D"),x(T,Ee,Ce,"N","\u2115"),x(et,Ee,Ce,"N","\u2115"),x(T,Ee,Ce,"P","\u2119"),x(et,Ee,Ce,"P","\u2119"),x(T,Ee,Ce,"Q","\u211A"),x(et,Ee,Ce,"Q","\u211A"),x(T,Ee,Ce,"R","\u211D"),x(et,Ee,Ce,"R","\u211D"),x(T,Ee,Ce,"Z","\u2124"),x(et,Ee,Ce,"Z","\u2124"),x(T,W,ee,"h","\u210E"),x(et,W,ee,"h","\u210E");for(var Vt="",or=0;or<Vr.length;or++){var Ir=Vr.charAt(or);Vt=String.fromCharCode(55349,56320+or),x(T,W,ee,Ir,Vt),x(et,W,Ce,Ir,Vt),Vt=String.fromCharCode(55349,56372+or),x(T,W,ee,Ir,Vt),x(et,W,Ce,Ir,Vt),Vt=String.fromCharCode(55349,56424+or),x(T,W,ee,Ir,Vt),x(et,W,Ce,Ir,Vt),Vt=String.fromCharCode(55349,56580+or),x(T,W,ee,Ir,Vt),x(et,W,Ce,Ir,Vt),Vt=String.fromCharCode(55349,56736+or),x(T,W,ee,Ir,Vt),x(et,W,Ce,Ir,Vt),Vt=String.fromCharCode(55349,56788+or),x(T,W,ee,Ir,Vt),x(et,W,Ce,Ir,Vt),Vt=String.fromCharCode(55349,56840+or),x(T,W,ee,Ir,Vt),x(et,W,Ce,Ir,Vt),Vt=String.fromCharCode(55349,56944+or),x(T,W,ee,Ir,Vt),x(et,W,Ce,Ir,Vt),or<26&&(Vt=String.fromCharCode(55349,56632+or),x(T,W,ee,Ir,Vt),x(et,W,Ce,Ir,Vt),Vt=String.fromCharCode(55349,56476+or),x(T,W,ee,Ir,Vt),x(et,W,Ce,Ir,Vt))}Vt="\u{1D55C}",x(T,W,ee,"k",Vt),x(et,W,Ce,"k",Vt);for(var Kr=0;Kr<10;Kr++){var Lr=Kr.toString();Vt=String.fromCharCode(55349,57294+Kr),x(T,W,ee,Lr,Vt),x(et,W,Ce,Lr,Vt),Vt=String.fromCharCode(55349,57314+Kr),x(T,W,ee,Lr,Vt),x(et,W,Ce,Lr,Vt),Vt=String.fromCharCode(55349,57324+Kr),x(T,W,ee,Lr,Vt),x(et,W,Ce,Lr,Vt),Vt=String.fromCharCode(55349,57334+Kr),x(T,W,ee,Lr,Vt),x(et,W,Ce,Lr,Vt)}for(var ln="\xC7\xD0\xDE\xE7\xFE",Pr=0;Pr<ln.length;Pr++){var Fn=ln.charAt(Pr);x(T,W,ee,Fn,Fn),x(et,W,Ce,Fn,Fn)}x(et,W,Ce,"\xF0","\xF0"),x(et,W,Ce,"\u2013","\u2013"),x(et,W,Ce,"\u2014","\u2014"),x(et,W,Ce,"\u2018","\u2018"),x(et,W,Ce,"\u2019","\u2019"),x(et,W,Ce,"\u201C","\u201C"),x(et,W,Ce,"\u201D","\u201D");var un=[["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"]],zr=[["mathbf","textbf","Main-Bold"],["","",""],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],qt=function(u,d){var f=u.charCodeAt(0),g=u.charCodeAt(1),C=(f-55296)*1024+(g-56320)+65536,z=d==="math"?0:1;if(119808<=C&&C<120484){var ge=Math.floor((C-119808)/26);return[un[ge][2],un[ge][z]]}else if(120782<=C&&C<=120831){var Te=Math.floor((C-120782)/10);return[zr[Te][2],zr[Te][z]]}else{if(C===120485||C===120486)return[un[0][2],un[0][z]];if(120486<C&&C<120782)return["",""];throw new m("Unsupported character: "+u)}},Xt=[[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]],wr=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Er=function(u,d){return d.size<2?u:Xt[u-1][d.size-1]},_r=function(){function H(d){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=d.style,this.color=d.color,this.size=d.size||H.BASESIZE,this.textSize=d.textSize||this.size,this.phantom=!!d.phantom,this.font=d.font||"",this.fontFamily=d.fontFamily||"",this.fontWeight=d.fontWeight||"",this.fontShape=d.fontShape||"",this.sizeMultiplier=wr[this.size-1],this.maxSize=d.maxSize,this.minRuleThickness=d.minRuleThickness,this._fontMetrics=void 0}var u=H.prototype;return u.extend=function(f){var g={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 C in f)f.hasOwnProperty(C)&&(g[C]=f[C]);return new H(g)},u.havingStyle=function(f){return this.style===f?this:this.extend({style:f,size:Er(this.textSize,f)})},u.havingCrampedStyle=function(){return this.havingStyle(this.style.cramp())},u.havingSize=function(f){return this.size===f&&this.textSize===f?this:this.extend({style:this.style.text(),size:f,textSize:f,sizeMultiplier:wr[f-1]})},u.havingBaseStyle=function(f){f=f||this.style.text();var g=Er(H.BASESIZE,f);return this.size===g&&this.textSize===H.BASESIZE&&this.style===f?this:this.extend({style:f,size:g})},u.havingBaseSizing=function(){var f;switch(this.style.id){case 4:case 5:f=3;break;case 6:case 7:f=1;break;default:f=6}return this.extend({style:this.style.text(),size:f})},u.withColor=function(f){return this.extend({color:f})},u.withPhantom=function(){return this.extend({phantom:!0})},u.withFont=function(f){return this.extend({font:f})},u.withTextFontFamily=function(f){return this.extend({fontFamily:f,font:""})},u.withTextFontWeight=function(f){return this.extend({fontWeight:f,font:""})},u.withTextFontShape=function(f){return this.extend({fontShape:f,font:""})},u.sizingClasses=function(f){return f.size!==this.size?["sizing","reset-size"+f.size,"size"+this.size]:[]},u.baseSizingClasses=function(){return this.size!==H.BASESIZE?["sizing","reset-size"+this.size,"size"+H.BASESIZE]:[]},u.fontMetrics=function(){return this._fontMetrics||(this._fontMetrics=Ze(this.size)),this._fontMetrics},u.getColor=function(){return this.phantom?"transparent":this.color},H}();_r.BASESIZE=6;var On=_r,Gr={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},hr={ex:!0,em:!0,mu:!0},st=function(u){return typeof u!="string"&&(u=u.unit),u in Gr||u in hr||u==="ex"},at=function(u,d){var f;if(u.unit in Gr)f=Gr[u.unit]/d.fontMetrics().ptPerEm/d.sizeMultiplier;else if(u.unit==="mu")f=d.fontMetrics().cssEmPerMu;else{var g;if(d.style.isTight()?g=d.havingStyle(d.style.text()):g=d,u.unit==="ex")f=g.fontMetrics().xHeight;else if(u.unit==="em")f=g.fontMetrics().quad;else throw new m("Invalid unit: '"+u.unit+"'");g!==d&&(f*=g.sizeMultiplier/d.sizeMultiplier)}return Math.min(u.number*f,d.maxSize)},bt=["\\imath","\u0131","\\jmath","\u0237","\\pounds","\\mathsterling","\\textsterling","\xA3"],Dt=function(u,d,f){return gt[f][u]&>[f][u].replace&&(u=gt[f][u].replace),{value:u,metrics:De(u,d,f)}},vt=function(u,d,f,g,C){var z=Dt(u,d,f),ge=z.metrics;u=z.value;var Te;if(ge){var Ne=ge.italic;(f==="text"||g&&g.font==="mathit")&&(Ne=0),Te=new le(u,ge.height,ge.depth,Ne,ge.skew,ge.width,C)}else typeof console!="undefined"&&console.warn("No character metrics "+("for '"+u+"' in style '"+d+"' and mode '"+f+"'")),Te=new le(u,0,0,0,0,0,C);if(g){Te.maxFontSize=g.sizeMultiplier,g.style.isTight()&&Te.classes.push("mtight");var tt=g.getColor();tt&&(Te.style.color=tt)}return Te},Ut=function(u,d,f,g){return g===void 0&&(g=[]),f.font==="boldsymbol"&&Dt(u,"Main-Bold",d).metrics?vt(u,"Main-Bold",d,f,g.concat(["mathbf"])):u==="\\"||gt[d][u].font==="main"?vt(u,"Main-Regular",d,f,g):vt(u,"AMS-Regular",d,f,g.concat(["amsrm"]))},wt=function(u,d,f,g){return/[0-9]/.test(u.charAt(0))||B.contains(bt,u)?{fontName:"Main-Italic",fontClass:"mathit"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},Zt=function(u,d,f,g){return B.contains(bt,u)?{fontName:"Main-Italic",fontClass:"mathit"}:/[0-9]/.test(u.charAt(0))?{fontName:"Caligraphic-Regular",fontClass:"mathcal"}:{fontName:"Math-Italic",fontClass:"mathdefault"}},tr=function(u,d,f,g){return Dt(u,"Math-BoldItalic",d).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},Qt=function(u,d,f){var g=u.mode,C=u.text,z=["mord"],ge=g==="math"||g==="text"&&d.font,Te=ge?d.font:d.fontFamily;if(C.charCodeAt(0)===55349){var Ne=qt(C,g),tt=Ne[0],ft=Ne[1];return vt(C,tt,g,d,z.concat(ft))}else if(Te){var Et,Mt;if(Te==="boldsymbol"||Te==="mathnormal"){var Ft=Te==="boldsymbol"?tr(C,g,d,z):Zt(C,g,d,z);Et=Ft.fontName,Mt=[Ft.fontClass]}else B.contains(bt,C)?(Et="Main-Italic",Mt=["mathit"]):ge?(Et=pn[Te].fontName,Mt=[Te]):(Et=Wr(Te,d.fontWeight,d.fontShape),Mt=[Te,d.fontWeight,d.fontShape]);if(Dt(C,Et,g).metrics)return vt(C,Et,g,d,z.concat(Mt));if(Ot.hasOwnProperty(C)&&Et.substr(0,10)==="Typewriter"){for(var je=[],dr=0;dr<C.length;dr++)je.push(vt(C[dr],Et,g,d,z.concat(Mt)));return rn(je)}}if(f==="mathord"){var Rr=wt(C,g,d,z);return vt(C,Rr.fontName,g,d,z.concat([Rr.fontClass]))}else if(f==="textord"){var $r=gt[g][C]&>[g][C].font;if($r==="ams"){var Br=Wr("amsrm",d.fontWeight,d.fontShape);return vt(C,Br,g,d,z.concat("amsrm",d.fontWeight,d.fontShape))}else if($r==="main"||!$r){var Dn=Wr("textrm",d.fontWeight,d.fontShape);return vt(C,Dn,g,d,z.concat(d.fontWeight,d.fontShape))}else{var xn=Wr($r,d.fontWeight,d.fontShape);return vt(C,xn,g,d,z.concat(xn,d.fontWeight,d.fontShape))}}else throw new Error("unexpected type: "+f+" in makeOrd")},Tr=function(u,d){if(Pt(u.classes)!==Pt(d.classes)||u.skew!==d.skew||u.maxFontSize!==d.maxFontSize)return!1;for(var f in u.style)if(u.style.hasOwnProperty(f)&&u.style[f]!==d.style[f])return!1;for(var g in d.style)if(d.style.hasOwnProperty(g)&&u.style[g]!==d.style[g])return!1;return!0},gr=function(u){for(var d=0;d<u.length-1;d++){var f=u[d],g=u[d+1];f instanceof le&&g instanceof le&&Tr(f,g)&&(f.text+=g.text,f.height=Math.max(f.height,g.height),f.depth=Math.max(f.depth,g.depth),f.italic=g.italic,u.splice(d+1,1),d--)}return u},Fr=function(u){for(var d=0,f=0,g=0,C=0;C<u.children.length;C++){var z=u.children[C];z.height>d&&(d=z.height),z.depth>f&&(f=z.depth),z.maxFontSize>g&&(g=z.maxFontSize)}u.height=d,u.depth=f,u.maxFontSize=g},nr=function(u,d,f,g){var C=new se(u,d,f,g);return Fr(C),C},lr=function(u,d,f,g){return new se(u,d,f,g)},Zr=function(u,d,f){var g=nr([u],[],d);return g.height=Math.max(f||d.fontMetrics().defaultRuleThickness,d.minRuleThickness),g.style.borderBottomWidth=g.height+"em",g.maxFontSize=1,g},qr=function(u,d,f,g){var C=new Me(u,d,f,g);return Fr(C),C},rn=function(u){var d=new At(u);return Fr(d),d},Yr=function(u,d){return u instanceof At?nr([],[u],d):u},kr=function(u){if(u.positionType==="individualShift"){for(var d=u.children,f=[d[0]],g=-d[0].shift-d[0].elem.depth,C=g,z=1;z<d.length;z++){var ge=-d[z].shift-C-d[z].elem.depth,Te=ge-(d[z-1].elem.height+d[z-1].elem.depth);C=C+ge,f.push({type:"kern",size:Te}),f.push(d[z])}return{children:f,depth:g}}var Ne;if(u.positionType==="top"){for(var tt=u.positionData,ft=0;ft<u.children.length;ft++){var Et=u.children[ft];tt-=Et.type==="kern"?Et.size:Et.elem.height+Et.elem.depth}Ne=tt}else if(u.positionType==="bottom")Ne=-u.positionData;else{var Mt=u.children[0];if(Mt.type!=="elem")throw new Error('First child must have type "elem".');if(u.positionType==="shift")Ne=-Mt.elem.depth-u.positionData;else if(u.positionType==="firstBaseline")Ne=-Mt.elem.depth;else throw new Error("Invalid positionType "+u.positionType+".")}return{children:u.children,depth:Ne}},Mr=function(u,d){for(var f=kr(u),g=f.children,C=f.depth,z=0,ge=0;ge<g.length;ge++){var Te=g[ge];if(Te.type==="elem"){var Ne=Te.elem;z=Math.max(z,Ne.maxFontSize,Ne.height)}}z+=2;var tt=nr(["pstrut"],[]);tt.style.height=z+"em";for(var ft=[],Et=C,Mt=C,Ft=C,je=0;je<g.length;je++){var dr=g[je];if(dr.type==="kern")Ft+=dr.size;else{var Rr=dr.elem,$r=dr.wrapperClasses||[],Br=dr.wrapperStyle||{},Dn=nr($r,[tt,Rr],void 0,Br);Dn.style.top=-z-Ft-Rr.depth+"em",dr.marginLeft&&(Dn.style.marginLeft=dr.marginLeft),dr.marginRight&&(Dn.style.marginRight=dr.marginRight),ft.push(Dn),Ft+=Rr.height+Rr.depth}Et=Math.min(Et,Ft),Mt=Math.max(Mt,Ft)}var xn=nr(["vlist"],ft);xn.style.height=Mt+"em";var Bn;if(Et<0){var Nn=nr([],[]),Gn=nr(["vlist"],[Nn]);Gn.style.height=-Et+"em";var Kn=nr(["vlist-s"],[new le("\u200B")]);Bn=[nr(["vlist-r"],[xn,Kn]),nr(["vlist-r"],[Gn])]}else Bn=[nr(["vlist-r"],[xn])];var Yn=nr(["vlist-t"],Bn);return Bn.length===2&&Yn.classes.push("vlist-t2"),Yn.height=Mt,Yn.depth=-Et,Yn},Or=function(u,d){var f=nr(["mspace"],[],d),g=at(u,d);return f.style.marginRight=g+"em",f},Wr=function(u,d,f){var g="";switch(u){case"amsrm":g="AMS";break;case"textrm":g="Main";break;case"textsf":g="SansSerif";break;case"texttt":g="Typewriter";break;default:g=u}var C;return d==="textbf"&&f==="textit"?C="BoldItalic":d==="textbf"?C="Bold":d==="textit"?C="Italic":C="Regular",g+"-"+C},pn={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"}},Qr={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(u,d){var f=Qr[u],g=f[0],C=f[1],z=f[2],ge=new we(g),Te=new xe([ge],{width:C+"em",height:z+"em",style:"width:"+C+"em",viewBox:"0 0 "+1e3*C+" "+1e3*z,preserveAspectRatio:"xMinYMin"}),Ne=lr(["overlay"],[Te],d);return Ne.height=z,Ne.style.height=z+"em",Ne.style.width=C+"em",Ne},Xe={fontMap:pn,makeSymbol:vt,mathsym:Ut,makeSpan:nr,makeSvgSpan:lr,makeLineSpan:Zr,makeAnchor:qr,makeFragment:rn,wrapFragment:Yr,makeVList:Mr,makeOrd:Qt,makeGlue:Or,staticSvg:ir,svgData:Qr,tryCombineChars:gr};function Wt(H,u){var d=Jt(H,u);if(!d)throw new Error("Expected node of type "+u+", but got "+(H?"node of type "+H.type:String(H)));return d}function Jt(H,u){return H&&H.type===u?H:null}function yr(H,u){var d=Sn(H,u);if(!d)throw new Error('Expected node of type "atom" and family "'+u+'", but got '+(H?H.type==="atom"?"atom of family "+H.family:"node of type "+H.type:String(H)));return d}function Sn(H,u){return H&&H.type==="atom"&&H.family===u?H:null}function vn(H){var u=In(H);if(!u)throw new Error("Expected node of symbol group type, but got "+(H?"node of type "+H.type:String(H)));return u}function In(H){return H&&(H.type==="atom"||nt.hasOwnProperty(H.type))?H:null}var Sr={number:3,unit:"mu"},wn={number:4,unit:"mu"},Rn={number:5,unit:"mu"},hn={mord:{mop:Sr,mbin:wn,mrel:Rn,minner:Sr},mop:{mord:Sr,mop:Sr,mrel:Rn,minner:Sr},mbin:{mord:wn,mop:wn,mopen:wn,minner:wn},mrel:{mord:Rn,mop:Rn,mopen:Rn,minner:Rn},mopen:{},mclose:{mop:Sr,mbin:wn,mrel:Rn,minner:Sr},mpunct:{mord:Sr,mop:Sr,mrel:Rn,mopen:Sr,mclose:Sr,mpunct:Sr,minner:Sr},minner:{mord:Sr,mop:Sr,mbin:wn,mrel:Rn,mopen:Sr,mpunct:Sr,minner:Sr}},ai={mord:{mop:Sr},mop:{mord:Sr,mop:Sr},mbin:{},mrel:{},mopen:{},mclose:{mop:Sr},mpunct:{},minner:{mop:Sr}},oi={},qn={},Vn={};function rr(H){for(var u=H.type,d=H.names,f=H.props,g=H.handler,C=H.htmlBuilder,z=H.mathmlBuilder,ge={type:u,numArgs:f.numArgs,argTypes:f.argTypes,greediness:f.greediness===void 0?1:f.greediness,allowedInText:!!f.allowedInText,allowedInMath:f.allowedInMath===void 0?!0:f.allowedInMath,numOptionalArgs:f.numOptionalArgs||0,infix:!!f.infix,handler:g},Te=0;Te<d.length;++Te)oi[d[Te]]=ge;u&&(C&&(qn[u]=C),z&&(Vn[u]=z))}function Tn(H){var u=H.type,d=H.htmlBuilder,f=H.mathmlBuilder;rr({type:u,names:[],props:{numArgs:0},handler:function(){throw new Error("Should never be called.")},htmlBuilder:d,mathmlBuilder:f})}var nn=function(u){var d=Jt(u,"ordgroup");return d?d.body:[u]},Pn=Xe.makeSpan,li=["leftmost","mbin","mopen","mrel","mop","mpunct"],Mn=["rightmost","mrel","mclose","mpunct"],_n={display:v.DISPLAY,text:v.TEXT,script:v.SCRIPT,scriptscript:v.SCRIPTSCRIPT},Un={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},sn=function(u,d,f,g){g===void 0&&(g=[null,null]);for(var C=[],z=0;z<u.length;z++){var ge=Hr(u[z],d);if(ge instanceof At){var Te=ge.children;C.push.apply(C,Te)}else C.push(ge)}if(!f)return C;var Ne=d;if(u.length===1){var tt=Jt(u[0],"sizing")||Jt(u[0],"styling");tt&&(tt.type==="sizing"?Ne=d.havingSize(tt.size):tt.type==="styling"&&(Ne=d.havingStyle(_n[tt.style])))}var ft=Pn([g[0]||"leftmost"],[],d),Et=Pn([g[1]||"rightmost"],[],d);return ni(C,function(Mt,Ft){var je=Ft.classes[0],dr=Mt.classes[0];je==="mbin"&&B.contains(Mn,dr)?Ft.classes[0]="mord":dr==="mbin"&&B.contains(li,je)&&(Mt.classes[0]="mord")},{node:ft},Et),ni(C,function(Mt,Ft){var je=ri(Ft),dr=ri(Mt),Rr=je&&dr?Mt.hasClass("mtight")?ai[je][dr]:hn[je][dr]:null;if(Rr)return Xe.makeGlue(Rr,Ne)},{node:ft},Et),C},ni=function H(u,d,f,g){g&&u.push(g);for(var C=0;C<u.length;C++){var z=u[C],ge=pr(z);if(ge){H(ge.children,d,f);continue}if(z.classes[0]!=="mspace"){var Te=d(z,f.node);Te&&(f.insertAfter?f.insertAfter(Te):(u.unshift(Te),C++)),f.node=z,f.insertAfter=function(Ne){return function(tt){u.splice(Ne+1,0,tt),C++}}(C)}}g&&u.pop()},pr=function(u){return u instanceof At||u instanceof Me?u:null},ii=function H(u,d){var f=pr(u);if(f){var g=f.children;if(g.length){if(d==="right")return H(g[g.length-1],"right");if(d==="left")return H(g[0],"left")}}return u},ri=function(u,d){return u?(d&&(u=ii(u,d)),Un[u.classes[0]]||null):null},Zn=function(u,d){var f=["nulldelimiter"].concat(u.baseSizingClasses());return Pn(d.concat(f))},Hr=function(u,d,f){if(!u)return Pn();if(qn[u.type]){var g=qn[u.type](u,d);if(f&&d.size!==f.size){g=Pn(d.sizingClasses(f),[g],d);var C=d.sizeMultiplier/f.sizeMultiplier;g.height*=C,g.depth*=C}return g}else throw new m("Got group of unknown type: '"+u.type+"'")};function ui(H,u){var d=Pn(["base"],H,u),f=Pn(["strut"]);return f.style.height=d.height+d.depth+"em",f.style.verticalAlign=-d.depth+"em",d.children.unshift(f),d}function Ti(H,u){var d=null;H.length===1&&H[0].type==="tag"&&(d=H[0].tag,H=H[0].body);for(var f=sn(H,u,!0),g=[],C=[],z=0;z<f.length;z++)if(C.push(f[z]),f[z].hasClass("mbin")||f[z].hasClass("mrel")||f[z].hasClass("allowbreak")){for(var ge=!1;z<f.length-1&&f[z+1].hasClass("mspace")&&!f[z+1].hasClass("newline");)z++,C.push(f[z]),f[z].hasClass("nobreak")&&(ge=!0);ge||(g.push(ui(C,u)),C=[])}else f[z].hasClass("newline")&&(C.pop(),C.length>0&&(g.push(ui(C,u)),C=[]),g.push(f[z]));C.length>0&&g.push(ui(C,u));var Te;d&&(Te=ui(sn(d,u,!0)),Te.classes=["tag"],g.push(Te));var Ne=Pn(["katex-html"],g);if(Ne.setAttribute("aria-hidden","true"),Te){var tt=Te.children[0];tt.style.height=Ne.height+Ne.depth+"em",tt.style.verticalAlign=-Ne.depth+"em"}return Ne}function vi(H){return new At(H)}var Ar=function(){function H(d,f){this.type=void 0,this.attributes=void 0,this.children=void 0,this.type=d,this.attributes={},this.children=f||[]}var u=H.prototype;return u.setAttribute=function(f,g){this.attributes[f]=g},u.getAttribute=function(f){return this.attributes[f]},u.toNode=function(){var f=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var g in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,g)&&f.setAttribute(g,this.attributes[g]);for(var C=0;C<this.children.length;C++)f.appendChild(this.children[C].toNode());return f},u.toMarkup=function(){var f="<"+this.type;for(var g in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,g)&&(f+=" "+g+'="',f+=B.escape(this.attributes[g]),f+='"');f+=">";for(var C=0;C<this.children.length;C++)f+=this.children[C].toMarkup();return f+="</"+this.type+">",f},u.toText=function(){return this.children.map(function(f){return f.toText()}).join("")},H}(),_i=function(){function H(d){this.text=void 0,this.text=d}var u=H.prototype;return u.toNode=function(){return document.createTextNode(this.text)},u.toMarkup=function(){return B.escape(this.toText())},u.toText=function(){return this.text},H}(),Ri=function(){function H(d){this.width=void 0,this.character=void 0,this.width=d,d>=.05555&&d<=.05556?this.character="\u200A":d>=.1666&&d<=.1667?this.character="\u2009":d>=.2222&&d<=.2223?this.character="\u2005":d>=.2777&&d<=.2778?this.character="\u2005\u200A":d>=-.05556&&d<=-.05555?this.character="\u200A\u2063":d>=-.1667&&d<=-.1666?this.character="\u2009\u2063":d>=-.2223&&d<=-.2222?this.character="\u205F\u2063":d>=-.2778&&d<=-.2777?this.character="\u2005\u2063":this.character=null}var u=H.prototype;return u.toNode=function(){if(this.character)return document.createTextNode(this.character);var f=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace");return f.setAttribute("width",this.width+"em"),f},u.toMarkup=function(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+this.width+'em"/>'},u.toText=function(){return this.character?this.character:" "},H}(),Gt={MathNode:Ar,TextNode:_i,SpaceNode:Ri,newDocumentFragment:vi},Hn=function(u,d,f){return gt[d][u]&>[d][u].replace&&u.charCodeAt(0)!==55349&&!(Ot.hasOwnProperty(u)&&f&&(f.fontFamily&&f.fontFamily.substr(4,2)==="tt"||f.font&&f.font.substr(4,2)==="tt"))&&(u=gt[d][u].replace),new Gt.TextNode(u)},ci=function(u){return u.length===1?u[0]:new Gt.MathNode("mrow",u)},hi=function(u,d){if(d.fontFamily==="texttt")return"monospace";if(d.fontFamily==="textsf")return d.fontShape==="textit"&&d.fontWeight==="textbf"?"sans-serif-bold-italic":d.fontShape==="textit"?"sans-serif-italic":d.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(d.fontShape==="textit"&&d.fontWeight==="textbf")return"bold-italic";if(d.fontShape==="textit")return"italic";if(d.fontWeight==="textbf")return"bold";var f=d.font;if(!f||f==="mathnormal")return null;var g=u.mode;if(f==="mathit")return"italic";if(f==="boldsymbol")return"bold-italic";if(f==="mathbf")return"bold";if(f==="mathbb")return"double-struck";if(f==="mathfrak")return"fraktur";if(f==="mathscr"||f==="mathcal")return"script";if(f==="mathsf")return"sans-serif";if(f==="mathtt")return"monospace";var C=u.text;if(B.contains(["\\imath","\\jmath"],C))return null;gt[g][C]&>[g][C].replace&&(C=gt[g][C].replace);var z=Xe.fontMap[f].fontName;return De(C,z,g)?Xe.fontMap[f].variant:null},An=function(u,d,f){if(u.length===1){var g=Xr(u[0],d);return f&&g instanceof Ar&&g.type==="mo"&&(g.setAttribute("lspace","0em"),g.setAttribute("rspace","0em")),[g]}for(var C=[],z,ge=0;ge<u.length;ge++){var Te=Xr(u[ge],d);if(Te instanceof Ar&&z instanceof Ar){if(Te.type==="mtext"&&z.type==="mtext"&&Te.getAttribute("mathvariant")===z.getAttribute("mathvariant")){var Ne;(Ne=z.children).push.apply(Ne,Te.children);continue}else if(Te.type==="mn"&&z.type==="mn"){var tt;(tt=z.children).push.apply(tt,Te.children);continue}else if(Te.type==="mi"&&Te.children.length===1&&z.type==="mn"){var ft=Te.children[0];if(ft instanceof _i&&ft.text==="."){var Et;(Et=z.children).push.apply(Et,Te.children);continue}}else if(z.type==="mi"&&z.children.length===1){var Mt=z.children[0];if(Mt instanceof _i&&Mt.text==="\u0338"&&(Te.type==="mo"||Te.type==="mi"||Te.type==="mn")){var Ft=Te.children[0];Ft instanceof _i&&Ft.text.length>0&&(Ft.text=Ft.text.slice(0,1)+"\u0338"+Ft.text.slice(1),C.pop())}}}C.push(Te),z=Te}return C},yn=function(u,d,f){return ci(An(u,d,f))},Xr=function(u,d){if(!u)return new Gt.MathNode("mrow");if(Vn[u.type]){var f=Vn[u.type](u,d);return f}else throw new m("Got group of unknown type: '"+u.type+"'")};function Cn(H,u,d,f){var g=An(H,d),C;g.length===1&&g[0]instanceof Ar&&B.contains(["mrow","mtable"],g[0].type)?C=g[0]:C=new Gt.MathNode("mrow",g);var z=new Gt.MathNode("annotation",[new Gt.TextNode(u)]);z.setAttribute("encoding","application/x-tex");var ge=new Gt.MathNode("semantics",[C,z]),Te=new Gt.MathNode("math",[ge]);Te.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML");var Ne=f?"katex":"katex-mathml";return Xe.makeSpan([Ne],[Te])}var Jn=function(u){return new On({style:u.displayMode?v.DISPLAY:v.TEXT,maxSize:u.maxSize,minRuleThickness:u.minRuleThickness})},ei=function(u,d){if(d.displayMode){var f=["katex-display"];d.leqno&&f.push("leqno"),d.fleqn&&f.push("fleqn"),u=Xe.makeSpan(f,[u])}return u},Wn=function(u,d,f){var g=Jn(f),C;if(f.output==="mathml")return Cn(u,d,g,!0);if(f.output==="html"){var z=Ti(u,g);C=Xe.makeSpan(["katex"],[z])}else{var ge=Cn(u,d,g,!1),Te=Ti(u,g);C=Xe.makeSpan(["katex"],[ge,Te])}return ei(C,f)},$n=function(u,d,f){var g=Jn(f),C=Ti(u,g),z=Xe.makeSpan(["katex"],[C]);return ei(z,f)},Jr=Wn,jn={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"},Li=function(u){var d=new Gt.MathNode("mo",[new Gt.TextNode(jn[u.substr(1)])]);return d.setAttribute("stretchy","true"),d},Oi={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]},Pi=function(u){return u.type==="ordgroup"?u.body.length:1},Ai=function(u,d){function f(){var Te=4e5,Ne=u.label.substr(1);if(B.contains(["widehat","widecheck","widetilde","utilde"],Ne)){var tt=u,ft=Pi(tt.base),Et,Mt,Ft;if(ft>5)Ne==="widehat"||Ne==="widecheck"?(Et=420,Te=2364,Ft=.42,Mt=Ne+"4"):(Et=312,Te=2340,Ft=.34,Mt="tilde4");else{var je=[1,1,2,2,3,3][ft];Ne==="widehat"||Ne==="widecheck"?(Te=[0,1062,2364,2364,2364][je],Et=[0,239,300,360,420][je],Ft=[0,.24,.3,.3,.36,.42][je],Mt=Ne+je):(Te=[0,600,1033,2339,2340][je],Et=[0,260,286,306,312][je],Ft=[0,.26,.286,.3,.306,.34][je],Mt="tilde"+je)}var dr=new we(Mt),Rr=new xe([dr],{width:"100%",height:Ft+"em",viewBox:"0 0 "+Te+" "+Et,preserveAspectRatio:"none"});return{span:Xe.makeSvgSpan([],[Rr],d),minWidth:0,height:Ft}}else{var $r=[],Br=Oi[Ne],Dn=Br[0],xn=Br[1],Bn=Br[2],Nn=Bn/1e3,Gn=Dn.length,Kn,Yn;if(Gn===1){var gn=Br[3];Kn=["hide-tail"],Yn=[gn]}else if(Gn===2)Kn=["halfarrow-left","halfarrow-right"],Yn=["xMinYMin","xMaxYMin"];else if(Gn===3)Kn=["brace-left","brace-center","brace-right"],Yn=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support
|
|
`+Gn+" children.");for(var si=0;si<Gn;si++){var Xn=new we(Dn[si]),ki=new xe([Xn],{width:"400em",height:Nn+"em",viewBox:"0 0 "+Te+" "+Bn,preserveAspectRatio:Yn[si]+" slice"}),ti=Xe.makeSvgSpan([Kn[si]],[ki],d);if(Gn===1)return{span:ti,minWidth:xn,height:Nn};ti.style.height=Nn+"em",$r.push(ti)}return{span:Xe.makeSpan(["stretchy"],$r,d),minWidth:xn,height:Nn}}}var g=f(),C=g.span,z=g.minWidth,ge=g.height;return C.height=ge,C.style.height=ge+"em",z>0&&(C.style.minWidth=z+"em"),C},ar=function(u,d,f,g){var C,z=u.height+u.depth+2*f;if(/fbox|color/.test(d)){if(C=Xe.makeSpan(["stretchy",d],[],g),d==="fbox"){var ge=g.color&&g.getColor();ge&&(C.style.borderColor=ge)}}else{var Te=[];/^[bx]cancel$/.test(d)&&Te.push(new Ie({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(d)&&Te.push(new Ie({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var Ne=new xe(Te,{width:"100%",height:z+"em"});C=Xe.makeSvgSpan([],[Ne],g)}return C.height=z,C.style.height=z+"em",C},fr={encloseSpan:ar,mathMLnode:Li,svgSpan:Ai},bn=function(u,d){var f,g,C=Jt(u,"supsub"),z;C?(g=Wt(C.base,"accent"),f=g.base,C.base=f,z=Qe(Hr(C,d)),C.base=g):(g=Wt(u,"accent"),f=g.base);var ge=Hr(f,d.havingCrampedStyle()),Te=g.isShifty&&B.isCharacterBox(f),Ne=0;if(Te){var tt=B.getBaseElem(f),ft=Hr(tt,d.havingCrampedStyle());Ne=Oe(ft).skew}var Et=Math.min(ge.height,d.fontMetrics().xHeight),Mt;if(g.isStretchy)Mt=fr.svgSpan(g,d),Mt=Xe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:ge},{type:"elem",elem:Mt,wrapperClasses:["svg-align"],wrapperStyle:Ne>0?{width:"calc(100% - "+2*Ne+"em)",marginLeft:2*Ne+"em"}:void 0}]},d);else{var Ft,je;g.label==="\\vec"?(Ft=Xe.staticSvg("vec",d),je=Xe.svgData.vec[1]):(Ft=Xe.makeOrd({mode:g.mode,text:g.label},d,"textord"),Ft=Oe(Ft),Ft.italic=0,je=Ft.width),Mt=Xe.makeSpan(["accent-body"],[Ft]);var dr=g.label==="\\textcircled";dr&&(Mt.classes.push("accent-full"),Et=ge.height);var Rr=Ne;dr||(Rr-=je/2),Mt.style.left=Rr+"em",g.label==="\\textcircled"&&(Mt.style.top=".2em"),Mt=Xe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:ge},{type:"kern",size:-Et},{type:"elem",elem:Mt}]},d)}var $r=Xe.makeSpan(["mord","accent"],[Mt],d);return z?(z.children[0]=$r,z.height=Math.max($r.height,z.height),z.classes[0]="mord",z):$r},Ln=function(u,d){var f=u.isStretchy?fr.mathMLnode(u.label):new Gt.MathNode("mo",[Hn(u.label,u.mode)]),g=new Gt.MathNode("mover",[Xr(u.base,d),f]);return g.setAttribute("accent","true"),g},an=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(function(H){return"\\"+H}).join("|"));rr({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(u,d){var f=d[0],g=!an.test(u.funcName),C=!g||u.funcName==="\\widehat"||u.funcName==="\\widetilde"||u.funcName==="\\widecheck";return{type:"accent",mode:u.parser.mode,label:u.funcName,isStretchy:g,isShifty:C,base:f}},htmlBuilder:bn,mathmlBuilder:Ln}),rr({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!1},handler:function(u,d){var f=d[0];return{type:"accent",mode:u.parser.mode,label:u.funcName,isStretchy:!1,isShifty:!0,base:f}},htmlBuilder:bn,mathmlBuilder:Ln}),rr({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:function(u,d){var f=u.parser,g=u.funcName,C=d[0];return{type:"accentUnder",mode:f.mode,label:g,base:C}},htmlBuilder:function(u,d){var f=Hr(u.base,d),g=fr.svgSpan(u,d),C=u.label==="\\utilde"?.12:0,z=Xe.makeVList({positionType:"bottom",positionData:g.height+C,children:[{type:"elem",elem:g,wrapperClasses:["svg-align"]},{type:"kern",size:C},{type:"elem",elem:f}]},d);return Xe.makeSpan(["mord","accentunder"],[z],d)},mathmlBuilder:function(u,d){var f=fr.mathMLnode(u.label),g=new Gt.MathNode("munder",[Xr(u.base,d),f]);return g.setAttribute("accentunder","true"),g}});var di=function(u){var d=new Gt.MathNode("mpadded",u?[u]:[]);return d.setAttribute("width","+0.6em"),d.setAttribute("lspace","0.3em"),d};rr({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(u,d,f){var g=u.parser,C=u.funcName;return{type:"xArrow",mode:g.mode,label:C,body:d[0],below:f[0]}},htmlBuilder:function(u,d){var f=d.style,g=d.havingStyle(f.sup()),C=Xe.wrapFragment(Hr(u.body,g,d),d);C.classes.push("x-arrow-pad");var z;u.below&&(g=d.havingStyle(f.sub()),z=Xe.wrapFragment(Hr(u.below,g,d),d),z.classes.push("x-arrow-pad"));var ge=fr.svgSpan(u,d),Te=-d.fontMetrics().axisHeight+.5*ge.height,Ne=-d.fontMetrics().axisHeight-.5*ge.height-.111;(C.depth>.25||u.label==="\\xleftequilibrium")&&(Ne-=C.depth);var tt;if(z){var ft=-d.fontMetrics().axisHeight+z.height+.5*ge.height+.111;tt=Xe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:C,shift:Ne},{type:"elem",elem:ge,shift:Te},{type:"elem",elem:z,shift:ft}]},d)}else tt=Xe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:C,shift:Ne},{type:"elem",elem:ge,shift:Te}]},d);return tt.children[0].children[0].children[1].classes.push("svg-align"),Xe.makeSpan(["mrel","x-arrow"],[tt],d)},mathmlBuilder:function(u,d){var f=fr.mathMLnode(u.label),g;if(u.body){var C=di(Xr(u.body,d));if(u.below){var z=di(Xr(u.below,d));g=new Gt.MathNode("munderover",[f,z,C])}else g=new Gt.MathNode("mover",[f,C])}else if(u.below){var ge=di(Xr(u.below,d));g=new Gt.MathNode("munder",[f,ge])}else g=di(),g=new Gt.MathNode("mover",[f,g]);return g}}),rr({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler:function(u,d){for(var f=u.parser,g=Wt(d[0],"ordgroup"),C=g.body,z="",ge=0;ge<C.length;ge++){var Te=Wt(C[ge],"textord");z+=Te.text}var Ne=parseInt(z);if(isNaN(Ne))throw new m("\\@char has non-numeric argument "+z);return{type:"textord",mode:f.mode,text:String.fromCharCode(Ne)}}});var Ci=function(u,d){var f=sn(u.body,d.withColor(u.color),!1);return Xe.makeFragment(f)},ji=function(u,d){var f=An(u.body,d.withColor(u.color)),g=new Gt.MathNode("mstyle",f);return g.setAttribute("mathcolor",u.color),g};rr({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","original"]},handler:function(u,d){var f=u.parser,g=Wt(d[0],"color-token").color,C=d[1];return{type:"color",mode:f.mode,color:g,body:nn(C)}},htmlBuilder:Ci,mathmlBuilder:ji}),rr({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,greediness:3,argTypes:["color"]},handler:function(u,d){var f=u.parser,g=u.breakOnTokenText,C=Wt(d[0],"color-token").color;f.gullet.macros.set("\\current@color",C);var z=f.parseExpression(!0,g);return{type:"color",mode:f.mode,color:C,body:z}},htmlBuilder:Ci,mathmlBuilder:ji}),rr({type:"cr",names:["\\cr","\\newline"],props:{numArgs:0,numOptionalArgs:1,argTypes:["size"],allowedInText:!0},handler:function(u,d,f){var g=u.parser,C=u.funcName,z=f[0],ge=C==="\\cr",Te=!1;return ge||(g.settings.displayMode&&g.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode")?Te=!1:Te=!0),{type:"cr",mode:g.mode,newLine:Te,newRow:ge,size:z&&Wt(z,"size").value}},htmlBuilder:function(u,d){if(u.newRow)throw new m("\\cr valid only within a tabular/array environment");var f=Xe.makeSpan(["mspace"],[],d);return u.newLine&&(f.classes.push("newline"),u.size&&(f.style.marginTop=at(u.size,d)+"em")),f},mathmlBuilder:function(u,d){var f=new Gt.MathNode("mspace");return u.newLine&&(f.setAttribute("linebreak","newline"),u.size&&f.setAttribute("height",at(u.size,d)+"em")),f}});var yi=function(u,d,f){var g=gt.math[u]&>.math[u].replace,C=De(g||u,d,f);if(!C)throw new Error("Unsupported symbol "+u+" and font size "+d+".");return C},ss=function(u,d,f,g){var C=f.havingBaseStyle(d),z=Xe.makeSpan(g.concat(C.sizingClasses(f)),[u],f),ge=C.sizeMultiplier/f.sizeMultiplier;return z.height*=ge,z.depth*=ge,z.maxFontSize=C.sizeMultiplier,z},Gs=function(u,d,f){var g=d.havingBaseStyle(f),C=(1-d.sizeMultiplier/g.sizeMultiplier)*d.fontMetrics().axisHeight;u.classes.push("delimcenter"),u.style.top=C+"em",u.height-=C,u.depth+=C},as=function(u,d,f,g,C,z){var ge=Xe.makeSymbol(u,"Main-Regular",C,g),Te=ss(ge,d,g,z);return f&&Gs(Te,g,d),Te},os=function(u,d,f,g){return Xe.makeSymbol(u,"Size"+d+"-Regular",f,g)},bi=function(u,d,f,g,C,z){var ge=os(u,d,C,g),Te=ss(Xe.makeSpan(["delimsizing","size"+d],[ge],g),v.TEXT,g,z);return f&&Gs(Te,g,v.TEXT),Te},xi=function(u,d,f){var g;d==="Size1-Regular"?g="delim-size1":g="delim-size4";var C=Xe.makeSpan(["delimsizinginner",g],[Xe.makeSpan([],[Xe.makeSymbol(u,d,f)])]);return{type:"elem",elem:C}},Ei={type:"kern",size:-.005},ls=function(u,d,f,g,C,z){var ge,Te,Ne,tt;ge=Ne=tt=u,Te=null;var ft="Size1-Regular";u==="\\uparrow"?Ne=tt="\u23D0":u==="\\Uparrow"?Ne=tt="\u2016":u==="\\downarrow"?ge=Ne="\u23D0":u==="\\Downarrow"?ge=Ne="\u2016":u==="\\updownarrow"?(ge="\\uparrow",Ne="\u23D0",tt="\\downarrow"):u==="\\Updownarrow"?(ge="\\Uparrow",Ne="\u2016",tt="\\Downarrow"):u==="["||u==="\\lbrack"?(ge="\u23A1",Ne="\u23A2",tt="\u23A3",ft="Size4-Regular"):u==="]"||u==="\\rbrack"?(ge="\u23A4",Ne="\u23A5",tt="\u23A6",ft="Size4-Regular"):u==="\\lfloor"||u==="\u230A"?(Ne=ge="\u23A2",tt="\u23A3",ft="Size4-Regular"):u==="\\lceil"||u==="\u2308"?(ge="\u23A1",Ne=tt="\u23A2",ft="Size4-Regular"):u==="\\rfloor"||u==="\u230B"?(Ne=ge="\u23A5",tt="\u23A6",ft="Size4-Regular"):u==="\\rceil"||u==="\u2309"?(ge="\u23A4",Ne=tt="\u23A5",ft="Size4-Regular"):u==="("||u==="\\lparen"?(ge="\u239B",Ne="\u239C",tt="\u239D",ft="Size4-Regular"):u===")"||u==="\\rparen"?(ge="\u239E",Ne="\u239F",tt="\u23A0",ft="Size4-Regular"):u==="\\{"||u==="\\lbrace"?(ge="\u23A7",Te="\u23A8",tt="\u23A9",Ne="\u23AA",ft="Size4-Regular"):u==="\\}"||u==="\\rbrace"?(ge="\u23AB",Te="\u23AC",tt="\u23AD",Ne="\u23AA",ft="Size4-Regular"):u==="\\lgroup"||u==="\u27EE"?(ge="\u23A7",tt="\u23A9",Ne="\u23AA",ft="Size4-Regular"):u==="\\rgroup"||u==="\u27EF"?(ge="\u23AB",tt="\u23AD",Ne="\u23AA",ft="Size4-Regular"):u==="\\lmoustache"||u==="\u23B0"?(ge="\u23A7",tt="\u23AD",Ne="\u23AA",ft="Size4-Regular"):(u==="\\rmoustache"||u==="\u23B1")&&(ge="\u23AB",tt="\u23A9",Ne="\u23AA",ft="Size4-Regular");var Et=yi(ge,ft,C),Mt=Et.height+Et.depth,Ft=yi(Ne,ft,C),je=Ft.height+Ft.depth,dr=yi(tt,ft,C),Rr=dr.height+dr.depth,$r=0,Br=1;if(Te!==null){var Dn=yi(Te,ft,C);$r=Dn.height+Dn.depth,Br=2}var xn=Mt+Rr+$r,Bn=Math.max(0,Math.ceil((d-xn)/(Br*je))),Nn=xn+Bn*Br*je,Gn=g.fontMetrics().axisHeight;f&&(Gn*=g.sizeMultiplier);var Kn=Nn/2-Gn,Yn=(Bn+1)*.005-je,gn=[];if(gn.push(xi(tt,ft,C)),Te===null)for(var si=0;si<Bn;si++)gn.push(Ei),gn.push(xi(Ne,ft,C));else{for(var Xn=0;Xn<Bn;Xn++)gn.push(Ei),gn.push(xi(Ne,ft,C));gn.push({type:"kern",size:Yn}),gn.push(xi(Ne,ft,C)),gn.push(Ei),gn.push(xi(Te,ft,C));for(var ki=0;ki<Bn;ki++)gn.push(Ei),gn.push(xi(Ne,ft,C))}gn.push({type:"kern",size:Yn}),gn.push(xi(Ne,ft,C)),gn.push(Ei),gn.push(xi(ge,ft,C));var ti=g.havingBaseStyle(v.TEXT),$i=Xe.makeVList({positionType:"bottom",positionData:Kn,children:gn},ti);return ss(Xe.makeSpan(["delimsizing","mult"],[$i],ti),v.TEXT,g,z)},qi=80,us=.08,Qi=function(u,d,f,g,C){var z=Lt(u,g,f),ge=new we(u,z),Te=new xe([ge],{width:"400em",height:d+"em",viewBox:"0 0 400000 "+f,preserveAspectRatio:"xMinYMin slice"});return Xe.makeSvgSpan(["hide-tail"],[Te],C)},oa=function(u,d){var f=d.havingBaseSizing(),g=Ks("\\surd",u*f.sizeMultiplier,hs,f),C=f.sizeMultiplier,z=Math.max(0,d.minRuleThickness-d.fontMetrics().sqrtRuleThickness),ge,Te=0,Ne=0,tt=0,ft;return g.type==="small"?(tt=1e3+1e3*z+qi,u<1?C=1:u<1.4&&(C=.7),Te=(1+z+us)/C,Ne=(1+z)/C,ge=Qi("sqrtMain",Te,tt,z,d),ge.style.minWidth="0.853em",ft=.833/C):g.type==="large"?(tt=(1e3+qi)*fi[g.size],Ne=(fi[g.size]+z)/C,Te=(fi[g.size]+z+us)/C,ge=Qi("sqrtSize"+g.size,Te,tt,z,d),ge.style.minWidth="1.02em",ft=1/C):(Te=u+z+us,Ne=u+z,tt=Math.floor(1e3*u+z)+qi,ge=Qi("sqrtTall",Te,tt,z,d),ge.style.minWidth="0.742em",ft=1.056),ge.height=Ne,ge.style.height=Te+"em",{span:ge,advanceWidth:ft,ruleWidth:(d.fontMetrics().sqrtRuleThickness+z)*C}},Ji=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","\u230A","\u230B","\\lceil","\\rceil","\u2308","\u2309","\\surd"],Hs=["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","\u27EE","\u27EF","\\lmoustache","\\rmoustache","\u23B0","\u23B1"],Cs=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],fi=[0,1.2,1.8,2.4,3],js=function(u,d,f,g,C){if(u==="<"||u==="\\lt"||u==="\u27E8"?u="\\langle":(u===">"||u==="\\gt"||u==="\u27E9")&&(u="\\rangle"),B.contains(Ji,u)||B.contains(Cs,u))return bi(u,d,!1,f,g,C);if(B.contains(Hs,u))return ls(u,fi[d],!1,f,g,C);throw new m("Illegal delimiter: '"+u+"'")},cs=[{type:"small",style:v.SCRIPTSCRIPT},{type:"small",style:v.SCRIPT},{type:"small",style:v.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],Ki=[{type:"small",style:v.SCRIPTSCRIPT},{type:"small",style:v.SCRIPT},{type:"small",style:v.TEXT},{type:"stack"}],hs=[{type:"small",style:v.SCRIPTSCRIPT},{type:"small",style:v.SCRIPT},{type:"small",style:v.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],la=function(u){if(u.type==="small")return"Main-Regular";if(u.type==="large")return"Size"+u.size+"-Regular";if(u.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+u.type+"' here.")},Ks=function(u,d,f,g){for(var C=Math.min(2,3-g.style.size),z=C;z<f.length&&f[z].type!=="stack";z++){var ge=yi(u,la(f[z]),"math"),Te=ge.height+ge.depth;if(f[z].type==="small"){var Ne=g.havingBaseStyle(f[z].style);Te*=Ne.sizeMultiplier}if(Te>d)return f[z]}return f[f.length-1]},Ws=function(u,d,f,g,C,z){u==="<"||u==="\\lt"||u==="\u27E8"?u="\\langle":(u===">"||u==="\\gt"||u==="\u27E9")&&(u="\\rangle");var ge;B.contains(Cs,u)?ge=cs:B.contains(Ji,u)?ge=hs:ge=Ki;var Te=Ks(u,d,ge,g);return Te.type==="small"?as(u,Te.style,f,g,C,z):Te.type==="large"?bi(u,Te.size,f,g,C,z):ls(u,d,f,g,C,z)},Ds=function(u,d,f,g,C,z){var ge=g.fontMetrics().axisHeight*g.sizeMultiplier,Te=901,Ne=5/g.fontMetrics().ptPerEm,tt=Math.max(d-ge,f+ge),ft=Math.max(tt/500*Te,2*tt-Ne);return Ws(u,ft,!0,g,C,z)},pi={sqrtImage:oa,sizedDelim:js,customSizedDelim:Ws,leftRightDelim:Ds},ds={"\\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}},Vs=["(","\\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 fs(H,u){var d=In(H);if(d&&B.contains(Vs,d.text))return d;throw new m("Invalid delimiter: '"+(d?d.text:JSON.stringify(H))+"' after '"+u.funcName+"'",H)}rr({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1},handler:function(u,d){var f=fs(d[0],u);return{type:"delimsizing",mode:u.parser.mode,size:ds[u.funcName].size,mclass:ds[u.funcName].mclass,delim:f.text}},htmlBuilder:function(u,d){return u.delim==="."?Xe.makeSpan([u.mclass]):pi.sizedDelim(u.delim,u.size,d,u.mode,[u.mclass])},mathmlBuilder:function(u){var d=[];u.delim!=="."&&d.push(Hn(u.delim,u.mode));var f=new Gt.MathNode("mo",d);return u.mclass==="mopen"||u.mclass==="mclose"?f.setAttribute("fence","true"):f.setAttribute("fence","false"),f}});function ps(H){if(!H.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}rr({type:"leftright-right",names:["\\right"],props:{numArgs:1},handler:function(u,d){var f=u.parser.gullet.macros.get("\\current@color");if(f&&typeof f!="string")throw new m("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:u.parser.mode,delim:fs(d[0],u).text,color:f}}}),rr({type:"leftright",names:["\\left"],props:{numArgs:1},handler:function(u,d){var f=fs(d[0],u),g=u.parser;++g.leftrightDepth;var C=g.parseExpression(!1);--g.leftrightDepth,g.expect("\\right",!1);var z=Wt(g.parseFunction(),"leftright-right");return{type:"leftright",mode:g.mode,body:C,left:f.text,right:z.delim,rightColor:z.color}},htmlBuilder:function(u,d){ps(u);for(var f=sn(u.body,d,!0,["mopen","mclose"]),g=0,C=0,z=!1,ge=0;ge<f.length;ge++)f[ge].isMiddle?z=!0:(g=Math.max(f[ge].height,g),C=Math.max(f[ge].depth,C));g*=d.sizeMultiplier,C*=d.sizeMultiplier;var Te;if(u.left==="."?Te=Zn(d,["mopen"]):Te=pi.leftRightDelim(u.left,g,C,d,u.mode,["mopen"]),f.unshift(Te),z)for(var Ne=1;Ne<f.length;Ne++){var tt=f[Ne],ft=tt.isMiddle;ft&&(f[Ne]=pi.leftRightDelim(ft.delim,g,C,ft.options,u.mode,[]))}var Et;if(u.right===".")Et=Zn(d,["mclose"]);else{var Mt=u.rightColor?d.withColor(u.rightColor):d;Et=pi.leftRightDelim(u.right,g,C,Mt,u.mode,["mclose"])}return f.push(Et),Xe.makeSpan(["minner"],f,d)},mathmlBuilder:function(u,d){ps(u);var f=An(u.body,d);if(u.left!=="."){var g=new Gt.MathNode("mo",[Hn(u.left,u.mode)]);g.setAttribute("fence","true"),f.unshift(g)}if(u.right!=="."){var C=new Gt.MathNode("mo",[Hn(u.right,u.mode)]);C.setAttribute("fence","true"),u.rightColor&&C.setAttribute("mathcolor",u.rightColor),f.push(C)}return ci(f)}}),rr({type:"middle",names:["\\middle"],props:{numArgs:1},handler:function(u,d){var f=fs(d[0],u);if(!u.parser.leftrightDepth)throw new m("\\middle without preceding \\left",f);return{type:"middle",mode:u.parser.mode,delim:f.text}},htmlBuilder:function(u,d){var f;if(u.delim===".")f=Zn(d,[]);else{f=pi.sizedDelim(u.delim,1,d,u.mode,[]);var g={delim:u.delim,options:d};f.isMiddle=g}return f},mathmlBuilder:function(u,d){var f=u.delim==="\\vert"||u.delim==="|"?Hn("|","text"):Hn(u.delim,u.mode),g=new Gt.MathNode("mo",[f]);return g.setAttribute("fence","true"),g.setAttribute("lspace","0.05em"),g.setAttribute("rspace","0.05em"),g}});var ms=function(u,d){var f=Xe.wrapFragment(Hr(u.body,d),d),g=u.label.substr(1),C=d.sizeMultiplier,z,ge=0,Te=B.isCharacterBox(u.body);if(g==="sout")z=Xe.makeSpan(["stretchy","sout"]),z.height=d.fontMetrics().defaultRuleThickness/C,ge=-.5*d.fontMetrics().xHeight;else{/cancel/.test(g)?Te||f.classes.push("cancel-pad"):f.classes.push("boxpad");var Ne=0,tt=0;/box/.test(g)?(tt=Math.max(d.fontMetrics().fboxrule,d.minRuleThickness),Ne=d.fontMetrics().fboxsep+(g==="colorbox"?0:tt)):Ne=Te?.2:0,z=fr.encloseSpan(f,g,Ne,d),/fbox|boxed|fcolorbox/.test(g)&&(z.style.borderStyle="solid",z.style.borderWidth=tt+"em"),ge=f.depth+Ne,u.backgroundColor&&(z.style.backgroundColor=u.backgroundColor,u.borderColor&&(z.style.borderColor=u.borderColor))}var ft;return u.backgroundColor?ft=Xe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:z,shift:ge},{type:"elem",elem:f,shift:0}]},d):ft=Xe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:f,shift:0},{type:"elem",elem:z,shift:ge,wrapperClasses:/cancel/.test(g)?["svg-align"]:[]}]},d),/cancel/.test(g)&&(ft.height=f.height,ft.depth=f.depth),/cancel/.test(g)&&!Te?Xe.makeSpan(["mord","cancel-lap"],[ft],d):Xe.makeSpan(["mord"],[ft],d)},gs=function(u,d){var f=0,g=new Gt.MathNode(u.label.indexOf("colorbox")>-1?"mpadded":"menclose",[Xr(u.body,d)]);switch(u.label){case"\\cancel":g.setAttribute("notation","updiagonalstrike");break;case"\\bcancel":g.setAttribute("notation","downdiagonalstrike");break;case"\\sout":g.setAttribute("notation","horizontalstrike");break;case"\\fbox":g.setAttribute("notation","box");break;case"\\fcolorbox":case"\\colorbox":if(f=d.fontMetrics().fboxsep*d.fontMetrics().ptPerEm,g.setAttribute("width","+"+2*f+"pt"),g.setAttribute("height","+"+2*f+"pt"),g.setAttribute("lspace",f+"pt"),g.setAttribute("voffset",f+"pt"),u.label==="\\fcolorbox"){var C=Math.max(d.fontMetrics().fboxrule,d.minRuleThickness);g.setAttribute("style","border: "+C+"em solid "+String(u.borderColor))}break;case"\\xcancel":g.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return u.backgroundColor&&g.setAttribute("mathbackground",u.backgroundColor),g};rr({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,greediness:3,argTypes:["color","text"]},handler:function(u,d,f){var g=u.parser,C=u.funcName,z=Wt(d[0],"color-token").color,ge=d[1];return{type:"enclose",mode:g.mode,label:C,backgroundColor:z,body:ge}},htmlBuilder:ms,mathmlBuilder:gs}),rr({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,greediness:3,argTypes:["color","color","text"]},handler:function(u,d,f){var g=u.parser,C=u.funcName,z=Wt(d[0],"color-token").color,ge=Wt(d[1],"color-token").color,Te=d[2];return{type:"enclose",mode:g.mode,label:C,backgroundColor:ge,borderColor:z,body:Te}},htmlBuilder:ms,mathmlBuilder:gs}),rr({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler:function(u,d){var f=u.parser;return{type:"enclose",mode:f.mode,label:"\\fbox",body:d[0]}}}),rr({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout"],props:{numArgs:1},handler:function(u,d,f){var g=u.parser,C=u.funcName,z=d[0];return{type:"enclose",mode:g.mode,label:C,body:z}},htmlBuilder:ms,mathmlBuilder:gs});var Wi={};function Mi(H){for(var u=H.type,d=H.names,f=H.props,g=H.handler,C=H.htmlBuilder,z=H.mathmlBuilder,ge={type:u,numArgs:f.numArgs||0,greediness:1,allowedInText:!1,numOptionalArgs:0,handler:g},Te=0;Te<d.length;++Te)Wi[d[Te]]=ge;C&&(qn[u]=C),z&&(Vn[u]=z)}function Is(H){var u=[];H.consumeSpaces();for(var d=H.fetch().text;d==="\\hline"||d==="\\hdashline";)H.consume(),u.push(d==="\\hdashline"),H.consumeSpaces(),d=H.fetch().text;return u}function dn(H,u,d){var f=u.hskipBeforeAndAfter,g=u.addJot,C=u.cols,z=u.arraystretch,ge=u.colSeparationType;if(H.gullet.beginGroup(),H.gullet.macros.set("\\\\","\\cr"),!z){var Te=H.gullet.expandMacroAsText("\\arraystretch");if(Te==null)z=1;else if(z=parseFloat(Te),!z||z<0)throw new m("Invalid \\arraystretch: "+Te)}H.gullet.beginGroup();var Ne=[],tt=[Ne],ft=[],Et=[];for(Et.push(Is(H));;){var Mt=H.parseExpression(!1,"\\cr");H.gullet.endGroup(),H.gullet.beginGroup(),Mt={type:"ordgroup",mode:H.mode,body:Mt},d&&(Mt={type:"styling",mode:H.mode,style:d,body:[Mt]}),Ne.push(Mt);var Ft=H.fetch().text;if(Ft==="&")H.consume();else if(Ft==="\\end"){Ne.length===1&&Mt.type==="styling"&&Mt.body[0].body.length===0&&tt.pop(),Et.length<tt.length+1&&Et.push([]);break}else if(Ft==="\\cr"){var je=Wt(H.parseFunction(),"cr");ft.push(je.size),Et.push(Is(H)),Ne=[],tt.push(Ne)}else throw new m("Expected & or \\\\ or \\cr or \\end",H.nextToken)}return H.gullet.endGroup(),H.gullet.endGroup(),{type:"array",mode:H.mode,addJot:g,arraystretch:z,body:tt,cols:C,rowGaps:ft,hskipBeforeAndAfter:f,hLinesBeforeRow:Et,colSeparationType:ge}}function cn(H){return H.substr(0,1)==="d"?"display":"text"}var on=function(u,d){var f,g,C=u.body.length,z=u.hLinesBeforeRow,ge=0,Te=new Array(C),Ne=[],tt=Math.max(d.fontMetrics().arrayRuleWidth,d.minRuleThickness),ft=1/d.fontMetrics().ptPerEm,Et=5*ft;if(u.colSeparationType&&u.colSeparationType==="small"){var Mt=d.havingStyle(v.SCRIPT).sizeMultiplier;Et=.2778*(Mt/d.sizeMultiplier)}var Ft=12*ft,je=3*ft,dr=u.arraystretch*Ft,Rr=.7*dr,$r=.3*dr,Br=0;function Dn(to){for(var Ss=0;Ss<to.length;++Ss)Ss>0&&(Br+=.25),Ne.push({pos:Br,isDashed:to[Ss]})}for(Dn(z[0]),f=0;f<u.body.length;++f){var xn=u.body[f],Bn=Rr,Nn=$r;ge<xn.length&&(ge=xn.length);var Gn=new Array(xn.length);for(g=0;g<xn.length;++g){var Kn=Hr(xn[g],d);Nn<Kn.depth&&(Nn=Kn.depth),Bn<Kn.height&&(Bn=Kn.height),Gn[g]=Kn}var Yn=u.rowGaps[f],gn=0;Yn&&(gn=at(Yn,d),gn>0&&(gn+=$r,Nn<gn&&(Nn=gn),gn=0)),u.addJot&&(Nn+=je),Gn.height=Bn,Gn.depth=Nn,Br+=Bn,Gn.pos=Br,Br+=Nn+gn,Te[f]=Gn,Dn(z[f+1])}var si=Br/2+d.fontMetrics().axisHeight,Xn=u.cols||[],ki=[],ti,$i;for(g=0,$i=0;g<ge||$i<Xn.length;++g,++$i){for(var Ui=Xn[$i]||{},Ja=!0;Ui.type==="separator";){if(Ja||(ti=Xe.makeSpan(["arraycolsep"],[]),ti.style.width=d.fontMetrics().doubleRuleSep+"em",ki.push(ti)),Ui.separator==="|"||Ui.separator===":"){var eo=Ui.separator==="|"?"solid":"dashed",mi=Xe.makeSpan(["vertical-separator"],[],d);mi.style.height=Br+"em",mi.style.borderRightWidth=tt+"em",mi.style.borderRightStyle=eo,mi.style.margin="0 -"+tt/2+"em",mi.style.verticalAlign=-(Br-si)+"em",ki.push(mi)}else throw new m("Invalid separator type: "+Ui.separator);$i++,Ui=Xn[$i]||{},Ja=!1}if(!(g>=ge)){var zi=void 0;(g>0||u.hskipBeforeAndAfter)&&(zi=B.deflt(Ui.pregap,Et),zi!==0&&(ti=Xe.makeSpan(["arraycolsep"],[]),ti.style.width=zi+"em",ki.push(ti)));var rs=[];for(f=0;f<C;++f){var ea=Te[f],Es=ea[g];if(Es){var Fs=ea.pos-si;Es.depth=ea.depth,Es.height=ea.height,rs.push({type:"elem",elem:Es,shift:Fs})}}rs=Xe.makeVList({positionType:"individualShift",children:rs},d),rs=Xe.makeSpan(["col-align-"+(Ui.align||"c")],[rs]),ki.push(rs),(g<ge-1||u.hskipBeforeAndAfter)&&(zi=B.deflt(Ui.postgap,Et),zi!==0&&(ti=Xe.makeSpan(["arraycolsep"],[]),ti.style.width=zi+"em",ki.push(ti)))}}if(Te=Xe.makeSpan(["mtable"],ki),Ne.length>0){for(var Ao=Xe.makeLineSpan("hline",d,tt),Co=Xe.makeLineSpan("hdashline",d,tt),ta=[{type:"elem",elem:Te,shift:0}];Ne.length>0;){var Sa=Ne.pop(),wa=Sa.pos-si;Sa.isDashed?ta.push({type:"elem",elem:Co,shift:wa}):ta.push({type:"elem",elem:Ao,shift:wa})}Te=Xe.makeVList({positionType:"individualShift",children:ta},d)}return Xe.makeSpan(["mord"],[Te],d)},Qn={c:"center ",l:"left ",r:"right "},zn=function(u,d){var f=new Gt.MathNode("mtable",u.body.map(function(Br){return new Gt.MathNode("mtr",Br.map(function(Dn){return new Gt.MathNode("mtd",[Xr(Dn,d)])}))})),g=u.arraystretch===.5?.1:.16+u.arraystretch-1+(u.addJot?.09:0);f.setAttribute("rowspacing",g+"em");var C="",z="";if(u.cols){var ge=u.cols,Te="",Ne=!1,tt=0,ft=ge.length;ge[0].type==="separator"&&(C+="top ",tt=1),ge[ge.length-1].type==="separator"&&(C+="bottom ",ft-=1);for(var Et=tt;Et<ft;Et++)ge[Et].type==="align"?(z+=Qn[ge[Et].align],Ne&&(Te+="none "),Ne=!0):ge[Et].type==="separator"&&Ne&&(Te+=ge[Et].separator==="|"?"solid ":"dashed ",Ne=!1);f.setAttribute("columnalign",z.trim()),/[sd]/.test(Te)&&f.setAttribute("columnlines",Te.trim())}if(u.colSeparationType==="align"){for(var Mt=u.cols||[],Ft="",je=1;je<Mt.length;je++)Ft+=je%2?"0em ":"1em ";f.setAttribute("columnspacing",Ft.trim())}else u.colSeparationType==="alignat"?f.setAttribute("columnspacing","0em"):u.colSeparationType==="small"?f.setAttribute("columnspacing","0.2778em"):f.setAttribute("columnspacing","1em");var dr="",Rr=u.hLinesBeforeRow;C+=Rr[0].length>0?"left ":"",C+=Rr[Rr.length-1].length>0?"right ":"";for(var $r=1;$r<Rr.length-1;$r++)dr+=Rr[$r].length===0?"none ":Rr[$r][0]?"dashed ":"solid ";return/[sd]/.test(dr)&&f.setAttribute("rowlines",dr.trim()),C!==""&&(f=new Gt.MathNode("menclose",[f]),f.setAttribute("notation",C.trim())),u.arraystretch&&u.arraystretch<1&&(f=new Gt.MathNode("mstyle",[f]),f.setAttribute("scriptlevel","1")),f},Rt=function(u,d){var f=[],g=dn(u.parser,{cols:f,addJot:!0},"display"),C,z=0,ge={type:"ordgroup",mode:u.mode,body:[]},Te=Jt(d[0],"ordgroup");if(Te){for(var Ne="",tt=0;tt<Te.body.length;tt++){var ft=Wt(Te.body[tt],"textord");Ne+=ft.text}C=Number(Ne),z=C*2}var Et=!z;g.body.forEach(function(dr){for(var Rr=1;Rr<dr.length;Rr+=2){var $r=Wt(dr[Rr],"styling"),Br=Wt($r.body[0],"ordgroup");Br.body.unshift(ge)}if(Et)z<dr.length&&(z=dr.length);else{var Dn=dr.length/2;if(C<Dn)throw new m("Too many math in a row: "+("expected "+C+", but got "+Dn),dr[0])}});for(var Mt=0;Mt<z;++Mt){var Ft="r",je=0;Mt%2===1?Ft="l":Mt>0&&Et&&(je=1),f[Mt]={type:"align",align:Ft,pregap:je,postgap:0}}return g.colSeparationType=Et?"align":"alignat",g};Mi({type:"array",names:["array","darray"],props:{numArgs:1},handler:function(u,d){var f=In(d[0]),g=f?[d[0]]:Wt(d[0],"ordgroup").body,C=g.map(function(ge){var Te=vn(ge),Ne=Te.text;if("lcr".indexOf(Ne)!==-1)return{type:"align",align:Ne};if(Ne==="|")return{type:"separator",separator:"|"};if(Ne===":")return{type:"separator",separator:":"};throw new m("Unknown column alignment: "+Ne,ge)}),z={cols:C,hskipBeforeAndAfter:!0};return dn(u.parser,z,cn(u.envName))},htmlBuilder:on,mathmlBuilder:zn}),Mi({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix"],props:{numArgs:0},handler:function(u){var d={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[u.envName],f={hskipBeforeAndAfter:!1},g=dn(u.parser,f,cn(u.envName));return d?{type:"leftright",mode:u.mode,body:[g],left:d[0],right:d[1],rightColor:void 0}:g},htmlBuilder:on,mathmlBuilder:zn}),Mi({type:"array",names:["smallmatrix"],props:{numArgs:0},handler:function(u){var d={arraystretch:.5},f=dn(u.parser,d,"script");return f.colSeparationType="small",f},htmlBuilder:on,mathmlBuilder:zn}),Mi({type:"array",names:["subarray"],props:{numArgs:1},handler:function(u,d){var f=In(d[0]),g=f?[d[0]]:Wt(d[0],"ordgroup").body,C=g.map(function(ge){var Te=vn(ge),Ne=Te.text;if("lc".indexOf(Ne)!==-1)return{type:"align",align:Ne};throw new m("Unknown column alignment: "+Ne,ge)});if(C.length>1)throw new m("{subarray} can contain only one column");var z={cols:C,hskipBeforeAndAfter:!1,arraystretch:.5};if(z=dn(u.parser,z,"script"),z.body[0].length>1)throw new m("{subarray} can contain only one column");return z},htmlBuilder:on,mathmlBuilder:zn}),Mi({type:"array",names:["cases","dcases"],props:{numArgs:0},handler:function(u){var d={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},{type:"align",align:"l",pregap:0,postgap:0}]},f=dn(u.parser,d,cn(u.envName));return{type:"leftright",mode:u.mode,body:[f],left:"\\{",right:".",rightColor:void 0}},htmlBuilder:on,mathmlBuilder:zn}),Mi({type:"array",names:["aligned"],props:{numArgs:0},handler:Rt,htmlBuilder:on,mathmlBuilder:zn}),Mi({type:"array",names:["gathered"],props:{numArgs:0},handler:function(u){var d={cols:[{type:"align",align:"c"}],addJot:!0};return dn(u.parser,d,"display")},htmlBuilder:on,mathmlBuilder:zn}),Mi({type:"array",names:["alignedat"],props:{numArgs:1},handler:Rt,htmlBuilder:on,mathmlBuilder:zn}),rr({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler:function(u,d){throw new m(u.funcName+" valid only within array environment")}});var es=Wi,Rs=es;rr({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler:function(u,d){var f=u.parser,g=u.funcName,C=d[0];if(C.type!=="ordgroup")throw new m("Invalid environment name",C);for(var z="",ge=0;ge<C.body.length;++ge)z+=Wt(C.body[ge],"textord").text;if(g==="\\begin"){if(!Rs.hasOwnProperty(z))throw new m("No such environment: "+z,C);var Te=Rs[z],Ne=f.parseArguments("\\begin{"+z+"}",Te),tt=Ne.args,ft=Ne.optArgs,Et={mode:f.mode,envName:z,parser:f},Mt=Te.handler(Et,tt,ft);f.expect("\\end",!1);var Ft=f.nextToken,je=Wt(f.parseFunction(),"environment");if(je.name!==z)throw new m("Mismatch: \\begin{"+z+"} matched by \\end{"+je.name+"}",Ft);return Mt}return{type:"environment",mode:f.mode,name:z,nameGroup:C}}});var Ls=Xe.makeSpan;function ks(H,u){var d=sn(H.body,u,!0);return Ls([H.mclass],d,u)}function Bi(H,u){var d,f=An(H.body,u);return H.mclass==="minner"?Gt.newDocumentFragment(f):(H.mclass==="mord"?H.isCharacterBox?(d=f[0],d.type="mi"):d=new Gt.MathNode("mi",f):(H.isCharacterBox?(d=f[0],d.type="mo"):d=new Gt.MathNode("mo",f),H.mclass==="mbin"?(d.attributes.lspace="0.22em",d.attributes.rspace="0.22em"):H.mclass==="mpunct"?(d.attributes.lspace="0em",d.attributes.rspace="0.17em"):(H.mclass==="mopen"||H.mclass==="mclose")&&(d.attributes.lspace="0em",d.attributes.rspace="0em")),d)}rr({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1},handler:function(u,d){var f=u.parser,g=u.funcName,C=d[0];return{type:"mclass",mode:f.mode,mclass:"m"+g.substr(5),body:nn(C),isCharacterBox:B.isCharacterBox(C)}},htmlBuilder:ks,mathmlBuilder:Bi});var Vi=function(u){var d=u.type==="ordgroup"&&u.body.length?u.body[0]:u;return d.type==="atom"&&(d.family==="bin"||d.family==="rel")?"m"+d.family:"mord"};rr({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler:function(u,d){var f=u.parser;return{type:"mclass",mode:f.mode,mclass:Vi(d[0]),body:[d[1]],isCharacterBox:B.isCharacterBox(d[1])}}}),rr({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler:function(u,d){var f=u.parser,g=u.funcName,C=d[1],z=d[0],ge;g!=="\\stackrel"?ge=Vi(C):ge="mrel";var Te={type:"op",mode:C.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:g!=="\\stackrel",body:nn(C)},Ne={type:"supsub",mode:z.mode,base:Te,sup:g==="\\underset"?null:z,sub:g==="\\underset"?z:null};return{type:"mclass",mode:f.mode,mclass:ge,body:[Ne],isCharacterBox:B.isCharacterBox(Ne)}},htmlBuilder:ks,mathmlBuilder:Bi});var Zs=function(u,d){var f=u.font,g=d.withFont(f);return Hr(u.body,g)},Ra=function(u,d){var f=u.font,g=d.withFont(f);return Xr(u.body,g)},Ys={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};rr({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,greediness:2},handler:function(u,d){var f=u.parser,g=u.funcName,C=d[0],z=g;return z in Ys&&(z=Ys[z]),{type:"font",mode:f.mode,font:z.slice(1),body:C}},htmlBuilder:Zs,mathmlBuilder:Ra}),rr({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1,greediness:2},handler:function(u,d){var f=u.parser,g=d[0],C=B.isCharacterBox(g);return{type:"mclass",mode:f.mode,mclass:Vi(g),body:[{type:"font",mode:f.mode,font:"boldsymbol",body:g}],isCharacterBox:C}}}),rr({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it"],props:{numArgs:0,allowedInText:!0},handler:function(u,d){var f=u.parser,g=u.funcName,C=u.breakOnTokenText,z=f.mode,ge=f.parseExpression(!0,C),Te="math"+g.slice(1);return{type:"font",mode:z,font:Te,body:{type:"ordgroup",mode:f.mode,body:ge}}},htmlBuilder:Zs,mathmlBuilder:Ra});var vs=function(u,d){var f=d;return u==="display"?f=f.id>=v.SCRIPT.id?f.text():v.DISPLAY:u==="text"&&f.size===v.DISPLAY.size?f=v.TEXT:u==="script"?f=v.SCRIPT:u==="scriptscript"&&(f=v.SCRIPTSCRIPT),f},Zi=function(u,d){var f=vs(u.size,d.style),g=f.fracNum(),C=f.fracDen(),z;z=d.havingStyle(g);var ge=Hr(u.numer,z,d);if(u.continued){var Te=8.5/d.fontMetrics().ptPerEm,Ne=3.5/d.fontMetrics().ptPerEm;ge.height=ge.height<Te?Te:ge.height,ge.depth=ge.depth<Ne?Ne:ge.depth}z=d.havingStyle(C);var tt=Hr(u.denom,z,d),ft,Et,Mt;u.hasBarLine?(u.barSize?(Et=at(u.barSize,d),ft=Xe.makeLineSpan("frac-line",d,Et)):ft=Xe.makeLineSpan("frac-line",d),Et=ft.height,Mt=ft.height):(ft=null,Et=0,Mt=d.fontMetrics().defaultRuleThickness);var Ft,je,dr;f.size===v.DISPLAY.size||u.size==="display"?(Ft=d.fontMetrics().num1,Et>0?je=3*Mt:je=7*Mt,dr=d.fontMetrics().denom1):(Et>0?(Ft=d.fontMetrics().num2,je=Mt):(Ft=d.fontMetrics().num3,je=3*Mt),dr=d.fontMetrics().denom2);var Rr;if(ft){var Br=d.fontMetrics().axisHeight;Ft-ge.depth-(Br+.5*Et)<je&&(Ft+=je-(Ft-ge.depth-(Br+.5*Et))),Br-.5*Et-(tt.height-dr)<je&&(dr+=je-(Br-.5*Et-(tt.height-dr)));var Dn=-(Br-.5*Et);Rr=Xe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:tt,shift:dr},{type:"elem",elem:ft,shift:Dn},{type:"elem",elem:ge,shift:-Ft}]},d)}else{var $r=Ft-ge.depth-(tt.height-dr);$r<je&&(Ft+=.5*(je-$r),dr+=.5*(je-$r)),Rr=Xe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:tt,shift:dr},{type:"elem",elem:ge,shift:-Ft}]},d)}z=d.havingStyle(f),Rr.height*=z.sizeMultiplier/d.sizeMultiplier,Rr.depth*=z.sizeMultiplier/d.sizeMultiplier;var xn;f.size===v.DISPLAY.size?xn=d.fontMetrics().delim1:xn=d.fontMetrics().delim2;var Bn,Nn;return u.leftDelim==null?Bn=Zn(d,["mopen"]):Bn=pi.customSizedDelim(u.leftDelim,xn,!0,d.havingStyle(f),u.mode,["mopen"]),u.continued?Nn=Xe.makeSpan([]):u.rightDelim==null?Nn=Zn(d,["mclose"]):Nn=pi.customSizedDelim(u.rightDelim,xn,!0,d.havingStyle(f),u.mode,["mclose"]),Xe.makeSpan(["mord"].concat(z.sizingClasses(d)),[Bn,Xe.makeSpan(["mfrac"],[Rr]),Nn],d)},ua=function(u,d){var f=new Gt.MathNode("mfrac",[Xr(u.numer,d),Xr(u.denom,d)]);if(!u.hasBarLine)f.setAttribute("linethickness","0px");else if(u.barSize){var g=at(u.barSize,d);f.setAttribute("linethickness",g+"em")}var C=vs(u.size,d.style);if(C.size!==d.style.size){f=new Gt.MathNode("mstyle",[f]);var z=C.size===v.DISPLAY.size?"true":"false";f.setAttribute("displaystyle",z),f.setAttribute("scriptlevel","0")}if(u.leftDelim!=null||u.rightDelim!=null){var ge=[];if(u.leftDelim!=null){var Te=new Gt.MathNode("mo",[new Gt.TextNode(u.leftDelim.replace("\\",""))]);Te.setAttribute("fence","true"),ge.push(Te)}if(ge.push(f),u.rightDelim!=null){var Ne=new Gt.MathNode("mo",[new Gt.TextNode(u.rightDelim.replace("\\",""))]);Ne.setAttribute("fence","true"),ge.push(Ne)}return ci(ge)}return f};rr({type:"genfrac",names:["\\cfrac","\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,greediness:2},handler:function(u,d){var f=u.parser,g=u.funcName,C=d[0],z=d[1],ge,Te=null,Ne=null,tt="auto";switch(g){case"\\cfrac":case"\\dfrac":case"\\frac":case"\\tfrac":ge=!0;break;case"\\\\atopfrac":ge=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":ge=!1,Te="(",Ne=")";break;case"\\\\bracefrac":ge=!1,Te="\\{",Ne="\\}";break;case"\\\\brackfrac":ge=!1,Te="[",Ne="]";break;default:throw new Error("Unrecognized genfrac command")}switch(g){case"\\cfrac":case"\\dfrac":case"\\dbinom":tt="display";break;case"\\tfrac":case"\\tbinom":tt="text";break}return{type:"genfrac",mode:f.mode,continued:g==="\\cfrac",numer:C,denom:z,hasBarLine:ge,leftDelim:Te,rightDelim:Ne,size:tt,barSize:null}},htmlBuilder:Zi,mathmlBuilder:ua}),rr({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler:function(u){var d=u.parser,f=u.funcName,g=u.token,C;switch(f){case"\\over":C="\\frac";break;case"\\choose":C="\\binom";break;case"\\atop":C="\\\\atopfrac";break;case"\\brace":C="\\\\bracefrac";break;case"\\brack":C="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:d.mode,replaceWith:C,token:g}}});var La=["display","text","script","scriptscript"],ka=function(u){var d=null;return u.length>0&&(d=u,d=d==="."?null:d),d};rr({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,greediness:6,argTypes:["math","math","size","text","math","math"]},handler:function(u,d){var f=u.parser,g=d[4],C=d[5],z=Jt(d[0],"atom");z&&(z=yr(d[0],"open"));var ge=z?ka(z.text):null,Te=Jt(d[1],"atom");Te&&(Te=yr(d[1],"close"));var Ne=Te?ka(Te.text):null,tt=Wt(d[2],"size"),ft,Et=null;tt.isBlank?ft=!0:(Et=tt.value,ft=Et.number>0);var Mt="auto",Ft=Jt(d[3],"ordgroup");if(Ft){if(Ft.body.length>0){var je=Wt(Ft.body[0],"textord");Mt=La[Number(je.text)]}}else Ft=Wt(d[3],"textord"),Mt=La[Number(Ft.text)];return{type:"genfrac",mode:f.mode,numer:g,denom:C,continued:!1,hasBarLine:ft,barSize:Et,leftDelim:ge,rightDelim:Ne,size:Mt}},htmlBuilder:Zi,mathmlBuilder:ua}),rr({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler:function(u,d){var f=u.parser,g=u.funcName,C=u.token;return{type:"infix",mode:f.mode,replaceWith:"\\\\abovefrac",size:Wt(d[0],"size").value,token:C}}}),rr({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:function(u,d){var f=u.parser,g=u.funcName,C=d[0],z=V(Wt(d[1],"infix").size),ge=d[2],Te=z.number>0;return{type:"genfrac",mode:f.mode,numer:C,denom:ge,continued:!1,hasBarLine:Te,barSize:z,leftDelim:null,rightDelim:null,size:"auto"}},htmlBuilder:Zi,mathmlBuilder:ua});var Oa=function(u,d){var f=d.style,g,C,z=Jt(u,"supsub");z?(g=z.sup?Hr(z.sup,d.havingStyle(f.sup()),d):Hr(z.sub,d.havingStyle(f.sub()),d),C=Wt(z.base,"horizBrace")):C=Wt(u,"horizBrace");var ge=Hr(C.base,d.havingBaseStyle(v.DISPLAY)),Te=fr.svgSpan(C,d),Ne;if(C.isOver?(Ne=Xe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:ge},{type:"kern",size:.1},{type:"elem",elem:Te}]},d),Ne.children[0].children[0].children[1].classes.push("svg-align")):(Ne=Xe.makeVList({positionType:"bottom",positionData:ge.depth+.1+Te.height,children:[{type:"elem",elem:Te},{type:"kern",size:.1},{type:"elem",elem:ge}]},d),Ne.children[0].children[0].children[0].classes.push("svg-align")),g){var tt=Xe.makeSpan(["mord",C.isOver?"mover":"munder"],[Ne],d);C.isOver?Ne=Xe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:tt},{type:"kern",size:.2},{type:"elem",elem:g}]},d):Ne=Xe.makeVList({positionType:"bottom",positionData:tt.depth+.2+g.height+g.depth,children:[{type:"elem",elem:g},{type:"kern",size:.2},{type:"elem",elem:tt}]},d)}return Xe.makeSpan(["mord",C.isOver?"mover":"munder"],[Ne],d)},Pa=function(u,d){var f=fr.mathMLnode(u.label);return new Gt.MathNode(u.isOver?"mover":"munder",[Xr(u.base,d),f])};rr({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler:function(u,d){var f=u.parser,g=u.funcName;return{type:"horizBrace",mode:f.mode,label:g,isOver:/^\\over/.test(g),base:d[0]}},htmlBuilder:Oa,mathmlBuilder:Pa}),rr({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:function(u,d){var f=u.parser,g=d[1],C=Wt(d[0],"url").url;return f.settings.isTrusted({command:"\\href",url:C})?{type:"href",mode:f.mode,href:C,body:nn(g)}:f.formatUnsupportedCmd("\\href")},htmlBuilder:function(u,d){var f=sn(u.body,d,!1);return Xe.makeAnchor(u.href,[],f,d)},mathmlBuilder:function(u,d){var f=yn(u.body,d);return f instanceof Ar||(f=new Ar("mrow",[f])),f.setAttribute("href",u.href),f}}),rr({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:function(u,d){var f=u.parser,g=Wt(d[0],"url").url;if(!f.settings.isTrusted({command:"\\url",url:g}))return f.formatUnsupportedCmd("\\url");for(var C=[],z=0;z<g.length;z++){var ge=g[z];ge==="~"&&(ge="\\textasciitilde"),C.push({type:"textord",mode:"text",text:ge})}var Te={type:"text",mode:f.mode,font:"\\texttt",body:C};return{type:"href",mode:f.mode,href:g,body:nn(Te)}}}),rr({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:function(u,d){var f=u.parser;return{type:"htmlmathml",mode:f.mode,html:nn(d[0]),mathml:nn(d[1])}},htmlBuilder:function(u,d){var f=sn(u.html,d,!1);return Xe.makeFragment(f)},mathmlBuilder:function(u,d){return yn(u.mathml,d)}});var Os=function(u){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(u))return{number:+u,unit:"bp"};var d=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(u);if(!d)throw new m("Invalid size: '"+u+"' in \\includegraphics");var f={number:+(d[1]+d[2]),unit:d[3]};if(!st(f))throw new m("Invalid unit: '"+f.unit+"' in \\includegraphics.");return f};rr({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:function(u,d,f){var g=u.parser,C={number:0,unit:"em"},z={number:.9,unit:"em"},ge={number:0,unit:"em"},Te="";if(f[0])for(var Ne=Wt(f[0],"raw").string,tt=Ne.split(","),ft=0;ft<tt.length;ft++){var Et=tt[ft].split("=");if(Et.length===2){var Mt=Et[1].trim();switch(Et[0].trim()){case"alt":Te=Mt;break;case"width":C=Os(Mt);break;case"height":z=Os(Mt);break;case"totalheight":ge=Os(Mt);break;default:throw new m("Invalid key: '"+Et[0]+"' in \\includegraphics.")}}}var Ft=Wt(d[0],"url").url;return Te===""&&(Te=Ft,Te=Te.replace(/^.*[\\/]/,""),Te=Te.substring(0,Te.lastIndexOf("."))),g.settings.isTrusted({command:"\\includegraphics",url:Ft})?{type:"includegraphics",mode:g.mode,alt:Te,width:C,height:z,totalheight:ge,src:Ft}:g.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:function(u,d){var f=at(u.height,d),g=0;u.totalheight.number>0&&(g=at(u.totalheight,d)-f,g=Number(g.toFixed(2)));var C=0;u.width.number>0&&(C=at(u.width,d));var z={height:f+g+"em"};C>0&&(z.width=C+"em"),g>0&&(z.verticalAlign=-g+"em");var ge=new $e(u.src,u.alt,z);return ge.height=f,ge.depth=g,ge},mathmlBuilder:function(u,d){var f=new Gt.MathNode("mglyph",[]);f.setAttribute("alt",u.alt);var g=at(u.height,d),C=0;if(u.totalheight.number>0&&(C=at(u.totalheight,d)-g,C=C.toFixed(2),f.setAttribute("valign","-"+C+"em")),f.setAttribute("height",g+C+"em"),u.width.number>0){var z=at(u.width,d);f.setAttribute("width",z+"em")}return f.setAttribute("src",u.src),f}}),rr({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],allowedInText:!0},handler:function(u,d){var f=u.parser,g=u.funcName,C=Wt(d[0],"size");if(f.settings.strict){var z=g[1]==="m",ge=C.value.unit==="mu";z?(ge||f.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+g+" supports only mu units, "+("not "+C.value.unit+" units")),f.mode!=="math"&&f.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+g+" works only in math mode")):ge&&f.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+g+" doesn't support mu units")}return{type:"kern",mode:f.mode,dimension:C.value}},htmlBuilder:function(u,d){return Xe.makeGlue(u.dimension,d)},mathmlBuilder:function(u,d){var f=at(u.dimension,d);return new Gt.SpaceNode(f)}}),rr({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:function(u,d){var f=u.parser,g=u.funcName,C=d[0];return{type:"lap",mode:f.mode,alignment:g.slice(5),body:C}},htmlBuilder:function(u,d){var f;u.alignment==="clap"?(f=Xe.makeSpan([],[Hr(u.body,d)]),f=Xe.makeSpan(["inner"],[f],d)):f=Xe.makeSpan(["inner"],[Hr(u.body,d)]);var g=Xe.makeSpan(["fix"],[]),C=Xe.makeSpan([u.alignment],[f,g],d),z=Xe.makeSpan(["strut"]);return z.style.height=C.height+C.depth+"em",z.style.verticalAlign=-C.depth+"em",C.children.unshift(z),C=Xe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:C}]},d),Xe.makeSpan(["mord"],[C],d)},mathmlBuilder:function(u,d){var f=new Gt.MathNode("mpadded",[Xr(u.body,d)]);if(u.alignment!=="rlap"){var g=u.alignment==="llap"?"-1":"-0.5";f.setAttribute("lspace",g+"width")}return f.setAttribute("width","0px"),f}}),rr({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(u,d){var f=u.funcName,g=u.parser,C=g.mode;g.switchMode("math");var z=f==="\\("?"\\)":"$",ge=g.parseExpression(!1,z);return g.expect(z),g.switchMode(C),{type:"styling",mode:g.mode,style:"text",body:ge}}}),rr({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler:function(u,d){throw new m("Mismatched "+u.funcName)}});var Ps=function(u,d){switch(d.style.size){case v.DISPLAY.size:return u.display;case v.TEXT.size:return u.text;case v.SCRIPT.size:return u.script;case v.SCRIPTSCRIPT.size:return u.scriptscript;default:return u.text}};rr({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4},handler:function(u,d){var f=u.parser;return{type:"mathchoice",mode:f.mode,display:nn(d[0]),text:nn(d[1]),script:nn(d[2]),scriptscript:nn(d[3])}},htmlBuilder:function(u,d){var f=Ps(u,d),g=sn(f,d,!1);return Xe.makeFragment(g)},mathmlBuilder:function(u,d){var f=Ps(u,d);return yn(f,d)}});var _s=function(u,d,f,g,C,z,ge){u=Xe.makeSpan([],[u]);var Te,Ne;if(d){var tt=Hr(d,g.havingStyle(C.sup()),g);Ne={elem:tt,kern:Math.max(g.fontMetrics().bigOpSpacing1,g.fontMetrics().bigOpSpacing3-tt.depth)}}if(f){var ft=Hr(f,g.havingStyle(C.sub()),g);Te={elem:ft,kern:Math.max(g.fontMetrics().bigOpSpacing2,g.fontMetrics().bigOpSpacing4-ft.height)}}var Et;if(Ne&&Te){var Mt=g.fontMetrics().bigOpSpacing5+Te.elem.height+Te.elem.depth+Te.kern+u.depth+ge;Et=Xe.makeVList({positionType:"bottom",positionData:Mt,children:[{type:"kern",size:g.fontMetrics().bigOpSpacing5},{type:"elem",elem:Te.elem,marginLeft:-z+"em"},{type:"kern",size:Te.kern},{type:"elem",elem:u},{type:"kern",size:Ne.kern},{type:"elem",elem:Ne.elem,marginLeft:z+"em"},{type:"kern",size:g.fontMetrics().bigOpSpacing5}]},g)}else if(Te){var Ft=u.height-ge;Et=Xe.makeVList({positionType:"top",positionData:Ft,children:[{type:"kern",size:g.fontMetrics().bigOpSpacing5},{type:"elem",elem:Te.elem,marginLeft:-z+"em"},{type:"kern",size:Te.kern},{type:"elem",elem:u}]},g)}else if(Ne){var je=u.depth+ge;Et=Xe.makeVList({positionType:"bottom",positionData:je,children:[{type:"elem",elem:u},{type:"kern",size:Ne.kern},{type:"elem",elem:Ne.elem,marginLeft:z+"em"},{type:"kern",size:g.fontMetrics().bigOpSpacing5}]},g)}else return u;return Xe.makeSpan(["mop","op-limits"],[Et],g)},Ma=["\\smallint"],ts=function(u,d){var f,g,C=!1,z,ge=Jt(u,"supsub");ge?(f=ge.sup,g=ge.sub,z=Wt(ge.base,"op"),C=!0):z=Wt(u,"op");var Te=d.style,Ne=!1;Te.size===v.DISPLAY.size&&z.symbol&&!B.contains(Ma,z.name)&&(Ne=!0);var tt;if(z.symbol){var ft=Ne?"Size2-Regular":"Size1-Regular",Et="";if((z.name==="\\oiint"||z.name==="\\oiiint")&&(Et=z.name.substr(1),z.name=Et==="oiint"?"\\iint":"\\iiint"),tt=Xe.makeSymbol(z.name,ft,"math",d,["mop","op-symbol",Ne?"large-op":"small-op"]),Et.length>0){var Mt=tt.italic,Ft=Xe.staticSvg(Et+"Size"+(Ne?"2":"1"),d);tt=Xe.makeVList({positionType:"individualShift",children:[{type:"elem",elem:tt,shift:0},{type:"elem",elem:Ft,shift:Ne?.08:0}]},d),z.name="\\"+Et,tt.classes.unshift("mop"),tt.italic=Mt}}else if(z.body){var je=sn(z.body,d,!0);je.length===1&&je[0]instanceof le?(tt=je[0],tt.classes[0]="mop"):tt=Xe.makeSpan(["mop"],Xe.tryCombineChars(je),d)}else{for(var dr=[],Rr=1;Rr<z.name.length;Rr++)dr.push(Xe.mathsym(z.name[Rr],z.mode,d));tt=Xe.makeSpan(["mop"],dr,d)}var $r=0,Br=0;return(tt instanceof le||z.name==="\\oiint"||z.name==="\\oiiint")&&!z.suppressBaseShift&&($r=(tt.height-tt.depth)/2-d.fontMetrics().axisHeight,Br=tt.italic),C?_s(tt,f,g,d,Te,Br,$r):($r&&(tt.style.position="relative",tt.style.top=$r+"em"),tt)},ys=function(u,d){var f;if(u.symbol)f=new Ar("mo",[Hn(u.name,u.mode)]),B.contains(Ma,u.name)&&f.setAttribute("largeop","false");else if(u.body)f=new Ar("mo",An(u.body,d));else{f=new Ar("mi",[new _i(u.name.slice(1))]);var g=new Ar("mo",[Hn("\u2061","text")]);u.parentIsSupSub?f=new Ar("mo",[f,g]):f=vi([f,g])}return f},ca={"\u220F":"\\prod","\u2210":"\\coprod","\u2211":"\\sum","\u22C0":"\\bigwedge","\u22C1":"\\bigvee","\u22C2":"\\bigcap","\u22C3":"\\bigcup","\u2A00":"\\bigodot","\u2A01":"\\bigoplus","\u2A02":"\\bigotimes","\u2A04":"\\biguplus","\u2A06":"\\bigsqcup"};rr({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(u,d){var f=u.parser,g=u.funcName,C=g;return C.length===1&&(C=ca[C]),{type:"op",mode:f.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:C}},htmlBuilder:ts,mathmlBuilder:ys}),rr({type:"op",names:["\\mathop"],props:{numArgs:1},handler:function(u,d){var f=u.parser,g=d[0];return{type:"op",mode:f.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:nn(g)}},htmlBuilder:ts,mathmlBuilder:ys});var fo={"\u222B":"\\int","\u222C":"\\iint","\u222D":"\\iiint","\u222E":"\\oint","\u222F":"\\oiint","\u2230":"\\oiiint"};rr({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(u){var d=u.parser,f=u.funcName;return{type:"op",mode:d.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:f}},htmlBuilder:ts,mathmlBuilder:ys}),rr({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler:function(u){var d=u.parser,f=u.funcName;return{type:"op",mode:d.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:f}},htmlBuilder:ts,mathmlBuilder:ys}),rr({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","\u222B","\u222C","\u222D","\u222E","\u222F","\u2230"],props:{numArgs:0},handler:function(u){var d=u.parser,f=u.funcName,g=f;return g.length===1&&(g=fo[g]),{type:"op",mode:d.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:g}},htmlBuilder:ts,mathmlBuilder:ys});var Ms=function(u,d){var f,g,C=!1,z,ge=Jt(u,"supsub");ge?(f=ge.sup,g=ge.sub,z=Wt(ge.base,"operatorname"),C=!0):z=Wt(u,"operatorname");var Te;if(z.body.length>0){for(var Ne=z.body.map(function(Mt){var Ft=Mt.text;return typeof Ft=="string"?{type:"textord",mode:Mt.mode,text:Ft}:Mt}),tt=sn(Ne,d.withFont("mathrm"),!0),ft=0;ft<tt.length;ft++){var Et=tt[ft];Et instanceof le&&(Et.text=Et.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}Te=Xe.makeSpan(["mop"],tt,d)}else Te=Xe.makeSpan(["mop"],[],d);return C?_s(Te,f,g,d,d.style,0,0):Te},po=function(u,d){for(var f=An(u.body,d.withFont("mathrm")),g=!0,C=0;C<f.length;C++){var z=f[C];if(!(z instanceof Gt.SpaceNode))if(z instanceof Gt.MathNode)switch(z.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var ge=z.children[0];z.children.length===1&&ge instanceof Gt.TextNode?ge.text=ge.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):g=!1;break}default:g=!1}else g=!1}if(g){var Te=f.map(function(ft){return ft.toText()}).join("");f=[new Gt.TextNode(Te)]}var Ne=new Gt.MathNode("mi",f);Ne.setAttribute("mathvariant","normal");var tt=new Gt.MathNode("mo",[Hn("\u2061","text")]);return u.parentIsSupSub?new Gt.MathNode("mo",[Ne,tt]):Gt.newDocumentFragment([Ne,tt])};rr({type:"operatorname",names:["\\operatorname","\\operatorname*"],props:{numArgs:1},handler:function(u,d){var f=u.parser,g=u.funcName,C=d[0];return{type:"operatorname",mode:f.mode,body:nn(C),alwaysHandleSupSub:g==="\\operatorname*",limits:!1,parentIsSupSub:!1}},htmlBuilder:Ms,mathmlBuilder:po}),Tn({type:"ordgroup",htmlBuilder:function(u,d){return u.semisimple?Xe.makeFragment(sn(u.body,d,!1)):Xe.makeSpan(["mord"],sn(u.body,d,!0),d)},mathmlBuilder:function(u,d){return yn(u.body,d,!0)}}),rr({type:"overline",names:["\\overline"],props:{numArgs:1},handler:function(u,d){var f=u.parser,g=d[0];return{type:"overline",mode:f.mode,body:g}},htmlBuilder:function(u,d){var f=Hr(u.body,d.havingCrampedStyle()),g=Xe.makeLineSpan("overline-line",d),C=d.fontMetrics().defaultRuleThickness,z=Xe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f},{type:"kern",size:3*C},{type:"elem",elem:g},{type:"kern",size:C}]},d);return Xe.makeSpan(["mord","overline"],[z],d)},mathmlBuilder:function(u,d){var f=new Gt.MathNode("mo",[new Gt.TextNode("\u203E")]);f.setAttribute("stretchy","true");var g=new Gt.MathNode("mover",[Xr(u.body,d),f]);return g.setAttribute("accent","true"),g}}),rr({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,d){var f=u.parser,g=d[0];return{type:"phantom",mode:f.mode,body:nn(g)}},htmlBuilder:function(u,d){var f=sn(u.body,d.withPhantom(),!1);return Xe.makeFragment(f)},mathmlBuilder:function(u,d){var f=An(u.body,d);return new Gt.MathNode("mphantom",f)}}),rr({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,d){var f=u.parser,g=d[0];return{type:"hphantom",mode:f.mode,body:g}},htmlBuilder:function(u,d){var f=Xe.makeSpan([],[Hr(u.body,d.withPhantom())]);if(f.height=0,f.depth=0,f.children)for(var g=0;g<f.children.length;g++)f.children[g].height=0,f.children[g].depth=0;return f=Xe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f}]},d),Xe.makeSpan(["mord"],[f],d)},mathmlBuilder:function(u,d){var f=An(nn(u.body),d),g=new Gt.MathNode("mphantom",f),C=new Gt.MathNode("mpadded",[g]);return C.setAttribute("height","0px"),C.setAttribute("depth","0px"),C}}),rr({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:function(u,d){var f=u.parser,g=d[0];return{type:"vphantom",mode:f.mode,body:g}},htmlBuilder:function(u,d){var f=Xe.makeSpan(["inner"],[Hr(u.body,d.withPhantom())]),g=Xe.makeSpan(["fix"],[]);return Xe.makeSpan(["mord","rlap"],[f,g],d)},mathmlBuilder:function(u,d){var f=An(nn(u.body),d),g=new Gt.MathNode("mphantom",f),C=new Gt.MathNode("mpadded",[g]);return C.setAttribute("width","0px"),C}}),rr({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler:function(u,d){var f=u.parser,g=Wt(d[0],"size").value,C=d[1];return{type:"raisebox",mode:f.mode,dy:g,body:C}},htmlBuilder:function(u,d){var f=Hr(u.body,d),g=at(u.dy,d);return Xe.makeVList({positionType:"shift",positionData:-g,children:[{type:"elem",elem:f}]},d)},mathmlBuilder:function(u,d){var f=new Gt.MathNode("mpadded",[Xr(u.body,d)]),g=u.dy.number+u.dy.unit;return f.setAttribute("voffset",g),f}}),rr({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler:function(u,d,f){var g=u.parser,C=f[0],z=Wt(d[0],"size"),ge=Wt(d[1],"size");return{type:"rule",mode:g.mode,shift:C&&Wt(C,"size").value,width:z.value,height:ge.value}},htmlBuilder:function(u,d){var f=Xe.makeSpan(["mord","rule"],[],d),g=at(u.width,d),C=at(u.height,d),z=u.shift?at(u.shift,d):0;return f.style.borderRightWidth=g+"em",f.style.borderTopWidth=C+"em",f.style.bottom=z+"em",f.width=g,f.height=C+z,f.depth=-z,f.maxFontSize=C*1.125*d.sizeMultiplier,f},mathmlBuilder:function(u,d){var f=at(u.width,d),g=at(u.height,d),C=u.shift?at(u.shift,d):0,z=d.color&&d.getColor()||"black",ge=new Gt.MathNode("mspace");ge.setAttribute("mathbackground",z),ge.setAttribute("width",f+"em"),ge.setAttribute("height",g+"em");var Te=new Gt.MathNode("mpadded",[ge]);return C>=0?Te.setAttribute("height","+"+C+"em"):(Te.setAttribute("height",C+"em"),Te.setAttribute("depth","+"+-C+"em")),Te.setAttribute("voffset",C+"em"),Te}});function Ba(H,u,d){for(var f=sn(H,u,!1),g=u.sizeMultiplier/d.sizeMultiplier,C=0;C<f.length;C++){var z=f[C].classes.indexOf("sizing");z<0?Array.prototype.push.apply(f[C].classes,u.sizingClasses(d)):f[C].classes[z+1]==="reset-size"+u.size&&(f[C].classes[z+1]="reset-size"+d.size),f[C].height*=g,f[C].depth*=g}return Xe.makeFragment(f)}var ha=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Na=function(u,d){var f=d.havingSize(u.size);return Ba(u.body,f,d)};rr({type:"sizing",names:ha,props:{numArgs:0,allowedInText:!0},handler:function(u,d){var f=u.breakOnTokenText,g=u.funcName,C=u.parser,z=C.parseExpression(!1,f);return{type:"sizing",mode:C.mode,size:ha.indexOf(g)+1,body:z}},htmlBuilder:Na,mathmlBuilder:function(u,d){var f=d.havingSize(u.size),g=An(u.body,f),C=new Gt.MathNode("mstyle",g);return C.setAttribute("mathsize",f.sizeMultiplier+"em"),C}}),rr({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:function(u,d,f){var g=u.parser,C=!1,z=!1,ge=f[0]&&Wt(f[0],"ordgroup");if(ge)for(var Te="",Ne=0;Ne<ge.body.length;++Ne){var tt=ge.body[Ne];if(Te=tt.text,Te==="t")C=!0;else if(Te==="b")z=!0;else{C=!1,z=!1;break}}else C=!0,z=!0;var ft=d[0];return{type:"smash",mode:g.mode,body:ft,smashHeight:C,smashDepth:z}},htmlBuilder:function(u,d){var f=Xe.makeSpan([],[Hr(u.body,d)]);if(!u.smashHeight&&!u.smashDepth)return f;if(u.smashHeight&&(f.height=0,f.children))for(var g=0;g<f.children.length;g++)f.children[g].height=0;if(u.smashDepth&&(f.depth=0,f.children))for(var C=0;C<f.children.length;C++)f.children[C].depth=0;var z=Xe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f}]},d);return Xe.makeSpan(["mord"],[z],d)},mathmlBuilder:function(u,d){var f=new Gt.MathNode("mpadded",[Xr(u.body,d)]);return u.smashHeight&&f.setAttribute("height","0px"),u.smashDepth&&f.setAttribute("depth","0px"),f}}),rr({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler:function(u,d,f){var g=u.parser,C=f[0],z=d[0];return{type:"sqrt",mode:g.mode,body:z,index:C}},htmlBuilder:function(u,d){var f=Hr(u.body,d.havingCrampedStyle());f.height===0&&(f.height=d.fontMetrics().xHeight),f=Xe.wrapFragment(f,d);var g=d.fontMetrics(),C=g.defaultRuleThickness,z=C;d.style.id<v.TEXT.id&&(z=d.fontMetrics().xHeight);var ge=C+z/4,Te=f.height+f.depth+ge+C,Ne=pi.sqrtImage(Te,d),tt=Ne.span,ft=Ne.ruleWidth,Et=Ne.advanceWidth,Mt=tt.height-ft;Mt>f.height+f.depth+ge&&(ge=(ge+Mt-f.height-f.depth)/2);var Ft=tt.height-f.height-ge-ft;f.style.paddingLeft=Et+"em";var je=Xe.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:f,wrapperClasses:["svg-align"]},{type:"kern",size:-(f.height+Ft)},{type:"elem",elem:tt},{type:"kern",size:ft}]},d);if(u.index){var dr=d.havingStyle(v.SCRIPTSCRIPT),Rr=Hr(u.index,dr,d),$r=.6*(je.height-je.depth),Br=Xe.makeVList({positionType:"shift",positionData:-$r,children:[{type:"elem",elem:Rr}]},d),Dn=Xe.makeSpan(["root"],[Br]);return Xe.makeSpan(["mord","sqrt"],[Dn,je],d)}else return Xe.makeSpan(["mord","sqrt"],[je],d)},mathmlBuilder:function(u,d){var f=u.body,g=u.index;return g?new Gt.MathNode("mroot",[Xr(f,d),Xr(g,d)]):new Gt.MathNode("msqrt",[Xr(f,d)])}});var Fa={display:v.DISPLAY,text:v.TEXT,script:v.SCRIPT,scriptscript:v.SCRIPTSCRIPT};rr({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0},handler:function(u,d){var f=u.breakOnTokenText,g=u.funcName,C=u.parser,z=C.parseExpression(!0,f),ge=g.slice(1,g.length-5);return{type:"styling",mode:C.mode,style:ge,body:z}},htmlBuilder:function(u,d){var f=Fa[u.style],g=d.havingStyle(f).withFont("");return Ba(u.body,g,d)},mathmlBuilder:function(u,d){var f=Fa[u.style],g=d.havingStyle(f),C=An(u.body,g),z=new Gt.MathNode("mstyle",C),ge={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},Te=ge[u.style];return z.setAttribute("scriptlevel",Te[0]),z.setAttribute("displaystyle",Te[1]),z}});var $a=function(u,d){var f=u.base;if(f)if(f.type==="op"){var g=f.limits&&(d.style.size===v.DISPLAY.size||f.alwaysHandleSupSub);return g?ts:null}else if(f.type==="operatorname"){var C=f.alwaysHandleSupSub&&(d.style.size===v.DISPLAY.size||f.limits);return C?Ms:null}else{if(f.type==="accent")return B.isCharacterBox(f.base)?bn:null;if(f.type==="horizBrace"){var z=!u.sub;return z===f.isOver?Oa:null}else return null}else return null};Tn({type:"supsub",htmlBuilder:function(u,d){var f=$a(u,d);if(f)return f(u,d);var g=u.base,C=u.sup,z=u.sub,ge=Hr(g,d),Te,Ne,tt=d.fontMetrics(),ft=0,Et=0,Mt=g&&B.isCharacterBox(g);if(C){var Ft=d.havingStyle(d.style.sup());Te=Hr(C,Ft,d),Mt||(ft=ge.height-Ft.fontMetrics().supDrop*Ft.sizeMultiplier/d.sizeMultiplier)}if(z){var je=d.havingStyle(d.style.sub());Ne=Hr(z,je,d),Mt||(Et=ge.depth+je.fontMetrics().subDrop*je.sizeMultiplier/d.sizeMultiplier)}var dr;d.style===v.DISPLAY?dr=tt.sup1:d.style.cramped?dr=tt.sup3:dr=tt.sup2;var Rr=d.sizeMultiplier,$r=.5/tt.ptPerEm/Rr+"em",Br=null;if(Ne){var Dn=u.base&&u.base.type==="op"&&u.base.name&&(u.base.name==="\\oiint"||u.base.name==="\\oiiint");(ge instanceof le||Dn)&&(Br=-ge.italic+"em")}var xn;if(Te&&Ne){ft=Math.max(ft,dr,Te.depth+.25*tt.xHeight),Et=Math.max(Et,tt.sub2);var Bn=tt.defaultRuleThickness,Nn=4*Bn;if(ft-Te.depth-(Ne.height-Et)<Nn){Et=Nn-(ft-Te.depth)+Ne.height;var Gn=.8*tt.xHeight-(ft-Te.depth);Gn>0&&(ft+=Gn,Et-=Gn)}var Kn=[{type:"elem",elem:Ne,shift:Et,marginRight:$r,marginLeft:Br},{type:"elem",elem:Te,shift:-ft,marginRight:$r}];xn=Xe.makeVList({positionType:"individualShift",children:Kn},d)}else if(Ne){Et=Math.max(Et,tt.sub1,Ne.height-.8*tt.xHeight);var Yn=[{type:"elem",elem:Ne,marginLeft:Br,marginRight:$r}];xn=Xe.makeVList({positionType:"shift",positionData:Et,children:Yn},d)}else if(Te)ft=Math.max(ft,dr,Te.depth+.25*tt.xHeight),xn=Xe.makeVList({positionType:"shift",positionData:-ft,children:[{type:"elem",elem:Te,marginRight:$r}]},d);else throw new Error("supsub must have either sup or sub.");var gn=ri(ge,"right")||"mord";return Xe.makeSpan([gn],[ge,Xe.makeSpan(["msupsub"],[xn])],d)},mathmlBuilder:function(u,d){var f=!1,g,C,z=Jt(u.base,"horizBrace");z&&(C=!!u.sup,C===z.isOver&&(f=!0,g=z.isOver)),u.base&&(u.base.type==="op"||u.base.type==="operatorname")&&(u.base.parentIsSupSub=!0);var ge=[Xr(u.base,d)];u.sub&&ge.push(Xr(u.sub,d)),u.sup&&ge.push(Xr(u.sup,d));var Te;if(f)Te=g?"mover":"munder";else if(u.sub)if(u.sup){var ft=u.base;ft&&ft.type==="op"&&ft.limits&&d.style===v.DISPLAY||ft&&ft.type==="operatorname"&&ft.alwaysHandleSupSub&&(d.style===v.DISPLAY||ft.limits)?Te="munderover":Te="msubsup"}else{var tt=u.base;tt&&tt.type==="op"&&tt.limits&&(d.style===v.DISPLAY||tt.alwaysHandleSupSub)||tt&&tt.type==="operatorname"&&tt.alwaysHandleSupSub&&(tt.limits||d.style===v.DISPLAY)?Te="munder":Te="msub"}else{var Ne=u.base;Ne&&Ne.type==="op"&&Ne.limits&&(d.style===v.DISPLAY||Ne.alwaysHandleSupSub)||Ne&&Ne.type==="operatorname"&&Ne.alwaysHandleSupSub&&(Ne.limits||d.style===v.DISPLAY)?Te="mover":Te="msup"}var Et=new Gt.MathNode(Te,ge);return Et}}),Tn({type:"atom",htmlBuilder:function(u,d){return Xe.mathsym(u.text,u.mode,d,["m"+u.family])},mathmlBuilder:function(u,d){var f=new Gt.MathNode("mo",[Hn(u.text,u.mode)]);if(u.family==="bin"){var g=hi(u,d);g==="bold-italic"&&f.setAttribute("mathvariant",g)}else u.family==="punct"?f.setAttribute("separator","true"):(u.family==="open"||u.family==="close")&&f.setAttribute("stretchy","false");return f}});var Ua={mi:"italic",mn:"normal",mtext:"normal"};Tn({type:"mathord",htmlBuilder:function(u,d){return Xe.makeOrd(u,d,"mathord")},mathmlBuilder:function(u,d){var f=new Gt.MathNode("mi",[Hn(u.text,u.mode,d)]),g=hi(u,d)||"italic";return g!==Ua[f.type]&&f.setAttribute("mathvariant",g),f}}),Tn({type:"textord",htmlBuilder:function(u,d){return Xe.makeOrd(u,d,"textord")},mathmlBuilder:function(u,d){var f=Hn(u.text,u.mode,d),g=hi(u,d)||"normal",C;return u.mode==="text"?C=new Gt.MathNode("mtext",[f]):/[0-9]/.test(u.text)?C=new Gt.MathNode("mn",[f]):u.text==="\\prime"?C=new Gt.MathNode("mo",[f]):C=new Gt.MathNode("mi",[f]),g!==Ua[C.type]&&C.setAttribute("mathvariant",g),C}});var da={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},fa={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Tn({type:"spacing",htmlBuilder:function(u,d){if(fa.hasOwnProperty(u.text)){var f=fa[u.text].className||"";if(u.mode==="text"){var g=Xe.makeOrd(u,d,"textord");return g.classes.push(f),g}else return Xe.makeSpan(["mspace",f],[Xe.mathsym(u.text,u.mode,d)],d)}else{if(da.hasOwnProperty(u.text))return Xe.makeSpan(["mspace",da[u.text]],[],d);throw new m('Unknown type of space "'+u.text+'"')}},mathmlBuilder:function(u,d){var f;if(fa.hasOwnProperty(u.text))f=new Gt.MathNode("mtext",[new Gt.TextNode("\xA0")]);else{if(da.hasOwnProperty(u.text))return new Gt.MathNode("mspace");throw new m('Unknown type of space "'+u.text+'"')}return f}});var za=function(){var u=new Gt.MathNode("mtd",[]);return u.setAttribute("width","50%"),u};Tn({type:"tag",mathmlBuilder:function(u,d){var f=new Gt.MathNode("mtable",[new Gt.MathNode("mtr",[za(),new Gt.MathNode("mtd",[yn(u.body,d)]),za(),new Gt.MathNode("mtd",[yn(u.tag,d)])])]);return f.setAttribute("width","100%"),f}});var Ga={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},pa={"\\textbf":"textbf","\\textmd":"textmd"},mo={"\\textit":"textit","\\textup":"textup"},Ha=function(u,d){var f=u.font;return f?Ga[f]?d.withTextFontFamily(Ga[f]):pa[f]?d.withTextFontWeight(pa[f]):d.withTextFontShape(mo[f]):d};rr({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup"],props:{numArgs:1,argTypes:["text"],greediness:2,allowedInText:!0},handler:function(u,d){var f=u.parser,g=u.funcName,C=d[0];return{type:"text",mode:f.mode,body:nn(C),font:g}},htmlBuilder:function(u,d){var f=Ha(u,d),g=sn(u.body,f,!0);return Xe.makeSpan(["mord","text"],Xe.tryCombineChars(g),f)},mathmlBuilder:function(u,d){var f=Ha(u,d);return yn(u.body,f)}}),rr({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler:function(u,d){var f=u.parser;return{type:"underline",mode:f.mode,body:d[0]}},htmlBuilder:function(u,d){var f=Hr(u.body,d),g=Xe.makeLineSpan("underline-line",d),C=d.fontMetrics().defaultRuleThickness,z=Xe.makeVList({positionType:"top",positionData:f.height,children:[{type:"kern",size:C},{type:"elem",elem:g},{type:"kern",size:3*C},{type:"elem",elem:f}]},d);return Xe.makeSpan(["mord","underline"],[z],d)},mathmlBuilder:function(u,d){var f=new Gt.MathNode("mo",[new Gt.TextNode("\u203E")]);f.setAttribute("stretchy","true");var g=new Gt.MathNode("munder",[Xr(u.body,d),f]);return g.setAttribute("accentunder","true"),g}}),rr({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler:function(u,d,f){throw new m("\\verb ended by end of line instead of matching delimiter")},htmlBuilder:function(u,d){for(var f=ja(u),g=[],C=d.havingStyle(d.style.text()),z=0;z<f.length;z++){var ge=f[z];ge==="~"&&(ge="\\textasciitilde"),g.push(Xe.makeSymbol(ge,"Typewriter-Regular",u.mode,C,["mord","texttt"]))}return Xe.makeSpan(["mord","text"].concat(C.sizingClasses(d)),Xe.tryCombineChars(g),C)},mathmlBuilder:function(u,d){var f=new Gt.TextNode(ja(u)),g=new Gt.MathNode("mtext",[f]);return g.setAttribute("mathvariant","monospace"),g}});var ja=function(u){return u.body.replace(/ /g,u.star?"\u2423":"\xA0")},ma=oi,Bs=ma,ga=`[ \r
|
|
]`,Ka="\\\\[a-zA-Z@]+",go="\\\\[^\uD800-\uDFFF]",vo=""+Ka+ga+"*",_o=new RegExp("^("+Ka+")"+ga+"*$"),bs="[\u0300-\u036F]",yo=new RegExp(bs+"+$"),Wa="("+ga+"+)|([!-\\[\\]-\u2027\u202A-\uD7FF\uF900-\uFFFF]"+(bs+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(bs+"*")+"|\\\\verb\\*([^]).*?\\3|\\\\verb([^*a-zA-Z]).*?\\4|\\\\operatorname\\*"+("|"+vo)+("|"+go+")"),va=function(){function H(d,f){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=d,this.settings=f,this.tokenRegex=new RegExp(Wa,"g"),this.catcodes={"%":14}}var u=H.prototype;return u.setCatcode=function(f,g){this.catcodes[f]=g},u.lex=function(){var f=this.input,g=this.tokenRegex.lastIndex;if(g===f.length)return new _e("EOF",new Se(this,g,g));var C=this.tokenRegex.exec(f);if(C===null||C.index!==g)throw new m("Unexpected character: '"+f[g]+"'",new _e(f[g],new Se(this,g,g+1)));var z=C[2]||" ";if(this.catcodes[z]===14){var ge=f.indexOf(`
|
|
`,this.tokenRegex.lastIndex);return ge===-1?(this.tokenRegex.lastIndex=f.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=ge+1,this.lex()}var Te=z.match(_o);return Te&&(z=Te[1]),new _e(z,new Se(this,g,this.tokenRegex.lastIndex))},H}(),bo=function(){function H(d,f){d===void 0&&(d={}),f===void 0&&(f={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=f,this.builtins=d,this.undefStack=[]}var u=H.prototype;return u.beginGroup=function(){this.undefStack.push({})},u.endGroup=function(){if(this.undefStack.length===0)throw new m("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var f=this.undefStack.pop();for(var g in f)f.hasOwnProperty(g)&&(f[g]===void 0?delete this.current[g]:this.current[g]=f[g])},u.has=function(f){return this.current.hasOwnProperty(f)||this.builtins.hasOwnProperty(f)},u.get=function(f){return this.current.hasOwnProperty(f)?this.current[f]:this.builtins[f]},u.set=function(f,g,C){if(C===void 0&&(C=!1),C){for(var z=0;z<this.undefStack.length;z++)delete this.undefStack[z][f];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][f]=g)}else{var ge=this.undefStack[this.undefStack.length-1];ge&&!ge.hasOwnProperty(f)&&(ge[f]=this.current[f])}this.current[f]=g},H}(),Xs={},Si=Xs;function Re(H,u){Xs[H]=u}Re("\\@firstoftwo",function(H){var u=H.consumeArgs(2);return{tokens:u[0],numArgs:0}}),Re("\\@secondoftwo",function(H){var u=H.consumeArgs(2);return{tokens:u[1],numArgs:0}}),Re("\\@ifnextchar",function(H){var u=H.consumeArgs(3),d=H.future();return u[0].length===1&&u[0][0].text===d.text?{tokens:u[1],numArgs:0}:{tokens:u[2],numArgs:0}}),Re("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}"),Re("\\TextOrMath",function(H){var u=H.consumeArgs(2);return H.mode==="text"?{tokens:u[0],numArgs:0}:{tokens:u[1],numArgs:0}});var qs={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};Re("\\char",function(H){var u=H.popToken(),d,f="";if(u.text==="'")d=8,u=H.popToken();else if(u.text==='"')d=16,u=H.popToken();else if(u.text==="`")if(u=H.popToken(),u.text[0]==="\\")f=u.text.charCodeAt(1);else{if(u.text==="EOF")throw new m("\\char` missing argument");f=u.text.charCodeAt(0)}else d=10;if(d){if(f=qs[u.text],f==null||f>=d)throw new m("Invalid base-"+d+" digit "+u.text);for(var g;(g=qs[H.future().text])!=null&&g<d;)f*=d,f+=g,H.popToken()}return"\\@char{"+f+"}"});var _a=function(u,d){var f=u.consumeArgs(1)[0];if(f.length!==1)throw new m("\\gdef's first argument must be a macro name");var g=f[0].text,C=0;for(f=u.consumeArgs(1)[0];f.length===1&&f[0].text==="#";){if(f=u.consumeArgs(1)[0],f.length!==1)throw new m('Invalid argument number length "'+f.length+'"');if(!/^[1-9]$/.test(f[0].text))throw new m('Invalid argument number "'+f[0].text+'"');if(C++,parseInt(f[0].text)!==C)throw new m('Argument number "'+f[0].text+'" out of order');f=u.consumeArgs(1)[0]}return u.macros.set(g,{tokens:f,numArgs:C},d),""};Re("\\gdef",function(H){return _a(H,!0)}),Re("\\def",function(H){return _a(H,!1)}),Re("\\global",function(H){var u=H.consumeArgs(1)[0];if(u.length!==1)throw new m("Invalid command after \\global");var d=u[0].text;if(d==="\\def")return _a(H,!0);throw new m("Invalid command '"+d+"' after \\global")});var xs=function(u,d,f){var g=u.consumeArgs(1)[0];if(g.length!==1)throw new m("\\newcommand's first argument must be a macro name");var C=g[0].text,z=u.isDefined(C);if(z&&!d)throw new m("\\newcommand{"+C+"} attempting to redefine "+(C+"; use \\renewcommand"));if(!z&&!f)throw new m("\\renewcommand{"+C+"} when command "+C+" does not yet exist; use \\newcommand");var ge=0;if(g=u.consumeArgs(1)[0],g.length===1&&g[0].text==="["){for(var Te="",Ne=u.expandNextToken();Ne.text!=="]"&&Ne.text!=="EOF";)Te+=Ne.text,Ne=u.expandNextToken();if(!Te.match(/^\s*[0-9]+\s*$/))throw new m("Invalid number of arguments: "+Te);ge=parseInt(Te),g=u.consumeArgs(1)[0]}return u.macros.set(C,{tokens:g,numArgs:ge}),""};Re("\\newcommand",function(H){return xs(H,!1,!0)}),Re("\\renewcommand",function(H){return xs(H,!0,!1)}),Re("\\providecommand",function(H){return xs(H,!0,!0)}),Re("\\bgroup","{"),Re("\\egroup","}"),Re("\\lq","`"),Re("\\rq","'"),Re("\\aa","\\r a"),Re("\\AA","\\r A"),Re("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`\xA9}"),Re("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),Re("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`\xAE}"),Re("\u212C","\\mathscr{B}"),Re("\u2130","\\mathscr{E}"),Re("\u2131","\\mathscr{F}"),Re("\u210B","\\mathscr{H}"),Re("\u2110","\\mathscr{I}"),Re("\u2112","\\mathscr{L}"),Re("\u2133","\\mathscr{M}"),Re("\u211B","\\mathscr{R}"),Re("\u212D","\\mathfrak{C}"),Re("\u210C","\\mathfrak{H}"),Re("\u2128","\\mathfrak{Z}"),Re("\\Bbbk","\\Bbb{k}"),Re("\xB7","\\cdotp"),Re("\\llap","\\mathllap{\\textrm{#1}}"),Re("\\rlap","\\mathrlap{\\textrm{#1}}"),Re("\\clap","\\mathclap{\\textrm{#1}}"),Re("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),Re("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`\u2260}}"),Re("\\ne","\\neq"),Re("\u2260","\\neq"),Re("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`\u2209}}"),Re("\u2209","\\notin"),Re("\u2258","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`\u2258}}"),Re("\u2259","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`\u2258}}"),Re("\u225A","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`\u225A}}"),Re("\u225B","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`\u225B}}"),Re("\u225D","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`\u225D}}"),Re("\u225E","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`\u225E}}"),Re("\u225F","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`\u225F}}"),Re("\u27C2","\\perp"),Re("\u203C","\\mathclose{!\\mkern-0.8mu!}"),Re("\u220C","\\notni"),Re("\u231C","\\ulcorner"),Re("\u231D","\\urcorner"),Re("\u231E","\\llcorner"),Re("\u231F","\\lrcorner"),Re("\xA9","\\copyright"),Re("\xAE","\\textregistered"),Re("\uFE0F","\\textregistered"),Re("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),Re("\u22EE","\\vdots"),Re("\\varGamma","\\mathit{\\Gamma}"),Re("\\varDelta","\\mathit{\\Delta}"),Re("\\varTheta","\\mathit{\\Theta}"),Re("\\varLambda","\\mathit{\\Lambda}"),Re("\\varXi","\\mathit{\\Xi}"),Re("\\varPi","\\mathit{\\Pi}"),Re("\\varSigma","\\mathit{\\Sigma}"),Re("\\varUpsilon","\\mathit{\\Upsilon}"),Re("\\varPhi","\\mathit{\\Phi}"),Re("\\varPsi","\\mathit{\\Psi}"),Re("\\varOmega","\\mathit{\\Omega}"),Re("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),Re("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu"),Re("\\boxed","\\fbox{$\\displaystyle{#1}$}"),Re("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),Re("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),Re("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");var Va={",":"\\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"};Re("\\dots",function(H){var u="\\dotso",d=H.expandAfterFuture().text;return d in Va?u=Va[d]:(d.substr(0,4)==="\\not"||d in gt.math&&B.contains(["bin","rel"],gt.math[d].group))&&(u="\\dotsb"),u});var ya={")":!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};Re("\\dotso",function(H){var u=H.future().text;return u in ya?"\\ldots\\,":"\\ldots"}),Re("\\dotsc",function(H){var u=H.future().text;return u in ya&&u!==","?"\\ldots\\,":"\\ldots"}),Re("\\cdots",function(H){var u=H.future().text;return u in ya?"\\@cdots\\,":"\\@cdots"}),Re("\\dotsb","\\cdots"),Re("\\dotsm","\\cdots"),Re("\\dotsi","\\!\\cdots"),Re("\\dotsx","\\ldots\\,"),Re("\\DOTSI","\\relax"),Re("\\DOTSB","\\relax"),Re("\\DOTSX","\\relax"),Re("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),Re("\\,","\\tmspace+{3mu}{.1667em}"),Re("\\thinspace","\\,"),Re("\\>","\\mskip{4mu}"),Re("\\:","\\tmspace+{4mu}{.2222em}"),Re("\\medspace","\\:"),Re("\\;","\\tmspace+{5mu}{.2777em}"),Re("\\thickspace","\\;"),Re("\\!","\\tmspace-{3mu}{.1667em}"),Re("\\negthinspace","\\!"),Re("\\negmedspace","\\tmspace-{4mu}{.2222em}"),Re("\\negthickspace","\\tmspace-{5mu}{.277em}"),Re("\\enspace","\\kern.5em "),Re("\\enskip","\\hskip.5em\\relax"),Re("\\quad","\\hskip1em\\relax"),Re("\\qquad","\\hskip2em\\relax"),Re("\\tag","\\@ifstar\\tag@literal\\tag@paren"),Re("\\tag@paren","\\tag@literal{({#1})}"),Re("\\tag@literal",function(H){if(H.macros.get("\\df@tag"))throw new m("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),Re("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),Re("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),Re("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),Re("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),Re("\\pmb","\\html@mathml{\\@binrel{#1}{\\mathrlap{#1}\\kern0.5px#1}}{\\mathbf{#1}}"),Re("\\\\","\\newline"),Re("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var Za=it["Main-Regular"][84][1]-.7*it["Main-Regular"][65][1]+"em";Re("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+Za+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}"),Re("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+Za+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}"),Re("\\hspace","\\@ifstar\\@hspacer\\@hspace"),Re("\\@hspace","\\hskip #1\\relax"),Re("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),Re("\\ordinarycolon",":"),Re("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),Re("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),Re("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),Re("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),Re("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),Re("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),Re("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),Re("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),Re("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),Re("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),Re("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),Re("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),Re("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),Re("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),Re("\u2237","\\dblcolon"),Re("\u2239","\\eqcolon"),Re("\u2254","\\coloneqq"),Re("\u2255","\\eqqcolon"),Re("\u2A74","\\Coloneqq"),Re("\\ratio","\\vcentcolon"),Re("\\coloncolon","\\dblcolon"),Re("\\colonequals","\\coloneqq"),Re("\\coloncolonequals","\\Coloneqq"),Re("\\equalscolon","\\eqqcolon"),Re("\\equalscoloncolon","\\Eqqcolon"),Re("\\colonminus","\\coloneq"),Re("\\coloncolonminus","\\Coloneq"),Re("\\minuscolon","\\eqcolon"),Re("\\minuscoloncolon","\\Eqcolon"),Re("\\coloncolonapprox","\\Colonapprox"),Re("\\coloncolonsim","\\Colonsim"),Re("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Re("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Re("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),Re("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),Re("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`\u220C}}"),Re("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),Re("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),Re("\\gvertneqq","\\html@mathml{\\@gvertneqq}{\u2269}"),Re("\\lvertneqq","\\html@mathml{\\@lvertneqq}{\u2268}"),Re("\\ngeqq","\\html@mathml{\\@ngeqq}{\u2271}"),Re("\\ngeqslant","\\html@mathml{\\@ngeqslant}{\u2271}"),Re("\\nleqq","\\html@mathml{\\@nleqq}{\u2270}"),Re("\\nleqslant","\\html@mathml{\\@nleqslant}{\u2270}"),Re("\\nshortmid","\\html@mathml{\\@nshortmid}{\u2224}"),Re("\\nshortparallel","\\html@mathml{\\@nshortparallel}{\u2226}"),Re("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{\u2288}"),Re("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{\u2289}"),Re("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{\u228A}"),Re("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{\u2ACB}"),Re("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{\u228B}"),Re("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{\u2ACC}"),Re("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`\u27E6}}"),Re("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`\u27E7}}"),Re("\u27E6","\\llbracket"),Re("\u27E7","\\rrbracket"),Re("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`\u2983}}"),Re("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`\u2984}}"),Re("\u2983","\\lBrace"),Re("\u2984","\\rBrace"),Re("\\darr","\\downarrow"),Re("\\dArr","\\Downarrow"),Re("\\Darr","\\Downarrow"),Re("\\lang","\\langle"),Re("\\rang","\\rangle"),Re("\\uarr","\\uparrow"),Re("\\uArr","\\Uparrow"),Re("\\Uarr","\\Uparrow"),Re("\\N","\\mathbb{N}"),Re("\\R","\\mathbb{R}"),Re("\\Z","\\mathbb{Z}"),Re("\\alef","\\aleph"),Re("\\alefsym","\\aleph"),Re("\\Alpha","\\mathrm{A}"),Re("\\Beta","\\mathrm{B}"),Re("\\bull","\\bullet"),Re("\\Chi","\\mathrm{X}"),Re("\\clubs","\\clubsuit"),Re("\\cnums","\\mathbb{C}"),Re("\\Complex","\\mathbb{C}"),Re("\\Dagger","\\ddagger"),Re("\\diamonds","\\diamondsuit"),Re("\\empty","\\emptyset"),Re("\\Epsilon","\\mathrm{E}"),Re("\\Eta","\\mathrm{H}"),Re("\\exist","\\exists"),Re("\\harr","\\leftrightarrow"),Re("\\hArr","\\Leftrightarrow"),Re("\\Harr","\\Leftrightarrow"),Re("\\hearts","\\heartsuit"),Re("\\image","\\Im"),Re("\\infin","\\infty"),Re("\\Iota","\\mathrm{I}"),Re("\\isin","\\in"),Re("\\Kappa","\\mathrm{K}"),Re("\\larr","\\leftarrow"),Re("\\lArr","\\Leftarrow"),Re("\\Larr","\\Leftarrow"),Re("\\lrarr","\\leftrightarrow"),Re("\\lrArr","\\Leftrightarrow"),Re("\\Lrarr","\\Leftrightarrow"),Re("\\Mu","\\mathrm{M}"),Re("\\natnums","\\mathbb{N}"),Re("\\Nu","\\mathrm{N}"),Re("\\Omicron","\\mathrm{O}"),Re("\\plusmn","\\pm"),Re("\\rarr","\\rightarrow"),Re("\\rArr","\\Rightarrow"),Re("\\Rarr","\\Rightarrow"),Re("\\real","\\Re"),Re("\\reals","\\mathbb{R}"),Re("\\Reals","\\mathbb{R}"),Re("\\Rho","\\mathrm{P}"),Re("\\sdot","\\cdot"),Re("\\sect","\\S"),Re("\\spades","\\spadesuit"),Re("\\sub","\\subset"),Re("\\sube","\\subseteq"),Re("\\supe","\\supseteq"),Re("\\Tau","\\mathrm{T}"),Re("\\thetasym","\\vartheta"),Re("\\weierp","\\wp"),Re("\\Zeta","\\mathrm{Z}"),Re("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),Re("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),Re("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),Re("\\blue","\\textcolor{##6495ed}{#1}"),Re("\\orange","\\textcolor{##ffa500}{#1}"),Re("\\pink","\\textcolor{##ff00af}{#1}"),Re("\\red","\\textcolor{##df0030}{#1}"),Re("\\green","\\textcolor{##28ae7b}{#1}"),Re("\\gray","\\textcolor{gray}{#1}"),Re("\\purple","\\textcolor{##9d38bd}{#1}"),Re("\\blueA","\\textcolor{##ccfaff}{#1}"),Re("\\blueB","\\textcolor{##80f6ff}{#1}"),Re("\\blueC","\\textcolor{##63d9ea}{#1}"),Re("\\blueD","\\textcolor{##11accd}{#1}"),Re("\\blueE","\\textcolor{##0c7f99}{#1}"),Re("\\tealA","\\textcolor{##94fff5}{#1}"),Re("\\tealB","\\textcolor{##26edd5}{#1}"),Re("\\tealC","\\textcolor{##01d1c1}{#1}"),Re("\\tealD","\\textcolor{##01a995}{#1}"),Re("\\tealE","\\textcolor{##208170}{#1}"),Re("\\greenA","\\textcolor{##b6ffb0}{#1}"),Re("\\greenB","\\textcolor{##8af281}{#1}"),Re("\\greenC","\\textcolor{##74cf70}{#1}"),Re("\\greenD","\\textcolor{##1fab54}{#1}"),Re("\\greenE","\\textcolor{##0d923f}{#1}"),Re("\\goldA","\\textcolor{##ffd0a9}{#1}"),Re("\\goldB","\\textcolor{##ffbb71}{#1}"),Re("\\goldC","\\textcolor{##ff9c39}{#1}"),Re("\\goldD","\\textcolor{##e07d10}{#1}"),Re("\\goldE","\\textcolor{##a75a05}{#1}"),Re("\\redA","\\textcolor{##fca9a9}{#1}"),Re("\\redB","\\textcolor{##ff8482}{#1}"),Re("\\redC","\\textcolor{##f9685d}{#1}"),Re("\\redD","\\textcolor{##e84d39}{#1}"),Re("\\redE","\\textcolor{##bc2612}{#1}"),Re("\\maroonA","\\textcolor{##ffbde0}{#1}"),Re("\\maroonB","\\textcolor{##ff92c6}{#1}"),Re("\\maroonC","\\textcolor{##ed5fa6}{#1}"),Re("\\maroonD","\\textcolor{##ca337c}{#1}"),Re("\\maroonE","\\textcolor{##9e034e}{#1}"),Re("\\purpleA","\\textcolor{##ddd7ff}{#1}"),Re("\\purpleB","\\textcolor{##c6b9fc}{#1}"),Re("\\purpleC","\\textcolor{##aa87ff}{#1}"),Re("\\purpleD","\\textcolor{##7854ab}{#1}"),Re("\\purpleE","\\textcolor{##543b78}{#1}"),Re("\\mintA","\\textcolor{##f5f9e8}{#1}"),Re("\\mintB","\\textcolor{##edf2df}{#1}"),Re("\\mintC","\\textcolor{##e0e5cc}{#1}"),Re("\\grayA","\\textcolor{##f6f7f7}{#1}"),Re("\\grayB","\\textcolor{##f0f1f2}{#1}"),Re("\\grayC","\\textcolor{##e3e5e6}{#1}"),Re("\\grayD","\\textcolor{##d6d8da}{#1}"),Re("\\grayE","\\textcolor{##babec2}{#1}"),Re("\\grayF","\\textcolor{##888d93}{#1}"),Re("\\grayG","\\textcolor{##626569}{#1}"),Re("\\grayH","\\textcolor{##3b3e40}{#1}"),Re("\\grayI","\\textcolor{##21242c}{#1}"),Re("\\kaBlue","\\textcolor{##314453}{#1}"),Re("\\kaGreen","\\textcolor{##71B307}{#1}");var Ya={"\\relax":!0,"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},Xa=function(){function H(d,f,g){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=f,this.expansionCount=0,this.feed(d),this.macros=new bo(Si,f.macros),this.mode=g,this.stack=[]}var u=H.prototype;return u.feed=function(f){this.lexer=new va(f,this.settings)},u.switchMode=function(f){this.mode=f},u.beginGroup=function(){this.macros.beginGroup()},u.endGroup=function(){this.macros.endGroup()},u.future=function(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]},u.popToken=function(){return this.future(),this.stack.pop()},u.pushToken=function(f){this.stack.push(f)},u.pushTokens=function(f){var g;(g=this.stack).push.apply(g,f)},u.consumeSpaces=function(){for(;;){var f=this.future();if(f.text===" ")this.stack.pop();else break}},u.consumeArgs=function(f){for(var g=[],C=0;C<f;++C){this.consumeSpaces();var z=this.popToken();if(z.text==="{"){for(var ge=[],Te=1;Te!==0;){var Ne=this.popToken();if(ge.push(Ne),Ne.text==="{")++Te;else if(Ne.text==="}")--Te;else if(Ne.text==="EOF")throw new m("End of input in macro argument",z)}ge.pop(),ge.reverse(),g[C]=ge}else{if(z.text==="EOF")throw new m("End of input expecting macro argument");g[C]=[z]}}return g},u.expandOnce=function(){var f=this.popToken(),g=f.text,C=this._getExpansion(g);if(C==null)return this.pushToken(f),f;if(this.expansionCount++,this.expansionCount>this.settings.maxExpand)throw new m("Too many expansions: infinite loop or need to increase maxExpand setting");var z=C.tokens;if(C.numArgs){var ge=this.consumeArgs(C.numArgs);z=z.slice();for(var Te=z.length-1;Te>=0;--Te){var Ne=z[Te];if(Ne.text==="#"){if(Te===0)throw new m("Incomplete placeholder at end of macro body",Ne);if(Ne=z[--Te],Ne.text==="#")z.splice(Te+1,1);else if(/^[1-9]$/.test(Ne.text)){var tt;(tt=z).splice.apply(tt,[Te,2].concat(ge[+Ne.text-1]))}else throw new m("Not a valid argument number",Ne)}}}return this.pushTokens(z),z},u.expandAfterFuture=function(){return this.expandOnce(),this.future()},u.expandNextToken=function(){for(;;){var f=this.expandOnce();if(f instanceof _e)if(f.text==="\\relax")this.stack.pop();else return this.stack.pop()}throw new Error},u.expandMacro=function(f){if(this.macros.get(f)){var g=[],C=this.stack.length;for(this.pushToken(new _e(f));this.stack.length>C;){var z=this.expandOnce();z instanceof _e&&g.push(this.stack.pop())}return g}},u.expandMacroAsText=function(f){var g=this.expandMacro(f);return g&&g.map(function(C){return C.text}).join("")},u._getExpansion=function(f){var g=this.macros.get(f);if(g==null)return g;var C=typeof g=="function"?g(this):g;if(typeof C=="string"){var z=0;if(C.indexOf("#")!==-1)for(var ge=C.replace(/##/g,"");ge.indexOf("#"+(z+1))!==-1;)++z;for(var Te=new va(C,this.settings),Ne=[],tt=Te.lex();tt.text!=="EOF";)Ne.push(tt),tt=Te.lex();Ne.reverse();var ft={tokens:Ne,numArgs:z};return ft}return C},u.isDefined=function(f){return this.macros.has(f)||Bs.hasOwnProperty(f)||gt.math.hasOwnProperty(f)||gt.text.hasOwnProperty(f)||Ya.hasOwnProperty(f)},H}(),ba={"\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"}},Qs={\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"},Ns=function(){function H(d,f){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 Xa(d,f,this.mode),this.settings=f,this.leftrightDepth=0}var u=H.prototype;return u.expect=function(f,g){if(g===void 0&&(g=!0),this.fetch().text!==f)throw new m("Expected '"+f+"', got '"+this.fetch().text+"'",this.fetch());g&&this.consume()},u.consume=function(){this.nextToken=null},u.fetch=function(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken},u.switchMode=function(f){this.mode=f,this.gullet.switchMode(f)},u.parse=function(){this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");var f=this.parseExpression(!1);return this.expect("EOF"),this.gullet.endGroup(),f},u.parseExpression=function(f,g){for(var C=[];;){this.mode==="math"&&this.consumeSpaces();var z=this.fetch();if(H.endOfExpression.indexOf(z.text)!==-1||g&&z.text===g||f&&Bs[z.text]&&Bs[z.text].infix)break;var ge=this.parseAtom(g);if(!ge)break;C.push(ge)}return this.mode==="text"&&this.formLigatures(C),this.handleInfixNodes(C)},u.handleInfixNodes=function(f){for(var g=-1,C,z=0;z<f.length;z++){var ge=Jt(f[z],"infix");if(ge){if(g!==-1)throw new m("only one infix operator per group",ge.token);g=z,C=ge.replaceWith}}if(g!==-1&&C){var Te,Ne,tt=f.slice(0,g),ft=f.slice(g+1);tt.length===1&&tt[0].type==="ordgroup"?Te=tt[0]:Te={type:"ordgroup",mode:this.mode,body:tt},ft.length===1&&ft[0].type==="ordgroup"?Ne=ft[0]:Ne={type:"ordgroup",mode:this.mode,body:ft};var Et;return C==="\\\\abovefrac"?Et=this.callFunction(C,[Te,f[g],Ne],[]):Et=this.callFunction(C,[Te,Ne],[]),[Et]}else return f},u.handleSupSubscript=function(f){var g=this.fetch(),C=g.text;this.consume();var z=this.parseGroup(f,!1,H.SUPSUB_GREEDINESS,void 0,void 0,!0);if(!z)throw new m("Expected group after '"+C+"'",g);return z},u.formatUnsupportedCmd=function(f){for(var g=[],C=0;C<f.length;C++)g.push({type:"textord",mode:"text",text:f[C]});var z={type:"text",mode:this.mode,body:g},ge={type:"color",mode:this.mode,color:this.settings.errorColor,body:[z]};return ge},u.parseAtom=function(f){var g=this.parseGroup("atom",!1,null,f);if(this.mode==="text")return g;for(var C,z;;){this.consumeSpaces();var ge=this.fetch();if(ge.text==="\\limits"||ge.text==="\\nolimits"){var Te=Jt(g,"op");if(Te){var Ne=ge.text==="\\limits";Te.limits=Ne,Te.alwaysHandleSupSub=!0}else if(Te=Jt(g,"operatorname"),Te&&Te.alwaysHandleSupSub){var tt=ge.text==="\\limits";Te.limits=tt}else throw new m("Limit controls must follow a math operator",ge);this.consume()}else if(ge.text==="^"){if(C)throw new m("Double superscript",ge);C=this.handleSupSubscript("superscript")}else if(ge.text==="_"){if(z)throw new m("Double subscript",ge);z=this.handleSupSubscript("subscript")}else if(ge.text==="'"){if(C)throw new m("Double superscript",ge);var ft={type:"textord",mode:this.mode,text:"\\prime"},Et=[ft];for(this.consume();this.fetch().text==="'";)Et.push(ft),this.consume();this.fetch().text==="^"&&Et.push(this.handleSupSubscript("superscript")),C={type:"ordgroup",mode:this.mode,body:Et}}else break}return C||z?{type:"supsub",mode:this.mode,base:g,sup:C,sub:z}:g},u.parseFunction=function(f,g,C){var z=this.fetch(),ge=z.text,Te=Bs[ge];if(!Te)return null;if(this.consume(),C!=null&&Te.greediness<=C)throw new m("Got function '"+ge+"' with no arguments"+(g?" as "+g:""),z);if(this.mode==="text"&&!Te.allowedInText)throw new m("Can't use function '"+ge+"' in text mode",z);if(this.mode==="math"&&Te.allowedInMath===!1)throw new m("Can't use function '"+ge+"' in math mode",z);var Ne=this.parseArguments(ge,Te),tt=Ne.args,ft=Ne.optArgs;return this.callFunction(ge,tt,ft,z,f)},u.callFunction=function(f,g,C,z,ge){var Te={funcName:f,parser:this,token:z,breakOnTokenText:ge},Ne=Bs[f];if(Ne&&Ne.handler)return Ne.handler(Te,g,C);throw new m("No function handler for "+f)},u.parseArguments=function(f,g){var C=g.numArgs+g.numOptionalArgs;if(C===0)return{args:[],optArgs:[]};for(var z=g.greediness,ge=[],Te=[],Ne=0;Ne<C;Ne++){var tt=g.argTypes&&g.argTypes[Ne],ft=Ne<g.numOptionalArgs,Et=Ne>0&&!ft||Ne===0&&!ft&&this.mode==="math",Mt=this.parseGroupOfType("argument to '"+f+"'",tt,ft,z,Et);if(!Mt){if(ft){Te.push(null);continue}throw new m("Expected group after '"+f+"'",this.fetch())}(ft?Te:ge).push(Mt)}return{args:ge,optArgs:Te}},u.parseGroupOfType=function(f,g,C,z,ge){switch(g){case"color":return ge&&this.consumeSpaces(),this.parseColorGroup(C);case"size":return ge&&this.consumeSpaces(),this.parseSizeGroup(C);case"url":return this.parseUrlGroup(C,ge);case"math":case"text":return this.parseGroup(f,C,z,void 0,g,ge);case"hbox":{var Te=this.parseGroup(f,C,z,void 0,"text",ge);if(!Te)return Te;var Ne={type:"styling",mode:Te.mode,body:[Te],style:"text"};return Ne}case"raw":{if(ge&&this.consumeSpaces(),C&&this.fetch().text==="{")return null;var tt=this.parseStringGroup("raw",C,!0);if(tt)return{type:"raw",mode:"text",string:tt.text};throw new m("Expected raw group",this.fetch())}case"original":case null:case void 0:return this.parseGroup(f,C,z,void 0,void 0,ge);default:throw new m("Unknown group type as "+f,this.fetch())}},u.consumeSpaces=function(){for(;this.fetch().text===" ";)this.consume()},u.parseStringGroup=function(f,g,C){var z=g?"[":"{",ge=g?"]":"}",Te=this.fetch();if(Te.text!==z){if(g)return null;if(C&&Te.text!=="EOF"&&/[^{}[\]]/.test(Te.text))return this.consume(),Te}var Ne=this.mode;this.mode="text",this.expect(z);for(var tt="",ft=this.fetch(),Et=0,Mt=ft,Ft;(Ft=this.fetch()).text!==ge||C&&Et>0;){switch(Ft.text){case"EOF":throw new m("Unexpected end of input in "+f,ft.range(Mt,tt));case z:Et++;break;case ge:Et--;break}Mt=Ft,tt+=Mt.text,this.consume()}return this.expect(ge),this.mode=Ne,ft.range(Mt,tt)},u.parseRegexGroup=function(f,g){var C=this.mode;this.mode="text";for(var z=this.fetch(),ge=z,Te="",Ne;(Ne=this.fetch()).text!=="EOF"&&f.test(Te+Ne.text);)ge=Ne,Te+=ge.text,this.consume();if(Te==="")throw new m("Invalid "+g+": '"+z.text+"'",z);return this.mode=C,z.range(ge,Te)},u.parseColorGroup=function(f){var g=this.parseStringGroup("color",f);if(!g)return null;var C=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(g.text);if(!C)throw new m("Invalid color: '"+g.text+"'",g);var z=C[0];return/^[0-9a-f]{6}$/i.test(z)&&(z="#"+z),{type:"color-token",mode:this.mode,color:z}},u.parseSizeGroup=function(f){var g,C=!1;if(!f&&this.fetch().text!=="{"?g=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):g=this.parseStringGroup("size",f),!g)return null;!f&&g.text.length===0&&(g.text="0pt",C=!0);var z=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(g.text);if(!z)throw new m("Invalid size: '"+g.text+"'",g);var ge={number:+(z[1]+z[2]),unit:z[3]};if(!st(ge))throw new m("Invalid unit: '"+ge.unit+"'",g);return{type:"size",mode:this.mode,value:ge,isBlank:C}},u.parseUrlGroup=function(f,g){this.gullet.lexer.setCatcode("%",13);var C=this.parseStringGroup("url",f,!0);if(this.gullet.lexer.setCatcode("%",14),!C)return null;var z=C.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:z}},u.parseGroup=function(f,g,C,z,ge,Te){var Ne=this.mode;ge&&this.switchMode(ge),Te&&this.consumeSpaces();var tt=this.fetch(),ft=tt.text,Et;if(g?ft==="[":ft==="{"||ft==="\\begingroup"){this.consume();var Mt=H.endOfGroup[ft];this.gullet.beginGroup();var Ft=this.parseExpression(!1,Mt),je=this.fetch();this.expect(Mt),this.gullet.endGroup(),Et={type:"ordgroup",mode:this.mode,loc:Se.range(tt,je),body:Ft,semisimple:ft==="\\begingroup"||void 0}}else if(g)Et=null;else if(Et=this.parseFunction(z,f,C)||this.parseSymbol(),Et==null&&ft[0]==="\\"&&!Ya.hasOwnProperty(ft)){if(this.settings.throwOnError)throw new m("Undefined control sequence: "+ft,tt);Et=this.formatUnsupportedCmd(ft),this.consume()}return ge&&this.switchMode(Ne),Et},u.formLigatures=function(f){for(var g=f.length-1,C=0;C<g;++C){var z=f[C],ge=z.text;ge==="-"&&f[C+1].text==="-"&&(C+1<g&&f[C+2].text==="-"?(f.splice(C,3,{type:"textord",mode:"text",loc:Se.range(z,f[C+2]),text:"---"}),g-=2):(f.splice(C,2,{type:"textord",mode:"text",loc:Se.range(z,f[C+1]),text:"--"}),g-=1)),(ge==="'"||ge==="`")&&f[C+1].text===ge&&(f.splice(C,2,{type:"textord",mode:"text",loc:Se.range(z,f[C+1]),text:ge+ge}),g-=1)}},u.parseSymbol=function(){var f=this.fetch(),g=f.text;if(/^\\verb[^a-zA-Z]/.test(g)){this.consume();var C=g.slice(5),z=C.charAt(0)==="*";if(z&&(C=C.slice(1)),C.length<2||C.charAt(0)!==C.slice(-1))throw new m(`\\verb assertion failed --
|
|
please report what input caused this bug`);return C=C.slice(1,-1),{type:"verb",mode:"text",body:C,star:z}}Qs.hasOwnProperty(g[0])&&!gt[this.mode][g[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+g[0]+'" used in math mode',f),g=Qs[g[0]]+g.substr(1));var ge=yo.exec(g);ge&&(g=g.substring(0,ge.index),g==="i"?g="\u0131":g==="j"&&(g="\u0237"));var Te;if(gt[this.mode][g]){this.settings.strict&&this.mode==="math"&&ln.indexOf(g)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+g[0]+'" used in math mode',f);var Ne=gt[this.mode][g].group,tt=Se.range(f),ft;if(Ve.hasOwnProperty(Ne)){var Et=Ne;ft={type:"atom",mode:this.mode,family:Et,loc:tt,text:g}}else ft={type:Ne,mode:this.mode,loc:tt,text:g};Te=ft}else if(g.charCodeAt(0)>=128)this.settings.strict&&(Le(g.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+g[0]+'" used in math mode',f):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+g[0]+'"'+(" ("+g.charCodeAt(0)+")"),f)),Te={type:"textord",mode:"text",loc:Se.range(f),text:g};else return null;if(this.consume(),ge)for(var Mt=0;Mt<ge[0].length;Mt++){var Ft=ge[0][Mt];if(!ba[Ft])throw new m("Unknown accent ' "+Ft+"'",f);var je=ba[Ft][this.mode];if(!je)throw new m("Accent "+Ft+" unsupported in "+this.mode+" mode",f);Te={type:"accent",mode:this.mode,loc:Se.range(f),label:je,isStretchy:!1,isShifty:!0,base:Te}}return Te},H}();Ns.endOfExpression=["}","\\endgroup","\\end","\\right","&"],Ns.endOfGroup={"[":"]","{":"}","\\begingroup":"\\endgroup"},Ns.SUPSUB_GREEDINESS=1;var xo=function(u,d){if(!(typeof u=="string"||u instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var f=new Ns(u,d);delete f.gullet.macros.current["\\df@tag"];var g=f.parse();if(f.gullet.macros.get("\\df@tag")){if(!d.displayMode)throw new m("\\tag works only in display equations");f.gullet.feed("\\df@tag"),g=[{type:"tag",mode:"text",body:g,tag:f.parse()}]}return g},Js=xo,qa=function(u,d,f){d.textContent="";var g=Ea(u,f).toNode();d.appendChild(g)};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."),qa=function(){throw new m("KaTeX doesn't work in quirks mode.")});var Qa=function(u,d){var f=Ea(u,d).toMarkup();return f},Eo=function(u,d){var f=new R(d);return Js(u,f)},xa=function(u,d,f){if(f.throwOnError||!(u instanceof m))throw u;var g=Xe.makeSpan(["katex-error"],[new le(d)]);return g.setAttribute("title",u.toString()),g.setAttribute("style","color:"+f.errorColor),g},Ea=function(u,d){var f=new R(d);try{var g=Js(u,f);return Wn(g,u,f)}catch(C){return xa(C,u,f)}},So=function(u,d){var f=new R(d);try{var g=Js(u,f);return $n(g,u,f)}catch(C){return xa(C,u,f)}},wo={version:"0.11.1",render:qa,renderToString:Qa,ParseError:m,__parse:Eo,__renderToDomTree:Ea,__renderToHTMLTree:So,__setFontMetrics:yt,__defineSymbol:x,__defineMacro:Re,__domTree:{Span:se,Anchor:Me,SymbolNode:le,SvgNode:xe,PathNode:we,LineNode:Ie}},To=w.default=wo}]).default})},32834:function(Nt){(function(rt,w){Nt.exports=w()})(this,function(){"use strict";function rt(Be,ze){for(var qe=0;qe<ze.length;qe++){var ee=ze[qe];ee.enumerable=ee.enumerable||!1,ee.configurable=!0,"value"in ee&&(ee.writable=!0),Object.defineProperty(Be,ee.key,ee)}}function w(Be,ze,qe){return ze&&rt(Be.prototype,ze),qe&&rt(Be,qe),Be}function $(Be,ze){if(Be){if(typeof Be=="string")return ae(Be,ze);var qe=Object.prototype.toString.call(Be).slice(8,-1);if(qe==="Object"&&Be.constructor&&(qe=Be.constructor.name),qe==="Map"||qe==="Set")return Array.from(Be);if(qe==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(qe))return ae(Be,ze)}}function ae(Be,ze){(ze==null||ze>Be.length)&&(ze=Be.length);for(var qe=0,ee=new Array(ze);qe<ze;qe++)ee[qe]=Be[qe];return ee}function Se(Be,ze){var qe=typeof Symbol!="undefined"&&Be[Symbol.iterator]||Be["@@iterator"];if(qe)return(qe=qe.call(Be)).next.bind(qe);if(Array.isArray(Be)||(qe=$(Be))||ze&&Be&&typeof Be.length=="number"){qe&&(Be=qe);var ee=0;return function(){return ee>=Be.length?{done:!0}:{done:!1,value:Be[ee++]}}}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 _e={exports:{}};function O(){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 m(Be){_e.exports.defaults=Be}_e.exports={defaults:O(),getDefaults:O,changeDefaults:m};var de=/[&<>"']/,ie=/[&<>"']/g,o=/[<>"']|&(?!#?\w+;)/,Q=/[<>"']|&(?!#?\w+;)/g,U={"&":"&","<":"<",">":">",'"':""","'":"'"},E=function(ze){return U[ze]};function b(Be,ze){if(ze){if(de.test(Be))return Be.replace(ie,E)}else if(o.test(Be))return Be.replace(Q,E);return Be}var S=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function D(Be){return Be.replace(S,function(ze,qe){return qe=qe.toLowerCase(),qe==="colon"?":":qe.charAt(0)==="#"?qe.charAt(1)==="x"?String.fromCharCode(parseInt(qe.substring(2),16)):String.fromCharCode(+qe.substring(1)):""})}var V=/(^|[^\[])\^/g;function q(Be,ze){Be=Be.source||Be,ze=ze||"";var qe={replace:function(be,me){return me=me.source||me,me=me.replace(V,"$1"),Be=Be.replace(be,me),qe},getRegex:function(){return new RegExp(Be,ze)}};return qe}var B=/[^\w:]/g,R=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function Z(Be,ze,qe){if(Be){var ee;try{ee=decodeURIComponent(D(qe)).replace(B,"").toLowerCase()}catch(be){return null}if(ee.indexOf("javascript:")===0||ee.indexOf("vbscript:")===0||ee.indexOf("data:")===0)return null}ze&&!R.test(qe)&&(qe=J(ze,qe));try{qe=encodeURI(qe).replace(/%25/g,"%")}catch(be){return null}return qe}var ue={},M=/^[^:]+:\/*[^/]*$/,Y=/^([^:]+:)[\s\S]*$/,oe=/^([^:]+:\/*[^/]*)[\s\S]*$/;function J(Be,ze){ue[" "+Be]||(M.test(Be)?ue[" "+Be]=Be+"/":ue[" "+Be]=Ae(Be,"/",!0)),Be=ue[" "+Be];var qe=Be.indexOf(":")===-1;return ze.substring(0,2)==="//"?qe?ze:Be.replace(Y,"$1")+ze:ze.charAt(0)==="/"?qe?ze:Be.replace(oe,"$1")+ze:Be+ze}var ye={exec:function(){}};function pe(Be){for(var ze=1,qe,ee;ze<arguments.length;ze++){qe=arguments[ze];for(ee in qe)Object.prototype.hasOwnProperty.call(qe,ee)&&(Be[ee]=qe[ee])}return Be}function ve(Be,ze){var qe=Be.replace(/\|/g,function(me,Ge,X){for(var Ct=!1,Ce=Ge;--Ce>=0&&X[Ce]==="\\";)Ct=!Ct;return Ct?"|":" |"}),ee=qe.split(/ \|/),be=0;if(ee.length>ze)ee.splice(ze);else for(;ee.length<ze;)ee.push("");for(;be<ee.length;be++)ee[be]=ee[be].trim().replace(/\\\|/g,"|");return ee}function Ae(Be,ze,qe){var ee=Be.length;if(ee===0)return"";for(var be=0;be<ee;){var me=Be.charAt(ee-be-1);if(me===ze&&!qe)be++;else if(me!==ze&&qe)be++;else break}return Be.substr(0,ee-be)}function j(Be,ze){if(Be.indexOf(ze[1])===-1)return-1;for(var qe=Be.length,ee=0,be=0;be<qe;be++)if(Be[be]==="\\")be++;else if(Be[be]===ze[0])ee++;else if(Be[be]===ze[1]&&(ee--,ee<0))return be;return-1}function P(Be){Be&&Be.sanitize&&!Be.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 K(Be,ze){if(ze<1)return"";for(var qe="";ze>1;)ze&1&&(qe+=Be),ze>>=1,Be+=Be;return qe+Be}var k={escape:b,unescape:D,edit:q,cleanUrl:Z,resolveUrl:J,noopTest:ye,merge:pe,splitCells:ve,rtrim:Ae,findClosingBracket:j,checkSanitizeDeprecation:P,repeatString:K},ne=_e.exports.defaults,G=k.rtrim,v=k.splitCells,y=k.escape,N=k.findClosingBracket;function te(Be,ze,qe){var ee=ze.href,be=ze.title?y(ze.title):null,me=Be[1].replace(/\\([\[\]])/g,"$1");return Be[0].charAt(0)!=="!"?{type:"link",raw:qe,href:ee,title:be,text:me}:{type:"image",raw:qe,href:ee,title:be,text:y(me)}}function Le(Be,ze){var qe=Be.match(/^(\s+)(?:```)/);if(qe===null)return ze;var ee=qe[1];return ze.split(`
|
|
`).map(function(be){var me=be.match(/^\s+/);if(me===null)return be;var Ge=me[0];return Ge.length>=ee.length?be.slice(ee.length):be}).join(`
|
|
`)}var Fe=function(){function Be(qe){this.options=qe||ne}var ze=Be.prototype;return ze.space=function(ee){var be=this.rules.block.newline.exec(ee);if(be)return be[0].length>1?{type:"space",raw:be[0]}:{raw:`
|
|
`}},ze.code=function(ee){var be=this.rules.block.code.exec(ee);if(be){var me=be[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:be[0],codeBlockStyle:"indented",text:this.options.pedantic?me:G(me,`
|
|
`)}}},ze.fences=function(ee){var be=this.rules.block.fences.exec(ee);if(be){var me=be[0],Ge=Le(me,be[3]||"");return{type:"code",raw:me,lang:be[2]?be[2].trim():be[2],text:Ge}}},ze.heading=function(ee){var be=this.rules.block.heading.exec(ee);if(be){var me=be[2].trim();if(/#$/.test(me)){var Ge=G(me,"#");(this.options.pedantic||!Ge||/ $/.test(Ge))&&(me=Ge.trim())}return{type:"heading",raw:be[0],depth:be[1].length,text:me}}},ze.nptable=function(ee){var be=this.rules.block.nptable.exec(ee);if(be){var me={type:"table",header:v(be[1].replace(/^ *| *\| *$/g,"")),align:be[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:be[3]?be[3].replace(/\n$/,"").split(`
|
|
`):[],raw:be[0]};if(me.header.length===me.align.length){var Ge=me.align.length,X;for(X=0;X<Ge;X++)/^ *-+: *$/.test(me.align[X])?me.align[X]="right":/^ *:-+: *$/.test(me.align[X])?me.align[X]="center":/^ *:-+ *$/.test(me.align[X])?me.align[X]="left":me.align[X]=null;for(Ge=me.cells.length,X=0;X<Ge;X++)me.cells[X]=v(me.cells[X],me.header.length);return me}}},ze.hr=function(ee){var be=this.rules.block.hr.exec(ee);if(be)return{type:"hr",raw:be[0]}},ze.blockquote=function(ee){var be=this.rules.block.blockquote.exec(ee);if(be){var me=be[0].replace(/^ *> ?/gm,"");return{type:"blockquote",raw:be[0],text:me}}},ze.list=function(ee){var be=this.rules.block.list.exec(ee);if(be){var me=be[0],Ge=be[2],X=Ge.length>1,Ct={type:"list",raw:me,ordered:X,start:X?+Ge.slice(0,-1):"",loose:!1,items:[]},Ce=be[0].match(this.rules.block.item),Ot=!1,zt,cr,sr,Kt,$t,mr,Vr,Ur,jr,Vt=Ce.length;sr=this.rules.block.listItemStart.exec(Ce[0]);for(var or=0;or<Vt;or++){if(zt=Ce[or],me=zt,this.options.pedantic||(jr=zt.match(new RegExp("\\n\\s*\\n {0,"+(sr[0].length-1)+"}\\S")),jr&&($t=zt.length-jr.index+Ce.slice(or+1).join(`
|
|
`).length,Ct.raw=Ct.raw.substring(0,Ct.raw.length-$t),zt=zt.substring(0,jr.index),me=zt,Vt=or+1)),or!==Vt-1){if(Kt=this.rules.block.listItemStart.exec(Ce[or+1]),this.options.pedantic?Kt[1].length>sr[1].length:Kt[1].length>=sr[0].length||Kt[1].length>3){Ce.splice(or,2,Ce[or]+(!this.options.pedantic&&Kt[1].length<sr[0].length&&!Ce[or].match(/\n$/)?"":`
|
|
`)+Ce[or+1]),or--,Vt--;continue}else(!this.options.pedantic||this.options.smartLists?Kt[2][Kt[2].length-1]!==Ge[Ge.length-1]:X===(Kt[2].length===1))&&($t=Ce.slice(or+1).join(`
|
|
`).length,Ct.raw=Ct.raw.substring(0,Ct.raw.length-$t),or=Vt-1);sr=Kt}cr=zt.length,zt=zt.replace(/^ *([*+-]|\d+[.)]) ?/,""),~zt.indexOf(`
|
|
`)&&(cr-=zt.length,zt=this.options.pedantic?zt.replace(/^ {1,4}/gm,""):zt.replace(new RegExp("^ {1,"+cr+"}","gm"),"")),zt=G(zt,`
|
|
`),or!==Vt-1&&(me=me+`
|
|
`),mr=Ot||/\n\n(?!\s*$)/.test(me),or!==Vt-1&&(Ot=me.slice(-2)===`
|
|
|
|
`,mr||(mr=Ot)),mr&&(Ct.loose=!0),this.options.gfm&&(Vr=/^\[[ xX]\] /.test(zt),Ur=void 0,Vr&&(Ur=zt[1]!==" ",zt=zt.replace(/^\[[ xX]\] +/,""))),Ct.items.push({type:"list_item",raw:me,task:Vr,checked:Ur,loose:mr,text:zt})}return Ct}},ze.html=function(ee){var be=this.rules.block.html.exec(ee);if(be)return{type:this.options.sanitize?"paragraph":"html",raw:be[0],pre:!this.options.sanitizer&&(be[1]==="pre"||be[1]==="script"||be[1]==="style"),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(be[0]):y(be[0]):be[0]}},ze.def=function(ee){var be=this.rules.block.def.exec(ee);if(be){be[3]&&(be[3]=be[3].substring(1,be[3].length-1));var me=be[1].toLowerCase().replace(/\s+/g," ");return{type:"def",tag:me,raw:be[0],href:be[2],title:be[3]}}},ze.table=function(ee){var be=this.rules.block.table.exec(ee);if(be){var me={type:"table",header:v(be[1].replace(/^ *| *\| *$/g,"")),align:be[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:be[3]?be[3].replace(/\n$/,"").split(`
|
|
`):[]};if(me.header.length===me.align.length){me.raw=be[0];var Ge=me.align.length,X;for(X=0;X<Ge;X++)/^ *-+: *$/.test(me.align[X])?me.align[X]="right":/^ *:-+: *$/.test(me.align[X])?me.align[X]="center":/^ *:-+ *$/.test(me.align[X])?me.align[X]="left":me.align[X]=null;for(Ge=me.cells.length,X=0;X<Ge;X++)me.cells[X]=v(me.cells[X].replace(/^ *\| *| *\| *$/g,""),me.header.length);return me}}},ze.lheading=function(ee){var be=this.rules.block.lheading.exec(ee);if(be)return{type:"heading",raw:be[0],depth:be[2].charAt(0)==="="?1:2,text:be[1]}},ze.paragraph=function(ee){var be=this.rules.block.paragraph.exec(ee);if(be)return{type:"paragraph",raw:be[0],text:be[1].charAt(be[1].length-1)===`
|
|
`?be[1].slice(0,-1):be[1]}},ze.text=function(ee){var be=this.rules.block.text.exec(ee);if(be)return{type:"text",raw:be[0],text:be[0]}},ze.escape=function(ee){var be=this.rules.inline.escape.exec(ee);if(be)return{type:"escape",raw:be[0],text:y(be[1])}},ze.tag=function(ee,be,me){var Ge=this.rules.inline.tag.exec(ee);if(Ge)return!be&&/^<a /i.test(Ge[0])?be=!0:be&&/^<\/a>/i.test(Ge[0])&&(be=!1),!me&&/^<(pre|code|kbd|script)(\s|>)/i.test(Ge[0])?me=!0:me&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(Ge[0])&&(me=!1),{type:this.options.sanitize?"text":"html",raw:Ge[0],inLink:be,inRawBlock:me,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ge[0]):y(Ge[0]):Ge[0]}},ze.link=function(ee){var be=this.rules.inline.link.exec(ee);if(be){var me=be[2].trim();if(!this.options.pedantic&&/^</.test(me)){if(!/>$/.test(me))return;var Ge=G(me.slice(0,-1),"\\");if((me.length-Ge.length)%2===0)return}else{var X=N(be[2],"()");if(X>-1){var Ct=be[0].indexOf("!")===0?5:4,Ce=Ct+be[1].length+X;be[2]=be[2].substring(0,X),be[0]=be[0].substring(0,Ce).trim(),be[3]=""}}var Ot=be[2],zt="";if(this.options.pedantic){var cr=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(Ot);cr&&(Ot=cr[1],zt=cr[3])}else zt=be[3]?be[3].slice(1,-1):"";return Ot=Ot.trim(),/^</.test(Ot)&&(this.options.pedantic&&!/>$/.test(me)?Ot=Ot.slice(1):Ot=Ot.slice(1,-1)),te(be,{href:Ot&&Ot.replace(this.rules.inline._escapes,"$1"),title:zt&&zt.replace(this.rules.inline._escapes,"$1")},be[0])}},ze.reflink=function(ee,be){var me;if((me=this.rules.inline.reflink.exec(ee))||(me=this.rules.inline.nolink.exec(ee))){var Ge=(me[2]||me[1]).replace(/\s+/g," ");if(Ge=be[Ge.toLowerCase()],!Ge||!Ge.href){var X=me[0].charAt(0);return{type:"text",raw:X,text:X}}return te(me,Ge,me[0])}},ze.emStrong=function(ee,be,me){me===void 0&&(me="");var Ge=this.rules.inline.emStrong.lDelim.exec(ee);if(Ge&&!(Ge[3]&&me.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 X=Ge[1]||Ge[2]||"";if(!X||X&&(me===""||this.rules.inline.punctuation.exec(me))){var Ct=Ge[0].length-1,Ce,Ot,zt=Ct,cr=0,sr=Ge[0][0]==="*"?this.rules.inline.emStrong.rDelimAst:this.rules.inline.emStrong.rDelimUnd;for(sr.lastIndex=0,be=be.slice(-1*ee.length+Ct);(Ge=sr.exec(be))!=null;)if(Ce=Ge[1]||Ge[2]||Ge[3]||Ge[4]||Ge[5]||Ge[6],!!Ce){if(Ot=Ce.length,Ge[3]||Ge[4]){zt+=Ot;continue}else if((Ge[5]||Ge[6])&&Ct%3&&!((Ct+Ot)%3)){cr+=Ot;continue}if(zt-=Ot,!(zt>0))return Ot=Math.min(Ot,Ot+zt+cr),Math.min(Ct,Ot)%2?{type:"em",raw:ee.slice(0,Ct+Ge.index+Ot+1),text:ee.slice(1,Ct+Ge.index+Ot)}:{type:"strong",raw:ee.slice(0,Ct+Ge.index+Ot+1),text:ee.slice(2,Ct+Ge.index+Ot-1)}}}}},ze.codespan=function(ee){var be=this.rules.inline.code.exec(ee);if(be){var me=be[2].replace(/\n/g," "),Ge=/[^ ]/.test(me),X=/^ /.test(me)&&/ $/.test(me);return Ge&&X&&(me=me.substring(1,me.length-1)),me=y(me,!0),{type:"codespan",raw:be[0],text:me}}},ze.br=function(ee){var be=this.rules.inline.br.exec(ee);if(be)return{type:"br",raw:be[0]}},ze.del=function(ee){var be=this.rules.inline.del.exec(ee);if(be)return{type:"del",raw:be[0],text:be[2]}},ze.autolink=function(ee,be){var me=this.rules.inline.autolink.exec(ee);if(me){var Ge,X;return me[2]==="@"?(Ge=y(this.options.mangle?be(me[1]):me[1]),X="mailto:"+Ge):(Ge=y(me[1]),X=Ge),{type:"link",raw:me[0],text:Ge,href:X,tokens:[{type:"text",raw:Ge,text:Ge}]}}},ze.url=function(ee,be){var me;if(me=this.rules.inline.url.exec(ee)){var Ge,X;if(me[2]==="@")Ge=y(this.options.mangle?be(me[0]):me[0]),X="mailto:"+Ge;else{var Ct;do Ct=me[0],me[0]=this.rules.inline._backpedal.exec(me[0])[0];while(Ct!==me[0]);Ge=y(me[0]),me[1]==="www."?X="http://"+Ge:X=Ge}return{type:"link",raw:me[0],text:Ge,href:X,tokens:[{type:"text",raw:Ge,text:Ge}]}}},ze.inlineText=function(ee,be,me){var Ge=this.rules.inline.text.exec(ee);if(Ge){var X;return be?X=this.options.sanitize?this.options.sanitizer?this.options.sanitizer(Ge[0]):y(Ge[0]):Ge[0]:X=y(this.options.smartypants?me(Ge[0]):Ge[0]),{type:"text",raw:Ge[0],text:X}}},Be}(),Ue=k.noopTest,Ye=k.edit,ut=k.merge,ot={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:Ue,table:Ue,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html| +\n)[^\n]+)*)/,text:/^[^\n]+/};ot._label=/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,ot._title=/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/,ot.def=Ye(ot.def).replace("label",ot._label).replace("title",ot._title).getRegex(),ot.bullet=/(?:[*+-]|\d{1,9}[.)])/,ot.item=/^( *)(bull) ?[^\n]*(?:\n(?! *bull ?)[^\n]*)*/,ot.item=Ye(ot.item,"gm").replace(/bull/g,ot.bullet).getRegex(),ot.listItemStart=Ye(/^( *)(bull) */).replace("bull",ot.bullet).getRegex(),ot.list=Ye(ot.list).replace(/bull/g,ot.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+ot.def.source+")").getRegex(),ot._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",ot._comment=/<!--(?!-?>)[\s\S]*?(?:-->|$)/,ot.html=Ye(ot.html,"i").replace("comment",ot._comment).replace("tag",ot._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ot.paragraph=Ye(ot._paragraph).replace("hr",ot.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",ot._tag).getRegex(),ot.blockquote=Ye(ot.blockquote).replace("paragraph",ot.paragraph).getRegex(),ot.normal=ut({},ot),ot.gfm=ut({},ot.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*|$)"}),ot.gfm.nptable=Ye(ot.gfm.nptable).replace("hr",ot.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",ot._tag).getRegex(),ot.gfm.table=Ye(ot.gfm.table).replace("hr",ot.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",ot._tag).getRegex(),ot.pedantic=ut({},ot.normal,{html:Ye(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ot._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:Ue,paragraph:Ye(ot.normal._paragraph).replace("hr",ot.hr).replace("heading",` *#{1,6} *[^
|
|
]`).replace("lheading",ot.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var lt={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:Ue,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:Ue,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,punctuation:/^([\spunctuation])/};lt._punctuation="!\"#$%&'()+\\-.,/:;<=>?@\\[\\]`^{|}~",lt.punctuation=Ye(lt.punctuation).replace(/punctuation/g,lt._punctuation).getRegex(),lt.blockSkip=/\[[^\]]*?\]\([^\)]*?\)|`[^`]*?`|<[^>]*?>/g,lt.escapedEmSt=/\\\*|\\_/g,lt._comment=Ye(ot._comment).replace("(?:-->|$)","-->").getRegex(),lt.emStrong.lDelim=Ye(lt.emStrong.lDelim).replace(/punct/g,lt._punctuation).getRegex(),lt.emStrong.rDelimAst=Ye(lt.emStrong.rDelimAst,"g").replace(/punct/g,lt._punctuation).getRegex(),lt.emStrong.rDelimUnd=Ye(lt.emStrong.rDelimUnd,"g").replace(/punct/g,lt._punctuation).getRegex(),lt._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,lt._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,lt._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])?)+(?![-_])/,lt.autolink=Ye(lt.autolink).replace("scheme",lt._scheme).replace("email",lt._email).getRegex(),lt._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,lt.tag=Ye(lt.tag).replace("comment",lt._comment).replace("attribute",lt._attribute).getRegex(),lt._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,lt._href=/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/,lt._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,lt.link=Ye(lt.link).replace("label",lt._label).replace("href",lt._href).replace("title",lt._title).getRegex(),lt.reflink=Ye(lt.reflink).replace("label",lt._label).getRegex(),lt.reflinkSearch=Ye(lt.reflinkSearch,"g").replace("reflink",lt.reflink).replace("nolink",lt.nolink).getRegex(),lt.normal=ut({},lt),lt.pedantic=ut({},lt.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:Ye(/^!?\[(label)\]\((.*?)\)/).replace("label",lt._label).getRegex(),reflink:Ye(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",lt._label).getRegex()}),lt.gfm=ut({},lt.normal,{escape:Ye(lt.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.!#$%&'*+\/=?_`{\|}~-]+@)))/}),lt.gfm.url=Ye(lt.gfm.url,"i").replace("email",lt.gfm._extended_email).getRegex(),lt.breaks=ut({},lt.gfm,{br:Ye(lt.br).replace("{2,}","*").getRegex(),text:Ye(lt.gfm.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()});var St={block:ot,inline:lt},Lt=Fe,_t=_e.exports.defaults,At=St.block,Pt=St.inline,kt=k.repeatString;function fe(Be){return Be.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 he(Be){var ze="",qe,ee,be=Be.length;for(qe=0;qe<be;qe++)ee=Be.charCodeAt(qe),Math.random()>.5&&(ee="x"+ee.toString(16)),ze+="&#"+ee+";";return ze}var se=function(){function Be(qe){this.tokens=[],this.tokens.links=Object.create(null),this.options=qe||_t,this.options.tokenizer=this.options.tokenizer||new Lt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var ee={block:At.normal,inline:Pt.normal};this.options.pedantic?(ee.block=At.pedantic,ee.inline=Pt.pedantic):this.options.gfm&&(ee.block=At.gfm,this.options.breaks?ee.inline=Pt.breaks:ee.inline=Pt.gfm),this.tokenizer.rules=ee}Be.lex=function(ee,be){var me=new Be(be);return me.lex(ee)},Be.lexInline=function(ee,be){var me=new Be(be);return me.inlineTokens(ee)};var ze=Be.prototype;return ze.lex=function(ee){return ee=ee.replace(/\r\n|\r/g,`
|
|
`).replace(/\t/g," "),this.blockTokens(ee,this.tokens,!0),this.inline(this.tokens),this.tokens},ze.blockTokens=function(ee,be,me){be===void 0&&(be=[]),me===void 0&&(me=!0),this.options.pedantic&&(ee=ee.replace(/^ +$/gm,""));for(var Ge,X,Ct,Ce;ee;){if(Ge=this.tokenizer.space(ee)){ee=ee.substring(Ge.raw.length),Ge.type&&be.push(Ge);continue}if(Ge=this.tokenizer.code(ee)){ee=ee.substring(Ge.raw.length),Ce=be[be.length-1],Ce&&Ce.type==="paragraph"?(Ce.raw+=`
|
|
`+Ge.raw,Ce.text+=`
|
|
`+Ge.text):be.push(Ge);continue}if(Ge=this.tokenizer.fences(ee)){ee=ee.substring(Ge.raw.length),be.push(Ge);continue}if(Ge=this.tokenizer.heading(ee)){ee=ee.substring(Ge.raw.length),be.push(Ge);continue}if(Ge=this.tokenizer.nptable(ee)){ee=ee.substring(Ge.raw.length),be.push(Ge);continue}if(Ge=this.tokenizer.hr(ee)){ee=ee.substring(Ge.raw.length),be.push(Ge);continue}if(Ge=this.tokenizer.blockquote(ee)){ee=ee.substring(Ge.raw.length),Ge.tokens=this.blockTokens(Ge.text,[],me),be.push(Ge);continue}if(Ge=this.tokenizer.list(ee)){for(ee=ee.substring(Ge.raw.length),Ct=Ge.items.length,X=0;X<Ct;X++)Ge.items[X].tokens=this.blockTokens(Ge.items[X].text,[],!1);be.push(Ge);continue}if(Ge=this.tokenizer.html(ee)){ee=ee.substring(Ge.raw.length),be.push(Ge);continue}if(me&&(Ge=this.tokenizer.def(ee))){ee=ee.substring(Ge.raw.length),this.tokens.links[Ge.tag]||(this.tokens.links[Ge.tag]={href:Ge.href,title:Ge.title});continue}if(Ge=this.tokenizer.table(ee)){ee=ee.substring(Ge.raw.length),be.push(Ge);continue}if(Ge=this.tokenizer.lheading(ee)){ee=ee.substring(Ge.raw.length),be.push(Ge);continue}if(me&&(Ge=this.tokenizer.paragraph(ee))){ee=ee.substring(Ge.raw.length),be.push(Ge);continue}if(Ge=this.tokenizer.text(ee)){ee=ee.substring(Ge.raw.length),Ce=be[be.length-1],Ce&&Ce.type==="text"?(Ce.raw+=`
|
|
`+Ge.raw,Ce.text+=`
|
|
`+Ge.text):be.push(Ge);continue}if(ee){var Ot="Infinite loop on byte: "+ee.charCodeAt(0);if(this.options.silent){console.error(Ot);break}else throw new Error(Ot)}}return be},ze.inline=function(ee){var be,me,Ge,X,Ct,Ce,Ot=ee.length;for(be=0;be<Ot;be++)switch(Ce=ee[be],Ce.type){case"paragraph":case"text":case"heading":{Ce.tokens=[],this.inlineTokens(Ce.text,Ce.tokens);break}case"table":{for(Ce.tokens={header:[],cells:[]},X=Ce.header.length,me=0;me<X;me++)Ce.tokens.header[me]=[],this.inlineTokens(Ce.header[me],Ce.tokens.header[me]);for(X=Ce.cells.length,me=0;me<X;me++)for(Ct=Ce.cells[me],Ce.tokens.cells[me]=[],Ge=0;Ge<Ct.length;Ge++)Ce.tokens.cells[me][Ge]=[],this.inlineTokens(Ct[Ge],Ce.tokens.cells[me][Ge]);break}case"blockquote":{this.inline(Ce.tokens);break}case"list":{for(X=Ce.items.length,me=0;me<X;me++)this.inline(Ce.items[me].tokens);break}}return ee},ze.inlineTokens=function(ee,be,me,Ge){be===void 0&&(be=[]),me===void 0&&(me=!1),Ge===void 0&&(Ge=!1);var X,Ct,Ce=ee,Ot,zt,cr;if(this.tokens.links){var sr=Object.keys(this.tokens.links);if(sr.length>0)for(;(Ot=this.tokenizer.rules.inline.reflinkSearch.exec(Ce))!=null;)sr.includes(Ot[0].slice(Ot[0].lastIndexOf("[")+1,-1))&&(Ce=Ce.slice(0,Ot.index)+"["+kt("a",Ot[0].length-2)+"]"+Ce.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(Ot=this.tokenizer.rules.inline.blockSkip.exec(Ce))!=null;)Ce=Ce.slice(0,Ot.index)+"["+kt("a",Ot[0].length-2)+"]"+Ce.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(Ot=this.tokenizer.rules.inline.escapedEmSt.exec(Ce))!=null;)Ce=Ce.slice(0,Ot.index)+"++"+Ce.slice(this.tokenizer.rules.inline.escapedEmSt.lastIndex);for(;ee;){if(zt||(cr=""),zt=!1,X=this.tokenizer.escape(ee)){ee=ee.substring(X.raw.length),be.push(X);continue}if(X=this.tokenizer.tag(ee,me,Ge)){ee=ee.substring(X.raw.length),me=X.inLink,Ge=X.inRawBlock;var Kt=be[be.length-1];Kt&&X.type==="text"&&Kt.type==="text"?(Kt.raw+=X.raw,Kt.text+=X.text):be.push(X);continue}if(X=this.tokenizer.link(ee)){ee=ee.substring(X.raw.length),X.type==="link"&&(X.tokens=this.inlineTokens(X.text,[],!0,Ge)),be.push(X);continue}if(X=this.tokenizer.reflink(ee,this.tokens.links)){ee=ee.substring(X.raw.length);var $t=be[be.length-1];X.type==="link"?(X.tokens=this.inlineTokens(X.text,[],!0,Ge),be.push(X)):$t&&X.type==="text"&&$t.type==="text"?($t.raw+=X.raw,$t.text+=X.text):be.push(X);continue}if(X=this.tokenizer.emStrong(ee,Ce,cr)){ee=ee.substring(X.raw.length),X.tokens=this.inlineTokens(X.text,[],me,Ge),be.push(X);continue}if(X=this.tokenizer.codespan(ee)){ee=ee.substring(X.raw.length),be.push(X);continue}if(X=this.tokenizer.br(ee)){ee=ee.substring(X.raw.length),be.push(X);continue}if(X=this.tokenizer.del(ee)){ee=ee.substring(X.raw.length),X.tokens=this.inlineTokens(X.text,[],me,Ge),be.push(X);continue}if(X=this.tokenizer.autolink(ee,he)){ee=ee.substring(X.raw.length),be.push(X);continue}if(!me&&(X=this.tokenizer.url(ee,he))){ee=ee.substring(X.raw.length),be.push(X);continue}if(X=this.tokenizer.inlineText(ee,Ge,fe)){ee=ee.substring(X.raw.length),X.raw.slice(-1)!=="_"&&(cr=X.raw.slice(-1)),zt=!0,Ct=be[be.length-1],Ct&&Ct.type==="text"?(Ct.raw+=X.raw,Ct.text+=X.text):be.push(X);continue}if(ee){var mr="Infinite loop on byte: "+ee.charCodeAt(0);if(this.options.silent){console.error(mr);break}else throw new Error(mr)}}return be},w(Be,null,[{key:"rules",get:function(){return{block:At,inline:Pt}}}]),Be}(),Me=_e.exports.defaults,$e=k.cleanUrl,F=k.escape,le=function(){function Be(qe){this.options=qe||Me}var ze=Be.prototype;return ze.code=function(ee,be,me){var Ge=(be||"").match(/\S*/)[0];if(this.options.highlight){var X=this.options.highlight(ee,Ge);X!=null&&X!==ee&&(me=!0,ee=X)}return ee=ee.replace(/\n$/,"")+`
|
|
`,Ge?'<pre><code class="'+this.options.langPrefix+F(Ge,!0)+'">'+(me?ee:F(ee,!0))+`</code></pre>
|
|
`:"<pre><code>"+(me?ee:F(ee,!0))+`</code></pre>
|
|
`},ze.blockquote=function(ee){return`<blockquote>
|
|
`+ee+`</blockquote>
|
|
`},ze.html=function(ee){return ee},ze.heading=function(ee,be,me,Ge){return this.options.headerIds?"<h"+be+' id="'+this.options.headerPrefix+Ge.slug(me)+'">'+ee+"</h"+be+`>
|
|
`:"<h"+be+">"+ee+"</h"+be+`>
|
|
`},ze.hr=function(){return this.options.xhtml?`<hr/>
|
|
`:`<hr>
|
|
`},ze.list=function(ee,be,me){var Ge=be?"ol":"ul",X=be&&me!==1?' start="'+me+'"':"";return"<"+Ge+X+`>
|
|
`+ee+"</"+Ge+`>
|
|
`},ze.listitem=function(ee){return"<li>"+ee+`</li>
|
|
`},ze.checkbox=function(ee){return"<input "+(ee?'checked="" ':"")+'disabled="" type="checkbox"'+(this.options.xhtml?" /":"")+"> "},ze.paragraph=function(ee){return"<p>"+ee+`</p>
|
|
`},ze.table=function(ee,be){return be&&(be="<tbody>"+be+"</tbody>"),`<table>
|
|
<thead>
|
|
`+ee+`</thead>
|
|
`+be+`</table>
|
|
`},ze.tablerow=function(ee){return`<tr>
|
|
`+ee+`</tr>
|
|
`},ze.tablecell=function(ee,be){var me=be.header?"th":"td",Ge=be.align?"<"+me+' align="'+be.align+'">':"<"+me+">";return Ge+ee+"</"+me+`>
|
|
`},ze.strong=function(ee){return"<strong>"+ee+"</strong>"},ze.em=function(ee){return"<em>"+ee+"</em>"},ze.codespan=function(ee){return"<code>"+ee+"</code>"},ze.br=function(){return this.options.xhtml?"<br/>":"<br>"},ze.del=function(ee){return"<del>"+ee+"</del>"},ze.link=function(ee,be,me){if(ee=$e(this.options.sanitize,this.options.baseUrl,ee),ee===null)return me;var Ge='<a href="'+F(ee)+'"';return be&&(Ge+=' title="'+be+'"'),Ge+=">"+me+"</a>",Ge},ze.image=function(ee,be,me){if(ee=$e(this.options.sanitize,this.options.baseUrl,ee),ee===null)return me;var Ge='<img src="'+ee+'" alt="'+me+'"';return be&&(Ge+=' title="'+be+'"'),Ge+=this.options.xhtml?"/>":">",Ge},ze.text=function(ee){return ee},Be}(),xe=function(){function Be(){}var ze=Be.prototype;return ze.strong=function(ee){return ee},ze.em=function(ee){return ee},ze.codespan=function(ee){return ee},ze.del=function(ee){return ee},ze.html=function(ee){return ee},ze.text=function(ee){return ee},ze.link=function(ee,be,me){return""+me},ze.image=function(ee,be,me){return""+me},ze.br=function(){return""},Be}(),we=function(){function Be(){this.seen={}}var ze=Be.prototype;return ze.serialize=function(ee){return ee.toLowerCase().trim().replace(/<[!\/a-z].*?>/ig,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-")},ze.getNextSafeSlug=function(ee,be){var me=ee,Ge=0;if(this.seen.hasOwnProperty(me)){Ge=this.seen[ee];do Ge++,me=ee+"-"+Ge;while(this.seen.hasOwnProperty(me))}return be||(this.seen[ee]=Ge,this.seen[me]=0),me},ze.slug=function(ee,be){be===void 0&&(be={});var me=this.serialize(ee);return this.getNextSafeSlug(me,be.dryrun)},Be}(),Ie=le,Oe=xe,Qe=we,it=_e.exports.defaults,Je=k.unescape,Ke=function(){function Be(qe){this.options=qe||it,this.options.renderer=this.options.renderer||new Ie,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new Oe,this.slugger=new Qe}Be.parse=function(ee,be){var me=new Be(be);return me.parse(ee)},Be.parseInline=function(ee,be){var me=new Be(be);return me.parseInline(ee)};var ze=Be.prototype;return ze.parse=function(ee,be){be===void 0&&(be=!0);var me="",Ge,X,Ct,Ce,Ot,zt,cr,sr,Kt,$t,mr,Vr,Ur,jr,Vt,or,Ir,Kr,Lr=ee.length;for(Ge=0;Ge<Lr;Ge++)switch($t=ee[Ge],$t.type){case"space":continue;case"hr":{me+=this.renderer.hr();continue}case"heading":{me+=this.renderer.heading(this.parseInline($t.tokens),$t.depth,Je(this.parseInline($t.tokens,this.textRenderer)),this.slugger);continue}case"code":{me+=this.renderer.code($t.text,$t.lang,$t.escaped);continue}case"table":{for(sr="",cr="",Ce=$t.header.length,X=0;X<Ce;X++)cr+=this.renderer.tablecell(this.parseInline($t.tokens.header[X]),{header:!0,align:$t.align[X]});for(sr+=this.renderer.tablerow(cr),Kt="",Ce=$t.cells.length,X=0;X<Ce;X++){for(zt=$t.tokens.cells[X],cr="",Ot=zt.length,Ct=0;Ct<Ot;Ct++)cr+=this.renderer.tablecell(this.parseInline(zt[Ct]),{header:!1,align:$t.align[Ct]});Kt+=this.renderer.tablerow(cr)}me+=this.renderer.table(sr,Kt);continue}case"blockquote":{Kt=this.parse($t.tokens),me+=this.renderer.blockquote(Kt);continue}case"list":{for(mr=$t.ordered,Vr=$t.start,Ur=$t.loose,Ce=$t.items.length,Kt="",X=0;X<Ce;X++)Vt=$t.items[X],or=Vt.checked,Ir=Vt.task,jr="",Vt.task&&(Kr=this.renderer.checkbox(or),Ur?Vt.tokens.length>0&&Vt.tokens[0].type==="text"?(Vt.tokens[0].text=Kr+" "+Vt.tokens[0].text,Vt.tokens[0].tokens&&Vt.tokens[0].tokens.length>0&&Vt.tokens[0].tokens[0].type==="text"&&(Vt.tokens[0].tokens[0].text=Kr+" "+Vt.tokens[0].tokens[0].text)):Vt.tokens.unshift({type:"text",text:Kr}):jr+=Kr),jr+=this.parse(Vt.tokens,Ur),Kt+=this.renderer.listitem(jr,Ir,or);me+=this.renderer.list(Kt,mr,Vr);continue}case"html":{me+=this.renderer.html($t.text);continue}case"paragraph":{me+=this.renderer.paragraph(this.parseInline($t.tokens));continue}case"text":{for(Kt=$t.tokens?this.parseInline($t.tokens):$t.text;Ge+1<Lr&&ee[Ge+1].type==="text";)$t=ee[++Ge],Kt+=`
|
|
`+($t.tokens?this.parseInline($t.tokens):$t.text);me+=be?this.renderer.paragraph(Kt):Kt;continue}default:{var ln='Token with "'+$t.type+'" type was not found.';if(this.options.silent){console.error(ln);return}else throw new Error(ln)}}return me},ze.parseInline=function(ee,be){be=be||this.renderer;var me="",Ge,X,Ct=ee.length;for(Ge=0;Ge<Ct;Ge++)switch(X=ee[Ge],X.type){case"escape":{me+=be.text(X.text);break}case"html":{me+=be.html(X.text);break}case"link":{me+=be.link(X.href,X.title,this.parseInline(X.tokens,be));break}case"image":{me+=be.image(X.href,X.title,X.text);break}case"strong":{me+=be.strong(this.parseInline(X.tokens,be));break}case"em":{me+=be.em(this.parseInline(X.tokens,be));break}case"codespan":{me+=be.codespan(X.text);break}case"br":{me+=be.br();break}case"del":{me+=be.del(this.parseInline(X.tokens,be));break}case"text":{me+=be.text(X.text);break}default:{var Ce='Token with "'+X.type+'" type was not found.';if(this.options.silent){console.error(Ce);return}else throw new Error(Ce)}}return me},Be}(),yt=se,De=Ke,Pe=Fe,Ze=le,Ve=xe,nt=we,mt=k.merge,gt=k.checkSanitizeDeprecation,x=k.escape,T=_e.exports.getDefaults,et=_e.exports.changeDefaults,W=_e.exports.defaults;function Ee(Be,ze,qe){if(typeof Be=="undefined"||Be===null)throw new Error("marked(): input parameter is undefined or null");if(typeof Be!="string")throw new Error("marked(): input parameter is of type "+Object.prototype.toString.call(Be)+", string expected");if(typeof ze=="function"&&(qe=ze,ze=null),ze=mt({},Ee.defaults,ze||{}),gt(ze),qe){var ee=ze.highlight,be;try{be=yt.lex(Be,ze)}catch(Ct){return qe(Ct)}var me=function(Ce){var Ot;if(!Ce)try{ze.walkTokens&&Ee.walkTokens(be,ze.walkTokens),Ot=De.parse(be,ze)}catch(zt){Ce=zt}return ze.highlight=ee,Ce?qe(Ce):qe(null,Ot)};if(!ee||ee.length<3||(delete ze.highlight,!be.length))return me();var Ge=0;Ee.walkTokens(be,function(Ct){Ct.type==="code"&&(Ge++,setTimeout(function(){ee(Ct.text,Ct.lang,function(Ce,Ot){if(Ce)return me(Ce);Ot!=null&&Ot!==Ct.text&&(Ct.text=Ot,Ct.escaped=!0),Ge--,Ge===0&&me()})},0))}),Ge===0&&me();return}try{var X=yt.lex(Be,ze);return ze.walkTokens&&Ee.walkTokens(X,ze.walkTokens),De.parse(X,ze)}catch(Ct){if(Ct.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,ze.silent)return"<p>An error occurred:</p><pre>"+x(Ct.message+"",!0)+"</pre>";throw Ct}}Ee.options=Ee.setOptions=function(Be){return mt(Ee.defaults,Be),et(Ee.defaults),Ee},Ee.getDefaults=T,Ee.defaults=W,Ee.use=function(Be){var ze=mt({},Be);if(Be.renderer&&function(){var ee=Ee.defaults.renderer||new Ze,be=function(X){var Ct=ee[X];ee[X]=function(){for(var Ce=arguments.length,Ot=new Array(Ce),zt=0;zt<Ce;zt++)Ot[zt]=arguments[zt];var cr=Be.renderer[X].apply(ee,Ot);return cr===!1&&(cr=Ct.apply(ee,Ot)),cr}};for(var me in Be.renderer)be(me);ze.renderer=ee}(),Be.tokenizer&&function(){var ee=Ee.defaults.tokenizer||new Pe,be=function(X){var Ct=ee[X];ee[X]=function(){for(var Ce=arguments.length,Ot=new Array(Ce),zt=0;zt<Ce;zt++)Ot[zt]=arguments[zt];var cr=Be.tokenizer[X].apply(ee,Ot);return cr===!1&&(cr=Ct.apply(ee,Ot)),cr}};for(var me in Be.tokenizer)be(me);ze.tokenizer=ee}(),Be.walkTokens){var qe=Ee.defaults.walkTokens;ze.walkTokens=function(ee){Be.walkTokens(ee),qe&&qe(ee)}}Ee.setOptions(ze)},Ee.walkTokens=function(Be,ze){for(var qe=Se(Be),ee;!(ee=qe()).done;){var be=ee.value;switch(ze(be),be.type){case"table":{for(var me=Se(be.tokens.header),Ge;!(Ge=me()).done;){var X=Ge.value;Ee.walkTokens(X,ze)}for(var Ct=Se(be.tokens.cells),Ce;!(Ce=Ct()).done;)for(var Ot=Ce.value,zt=Se(Ot),cr;!(cr=zt()).done;){var sr=cr.value;Ee.walkTokens(sr,ze)}break}case"list":{Ee.walkTokens(be.items,ze);break}default:be.tokens&&Ee.walkTokens(be.tokens,ze)}}},Ee.parseInline=function(Be,ze){if(typeof Be=="undefined"||Be===null)throw new Error("marked.parseInline(): input parameter is undefined or null");if(typeof Be!="string")throw new Error("marked.parseInline(): input parameter is of type "+Object.prototype.toString.call(Be)+", string expected");ze=mt({},Ee.defaults,ze||{}),gt(ze);try{var qe=yt.lexInline(Be,ze);return ze.walkTokens&&Ee.walkTokens(qe,ze.walkTokens),De.parseInline(qe,ze)}catch(ee){if(ee.message+=`
|
|
Please report this to https://github.com/markedjs/marked.`,ze.silent)return"<p>An error occurred:</p><pre>"+x(ee.message+"",!0)+"</pre>";throw ee}},Ee.Parser=De,Ee.parser=De.parse,Ee.Renderer=Ze,Ee.TextRenderer=Ve,Ee.Lexer=yt,Ee.lexer=yt.lex,Ee.Tokenizer=Pe,Ee.Slugger=nt,Ee.parse=Ee;var Bt=Ee;return Bt})},11690:function(Nt){const rt=/[&<>"']/,w=/[&<>"']/g,$=/[<>"']|&(?!#?\w+;)/,ae=/[<>"']|&(?!#?\w+;)/g,Se={"&":"&","<":"<",">":">",'"':""","'":"'"},_e=J=>Se[J];function O(J,ye){if(ye){if(rt.test(J))return J.replace(w,_e)}else if($.test(J))return J.replace(ae,_e);return J}const m=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function de(J){return J.replace(m,(ye,pe)=>(pe=pe.toLowerCase(),pe==="colon"?":":pe.charAt(0)==="#"?pe.charAt(1)==="x"?String.fromCharCode(parseInt(pe.substring(2),16)):String.fromCharCode(+pe.substring(1)):""))}const ie=/(^|[^\[])\^/g;function o(J,ye){J=J.source||J,ye=ye||"";const pe={replace:(ve,Ae)=>(Ae=Ae.source||Ae,Ae=Ae.replace(ie,"$1"),J=J.replace(ve,Ae),pe),getRegex:()=>new RegExp(J,ye)};return pe}const Q=/[^\w:]/g,U=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i;function E(J,ye,pe){if(J){let ve;try{ve=decodeURIComponent(de(pe)).replace(Q,"").toLowerCase()}catch(Ae){return null}if(ve.indexOf("javascript:")===0||ve.indexOf("vbscript:")===0||ve.indexOf("data:")===0)return null}ye&&!U.test(pe)&&(pe=q(ye,pe));try{pe=encodeURI(pe).replace(/%25/g,"%")}catch(ve){return null}return pe}const b={},S=/^[^:]+:\/*[^/]*$/,D=/^([^:]+:)[\s\S]*$/,V=/^([^:]+:\/*[^/]*)[\s\S]*$/;function q(J,ye){b[" "+J]||(S.test(J)?b[" "+J]=J+"/":b[" "+J]=ue(J,"/",!0)),J=b[" "+J];const pe=J.indexOf(":")===-1;return ye.substring(0,2)==="//"?pe?ye:J.replace(D,"$1")+ye:ye.charAt(0)==="/"?pe?ye:J.replace(V,"$1")+ye:J+ye}const B={exec:function(){}};function R(J){let ye=1,pe,ve;for(;ye<arguments.length;ye++){pe=arguments[ye];for(ve in pe)Object.prototype.hasOwnProperty.call(pe,ve)&&(J[ve]=pe[ve])}return J}function Z(J,ye){const pe=J.replace(/\|/g,(j,P,K)=>{let k=!1,ne=P;for(;--ne>=0&&K[ne]==="\\";)k=!k;return k?"|":" |"}),ve=pe.split(/ \|/);let Ae=0;if(ve.length>ye)ve.splice(ye);else for(;ve.length<ye;)ve.push("");for(;Ae<ve.length;Ae++)ve[Ae]=ve[Ae].trim().replace(/\\\|/g,"|");return ve}function ue(J,ye,pe){const ve=J.length;if(ve===0)return"";let Ae=0;for(;Ae<ve;){const j=J.charAt(ve-Ae-1);if(j===ye&&!pe)Ae++;else if(j!==ye&&pe)Ae++;else break}return J.substr(0,ve-Ae)}function M(J,ye){if(J.indexOf(ye[1])===-1)return-1;const pe=J.length;let ve=0,Ae=0;for(;Ae<pe;Ae++)if(J[Ae]==="\\")Ae++;else if(J[Ae]===ye[0])ve++;else if(J[Ae]===ye[1]&&(ve--,ve<0))return Ae;return-1}function Y(J){J&&J.sanitize&&!J.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 oe(J,ye){if(ye<1)return"";let pe="";for(;ye>1;)ye&1&&(pe+=J),ye>>=1,J+=J;return pe+J}Nt.exports={escape:O,unescape:de,edit:o,cleanUrl:E,resolveUrl:q,noopTest:B,merge:R,splitCells:Z,rtrim:ue,findClosingBracket:M,checkSanitizeDeprecation:Y,repeatString:oe}},75918:function(Nt,rt,w){"use strict";w.d(rt,{Wi:function(){return m},Z0:function(){return de},aU:function(){return O},eZ:function(){return o},wY:function(){return ie}});var $=w(4348),ae=w(69323),Se=w(13268),_e=function(Q,U,E,b){function S(D){return D instanceof E?D:new E(function(V){V(D)})}return new(E||(E=Promise))(function(D,V){function q(Z){try{R(b.next(Z))}catch(ue){V(ue)}}function B(Z){try{R(b.throw(Z))}catch(ue){V(ue)}}function R(Z){Z.done?D(Z.value):S(Z.value).then(q,B)}R((b=b.apply(Q,U||[])).next())})};class O extends ae.JT{constructor(U,E="",b="",S=!0,D){super(),this._onDidChange=this._register(new $.Q5),this.onDidChange=this._onDidChange.event,this._enabled=!0,this._id=U,this._label=E,this._cssClass=b,this._enabled=S,this._actionCallback=D}get id(){return this._id}get label(){return this._label}set label(U){this._setLabel(U)}_setLabel(U){this._label!==U&&(this._label=U,this._onDidChange.fire({label:U}))}get tooltip(){return this._tooltip||""}set tooltip(U){this._setTooltip(U)}_setTooltip(U){this._tooltip!==U&&(this._tooltip=U,this._onDidChange.fire({tooltip:U}))}get class(){return this._cssClass}set class(U){this._setClass(U)}_setClass(U){this._cssClass!==U&&(this._cssClass=U,this._onDidChange.fire({class:U}))}get enabled(){return this._enabled}set enabled(U){this._setEnabled(U)}_setEnabled(U){this._enabled!==U&&(this._enabled=U,this._onDidChange.fire({enabled:U}))}get checked(){return this._checked}set checked(U){this._setChecked(U)}_setChecked(U){this._checked!==U&&(this._checked=U,this._onDidChange.fire({checked:U}))}run(U,E){return _e(this,void 0,void 0,function*(){this._actionCallback&&(yield this._actionCallback(U))})}}class m extends ae.JT{constructor(){super(...arguments),this._onBeforeRun=this._register(new $.Q5),this.onBeforeRun=this._onBeforeRun.event,this._onDidRun=this._register(new $.Q5),this.onDidRun=this._onDidRun.event}run(U,E){return _e(this,void 0,void 0,function*(){if(!U.enabled)return;this._onBeforeRun.fire({action:U});let b;try{yield this.runAction(U,E)}catch(S){b=S}this._onDidRun.fire({action:U,error:b})})}runAction(U,E){return _e(this,void 0,void 0,function*(){yield U.run(E)})}}class de extends O{constructor(U){super(de.ID,U,U?"separator text":"separator"),this.checked=!1,this.enabled=!1}}de.ID="vs.actions.separator";class ie{constructor(U,E,b,S){this.tooltip="",this.enabled=!0,this.checked=!1,this.id=U,this.label=E,this.class=S,this._actions=b}get actions(){return this._actions}dispose(){}run(){return _e(this,void 0,void 0,function*(){})}}class o extends O{constructor(){super(o.ID,Se.N("submenu.empty","(empty)"),void 0,!1)}}o.ID="vs.actions.empty"},76068:function(Nt,rt,w){"use strict";w.d(rt,{ok:function(){return $}});function $(ae,Se){if(!ae)throw new Error(Se?`Assertion failed (${Se})`:"Assertion Failed")}},52615:function(Nt,rt,w){"use strict";w.d(rt,{CM:function(){return O},JL:function(){return m},dT:function(){return ie},fK:function(){return _e},lA:function(){return de}});var $=w(4348);class ae{constructor(){this._icons=new Map,this._onDidRegister=new $.Q5}add(Q){const U=this._icons.get(Q.id);U?Q.description?U.description=Q.description:console.error(`Duplicate registration of codicon ${Q.id}`):(this._icons.set(Q.id,Q),this._onDidRegister.fire(Q))}get(Q){return this._icons.get(Q)}get all(){return this._icons.values()}get onDidRegister(){return this._onDidRegister.event}}const Se=new ae,_e=Se;function O(o,Q){return new de(o,Q)}function m(o){return o?o.replace(/\$\((.*?)\)/g,(Q,U)=>` ${U} `).trim():""}class de{constructor(Q,U,E){this.id=Q,this.definition=U,this.description=E,Se.add(this)}get classNames(){return"codicon codicon-"+this.id}get classNamesArray(){return["codicon","codicon-"+this.id]}get cssSelector(){return".codicon.codicon-"+this.id}}var ie;(function(o){o.iconNameSegment="[A-Za-z0-9]+",o.iconNameExpression="[A-Za-z0-9\\-]+",o.iconModifierExpression="~[A-Za-z]+";const Q=new RegExp(`^(${o.iconNameExpression})(${o.iconModifierExpression})?$`);function U(S){if(S instanceof de)return["codicon","codicon-"+S.id];const D=Q.exec(S.id);if(!D)return U(de.error);let[,V,q]=D;const B=["codicon","codicon-"+V];return q&&B.push("codicon-modifier-"+q.substr(1)),B}o.asClassNameArray=U;function E(S){return U(S).join(" ")}o.asClassName=E;function b(S){return"."+U(S).join(".")}o.asCSSSelector=b})(ie||(ie={})),function(o){o.add=new o("add",{fontCharacter:"\\ea60"}),o.plus=new o("plus",o.add.definition),o.gistNew=new o("gist-new",o.add.definition),o.repoCreate=new o("repo-create",o.add.definition),o.lightbulb=new o("lightbulb",{fontCharacter:"\\ea61"}),o.lightBulb=new o("light-bulb",{fontCharacter:"\\ea61"}),o.repo=new o("repo",{fontCharacter:"\\ea62"}),o.repoDelete=new o("repo-delete",{fontCharacter:"\\ea62"}),o.gistFork=new o("gist-fork",{fontCharacter:"\\ea63"}),o.repoForked=new o("repo-forked",{fontCharacter:"\\ea63"}),o.gitPullRequest=new o("git-pull-request",{fontCharacter:"\\ea64"}),o.gitPullRequestAbandoned=new o("git-pull-request-abandoned",{fontCharacter:"\\ea64"}),o.recordKeys=new o("record-keys",{fontCharacter:"\\ea65"}),o.keyboard=new o("keyboard",{fontCharacter:"\\ea65"}),o.tag=new o("tag",{fontCharacter:"\\ea66"}),o.tagAdd=new o("tag-add",{fontCharacter:"\\ea66"}),o.tagRemove=new o("tag-remove",{fontCharacter:"\\ea66"}),o.person=new o("person",{fontCharacter:"\\ea67"}),o.personFollow=new o("person-follow",{fontCharacter:"\\ea67"}),o.personOutline=new o("person-outline",{fontCharacter:"\\ea67"}),o.personFilled=new o("person-filled",{fontCharacter:"\\ea67"}),o.gitBranch=new o("git-branch",{fontCharacter:"\\ea68"}),o.gitBranchCreate=new o("git-branch-create",{fontCharacter:"\\ea68"}),o.gitBranchDelete=new o("git-branch-delete",{fontCharacter:"\\ea68"}),o.sourceControl=new o("source-control",{fontCharacter:"\\ea68"}),o.mirror=new o("mirror",{fontCharacter:"\\ea69"}),o.mirrorPublic=new o("mirror-public",{fontCharacter:"\\ea69"}),o.star=new o("star",{fontCharacter:"\\ea6a"}),o.starAdd=new o("star-add",{fontCharacter:"\\ea6a"}),o.starDelete=new o("star-delete",{fontCharacter:"\\ea6a"}),o.starEmpty=new o("star-empty",{fontCharacter:"\\ea6a"}),o.comment=new o("comment",{fontCharacter:"\\ea6b"}),o.commentAdd=new o("comment-add",{fontCharacter:"\\ea6b"}),o.alert=new o("alert",{fontCharacter:"\\ea6c"}),o.warning=new o("warning",{fontCharacter:"\\ea6c"}),o.search=new o("search",{fontCharacter:"\\ea6d"}),o.searchSave=new o("search-save",{fontCharacter:"\\ea6d"}),o.logOut=new o("log-out",{fontCharacter:"\\ea6e"}),o.signOut=new o("sign-out",{fontCharacter:"\\ea6e"}),o.logIn=new o("log-in",{fontCharacter:"\\ea6f"}),o.signIn=new o("sign-in",{fontCharacter:"\\ea6f"}),o.eye=new o("eye",{fontCharacter:"\\ea70"}),o.eyeUnwatch=new o("eye-unwatch",{fontCharacter:"\\ea70"}),o.eyeWatch=new o("eye-watch",{fontCharacter:"\\ea70"}),o.circleFilled=new o("circle-filled",{fontCharacter:"\\ea71"}),o.primitiveDot=new o("primitive-dot",{fontCharacter:"\\ea71"}),o.closeDirty=new o("close-dirty",{fontCharacter:"\\ea71"}),o.debugBreakpoint=new o("debug-breakpoint",{fontCharacter:"\\ea71"}),o.debugBreakpointDisabled=new o("debug-breakpoint-disabled",{fontCharacter:"\\ea71"}),o.debugHint=new o("debug-hint",{fontCharacter:"\\ea71"}),o.primitiveSquare=new o("primitive-square",{fontCharacter:"\\ea72"}),o.edit=new o("edit",{fontCharacter:"\\ea73"}),o.pencil=new o("pencil",{fontCharacter:"\\ea73"}),o.info=new o("info",{fontCharacter:"\\ea74"}),o.issueOpened=new o("issue-opened",{fontCharacter:"\\ea74"}),o.gistPrivate=new o("gist-private",{fontCharacter:"\\ea75"}),o.gitForkPrivate=new o("git-fork-private",{fontCharacter:"\\ea75"}),o.lock=new o("lock",{fontCharacter:"\\ea75"}),o.mirrorPrivate=new o("mirror-private",{fontCharacter:"\\ea75"}),o.close=new o("close",{fontCharacter:"\\ea76"}),o.removeClose=new o("remove-close",{fontCharacter:"\\ea76"}),o.x=new o("x",{fontCharacter:"\\ea76"}),o.repoSync=new o("repo-sync",{fontCharacter:"\\ea77"}),o.sync=new o("sync",{fontCharacter:"\\ea77"}),o.clone=new o("clone",{fontCharacter:"\\ea78"}),o.desktopDownload=new o("desktop-download",{fontCharacter:"\\ea78"}),o.beaker=new o("beaker",{fontCharacter:"\\ea79"}),o.microscope=new o("microscope",{fontCharacter:"\\ea79"}),o.vm=new o("vm",{fontCharacter:"\\ea7a"}),o.deviceDesktop=new o("device-desktop",{fontCharacter:"\\ea7a"}),o.file=new o("file",{fontCharacter:"\\ea7b"}),o.fileText=new o("file-text",{fontCharacter:"\\ea7b"}),o.more=new o("more",{fontCharacter:"\\ea7c"}),o.ellipsis=new o("ellipsis",{fontCharacter:"\\ea7c"}),o.kebabHorizontal=new o("kebab-horizontal",{fontCharacter:"\\ea7c"}),o.mailReply=new o("mail-reply",{fontCharacter:"\\ea7d"}),o.reply=new o("reply",{fontCharacter:"\\ea7d"}),o.organization=new o("organization",{fontCharacter:"\\ea7e"}),o.organizationFilled=new o("organization-filled",{fontCharacter:"\\ea7e"}),o.organizationOutline=new o("organization-outline",{fontCharacter:"\\ea7e"}),o.newFile=new o("new-file",{fontCharacter:"\\ea7f"}),o.fileAdd=new o("file-add",{fontCharacter:"\\ea7f"}),o.newFolder=new o("new-folder",{fontCharacter:"\\ea80"}),o.fileDirectoryCreate=new o("file-directory-create",{fontCharacter:"\\ea80"}),o.trash=new o("trash",{fontCharacter:"\\ea81"}),o.trashcan=new o("trashcan",{fontCharacter:"\\ea81"}),o.history=new o("history",{fontCharacter:"\\ea82"}),o.clock=new o("clock",{fontCharacter:"\\ea82"}),o.folder=new o("folder",{fontCharacter:"\\ea83"}),o.fileDirectory=new o("file-directory",{fontCharacter:"\\ea83"}),o.symbolFolder=new o("symbol-folder",{fontCharacter:"\\ea83"}),o.logoGithub=new o("logo-github",{fontCharacter:"\\ea84"}),o.markGithub=new o("mark-github",{fontCharacter:"\\ea84"}),o.github=new o("github",{fontCharacter:"\\ea84"}),o.terminal=new o("terminal",{fontCharacter:"\\ea85"}),o.console=new o("console",{fontCharacter:"\\ea85"}),o.repl=new o("repl",{fontCharacter:"\\ea85"}),o.zap=new o("zap",{fontCharacter:"\\ea86"}),o.symbolEvent=new o("symbol-event",{fontCharacter:"\\ea86"}),o.error=new o("error",{fontCharacter:"\\ea87"}),o.stop=new o("stop",{fontCharacter:"\\ea87"}),o.variable=new o("variable",{fontCharacter:"\\ea88"}),o.symbolVariable=new o("symbol-variable",{fontCharacter:"\\ea88"}),o.array=new o("array",{fontCharacter:"\\ea8a"}),o.symbolArray=new o("symbol-array",{fontCharacter:"\\ea8a"}),o.symbolModule=new o("symbol-module",{fontCharacter:"\\ea8b"}),o.symbolPackage=new o("symbol-package",{fontCharacter:"\\ea8b"}),o.symbolNamespace=new o("symbol-namespace",{fontCharacter:"\\ea8b"}),o.symbolObject=new o("symbol-object",{fontCharacter:"\\ea8b"}),o.symbolMethod=new o("symbol-method",{fontCharacter:"\\ea8c"}),o.symbolFunction=new o("symbol-function",{fontCharacter:"\\ea8c"}),o.symbolConstructor=new o("symbol-constructor",{fontCharacter:"\\ea8c"}),o.symbolBoolean=new o("symbol-boolean",{fontCharacter:"\\ea8f"}),o.symbolNull=new o("symbol-null",{fontCharacter:"\\ea8f"}),o.symbolNumeric=new o("symbol-numeric",{fontCharacter:"\\ea90"}),o.symbolNumber=new o("symbol-number",{fontCharacter:"\\ea90"}),o.symbolStructure=new o("symbol-structure",{fontCharacter:"\\ea91"}),o.symbolStruct=new o("symbol-struct",{fontCharacter:"\\ea91"}),o.symbolParameter=new o("symbol-parameter",{fontCharacter:"\\ea92"}),o.symbolTypeParameter=new o("symbol-type-parameter",{fontCharacter:"\\ea92"}),o.symbolKey=new o("symbol-key",{fontCharacter:"\\ea93"}),o.symbolText=new o("symbol-text",{fontCharacter:"\\ea93"}),o.symbolReference=new o("symbol-reference",{fontCharacter:"\\ea94"}),o.goToFile=new o("go-to-file",{fontCharacter:"\\ea94"}),o.symbolEnum=new o("symbol-enum",{fontCharacter:"\\ea95"}),o.symbolValue=new o("symbol-value",{fontCharacter:"\\ea95"}),o.symbolRuler=new o("symbol-ruler",{fontCharacter:"\\ea96"}),o.symbolUnit=new o("symbol-unit",{fontCharacter:"\\ea96"}),o.activateBreakpoints=new o("activate-breakpoints",{fontCharacter:"\\ea97"}),o.archive=new o("archive",{fontCharacter:"\\ea98"}),o.arrowBoth=new o("arrow-both",{fontCharacter:"\\ea99"}),o.arrowDown=new o("arrow-down",{fontCharacter:"\\ea9a"}),o.arrowLeft=new o("arrow-left",{fontCharacter:"\\ea9b"}),o.arrowRight=new o("arrow-right",{fontCharacter:"\\ea9c"}),o.arrowSmallDown=new o("arrow-small-down",{fontCharacter:"\\ea9d"}),o.arrowSmallLeft=new o("arrow-small-left",{fontCharacter:"\\ea9e"}),o.arrowSmallRight=new o("arrow-small-right",{fontCharacter:"\\ea9f"}),o.arrowSmallUp=new o("arrow-small-up",{fontCharacter:"\\eaa0"}),o.arrowUp=new o("arrow-up",{fontCharacter:"\\eaa1"}),o.bell=new o("bell",{fontCharacter:"\\eaa2"}),o.bold=new o("bold",{fontCharacter:"\\eaa3"}),o.book=new o("book",{fontCharacter:"\\eaa4"}),o.bookmark=new o("bookmark",{fontCharacter:"\\eaa5"}),o.debugBreakpointConditionalUnverified=new o("debug-breakpoint-conditional-unverified",{fontCharacter:"\\eaa6"}),o.debugBreakpointConditional=new o("debug-breakpoint-conditional",{fontCharacter:"\\eaa7"}),o.debugBreakpointConditionalDisabled=new o("debug-breakpoint-conditional-disabled",{fontCharacter:"\\eaa7"}),o.debugBreakpointDataUnverified=new o("debug-breakpoint-data-unverified",{fontCharacter:"\\eaa8"}),o.debugBreakpointData=new o("debug-breakpoint-data",{fontCharacter:"\\eaa9"}),o.debugBreakpointDataDisabled=new o("debug-breakpoint-data-disabled",{fontCharacter:"\\eaa9"}),o.debugBreakpointLogUnverified=new o("debug-breakpoint-log-unverified",{fontCharacter:"\\eaaa"}),o.debugBreakpointLog=new o("debug-breakpoint-log",{fontCharacter:"\\eaab"}),o.debugBreakpointLogDisabled=new o("debug-breakpoint-log-disabled",{fontCharacter:"\\eaab"}),o.briefcase=new o("briefcase",{fontCharacter:"\\eaac"}),o.broadcast=new o("broadcast",{fontCharacter:"\\eaad"}),o.browser=new o("browser",{fontCharacter:"\\eaae"}),o.bug=new o("bug",{fontCharacter:"\\eaaf"}),o.calendar=new o("calendar",{fontCharacter:"\\eab0"}),o.caseSensitive=new o("case-sensitive",{fontCharacter:"\\eab1"}),o.check=new o("check",{fontCharacter:"\\eab2"}),o.checklist=new o("checklist",{fontCharacter:"\\eab3"}),o.chevronDown=new o("chevron-down",{fontCharacter:"\\eab4"}),o.dropDownButton=new o("drop-down-button",o.chevronDown.definition),o.chevronLeft=new o("chevron-left",{fontCharacter:"\\eab5"}),o.chevronRight=new o("chevron-right",{fontCharacter:"\\eab6"}),o.chevronUp=new o("chevron-up",{fontCharacter:"\\eab7"}),o.chromeClose=new o("chrome-close",{fontCharacter:"\\eab8"}),o.chromeMaximize=new o("chrome-maximize",{fontCharacter:"\\eab9"}),o.chromeMinimize=new o("chrome-minimize",{fontCharacter:"\\eaba"}),o.chromeRestore=new o("chrome-restore",{fontCharacter:"\\eabb"}),o.circleOutline=new o("circle-outline",{fontCharacter:"\\eabc"}),o.debugBreakpointUnverified=new o("debug-breakpoint-unverified",{fontCharacter:"\\eabc"}),o.circleSlash=new o("circle-slash",{fontCharacter:"\\eabd"}),o.circuitBoard=new o("circuit-board",{fontCharacter:"\\eabe"}),o.clearAll=new o("clear-all",{fontCharacter:"\\eabf"}),o.clippy=new o("clippy",{fontCharacter:"\\eac0"}),o.closeAll=new o("close-all",{fontCharacter:"\\eac1"}),o.cloudDownload=new o("cloud-download",{fontCharacter:"\\eac2"}),o.cloudUpload=new o("cloud-upload",{fontCharacter:"\\eac3"}),o.code=new o("code",{fontCharacter:"\\eac4"}),o.collapseAll=new o("collapse-all",{fontCharacter:"\\eac5"}),o.colorMode=new o("color-mode",{fontCharacter:"\\eac6"}),o.commentDiscussion=new o("comment-discussion",{fontCharacter:"\\eac7"}),o.compareChanges=new o("compare-changes",{fontCharacter:"\\eafd"}),o.creditCard=new o("credit-card",{fontCharacter:"\\eac9"}),o.dash=new o("dash",{fontCharacter:"\\eacc"}),o.dashboard=new o("dashboard",{fontCharacter:"\\eacd"}),o.database=new o("database",{fontCharacter:"\\eace"}),o.debugContinue=new o("debug-continue",{fontCharacter:"\\eacf"}),o.debugDisconnect=new o("debug-disconnect",{fontCharacter:"\\ead0"}),o.debugPause=new o("debug-pause",{fontCharacter:"\\ead1"}),o.debugRestart=new o("debug-restart",{fontCharacter:"\\ead2"}),o.debugStart=new o("debug-start",{fontCharacter:"\\ead3"}),o.debugStepInto=new o("debug-step-into",{fontCharacter:"\\ead4"}),o.debugStepOut=new o("debug-step-out",{fontCharacter:"\\ead5"}),o.debugStepOver=new o("debug-step-over",{fontCharacter:"\\ead6"}),o.debugStop=new o("debug-stop",{fontCharacter:"\\ead7"}),o.debug=new o("debug",{fontCharacter:"\\ead8"}),o.deviceCameraVideo=new o("device-camera-video",{fontCharacter:"\\ead9"}),o.deviceCamera=new o("device-camera",{fontCharacter:"\\eada"}),o.deviceMobile=new o("device-mobile",{fontCharacter:"\\eadb"}),o.diffAdded=new o("diff-added",{fontCharacter:"\\eadc"}),o.diffIgnored=new o("diff-ignored",{fontCharacter:"\\eadd"}),o.diffModified=new o("diff-modified",{fontCharacter:"\\eade"}),o.diffRemoved=new o("diff-removed",{fontCharacter:"\\eadf"}),o.diffRenamed=new o("diff-renamed",{fontCharacter:"\\eae0"}),o.diff=new o("diff",{fontCharacter:"\\eae1"}),o.discard=new o("discard",{fontCharacter:"\\eae2"}),o.editorLayout=new o("editor-layout",{fontCharacter:"\\eae3"}),o.emptyWindow=new o("empty-window",{fontCharacter:"\\eae4"}),o.exclude=new o("exclude",{fontCharacter:"\\eae5"}),o.extensions=new o("extensions",{fontCharacter:"\\eae6"}),o.eyeClosed=new o("eye-closed",{fontCharacter:"\\eae7"}),o.fileBinary=new o("file-binary",{fontCharacter:"\\eae8"}),o.fileCode=new o("file-code",{fontCharacter:"\\eae9"}),o.fileMedia=new o("file-media",{fontCharacter:"\\eaea"}),o.filePdf=new o("file-pdf",{fontCharacter:"\\eaeb"}),o.fileSubmodule=new o("file-submodule",{fontCharacter:"\\eaec"}),o.fileSymlinkDirectory=new o("file-symlink-directory",{fontCharacter:"\\eaed"}),o.fileSymlinkFile=new o("file-symlink-file",{fontCharacter:"\\eaee"}),o.fileZip=new o("file-zip",{fontCharacter:"\\eaef"}),o.files=new o("files",{fontCharacter:"\\eaf0"}),o.filter=new o("filter",{fontCharacter:"\\eaf1"}),o.flame=new o("flame",{fontCharacter:"\\eaf2"}),o.foldDown=new o("fold-down",{fontCharacter:"\\eaf3"}),o.foldUp=new o("fold-up",{fontCharacter:"\\eaf4"}),o.fold=new o("fold",{fontCharacter:"\\eaf5"}),o.folderActive=new o("folder-active",{fontCharacter:"\\eaf6"}),o.folderOpened=new o("folder-opened",{fontCharacter:"\\eaf7"}),o.gear=new o("gear",{fontCharacter:"\\eaf8"}),o.gift=new o("gift",{fontCharacter:"\\eaf9"}),o.gistSecret=new o("gist-secret",{fontCharacter:"\\eafa"}),o.gist=new o("gist",{fontCharacter:"\\eafb"}),o.gitCommit=new o("git-commit",{fontCharacter:"\\eafc"}),o.gitCompare=new o("git-compare",{fontCharacter:"\\eafd"}),o.gitMerge=new o("git-merge",{fontCharacter:"\\eafe"}),o.githubAction=new o("github-action",{fontCharacter:"\\eaff"}),o.githubAlt=new o("github-alt",{fontCharacter:"\\eb00"}),o.globe=new o("globe",{fontCharacter:"\\eb01"}),o.grabber=new o("grabber",{fontCharacter:"\\eb02"}),o.graph=new o("graph",{fontCharacter:"\\eb03"}),o.gripper=new o("gripper",{fontCharacter:"\\eb04"}),o.heart=new o("heart",{fontCharacter:"\\eb05"}),o.home=new o("home",{fontCharacter:"\\eb06"}),o.horizontalRule=new o("horizontal-rule",{fontCharacter:"\\eb07"}),o.hubot=new o("hubot",{fontCharacter:"\\eb08"}),o.inbox=new o("inbox",{fontCharacter:"\\eb09"}),o.issueClosed=new o("issue-closed",{fontCharacter:"\\eba4"}),o.issueReopened=new o("issue-reopened",{fontCharacter:"\\eb0b"}),o.issues=new o("issues",{fontCharacter:"\\eb0c"}),o.italic=new o("italic",{fontCharacter:"\\eb0d"}),o.jersey=new o("jersey",{fontCharacter:"\\eb0e"}),o.json=new o("json",{fontCharacter:"\\eb0f"}),o.kebabVertical=new o("kebab-vertical",{fontCharacter:"\\eb10"}),o.key=new o("key",{fontCharacter:"\\eb11"}),o.law=new o("law",{fontCharacter:"\\eb12"}),o.lightbulbAutofix=new o("lightbulb-autofix",{fontCharacter:"\\eb13"}),o.linkExternal=new o("link-external",{fontCharacter:"\\eb14"}),o.link=new o("link",{fontCharacter:"\\eb15"}),o.listOrdered=new o("list-ordered",{fontCharacter:"\\eb16"}),o.listUnordered=new o("list-unordered",{fontCharacter:"\\eb17"}),o.liveShare=new o("live-share",{fontCharacter:"\\eb18"}),o.loading=new o("loading",{fontCharacter:"\\eb19"}),o.location=new o("location",{fontCharacter:"\\eb1a"}),o.mailRead=new o("mail-read",{fontCharacter:"\\eb1b"}),o.mail=new o("mail",{fontCharacter:"\\eb1c"}),o.markdown=new o("markdown",{fontCharacter:"\\eb1d"}),o.megaphone=new o("megaphone",{fontCharacter:"\\eb1e"}),o.mention=new o("mention",{fontCharacter:"\\eb1f"}),o.milestone=new o("milestone",{fontCharacter:"\\eb20"}),o.mortarBoard=new o("mortar-board",{fontCharacter:"\\eb21"}),o.move=new o("move",{fontCharacter:"\\eb22"}),o.multipleWindows=new o("multiple-windows",{fontCharacter:"\\eb23"}),o.mute=new o("mute",{fontCharacter:"\\eb24"}),o.noNewline=new o("no-newline",{fontCharacter:"\\eb25"}),o.note=new o("note",{fontCharacter:"\\eb26"}),o.octoface=new o("octoface",{fontCharacter:"\\eb27"}),o.openPreview=new o("open-preview",{fontCharacter:"\\eb28"}),o.package_=new o("package",{fontCharacter:"\\eb29"}),o.paintcan=new o("paintcan",{fontCharacter:"\\eb2a"}),o.pin=new o("pin",{fontCharacter:"\\eb2b"}),o.play=new o("play",{fontCharacter:"\\eb2c"}),o.run=new o("run",{fontCharacter:"\\eb2c"}),o.plug=new o("plug",{fontCharacter:"\\eb2d"}),o.preserveCase=new o("preserve-case",{fontCharacter:"\\eb2e"}),o.preview=new o("preview",{fontCharacter:"\\eb2f"}),o.project=new o("project",{fontCharacter:"\\eb30"}),o.pulse=new o("pulse",{fontCharacter:"\\eb31"}),o.question=new o("question",{fontCharacter:"\\eb32"}),o.quote=new o("quote",{fontCharacter:"\\eb33"}),o.radioTower=new o("radio-tower",{fontCharacter:"\\eb34"}),o.reactions=new o("reactions",{fontCharacter:"\\eb35"}),o.references=new o("references",{fontCharacter:"\\eb36"}),o.refresh=new o("refresh",{fontCharacter:"\\eb37"}),o.regex=new o("regex",{fontCharacter:"\\eb38"}),o.remoteExplorer=new o("remote-explorer",{fontCharacter:"\\eb39"}),o.remote=new o("remote",{fontCharacter:"\\eb3a"}),o.remove=new o("remove",{fontCharacter:"\\eb3b"}),o.replaceAll=new o("replace-all",{fontCharacter:"\\eb3c"}),o.replace=new o("replace",{fontCharacter:"\\eb3d"}),o.repoClone=new o("repo-clone",{fontCharacter:"\\eb3e"}),o.repoForcePush=new o("repo-force-push",{fontCharacter:"\\eb3f"}),o.repoPull=new o("repo-pull",{fontCharacter:"\\eb40"}),o.repoPush=new o("repo-push",{fontCharacter:"\\eb41"}),o.report=new o("report",{fontCharacter:"\\eb42"}),o.requestChanges=new o("request-changes",{fontCharacter:"\\eb43"}),o.rocket=new o("rocket",{fontCharacter:"\\eb44"}),o.rootFolderOpened=new o("root-folder-opened",{fontCharacter:"\\eb45"}),o.rootFolder=new o("root-folder",{fontCharacter:"\\eb46"}),o.rss=new o("rss",{fontCharacter:"\\eb47"}),o.ruby=new o("ruby",{fontCharacter:"\\eb48"}),o.saveAll=new o("save-all",{fontCharacter:"\\eb49"}),o.saveAs=new o("save-as",{fontCharacter:"\\eb4a"}),o.save=new o("save",{fontCharacter:"\\eb4b"}),o.screenFull=new o("screen-full",{fontCharacter:"\\eb4c"}),o.screenNormal=new o("screen-normal",{fontCharacter:"\\eb4d"}),o.searchStop=new o("search-stop",{fontCharacter:"\\eb4e"}),o.server=new o("server",{fontCharacter:"\\eb50"}),o.settingsGear=new o("settings-gear",{fontCharacter:"\\eb51"}),o.settings=new o("settings",{fontCharacter:"\\eb52"}),o.shield=new o("shield",{fontCharacter:"\\eb53"}),o.smiley=new o("smiley",{fontCharacter:"\\eb54"}),o.sortPrecedence=new o("sort-precedence",{fontCharacter:"\\eb55"}),o.splitHorizontal=new o("split-horizontal",{fontCharacter:"\\eb56"}),o.splitVertical=new o("split-vertical",{fontCharacter:"\\eb57"}),o.squirrel=new o("squirrel",{fontCharacter:"\\eb58"}),o.starFull=new o("star-full",{fontCharacter:"\\eb59"}),o.starHalf=new o("star-half",{fontCharacter:"\\eb5a"}),o.symbolClass=new o("symbol-class",{fontCharacter:"\\eb5b"}),o.symbolColor=new o("symbol-color",{fontCharacter:"\\eb5c"}),o.symbolConstant=new o("symbol-constant",{fontCharacter:"\\eb5d"}),o.symbolEnumMember=new o("symbol-enum-member",{fontCharacter:"\\eb5e"}),o.symbolField=new o("symbol-field",{fontCharacter:"\\eb5f"}),o.symbolFile=new o("symbol-file",{fontCharacter:"\\eb60"}),o.symbolInterface=new o("symbol-interface",{fontCharacter:"\\eb61"}),o.symbolKeyword=new o("symbol-keyword",{fontCharacter:"\\eb62"}),o.symbolMisc=new o("symbol-misc",{fontCharacter:"\\eb63"}),o.symbolOperator=new o("symbol-operator",{fontCharacter:"\\eb64"}),o.symbolProperty=new o("symbol-property",{fontCharacter:"\\eb65"}),o.wrench=new o("wrench",{fontCharacter:"\\eb65"}),o.wrenchSubaction=new o("wrench-subaction",{fontCharacter:"\\eb65"}),o.symbolSnippet=new o("symbol-snippet",{fontCharacter:"\\eb66"}),o.tasklist=new o("tasklist",{fontCharacter:"\\eb67"}),o.telescope=new o("telescope",{fontCharacter:"\\eb68"}),o.textSize=new o("text-size",{fontCharacter:"\\eb69"}),o.threeBars=new o("three-bars",{fontCharacter:"\\eb6a"}),o.thumbsdown=new o("thumbsdown",{fontCharacter:"\\eb6b"}),o.thumbsup=new o("thumbsup",{fontCharacter:"\\eb6c"}),o.tools=new o("tools",{fontCharacter:"\\eb6d"}),o.triangleDown=new o("triangle-down",{fontCharacter:"\\eb6e"}),o.triangleLeft=new o("triangle-left",{fontCharacter:"\\eb6f"}),o.triangleRight=new o("triangle-right",{fontCharacter:"\\eb70"}),o.triangleUp=new o("triangle-up",{fontCharacter:"\\eb71"}),o.twitter=new o("twitter",{fontCharacter:"\\eb72"}),o.unfold=new o("unfold",{fontCharacter:"\\eb73"}),o.unlock=new o("unlock",{fontCharacter:"\\eb74"}),o.unmute=new o("unmute",{fontCharacter:"\\eb75"}),o.unverified=new o("unverified",{fontCharacter:"\\eb76"}),o.verified=new o("verified",{fontCharacter:"\\eb77"}),o.versions=new o("versions",{fontCharacter:"\\eb78"}),o.vmActive=new o("vm-active",{fontCharacter:"\\eb79"}),o.vmOutline=new o("vm-outline",{fontCharacter:"\\eb7a"}),o.vmRunning=new o("vm-running",{fontCharacter:"\\eb7b"}),o.watch=new o("watch",{fontCharacter:"\\eb7c"}),o.whitespace=new o("whitespace",{fontCharacter:"\\eb7d"}),o.wholeWord=new o("whole-word",{fontCharacter:"\\eb7e"}),o.window=new o("window",{fontCharacter:"\\eb7f"}),o.wordWrap=new o("word-wrap",{fontCharacter:"\\eb80"}),o.zoomIn=new o("zoom-in",{fontCharacter:"\\eb81"}),o.zoomOut=new o("zoom-out",{fontCharacter:"\\eb82"}),o.listFilter=new o("list-filter",{fontCharacter:"\\eb83"}),o.listFlat=new o("list-flat",{fontCharacter:"\\eb84"}),o.listSelection=new o("list-selection",{fontCharacter:"\\eb85"}),o.selection=new o("selection",{fontCharacter:"\\eb85"}),o.listTree=new o("list-tree",{fontCharacter:"\\eb86"}),o.debugBreakpointFunctionUnverified=new o("debug-breakpoint-function-unverified",{fontCharacter:"\\eb87"}),o.debugBreakpointFunction=new o("debug-breakpoint-function",{fontCharacter:"\\eb88"}),o.debugBreakpointFunctionDisabled=new o("debug-breakpoint-function-disabled",{fontCharacter:"\\eb88"}),o.debugStackframeActive=new o("debug-stackframe-active",{fontCharacter:"\\eb89"}),o.debugStackframeDot=new o("debug-stackframe-dot",{fontCharacter:"\\eb8a"}),o.debugStackframe=new o("debug-stackframe",{fontCharacter:"\\eb8b"}),o.debugStackframeFocused=new o("debug-stackframe-focused",{fontCharacter:"\\eb8b"}),o.debugBreakpointUnsupported=new o("debug-breakpoint-unsupported",{fontCharacter:"\\eb8c"}),o.symbolString=new o("symbol-string",{fontCharacter:"\\eb8d"}),o.debugReverseContinue=new o("debug-reverse-continue",{fontCharacter:"\\eb8e"}),o.debugStepBack=new o("debug-step-back",{fontCharacter:"\\eb8f"}),o.debugRestartFrame=new o("debug-restart-frame",{fontCharacter:"\\eb90"}),o.callIncoming=new o("call-incoming",{fontCharacter:"\\eb92"}),o.callOutgoing=new o("call-outgoing",{fontCharacter:"\\eb93"}),o.menu=new o("menu",{fontCharacter:"\\eb94"}),o.expandAll=new o("expand-all",{fontCharacter:"\\eb95"}),o.feedback=new o("feedback",{fontCharacter:"\\eb96"}),o.groupByRefType=new o("group-by-ref-type",{fontCharacter:"\\eb97"}),o.ungroupByRefType=new o("ungroup-by-ref-type",{fontCharacter:"\\eb98"}),o.account=new o("account",{fontCharacter:"\\eb99"}),o.bellDot=new o("bell-dot",{fontCharacter:"\\eb9a"}),o.debugConsole=new o("debug-console",{fontCharacter:"\\eb9b"}),o.library=new o("library",{fontCharacter:"\\eb9c"}),o.output=new o("output",{fontCharacter:"\\eb9d"}),o.runAll=new o("run-all",{fontCharacter:"\\eb9e"}),o.syncIgnored=new o("sync-ignored",{fontCharacter:"\\eb9f"}),o.pinned=new o("pinned",{fontCharacter:"\\eba0"}),o.githubInverted=new o("github-inverted",{fontCharacter:"\\eba1"}),o.debugAlt=new o("debug-alt",{fontCharacter:"\\eb91"}),o.serverProcess=new o("server-process",{fontCharacter:"\\eba2"}),o.serverEnvironment=new o("server-environment",{fontCharacter:"\\eba3"}),o.pass=new o("pass",{fontCharacter:"\\eba4"}),o.stopCircle=new o("stop-circle",{fontCharacter:"\\eba5"}),o.playCircle=new o("play-circle",{fontCharacter:"\\eba6"}),o.record=new o("record",{fontCharacter:"\\eba7"}),o.debugAltSmall=new o("debug-alt-small",{fontCharacter:"\\eba8"}),o.vmConnect=new o("vm-connect",{fontCharacter:"\\eba9"}),o.cloud=new o("cloud",{fontCharacter:"\\ebaa"}),o.merge=new o("merge",{fontCharacter:"\\ebab"}),o.exportIcon=new o("export",{fontCharacter:"\\ebac"}),o.graphLeft=new o("graph-left",{fontCharacter:"\\ebad"}),o.magnet=new o("magnet",{fontCharacter:"\\ebae"}),o.notebook=new o("notebook",{fontCharacter:"\\ebaf"}),o.redo=new o("redo",{fontCharacter:"\\ebb0"}),o.checkAll=new o("check-all",{fontCharacter:"\\ebb1"}),o.pinnedDirty=new o("pinned-dirty",{fontCharacter:"\\ebb2"}),o.passFilled=new o("pass-filled",{fontCharacter:"\\ebb3"}),o.circleLargeFilled=new o("circle-large-filled",{fontCharacter:"\\ebb4"}),o.circleLargeOutline=new o("circle-large-outline",{fontCharacter:"\\ebb5"}),o.combine=new o("combine",{fontCharacter:"\\ebb6"}),o.gather=new o("gather",{fontCharacter:"\\ebb6"}),o.table=new o("table",{fontCharacter:"\\ebb7"}),o.variableGroup=new o("variable-group",{fontCharacter:"\\ebb8"}),o.typeHierarchy=new o("type-hierarchy",{fontCharacter:"\\ebb9"}),o.typeHierarchySub=new o("type-hierarchy-sub",{fontCharacter:"\\ebba"}),o.typeHierarchySuper=new o("type-hierarchy-super",{fontCharacter:"\\ebbb"}),o.gitPullRequestCreate=new o("git-pull-request-create",{fontCharacter:"\\ebbc"}),o.runAbove=new o("run-above",{fontCharacter:"\\ebbd"}),o.runBelow=new o("run-below",{fontCharacter:"\\ebbe"}),o.notebookTemplate=new o("notebook-template",{fontCharacter:"\\ebbf"}),o.debugRerun=new o("debug-rerun",{fontCharacter:"\\ebc0"}),o.workspaceTrusted=new o("workspace-trusted",{fontCharacter:"\\ebc1"}),o.workspaceUntrusted=new o("workspace-untrusted",{fontCharacter:"\\ebc2"}),o.workspaceUnspecified=new o("workspace-unspecified",{fontCharacter:"\\ebc3"}),o.terminalCmd=new o("terminal-cmd",{fontCharacter:"\\ebc4"}),o.terminalDebian=new o("terminal-debian",{fontCharacter:"\\ebc5"}),o.terminalLinux=new o("terminal-linux",{fontCharacter:"\\ebc6"}),o.terminalPowershell=new o("terminal-powershell",{fontCharacter:"\\ebc7"}),o.terminalTmux=new o("terminal-tmux",{fontCharacter:"\\ebc8"}),o.terminalUbuntu=new o("terminal-ubuntu",{fontCharacter:"\\ebc9"}),o.terminalBash=new o("terminal-bash",{fontCharacter:"\\ebca"}),o.arrowSwap=new o("arrow-swap",{fontCharacter:"\\ebcb"}),o.copy=new o("copy",{fontCharacter:"\\ebcc"}),o.personAdd=new o("person-add",{fontCharacter:"\\ebcd"}),o.filterFilled=new o("filter-filled",{fontCharacter:"\\ebce"}),o.wand=new o("wand",{fontCharacter:"\\ebcf"}),o.debugLineByLine=new o("debug-line-by-line",{fontCharacter:"\\ebd0"}),o.inspect=new o("inspect",{fontCharacter:"\\ebd1"}),o.layers=new o("layers",{fontCharacter:"\\ebd2"}),o.layersDot=new o("layers-dot",{fontCharacter:"\\ebd3"}),o.layersActive=new o("layers-active",{fontCharacter:"\\ebd4"}),o.compass=new o("compass",{fontCharacter:"\\ebd5"}),o.compassDot=new o("compass-dot",{fontCharacter:"\\ebd6"}),o.compassActive=new o("compass-active",{fontCharacter:"\\ebd7"}),o.azure=new o("azure",{fontCharacter:"\\ebd8"}),o.issueDraft=new o("issue-draft",{fontCharacter:"\\ebd9"}),o.gitPullRequestClosed=new o("git-pull-request-closed",{fontCharacter:"\\ebda"}),o.gitPullRequestDraft=new o("git-pull-request-draft",{fontCharacter:"\\ebdb"}),o.debugAll=new o("debug-all",{fontCharacter:"\\ebdc"}),o.debugCoverage=new o("debug-coverage",{fontCharacter:"\\ebdd"}),o.runErrors=new o("run-errors",{fontCharacter:"\\ebde"}),o.folderLibrary=new o("folder-library",{fontCharacter:"\\ebdf"}),o.debugContinueSmall=new o("debug-continue-small",{fontCharacter:"\\ebe0"}),o.beakerStop=new o("beaker-stop",{fontCharacter:"\\ebe1"}),o.graphLine=new o("graph-line",{fontCharacter:"\\ebe2"}),o.graphScatter=new o("graph-scatter",{fontCharacter:"\\ebe3"}),o.pieChart=new o("pie-chart",{fontCharacter:"\\ebe4"}),o.bracket=new o("bracket",o.json.definition),o.bracketDot=new o("bracket-dot",{fontCharacter:"\\ebe5"}),o.bracketError=new o("bracket-error",{fontCharacter:"\\ebe6"}),o.lockSmall=new o("lock-small",{fontCharacter:"\\ebe7"}),o.azureDevops=new o("azure-devops",{fontCharacter:"\\ebe8"}),o.verifiedFilled=new o("verified-filled",{fontCharacter:"\\ebe9"})}(de||(de={}))},79881:function(Nt,rt,w){"use strict";w.d(rt,{B8:function(){return U},Cp:function(){return _e},F0:function(){return ie},L6:function(){return Q},VV:function(){return de},b1:function(){return o},dL:function(){return Se},ri:function(){return O}});class ${constructor(){this.listeners=[],this.unexpectedErrorHandler=function(b){setTimeout(()=>{throw b.stack?new Error(b.message+`
|
|
|
|
`+b.stack):b},0)}}emit(b){this.listeners.forEach(S=>{S(b)})}onUnexpectedError(b){this.unexpectedErrorHandler(b),this.emit(b)}onUnexpectedExternalError(b){this.unexpectedErrorHandler(b)}}const ae=new $;function Se(E){de(E)||ae.onUnexpectedError(E)}function _e(E){de(E)||ae.onUnexpectedExternalError(E)}function O(E){if(E instanceof Error){let{name:b,message:S}=E;const D=E.stacktrace||E.stack;return{$isError:!0,name:b,message:S,stack:D}}return E}const m="Canceled";function de(E){return E instanceof Error&&E.name===m&&E.message===m}function ie(){const E=new Error(m);return E.name=E.message,E}function o(E){return E?new Error(`Illegal argument: ${E}`):new Error("Illegal argument")}function Q(E){return E?new Error(`Illegal state: ${E}`):new Error("Illegal state")}class U extends Error{constructor(b){super("NotSupported"),b&&(this.message=b)}}},4348:function(Nt,rt,w){"use strict";w.d(rt,{D0:function(){return U},E7:function(){return E},K3:function(){return Q},Q5:function(){return o},ZD:function(){return b},ju:function(){return O}});var $=w(79881),ae=w(69323),Se=w(34502),_e=w(95830),O;(function(S){S.None=()=>ae.JT.None;function D(K){return(k,ne=null,G)=>{let v=!1,y;return y=K(N=>{if(!v)return y?y.dispose():v=!0,k.call(ne,N)},null,G),v&&y.dispose(),y}}S.once=D;function V(K,k){return M((ne,G=null,v)=>K(y=>ne.call(G,k(y)),null,v))}S.map=V;function q(K,k){return M((ne,G=null,v)=>K(y=>{k(y),ne.call(G,y)},null,v))}S.forEach=q;function B(K,k){return M((ne,G=null,v)=>K(y=>k(y)&&ne.call(G,y),null,v))}S.filter=B;function R(K){return K}S.signal=R;function Z(...K){return(k,ne=null,G)=>(0,ae.F8)(...K.map(v=>v(y=>k.call(ne,y),null,G)))}S.any=Z;function ue(K,k,ne){let G=ne;return V(K,v=>(G=k(G,v),G))}S.reduce=ue;function M(K){let k;const ne=new o({onFirstListenerAdd(){k=K(ne.fire,ne)},onLastListenerRemove(){k.dispose()}});return ne.event}function Y(K,k,ne=100,G=!1,v){let y,N,te,Le=0;const Fe=new o({leakWarningThreshold:v,onFirstListenerAdd(){y=K(Ue=>{Le++,N=k(N,Ue),G&&!te&&(Fe.fire(N),N=void 0),clearTimeout(te),te=setTimeout(()=>{const Ye=N;N=void 0,te=void 0,(!G||Le>1)&&Fe.fire(Ye),Le=0},ne)})},onLastListenerRemove(){y.dispose()}});return Fe.event}S.debounce=Y;function oe(K,k=(ne,G)=>ne===G){let ne=!0,G;return B(K,v=>{const y=ne||!k(v,G);return ne=!1,G=v,y})}S.latch=oe;function J(K,k){return[S.filter(K,k),S.filter(K,ne=>!k(ne))]}S.split=J;function ye(K,k=!1,ne=[]){let G=ne.slice(),v=K(te=>{G?G.push(te):N.fire(te)});const y=()=>{G&&G.forEach(te=>N.fire(te)),G=null},N=new o({onFirstListenerAdd(){v||(v=K(te=>N.fire(te)))},onFirstListenerDidAdd(){G&&(k?setTimeout(y):y())},onLastListenerRemove(){v&&v.dispose(),v=null}});return N.event}S.buffer=ye;class pe{constructor(k){this.event=k}map(k){return new pe(V(this.event,k))}forEach(k){return new pe(q(this.event,k))}filter(k){return new pe(B(this.event,k))}reduce(k,ne){return new pe(ue(this.event,k,ne))}latch(){return new pe(oe(this.event))}debounce(k,ne=100,G=!1,v){return new pe(Y(this.event,k,ne,G,v))}on(k,ne,G){return this.event(k,ne,G)}once(k,ne,G){return D(this.event)(k,ne,G)}}function ve(K){return new pe(K)}S.chain=ve;function Ae(K,k,ne=G=>G){const G=(...te)=>N.fire(ne(...te)),v=()=>K.on(k,G),y=()=>K.removeListener(k,G),N=new o({onFirstListenerAdd:v,onLastListenerRemove:y});return N.event}S.fromNodeEventEmitter=Ae;function j(K,k,ne=G=>G){const G=(...te)=>N.fire(ne(...te)),v=()=>K.addEventListener(k,G),y=()=>K.removeEventListener(k,G),N=new o({onFirstListenerAdd:v,onLastListenerRemove:y});return N.event}S.fromDOMEventEmitter=j;function P(K){return new Promise(k=>D(K)(k))}S.toPromise=P})(O||(O={}));class m{constructor(D){this._listenerCount=0,this._invocationCount=0,this._elapsedOverall=0,this._name=`${D}_${m._idPool++}`}start(D){this._stopWatch=new _e.G(!0),this._listenerCount=D}stop(){if(this._stopWatch){const D=this._stopWatch.elapsed();this._elapsedOverall+=D,this._invocationCount+=1,console.info(`did FIRE ${this._name}: elapsed_ms: ${D.toFixed(5)}, listener: ${this._listenerCount} (elapsed_overall: ${this._elapsedOverall.toFixed(2)}, invocations: ${this._invocationCount})`),this._stopWatch=void 0}}}m._idPool=0;let de=-1;class ie{constructor(D,V=Math.random().toString(18).slice(2,5)){this.customThreshold=D,this.name=V,this._warnCountdown=0}dispose(){this._stacks&&this._stacks.clear()}check(D){let V=de;if(typeof this.customThreshold=="number"&&(V=this.customThreshold),V<=0||D<V)return;this._stacks||(this._stacks=new Map);const q=new Error().stack.split(`
|
|
`).slice(3).join(`
|
|
`),B=this._stacks.get(q)||0;if(this._stacks.set(q,B+1),this._warnCountdown-=1,this._warnCountdown<=0){this._warnCountdown=V*.5;let R,Z=0;for(const[ue,M]of this._stacks)(!R||Z<M)&&(R=ue,Z=M);console.warn(`[${this.name}] potential listener LEAK detected, having ${D} listeners already. MOST frequent listener (${Z}):`),console.warn(R)}return()=>{const R=this._stacks.get(q)||0;this._stacks.set(q,R-1)}}}class o{constructor(D){var V;this._disposed=!1,this._options=D,this._leakageMon=de>0?new ie(this._options&&this._options.leakWarningThreshold):void 0,this._perfMon=!((V=this._options)===null||V===void 0)&&V._profName?new m(this._options._profName):void 0}get event(){return this._event||(this._event=(D,V,q)=>{var B;this._listeners||(this._listeners=new Se.S);const R=this._listeners.isEmpty();R&&this._options&&this._options.onFirstListenerAdd&&this._options.onFirstListenerAdd(this);const Z=this._listeners.push(V?[D,V]:D);R&&this._options&&this._options.onFirstListenerDidAdd&&this._options.onFirstListenerDidAdd(this),this._options&&this._options.onListenerDidAdd&&this._options.onListenerDidAdd(this,D,V);const ue=(B=this._leakageMon)===null||B===void 0?void 0:B.check(this._listeners.size),M=(0,ae.OF)(()=>{ue&&ue(),this._disposed||(Z(),this._options&&this._options.onLastListenerRemove&&(this._listeners&&!this._listeners.isEmpty()||this._options.onLastListenerRemove(this)))});return q instanceof ae.SL?q.add(M):Array.isArray(q)&&q.push(M),M}),this._event}fire(D){var V,q;if(this._listeners){this._deliveryQueue||(this._deliveryQueue=new Se.S);for(let B of this._listeners)this._deliveryQueue.push([B,D]);for((V=this._perfMon)===null||V===void 0||V.start(this._deliveryQueue.size);this._deliveryQueue.size>0;){const[B,R]=this._deliveryQueue.shift();try{typeof B=="function"?B.call(void 0,R):B[0].call(B[1],R)}catch(Z){(0,$.dL)(Z)}}(q=this._perfMon)===null||q===void 0||q.stop()}}dispose(){var D,V,q,B,R;this._disposed||(this._disposed=!0,(D=this._listeners)===null||D===void 0||D.clear(),(V=this._deliveryQueue)===null||V===void 0||V.clear(),(B=(q=this._options)===null||q===void 0?void 0:q.onLastListenerRemove)===null||B===void 0||B.call(q),(R=this._leakageMon)===null||R===void 0||R.dispose())}}class Q extends o{constructor(D){super(D),this._isPaused=0,this._eventQueue=new Se.S,this._mergeFn=D==null?void 0:D.merge}pause(){this._isPaused++}resume(){if(this._isPaused!==0&&--this._isPaused===0)if(this._mergeFn){const D=Array.from(this._eventQueue);this._eventQueue.clear(),super.fire(this._mergeFn(D))}else for(;!this._isPaused&&this._eventQueue.size!==0;)super.fire(this._eventQueue.shift())}fire(D){this._listeners&&(this._isPaused!==0?this._eventQueue.push(D):super.fire(D))}}class U extends Q{constructor(D){var V;super(D),this._delay=(V=D.delay)!==null&&V!==void 0?V:100}fire(D){this._handle||(this.pause(),this._handle=setTimeout(()=>{this._handle=void 0,this.resume()},this._delay)),super.fire(D)}}class E{constructor(){this.buffers=[]}wrapEvent(D){return(V,q,B)=>D(R=>{const Z=this.buffers[this.buffers.length-1];Z?Z.push(()=>V.call(q,R)):V.call(q,R)},void 0,B)}bufferEvents(D){const V=[];this.buffers.push(V);const q=D();return this.buffers.pop(),V.forEach(B=>B()),q}}class b{constructor(){this.listening=!1,this.inputEvent=O.None,this.inputEventListener=ae.JT.None,this.emitter=new o({onFirstListenerDidAdd:()=>{this.listening=!0,this.inputEventListener=this.inputEvent(this.emitter.fire,this.emitter)},onLastListenerRemove:()=>{this.listening=!1,this.inputEventListener.dispose()}}),this.event=this.emitter.event}set input(D){this.inputEvent=D,this.listening&&(this.inputEventListener.dispose(),this.inputEventListener=D(this.emitter.fire,this.emitter))}dispose(){this.inputEventListener.dispose(),this.emitter.dispose()}}},17845:function(Nt,rt,w){"use strict";w.d(rt,{I:function(){return $}});function $(ae){const Se=this;let _e=!1,O;return function(){return _e||(_e=!0,O=ae.apply(Se,arguments)),O}}},88226:function(Nt,rt,w){"use strict";w.d(rt,{$:function(){return $}});var $;(function(ae){function Se(Z){return Z&&typeof Z=="object"&&typeof Z[Symbol.iterator]=="function"}ae.is=Se;const _e=Object.freeze([]);function O(){return _e}ae.empty=O;function*m(Z){yield Z}ae.single=m;function de(Z){return Z||_e}ae.from=de;function ie(Z){return!Z||Z[Symbol.iterator]().next().done===!0}ae.isEmpty=ie;function o(Z){return Z[Symbol.iterator]().next().value}ae.first=o;function Q(Z,ue){for(const M of Z)if(ue(M))return!0;return!1}ae.some=Q;function U(Z,ue){for(const M of Z)if(ue(M))return M}ae.find=U;function*E(Z,ue){for(const M of Z)ue(M)&&(yield M)}ae.filter=E;function*b(Z,ue){let M=0;for(const Y of Z)yield ue(Y,M++)}ae.map=b;function*S(...Z){for(const ue of Z)for(const M of ue)yield M}ae.concat=S;function*D(Z){for(const ue of Z)for(const M of ue)yield M}ae.concatNested=D;function V(Z,ue,M){let Y=M;for(const oe of Z)Y=ue(Y,oe);return Y}ae.reduce=V;function*q(Z,ue,M=Z.length){for(ue<0&&(ue+=Z.length),M<0?M+=Z.length:M>Z.length&&(M=Z.length);ue<M;ue++)yield Z[ue]}ae.slice=q;function B(Z,ue=Number.POSITIVE_INFINITY){const M=[];if(ue===0)return[M,Z];const Y=Z[Symbol.iterator]();for(let oe=0;oe<ue;oe++){const J=Y.next();if(J.done)return[M,ae.empty()];M.push(J.value)}return[M,{[Symbol.iterator](){return Y}}]}ae.consume=B;function R(Z,ue,M=(Y,oe)=>Y===oe){const Y=Z[Symbol.iterator](),oe=ue[Symbol.iterator]();for(;;){const J=Y.next(),ye=oe.next();if(J.done!==ye.done)return!1;if(J.done)return!0;if(!M(J.value,ye.value))return!1}}ae.equals=R})($||($={}))},69323:function(Nt,rt,w){"use strict";w.d(rt,{B9:function(){return b},F8:function(){return S},JT:function(){return q},Jz:function(){return R},OF:function(){return D},SL:function(){return V},Wf:function(){return E},XK:function(){return B},dk:function(){return Q}});var $=w(17845),ae=w(88226);const Se=!1;let _e=null;function O(Z){_e=Z}if(Se){const Z="__is_disposable_tracked__";O(new class{trackDisposable(ue){const M=new Error("Potentially leaked disposable").stack;setTimeout(()=>{ue[Z]||console.log(M)},3e3)}setParent(ue,M){if(ue&&ue!==q.None)try{ue[Z]=!0}catch(Y){}}markAsDisposed(ue){if(ue&&ue!==q.None)try{ue[Z]=!0}catch(M){}}markAsSingleton(ue){}})}function m(Z){return _e==null||_e.trackDisposable(Z),Z}function de(Z){_e==null||_e.markAsDisposed(Z)}function ie(Z,ue){_e==null||_e.setParent(Z,ue)}function o(Z,ue){if(_e)for(const M of Z)_e.setParent(M,ue)}function Q(Z){return _e==null||_e.markAsSingleton(Z),Z}class U extends Error{constructor(ue){super(`Encountered errors while disposing of store. Errors: [${ue.join(", ")}]`),this.errors=ue}}function E(Z){return typeof Z.dispose=="function"&&Z.dispose.length===0}function b(Z){if(ae.$.is(Z)){let ue=[];for(const M of Z)if(M)try{M.dispose()}catch(Y){ue.push(Y)}if(ue.length===1)throw ue[0];if(ue.length>1)throw new U(ue);return Array.isArray(Z)?[]:Z}else if(Z)return Z.dispose(),Z}function S(...Z){const ue=D(()=>b(Z));return o(Z,ue),ue}function D(Z){const ue=m({dispose:(0,$.I)(()=>{de(ue),Z()})});return ue}class V{constructor(){this._toDispose=new Set,this._isDisposed=!1,m(this)}dispose(){this._isDisposed||(de(this),this._isDisposed=!0,this.clear())}clear(){try{b(this._toDispose.values())}finally{this._toDispose.clear()}}add(ue){if(!ue)return ue;if(ue===this)throw new Error("Cannot register a disposable on itself!");return ie(ue,this),this._isDisposed?V.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(ue),ue}}V.DISABLE_DISPOSED_WARNING=!1;class q{constructor(){this._store=new V,m(this),ie(this._store,this)}dispose(){de(this),this._store.dispose()}_register(ue){if(ue===this)throw new Error("Cannot register a disposable on itself!");return this._store.add(ue)}}q.None=Object.freeze({dispose(){}});class B{constructor(){this._isDisposed=!1,m(this)}get value(){return this._isDisposed?void 0:this._value}set value(ue){var M;this._isDisposed||ue===this._value||((M=this._value)===null||M===void 0||M.dispose(),ue&&ie(ue,this),this._value=ue)}clear(){this.value=void 0}dispose(){var ue;this._isDisposed=!0,de(this),(ue=this._value)===null||ue===void 0||ue.dispose(),this._value=void 0}clearAndLeak(){const ue=this._value;return this._value=void 0,ue&&ie(ue,null),ue}}class R{constructor(ue){this.object=ue}dispose(){}}},34502:function(Nt,rt,w){"use strict";w.d(rt,{S:function(){return ae}});class ${constructor(_e){this.element=_e,this.next=$.Undefined,this.prev=$.Undefined}}$.Undefined=new $(void 0);class ae{constructor(){this._first=$.Undefined,this._last=$.Undefined,this._size=0}get size(){return this._size}isEmpty(){return this._first===$.Undefined}clear(){let _e=this._first;for(;_e!==$.Undefined;){const O=_e.next;_e.prev=$.Undefined,_e.next=$.Undefined,_e=O}this._first=$.Undefined,this._last=$.Undefined,this._size=0}unshift(_e){return this._insert(_e,!1)}push(_e){return this._insert(_e,!0)}_insert(_e,O){const m=new $(_e);if(this._first===$.Undefined)this._first=m,this._last=m;else if(O){const ie=this._last;this._last=m,m.prev=ie,ie.next=m}else{const ie=this._first;this._first=m,m.next=ie,ie.prev=m}this._size+=1;let de=!1;return()=>{de||(de=!0,this._remove(m))}}shift(){if(this._first!==$.Undefined){const _e=this._first.element;return this._remove(this._first),_e}}pop(){if(this._last!==$.Undefined){const _e=this._last.element;return this._remove(this._last),_e}}_remove(_e){if(_e.prev!==$.Undefined&&_e.next!==$.Undefined){const O=_e.prev;O.next=_e.next,_e.next.prev=O}else _e.prev===$.Undefined&&_e.next===$.Undefined?(this._first=$.Undefined,this._last=$.Undefined):_e.next===$.Undefined?(this._last=this._last.prev,this._last.next=$.Undefined):_e.prev===$.Undefined&&(this._first=this._first.next,this._first.prev=$.Undefined);this._size-=1}*[Symbol.iterator](){let _e=this._first;for(;_e!==$.Undefined;)yield _e.element,_e=_e.next}}},23345:function(Nt,rt,w){"use strict";w.d(rt,{$L:function(){return Y},ED:function(){return R},IJ:function(){return ue},OS:function(){return pe},WE:function(){return J},dz:function(){return Z},gn:function(){return oe},li:function(){return D},r:function(){return j},tY:function(){return M},xS:function(){return ye}});var $=w(97671),ae;const Se="en";let _e=!1,O=!1,m=!1,de=!1,ie=!1,o=!1,Q=!1,U,E=null,b=null,S;const D=typeof self=="object"?self:typeof w.g=="object"?w.g:{};let V;typeof D.vscode!="undefined"&&typeof D.vscode.process!="undefined"?V=D.vscode.process:typeof $!="undefined"&&(V=$);const q=typeof((ae=V==null?void 0:V.versions)===null||ae===void 0?void 0:ae.electron)=="string"&&V.type==="renderer";if(typeof navigator=="object"&&!q)S=navigator.userAgent,_e=S.indexOf("Windows")>=0,O=S.indexOf("Macintosh")>=0,Q=(S.indexOf("Macintosh")>=0||S.indexOf("iPad")>=0||S.indexOf("iPhone")>=0)&&!!navigator.maxTouchPoints&&navigator.maxTouchPoints>0,m=S.indexOf("Linux")>=0,o=!0,U=navigator.language,E=U;else if(typeof V=="object"){_e=V.platform==="win32",O=V.platform==="darwin",m=V.platform==="linux",de=m&&!!V.env.SNAP&&!!V.env.SNAP_REVISION,U=Se,E=Se;const P=V.env.VSCODE_NLS_CONFIG;if(P)try{const K=JSON.parse(P),k=K.availableLanguages["*"];U=K.locale,E=k||Se,b=K._translationsConfigFile}catch(K){}ie=!0}else console.error("Unable to resolve platform.");let B=0;O?B=1:_e?B=3:m&&(B=2);const R=_e,Z=O,ue=m,M=ie,Y=o,oe=Q,J=S,ye=function(){if(D.setImmediate)return D.setImmediate.bind(D);if(typeof D.postMessage=="function"&&!D.importScripts){let k=[];D.addEventListener("message",G=>{if(G.data&&G.data.vscodeSetImmediateId)for(let v=0,y=k.length;v<y;v++){const N=k[v];if(N.id===G.data.vscodeSetImmediateId){k.splice(v,1),N.callback();return}}});let ne=0;return G=>{const v=++ne;k.push({id:v,callback:G}),D.postMessage({vscodeSetImmediateId:v},"*")}}if(typeof(V==null?void 0:V.nextTick)=="function")return V.nextTick.bind(V);const K=Promise.resolve();return k=>K.then(k)}(),pe=O||Q?2:_e?1:3;let ve=!0,Ae=!1;function j(){if(!Ae){Ae=!0;const P=new Uint8Array(2);P[0]=1,P[1]=2,ve=new Uint16Array(P.buffer)[0]===513}return ve}},95830:function(Nt,rt,w){"use strict";w.d(rt,{G:function(){return Se}});var $=w(23345);const ae=$.li.performance&&typeof $.li.performance.now=="function";class Se{constructor(O){this._highResolution=ae&&O,this._startTime=this._now(),this._stopTime=-1}static create(O=!0){return new Se(O)}stop(){this._stopTime=this._now()}elapsed(){return this._stopTime!==-1?this._stopTime-this._startTime:this._now()-this._startTime}_now(){return this._highResolution?$.li.performance.now():Date.now()}}},82983:function(Nt,rt,w){"use strict";w.d(rt,{$i:function(){return Le},C8:function(){return ot},GF:function(){return U},HO:function(){return ne},IO:function(){return E},K7:function(){return ut},Kw:function(){return Lt},LC:function(){return D},Mh:function(){return ye},P1:function(){return pe},PJ:function(){return _t},Qe:function(){return Fe},R1:function(){return Q},RP:function(){return N},S6:function(){return At},TT:function(){return R},Ut:function(){return v},V8:function(){return V},WU:function(){return Se},YK:function(){return Ae},YU:function(){return _e},ZG:function(){return ve},ZH:function(){return P},ab:function(){return Ue},c1:function(){return lt},df:function(){return Y},ec:function(){return O},fi:function(){return Pt},fy:function(){return m},j3:function(){return de},j_:function(){return ue},m5:function(){return $},mK:function(){return M},mr:function(){return b},oH:function(){return he},oL:function(){return ie},ok:function(){return J},ow:function(){return q},qq:function(){return oe},qu:function(){return B},rL:function(){return j},uS:function(){return St},un:function(){return o},uq:function(){return S},vH:function(){return k},xe:function(){return Ye},zY:function(){return Z}});function $(F){return!F||typeof F!="string"?!0:F.trim().length===0}const ae=/{(\d+)}/g;function Se(F,...le){return le.length===0?F:F.replace(ae,function(xe,we){const Ie=parseInt(we,10);return isNaN(Ie)||Ie<0||Ie>=le.length?xe:le[Ie]})}function _e(F){return F.replace(/[<>&]/g,function(le){switch(le){case"<":return"<";case">":return">";case"&":return"&";default:return le}})}function O(F){return F.replace(/[\\\{\}\*\+\?\|\^\$\.\[\]\(\)]/g,"\\$&")}function m(F,le=" "){const xe=de(F,le);return ie(xe,le)}function de(F,le){if(!F||!le)return F;const xe=le.length;if(xe===0||F.length===0)return F;let we=0;for(;F.indexOf(le,we)===we;)we=we+xe;return F.substring(we)}function ie(F,le){if(!F||!le)return F;const xe=le.length,we=F.length;if(xe===0||we===0)return F;let Ie=we,Oe=-1;for(;Oe=F.lastIndexOf(le,Ie-1),!(Oe===-1||Oe+xe!==Ie);){if(Oe===0)return"";Ie=Oe}return F.substring(0,Ie)}function o(F){return F.replace(/[\-\\\{\}\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&").replace(/[\*]/g,".*")}function Q(F){return F.replace(/\*/g,"")}function U(F,le,xe={}){if(!F)throw new Error("Cannot create regex from empty string");le||(F=O(F)),xe.wholeWord&&(/\B/.test(F.charAt(0))||(F="\\b"+F),/\B/.test(F.charAt(F.length-1))||(F=F+"\\b"));let we="";return xe.global&&(we+="g"),xe.matchCase||(we+="i"),xe.multiline&&(we+="m"),xe.unicode&&(we+="u"),new RegExp(F,we)}function E(F){return F.source==="^"||F.source==="^$"||F.source==="$"||F.source==="^\\s*$"?!1:!!(F.exec("")&&F.lastIndex===0)}function b(F){return(F.global?"g":"")+(F.ignoreCase?"i":"")+(F.multiline?"m":"")+(F.unicode?"u":"")}function S(F){return F.split(/\r\n|\r|\n/)}function D(F){for(let le=0,xe=F.length;le<xe;le++){const we=F.charCodeAt(le);if(we!==32&&we!==9)return le}return-1}function V(F,le=0,xe=F.length){for(let we=le;we<xe;we++){const Ie=F.charCodeAt(we);if(Ie!==32&&Ie!==9)return F.substring(le,we)}return F.substring(le,xe)}function q(F,le=F.length-1){for(let xe=le;xe>=0;xe--){const we=F.charCodeAt(xe);if(we!==32&&we!==9)return xe}return-1}function B(F,le){return F<le?-1:F>le?1:0}function R(F,le,xe=0,we=F.length,Ie=0,Oe=le.length){for(;xe<we&&Ie<Oe;xe++,Ie++){let Je=F.charCodeAt(xe),Ke=le.charCodeAt(Ie);if(Je<Ke)return-1;if(Je>Ke)return 1}const Qe=we-xe,it=Oe-Ie;return Qe<it?-1:Qe>it?1:0}function Z(F,le){return ue(F,le,0,F.length,0,le.length)}function ue(F,le,xe=0,we=F.length,Ie=0,Oe=le.length){for(;xe<we&&Ie<Oe;xe++,Ie++){let Je=F.charCodeAt(xe),Ke=le.charCodeAt(Ie);if(Je===Ke)continue;if(Je>=128||Ke>=128)return R(F.toLowerCase(),le.toLowerCase(),xe,we,Ie,Oe);M(Je)&&(Je-=32),M(Ke)&&(Ke-=32);const yt=Je-Ke;if(yt!==0)return yt}const Qe=we-xe,it=Oe-Ie;return Qe<it?-1:Qe>it?1:0}function M(F){return F>=97&&F<=122}function Y(F){return F>=65&&F<=90}function oe(F,le){return F.length===le.length&&ue(F,le)===0}function J(F,le){const xe=le.length;return le.length>F.length?!1:ue(F,le,0,xe)===0}function ye(F,le){let xe,we=Math.min(F.length,le.length);for(xe=0;xe<we;xe++)if(F.charCodeAt(xe)!==le.charCodeAt(xe))return xe;return we}function pe(F,le){let xe,we=Math.min(F.length,le.length);const Ie=F.length-1,Oe=le.length-1;for(xe=0;xe<we;xe++)if(F.charCodeAt(Ie-xe)!==le.charCodeAt(Oe-xe))return xe;return we}function ve(F){return 55296<=F&&F<=56319}function Ae(F){return 56320<=F&&F<=57343}function j(F,le){return(F-55296<<10)+(le-56320)+65536}function P(F,le,xe){const we=F.charCodeAt(xe);if(ve(we)&&xe+1<le){const Ie=F.charCodeAt(xe+1);if(Ae(Ie))return j(we,Ie)}return we}function K(F,le){const xe=F.charCodeAt(le-1);if(Ae(xe)&&le>1){const we=F.charCodeAt(le-2);if(ve(we))return j(we,xe)}return xe}function k(F,le){const xe=kt.getInstance(),we=le,Ie=F.length,Oe=P(F,Ie,le);le+=Oe>=65536?2:1;let Qe=xe.getGraphemeBreakType(Oe);for(;le<Ie;){const it=P(F,Ie,le),Je=xe.getGraphemeBreakType(it);if(Pt(Qe,Je))break;le+=it>=65536?2:1,Qe=Je}return le-we}function ne(F,le){const xe=kt.getInstance(),we=le,Ie=K(F,le);le-=Ie>=65536?2:1;let Oe=xe.getGraphemeBreakType(Ie);for(;le>0;){const Qe=K(F,le),it=xe.getGraphemeBreakType(Qe);if(Pt(it,Oe))break;le-=Qe>=65536?2:1,Oe=it}return we-le}const G=/(?:[\u05BE\u05C0\u05C3\u05C6\u05D0-\u05F4\u0608\u060B\u060D\u061B-\u064A\u066D-\u066F\u0671-\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u0710\u0712-\u072F\u074D-\u07A5\u07B1-\u07EA\u07F4\u07F5\u07FA-\u0815\u081A\u0824\u0828\u0830-\u0858\u085E-\u08BD\u200F\uFB1D\uFB1F-\uFB28\uFB2A-\uFD3D\uFD50-\uFDFC\uFE70-\uFEFC]|\uD802[\uDC00-\uDD1B\uDD20-\uDE00\uDE10-\uDE33\uDE40-\uDEE4\uDEEB-\uDF35\uDF40-\uDFFF]|\uD803[\uDC00-\uDCFF]|\uD83A[\uDC00-\uDCCF\uDD00-\uDD43\uDD50-\uDFFF]|\uD83B[\uDC00-\uDEBB])/;function v(F){return G.test(F)}const y=/(?:[\u231A\u231B\u23F0\u23F3\u2600-\u27BF\u2B50\u2B55]|\uD83C[\uDDE6-\uDDFF\uDF00-\uDFFF]|\uD83D[\uDC00-\uDE4F\uDE80-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD00-\uDDFF\uDE70-\uDED6])/;function N(F){return y.test(F)}const te=/^[\t\n\r\x20-\x7E]*$/;function Le(F){return te.test(F)}const Fe=/[\u2028\u2029]/;function Ue(F){return Fe.test(F)}function Ye(F){for(let le=0,xe=F.length;le<xe;le++)if(ut(F.charCodeAt(le)))return!0;return!1}function ut(F){return F=+F,F>=11904&&F<=55215||F>=63744&&F<=64255||F>=65281&&F<=65374}function ot(F){return F>=127462&&F<=127487||F===8986||F===8987||F===9200||F===9203||F>=9728&&F<=10175||F===11088||F===11093||F>=127744&&F<=128591||F>=128640&&F<=128764||F>=128992&&F<=129003||F>=129280&&F<=129535||F>=129648&&F<=129750}const lt="\uFEFF";function St(F){return!!(F&&F.length>0&&F.charCodeAt(0)===65279)}function Lt(F,le=!1){return F?(le&&(F=F.replace(/\\./g,"")),F.toLowerCase()!==F):!1}function _t(F){return F=F%(2*26),F<26?String.fromCharCode(97+F):String.fromCharCode(65+F-26)}function At(F){return kt.getInstance().getGraphemeBreakType(F)}function Pt(F,le){return F===0?le!==5&&le!==7:F===2&&le===3?!1:F===4||F===2||F===3||le===4||le===2||le===3?!0:!(F===8&&(le===8||le===9||le===11||le===12)||(F===11||F===9)&&(le===9||le===10)||(F===12||F===10)&&le===10||le===5||le===13||le===7||F===1||F===13&&le===14||F===6&&le===6)}class kt{constructor(){this._data=fe()}static getInstance(){return kt._INSTANCE||(kt._INSTANCE=new kt),kt._INSTANCE}getGraphemeBreakType(le){if(le<32)return le===10?3:le===13?2:4;if(le<127)return 0;const xe=this._data,we=xe.length/3;let Ie=1;for(;Ie<=we;)if(le<xe[3*Ie])Ie=2*Ie;else if(le>xe[3*Ie+1])Ie=2*Ie+1;else return xe[3*Ie+2];return 0}}kt._INSTANCE=null;function fe(){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 he(F,le){if(F===0)return 0;const xe=se(F,le);if(xe!==void 0)return xe;const we=K(le,F);return F-=Me(we),F}function se(F,le){let xe=K(le,F);for(F-=Me(xe);$e(xe)||xe===65039||xe===8419;){if(F===0)return;xe=K(le,F),F-=Me(xe)}if(ot(xe)){if(F>=0){const we=K(le,F);we===8205&&(F-=Me(we))}return F}}function Me(F){return F>=65536?2:1}function $e(F){return 127995<=F&&F<=127999}},72999:function(Nt,rt,w){"use strict";w.d(rt,{$E:function(){return D},$K:function(){return de},D8:function(){return E},HD:function(){return ae},IU:function(){return V},Jp:function(){return ie},Kn:function(){return Se},cW:function(){return Q},f6:function(){return q},hj:function(){return _e},jn:function(){return O},kJ:function(){return $},mf:function(){return U},o8:function(){return m},p_:function(){return o},vE:function(){return B}});function $(R){return Array.isArray(R)}function ae(R){return typeof R=="string"}function Se(R){return typeof R=="object"&&R!==null&&!Array.isArray(R)&&!(R instanceof RegExp)&&!(R instanceof Date)}function _e(R){return typeof R=="number"&&!isNaN(R)}function O(R){return R===!0||R===!1}function m(R){return typeof R=="undefined"}function de(R){return!ie(R)}function ie(R){return m(R)||R===null}function o(R,Z){if(!R)throw new Error(Z?`Unexpected type, expected '${Z}'`:"Unexpected type")}function Q(R){if(ie(R))throw new Error("Assertion Failed: argument is undefined or null");return R}function U(R){return typeof R=="function"}function E(R,Z){const ue=Math.min(R.length,Z.length);for(let M=0;M<ue;M++)b(R[M],Z[M])}function b(R,Z){if(ae(Z)){if(typeof R!==Z)throw new Error(`argument does not match constraint: typeof ${Z}`)}else if(U(Z)){try{if(R instanceof Z)return}catch(ue){}if(!ie(R)&&R.constructor===Z||Z.length===1&&Z.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 S(R){let Z=[],ue=Object.getPrototypeOf(R);for(;Object.prototype!==ue;)Z=Z.concat(Object.getOwnPropertyNames(ue)),ue=Object.getPrototypeOf(ue);return Z}function D(R){const Z=[];for(const ue of S(R))typeof R[ue]=="function"&&Z.push(ue);return Z}function V(R,Z){const ue=Y=>function(){const oe=Array.prototype.slice.call(arguments,0);return Z(Y,oe)};let M={};for(const Y of R)M[Y]=ue(Y);return M}function q(R){return R===null?void 0:R}function B(R,Z="Unreachable"){throw new Error(Z)}},13268:function(Nt,rt,w){"use strict";w.d(rt,{N:function(){return ae}});function $(Se,_e){let O;return _e.length===0?O=Se:O=Se.replace(/\{(\d+)\}/g,function(m,de){const ie=de[0];return typeof _e[ie]!="undefined"?_e[ie]:m}),O}function ae(Se,_e,...O){return $(_e,O)}},96236:function(Nt,rt,w){"use strict";w.d(rt,{BH:function(){return V},NZ:function(){return q},U8:function(){return B},co:function(){return D},eH:function(){return S},vr:function(){return b}});var $=w(75918),ae=w(52615),Se=w(4348),_e=w(88226),O=w(69323),m=w(34502),de=w(35884),ie=w(90689),o=w(16925),Q=w(49055),U=function(R,Z,ue,M){var Y=arguments.length,oe=Y<3?Z:M===null?M=Object.getOwnPropertyDescriptor(Z,ue):M,J;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(R,Z,ue,M);else for(var ye=R.length-1;ye>=0;ye--)(J=R[ye])&&(oe=(Y<3?J(oe):Y>3?J(Z,ue,oe):J(Z,ue))||oe);return Y>3&&oe&&Object.defineProperty(Z,ue,oe),oe},E=function(R,Z){return function(ue,M){Z(ue,M,R)}};function b(R){return R.command!==void 0}class S{constructor(Z){this.id=S._idPool++,this._debugName=Z}}S._idPool=0,S.CommandPalette=new S("CommandPalette"),S.EditorContext=new S("EditorContext"),S.SimpleEditorContext=new S("SimpleEditorContext"),S.EditorContextCopy=new S("EditorContextCopy"),S.EditorContextPeek=new S("EditorContextPeek"),S.MenubarEditMenu=new S("MenubarEditMenu"),S.MenubarCopy=new S("MenubarCopy"),S.MenubarGoMenu=new S("MenubarGoMenu"),S.MenubarSelectionMenu=new S("MenubarSelectionMenu"),S.InlineCompletionsActions=new S("InlineCompletionsActions");const D=(0,o.yh)("menuService"),V=new class{constructor(){this._commands=new Map,this._menuItems=new Map,this._onDidChangeMenu=new Se.Q5,this.onDidChangeMenu=this._onDidChangeMenu.event,this._commandPaletteChangeEvent={has:R=>R===S.CommandPalette}}addCommand(R){return this.addCommands(_e.$.single(R))}addCommands(R){for(const Z of R)this._commands.set(Z.id,Z);return this._onDidChangeMenu.fire(this._commandPaletteChangeEvent),(0,O.OF)(()=>{let Z=!1;for(const ue of R)Z=this._commands.delete(ue.id)||Z;Z&&this._onDidChangeMenu.fire(this._commandPaletteChangeEvent)})}getCommand(R){return this._commands.get(R)}getCommands(){const R=new Map;return this._commands.forEach((Z,ue)=>R.set(ue,Z)),R}appendMenuItem(R,Z){return this.appendMenuItems(_e.$.single({id:R,item:Z}))}appendMenuItems(R){const Z=new Set,ue=new m.S;for(const{id:M,item:Y}of R){let oe=this._menuItems.get(M);oe||(oe=new m.S,this._menuItems.set(M,oe)),ue.push(oe.push(Y)),Z.add(M)}return this._onDidChangeMenu.fire(Z),(0,O.OF)(()=>{if(ue.size>0){for(let M of ue)M();this._onDidChangeMenu.fire(Z),ue.clear()}})}getMenuItems(R){let Z;return this._menuItems.has(R)?Z=[...this._menuItems.get(R)]:Z=[],R===S.CommandPalette&&this._appendImplicitItems(Z),Z}_appendImplicitItems(R){const Z=new Set;for(const ue of R)b(ue)&&(Z.add(ue.command.id),ue.alt&&Z.add(ue.alt.id));this._commands.forEach((ue,M)=>{Z.has(M)||R.push({command:ue})})}};class q extends $.wY{constructor(Z,ue,M,Y){super(`submenuitem.${Z.submenu.id}`,typeof Z.title=="string"?Z.title:Z.title.value,[],"submenu"),this.item=Z,this._menuService=ue,this._contextKeyService=M,this._options=Y}get actions(){const Z=[],ue=this._menuService.createMenu(this.item.submenu,this._contextKeyService),M=ue.getActions(this._options);ue.dispose();for(const[,Y]of M)Y.length>0&&(Z.push(...Y),Z.push(new $.Z0));return Z.length&&Z.pop(),Z}}let B=class Yl{constructor(Z,ue,M,Y,oe){var J,ye;if(this._commandService=oe,this.id=Z.id,this.label=M!=null&&M.renderShortTitle&&Z.shortTitle?typeof Z.shortTitle=="string"?Z.shortTitle:Z.shortTitle.value:typeof Z.title=="string"?Z.title:Z.title.value,this.tooltip=(ye=typeof Z.tooltip=="string"?Z.tooltip:(J=Z.tooltip)===null||J===void 0?void 0:J.value)!==null&&ye!==void 0?ye:"",this.enabled=!Z.precondition||Y.contextMatchesRules(Z.precondition),this.checked=void 0,Z.toggled){const pe=Z.toggled.condition?Z.toggled:{condition:Z.toggled};this.checked=Y.contextMatchesRules(pe.condition),this.checked&&pe.tooltip&&(this.tooltip=typeof pe.tooltip=="string"?pe.tooltip:pe.tooltip.value),pe.title&&(this.label=typeof pe.title=="string"?pe.title:pe.title.value)}this.item=Z,this.alt=ue?new Yl(ue,void 0,M,Y,oe):void 0,this._options=M,Q.kS.isThemeIcon(Z.icon)&&(this.class=ae.dT.asClassName(Z.icon))}dispose(){}run(...Z){var ue,M;let Y=[];return!((ue=this._options)===null||ue===void 0)&&ue.arg&&(Y=[...Y,this._options.arg]),!((M=this._options)===null||M===void 0)&&M.shouldForwardArgs&&(Y=[...Y,...Z]),this._commandService.executeCommand(this.id,...Y)}};B=U([E(3,ie.i6),E(4,de.H)],B)},35884:function(Nt,rt,w){"use strict";w.d(rt,{H:function(){return de},P:function(){return ie}});var $=w(4348),ae=w(88226),Se=w(69323),_e=w(34502),O=w(72999),m=w(16925);const de=(0,m.yh)("commandService"),ie=new class{constructor(){this._commands=new Map,this._onDidRegisterCommand=new $.Q5,this.onDidRegisterCommand=this._onDidRegisterCommand.event}registerCommand(o,Q){if(!o)throw new Error("invalid command");if(typeof o=="string"){if(!Q)throw new Error("invalid command");return this.registerCommand({id:o,handler:Q})}if(o.description){const D=[];for(let q of o.description.args)D.push(q.constraint);const V=o.handler;o.handler=function(q,...B){return(0,O.D8)(B,D),V(q,...B)}}const{id:U}=o;let E=this._commands.get(U);E||(E=new _e.S,this._commands.set(U,E));let b=E.unshift(o),S=(0,Se.OF)(()=>{b();const D=this._commands.get(U);D!=null&&D.isEmpty()&&this._commands.delete(U)});return this._onDidRegisterCommand.fire(U),S}registerCommandAlias(o,Q){return ie.registerCommand(o,(U,...E)=>U.get(de).executeCommand(Q,...E))}getCommand(o){const Q=this._commands.get(o);if(!(!Q||Q.isEmpty()))return ae.$.first(Q)}getCommands(){const o=new Map;for(const Q of this._commands.keys()){const U=this.getCommand(Q);U&&o.set(Q,U)}return o}};ie.registerCommand("noop",()=>{})},90689:function(Nt,rt,w){"use strict";w.d(rt,{Ao:function(){return de},Eq:function(){return j},Fb:function(){return ie},K8:function(){return k},i6:function(){return Ae},uy:function(){return ve}});var $=w(23345),ae=w(82983),Se=w(16925);let _e=$.WE||"";const O=new Map;O.set("false",!1),O.set("true",!0),O.set("isMac",$.dz),O.set("isLinux",$.IJ),O.set("isWindows",$.ED),O.set("isWeb",$.$L),O.set("isMacNative",$.dz&&!$.$L),O.set("isEdge",_e.indexOf("Edg/")>=0),O.set("isFirefox",_e.indexOf("Firefox")>=0),O.set("isChrome",_e.indexOf("Chrome")>=0),O.set("isSafari",_e.indexOf("Safari")>=0);const m=Object.prototype.hasOwnProperty;class de{static has(v){return E.create(v)}static equals(v,y){return b.create(v,y)}static regex(v,y){return Y.create(v,y)}static not(v){return q.create(v)}static and(...v){return ye.create(v,null)}static or(...v){return pe.create(v,null,!0)}static deserialize(v,y=!1){if(v)return this._deserializeOrExpression(v,y)}static _deserializeOrExpression(v,y){let N=v.split("||");return pe.create(N.map(te=>this._deserializeAndExpression(te,y)),null,!0)}static _deserializeAndExpression(v,y){let N=v.split("&&");return ye.create(N.map(te=>this._deserializeOne(te,y)),null)}static _deserializeOne(v,y){if(v=v.trim(),v.indexOf("!=")>=0){let N=v.split("!=");return V.create(N[0].trim(),this._deserializeValue(N[1],y))}if(v.indexOf("==")>=0){let N=v.split("==");return b.create(N[0].trim(),this._deserializeValue(N[1],y))}if(v.indexOf("=~")>=0){let N=v.split("=~");return Y.create(N[0].trim(),this._deserializeRegexValue(N[1],y))}if(v.indexOf(" in ")>=0){let N=v.split(" in ");return S.create(N[0].trim(),N[1].trim())}if(/^[^<=>]+>=[^<=>]+$/.test(v)){const N=v.split(">=");return Z.create(N[0].trim(),N[1].trim())}if(/^[^<=>]+>[^<=>]+$/.test(v)){const N=v.split(">");return R.create(N[0].trim(),N[1].trim())}if(/^[^<=>]+<=[^<=>]+$/.test(v)){const N=v.split("<=");return M.create(N[0].trim(),N[1].trim())}if(/^[^<=>]+<[^<=>]+$/.test(v)){const N=v.split("<");return ue.create(N[0].trim(),N[1].trim())}return/^\!\s*/.test(v)?q.create(v.substr(1).trim()):E.create(v)}static _deserializeValue(v,y){if(v=v.trim(),v==="true")return!0;if(v==="false")return!1;let N=/^'([^']*)'$/.exec(v);return N?N[1].trim():v}static _deserializeRegexValue(v,y){if((0,ae.m5)(v)){if(y)throw new Error("missing regexp-value for =~-expression");return console.warn("missing regexp-value for =~-expression"),null}let N=v.indexOf("/"),te=v.lastIndexOf("/");if(N===te||N<0){if(y)throw new Error(`bad regexp-value '${v}', missing /-enclosure`);return console.warn(`bad regexp-value '${v}', missing /-enclosure`),null}let Le=v.slice(N+1,te),Fe=v[te+1]==="i"?"i":"";try{return new RegExp(Le,Fe)}catch(Ue){if(y)throw new Error(`bad regexp-value '${v}', parse error: ${Ue}`);return console.warn(`bad regexp-value '${v}', parse error: ${Ue}`),null}}}function ie(G,v){const y=G?G.substituteConstants():void 0,N=v?v.substituteConstants():void 0;return!y&&!N?!0:!y||!N?!1:y.equals(N)}function o(G,v){return G.cmp(v)}class Q{constructor(){this.type=0}cmp(v){return this.type-v.type}equals(v){return v.type===this.type}substituteConstants(){return this}evaluate(v){return!1}serialize(){return"false"}keys(){return[]}negate(){return U.INSTANCE}}Q.INSTANCE=new Q;class U{constructor(){this.type=1}cmp(v){return this.type-v.type}equals(v){return v.type===this.type}substituteConstants(){return this}evaluate(v){return!0}serialize(){return"true"}keys(){return[]}negate(){return Q.INSTANCE}}U.INSTANCE=new U;class E{constructor(v,y){this.key=v,this.negated=y,this.type=2}static create(v,y=null){const N=O.get(v);return typeof N=="boolean"?N?U.INSTANCE:Q.INSTANCE:new E(v,y)}cmp(v){return v.type!==this.type?this.type-v.type:P(this.key,v.key)}equals(v){return v.type===this.type?this.key===v.key:!1}substituteConstants(){const v=O.get(this.key);return typeof v=="boolean"?v?U.INSTANCE:Q.INSTANCE:this}evaluate(v){return!!v.getValue(this.key)}serialize(){return this.key}keys(){return[this.key]}negate(){return this.negated||(this.negated=q.create(this.key,this)),this.negated}}class b{constructor(v,y,N){this.key=v,this.value=y,this.negated=N,this.type=4}static create(v,y,N=null){if(typeof y=="boolean")return y?E.create(v,N):q.create(v,N);const te=O.get(v);return typeof te=="boolean"?y===(te?"true":"false")?U.INSTANCE:Q.INSTANCE:new b(v,y,N)}cmp(v){return v.type!==this.type?this.type-v.type:K(this.key,this.value,v.key,v.value)}equals(v){return v.type===this.type?this.key===v.key&&this.value===v.value:!1}substituteConstants(){const v=O.get(this.key);if(typeof v=="boolean"){const y=v?"true":"false";return this.value===y?U.INSTANCE:Q.INSTANCE}return this}evaluate(v){return v.getValue(this.key)==this.value}serialize(){return`${this.key} == '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=V.create(this.key,this.value,this)),this.negated}}class S{constructor(v,y){this.key=v,this.valueKey=y,this.type=10,this.negated=null}static create(v,y){return new S(v,y)}cmp(v){return v.type!==this.type?this.type-v.type:K(this.key,this.valueKey,v.key,v.valueKey)}equals(v){return v.type===this.type?this.key===v.key&&this.valueKey===v.valueKey:!1}substituteConstants(){return this}evaluate(v){const y=v.getValue(this.valueKey),N=v.getValue(this.key);return Array.isArray(y)?y.indexOf(N)>=0:typeof N=="string"&&typeof y=="object"&&y!==null?m.call(y,N):!1}serialize(){return`${this.key} in '${this.valueKey}'`}keys(){return[this.key,this.valueKey]}negate(){return this.negated||(this.negated=D.create(this)),this.negated}}class D{constructor(v){this._actual=v,this.type=11}static create(v){return new D(v)}cmp(v){return v.type!==this.type?this.type-v.type:this._actual.cmp(v._actual)}equals(v){return v.type===this.type?this._actual.equals(v._actual):!1}substituteConstants(){return this}evaluate(v){return!this._actual.evaluate(v)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}class V{constructor(v,y,N){this.key=v,this.value=y,this.negated=N,this.type=5}static create(v,y,N=null){if(typeof y=="boolean")return y?q.create(v,N):E.create(v,N);const te=O.get(v);return typeof te=="boolean"?y===(te?"true":"false")?Q.INSTANCE:U.INSTANCE:new V(v,y,N)}cmp(v){return v.type!==this.type?this.type-v.type:K(this.key,this.value,v.key,v.value)}equals(v){return v.type===this.type?this.key===v.key&&this.value===v.value:!1}substituteConstants(){const v=O.get(this.key);if(typeof v=="boolean"){const y=v?"true":"false";return this.value===y?Q.INSTANCE:U.INSTANCE}return this}evaluate(v){return v.getValue(this.key)!=this.value}serialize(){return`${this.key} != '${this.value}'`}keys(){return[this.key]}negate(){return this.negated||(this.negated=b.create(this.key,this.value,this)),this.negated}}class q{constructor(v,y){this.key=v,this.negated=y,this.type=3}static create(v,y=null){const N=O.get(v);return typeof N=="boolean"?N?Q.INSTANCE:U.INSTANCE:new q(v,y)}cmp(v){return v.type!==this.type?this.type-v.type:P(this.key,v.key)}equals(v){return v.type===this.type?this.key===v.key:!1}substituteConstants(){const v=O.get(this.key);return typeof v=="boolean"?v?Q.INSTANCE:U.INSTANCE:this}evaluate(v){return!v.getValue(this.key)}serialize(){return`!${this.key}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=E.create(this.key,this)),this.negated}}function B(G,v){if(typeof G=="string"){const y=parseFloat(G);isNaN(y)||(G=y)}return typeof G=="string"||typeof G=="number"?v(G):Q.INSTANCE}class R{constructor(v,y,N){this.key=v,this.value=y,this.negated=N,this.type=12}static create(v,y,N=null){return B(y,te=>new R(v,te,N))}cmp(v){return v.type!==this.type?this.type-v.type:K(this.key,this.value,v.key,v.value)}equals(v){return v.type===this.type?this.key===v.key&&this.value===v.value:!1}substituteConstants(){return this}evaluate(v){return typeof this.value=="string"?!1:parseFloat(v.getValue(this.key))>this.value}serialize(){return`${this.key} > ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=M.create(this.key,this.value,this)),this.negated}}class Z{constructor(v,y,N){this.key=v,this.value=y,this.negated=N,this.type=13}static create(v,y,N=null){return B(y,te=>new Z(v,te,N))}cmp(v){return v.type!==this.type?this.type-v.type:K(this.key,this.value,v.key,v.value)}equals(v){return v.type===this.type?this.key===v.key&&this.value===v.value:!1}substituteConstants(){return this}evaluate(v){return typeof this.value=="string"?!1:parseFloat(v.getValue(this.key))>=this.value}serialize(){return`${this.key} >= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=ue.create(this.key,this.value,this)),this.negated}}class ue{constructor(v,y,N){this.key=v,this.value=y,this.negated=N,this.type=14}static create(v,y,N=null){return B(y,te=>new ue(v,te,N))}cmp(v){return v.type!==this.type?this.type-v.type:K(this.key,this.value,v.key,v.value)}equals(v){return v.type===this.type?this.key===v.key&&this.value===v.value:!1}substituteConstants(){return this}evaluate(v){return typeof this.value=="string"?!1:parseFloat(v.getValue(this.key))<this.value}serialize(){return`${this.key} < ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=Z.create(this.key,this.value,this)),this.negated}}class M{constructor(v,y,N){this.key=v,this.value=y,this.negated=N,this.type=15}static create(v,y,N=null){return B(y,te=>new M(v,te,N))}cmp(v){return v.type!==this.type?this.type-v.type:K(this.key,this.value,v.key,v.value)}equals(v){return v.type===this.type?this.key===v.key&&this.value===v.value:!1}substituteConstants(){return this}evaluate(v){return typeof this.value=="string"?!1:parseFloat(v.getValue(this.key))<=this.value}serialize(){return`${this.key} <= ${this.value}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=R.create(this.key,this.value,this)),this.negated}}class Y{constructor(v,y){this.key=v,this.regexp=y,this.type=7,this.negated=null}static create(v,y){return new Y(v,y)}cmp(v){if(v.type!==this.type)return this.type-v.type;if(this.key<v.key)return-1;if(this.key>v.key)return 1;const y=this.regexp?this.regexp.source:"",N=v.regexp?v.regexp.source:"";return y<N?-1:y>N?1:0}equals(v){if(v.type===this.type){const y=this.regexp?this.regexp.source:"",N=v.regexp?v.regexp.source:"";return this.key===v.key&&y===N}return!1}substituteConstants(){return this}evaluate(v){let y=v.getValue(this.key);return this.regexp?this.regexp.test(y):!1}serialize(){const v=this.regexp?`/${this.regexp.source}/${this.regexp.ignoreCase?"i":""}`:"/invalid/";return`${this.key} =~ ${v}`}keys(){return[this.key]}negate(){return this.negated||(this.negated=oe.create(this)),this.negated}}class oe{constructor(v){this._actual=v,this.type=8}static create(v){return new oe(v)}cmp(v){return v.type!==this.type?this.type-v.type:this._actual.cmp(v._actual)}equals(v){return v.type===this.type?this._actual.equals(v._actual):!1}substituteConstants(){return this}evaluate(v){return!this._actual.evaluate(v)}serialize(){throw new Error("Method not implemented.")}keys(){return this._actual.keys()}negate(){return this._actual}}function J(G){let v=null;for(let y=0,N=G.length;y<N;y++){const te=G[y].substituteConstants();if(G[y]!==te&&v===null){v=[];for(let Le=0;Le<y;Le++)v[Le]=G[Le]}v!==null&&(v[y]=te)}return v===null?G:v}class ye{constructor(v,y){this.expr=v,this.negated=y,this.type=6}static create(v,y){return ye._normalizeArr(v,y)}cmp(v){if(v.type!==this.type)return this.type-v.type;if(this.expr.length<v.expr.length)return-1;if(this.expr.length>v.expr.length)return 1;for(let y=0,N=this.expr.length;y<N;y++){const te=o(this.expr[y],v.expr[y]);if(te!==0)return te}return 0}equals(v){if(v.type===this.type){if(this.expr.length!==v.expr.length)return!1;for(let y=0,N=this.expr.length;y<N;y++)if(!this.expr[y].equals(v.expr[y]))return!1;return!0}return!1}substituteConstants(){const v=J(this.expr);return v===this.expr?this:ye.create(v,this.negated)}evaluate(v){for(let y=0,N=this.expr.length;y<N;y++)if(!this.expr[y].evaluate(v))return!1;return!0}static _normalizeArr(v,y){const N=[];let te=!1;for(const Le of v)if(Le){if(Le.type===1){te=!0;continue}if(Le.type===0)return Q.INSTANCE;if(Le.type===6){N.push(...Le.expr);continue}N.push(Le)}if(N.length===0&&te)return U.INSTANCE;if(N.length!==0){if(N.length===1)return N[0];N.sort(o);for(let Le=1;Le<N.length;Le++)N[Le-1].equals(N[Le])&&(N.splice(Le,1),Le--);if(N.length===1)return N[0];for(;N.length>1;){const Le=N[N.length-1];if(Le.type!==9)break;N.pop();const Fe=N.pop(),Ue=N.length===0,Ye=pe.create(Le.expr.map(ut=>ye.create([ut,Fe],null)),null,Ue);Ye&&(N.push(Ye),N.sort(o))}return N.length===1?N[0]:new ye(N,y)}}serialize(){return this.expr.map(v=>v.serialize()).join(" && ")}keys(){const v=[];for(let y of this.expr)v.push(...y.keys());return v}negate(){if(!this.negated){const v=[];for(let y of this.expr)v.push(y.negate());this.negated=pe.create(v,this,!0)}return this.negated}}class pe{constructor(v,y){this.expr=v,this.negated=y,this.type=9}static create(v,y,N){return pe._normalizeArr(v,y,N)}cmp(v){if(v.type!==this.type)return this.type-v.type;if(this.expr.length<v.expr.length)return-1;if(this.expr.length>v.expr.length)return 1;for(let y=0,N=this.expr.length;y<N;y++){const te=o(this.expr[y],v.expr[y]);if(te!==0)return te}return 0}equals(v){if(v.type===this.type){if(this.expr.length!==v.expr.length)return!1;for(let y=0,N=this.expr.length;y<N;y++)if(!this.expr[y].equals(v.expr[y]))return!1;return!0}return!1}substituteConstants(){const v=J(this.expr);return v===this.expr?this:pe.create(v,this.negated,!1)}evaluate(v){for(let y=0,N=this.expr.length;y<N;y++)if(this.expr[y].evaluate(v))return!0;return!1}static _normalizeArr(v,y,N){let te=[],Le=!1;if(v){for(let Fe=0,Ue=v.length;Fe<Ue;Fe++){const Ye=v[Fe];if(Ye){if(Ye.type===0){Le=!0;continue}if(Ye.type===1)return U.INSTANCE;if(Ye.type===9){te=te.concat(Ye.expr);continue}te.push(Ye)}}if(te.length===0&&Le)return Q.INSTANCE;te.sort(o)}if(te.length!==0){if(te.length===1)return te[0];for(let Fe=1;Fe<te.length;Fe++)te[Fe-1].equals(te[Fe])&&(te.splice(Fe,1),Fe--);if(te.length===1)return te[0];if(N){for(let Fe=0;Fe<te.length;Fe++)for(let Ue=Fe+1;Ue<te.length;Ue++)k(te[Fe],te[Ue])&&(te.splice(Ue,1),Ue--);if(te.length===1)return te[0]}return new pe(te,y)}}serialize(){return this.expr.map(v=>v.serialize()).join(" || ")}keys(){const v=[];for(let y of this.expr)v.push(...y.keys());return v}negate(){if(!this.negated){let v=[];for(let y of this.expr)v.push(y.negate());for(;v.length>1;){const y=v.shift(),N=v.shift(),te=[];for(const Fe of ne(y))for(const Ue of ne(N))te.push(ye.create([Fe,Ue],null));const Le=v.length===0;v.unshift(pe.create(te,null,Le))}this.negated=v[0]}return this.negated}}class ve extends E{constructor(v,y,N){super(v,null),this._defaultValue=y,typeof N=="object"?ve._info.push(Object.assign(Object.assign({},N),{key:v})):N!==!0&&ve._info.push({key:v,description:N,type:y!=null?typeof y:void 0})}static all(){return ve._info.values()}bindTo(v){return v.createKey(this.key,this._defaultValue)}getValue(v){return v.getContextKeyValue(this.key)}toNegated(){return this.negate()}isEqualTo(v){return b.create(this.key,v)}}ve._info=[];const Ae=(0,Se.yh)("contextKeyService"),j="setContext";function P(G,v){return G<v?-1:G>v?1:0}function K(G,v,y,N){return G<y?-1:G>y?1:v<N?-1:v>N?1:0}function k(G,v){if(v.type===6&&G.type!==9&&G.type!==6){for(const te of v.expr)if(G.equals(te))return!0}const y=G.negate(),N=ne(y).concat(ne(v));N.sort(o);for(let te=0;te<N.length;te++){const Fe=N[te].negate();for(let Ue=te+1;Ue<N.length;Ue++){const Ye=N[Ue];if(Fe.equals(Ye))return!0}}return!1}function ne(G){return G.type===9?G.expr:[G]}},16925:function(Nt,rt,w){"use strict";w.d(rt,{I8:function(){return $},TG:function(){return ae},jt:function(){return O},yh:function(){return _e}});var $;(function(m){m.serviceIds=new Map,m.DI_TARGET="$di$target",m.DI_DEPENDENCIES="$di$dependencies";function de(ie){return ie[m.DI_DEPENDENCIES]||[]}m.getServiceDependencies=de})($||($={}));const ae=_e("instantiationService");function Se(m,de,ie,o){de[$.DI_TARGET]===de?de[$.DI_DEPENDENCIES].push({id:m,index:ie,optional:o}):(de[$.DI_DEPENDENCIES]=[{id:m,index:ie,optional:o}],de[$.DI_TARGET]=de)}function _e(m){if($.serviceIds.has(m))return $.serviceIds.get(m);const de=function(ie,o,Q){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");Se(de,ie,Q,!1)};return de.toString=()=>m,$.serviceIds.set(m,de),de}function O(m){return function(de,ie,o){if(arguments.length!==3)throw new Error("@optional-decorator can only be used to decorate a parameter");Se(m,de,o,!0)}}},44650:function(Nt,rt,w){"use strict";w.d(rt,{B:function(){return _e}});var $=w(76068),ae=w(72999);class Se{constructor(){this.data=new Map}add(m,de){$.ok(ae.HD(m)),$.ok(ae.Kn(de)),$.ok(!this.data.has(m),"There is already an extension with this id"),this.data.set(m,de)}as(m){return this.data.get(m)||null}}const _e=new Se},66213:function(Nt,rt,w){"use strict";w.d(rt,{e:function(){return $}});var $;(function(ae){ae.DARK="dark",ae.LIGHT="light",ae.HIGH_CONTRAST="hc"})($||($={}))},49055:function(Nt,rt,w){"use strict";w.d(rt,{EN:function(){return o},IP:function(){return E},Ic:function(){return D},XE:function(){return de},bB:function(){return V},kS:function(){return Q},m6:function(){return U}});var $=w(52615),ae=w(4348),Se=w(69323),_e=w(16925),O=w(44650),m=w(66213);const de=(0,_e.yh)("themeService");var ie;(function(q){function B(R){return R&&typeof R=="object"&&typeof R.id=="string"}q.isThemeColor=B})(ie||(ie={}));function o(q){return{id:q}}var Q;(function(q){function B(oe){return oe&&typeof oe=="object"&&typeof oe.id=="string"&&(typeof oe.color=="undefined"||ie.isThemeColor(oe.color))}q.isThemeIcon=B;const R=new RegExp(`^\\$\\((${$.dT.iconNameExpression}(?:${$.dT.iconModifierExpression})?)\\)$`);function Z(oe){const J=R.exec(oe);if(!J)return;let[,ye]=J;return{id:ye}}q.fromString=Z;function ue(oe,J){let ye=oe.id;const pe=ye.lastIndexOf("~");return pe!==-1&&(ye=ye.substring(0,pe)),J&&(ye=`${ye}~${J}`),{id:ye}}q.modify=ue;function M(oe,J){var ye,pe;return oe.id===J.id&&((ye=oe.color)===null||ye===void 0?void 0:ye.id)===((pe=J.color)===null||pe===void 0?void 0:pe.id)}q.isEqual=M;function Y(oe,J){return{id:oe.id,color:J?o(J):void 0}}q.asThemeIcon=Y,q.asClassNameArray=$.dT.asClassNameArray,q.asClassName=$.dT.asClassName,q.asCSSSelector=$.dT.asCSSSelector})(Q||(Q={}));function U(q){switch(q){case m.e.DARK:return"vs-dark";case m.e.HIGH_CONTRAST:return"hc-black";default:return"vs"}}const E={ThemingContribution:"base.contributions.theming"};class b{constructor(){this.themingParticipants=[],this.themingParticipants=[],this.onThemingParticipantAddedEmitter=new ae.Q5}onColorThemeChange(B){return this.themingParticipants.push(B),this.onThemingParticipantAddedEmitter.fire(B),(0,Se.OF)(()=>{const R=this.themingParticipants.indexOf(B);this.themingParticipants.splice(R,1)})}getThemingParticipants(){return this.themingParticipants}}let S=new b;O.B.add(E.ThemingContribution,S);function D(q){return S.onColorThemeChange(q)}class V extends Se.JT{constructor(B){super(),this.themeService=B,this.theme=B.getColorTheme(),this._register(this.themeService.onDidColorThemeChange(R=>this.onThemeChange(R)))}onThemeChange(B){this.theme=B,this.updateStyles()}updateStyles(){}}},5630:function(Nt,rt,w){"use strict";var $=w(72308),ae=w(77321),Se=w(49618),_e=w(52487),O=w(74416),m=w(92310),de=w.n(m),ie=w(18929),o=w(59301),Q=["prefixCls","className","style","checked","disabled","defaultChecked","type","title","onChange"],U=(0,o.forwardRef)(function(E,b){var S,D=E.prefixCls,V=D===void 0?"rc-checkbox":D,q=E.className,B=E.style,R=E.checked,Z=E.disabled,ue=E.defaultChecked,M=ue===void 0?!1:ue,Y=E.type,oe=Y===void 0?"checkbox":Y,J=E.title,ye=E.onChange,pe=(0,O.Z)(E,Q),ve=(0,o.useRef)(null),Ae=(0,ie.Z)(M,{value:R}),j=(0,_e.Z)(Ae,2),P=j[0],K=j[1];(0,o.useImperativeHandle)(b,function(){return{focus:function(){var v;(v=ve.current)===null||v===void 0||v.focus()},blur:function(){var v;(v=ve.current)===null||v===void 0||v.blur()},input:ve.current}});var k=de()(V,q,(S={},(0,Se.Z)(S,"".concat(V,"-checked"),P),(0,Se.Z)(S,"".concat(V,"-disabled"),Z),S)),ne=function(v){Z||("checked"in E||K(v.target.checked),ye==null||ye({target:(0,ae.Z)((0,ae.Z)({},E),{},{type:oe,checked:v.target.checked}),stopPropagation:function(){v.stopPropagation()},preventDefault:function(){v.preventDefault()},nativeEvent:v.nativeEvent}))};return o.createElement("span",{className:k,title:J,style:B},o.createElement("input",(0,$.Z)({},pe,{className:"".concat(V,"-input"),ref:ve,onChange:ne,disabled:Z,checked:!!P,type:oe})),o.createElement("span",{className:"".concat(V,"-inner")}))});rt.Z=U},31561:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return oe}});var $=w(72308),ae=w(49618),Se=w(52487),_e=w(74416),O=w(35593),m=w(92310),de=w.n(m),ie=w(8654),o=w(59301),Q=w(10228),U=w(16089),E=Q.Z.ESC,b=Q.Z.TAB;function S(J){var ye=J.visible,pe=J.triggerRef,ve=J.onVisibleChange,Ae=J.autoFocus,j=J.overlayRef,P=o.useRef(!1),K=function(){if(ye){var v,y;(v=pe.current)===null||v===void 0||(y=v.focus)===null||y===void 0||y.call(v),ve==null||ve(!1)}},k=function(){var v;return(v=j.current)!==null&&v!==void 0&&v.focus?(j.current.focus(),P.current=!0,!0):!1},ne=function(v){switch(v.keyCode){case E:K();break;case b:{var y=!1;P.current||(y=k()),y?v.preventDefault():K();break}}};o.useEffect(function(){return ye?(window.addEventListener("keydown",ne),Ae&&(0,U.Z)(k,3),function(){window.removeEventListener("keydown",ne),P.current=!1}):function(){P.current=!1}},[ye])}var D=(0,o.forwardRef)(function(J,ye){var pe=J.overlay,ve=J.arrow,Ae=J.prefixCls,j=(0,o.useMemo)(function(){var K;return typeof pe=="function"?K=pe():K=pe,K},[pe]),P=(0,ie.sQ)(ye,j==null?void 0:j.ref);return o.createElement(o.Fragment,null,ve&&o.createElement("div",{className:"".concat(Ae,"-arrow")}),o.cloneElement(j,{ref:(0,ie.Yr)(j)?P:void 0}))}),V=D,q={adjustX:1,adjustY:1},B=[0,0],R={topLeft:{points:["bl","tl"],overflow:q,offset:[0,-4],targetOffset:B},top:{points:["bc","tc"],overflow:q,offset:[0,-4],targetOffset:B},topRight:{points:["br","tr"],overflow:q,offset:[0,-4],targetOffset:B},bottomLeft:{points:["tl","bl"],overflow:q,offset:[0,4],targetOffset:B},bottom:{points:["tc","bc"],overflow:q,offset:[0,4],targetOffset:B},bottomRight:{points:["tr","br"],overflow:q,offset:[0,4],targetOffset:B}},Z=R,ue=["arrow","prefixCls","transitionName","animation","align","placement","placements","getPopupContainer","showAction","hideAction","overlayClassName","overlayStyle","visible","trigger","autoFocus","overlay","children","onVisibleChange"];function M(J,ye){var pe,ve=J.arrow,Ae=ve===void 0?!1:ve,j=J.prefixCls,P=j===void 0?"rc-dropdown":j,K=J.transitionName,k=J.animation,ne=J.align,G=J.placement,v=G===void 0?"bottomLeft":G,y=J.placements,N=y===void 0?Z:y,te=J.getPopupContainer,Le=J.showAction,Fe=J.hideAction,Ue=J.overlayClassName,Ye=J.overlayStyle,ut=J.visible,ot=J.trigger,lt=ot===void 0?["hover"]:ot,St=J.autoFocus,Lt=J.overlay,_t=J.children,At=J.onVisibleChange,Pt=(0,_e.Z)(J,ue),kt=o.useState(),fe=(0,Se.Z)(kt,2),he=fe[0],se=fe[1],Me="visible"in J?ut:he,$e=o.useRef(null),F=o.useRef(null),le=o.useRef(null);o.useImperativeHandle(ye,function(){return $e.current});var xe=function(De){se(De),At==null||At(De)};S({visible:Me,triggerRef:le,onVisibleChange:xe,autoFocus:St,overlayRef:F});var we=function(De){var Pe=J.onOverlayClick;se(!1),Pe&&Pe(De)},Ie=function(){return o.createElement(V,{ref:F,overlay:Lt,prefixCls:P,arrow:Ae})},Oe=function(){return typeof Lt=="function"?Ie:Ie()},Qe=function(){var De=J.minOverlayWidthMatchTrigger,Pe=J.alignPoint;return"minOverlayWidthMatchTrigger"in J?De:!Pe},it=function(){var De=J.openClassName;return De!==void 0?De:"".concat(P,"-open")},Je=o.cloneElement(_t,{className:de()((pe=_t.props)===null||pe===void 0?void 0:pe.className,Me&&it()),ref:(0,ie.Yr)(_t)?(0,ie.sQ)(le,_t.ref):void 0}),Ke=Fe;return!Ke&<.indexOf("contextMenu")!==-1&&(Ke=["click"]),o.createElement(O.Z,(0,$.Z)({builtinPlacements:N},Pt,{prefixCls:P,ref:$e,popupClassName:de()(Ue,(0,ae.Z)({},"".concat(P,"-show-arrow"),Ae)),popupStyle:Ye,action:lt,showAction:Le,hideAction:Ke,popupPlacement:v,popupAlign:ne,popupTransitionName:K,popupAnimation:k,popupVisible:Me,stretch:Qe()?"minWidth":"",popup:Oe(),onPopupVisibleChange:xe,onPopupClick:we,getPopupContainer:te}),Je)}var Y=o.forwardRef(M),oe=Y},93681:function(Nt,rt,w){"use strict";w.r(rt),w.d(rt,{BaseInput:function(){return Q},default:function(){return R}});var $=w(72308),ae=w(77321),Se=w(49618),_e=w(62853),O=w(92310),m=w.n(O),de=w(59301),ie=w(5643),o=function(ue){var M,Y,oe=ue.inputElement,J=ue.prefixCls,ye=ue.prefix,pe=ue.suffix,ve=ue.addonBefore,Ae=ue.addonAfter,j=ue.className,P=ue.style,K=ue.disabled,k=ue.readOnly,ne=ue.focused,G=ue.triggerFocus,v=ue.allowClear,y=ue.value,N=ue.handleReset,te=ue.hidden,Le=ue.classes,Fe=ue.classNames,Ue=ue.dataAttrs,Ye=ue.styles,ut=ue.components,ot=(ut==null?void 0:ut.affixWrapper)||"span",lt=(ut==null?void 0:ut.groupWrapper)||"span",St=(ut==null?void 0:ut.wrapper)||"span",Lt=(ut==null?void 0:ut.groupAddon)||"span",_t=(0,de.useRef)(null),At=function(Ie){var Oe;(Oe=_t.current)!==null&&Oe!==void 0&&Oe.contains(Ie.target)&&(G==null||G())},Pt=function(){var Ie;if(!v)return null;var Oe=!K&&!k&&y,Qe="".concat(J,"-clear-icon"),it=(0,_e.Z)(v)==="object"&&v!==null&&v!==void 0&&v.clearIcon?v.clearIcon:"\u2716";return de.createElement("span",{onClick:N,onMouseDown:function(Ke){return Ke.preventDefault()},className:m()(Qe,(Ie={},(0,Se.Z)(Ie,"".concat(Qe,"-hidden"),!Oe),(0,Se.Z)(Ie,"".concat(Qe,"-has-suffix"),!!pe),Ie)),role:"button",tabIndex:-1},it)},kt=(0,de.cloneElement)(oe,{value:y,hidden:te,className:m()((M=oe.props)===null||M===void 0?void 0:M.className,!(0,ie.X3)(ue)&&!(0,ie.He)(ue)&&j)||null,style:(0,ae.Z)((0,ae.Z)({},(Y=oe.props)===null||Y===void 0?void 0:Y.style),!(0,ie.X3)(ue)&&!(0,ie.He)(ue)?P:{})});if((0,ie.X3)(ue)){var fe,he="".concat(J,"-affix-wrapper"),se=m()(he,(fe={},(0,Se.Z)(fe,"".concat(he,"-disabled"),K),(0,Se.Z)(fe,"".concat(he,"-focused"),ne),(0,Se.Z)(fe,"".concat(he,"-readonly"),k),(0,Se.Z)(fe,"".concat(he,"-input-with-clear-btn"),pe&&v&&y),fe),!(0,ie.He)(ue)&&j,Le==null?void 0:Le.affixWrapper,Fe==null?void 0:Fe.affixWrapper),Me=(pe||v)&&de.createElement("span",{className:m()("".concat(J,"-suffix"),Fe==null?void 0:Fe.suffix),style:Ye==null?void 0:Ye.suffix},Pt(),pe);kt=de.createElement(ot,(0,$.Z)({className:se,style:(0,ae.Z)((0,ae.Z)({},(0,ie.He)(ue)?void 0:P),Ye==null?void 0:Ye.affixWrapper),hidden:!(0,ie.He)(ue)&&te,onClick:At},Ue==null?void 0:Ue.affixWrapper,{ref:_t}),ye&&de.createElement("span",{className:m()("".concat(J,"-prefix"),Fe==null?void 0:Fe.prefix),style:Ye==null?void 0:Ye.prefix},ye),(0,de.cloneElement)(oe,{value:y,hidden:null}),Me)}if((0,ie.He)(ue)){var $e="".concat(J,"-group"),F="".concat($e,"-addon"),le=m()("".concat(J,"-wrapper"),$e,Le==null?void 0:Le.wrapper),xe=m()("".concat(J,"-group-wrapper"),j,Le==null?void 0:Le.group);return de.createElement(lt,{className:xe,style:P,hidden:te},de.createElement(St,{className:le},ve&&de.createElement(Lt,{className:F},ve),(0,de.cloneElement)(kt,{hidden:null}),Ae&&de.createElement(Lt,{className:F},Ae)))}return kt},Q=o,U=w(80702),E=w(52487),b=w(74416),S=w(18929),D=w(2738),V=["autoComplete","onChange","onFocus","onBlur","onPressEnter","onKeyDown","prefixCls","disabled","htmlSize","className","maxLength","suffix","showCount","type","classes","classNames","styles"],q=(0,de.forwardRef)(function(Z,ue){var M=Z.autoComplete,Y=Z.onChange,oe=Z.onFocus,J=Z.onBlur,ye=Z.onPressEnter,pe=Z.onKeyDown,ve=Z.prefixCls,Ae=ve===void 0?"rc-input":ve,j=Z.disabled,P=Z.htmlSize,K=Z.className,k=Z.maxLength,ne=Z.suffix,G=Z.showCount,v=Z.type,y=v===void 0?"text":v,N=Z.classes,te=Z.classNames,Le=Z.styles,Fe=(0,b.Z)(Z,V),Ue=(0,S.Z)(Z.defaultValue,{value:Z.value}),Ye=(0,E.Z)(Ue,2),ut=Ye[0],ot=Ye[1],lt=(0,de.useState)(!1),St=(0,E.Z)(lt,2),Lt=St[0],_t=St[1],At=(0,de.useRef)(null),Pt=function(xe){At.current&&(0,ie.nH)(At.current,xe)};(0,de.useImperativeHandle)(ue,function(){return{focus:Pt,blur:function(){var xe;(xe=At.current)===null||xe===void 0||xe.blur()},setSelectionRange:function(xe,we,Ie){var Oe;(Oe=At.current)===null||Oe===void 0||Oe.setSelectionRange(xe,we,Ie)},select:function(){var xe;(xe=At.current)===null||xe===void 0||xe.select()},input:At.current}}),(0,de.useEffect)(function(){_t(function(le){return le&&j?!1:le})},[j]);var kt=function(xe){Z.value===void 0&&ot(xe.target.value),At.current&&(0,ie.rJ)(At.current,xe,Y)},fe=function(xe){ye&&xe.key==="Enter"&&ye(xe),pe==null||pe(xe)},he=function(xe){_t(!0),oe==null||oe(xe)},se=function(xe){_t(!1),J==null||J(xe)},Me=function(xe){ot(""),Pt(),At.current&&(0,ie.rJ)(At.current,xe,Y)},$e=function(){var xe=(0,D.Z)(Z,["prefixCls","onPressEnter","addonBefore","addonAfter","prefix","suffix","allowClear","defaultValue","showCount","classes","htmlSize","styles","classNames"]);return de.createElement("input",(0,$.Z)({autoComplete:M},xe,{onChange:kt,onFocus:he,onBlur:se,onKeyDown:fe,className:m()(Ae,(0,Se.Z)({},"".concat(Ae,"-disabled"),j),te==null?void 0:te.input),style:Le==null?void 0:Le.input,ref:At,size:P,type:y}))},F=function(){var xe=Number(k)>0;if(ne||G){var we=(0,ie.D7)(ut),Ie=(0,U.Z)(we).length,Oe=(0,_e.Z)(G)==="object"?G.formatter({value:we,count:Ie,maxLength:k}):"".concat(Ie).concat(xe?" / ".concat(k):"");return de.createElement(de.Fragment,null,!!G&&de.createElement("span",{className:m()("".concat(Ae,"-show-count-suffix"),(0,Se.Z)({},"".concat(Ae,"-show-count-has-suffix"),!!ne),te==null?void 0:te.count),style:(0,ae.Z)({},Le==null?void 0:Le.count)},Oe),ne)}return null};return de.createElement(Q,(0,$.Z)({},Fe,{prefixCls:Ae,className:K,inputElement:$e(),handleReset:Me,value:(0,ie.D7)(ut),focused:Lt,triggerFocus:Pt,suffix:F(),disabled:j,classes:N,classNames:te,styles:Le}))}),B=q,R=B},5643:function(Nt,rt,w){"use strict";w.d(rt,{D7:function(){return O},He:function(){return $},X3:function(){return ae},nH:function(){return _e},rJ:function(){return Se}});function $(m){return!!(m.addonBefore||m.addonAfter)}function ae(m){return!!(m.prefix||m.suffix||m.allowClear)}function Se(m,de,ie,o){if(ie){var Q=de;if(de.type==="click"){var U=m.cloneNode(!0);Q=Object.create(de,{target:{value:U},currentTarget:{value:U}}),U.value="",ie(Q);return}if(o!==void 0){Q=Object.create(de,{target:{value:m},currentTarget:{value:m}}),m.value=o,ie(Q);return}ie(Q)}}function _e(m,de){if(m){m.focus(de);var ie=de||{},o=ie.cursor;if(o){var Q=m.value.length;switch(o){case"start":m.setSelectionRange(0,0);break;case"end":m.setSelectionRange(Q,Q);break;default:m.setSelectionRange(0,Q)}}}}function O(m){return typeof m=="undefined"||m===null?"":String(m)}},15285:function(Nt,rt,w){"use strict";w.d(rt,{iz:function(){return un},ck:function(){return qe},BW:function(){return Fn},sN:function(){return qe},Wd:function(){return Ir},ZP:function(){return hr},Xl:function(){return pe}});var $=w(72308),ae=w(49618),Se=w(77321),_e=w(80702),O=w(52487),m=w(74416),de=w(92310),ie=w.n(de),o=w(11780),Q=w(18929),U=w(13697),E=w(48736),b=w(59301),S=w(4676),D=b.createContext(null);function V(st,at){return st===void 0?null:"".concat(st,"-").concat(at)}function q(st){var at=b.useContext(D);return V(at,st)}var B=w(80547),R=["children","locked"],Z=b.createContext(null);function ue(st,at){var bt=(0,Se.Z)({},st);return Object.keys(at).forEach(function(Dt){var vt=at[Dt];vt!==void 0&&(bt[Dt]=vt)}),bt}function M(st){var at=st.children,bt=st.locked,Dt=(0,m.Z)(st,R),vt=b.useContext(Z),Ut=(0,B.Z)(function(){return ue(vt,Dt)},[vt,Dt],function(wt,Zt){return!bt&&(wt[0]!==Zt[0]||!(0,U.Z)(wt[1],Zt[1],!0))});return b.createElement(Z.Provider,{value:Ut},at)}var Y=[],oe=b.createContext(null);function J(){return b.useContext(oe)}var ye=b.createContext(Y);function pe(st){var at=b.useContext(ye);return b.useMemo(function(){return st!==void 0?[].concat((0,_e.Z)(at),[st]):at},[at,st])}var ve=b.createContext(null),Ae=b.createContext({}),j=Ae,P=w(29194);function K(st){var at=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if((0,P.Z)(st)){var bt=st.nodeName.toLowerCase(),Dt=["input","select","textarea","button"].includes(bt)||st.isContentEditable||bt==="a"&&!!st.getAttribute("href"),vt=st.getAttribute("tabindex"),Ut=Number(vt),wt=null;return vt&&!Number.isNaN(Ut)?wt=Ut:Dt&&wt===null&&(wt=0),Dt&&st.disabled&&(wt=null),wt!==null&&(wt>=0||at&&wt<0)}return!1}function k(st){var at=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,bt=(0,_e.Z)(st.querySelectorAll("*")).filter(function(Dt){return K(Dt,at)});return K(st,at)&&bt.unshift(st),bt}var ne=null;function G(){ne=document.activeElement}function v(){ne=null}function y(){if(ne)try{ne.focus()}catch(st){}}function N(st,at){if(at.keyCode===9){var bt=k(st),Dt=bt[at.shiftKey?0:bt.length-1],vt=Dt===document.activeElement||st===document.activeElement;if(vt){var Ut=bt[at.shiftKey?bt.length-1:0];Ut.focus(),at.preventDefault()}}}var te=w(10228),Le=w(16089),Fe=te.Z.LEFT,Ue=te.Z.RIGHT,Ye=te.Z.UP,ut=te.Z.DOWN,ot=te.Z.ENTER,lt=te.Z.ESC,St=te.Z.HOME,Lt=te.Z.END,_t=[Ye,ut,Fe,Ue];function At(st,at,bt,Dt){var vt,Ut,wt,Zt,tr="prev",Qt="next",Tr="children",gr="parent";if(st==="inline"&&Dt===ot)return{inlineTrigger:!0};var Fr=(vt={},(0,ae.Z)(vt,Ye,tr),(0,ae.Z)(vt,ut,Qt),vt),nr=(Ut={},(0,ae.Z)(Ut,Fe,bt?Qt:tr),(0,ae.Z)(Ut,Ue,bt?tr:Qt),(0,ae.Z)(Ut,ut,Tr),(0,ae.Z)(Ut,ot,Tr),Ut),lr=(wt={},(0,ae.Z)(wt,Ye,tr),(0,ae.Z)(wt,ut,Qt),(0,ae.Z)(wt,ot,Tr),(0,ae.Z)(wt,lt,gr),(0,ae.Z)(wt,Fe,bt?Tr:gr),(0,ae.Z)(wt,Ue,bt?gr:Tr),wt),Zr={inline:Fr,horizontal:nr,vertical:lr,inlineSub:Fr,horizontalSub:lr,verticalSub:lr},qr=(Zt=Zr["".concat(st).concat(at?"":"Sub")])===null||Zt===void 0?void 0:Zt[Dt];switch(qr){case tr:return{offset:-1,sibling:!0};case Qt:return{offset:1,sibling:!0};case gr:return{offset:-1,sibling:!1};case Tr:return{offset:1,sibling:!1};default:return null}}function Pt(st){for(var at=st;at;){if(at.getAttribute("data-menu-list"))return at;at=at.parentElement}return null}function kt(st,at){for(var bt=st||document.activeElement;bt;){if(at.has(bt))return bt;bt=bt.parentElement}return null}function fe(st,at){var bt=k(st,!0);return bt.filter(function(Dt){return at.has(Dt)})}function he(st,at,bt){var Dt=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;if(!st)return null;var vt=fe(st,at),Ut=vt.length,wt=vt.findIndex(function(Zt){return bt===Zt});return Dt<0?wt===-1?wt=Ut-1:wt-=1:Dt>0&&(wt+=1),wt=(wt+Ut)%Ut,vt[wt]}var se=function(at,bt){var Dt=new Set,vt=new Map,Ut=new Map;return at.forEach(function(wt){var Zt=document.querySelector("[data-menu-id='".concat(V(bt,wt),"']"));Zt&&(Dt.add(Zt),Ut.set(Zt,wt),vt.set(wt,Zt))}),{elements:Dt,key2element:vt,element2key:Ut}};function Me(st,at,bt,Dt,vt,Ut,wt,Zt,tr,Qt){var Tr=b.useRef(),gr=b.useRef();gr.current=at;var Fr=function(){Le.Z.cancel(Tr.current)};return b.useEffect(function(){return function(){Fr()}},[]),function(nr){var lr=nr.which;if([].concat(_t,[ot,lt,St,Lt]).includes(lr)){var Zr=Ut(),qr=se(Zr,Dt),rn=qr,Yr=rn.elements,kr=rn.key2element,Mr=rn.element2key,Or=kr.get(at),Wr=kt(Or,Yr),pn=Mr.get(Wr),Qr=At(st,wt(pn,!0).length===1,bt,lr);if(!Qr&&lr!==St&&lr!==Lt)return;(_t.includes(lr)||[St,Lt].includes(lr))&&nr.preventDefault();var ir=function(Sr){if(Sr){var wn=Sr,Rn=Sr.querySelector("a");Rn!=null&&Rn.getAttribute("href")&&(wn=Rn);var hn=Mr.get(Sr);Zt(hn),Fr(),Tr.current=(0,Le.Z)(function(){gr.current===hn&&wn.focus()})}};if([St,Lt].includes(lr)||Qr.sibling||!Wr){var Xe;!Wr||st==="inline"?Xe=vt.current:Xe=Pt(Wr);var Wt,Jt=fe(Xe,Yr);lr===St?Wt=Jt[0]:lr===Lt?Wt=Jt[Jt.length-1]:Wt=he(Xe,Yr,Wr,Qr.offset),ir(Wt)}else if(Qr.inlineTrigger)tr(pn);else if(Qr.offset>0)tr(pn,!0),Fr(),Tr.current=(0,Le.Z)(function(){qr=se(Zr,Dt);var In=Wr.getAttribute("aria-controls"),Sr=document.getElementById(In),wn=he(Sr,qr.elements);ir(wn)},5);else if(Qr.offset<0){var yr=wt(pn,!0),Sn=yr[yr.length-2],vn=kr.get(Sn);tr(Sn,!1),ir(vn)}}Qt==null||Qt(nr)}}function $e(st){Promise.resolve().then(st)}var F="__RC_UTIL_PATH_SPLIT__",le=function(at){return at.join(F)},xe=function(at){return at.split(F)},we="rc-menu-more";function Ie(){var st=b.useState({}),at=(0,O.Z)(st,2),bt=at[1],Dt=(0,b.useRef)(new Map),vt=(0,b.useRef)(new Map),Ut=b.useState([]),wt=(0,O.Z)(Ut,2),Zt=wt[0],tr=wt[1],Qt=(0,b.useRef)(0),Tr=(0,b.useRef)(!1),gr=function(){Tr.current||bt({})},Fr=(0,b.useCallback)(function(kr,Mr){var Or=le(Mr);vt.current.set(Or,kr),Dt.current.set(kr,Or),Qt.current+=1;var Wr=Qt.current;$e(function(){Wr===Qt.current&&gr()})},[]),nr=(0,b.useCallback)(function(kr,Mr){var Or=le(Mr);vt.current.delete(Or),Dt.current.delete(kr)},[]),lr=(0,b.useCallback)(function(kr){tr(kr)},[]),Zr=(0,b.useCallback)(function(kr,Mr){var Or=Dt.current.get(kr)||"",Wr=xe(Or);return Mr&&Zt.includes(Wr[0])&&Wr.unshift(we),Wr},[Zt]),qr=(0,b.useCallback)(function(kr,Mr){return kr.some(function(Or){var Wr=Zr(Or,!0);return Wr.includes(Mr)})},[Zr]),rn=function(){var Mr=(0,_e.Z)(Dt.current.keys());return Zt.length&&Mr.push(we),Mr},Yr=(0,b.useCallback)(function(kr){var Mr="".concat(Dt.current.get(kr)).concat(F),Or=new Set;return(0,_e.Z)(vt.current.keys()).forEach(function(Wr){Wr.startsWith(Mr)&&Or.add(vt.current.get(Wr))}),Or},[]);return b.useEffect(function(){return function(){Tr.current=!0}},[]),{registerPath:Fr,unregisterPath:nr,refreshOverflowKeys:lr,isSubPathKey:qr,getKeyPath:Zr,getKeys:rn,getSubPathKeys:Yr}}function Oe(st){var at=b.useRef(st);at.current=st;var bt=b.useCallback(function(){for(var Dt,vt=arguments.length,Ut=new Array(vt),wt=0;wt<vt;wt++)Ut[wt]=arguments[wt];return(Dt=at.current)===null||Dt===void 0?void 0:Dt.call.apply(Dt,[at].concat(Ut))},[]);return st?bt:void 0}var Qe=Math.random().toFixed(5).toString().slice(2),it=0;function Je(st){var at=(0,Q.Z)(st,{value:st}),bt=(0,O.Z)(at,2),Dt=bt[0],vt=bt[1];return b.useEffect(function(){it+=1;var Ut="".concat(Qe,"-").concat(it);vt("rc-menu-uuid-".concat(Ut))},[]),Dt}var Ke=w(96949),yt=w(55090),De=w(77205),Pe=w(38793),Ze=w(2738),Ve=w(8654);function nt(st,at,bt,Dt){var vt=b.useContext(Z),Ut=vt.activeKey,wt=vt.onActive,Zt=vt.onInactive,tr={active:Ut===st};return at||(tr.onMouseEnter=function(Qt){bt==null||bt({key:st,domEvent:Qt}),wt(st)},tr.onMouseLeave=function(Qt){Dt==null||Dt({key:st,domEvent:Qt}),Zt(st)}),tr}function mt(st){var at=b.useContext(Z),bt=at.mode,Dt=at.rtl,vt=at.inlineIndent;if(bt!=="inline")return null;var Ut=st;return Dt?{paddingRight:Ut*vt}:{paddingLeft:Ut*vt}}function gt(st){var at=st.icon,bt=st.props,Dt=st.children,vt;return at===null||at===!1?null:(typeof at=="function"?vt=b.createElement(at,(0,Se.Z)({},bt)):typeof at!="boolean"&&(vt=at),vt||Dt||null)}var x=["item"];function T(st){var at=st.item,bt=(0,m.Z)(st,x);return Object.defineProperty(bt,"item",{get:function(){return(0,E.ZP)(!1,"`info.item` is deprecated since we will move to function component that not provides React Node instance in future."),at}}),bt}var et=["title","attribute","elementRef"],W=["style","className","eventKey","warnKey","disabled","itemIcon","children","role","onMouseEnter","onMouseLeave","onClick","onKeyDown","onFocus"],Ee=["active"],Bt=function(st){(0,De.Z)(bt,st);var at=(0,Pe.Z)(bt);function bt(){return(0,Ke.Z)(this,bt),at.apply(this,arguments)}return(0,yt.Z)(bt,[{key:"render",value:function(){var vt=this.props,Ut=vt.title,wt=vt.attribute,Zt=vt.elementRef,tr=(0,m.Z)(vt,et),Qt=(0,Ze.Z)(tr,["eventKey","popupClassName","popupOffset","onTitleClick"]);return(0,E.ZP)(!wt,"`attribute` of Menu.Item is deprecated. Please pass attribute directly."),b.createElement(o.Z.Item,(0,$.Z)({},wt,{title:typeof Ut=="string"?Ut:void 0},Qt,{ref:Zt}))}}]),bt}(b.Component),Be=b.forwardRef(function(st,at){var bt,Dt=st.style,vt=st.className,Ut=st.eventKey,wt=st.warnKey,Zt=st.disabled,tr=st.itemIcon,Qt=st.children,Tr=st.role,gr=st.onMouseEnter,Fr=st.onMouseLeave,nr=st.onClick,lr=st.onKeyDown,Zr=st.onFocus,qr=(0,m.Z)(st,W),rn=q(Ut),Yr=b.useContext(Z),kr=Yr.prefixCls,Mr=Yr.onItemClick,Or=Yr.disabled,Wr=Yr.overflowDisabled,pn=Yr.itemIcon,Qr=Yr.selectedKeys,ir=Yr.onActive,Xe=b.useContext(j),Wt=Xe._internalRenderMenuItem,Jt="".concat(kr,"-item"),yr=b.useRef(),Sn=b.useRef(),vn=Or||Zt,In=(0,Ve.x1)(at,Sn),Sr=pe(Ut),wn=function(_n){return{key:Ut,keyPath:(0,_e.Z)(Sr).reverse(),item:yr.current,domEvent:_n}},Rn=tr||pn,hn=nt(Ut,vn,gr,Fr),ai=hn.active,oi=(0,m.Z)(hn,Ee),qn=Qr.includes(Ut),Vn=mt(Sr.length),rr=function(_n){if(!vn){var Un=wn(_n);nr==null||nr(T(Un)),Mr(Un)}},Tn=function(_n){if(lr==null||lr(_n),_n.which===te.Z.ENTER){var Un=wn(_n);nr==null||nr(T(Un)),Mr(Un)}},nn=function(_n){ir(Ut),Zr==null||Zr(_n)},Pn={};st.role==="option"&&(Pn["aria-selected"]=qn);var li=b.createElement(Bt,(0,$.Z)({ref:yr,elementRef:In,role:Tr===null?"none":Tr||"menuitem",tabIndex:Zt?null:-1,"data-menu-id":Wr&&rn?null:rn},qr,oi,Pn,{component:"li","aria-disabled":Zt,style:(0,Se.Z)((0,Se.Z)({},Vn),Dt),className:ie()(Jt,(bt={},(0,ae.Z)(bt,"".concat(Jt,"-active"),ai),(0,ae.Z)(bt,"".concat(Jt,"-selected"),qn),(0,ae.Z)(bt,"".concat(Jt,"-disabled"),vn),bt),vt),onClick:rr,onKeyDown:Tn,onFocus:nn}),Qt,b.createElement(gt,{props:(0,Se.Z)((0,Se.Z)({},st),{},{isSelected:qn}),icon:Rn}));return Wt&&(li=Wt(li,st,{selected:qn})),li});function ze(st,at){var bt=st.eventKey,Dt=J(),vt=pe(bt);return b.useEffect(function(){if(Dt)return Dt.registerPath(bt,vt),function(){Dt.unregisterPath(bt,vt)}},[vt]),Dt?null:b.createElement(Be,(0,$.Z)({},st,{ref:at}))}var qe=b.forwardRef(ze),ee=["className","children"],be=function(at,bt){var Dt=at.className,vt=at.children,Ut=(0,m.Z)(at,ee),wt=b.useContext(Z),Zt=wt.prefixCls,tr=wt.mode,Qt=wt.rtl;return b.createElement("ul",(0,$.Z)({className:ie()(Zt,Qt&&"".concat(Zt,"-rtl"),"".concat(Zt,"-sub"),"".concat(Zt,"-").concat(tr==="inline"?"inline":"vertical"),Dt),role:"menu"},Ut,{"data-menu-list":!0,ref:bt}),vt)},me=b.forwardRef(be);me.displayName="SubMenuList";var Ge=me,X=w(11592);function Ct(st,at){return(0,X.Z)(st).map(function(bt,Dt){if(b.isValidElement(bt)){var vt,Ut,wt=bt.key,Zt=(vt=(Ut=bt.props)===null||Ut===void 0?void 0:Ut.eventKey)!==null&&vt!==void 0?vt:wt,tr=Zt==null;tr&&(Zt="tmp_key-".concat([].concat((0,_e.Z)(at),[Dt]).join("-")));var Qt={key:Zt,eventKey:Zt};return b.cloneElement(bt,Qt)}return bt})}var Ce=w(35593),Ot={adjustX:1,adjustY:1},zt={topLeft:{points:["bl","tl"],overflow:Ot},topRight:{points:["br","tr"],overflow:Ot},bottomLeft:{points:["tl","bl"],overflow:Ot},bottomRight:{points:["tr","br"],overflow:Ot},leftTop:{points:["tr","tl"],overflow:Ot},leftBottom:{points:["br","bl"],overflow:Ot},rightTop:{points:["tl","tr"],overflow:Ot},rightBottom:{points:["bl","br"],overflow:Ot}},cr={topLeft:{points:["bl","tl"],overflow:Ot},topRight:{points:["br","tr"],overflow:Ot},bottomLeft:{points:["tl","bl"],overflow:Ot},bottomRight:{points:["tr","br"],overflow:Ot},rightTop:{points:["tr","tl"],overflow:Ot},rightBottom:{points:["br","bl"],overflow:Ot},leftTop:{points:["tl","tr"],overflow:Ot},leftBottom:{points:["bl","br"],overflow:Ot}},sr=null;function Kt(st,at,bt){if(at)return at;if(bt)return bt[st]||bt.other}var $t={horizontal:"bottomLeft",vertical:"rightTop","vertical-left":"rightTop","vertical-right":"leftTop"};function mr(st){var at=st.prefixCls,bt=st.visible,Dt=st.children,vt=st.popup,Ut=st.popupStyle,wt=st.popupClassName,Zt=st.popupOffset,tr=st.disabled,Qt=st.mode,Tr=st.onVisibleChange,gr=b.useContext(Z),Fr=gr.getPopupContainer,nr=gr.rtl,lr=gr.subMenuOpenDelay,Zr=gr.subMenuCloseDelay,qr=gr.builtinPlacements,rn=gr.triggerSubMenuAction,Yr=gr.forceSubMenuRender,kr=gr.rootClassName,Mr=gr.motion,Or=gr.defaultMotions,Wr=b.useState(!1),pn=(0,O.Z)(Wr,2),Qr=pn[0],ir=pn[1],Xe=nr?(0,Se.Z)((0,Se.Z)({},cr),qr):(0,Se.Z)((0,Se.Z)({},zt),qr),Wt=$t[Qt],Jt=Kt(Qt,Mr,Or),yr=b.useRef(Jt);Qt!=="inline"&&(yr.current=Jt);var Sn=(0,Se.Z)((0,Se.Z)({},yr.current),{},{leavedClassName:"".concat(at,"-hidden"),removeOnLeave:!1,motionAppear:!0}),vn=b.useRef();return b.useEffect(function(){return vn.current=(0,Le.Z)(function(){ir(bt)}),function(){Le.Z.cancel(vn.current)}},[bt]),b.createElement(Ce.Z,{prefixCls:at,popupClassName:ie()("".concat(at,"-popup"),(0,ae.Z)({},"".concat(at,"-rtl"),nr),wt,kr),stretch:Qt==="horizontal"?"minWidth":null,getPopupContainer:Fr,builtinPlacements:Xe,popupPlacement:Wt,popupVisible:Qr,popup:vt,popupStyle:Ut,popupAlign:Zt&&{offset:Zt},action:tr?[]:[rn],mouseEnterDelay:lr,mouseLeaveDelay:Zr,onPopupVisibleChange:Tr,forceRender:Yr,popupMotion:Sn,fresh:!0},Dt)}var Vr=w(77900);function Ur(st){var at=st.id,bt=st.open,Dt=st.keyPath,vt=st.children,Ut="inline",wt=b.useContext(Z),Zt=wt.prefixCls,tr=wt.forceSubMenuRender,Qt=wt.motion,Tr=wt.defaultMotions,gr=wt.mode,Fr=b.useRef(!1);Fr.current=gr===Ut;var nr=b.useState(!Fr.current),lr=(0,O.Z)(nr,2),Zr=lr[0],qr=lr[1],rn=Fr.current?bt:!1;b.useEffect(function(){Fr.current&&qr(!1)},[gr]);var Yr=(0,Se.Z)({},Kt(Ut,Qt,Tr));Dt.length>1&&(Yr.motionAppear=!1);var kr=Yr.onVisibleChanged;return Yr.onVisibleChanged=function(Mr){return!Fr.current&&!Mr&&qr(!0),kr==null?void 0:kr(Mr)},Zr?null:b.createElement(M,{mode:Ut,locked:!Fr.current},b.createElement(Vr.default,(0,$.Z)({visible:rn},Yr,{forceRender:tr,removeOnLeave:!1,leavedClassName:"".concat(Zt,"-hidden")}),function(Mr){var Or=Mr.className,Wr=Mr.style;return b.createElement(Ge,{id:at,className:Or,style:Wr},vt)}))}var jr=["style","className","title","eventKey","warnKey","disabled","internalPopupClose","children","itemIcon","expandIcon","popupClassName","popupOffset","popupStyle","onClick","onMouseEnter","onMouseLeave","onTitleClick","onTitleMouseEnter","onTitleMouseLeave"],Vt=["active"],or=function(at){var bt,Dt=at.style,vt=at.className,Ut=at.title,wt=at.eventKey,Zt=at.warnKey,tr=at.disabled,Qt=at.internalPopupClose,Tr=at.children,gr=at.itemIcon,Fr=at.expandIcon,nr=at.popupClassName,lr=at.popupOffset,Zr=at.popupStyle,qr=at.onClick,rn=at.onMouseEnter,Yr=at.onMouseLeave,kr=at.onTitleClick,Mr=at.onTitleMouseEnter,Or=at.onTitleMouseLeave,Wr=(0,m.Z)(at,jr),pn=q(wt),Qr=b.useContext(Z),ir=Qr.prefixCls,Xe=Qr.mode,Wt=Qr.openKeys,Jt=Qr.disabled,yr=Qr.overflowDisabled,Sn=Qr.activeKey,vn=Qr.selectedKeys,In=Qr.itemIcon,Sr=Qr.expandIcon,wn=Qr.onItemClick,Rn=Qr.onOpenChange,hn=Qr.onActive,ai=b.useContext(j),oi=ai._internalRenderSubMenuItem,qn=b.useContext(ve),Vn=qn.isSubPathKey,rr=pe(),Tn="".concat(ir,"-submenu"),nn=Jt||tr,Pn=b.useRef(),li=b.useRef(),Mn=gr!=null?gr:In,_n=Fr!=null?Fr:Sr,Un=Wt.includes(wt),sn=!yr&&Un,ni=Vn(vn,wt),pr=nt(wt,nn,Mr,Or),ii=pr.active,ri=(0,m.Z)(pr,Vt),Zn=b.useState(!1),Hr=(0,O.Z)(Zn,2),ui=Hr[0],Ti=Hr[1],vi=function($n){nn||Ti($n)},Ar=function($n){vi(!0),rn==null||rn({key:wt,domEvent:$n})},_i=function($n){vi(!1),Yr==null||Yr({key:wt,domEvent:$n})},Ri=b.useMemo(function(){return ii||(Xe!=="inline"?ui||Vn([Sn],wt):!1)},[Xe,ii,Sn,ui,wt,Vn]),Gt=mt(rr.length),Hn=function($n){nn||(kr==null||kr({key:wt,domEvent:$n}),Xe==="inline"&&Rn(wt,!Un))},ci=Oe(function(Wn){qr==null||qr(T(Wn)),wn(Wn)}),hi=function($n){Xe!=="inline"&&Rn(wt,$n)},An=function(){hn(wt)},yn=pn&&"".concat(pn,"-popup"),Xr=b.createElement("div",(0,$.Z)({role:"menuitem",style:Gt,className:"".concat(Tn,"-title"),tabIndex:nn?null:-1,ref:Pn,title:typeof Ut=="string"?Ut:null,"data-menu-id":yr&&pn?null:pn,"aria-expanded":sn,"aria-haspopup":!0,"aria-controls":yn,"aria-disabled":nn,onClick:Hn,onFocus:An},ri),Ut,b.createElement(gt,{icon:Xe!=="horizontal"?_n:void 0,props:(0,Se.Z)((0,Se.Z)({},at),{},{isOpen:sn,isSubMenu:!0})},b.createElement("i",{className:"".concat(Tn,"-arrow")}))),Cn=b.useRef(Xe);if(Xe!=="inline"&&rr.length>1?Cn.current="vertical":Cn.current=Xe,!yr){var Jn=Cn.current;Xr=b.createElement(mr,{mode:Jn,prefixCls:Tn,visible:!Qt&&sn&&Xe!=="inline",popupClassName:nr,popupOffset:lr,popupStyle:Zr,popup:b.createElement(M,{mode:Jn==="horizontal"?"vertical":Jn},b.createElement(Ge,{id:yn,ref:li},Tr)),disabled:nn,onVisibleChange:hi},Xr)}var ei=b.createElement(o.Z.Item,(0,$.Z)({role:"none"},Wr,{component:"li",style:Dt,className:ie()(Tn,"".concat(Tn,"-").concat(Xe),vt,(bt={},(0,ae.Z)(bt,"".concat(Tn,"-open"),sn),(0,ae.Z)(bt,"".concat(Tn,"-active"),Ri),(0,ae.Z)(bt,"".concat(Tn,"-selected"),ni),(0,ae.Z)(bt,"".concat(Tn,"-disabled"),nn),bt)),onMouseEnter:Ar,onMouseLeave:_i}),Xr,!yr&&b.createElement(Ur,{id:yn,open:sn,keyPath:rr},Tr));return oi&&(ei=oi(ei,at,{selected:ni,active:Ri,open:sn,disabled:nn})),b.createElement(M,{onItemClick:ci,mode:Xe==="horizontal"?"vertical":Xe,itemIcon:Mn,expandIcon:_n},ei)};function Ir(st){var at=st.eventKey,bt=st.children,Dt=pe(at),vt=Ct(bt,Dt),Ut=J();b.useEffect(function(){if(Ut)return Ut.registerPath(at,Dt),function(){Ut.unregisterPath(at,Dt)}},[Dt]);var wt;return Ut?wt=vt:wt=b.createElement(or,st,vt),b.createElement(ye.Provider,{value:Dt},wt)}var Kr=w(62853),Lr=["className","title","eventKey","children"],ln=["children"],Pr=function(at){var bt=at.className,Dt=at.title,vt=at.eventKey,Ut=at.children,wt=(0,m.Z)(at,Lr),Zt=b.useContext(Z),tr=Zt.prefixCls,Qt="".concat(tr,"-item-group");return b.createElement("li",(0,$.Z)({role:"presentation"},wt,{onClick:function(gr){return gr.stopPropagation()},className:ie()(Qt,bt)}),b.createElement("div",{role:"presentation",className:"".concat(Qt,"-title"),title:typeof Dt=="string"?Dt:void 0},Dt),b.createElement("ul",{role:"group",className:"".concat(Qt,"-list")},Ut))};function Fn(st){var at=st.children,bt=(0,m.Z)(st,ln),Dt=pe(bt.eventKey),vt=Ct(at,Dt),Ut=J();return Ut?vt:b.createElement(Pr,(0,Ze.Z)(bt,["warnKey"]),vt)}function un(st){var at=st.className,bt=st.style,Dt=b.useContext(Z),vt=Dt.prefixCls,Ut=J();return Ut?null:b.createElement("li",{role:"separator",className:ie()("".concat(vt,"-item-divider"),at),style:bt})}var zr=["label","children","key","type"];function qt(st){return(st||[]).map(function(at,bt){if(at&&(0,Kr.Z)(at)==="object"){var Dt=at,vt=Dt.label,Ut=Dt.children,wt=Dt.key,Zt=Dt.type,tr=(0,m.Z)(Dt,zr),Qt=wt!=null?wt:"tmp-".concat(bt);return Ut||Zt==="group"?Zt==="group"?b.createElement(Fn,(0,$.Z)({key:Qt},tr,{title:vt}),qt(Ut)):b.createElement(Ir,(0,$.Z)({key:Qt},tr,{title:vt}),qt(Ut)):Zt==="divider"?b.createElement(un,(0,$.Z)({key:Qt},tr)):b.createElement(qe,(0,$.Z)({key:Qt},tr),vt)}return null}).filter(function(at){return at})}function Xt(st,at,bt){var Dt=st;return at&&(Dt=qt(at)),Ct(Dt,bt)}var wr=["prefixCls","rootClassName","style","className","tabIndex","items","children","direction","id","mode","inlineCollapsed","disabled","disabledOverflow","subMenuOpenDelay","subMenuCloseDelay","forceSubMenuRender","defaultOpenKeys","openKeys","activeKey","defaultActiveFirst","selectable","multiple","defaultSelectedKeys","selectedKeys","onSelect","onDeselect","inlineIndent","motion","defaultMotions","triggerSubMenuAction","builtinPlacements","itemIcon","expandIcon","overflowedIndicator","overflowedIndicatorPopupClassName","getPopupContainer","onClick","onOpenChange","onKeyDown","openAnimation","openTransitionName","_internalRenderMenuItem","_internalRenderSubMenuItem"],Er=[],_r=b.forwardRef(function(st,at){var bt,Dt,vt=st,Ut=vt.prefixCls,wt=Ut===void 0?"rc-menu":Ut,Zt=vt.rootClassName,tr=vt.style,Qt=vt.className,Tr=vt.tabIndex,gr=Tr===void 0?0:Tr,Fr=vt.items,nr=vt.children,lr=vt.direction,Zr=vt.id,qr=vt.mode,rn=qr===void 0?"vertical":qr,Yr=vt.inlineCollapsed,kr=vt.disabled,Mr=vt.disabledOverflow,Or=vt.subMenuOpenDelay,Wr=Or===void 0?.1:Or,pn=vt.subMenuCloseDelay,Qr=pn===void 0?.1:pn,ir=vt.forceSubMenuRender,Xe=vt.defaultOpenKeys,Wt=vt.openKeys,Jt=vt.activeKey,yr=vt.defaultActiveFirst,Sn=vt.selectable,vn=Sn===void 0?!0:Sn,In=vt.multiple,Sr=In===void 0?!1:In,wn=vt.defaultSelectedKeys,Rn=vt.selectedKeys,hn=vt.onSelect,ai=vt.onDeselect,oi=vt.inlineIndent,qn=oi===void 0?24:oi,Vn=vt.motion,rr=vt.defaultMotions,Tn=vt.triggerSubMenuAction,nn=Tn===void 0?"hover":Tn,Pn=vt.builtinPlacements,li=vt.itemIcon,Mn=vt.expandIcon,_n=vt.overflowedIndicator,Un=_n===void 0?"...":_n,sn=vt.overflowedIndicatorPopupClassName,ni=vt.getPopupContainer,pr=vt.onClick,ii=vt.onOpenChange,ri=vt.onKeyDown,Zn=vt.openAnimation,Hr=vt.openTransitionName,ui=vt._internalRenderMenuItem,Ti=vt._internalRenderSubMenuItem,vi=(0,m.Z)(vt,wr),Ar=b.useMemo(function(){return Xt(nr,Fr,Er)},[nr,Fr]),_i=b.useState(!1),Ri=(0,O.Z)(_i,2),Gt=Ri[0],Hn=Ri[1],ci=b.useRef(),hi=Je(Zr),An=lr==="rtl",yn=(0,Q.Z)(Xe,{value:Wt,postState:function(cn){return cn||Er}}),Xr=(0,O.Z)(yn,2),Cn=Xr[0],Jn=Xr[1],ei=function(cn){var on=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;function Qn(){Jn(cn),ii==null||ii(cn)}on?(0,S.flushSync)(Qn):Qn()},Wn=b.useState(Cn),$n=(0,O.Z)(Wn,2),Jr=$n[0],jn=$n[1],Li=b.useRef(!1),Oi=b.useMemo(function(){return(rn==="inline"||rn==="vertical")&&Yr?["vertical",Yr]:[rn,!1]},[rn,Yr]),Pi=(0,O.Z)(Oi,2),Ai=Pi[0],ar=Pi[1],fr=Ai==="inline",bn=b.useState(Ai),Ln=(0,O.Z)(bn,2),an=Ln[0],di=Ln[1],Ci=b.useState(ar),ji=(0,O.Z)(Ci,2),yi=ji[0],ss=ji[1];b.useEffect(function(){di(Ai),ss(ar),Li.current&&(fr?Jn(Jr):ei(Er))},[Ai,ar]);var Gs=b.useState(0),as=(0,O.Z)(Gs,2),os=as[0],bi=as[1],xi=os>=Ar.length-1||an!=="horizontal"||Mr;b.useEffect(function(){fr&&jn(Cn)},[Cn]),b.useEffect(function(){return Li.current=!0,function(){Li.current=!1}},[]);var Ei=Ie(),ls=Ei.registerPath,qi=Ei.unregisterPath,us=Ei.refreshOverflowKeys,Qi=Ei.isSubPathKey,oa=Ei.getKeyPath,Ji=Ei.getKeys,Hs=Ei.getSubPathKeys,Cs=b.useMemo(function(){return{registerPath:ls,unregisterPath:qi}},[ls,qi]),fi=b.useMemo(function(){return{isSubPathKey:Qi}},[Qi]);b.useEffect(function(){us(xi?Er:Ar.slice(os+1).map(function(dn){return dn.key}))},[os,xi]);var js=(0,Q.Z)(Jt||yr&&((bt=Ar[0])===null||bt===void 0?void 0:bt.key),{value:Jt}),cs=(0,O.Z)(js,2),Ki=cs[0],hs=cs[1],la=Oe(function(dn){hs(dn)}),Ks=Oe(function(){hs(void 0)});(0,b.useImperativeHandle)(at,function(){return{list:ci.current,focus:function(cn){var on,Qn=Ji(),zn=se(Qn,hi),Rt=zn.elements,es=zn.key2element,Rs=zn.element2key,Ls=fe(ci.current,Rt),ks=Ki!=null?Ki:Ls[0]?Rs.get(Ls[0]):(on=Ar.find(function(Zs){return!Zs.props.disabled}))===null||on===void 0?void 0:on.key,Bi=es.get(ks);if(ks&&Bi){var Vi;Bi==null||(Vi=Bi.focus)===null||Vi===void 0||Vi.call(Bi,cn)}}}});var Ws=(0,Q.Z)(wn||[],{value:Rn,postState:function(cn){return Array.isArray(cn)?cn:cn==null?Er:[cn]}}),Ds=(0,O.Z)(Ws,2),pi=Ds[0],ds=Ds[1],Vs=function(cn){if(vn){var on=cn.key,Qn=pi.includes(on),zn;Sr?Qn?zn=pi.filter(function(es){return es!==on}):zn=[].concat((0,_e.Z)(pi),[on]):zn=[on],ds(zn);var Rt=(0,Se.Z)((0,Se.Z)({},cn),{},{selectedKeys:zn});Qn?ai==null||ai(Rt):hn==null||hn(Rt)}!Sr&&Cn.length&&an!=="inline"&&ei(Er)},fs=Oe(function(dn){pr==null||pr(T(dn)),Vs(dn)}),ps=Oe(function(dn,cn){var on=Cn.filter(function(zn){return zn!==dn});if(cn)on.push(dn);else if(an!=="inline"){var Qn=Hs(dn);on=on.filter(function(zn){return!Qn.has(zn)})}(0,U.Z)(Cn,on,!0)||ei(on,!0)}),ms=function(cn,on){var Qn=on!=null?on:!Cn.includes(cn);ps(cn,Qn)},gs=Me(an,Ki,An,hi,ci,Ji,oa,hs,ms,ri);b.useEffect(function(){Hn(!0)},[]);var Wi=b.useMemo(function(){return{_internalRenderMenuItem:ui,_internalRenderSubMenuItem:Ti}},[ui,Ti]),Mi=an!=="horizontal"||Mr?Ar:Ar.map(function(dn,cn){return b.createElement(M,{key:dn.key,overflowDisabled:cn>os},dn)}),Is=b.createElement(o.Z,(0,$.Z)({id:Zr,ref:ci,prefixCls:"".concat(wt,"-overflow"),component:"ul",itemComponent:qe,className:ie()(wt,"".concat(wt,"-root"),"".concat(wt,"-").concat(an),Qt,(Dt={},(0,ae.Z)(Dt,"".concat(wt,"-inline-collapsed"),yi),(0,ae.Z)(Dt,"".concat(wt,"-rtl"),An),Dt),Zt),dir:lr,style:tr,role:"menu",tabIndex:gr,data:Mi,renderRawItem:function(cn){return cn},renderRawRest:function(cn){var on=cn.length,Qn=on?Ar.slice(-on):null;return b.createElement(Ir,{eventKey:we,title:Un,disabled:xi,internalPopupClose:on===0,popupClassName:sn},Qn)},maxCount:an!=="horizontal"||Mr?o.Z.INVALIDATE:o.Z.RESPONSIVE,ssr:"full","data-menu-list":!0,onVisibleChange:function(cn){bi(cn)},onKeyDown:gs},vi));return b.createElement(j.Provider,{value:Wi},b.createElement(D.Provider,{value:hi},b.createElement(M,{prefixCls:wt,rootClassName:Zt,mode:an,openKeys:Cn,rtl:An,disabled:kr,motion:Gt?Vn:null,defaultMotions:Gt?rr:null,activeKey:Ki,onActive:la,onInactive:Ks,selectedKeys:pi,inlineIndent:qn,subMenuOpenDelay:Wr,subMenuCloseDelay:Qr,forceSubMenuRender:ir,builtinPlacements:Pn,triggerSubMenuAction:nn,getPopupContainer:ni,itemIcon:li,expandIcon:Mn,onItemClick:fs,onOpenChange:ps},b.createElement(ve.Provider,{value:fi},Is),b.createElement("div",{style:{display:"none"},"aria-hidden":!0},b.createElement(oe.Provider,{value:Cs},Ar)))))}),On=_r,Gr=On;Gr.Item=qe,Gr.SubMenu=Ir,Gr.ItemGroup=Fn,Gr.Divider=un;var hr=Gr},11780:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return G}});var $=w(72308),ae=w(77321),Se=w(52487),_e=w(74416),O=w(59301),m=w(92310),de=w.n(m),ie=w(29301),o=w(34280),Q=["prefixCls","invalidate","item","renderItem","responsive","responsiveDisabled","registerSize","itemKey","className","style","children","display","order","component"],U=void 0;function E(v,y){var N=v.prefixCls,te=v.invalidate,Le=v.item,Fe=v.renderItem,Ue=v.responsive,Ye=v.responsiveDisabled,ut=v.registerSize,ot=v.itemKey,lt=v.className,St=v.style,Lt=v.children,_t=v.display,At=v.order,Pt=v.component,kt=Pt===void 0?"div":Pt,fe=(0,_e.Z)(v,Q),he=Ue&&!_t;function se(xe){ut(ot,xe)}O.useEffect(function(){return function(){se(null)}},[]);var Me=Fe&&Le!==U?Fe(Le,{index:At}):Lt,$e;te||($e={opacity:he?0:1,height:he?0:U,overflowY:he?"hidden":U,order:Ue?At:U,pointerEvents:he?"none":U,position:he?"absolute":U});var F={};he&&(F["aria-hidden"]=!0);var le=O.createElement(kt,(0,$.Z)({className:de()(!te&&N,lt),style:(0,ae.Z)((0,ae.Z)({},$e),St)},F,fe,{ref:y}),Me);return Ue&&(le=O.createElement(ie.Z,{onResize:function(we){var Ie=we.offsetWidth;se(Ie)},disabled:Ye},le)),le}var b=O.forwardRef(E);b.displayName="Item";var S=b,D=w(6089),V=w(4676),q=w(16089);function B(v){if(typeof MessageChannel=="undefined")(0,q.Z)(v);else{var y=new MessageChannel;y.port1.onmessage=function(){return v()},y.port2.postMessage(void 0)}}function R(){var v=O.useRef(null),y=function(te){v.current||(v.current=[],B(function(){(0,V.unstable_batchedUpdates)(function(){v.current.forEach(function(Le){Le()}),v.current=null})})),v.current.push(te)};return y}function Z(v,y){var N=O.useState(y),te=(0,Se.Z)(N,2),Le=te[0],Fe=te[1],Ue=(0,D.Z)(function(Ye){v(function(){Fe(Ye)})});return[Le,Ue]}var ue=O.createContext(null),M=["component"],Y=["className"],oe=["className"],J=function(y,N){var te=O.useContext(ue);if(!te){var Le=y.component,Fe=Le===void 0?"div":Le,Ue=(0,_e.Z)(y,M);return O.createElement(Fe,(0,$.Z)({},Ue,{ref:N}))}var Ye=te.className,ut=(0,_e.Z)(te,Y),ot=y.className,lt=(0,_e.Z)(y,oe);return O.createElement(ue.Provider,{value:null},O.createElement(S,(0,$.Z)({ref:N,className:de()(Ye,ot)},ut,lt)))},ye=O.forwardRef(J);ye.displayName="RawItem";var pe=ye,ve=["prefixCls","data","renderItem","renderRawItem","itemKey","itemWidth","ssr","style","className","maxCount","renderRest","renderRawRest","suffix","component","itemComponent","onVisibleChange"],Ae="responsive",j="invalidate";function P(v){return"+ ".concat(v.length," ...")}function K(v,y){var N=v.prefixCls,te=N===void 0?"rc-overflow":N,Le=v.data,Fe=Le===void 0?[]:Le,Ue=v.renderItem,Ye=v.renderRawItem,ut=v.itemKey,ot=v.itemWidth,lt=ot===void 0?10:ot,St=v.ssr,Lt=v.style,_t=v.className,At=v.maxCount,Pt=v.renderRest,kt=v.renderRawRest,fe=v.suffix,he=v.component,se=he===void 0?"div":he,Me=v.itemComponent,$e=v.onVisibleChange,F=(0,_e.Z)(v,ve),le=St==="full",xe=R(),we=Z(xe,null),Ie=(0,Se.Z)(we,2),Oe=Ie[0],Qe=Ie[1],it=Oe||0,Je=Z(xe,new Map),Ke=(0,Se.Z)(Je,2),yt=Ke[0],De=Ke[1],Pe=Z(xe,0),Ze=(0,Se.Z)(Pe,2),Ve=Ze[0],nt=Ze[1],mt=Z(xe,0),gt=(0,Se.Z)(mt,2),x=gt[0],T=gt[1],et=Z(xe,0),W=(0,Se.Z)(et,2),Ee=W[0],Bt=W[1],Be=(0,O.useState)(null),ze=(0,Se.Z)(Be,2),qe=ze[0],ee=ze[1],be=(0,O.useState)(null),me=(0,Se.Z)(be,2),Ge=me[0],X=me[1],Ct=O.useMemo(function(){return Ge===null&&le?Number.MAX_SAFE_INTEGER:Ge||0},[Ge,Oe]),Ce=(0,O.useState)(!1),Ot=(0,Se.Z)(Ce,2),zt=Ot[0],cr=Ot[1],sr="".concat(te,"-item"),Kt=Math.max(Ve,x),$t=At===Ae,mr=Fe.length&&$t,Vr=At===j,Ur=mr||typeof At=="number"&&Fe.length>At,jr=(0,O.useMemo)(function(){var hr=Fe;return mr?Oe===null&&le?hr=Fe:hr=Fe.slice(0,Math.min(Fe.length,it/lt)):typeof At=="number"&&(hr=Fe.slice(0,At)),hr},[Fe,lt,Oe,At,mr]),Vt=(0,O.useMemo)(function(){return mr?Fe.slice(Ct+1):Fe.slice(jr.length)},[Fe,jr,mr,Ct]),or=(0,O.useCallback)(function(hr,st){var at;return typeof ut=="function"?ut(hr):(at=ut&&(hr==null?void 0:hr[ut]))!==null&&at!==void 0?at:st},[ut]),Ir=(0,O.useCallback)(Ue||function(hr){return hr},[Ue]);function Kr(hr,st,at){Ge===hr&&(st===void 0||st===qe)||(X(hr),at||(cr(hr<Fe.length-1),$e==null||$e(hr)),st!==void 0&&ee(st))}function Lr(hr,st){Qe(st.clientWidth)}function ln(hr,st){De(function(at){var bt=new Map(at);return st===null?bt.delete(hr):bt.set(hr,st),bt})}function Pr(hr,st){T(st),nt(x)}function Fn(hr,st){Bt(st)}function un(hr){return yt.get(or(jr[hr],hr))}(0,o.Z)(function(){if(it&&typeof Kt=="number"&&jr){var hr=Ee,st=jr.length,at=st-1;if(!st){Kr(0,null);return}for(var bt=0;bt<st;bt+=1){var Dt=un(bt);if(le&&(Dt=Dt||0),Dt===void 0){Kr(bt-1,void 0,!0);break}if(hr+=Dt,at===0&&hr<=it||bt===at-1&&hr+un(at)<=it){Kr(at,null);break}else if(hr+Kt>it){Kr(bt-1,hr-Dt-Ee+x);break}}fe&&un(0)+Ee>it&&ee(null)}},[it,yt,x,Ee,or,jr]);var zr=zt&&!!Vt.length,qt={};qe!==null&&mr&&(qt={position:"absolute",left:qe,top:0});var Xt={prefixCls:sr,responsive:mr,component:Me,invalidate:Vr},wr=Ye?function(hr,st){var at=or(hr,st);return O.createElement(ue.Provider,{key:at,value:(0,ae.Z)((0,ae.Z)({},Xt),{},{order:st,item:hr,itemKey:at,registerSize:ln,display:st<=Ct})},Ye(hr,st))}:function(hr,st){var at=or(hr,st);return O.createElement(S,(0,$.Z)({},Xt,{order:st,key:at,item:hr,renderItem:Ir,itemKey:at,registerSize:ln,display:st<=Ct}))},Er={order:zr?Ct:Number.MAX_SAFE_INTEGER,className:"".concat(sr,"-rest"),registerSize:Pr,display:zr},_r=Pt||P,On=kt?O.createElement(ue.Provider,{value:(0,ae.Z)((0,ae.Z)({},Xt),Er)},kt(Vt)):O.createElement(S,(0,$.Z)({},Xt,Er),typeof _r=="function"?_r(Vt):_r),Gr=O.createElement(se,(0,$.Z)({className:de()(!Vr&&te,_t),style:Lt,ref:y},F),jr.map(wr),Ur?On:null,fe&&O.createElement(S,(0,$.Z)({},Xt,{responsive:$t,responsiveDisabled:!mr,order:Ct,className:"".concat(sr,"-suffix"),registerSize:Fn,display:!0,style:qt}),fe));return $t?O.createElement(ie.Z,{onResize:Lr,disabled:!mr},Gr):Gr}var k=O.forwardRef(K);k.displayName="Overflow",k.Item=pe,k.RESPONSIVE=Ae,k.INVALIDATE=j;var ne=k,G=ne},29301:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return j}});var $=w(72308),ae=w(59301),Se=w(11592),_e=w(48736),O=w(77321),m=w(62853),de=w(76846),ie=w(8654),o=ae.createContext(null);function Q(P){var K=P.children,k=P.onBatchResize,ne=ae.useRef(0),G=ae.useRef([]),v=ae.useContext(o),y=ae.useCallback(function(N,te,Le){ne.current+=1;var Fe=ne.current;G.current.push({size:N,element:te,data:Le}),Promise.resolve().then(function(){Fe===ne.current&&(k==null||k(G.current),G.current=[])}),v==null||v(N,te,Le)},[k,v]);return ae.createElement(o.Provider,{value:y},K)}var U=w(76374),E=new Map;function b(P){P.forEach(function(K){var k,ne=K.target;(k=E.get(ne))===null||k===void 0||k.forEach(function(G){return G(ne)})})}var S=new U.Z(b),D=null,V=null;function q(P,K){E.has(P)||(E.set(P,new Set),S.observe(P)),E.get(P).add(K)}function B(P,K){E.has(P)&&(E.get(P).delete(K),E.get(P).size||(S.unobserve(P),E.delete(P)))}var R=w(96949),Z=w(55090),ue=w(77205),M=w(38793),Y=function(P){(0,ue.Z)(k,P);var K=(0,M.Z)(k);function k(){return(0,R.Z)(this,k),K.apply(this,arguments)}return(0,Z.Z)(k,[{key:"render",value:function(){return this.props.children}}]),k}(ae.Component);function oe(P,K){var k=P.children,ne=P.disabled,G=ae.useRef(null),v=ae.useRef(null),y=ae.useContext(o),N=typeof k=="function",te=N?k(G):k,Le=ae.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),Fe=!N&&ae.isValidElement(te)&&(0,ie.Yr)(te),Ue=Fe?(0,ie.C4)(te):null,Ye=(0,ie.x1)(Ue,G),ut=function(){var Lt;return(0,de.ZP)(G.current)||(G.current&&(0,m.Z)(G.current)==="object"?(0,de.ZP)((Lt=G.current)===null||Lt===void 0?void 0:Lt.nativeElement):null)||(0,de.ZP)(v.current)};ae.useImperativeHandle(K,function(){return ut()});var ot=ae.useRef(P);ot.current=P;var lt=ae.useCallback(function(St){var Lt=ot.current,_t=Lt.onResize,At=Lt.data,Pt=St.getBoundingClientRect(),kt=Pt.width,fe=Pt.height,he=St.offsetWidth,se=St.offsetHeight,Me=Math.floor(kt),$e=Math.floor(fe);if(Le.current.width!==Me||Le.current.height!==$e||Le.current.offsetWidth!==he||Le.current.offsetHeight!==se){var F={width:Me,height:$e,offsetWidth:he,offsetHeight:se};Le.current=F;var le=he===Math.round(kt)?kt:he,xe=se===Math.round(fe)?fe:se,we=(0,O.Z)((0,O.Z)({},F),{},{offsetWidth:le,offsetHeight:xe});y==null||y(we,St,At),_t&&Promise.resolve().then(function(){_t(we,St)})}},[]);return ae.useEffect(function(){var St=ut();return St&&!ne&&q(St,lt),function(){return B(St,lt)}},[G.current,ne]),ae.createElement(Y,{ref:v},Fe?ae.cloneElement(te,{ref:Ye}):te)}var J=ae.forwardRef(oe),ye=J,pe="rc-observer-key";function ve(P,K){var k=P.children,ne=typeof k=="function"?[k]:(0,Se.Z)(k);return ne.map(function(G,v){var y=(G==null?void 0:G.key)||"".concat(pe,"-").concat(v);return ae.createElement(ye,(0,$.Z)({},P,{key:y,ref:v===0?K:void 0}),G)})}var Ae=ae.forwardRef(ve);Ae.Collection=Q;var j=Ae},9296:function(Nt,rt,w){"use strict";w.r(rt),w.d(rt,{ResizableTextArea:function(){return ve},default:function(){return ne}});var $=w(72308),ae=w(77321),Se=w(49618),_e=w(62853),O=w(52487),m=w(74416),de=w(80702),ie=w(92310),o=w.n(ie),Q=w(93681),U=w(5643),E=w(18929),b=w(59301),S=w(29301),D=w(34280),V=w(16089),q=`
|
|
min-height:0 !important;
|
|
max-height:none !important;
|
|
height:0 !important;
|
|
visibility:hidden !important;
|
|
overflow:hidden !important;
|
|
position:absolute !important;
|
|
z-index:-1000 !important;
|
|
top:0 !important;
|
|
right:0 !important;
|
|
pointer-events: none !important;
|
|
`,B=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],R={},Z;function ue(G){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,y=G.getAttribute("id")||G.getAttribute("data-reactid")||G.getAttribute("name");if(v&&R[y])return R[y];var N=window.getComputedStyle(G),te=N.getPropertyValue("box-sizing")||N.getPropertyValue("-moz-box-sizing")||N.getPropertyValue("-webkit-box-sizing"),Le=parseFloat(N.getPropertyValue("padding-bottom"))+parseFloat(N.getPropertyValue("padding-top")),Fe=parseFloat(N.getPropertyValue("border-bottom-width"))+parseFloat(N.getPropertyValue("border-top-width")),Ue=B.map(function(ut){return"".concat(ut,":").concat(N.getPropertyValue(ut))}).join(";"),Ye={sizingStyle:Ue,paddingSize:Le,borderSize:Fe,boxSizing:te};return v&&y&&(R[y]=Ye),Ye}function M(G){var v=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,y=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,N=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;Z||(Z=document.createElement("textarea"),Z.setAttribute("tab-index","-1"),Z.setAttribute("aria-hidden","true"),document.body.appendChild(Z)),G.getAttribute("wrap")?Z.setAttribute("wrap",G.getAttribute("wrap")):Z.removeAttribute("wrap");var te=ue(G,v),Le=te.paddingSize,Fe=te.borderSize,Ue=te.boxSizing,Ye=te.sizingStyle;Z.setAttribute("style","".concat(Ye,";").concat(q)),Z.value=G.value||G.placeholder||"";var ut=void 0,ot=void 0,lt,St=Z.scrollHeight;if(Ue==="border-box"?St+=Fe:Ue==="content-box"&&(St-=Le),y!==null||N!==null){Z.value=" ";var Lt=Z.scrollHeight-Le;y!==null&&(ut=Lt*y,Ue==="border-box"&&(ut=ut+Le+Fe),St=Math.max(ut,St)),N!==null&&(ot=Lt*N,Ue==="border-box"&&(ot=ot+Le+Fe),lt=St>ot?"":"hidden",St=Math.min(ot,St))}var _t={height:St,overflowY:lt,resize:"none"};return ut&&(_t.minHeight=ut),ot&&(_t.maxHeight=ot),_t}var Y=["prefixCls","onPressEnter","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],oe=0,J=1,ye=2,pe=b.forwardRef(function(G,v){var y=G,N=y.prefixCls,te=y.onPressEnter,Le=y.defaultValue,Fe=y.value,Ue=y.autoSize,Ye=y.onResize,ut=y.className,ot=y.style,lt=y.disabled,St=y.onChange,Lt=y.onInternalAutoSize,_t=(0,m.Z)(y,Y),At=(0,E.Z)(Le,{value:Fe,postState:function(T){return T!=null?T:""}}),Pt=(0,O.Z)(At,2),kt=Pt[0],fe=Pt[1],he=function(T){fe(T.target.value),St==null||St(T)},se=b.useRef();b.useImperativeHandle(v,function(){return{textArea:se.current}});var Me=b.useMemo(function(){return Ue&&(0,_e.Z)(Ue)==="object"?[Ue.minRows,Ue.maxRows]:[]},[Ue]),$e=(0,O.Z)(Me,2),F=$e[0],le=$e[1],xe=!!Ue,we=function(){try{if(document.activeElement===se.current){var T=se.current,et=T.selectionStart,W=T.selectionEnd,Ee=T.scrollTop;se.current.setSelectionRange(et,W),se.current.scrollTop=Ee}}catch(Bt){}},Ie=b.useState(ye),Oe=(0,O.Z)(Ie,2),Qe=Oe[0],it=Oe[1],Je=b.useState(),Ke=(0,O.Z)(Je,2),yt=Ke[0],De=Ke[1],Pe=function(){it(oe)};(0,D.Z)(function(){xe&&Pe()},[Fe,F,le,xe]),(0,D.Z)(function(){if(Qe===oe)it(J);else if(Qe===J){var x=M(se.current,!1,F,le);it(ye),De(x)}else we()},[Qe]);var Ze=b.useRef(),Ve=function(){V.Z.cancel(Ze.current)},nt=function(T){Qe===ye&&(Ye==null||Ye(T),Ue&&(Ve(),Ze.current=(0,V.Z)(function(){Pe()})))};b.useEffect(function(){return Ve},[]);var mt=xe?yt:null,gt=(0,ae.Z)((0,ae.Z)({},ot),mt);return(Qe===oe||Qe===J)&&(gt.overflowY="hidden",gt.overflowX="hidden"),b.createElement(S.Z,{onResize:nt,disabled:!(Ue||Ye)},b.createElement("textarea",(0,$.Z)({},_t,{ref:se,style:gt,className:o()(N,ut,(0,Se.Z)({},"".concat(N,"-disabled"),lt)),disabled:lt,value:kt,onChange:he})))}),ve=pe,Ae=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","classes","showCount","className","style","disabled","hidden","classNames","styles","onResize"];function j(G,v){return(0,de.Z)(G||"").slice(0,v).join("")}function P(G,v,y,N){var te=y;return G?te=j(y,N):(0,de.Z)(v||"").length<y.length&&(0,de.Z)(y||"").length>N&&(te=v),te}var K=b.forwardRef(function(G,v){var y,N=G.defaultValue,te=G.value,Le=G.onFocus,Fe=G.onBlur,Ue=G.onChange,Ye=G.allowClear,ut=G.maxLength,ot=G.onCompositionStart,lt=G.onCompositionEnd,St=G.suffix,Lt=G.prefixCls,_t=Lt===void 0?"rc-textarea":Lt,At=G.classes,Pt=G.showCount,kt=G.className,fe=G.style,he=G.disabled,se=G.hidden,Me=G.classNames,$e=G.styles,F=G.onResize,le=(0,m.Z)(G,Ae),xe=(0,E.Z)(N,{value:te,defaultValue:N}),we=(0,O.Z)(xe,2),Ie=we[0],Oe=we[1],Qe=(0,b.useRef)(null),it=b.useState(!1),Je=(0,O.Z)(it,2),Ke=Je[0],yt=Je[1],De=b.useState(!1),Pe=(0,O.Z)(De,2),Ze=Pe[0],Ve=Pe[1],nt=b.useRef(),mt=b.useRef(0),gt=b.useState(null),x=(0,O.Z)(gt,2),T=x[0],et=x[1],W=function(){var Kt;(Kt=Qe.current)===null||Kt===void 0||Kt.textArea.focus()};(0,b.useImperativeHandle)(v,function(){return{resizableTextArea:Qe.current,focus:W,blur:function(){var Kt;(Kt=Qe.current)===null||Kt===void 0||Kt.textArea.blur()}}}),(0,b.useEffect)(function(){yt(function(sr){return!he&&sr})},[he]);var Ee=Number(ut)>0,Bt=function(Kt){Ve(!0),nt.current=Ie,mt.current=Kt.currentTarget.selectionStart,ot==null||ot(Kt)},Be=function(Kt){Ve(!1);var $t=Kt.currentTarget.value;if(Ee){var mr,Vr=mt.current>=ut+1||mt.current===((mr=nt.current)===null||mr===void 0?void 0:mr.length);$t=P(Vr,nt.current,$t,ut)}$t!==Ie&&(Oe($t),(0,U.rJ)(Kt.currentTarget,Kt,Ue,$t)),lt==null||lt(Kt)},ze=function(Kt){var $t=Kt.target.value;if(!Ze&&Ee){var mr=Kt.target.selectionStart>=ut+1||Kt.target.selectionStart===$t.length||!Kt.target.selectionStart;$t=P(mr,Ie,$t,ut)}Oe($t),(0,U.rJ)(Kt.currentTarget,Kt,Ue,$t)},qe=function(Kt){var $t=le.onPressEnter,mr=le.onKeyDown;Kt.key==="Enter"&&$t&&$t(Kt),mr==null||mr(Kt)},ee=function(Kt){yt(!0),Le==null||Le(Kt)},be=function(Kt){yt(!1),Fe==null||Fe(Kt)},me=function(Kt){var $t;Oe(""),W(),(0,U.rJ)(($t=Qe.current)===null||$t===void 0?void 0:$t.textArea,Kt,Ue)},Ge=(0,U.D7)(Ie);!Ze&&Ee&&te==null&&(Ge=j(Ge,ut));var X=St,Ct;if(Pt){var Ce=(0,de.Z)(Ge).length;(0,_e.Z)(Pt)==="object"?Ct=Pt.formatter({value:Ge,count:Ce,maxLength:ut}):Ct="".concat(Ce).concat(Ee?" / ".concat(ut):""),X=b.createElement(b.Fragment,null,X,b.createElement("span",{className:o()("".concat(_t,"-data-count"),Me==null?void 0:Me.count),style:$e==null?void 0:$e.count},Ct))}var Ot=function(Kt){var $t;F==null||F(Kt),($t=Qe.current)!==null&&$t!==void 0&&$t.textArea.style.height&&et(!0)},zt=!le.autoSize&&!Pt&&!Ye,cr=b.createElement(Q.BaseInput,{value:Ge,allowClear:Ye,handleReset:me,suffix:X,prefixCls:_t,classes:{affixWrapper:o()(At==null?void 0:At.affixWrapper,(y={},(0,Se.Z)(y,"".concat(_t,"-show-count"),Pt),(0,Se.Z)(y,"".concat(_t,"-textarea-allow-clear"),Ye),y))},disabled:he,focused:Ke,className:kt,style:(0,ae.Z)((0,ae.Z)({},fe),T&&!zt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Ct=="string"?Ct:void 0}},hidden:se,inputElement:b.createElement(ve,(0,$.Z)({},le,{onKeyDown:qe,onChange:ze,onFocus:ee,onBlur:be,onCompositionStart:Bt,onCompositionEnd:Be,className:Me==null?void 0:Me.textarea,style:(0,ae.Z)((0,ae.Z)({},$e==null?void 0:$e.textarea),{},{resize:fe==null?void 0:fe.resize}),disabled:he,prefixCls:_t,onResize:Ot,ref:Qe}))});return cr}),k=K,ne=k},55477:function(Nt,rt,w){"use strict";w.d(rt,{G:function(){return b},Z:function(){return q}});var $=w(72308),ae=w(77321),Se=w(74416),_e=w(35593),O=w(59301),m={shiftX:64,adjustY:1},de={adjustX:1,shiftY:!0},ie=[0,0],o={left:{points:["cr","cl"],overflow:de,offset:[-4,0],targetOffset:ie},right:{points:["cl","cr"],overflow:de,offset:[4,0],targetOffset:ie},top:{points:["bc","tc"],overflow:m,offset:[0,-4],targetOffset:ie},bottom:{points:["tc","bc"],overflow:m,offset:[0,4],targetOffset:ie},topLeft:{points:["bl","tl"],overflow:m,offset:[0,-4],targetOffset:ie},leftTop:{points:["tr","tl"],overflow:de,offset:[-4,0],targetOffset:ie},topRight:{points:["br","tr"],overflow:m,offset:[0,-4],targetOffset:ie},rightTop:{points:["tl","tr"],overflow:de,offset:[4,0],targetOffset:ie},bottomRight:{points:["tr","br"],overflow:m,offset:[0,4],targetOffset:ie},rightBottom:{points:["bl","br"],overflow:de,offset:[4,0],targetOffset:ie},bottomLeft:{points:["tl","bl"],overflow:m,offset:[0,4],targetOffset:ie},leftBottom:{points:["br","bl"],overflow:de,offset:[-4,0],targetOffset:ie}},Q=null,U=w(92310),E=w.n(U);function b(B){var R=B.children,Z=B.prefixCls,ue=B.id,M=B.overlayInnerStyle,Y=B.className,oe=B.style;return O.createElement("div",{className:E()("".concat(Z,"-content"),Y),style:oe},O.createElement("div",{className:"".concat(Z,"-inner"),id:ue,role:"tooltip",style:M},typeof R=="function"?R():R))}var S=["overlayClassName","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle","prefixCls","children","onVisibleChange","afterVisibleChange","transitionName","animation","motion","placement","align","destroyTooltipOnHide","defaultVisible","getTooltipContainer","overlayInnerStyle","arrowContent","overlay","id","showArrow"],D=function(R,Z){var ue=R.overlayClassName,M=R.trigger,Y=M===void 0?["hover"]:M,oe=R.mouseEnterDelay,J=oe===void 0?0:oe,ye=R.mouseLeaveDelay,pe=ye===void 0?.1:ye,ve=R.overlayStyle,Ae=R.prefixCls,j=Ae===void 0?"rc-tooltip":Ae,P=R.children,K=R.onVisibleChange,k=R.afterVisibleChange,ne=R.transitionName,G=R.animation,v=R.motion,y=R.placement,N=y===void 0?"right":y,te=R.align,Le=te===void 0?{}:te,Fe=R.destroyTooltipOnHide,Ue=Fe===void 0?!1:Fe,Ye=R.defaultVisible,ut=R.getTooltipContainer,ot=R.overlayInnerStyle,lt=R.arrowContent,St=R.overlay,Lt=R.id,_t=R.showArrow,At=_t===void 0?!0:_t,Pt=(0,Se.Z)(R,S),kt=(0,O.useRef)(null);(0,O.useImperativeHandle)(Z,function(){return kt.current});var fe=(0,ae.Z)({},Pt);"visible"in R&&(fe.popupVisible=R.visible);var he=function(){return O.createElement(b,{key:"content",prefixCls:j,id:Lt,overlayInnerStyle:ot},St)};return O.createElement(_e.Z,(0,$.Z)({popupClassName:ue,prefixCls:j,popup:he,action:Y,builtinPlacements:o,popupPlacement:N,ref:kt,popupAlign:Le,getPopupContainer:ut,onPopupVisibleChange:K,afterPopupVisibleChange:k,popupTransitionName:ne,popupAnimation:G,popupMotion:v,defaultPopupVisible:Ye,autoDestroy:Ue,mouseLeaveDelay:pe,popupStyle:ve,mouseEnterDelay:J,arrow:At},fe),P)},V=(0,O.forwardRef)(D),q=V},49658:function(Nt,rt){"use strict";rt.Z=function(){if(typeof navigator=="undefined"||typeof window=="undefined")return!1;var w=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(w)||/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(w==null?void 0:w.substr(0,4))}},83145:function(Nt,rt,w){"use strict";Object.defineProperty(rt,"__esModule",{value:!0}),rt.CopyToClipboard=void 0;var $=Se(w(59301)),ae=Se(w(25769));function Se(R){return R&&R.__esModule?R:{default:R}}function _e(R){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?_e=function(ue){return typeof ue}:_e=function(ue){return ue&&typeof Symbol=="function"&&ue.constructor===Symbol&&ue!==Symbol.prototype?"symbol":typeof ue},_e(R)}function O(R,Z){var ue=Object.keys(R);if(Object.getOwnPropertySymbols){var M=Object.getOwnPropertySymbols(R);Z&&(M=M.filter(function(Y){return Object.getOwnPropertyDescriptor(R,Y).enumerable})),ue.push.apply(ue,M)}return ue}function m(R){for(var Z=1;Z<arguments.length;Z++){var ue=arguments[Z]!=null?arguments[Z]:{};Z%2?O(ue,!0).forEach(function(M){q(R,M,ue[M])}):Object.getOwnPropertyDescriptors?Object.defineProperties(R,Object.getOwnPropertyDescriptors(ue)):O(ue).forEach(function(M){Object.defineProperty(R,M,Object.getOwnPropertyDescriptor(ue,M))})}return R}function de(R,Z){if(R==null)return{};var ue=ie(R,Z),M,Y;if(Object.getOwnPropertySymbols){var oe=Object.getOwnPropertySymbols(R);for(Y=0;Y<oe.length;Y++)M=oe[Y],!(Z.indexOf(M)>=0)&&Object.prototype.propertyIsEnumerable.call(R,M)&&(ue[M]=R[M])}return ue}function ie(R,Z){if(R==null)return{};var ue={},M=Object.keys(R),Y,oe;for(oe=0;oe<M.length;oe++)Y=M[oe],!(Z.indexOf(Y)>=0)&&(ue[Y]=R[Y]);return ue}function o(R,Z){if(!(R instanceof Z))throw new TypeError("Cannot call a class as a function")}function Q(R,Z){for(var ue=0;ue<Z.length;ue++){var M=Z[ue];M.enumerable=M.enumerable||!1,M.configurable=!0,"value"in M&&(M.writable=!0),Object.defineProperty(R,M.key,M)}}function U(R,Z,ue){return Z&&Q(R.prototype,Z),ue&&Q(R,ue),R}function E(R,Z){return Z&&(_e(Z)==="object"||typeof Z=="function")?Z:S(R)}function b(R){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(ue){return ue.__proto__||Object.getPrototypeOf(ue)},b(R)}function S(R){if(R===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return R}function D(R,Z){if(typeof Z!="function"&&Z!==null)throw new TypeError("Super expression must either be null or a function");R.prototype=Object.create(Z&&Z.prototype,{constructor:{value:R,writable:!0,configurable:!0}}),Z&&V(R,Z)}function V(R,Z){return V=Object.setPrototypeOf||function(M,Y){return M.__proto__=Y,M},V(R,Z)}function q(R,Z,ue){return Z in R?Object.defineProperty(R,Z,{value:ue,enumerable:!0,configurable:!0,writable:!0}):R[Z]=ue,R}var B=function(R){D(Z,R);function Z(){var ue,M;o(this,Z);for(var Y=arguments.length,oe=new Array(Y),J=0;J<Y;J++)oe[J]=arguments[J];return M=E(this,(ue=b(Z)).call.apply(ue,[this].concat(oe))),q(S(M),"onClick",function(ye){var pe=M.props,ve=pe.text,Ae=pe.onCopy,j=pe.children,P=pe.options,K=$.default.Children.only(j),k=(0,ae.default)(ve,P);Ae&&Ae(ve,k),K&&K.props&&typeof K.props.onClick=="function"&&K.props.onClick(ye)}),M}return U(Z,[{key:"render",value:function(){var M=this.props,Y=M.text,oe=M.onCopy,J=M.options,ye=M.children,pe=de(M,["text","onCopy","options","children"]),ve=$.default.Children.only(ye);return $.default.cloneElement(ve,m({},pe,{onClick:this.onClick}))}}]),Z}($.default.PureComponent);rt.CopyToClipboard=B,q(B,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(Nt,rt,w){"use strict";var $=w(83145),ae=$.CopyToClipboard;ae.CopyToClipboard=ae,Nt.exports=ae},76374:function(Nt,rt,w){"use strict";var $=function(){if(typeof Map!="undefined")return Map;function j(P,K){var k=-1;return P.some(function(ne,G){return ne[0]===K?(k=G,!0):!1}),k}return function(){function P(){this.__entries__=[]}return Object.defineProperty(P.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),P.prototype.get=function(K){var k=j(this.__entries__,K),ne=this.__entries__[k];return ne&&ne[1]},P.prototype.set=function(K,k){var ne=j(this.__entries__,K);~ne?this.__entries__[ne][1]=k:this.__entries__.push([K,k])},P.prototype.delete=function(K){var k=this.__entries__,ne=j(k,K);~ne&&k.splice(ne,1)},P.prototype.has=function(K){return!!~j(this.__entries__,K)},P.prototype.clear=function(){this.__entries__.splice(0)},P.prototype.forEach=function(K,k){k===void 0&&(k=null);for(var ne=0,G=this.__entries__;ne<G.length;ne++){var v=G[ne];K.call(k,v[1],v[0])}},P}()}(),ae=typeof window!="undefined"&&typeof document!="undefined"&&window.document===document,Se=function(){return typeof w.g!="undefined"&&w.g.Math===Math?w.g:typeof self!="undefined"&&self.Math===Math?self:typeof window!="undefined"&&window.Math===Math?window:Function("return this")()}(),_e=function(){return typeof requestAnimationFrame=="function"?requestAnimationFrame.bind(Se):function(j){return setTimeout(function(){return j(Date.now())},1e3/60)}}(),O=2;function m(j,P){var K=!1,k=!1,ne=0;function G(){K&&(K=!1,j()),k&&y()}function v(){_e(G)}function y(){var N=Date.now();if(K){if(N-ne<O)return;k=!0}else K=!0,k=!1,setTimeout(v,P);ne=N}return y}var de=20,ie=["top","right","bottom","left","width","height","size","weight"],o=typeof MutationObserver!="undefined",Q=function(){function j(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=m(this.refresh.bind(this),de)}return j.prototype.addObserver=function(P){~this.observers_.indexOf(P)||this.observers_.push(P),this.connected_||this.connect_()},j.prototype.removeObserver=function(P){var K=this.observers_,k=K.indexOf(P);~k&&K.splice(k,1),!K.length&&this.connected_&&this.disconnect_()},j.prototype.refresh=function(){var P=this.updateObservers_();P&&this.refresh()},j.prototype.updateObservers_=function(){var P=this.observers_.filter(function(K){return K.gatherActive(),K.hasActive()});return P.forEach(function(K){return K.broadcastActive()}),P.length>0},j.prototype.connect_=function(){!ae||this.connected_||(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),o?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},j.prototype.disconnect_=function(){!ae||!this.connected_||(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},j.prototype.onTransitionEnd_=function(P){var K=P.propertyName,k=K===void 0?"":K,ne=ie.some(function(G){return!!~k.indexOf(G)});ne&&this.refresh()},j.getInstance=function(){return this.instance_||(this.instance_=new j),this.instance_},j.instance_=null,j}(),U=function(j,P){for(var K=0,k=Object.keys(P);K<k.length;K++){var ne=k[K];Object.defineProperty(j,ne,{value:P[ne],enumerable:!1,writable:!1,configurable:!0})}return j},E=function(j){var P=j&&j.ownerDocument&&j.ownerDocument.defaultView;return P||Se},b=Y(0,0,0,0);function S(j){return parseFloat(j)||0}function D(j){for(var P=[],K=1;K<arguments.length;K++)P[K-1]=arguments[K];return P.reduce(function(k,ne){var G=j["border-"+ne+"-width"];return k+S(G)},0)}function V(j){for(var P=["top","right","bottom","left"],K={},k=0,ne=P;k<ne.length;k++){var G=ne[k],v=j["padding-"+G];K[G]=S(v)}return K}function q(j){var P=j.getBBox();return Y(0,0,P.width,P.height)}function B(j){var P=j.clientWidth,K=j.clientHeight;if(!P&&!K)return b;var k=E(j).getComputedStyle(j),ne=V(k),G=ne.left+ne.right,v=ne.top+ne.bottom,y=S(k.width),N=S(k.height);if(k.boxSizing==="border-box"&&(Math.round(y+G)!==P&&(y-=D(k,"left","right")+G),Math.round(N+v)!==K&&(N-=D(k,"top","bottom")+v)),!Z(j)){var te=Math.round(y+G)-P,Le=Math.round(N+v)-K;Math.abs(te)!==1&&(y-=te),Math.abs(Le)!==1&&(N-=Le)}return Y(ne.left,ne.top,y,N)}var R=function(){return typeof SVGGraphicsElement!="undefined"?function(j){return j instanceof E(j).SVGGraphicsElement}:function(j){return j instanceof E(j).SVGElement&&typeof j.getBBox=="function"}}();function Z(j){return j===E(j).document.documentElement}function ue(j){return ae?R(j)?q(j):B(j):b}function M(j){var P=j.x,K=j.y,k=j.width,ne=j.height,G=typeof DOMRectReadOnly!="undefined"?DOMRectReadOnly:Object,v=Object.create(G.prototype);return U(v,{x:P,y:K,width:k,height:ne,top:K,right:P+k,bottom:ne+K,left:P}),v}function Y(j,P,K,k){return{x:j,y:P,width:K,height:k}}var oe=function(){function j(P){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=Y(0,0,0,0),this.target=P}return j.prototype.isActive=function(){var P=ue(this.target);return this.contentRect_=P,P.width!==this.broadcastWidth||P.height!==this.broadcastHeight},j.prototype.broadcastRect=function(){var P=this.contentRect_;return this.broadcastWidth=P.width,this.broadcastHeight=P.height,P},j}(),J=function(){function j(P,K){var k=M(K);U(this,{target:P,contentRect:k})}return j}(),ye=function(){function j(P,K,k){if(this.activeObservations_=[],this.observations_=new $,typeof P!="function")throw new TypeError("The callback provided as parameter 1 is not a function.");this.callback_=P,this.controller_=K,this.callbackCtx_=k}return j.prototype.observe=function(P){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(P instanceof E(P).Element))throw new TypeError('parameter 1 is not of type "Element".');var K=this.observations_;K.has(P)||(K.set(P,new oe(P)),this.controller_.addObserver(this),this.controller_.refresh())}},j.prototype.unobserve=function(P){if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");if(!(typeof Element=="undefined"||!(Element instanceof Object))){if(!(P instanceof E(P).Element))throw new TypeError('parameter 1 is not of type "Element".');var K=this.observations_;K.has(P)&&(K.delete(P),K.size||this.controller_.removeObserver(this))}},j.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},j.prototype.gatherActive=function(){var P=this;this.clearActive(),this.observations_.forEach(function(K){K.isActive()&&P.activeObservations_.push(K)})},j.prototype.broadcastActive=function(){if(this.hasActive()){var P=this.callbackCtx_,K=this.activeObservations_.map(function(k){return new J(k.target,k.broadcastRect())});this.callback_.call(P,K,P),this.clearActive()}},j.prototype.clearActive=function(){this.activeObservations_.splice(0)},j.prototype.hasActive=function(){return this.activeObservations_.length>0},j}(),pe=typeof WeakMap!="undefined"?new WeakMap:new $,ve=function(){function j(P){if(!(this instanceof j))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var K=Q.getInstance(),k=new ye(P,K,this);pe.set(this,k)}return j}();["observe","unobserve","disconnect"].forEach(function(j){ve.prototype[j]=function(){var P;return(P=pe.get(this))[j].apply(P,arguments)}});var Ae=function(){return typeof Se.ResizeObserver!="undefined"?Se.ResizeObserver:ve}();rt.Z=Ae},98040:function(Nt){Nt.exports=function(){var rt=document.getSelection();if(!rt.rangeCount)return function(){};for(var w=document.activeElement,$=[],ae=0;ae<rt.rangeCount;ae++)$.push(rt.getRangeAt(ae));switch(w.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":w.blur();break;default:w=null;break}return rt.removeAllRanges(),function(){rt.type==="Caret"&&rt.removeAllRanges(),rt.rangeCount||$.forEach(function(Se){rt.addRange(Se)}),w&&w.focus()}}},1012:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return E}});var $=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),ae=new Uint8Array(16);function Se(){if(!$)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $(ae)}var _e=/^(?:[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 O(b){return typeof b=="string"&&_e.test(b)}for(var m=O,de=[],ie=0;ie<256;++ie)de.push((ie+256).toString(16).substr(1));function o(b){var S=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,D=(de[b[S+0]]+de[b[S+1]]+de[b[S+2]]+de[b[S+3]]+"-"+de[b[S+4]]+de[b[S+5]]+"-"+de[b[S+6]]+de[b[S+7]]+"-"+de[b[S+8]]+de[b[S+9]]+"-"+de[b[S+10]]+de[b[S+11]]+de[b[S+12]]+de[b[S+13]]+de[b[S+14]]+de[b[S+15]]).toLowerCase();if(!m(D))throw TypeError("Stringified UUID is invalid");return D}var Q=o;function U(b,S,D){b=b||{};var V=b.random||(b.rng||Se)();if(V[6]=V[6]&15|64,V[8]=V[8]&63|128,S){D=D||0;for(var q=0;q<16;++q)S[D+q]=V[q];return S}return Q(V)}var E=U},93314:function(Nt){"use strict";Nt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},65157:function(Nt,rt,w){"use strict";w.d(rt,{ZP:function(){return Ts}});const $=Number.isFinite||function(a){return typeof a=="number"&&isFinite(a)},ae=Number.isSafeInteger||function(a){return typeof a=="number"&&Math.abs(a)<=Se},Se=Number.MAX_SAFE_INTEGER||9007199254740991;let _e=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}({}),O=function(a){return a.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",a.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",a.KEY_SYSTEM_NO_SESSION="keySystemNoSession",a.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",a.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",a.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",a.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",a.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",a.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",a.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",a.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR="keySystemDestroyMediaKeysError",a.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR="keySystemDestroyCloseSessionError",a.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR="keySystemDestroyRemoveSessionError",a.MANIFEST_LOAD_ERROR="manifestLoadError",a.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",a.MANIFEST_PARSING_ERROR="manifestParsingError",a.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",a.LEVEL_EMPTY_ERROR="levelEmptyError",a.LEVEL_LOAD_ERROR="levelLoadError",a.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",a.LEVEL_PARSING_ERROR="levelParsingError",a.LEVEL_SWITCH_ERROR="levelSwitchError",a.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",a.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",a.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",a.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",a.FRAG_LOAD_ERROR="fragLoadError",a.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",a.FRAG_DECRYPT_ERROR="fragDecryptError",a.FRAG_PARSING_ERROR="fragParsingError",a.FRAG_GAP="fragGap",a.REMUX_ALLOC_ERROR="remuxAllocError",a.KEY_LOAD_ERROR="keyLoadError",a.KEY_LOAD_TIMEOUT="keyLoadTimeOut",a.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",a.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",a.BUFFER_APPEND_ERROR="bufferAppendError",a.BUFFER_APPENDING_ERROR="bufferAppendingError",a.BUFFER_STALLED_ERROR="bufferStalledError",a.BUFFER_FULL_ERROR="bufferFullError",a.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",a.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",a.ASSET_LIST_LOAD_ERROR="assetListLoadError",a.ASSET_LIST_LOAD_TIMEOUT="assetListLoadTimeout",a.ASSET_LIST_PARSING_ERROR="assetListParsingError",a.INTERSTITIAL_ASSET_ITEM_ERROR="interstitialAssetItemError",a.INTERNAL_EXCEPTION="internalException",a.INTERNAL_ABORTED="aborted",a.ATTACH_MEDIA_ERROR="attachMediaError",a.UNKNOWN="unknown",a}({}),m=function(a){return a.MEDIA_ATTACHING="hlsMediaAttaching",a.MEDIA_ATTACHED="hlsMediaAttached",a.MEDIA_DETACHING="hlsMediaDetaching",a.MEDIA_DETACHED="hlsMediaDetached",a.MEDIA_ENDED="hlsMediaEnded",a.STALL_RESOLVED="hlsStallResolved",a.BUFFER_RESET="hlsBufferReset",a.BUFFER_CODECS="hlsBufferCodecs",a.BUFFER_CREATED="hlsBufferCreated",a.BUFFER_APPENDING="hlsBufferAppending",a.BUFFER_APPENDED="hlsBufferAppended",a.BUFFER_EOS="hlsBufferEos",a.BUFFERED_TO_END="hlsBufferedToEnd",a.BUFFER_FLUSHING="hlsBufferFlushing",a.BUFFER_FLUSHED="hlsBufferFlushed",a.MANIFEST_LOADING="hlsManifestLoading",a.MANIFEST_LOADED="hlsManifestLoaded",a.MANIFEST_PARSED="hlsManifestParsed",a.LEVEL_SWITCHING="hlsLevelSwitching",a.LEVEL_SWITCHED="hlsLevelSwitched",a.LEVEL_LOADING="hlsLevelLoading",a.LEVEL_LOADED="hlsLevelLoaded",a.LEVEL_UPDATED="hlsLevelUpdated",a.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",a.LEVELS_UPDATED="hlsLevelsUpdated",a.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",a.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",a.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",a.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",a.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",a.AUDIO_TRACK_UPDATED="hlsAudioTrackUpdated",a.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",a.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",a.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",a.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",a.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",a.SUBTITLE_TRACK_UPDATED="hlsSubtitleTrackUpdated",a.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",a.CUES_PARSED="hlsCuesParsed",a.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",a.INIT_PTS_FOUND="hlsInitPtsFound",a.FRAG_LOADING="hlsFragLoading",a.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",a.FRAG_LOADED="hlsFragLoaded",a.FRAG_DECRYPTED="hlsFragDecrypted",a.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",a.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",a.FRAG_PARSING_METADATA="hlsFragParsingMetadata",a.FRAG_PARSED="hlsFragParsed",a.FRAG_BUFFERED="hlsFragBuffered",a.FRAG_CHANGED="hlsFragChanged",a.FPS_DROP="hlsFpsDrop",a.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",a.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",a.ERROR="hlsError",a.DESTROYING="hlsDestroying",a.KEY_LOADING="hlsKeyLoading",a.KEY_LOADED="hlsKeyLoaded",a.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",a.BACK_BUFFER_REACHED="hlsBackBufferReached",a.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",a.ASSET_LIST_LOADING="hlsAssetListLoading",a.ASSET_LIST_LOADED="hlsAssetListLoaded",a.INTERSTITIALS_UPDATED="hlsInterstitialsUpdated",a.INTERSTITIALS_BUFFERED_TO_BOUNDARY="hlsInterstitialsBufferedToBoundary",a.INTERSTITIAL_ASSET_PLAYER_CREATED="hlsInterstitialAssetPlayerCreated",a.INTERSTITIAL_STARTED="hlsInterstitialStarted",a.INTERSTITIAL_ASSET_STARTED="hlsInterstitialAssetStarted",a.INTERSTITIAL_ASSET_ENDED="hlsInterstitialAssetEnded",a.INTERSTITIAL_ASSET_ERROR="hlsInterstitialAssetError",a.INTERSTITIAL_ENDED="hlsInterstitialEnded",a.INTERSTITIALS_PRIMARY_RESUMED="hlsInterstitialsPrimaryResumed",a.PLAYOUT_LIMIT_REACHED="hlsPlayoutLimitReached",a.EVENT_CUE_ENTER="hlsEventCueEnter",a}({});var de={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},ie={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};class o{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 Q{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 o(e),this.fast_=new o(t),this.defaultTTFB_=n,this.ttfb_=new o(e)}update(e,t){const{slow_:r,fast_:n,ttfb_:i}=this;r.halfLife!==e&&(this.slow_=new o(e,r.getEstimate(),r.getTotalWeight())),n.halfLife!==t&&(this.fast_=new o(t,n.getEstimate(),n.getTotalWeight())),i.halfLife!==e&&(this.ttfb_=new o(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_}get defaultEstimate(){return this.defaultEstimate_}destroy(){}}function U(a,e,t){return(e=V(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function E(){return E=Object.assign?Object.assign.bind():function(a){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(a[r]=t[r])}return a},E.apply(null,arguments)}function b(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 S(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?b(Object(t),!0).forEach(function(r){U(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}function D(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var r=t.call(a,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function V(a){var e=D(a,"string");return typeof e=="symbol"?e:e+""}class q{constructor(e,t){this.trace=void 0,this.debug=void 0,this.log=void 0,this.warn=void 0,this.info=void 0,this.error=void 0;const r=`[${e}]:`;this.trace=B,this.debug=t.debug.bind(null,r),this.log=t.log.bind(null,r),this.warn=t.warn.bind(null,r),this.info=t.info.bind(null,r),this.error=t.error.bind(null,r)}}const B=function(){},R={trace:B,debug:B,log:B,warn:B,info:B,error:B};function Z(){return E({},R)}function ue(a,e){const t=self.console[a];return t?t.bind(self.console,`${e?"["+e+"] ":""}[${a}] >`):B}function M(a,e,t){return e[a]?e[a].bind(e):ue(a,t)}const Y=Z();function oe(a,e,t){const r=Z();if(typeof console=="object"&&a===!0||typeof a=="object"){const n=["debug","log","info","warn","error"];n.forEach(i=>{r[i]=M(i,a,t)});try{r.log(`Debug logs enabled for "${e}" in hls.js version 1.6.0`)}catch(i){return Z()}n.forEach(i=>{Y[i]=M(i,a)})}else E(Y,r);return r}const J=Y;function ye(a=!0){return typeof self=="undefined"?void 0:(a||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function pe(a){return typeof self!="undefined"&&a===self.ManagedMediaSource}function ve(a,e){const t=Object.keys(a),r=Object.keys(e),n=t.length,i=r.length;return!n||!i||n===i&&!t.some(s=>r.indexOf(s)===-1)}function Ae(a,e=!1){if(typeof TextDecoder!="undefined"){const c=new TextDecoder("utf-8").decode(a);if(e){const p=c.indexOf("\0");return p!==-1?c.substring(0,p):c}return c.replace(/\0/g,"")}const t=a.length;let r,n,i,s="",l=0;for(;l<t;){if(r=a[l++],r===0&&e)return s;if(r===0||r===3)continue;switch(r>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:s+=String.fromCharCode(r);break;case 12:case 13:n=a[l++],s+=String.fromCharCode((r&31)<<6|n&63);break;case 14:n=a[l++],i=a[l++],s+=String.fromCharCode((r&15)<<12|(n&63)<<6|(i&63)<<0);break}}return s}const j={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}};function P(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var K={exports:{}},k;function ne(){return k||(k=1,function(a,e){(function(t){var r=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,n=/^(?=([^\/?#]*))\1([^]*)$/,i=/(?:\/|^)\.(?=\/)/g,s=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,l={buildAbsoluteURL:function(h,c,p){if(p=p||{},h=h.trim(),c=c.trim(),!c){if(!p.alwaysNormalize)return h;var _=l.parseURL(h);if(!_)throw new Error("Error trying to parse base URL.");return _.path=l.normalizePath(_.path),l.buildURLFromParts(_)}var A=l.parseURL(c);if(!A)throw new Error("Error trying to parse relative URL.");if(A.scheme)return p.alwaysNormalize?(A.path=l.normalizePath(A.path),l.buildURLFromParts(A)):c;var L=l.parseURL(h);if(!L)throw new Error("Error trying to parse base URL.");if(!L.netLoc&&L.path&&L.path[0]!=="/"){var I=n.exec(L.path);L.netLoc=I[1],L.path=I[2]}L.netLoc&&!L.path&&(L.path="/");var re={scheme:L.scheme,netLoc:A.netLoc,path:null,params:A.params,query:A.query,fragment:A.fragment};if(!A.netLoc&&(re.netLoc=L.netLoc,A.path[0]!=="/"))if(!A.path)re.path=L.path,A.params||(re.params=L.params,A.query||(re.query=L.query));else{var ce=L.path,ke=ce.substring(0,ce.lastIndexOf("/")+1)+A.path;re.path=l.normalizePath(ke)}return re.path===null&&(re.path=p.alwaysNormalize?l.normalizePath(A.path):A.path),l.buildURLFromParts(re)},parseURL:function(h){var c=r.exec(h);return c?{scheme:c[1]||"",netLoc:c[2]||"",path:c[3]||"",params:c[4]||"",query:c[5]||"",fragment:c[6]||""}:null},normalizePath:function(h){for(h=h.split("").reverse().join("").replace(i,"");h.length!==(h=h.replace(s,"")).length;);return h.split("").reverse().join("")},buildURLFromParts:function(h){return h.scheme+h.netLoc+h.path+h.params+h.query+h.fragment}};a.exports=l})()}(K)),K.exports}var G=ne();class v{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var y={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class N{constructor(e){this._byteRange=null,this._url=null,this._stats=null,this._streams=null,this.base=void 0,this.relurl=void 0,typeof e=="string"&&(e={url:e}),this.base=e,Ye(this,"stats")}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 baseurl(){return this.base.url}get byteRange(){return this._byteRange===null?[]:this._byteRange}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get elementaryStreams(){return this._streams===null&&(this._streams={[y.AUDIO]:null,[y.VIDEO]:null,[y.AUDIOVIDEO]:null}),this._streams}set elementaryStreams(e){this._streams=e}get hasStats(){return this._stats!==null}get hasStreams(){return this._streams!==null}get stats(){return this._stats===null&&(this._stats=new v),this._stats}set stats(e){this._stats=e}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=G.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[y.AUDIO]=null,e[y.VIDEO]=null,e[y.AUDIOVIDEO]=null}}function te(a){return a.sn!=="initSegment"}class Le extends N{constructor(e,t){super(t),this._decryptdata=null,this._programDateTime=null,this._ref=null,this._bitrate=void 0,this.rawProgramDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.playlistOffset=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get byteLength(){if(this.hasStats){const e=this.stats.total;if(e)return e}if(this.byteRange){const e=this.byteRange[0],t=this.byteRange[1];if($(e)&&$(t))return t-e}return null}get bitrate(){return this.byteLength?this.byteLength*8/this.duration:this._bitrate?this._bitrate:null}set bitrate(e){this._bitrate=e}get decryptdata(){const{levelkeys:e}=this;if(!e&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const t=this.levelkeys.identity;if(t)this._decryptdata=t.getDecryptData(this.sn);else{const 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)return null;const e=$(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}get programDateTime(){return this._programDateTime===null&&this.rawProgramDateTime&&(this.programDateTime=Date.parse(this.rawProgramDateTime)),this._programDateTime}set programDateTime(e){if(!$(e)){this._programDateTime=this.rawProgramDateTime=null;return}this._programDateTime=e}get ref(){return te(this)?(this._ref||(this._ref={base:this.base,start:this.start,duration:this.duration,sn:this.sn,programDateTime:this.programDateTime}),this._ref):null}addStart(e){this.setStart(this.start+e)}setStart(e){this.start=e,this._ref&&(this._ref.start=e)}setDuration(e){this.duration=e,this._ref&&(this._ref.duration=e)}setKeyFormat(e){if(this.levelkeys){const t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}}abortRequests(){var e,t;(e=this.loader)==null||e.abort(),(t=this.keyLoader)==null||t.abort()}setElementaryStreamInfo(e,t,r,n,i,s=!1){const{elementaryStreams:l}=this,h=l[e];if(!h){l[e]={startPTS:t,endPTS:r,startDTS:n,endDTS:i,partial:s};return}h.startPTS=Math.min(h.startPTS,t),h.endPTS=Math.max(h.endPTS,r),h.startDTS=Math.min(h.startDTS,n),h.endDTS=Math.max(h.endDTS,i)}}class Fe extends N{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.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)}}function Ue(a,e){const t=Object.getPrototypeOf(a);if(t){const r=Object.getOwnPropertyDescriptor(t,e);return r||Ue(t,e)}}function Ye(a,e){const t=Ue(a,e);t&&(t.enumerable=!0,Object.defineProperty(a,e,t))}const ut=Math.pow(2,32)-1,ot=[].push,lt={video:1,audio:2,id3:3,text:4};function St(a){return String.fromCharCode.apply(null,a)}function Lt(a,e){const t=a[e]<<8|a[e+1];return t<0?65536+t:t}function _t(a,e){const t=Pt(a,e);return t<0?4294967296+t:t}function At(a,e){let t=_t(a,e);return t*=Math.pow(2,32),t+=_t(a,e+4),t}function Pt(a,e){return a[e]<<24|a[e+1]<<16|a[e+2]<<8|a[e+3]}function kt(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 fe(a){const e=a.byteLength;for(let t=0;t<e;){const r=_t(a,t);if(r>8&&a[t+4]===109&&a[t+5]===111&&a[t+6]===111&&a[t+7]===102)return!0;t=r>1?t+r:e}return!1}function he(a,e){const t=[];if(!e.length)return t;const r=a.byteLength;for(let n=0;n<r;){const i=_t(a,n),s=St(a.subarray(n+4,n+8)),l=i>1?n+i:r;if(s===e[0])if(e.length===1)t.push(a.subarray(n+8,l));else{const h=he(a.subarray(n+8,l),e.slice(1));h.length&&ot.apply(t,h)}n=l}return t}function se(a){const e=[],t=a[0];let r=8;const n=_t(a,r);r+=4;let i=0,s=0;t===0?(i=_t(a,r),s=_t(a,r+4),r+=8):(i=At(a,r),s=At(a,r+8),r+=16),r+=2;let l=a.length+s;const h=Lt(a,r);r+=2;for(let c=0;c<h;c++){let p=r;const _=_t(a,p);p+=4;const A=_&2147483647;if((_&2147483648)>>>31===1)return J.warn("SIDX has hierarchical references (not supported)"),null;const I=_t(a,p);p+=4,e.push({referenceSize:A,subsegmentDuration:I,info:{duration:I/n,start:l,end:l+A-1}}),l+=A,p+=4,r=p}return{earliestPresentationTime:i,timescale:n,version:t,referencesCount:h,references:e}}function Me(a){const e=[],t=he(a,["moov","trak"]);for(let n=0;n<t.length;n++){const i=t[n],s=he(i,["tkhd"])[0];if(s){let l=s[0];const h=_t(s,l===0?12:20),c=he(i,["mdia","mdhd"])[0];if(c){l=c[0];const p=_t(c,l===0?12:20),_=he(i,["mdia","hdlr"])[0];if(_){const A=St(_.subarray(8,12)),L={soun:y.AUDIO,vide:y.VIDEO}[A],I=he(i,["mdia","minf","stbl","stsd"])[0],re=$e(I);L?(e[h]={timescale:p,type:L,stsd:re},e[L]=S({timescale:p,id:h},re)):e[h]={timescale:p,type:A,stsd:re}}}}}return he(a,["moov","mvex","trex"]).forEach(n=>{const i=_t(n,4),s=e[i];s&&(s.default={duration:_t(n,12),flags:_t(n,20)})}),e}function $e(a){const e=a.subarray(8),t=e.subarray(86),r=St(e.subarray(4,8));let n=r,i;const s=r==="enca"||r==="encv";if(s){const c=he(e,[r])[0].subarray(r==="enca"?28:78);he(c,["sinf"]).forEach(_=>{const A=he(_,["schm"])[0];if(A){const L=St(A.subarray(4,8));if(L==="cbcs"||L==="cenc"){const I=he(_,["frma"])[0];I&&(n=St(I))}}})}const l=n;switch(n){case"avc1":case"avc2":case"avc3":case"avc4":{const h=he(t,["avcC"])[0];n+="."+xe(h[1])+xe(h[2])+xe(h[3]),i=F(l==="avc1"?"dva1":"dvav",t);break}case"mp4a":{const h=he(e,[r])[0],c=he(h.subarray(28),["esds"])[0];if(c&&c.length>7){let p=4;if(c[p++]!==3)break;p=le(c,p),p+=2;const _=c[p++];if(_&128&&(p+=2),_&64&&(p+=c[p++]),c[p++]!==4)break;p=le(c,p);const A=c[p++];if(A===64)n+="."+xe(A);else break;if(p+=12,c[p++]!==5)break;p=le(c,p);const L=c[p++];let I=(L&248)>>3;I===31&&(I+=1+((L&7)<<3)+((c[p]&224)>>5)),n+="."+I}break}case"hvc1":case"hev1":{const h=he(t,["hvcC"]);if(h){const c=h[0],p=c[1],_=["","A","B","C"][p>>6],A=p&31,L=_t(c,2),I=(p&32)>>5?"H":"L",re=c[12],ce=c.subarray(6,12);n+="."+_+A,n+="."+L.toString(16).toUpperCase(),n+="."+I+re;let ke="";for(let We=ce.length;We--;){const He=ce[We];(He||ke)&&(ke="."+He.toString(16).toUpperCase()+ke)}n+=ke}i=F(l=="hev1"?"dvhe":"dvh1",t);break}case"dvh1":case"dvhe":case"dvav":case"dva1":case"dav1":{n=F(n,t)||n;break}case"vp09":{const h=he(t,["vpcC"])[0],c=h[4],p=h[5],_=h[6]>>4&15;n+="."+we(c)+"."+we(p)+"."+we(_);break}case"av01":{const h=he(t,["av1C"])[0],c=h[1]>>>5,p=h[1]&31,_=h[2]>>>7?"H":"M",A=(h[2]&64)>>6,L=(h[2]&32)>>5,I=c===2&&A?L?12:10:A?10:8,re=(h[2]&16)>>4,ce=(h[2]&8)>>3,ke=(h[2]&4)>>2,We=h[2]&3;n+="."+c+"."+we(p)+_+"."+we(I)+"."+re+"."+ce+ke+We+"."+we(1)+"."+we(1)+"."+we(1)+"."+0,i=F("dav1",t);break}}return{codec:n,encrypted:s,supplemental:i}}function F(a,e){const t=he(e,["dvvC"]),r=t.length?t[0]:he(e,["dvcC"])[0];if(r){const n=r[2]>>1&127,i=r[2]<<5&32|r[3]>>3&31;return a+"."+we(n)+"."+we(i)}}function le(a,e){const t=e+5;for(;a[e++]&128&&e<t;);return e}function xe(a){return("0"+a.toString(16).toUpperCase()).slice(-2)}function we(a){return(a<10?"0":"")+a}function Ie(a,e){if(!a||!e)return a;const t=e.keyId;return t&&e.isCommonEncryption&&he(a,["moov","trak"]).forEach(n=>{const s=he(n,["mdia","minf","stbl","stsd"])[0].subarray(8);let l=he(s,["enca"]);const h=l.length>0;h||(l=he(s,["encv"])),l.forEach(c=>{const p=h?c.subarray(28):c.subarray(78);he(p,["sinf"]).forEach(A=>{const L=Oe(A);if(L){const I=L.subarray(8,24);I.some(re=>re!==0)||(J.log(`[eme] Patching keyId in 'enc${h?"a":"v"}>sinf>>tenc' box: ${j.hexDump(I)} -> ${j.hexDump(t)}`),L.set(t,8))}})})}),a}function Oe(a){const e=he(a,["schm"])[0];if(e){const t=St(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return he(a,["schi","tenc"])[0]}return null}function Qe(a,e){return he(e,["moof","traf"]).reduce((t,r)=>{const n=he(r,["tfdt"])[0],i=n[0],s=he(r,["tfhd"]).reduce((l,h)=>{const c=_t(h,4),p=a[c];if(p){let _=_t(n,4);if(i===1){if(_===ut)return J.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),l;_*=ut+1,_+=_t(n,8)}const A=p.timescale||9e4,L=_/A;if($(L)&&(l===null||L<l))return L}return l},null);return s!==null&&$(s)&&(t===null||s<t)?s:t},null)}function it(a,e){let t=0,r=0,n=0;const i=he(a,["moof","traf"]);for(let s=0;s<i.length;s++){const l=i[s],h=he(l,["tfhd"])[0],c=_t(h,4),p=e[c];if(!p)continue;const _=p.default,A=_t(h,0)|(_==null?void 0:_.flags);let L=_==null?void 0:_.duration;A&8&&(A&2?L=_t(h,12):L=_t(h,8));const I=p.timescale||9e4,re=he(l,["trun"]);for(let ce=0;ce<re.length;ce++){if(t=Je(re[ce]),!t&&L){const ke=_t(re[ce],4);t=L*ke}p.type===y.VIDEO?r+=t/I:p.type===y.AUDIO&&(n+=t/I)}}if(r===0&&n===0){let s=1/0,l=0,h=0;const c=he(a,["sidx"]);for(let p=0;p<c.length;p++){const _=se(c[p]);if(_!=null&&_.references){s=Math.min(s,_.earliestPresentationTime/_.timescale);const A=_.references.reduce((L,I)=>L+I.info.duration||0,0);l=Math.max(l,A+_.earliestPresentationTime/_.timescale),h=l-s}}if(h&&$(h))return h}return r||n}function Je(a){const e=_t(a,0);let t=8;e&1&&(t+=4),e&4&&(t+=4);let r=0;const n=_t(a,4);for(let i=0;i<n;i++){if(e&256){const s=_t(a,t);r+=s,t+=4}e&512&&(t+=4),e&1024&&(t+=4),e&2048&&(t+=4)}return r}function Ke(a,e,t){he(e,["moof","traf"]).forEach(r=>{he(r,["tfhd"]).forEach(n=>{const i=_t(n,4),s=a[i];if(!s)return;const l=s.timescale||9e4;he(r,["tfdt"]).forEach(h=>{const c=h[0],p=t*l;if(p){let _=_t(h,4);if(c===0)_-=p,_=Math.max(_,0),kt(h,4,_);else{_*=Math.pow(2,32),_+=_t(h,8),_-=p,_=Math.max(_,0);const A=Math.floor(_/(ut+1)),L=Math.floor(_%(ut+1));kt(h,4,A),kt(h,8,L)}}})})})}function yt(a){const e={valid:null,remainder:null},t=he(a,["moof"]);if(t.length<2)return e.remainder=a,e;const r=t[t.length-1];return e.valid=a.slice(0,r.byteOffset-8),e.remainder=a.slice(r.byteOffset-8),e}function De(a,e){const t=new Uint8Array(a.length+e.length);return t.set(a),t.set(e,a.length),t}function Pe(a,e){const t=[],r=e.samples,n=e.timescale,i=e.id;let s=!1;return he(r,["moof"]).map(h=>{const c=h.byteOffset-8;he(h,["traf"]).map(_=>{const A=he(_,["tfdt"]).map(L=>{const I=L[0];let re=_t(L,4);return I===1&&(re*=Math.pow(2,32),re+=_t(L,8)),re/n})[0];return A!==void 0&&(a=A),he(_,["tfhd"]).map(L=>{const I=_t(L,4),re=_t(L,0)&16777215,ce=(re&1)!==0,ke=(re&2)!==0,We=(re&8)!==0;let He=0;const ct=(re&16)!==0;let ht=0;const Tt=(re&32)!==0;let dt=8;I===i&&(ce&&(dt+=8),ke&&(dt+=4),We&&(He=_t(L,dt),dt+=4),ct&&(ht=_t(L,dt),dt+=4),Tt&&(dt+=4),e.type==="video"&&(s=Ze(e.codec)),he(_,["trun"]).map(xt=>{const It=xt[0],pt=_t(xt,0)&16777215,Ht=(pt&1)!==0;let er=0;const tn=(pt&4)!==0,Cr=(pt&256)!==0;let br=0;const ur=(pt&512)!==0;let xr=0;const vr=(pt&1024)!==0,jt=(pt&2048)!==0;let Yt=0;const Nr=_t(xt,4);let Dr=8;Ht&&(er=_t(xt,Dr),Dr+=4),tn&&(Dr+=4);let en=er+c;for(let fn=0;fn<Nr;fn++){if(Cr?(br=_t(xt,Dr),Dr+=4):br=He,ur?(xr=_t(xt,Dr),Dr+=4):xr=ht,vr&&(Dr+=4),jt&&(It===0?Yt=_t(xt,Dr):Yt=Pt(xt,Dr),Dr+=4),e.type===y.VIDEO){let En=0;for(;En<xr;){const kn=_t(r,en);if(en+=4,Ve(s,r[en])){const wi=r.subarray(en,en+kn);nt(wi,s?2:1,a+Yt/n,t)}en+=kn,En+=kn+4}}a+=br/n}}))})})}),t}function Ze(a){if(!a)return!1;const e=a.substring(0,4);return e==="hvc1"||e==="hev1"||e==="dvh1"||e==="dvhe"}function Ve(a,e){if(a){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function nt(a,e,t,r){const n=mt(a);let i=0;i+=e;let s=0,l=0,h=0;for(;i<n.length;){s=0;do{if(i>=n.length)break;h=n[i++],s+=h}while(h===255);l=0;do{if(i>=n.length)break;h=n[i++],l+=h}while(h===255);const c=n.length-i;let p=i;if(l<c)i+=l;else if(l>c){J.error(`Malformed SEI payload. ${l} is too small, only ${c} bytes left to parse.`);break}if(s===4){if(n[p++]===181){const A=Lt(n,p);if(p+=2,A===49){const L=_t(n,p);if(p+=4,L===1195456820){const I=n[p++];if(I===3){const re=n[p++],ce=31&re,ke=64&re,We=ke?2+ce*3:0,He=new Uint8Array(We);if(ke){He[0]=re;for(let ct=1;ct<We;ct++)He[ct]=n[p++]}r.push({type:I,payloadType:s,pts:t,bytes:He})}}}}}else if(s===5&&l>16){const _=[];for(let I=0;I<16;I++){const re=n[p++].toString(16);_.push(re.length==1?"0"+re:re),(I===3||I===5||I===7||I===9)&&_.push("-")}const A=l-16,L=new Uint8Array(A);for(let I=0;I<A;I++)L[I]=n[p++];r.push({payloadType:s,pts:t,uuid:_.join(""),userData:Ae(L),userDataBytes:L})}}}function mt(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 gt(a){const e=a[0];let t="",r="",n=0,i=0,s=0,l=0,h=0,c=0;if(e===0){for(;St(a.subarray(c,c+1))!=="\0";)t+=St(a.subarray(c,c+1)),c+=1;for(t+=St(a.subarray(c,c+1)),c+=1;St(a.subarray(c,c+1))!=="\0";)r+=St(a.subarray(c,c+1)),c+=1;r+=St(a.subarray(c,c+1)),c+=1,n=_t(a,12),i=_t(a,16),l=_t(a,20),h=_t(a,24),c=28}else if(e===1){c+=4,n=_t(a,c),c+=4;const _=_t(a,c);c+=4;const A=_t(a,c);for(c+=4,s=Vl(2,32)*_+A,ae(s)||(s=Number.MAX_SAFE_INTEGER,J.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),l=_t(a,c),c+=4,h=_t(a,c),c+=4;St(a.subarray(c,c+1))!=="\0";)t+=St(a.subarray(c,c+1)),c+=1;for(t+=St(a.subarray(c,c+1)),c+=1;St(a.subarray(c,c+1))!=="\0";)r+=St(a.subarray(c,c+1)),c+=1;r+=St(a.subarray(c,c+1)),c+=1}const p=a.subarray(c,a.byteLength);return{schemeIdUri:t,value:r,timeScale:n,presentationTime:s,presentationTimeDelta:i,eventDuration:l,id:h,payload:p}}function x(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 T(a,e,t){if(a.byteLength!==16)throw new RangeError("Invalid system id");let r,n;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),x([112,115,115,104],new Uint8Array([r,0,0,0]),a,i,n,s,t||new Uint8Array)}function et(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=W(n);e.push(i),r+=i.size}}return e}function W(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,l=j.hexDump(new Uint8Array(s,t+12,16)),h=a.getUint32(28);let c=null,p=null;if(i===0){if(e-32<h||h<22)return{offset:t,size:e};p=new Uint8Array(s,t+32,h)}else if(i===1){if(!h||r<t+32+h*16+16)return{offset:t,size:e};c=[];for(let _=0;_<h;_++)c.push(new Uint8Array(s,t+32+_*16,16))}return{version:i,systemId:l,kids:c,data:p,offset:t,size:e}}const Ee=()=>/\(Windows.+Firefox\//i.test(navigator.userAgent),Bt={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,dav1:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function Be(a,e){const t=Bt[e];return!!t&&!!t[a.slice(0,4)]}function ze(a,e,t=!0){return!a.split(",").some(r=>!qe(r,e,t))}function qe(a,e,t=!0){var r;const n=ye(t);return(r=n==null?void 0:n.isTypeSupported(ee(a,e)))!=null?r:!1}function ee(a,e){return`${e}/mp4;codecs=${a}`}function be(a){if(a){const e=a.substring(0,4);return Bt.video[e]}return 2}function me(a){const e=Ee();return a.split(",").reduce((t,r)=>{const i=e&&Ze(r)?9:Bt.video[r];return i?(i*2+t)/(t?3:2):(Bt.audio[r]+t)/(t?2:1)},0)}const Ge={};function X(a,e=!0){if(Ge[a])return Ge[a];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"],"mp4a.40.34":["mp3"]}[a];for(let n=0;n<t.length;n++){var r;if(qe(t[n],"audio",e))return Ge[a]=t[n],t[n];if(t[n]==="mp3"&&(r=ye(e))!=null&&r.isTypeSupported("audio/mpeg"))return""}return a}const Ct=/flac|opus|mp4a\.40\.34/i;function Ce(a,e=!0){return a.replace(Ct,t=>X(t.toLowerCase(),e))}function Ot(a,e){const t=[];if(a){const r=a.split(",");for(let n=0;n<r.length;n++)Be(r[n],"video")||t.push(r[n])}return e&&t.push(e),t.join(",")}function zt(a,e){if(a&&(a.length>4||["ac-3","ec-3","alac","fLaC","Opus"].indexOf(a)!==-1))return a;if(e){const t=e.split(",");if(t.length>1){if(a){for(let r=t.length;r--;)if(t[r].substring(0,4)===a.substring(0,4))return t[r]}return t[0]}}return e||a}function cr(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(",")}function sr(a){if(a.startsWith("av01.")){const e=a.split("."),t=["0","111","01","01","01","0"];for(let r=e.length;r>4&&r<10;r++)e[r]=t[r-4];return e.join(".")}return a}function Kt(a){const e=ye(a)||{isTypeSupported:()=>!1};return{mpeg:e.isTypeSupported("audio/mpeg"),mp3:e.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:e.isTypeSupported('audio/mp4; codecs="ac-3"')}}function $t(a){return a.replace(/^.+codecs=["']?([^"']+).*$/,"$1")}const mr={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]};function Vr(a,e){return{supported:!1,configurations:e,decodingInfoResults:[{supported:!1,smooth:!1,powerEfficient:!1}],error:a}}const Ur={};function jr(a,e,t,r,n,i){const s=a.audioCodec?a.audioGroups:null,l=i==null?void 0:i.audioCodec,h=i==null?void 0:i.channels,c=h?parseInt(h):l?1/0:2;let p=null;if(s!=null&&s.length)try{s.length===1&&s[0]?p=e.groups[s[0]].channels:p=s.reduce((_,A)=>{if(A){const L=e.groups[A];if(!L)throw new Error(`Audio track group ${A} not found`);Object.keys(L.channels).forEach(I=>{_[I]=(_[I]||0)+L.channels[I]})}return _},{2:0})}catch(_){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))||!!p&&$(c)&&Object.keys(p).some(_=>parseInt(_)>c)}function Vt(a,e,t){const r=a.videoCodec,n=a.audioCodec;if(!r&&!n||!t)return Promise.resolve(mr);const i=[];if(r){const s={width:a.width,height:a.height,bitrate:Math.ceil(Math.max(a.bitrate*.9,a.averageBitrate)),framerate:a.frameRate||30},l=a.videoRange;l!=="SDR"&&(s.transferFunction=l.toLowerCase());const h=r.split(","),c=navigator.userAgent;if(h.some(p=>Ze(p))&&Ee())return Promise.resolve(Vr(new Error(`Overriding Windows Firefox HEVC MediaCapabilities result based on user-agent sting: (${c})`),i));i.push.apply(i,h.map(p=>({type:"media-source",video:S(S({},s),{},{contentType:ee(sr(p),"video")})})))}return n&&a.audioGroups&&a.audioGroups.forEach(s=>{var l;s&&((l=e.groups[s])==null||l.tracks.forEach(h=>{if(h.groupId===s){const c=h.channels||"",p=parseFloat(c);$(p)&&p>2&&i.push.apply(i,n.split(",").map(_=>({type:"media-source",audio:{contentType:ee(_,"audio"),channels:""+p}})))}}))}),Promise.all(i.map(s=>{const l=or(s);return Ur[l]||(Ur[l]=t.decodingInfo(s))})).then(s=>({supported:!s.some(l=>!l.supported),configurations:i,decodingInfoResults:s})).catch(s=>({supported:!1,configurations:i,decodingInfoResults:[],error:s}))}function or(a){const{audio:e,video:t}=a,r=t||e;if(r){const n=$t(r.contentType);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""}const Ir=["NONE","TYPE-0","TYPE-1",null];function Kr(a){return Ir.indexOf(a)>-1}const Lr=["SDR","PQ","HLG"];function ln(a){return!!a&&Lr.indexOf(a)>-1}var Pr={No:"",Yes:"YES",v2:"v2"};function Fn(a){const{canSkipUntil:e,canSkipDateRanges:t,age:r}=a,n=r<e/2;return e&&n?t?Pr.v2:Pr.Yes:Pr.No}class un{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 zr{constructor(e){if(this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.supplemental=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter(r=>!!r).map(r=>r.substring(0,4)).join(","),"supplemental"in e){var t;this.supplemental=e.supplemental;const r=(t=e.supplemental)==null?void 0:t.videoCodec;r&&r!==e.videoCodec&&(this.codecSet+=`,${r.substring(0,4)}`)}this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return qt(this._audioGroups,e)}hasSubtitleGroup(e){return qt(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 qt(a,e){return!e||!a?!1:a.indexOf(e)!==-1}function Xt(){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 wr(a,e){let t=!1,r=[];if(a&&(t=a!=="SDR",r=[a]),e){r=e.allowedVideoRanges||Lr.slice(0);const n=r.join("")!=="SDR"&&!e.videoCodec;t=e.preferHDR!==void 0?e.preferHDR:n&&Xt(),t||(r=["SDR"])}return{preferHDR:t,allowedVideoRanges:r}}const Er=a=>{const e=new WeakSet;return(t,r)=>{if(a&&(r=a(t,r)),typeof r=="object"&&r!==null){if(e.has(r))return;e.add(r)}return r}},_r=(a,e)=>JSON.stringify(a,Er(e));function On(a,e,t,r,n){const i=Object.keys(a),s=r==null?void 0:r.channels,l=r==null?void 0:r.audioCodec,h=n==null?void 0:n.videoCodec,c=s&&parseInt(s)===2;let p=!1,_=!1,A=1/0,L=1/0,I=1/0,re=1/0,ce=0,ke=[];const{preferHDR:We,allowedVideoRanges:He}=wr(e,n);for(let xt=i.length;xt--;){const It=a[i[xt]];p||(p=It.channels[2]>0),A=Math.min(A,It.minHeight),L=Math.min(L,It.minFramerate),I=Math.min(I,It.minBitrate),He.filter(Ht=>It.videoRanges[Ht]>0).length>0&&(_=!0)}A=$(A)?A:0,L=$(L)?L:0;const ct=Math.max(1080,A),ht=Math.max(30,L);I=$(I)?I:t,t=Math.max(I,t),_||(e=void 0);const Tt=i.length>1;return{codecSet:i.reduce((xt,It)=>{const pt=a[It];if(It===xt)return xt;if(ke=_?He.filter(Ht=>pt.videoRanges[Ht]>0):[],Tt){if(pt.minBitrate>t)return Gr(It,`min bitrate of ${pt.minBitrate} > current estimate of ${t}`),xt;if(!pt.hasDefaultAudio)return Gr(It,"no renditions with default or auto-select sound found"),xt;if(l&&It.indexOf(l.substring(0,4))%5!==0)return Gr(It,`audio codec preference "${l}" not found`),xt;if(s&&!c){if(!pt.channels[s])return Gr(It,`no renditions with ${s} channel sound found (channels options: ${Object.keys(pt.channels)})`),xt}else if((!l||c)&&p&&pt.channels[2]===0)return Gr(It,"no renditions with stereo sound found"),xt;if(pt.minHeight>ct)return Gr(It,`min resolution of ${pt.minHeight} > maximum of ${ct}`),xt;if(pt.minFramerate>ht)return Gr(It,`min framerate of ${pt.minFramerate} > maximum of ${ht}`),xt;if(!ke.some(Ht=>pt.videoRanges[Ht]>0))return Gr(It,`no variants with VIDEO-RANGE of ${_r(ke)} found`),xt;if(h&&It.indexOf(h.substring(0,4))%5!==0)return Gr(It,`video codec preference "${h}" not found`),xt;if(pt.maxScore<ce)return Gr(It,`max score of ${pt.maxScore} < selected max of ${ce}`),xt}return xt&&(me(It)>=me(xt)||pt.fragmentError>a[xt].fragmentError)?xt:(re=pt.minIndex,ce=pt.maxScore,It)},void 0),videoRanges:ke,preferHDR:We,minFramerate:L,minBitrate:I,minIndex:re}}function Gr(a,e){J.log(`[abr] start candidates with "${a}" ignored because ${e}`)}function hr(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 st(a,e,t,r){return a.slice(t,r+1).reduce((n,i,s)=>{if(!i.codecSet)return n;const l=i.audioGroups;let h=n[i.codecSet];h||(n[i.codecSet]=h={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,minIndex:s,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!l,fragmentError:0}),h.minBitrate=Math.min(h.minBitrate,i.bitrate);const c=Math.min(i.height,i.width);return h.minHeight=Math.min(h.minHeight,c),h.minFramerate=Math.min(h.minFramerate,i.frameRate),h.minIndex=Math.min(h.minIndex,s),h.maxScore=Math.max(h.maxScore,i.score),h.fragmentError+=i.fragmentError,h.videoRanges[i.videoRange]=(h.videoRanges[i.videoRange]||0)+1,l&&l.forEach(p=>{if(!p)return;const _=e.groups[p];_&&(h.hasDefaultAudio=h.hasDefaultAudio||e.hasDefaultAudio?_.hasDefault:_.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(_.channels).forEach(A=>{h.channels[A]=(h.channels[A]||0)+_.channels[A]}))}),n},{})}function at(a){if(!a)return a;const{lang:e,assocLang:t,characteristics:r,channels:n,audioCodec:i}=a;return{lang:e,assocLang:t,characteristics:r,channels:n,audioCodec:i}}function bt(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(Dt(a,n,t))return r}return-1}function Dt(a,e,t){const{groupId:r,name:n,lang:i,assocLang:s,default:l}=a,h=a.forced;return(r===void 0||e.groupId===r)&&(n===void 0||e.name===n)&&(i===void 0||vt(i,e.lang))&&(i===void 0||e.assocLang===s)&&(l===void 0||e.default===l)&&(h===void 0||e.forced===h)&&(!("characteristics"in a)||Ut(a.characteristics||"",e.characteristics))&&(t===void 0||t(a,e))}function vt(a,e="--"){return a.length===e.length?a===e:a.startsWith(e)||e.startsWith(a)}function Ut(a,e=""){const t=a.split(","),r=e.split(",");return t.length===r.length&&!t.some(n=>r.indexOf(n)===-1)}function wt(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 Zt(a,e,t,r,n){const i=e[r],l=e.reduce((A,L,I)=>{const re=L.uri;return(A[re]||(A[re]=[])).push(I),A},{})[i.uri];l.length>1&&(r=Math.max.apply(Math,l));const h=i.videoRange,c=i.frameRate,p=i.codecSet.substring(0,4),_=tr(e,r,A=>{if(A.videoRange!==h||A.frameRate!==c||A.codecSet.substring(0,4)!==p)return!1;const L=A.audioGroups,I=t.filter(re=>!L||L.indexOf(re.groupId)!==-1);return bt(a,I,n)>-1});return _>-1?_:tr(e,r,A=>{const L=A.audioGroups,I=t.filter(re=>!L||L.indexOf(re.groupId)!==-1);return bt(a,I,n)>-1})}function tr(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}function Qt(a,e){var t;return!!a&&a!==((t=e.loadLevelObj)==null?void 0:t.uri)}class Tr extends q{constructor(e){super("abr",e.logger),this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.rebufferNotice=-1,this.bwEstimator=void 0,this._abandonRulesCheck=t=>{var r;const{fragCurrent:n,partCurrent:i,hls:s}=this,{autoLevelEnabled:l,media:h}=s;if(!n||!h)return;const c=performance.now(),p=i?i.stats:n.stats,_=i?i.duration:n.duration,A=c-p.loading.start,L=s.minAutoLevel,I=n.level,re=this._nextAutoLevel;if(p.aborted||p.loaded&&p.loaded===p.total||I<=L){this.clearTimer(),this._nextAutoLevel=-1;return}if(!l)return;const ce=re>-1&&re!==I,ke=!!t||ce;if(!ke&&(h.paused||!h.playbackRate||!h.readyState))return;const We=s.mainForwardBufferInfo;if(!ke&&We===null)return;const He=this.bwEstimator.getEstimateTTFB(),ct=Math.abs(h.playbackRate);if(A<=Math.max(He,1e3*(_/(ct*2))))return;const ht=We?We.len/ct:0,Tt=p.loading.first?p.loading.first-p.loading.start:-1,dt=p.loaded&&Tt>-1,xt=this.getBwEstimate(),It=s.levels,pt=It[I],Ht=Math.max(p.loaded,Math.round(_*(n.bitrate||pt.averageBitrate)/8));let er=dt?A-Tt:A;er<1&&dt&&(er=Math.min(A,p.loaded*8/xt));const tn=dt?p.loaded*1e3/er:0,Cr=He/1e3,br=tn?(Ht-p.loaded)/tn:Ht*8/xt+Cr;if(br<=ht)return;const ur=tn?tn*8:xt,xr=((r=(t==null?void 0:t.details)||this.hls.latestLevelDetails)==null?void 0:r.live)===!0,vr=this.hls.config.abrBandWidthUpFactor;let jt=Number.POSITIVE_INFINITY,Yt;for(Yt=I-1;Yt>L;Yt--){const fn=It[Yt].maxBitrate,En=!It[Yt].details||xr;if(jt=this.getTimeToLoadFrag(Cr,ur,_*fn,En),jt<Math.min(ht,_+Cr))break}if(jt>=br||jt>_*10)return;dt?this.bwEstimator.sample(A-Math.min(He,Tt),p.loaded):this.bwEstimator.sampleTTFB(A);const Nr=It[Yt].maxBitrate;this.getBwEstimate()*vr>Nr&&this.resetEstimator(Nr);const Dr=this.findBestLevel(Nr,L,Yt,0,ht,1,1);Dr>-1&&(Yt=Dr),this.warn(`Fragment ${n.sn}${i?" part "+i.index:""} of level ${I} is loading too slowly;
|
|
Fragment duration: ${n.duration.toFixed(3)}
|
|
Time to underbuffer: ${ht.toFixed(3)} s
|
|
Estimated load time for current fragment: ${br.toFixed(3)} s
|
|
Estimated load time for down switch fragment: ${jt.toFixed(3)} s
|
|
TTFB estimate: ${Tt|0} ms
|
|
Current BW estimate: ${$(xt)?xt|0:"Unknown"} bps
|
|
New BW estimate: ${this.getBwEstimate()|0} bps
|
|
Switching to level ${Yt} @ ${Nr|0} bps`),s.nextLoadLevel=s.nextAutoLevel=Yt,this.clearTimer();const en=()=>{if(this.clearTimer(),this.fragCurrent===n&&this.hls.loadLevel===Yt&&Yt>0){const fn=this.getStarvationDelay();if(this.warn(`Aborting inflight request ${Yt>0?"and switching down":""}
|
|
Fragment duration: ${n.duration.toFixed(3)} s
|
|
Time to underbuffer: ${fn.toFixed(3)} s`),n.abortRequests(),this.fragCurrent=this.partCurrent=null,Yt>L){let En=this.findBestLevel(this.hls.levels[L].bitrate,L,Yt,0,fn,1,1);En===-1&&(En=L),this.hls.nextLoadLevel=this.hls.nextAutoLevel=En,this.resetEstimator(this.hls.levels[En].bitrate)}}};ce||br>jt*2?en():this.timer=self.setInterval(en,jt*1e3),s.trigger(m.FRAG_LOAD_EMERGENCY_ABORTED,{frag:n,part:i,stats:p})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(this.log(`setting initial bwe to ${e}`),this.hls.config.abrEwmaDefaultEstimate=e),this.firstSelection=-1,this.bwEstimator=this.initEstimator()}initEstimator(){const e=this.hls.config;return new Q(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.FRAG_LOADING,this.onFragLoading,this),e.on(m.FRAG_LOADED,this.onFragLoaded,this),e.on(m.FRAG_BUFFERED,this.onFragBuffered,this),e.on(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(m.LEVEL_LOADED,this.onLevelLoaded,this),e.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(m.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.FRAG_LOADING,this.onFragLoading,this),e.off(m.FRAG_LOADED,this.onFragLoaded,this),e.off(m.FRAG_BUFFERED,this.onFragBuffered,this),e.off(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(m.LEVEL_LOADED,this.onLevelLoaded,this),e.off(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(m.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(m.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 O.BUFFER_ADD_CODEC_ERROR:case O.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case O.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(),l=i?i.stats:r.stats,h=s-l.loading.start,c=l.loading.first?l.loading.first-l.loading.start:-1;if(l.loaded&&c>-1){const _=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(h-Math.min(_,c),l.loaded)}else this.bwEstimator.sampleTTFB(h)}break}}}getTimeToLoadFrag(e,t,r,n){const i=e+r/t,s=n?e+this.lastLevelLoadSec:0;return i+s}onLevelLoaded(e,t){const r=this.hls.config,{loading:n}=t.stats,i=n.end-n.first;$(i)&&(this.lastLevelLoadSec=i/1e3),t.details.live?this.bwEstimator.update(r.abrEwmaSlowLive,r.abrEwmaFastLive):this.bwEstimator.update(r.abrEwmaSlowVoD,r.abrEwmaFastVoD),this.timer>-1&&this._abandonRulesCheck(t.levelInfo)}onFragLoaded(e,{frag:t,part:r}){const n=r?r.stats:t.stats;if(t.type===ie.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],l=(s.loaded?s.loaded.bytes:0)+n.loaded,h=(s.loaded?s.loaded.duration:0)+i;s.loaded={bytes:l,duration:h},s.realBitrate=Math.round(8*l/h)}if(t.bitrateTest){const i={stats:n,frag:t,part:r,id:t.type};this.onFragBuffered(m.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!==ie.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,l=Math.min(Math.max(s,t),e);return this.warn(`Could not find best starting auto level. Defaulting to first in playlist ${s} clamped to ${l}`),l}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const e=this.forcedAutoLevel,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;if(r.levels.length<=1)return r.loadLevel;const{maxAutoLevel:n,config:i,minAutoLevel:s}=r,l=t?t.duration:e?e.duration:0,h=this.getBwEstimate(),c=this.getStarvationDelay();let p=i.abrBandWidthFactor,_=i.abrBandWidthUpFactor;if(c){const ce=this.findBestLevel(h,s,n,c,0,p,_);if(ce>=0)return this.rebufferNotice=-1,ce}let A=l?Math.min(l,i.maxStarvationDelay):i.maxStarvationDelay;if(!c){const ce=this.bitrateTestDelay;ce&&(A=(l?Math.min(l,i.maxLoadingDelay):i.maxLoadingDelay)-ce,this.info(`bitrate test took ${Math.round(1e3*ce)}ms, set first fragment max fetchDuration to ${Math.round(1e3*A)} ms`),p=_=1)}const L=this.findBestLevel(h,s,n,c,A,p,_);if(this.rebufferNotice!==L&&(this.rebufferNotice=L,this.info(`${c?"rebuffering expected":"buffer is empty"}, optimal quality level ${L}`)),L>-1)return L;const I=r.levels[s],re=r.loadLevelObj;return re&&(I==null?void 0:I.bitrate)<re.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,l){var h;const c=n+i,p=this.lastLoadedFragLevel,_=p===-1?this.hls.firstLevel:p,{fragCurrent:A,partCurrent:L}=this,{levels:I,allAudioTracks:re,loadLevel:ce,config:ke}=this.hls;if(I.length===1)return 0;const We=I[_],He=!!((h=this.hls.latestLevelDetails)!=null&&h.live),ct=ce===-1||p===-1;let ht,Tt="SDR",dt=(We==null?void 0:We.frameRate)||0;const{audioPreference:xt,videoPreference:It}=ke,pt=this.audioTracksByGroup||(this.audioTracksByGroup=hr(re));let Ht=-1;if(ct){if(this.firstSelection!==-1)return this.firstSelection;const ur=this.codecTiers||(this.codecTiers=st(I,pt,t,r)),xr=On(ur,Tt,e,xt,It),{codecSet:vr,videoRanges:jt,minFramerate:Yt,minBitrate:Nr,minIndex:Dr,preferHDR:en}=xr;Ht=Dr,ht=vr,Tt=en?jt[jt.length-1]:jt[0],dt=Yt,e=Math.max(e,Nr),this.log(`picked start tier ${_r(xr)}`)}else ht=We==null?void 0:We.codecSet,Tt=We==null?void 0:We.videoRange;const er=L?L.duration:A?A.duration:0,tn=this.bwEstimator.getEstimateTTFB()/1e3,Cr=[];for(let ur=r;ur>=t;ur--){var br;const xr=I[ur],vr=ur>_;if(!xr)continue;if(ke.useMediaCapabilities&&!xr.supportedResult&&!xr.supportedPromise){const En=navigator.mediaCapabilities;typeof(En==null?void 0:En.decodingInfo)=="function"&&(jr(xr,pt,Tt,dt,e,xt)||Ze(xr.videoCodec))?(xr.supportedPromise=Vt(xr,pt,En),xr.supportedPromise.then(kn=>{if(!this.hls)return;xr.supportedResult=kn;const wi=this.hls.levels,Ii=wi.indexOf(xr);kn.error?this.warn(`MediaCapabilities decodingInfo error: "${kn.error}" for level ${Ii} ${_r(kn)}`):kn.supported||(this.warn(`Unsupported MediaCapabilities decodingInfo result for level ${Ii} ${_r(kn)}`),Ii>-1&&wi.length>1&&(this.log(`Removing unsupported level ${Ii}`),this.hls.removeLevel(Ii),this.hls.loadLevel===-1&&(this.hls.nextLoadLevel=0)))})):xr.supportedResult=mr}if((ht&&xr.codecSet!==ht||Tt&&xr.videoRange!==Tt||vr&&dt>xr.frameRate||!vr&&dt>0&&dt<xr.frameRate||xr.supportedResult&&!((br=xr.supportedResult.decodingInfoResults)!=null&&br[0].smooth))&&(!ct||ur!==Ht)){Cr.push(ur);continue}const jt=xr.details,Yt=(L?jt==null?void 0:jt.partTarget:jt==null?void 0:jt.averagetargetduration)||er;let Nr;vr?Nr=l*e:Nr=s*e;const Dr=er&&n>=er*2&&i===0?xr.averageBitrate:xr.maxBitrate,en=this.getTimeToLoadFrag(tn,Nr,Dr*Yt,jt===void 0);if(Nr>=Dr&&(ur===p||xr.loadError===0&&xr.fragmentError===0)&&(en<=tn||!$(en)||He&&!this.bitrateTestDelay||en<c)){const En=this.forcedAutoLevel;return ur!==ce&&(En===-1||En!==ce)&&(Cr.length&&this.trace(`Skipped level(s) ${Cr.join(",")} of ${r} max with CODECS and VIDEO-RANGE:"${I[Cr[0]].codecs}" ${I[Cr[0]].videoRange}; not compatible with "${ht}" ${Tt}`),this.info(`switch candidate:${_}->${ur} adjustedbw(${Math.round(Nr)})-bitrate=${Math.round(Nr-Dr)} ttfb:${tn.toFixed(1)} avgDuration:${Yt.toFixed(1)} maxFetchDuration:${c.toFixed(1)} fetchDuration:${en.toFixed(1)} firstSelection:${ct} codecSet:${xr.codecSet} videoRange:${xr.videoRange} hls.loadLevel:${ce}`)),ct&&(this.firstSelection=ur),ur}}return-1}set nextAutoLevel(e){const t=this.deriveNextAutoLevel(e);this._nextAutoLevel!==t&&(this.nextAutoLevelKey="",this._nextAutoLevel=t)}deriveNextAutoLevel(e){const{maxAutoLevel:t,minAutoLevel:r}=this.hls;return Math.min(Math.max(e,r),t)}}const gr={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 Fr(a,e,t){if(e===null||!Array.isArray(a)||!a.length||!$(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(qr(e,t,s))return s}return null}function nr(a,e,t=0,r=0,n=.005){let i=null;if(a){i=e[1+a.sn-e[0].sn]||null;const l=a.endDTS-t;l>0&&l<15e-7&&(t+=15e-7),i&&a.level!==i.level&&i.end<=a.end&&(i=e[2+a.sn-e[0].sn]||null)}else t===0&&e[0].start===0&&(i=e[0]);if(i&&((!a||a.level===i.level)&&Zr(t,r,i)===0||lr(i,a,Math.min(n,r))))return i;const s=gr.search(e,Zr.bind(null,t,r));return s&&(s!==a||!i)?s:i}function lr(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 Zr(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 qr(a,e,t){const r=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-r>a}function rn(a,e){return gr.search(a,t=>t.cc<e?1:t.cc>e?-1:0)}function Yr(a,e,t){if(a&&a.startCC<=e&&a.endCC>=e){const r=t.start,n=t.end;let i=a.fragments;if(!t.relurl){const{fragmentHint:s}=a;s&&(i=i.concat(s))}return gr.search(i,s=>s.cc<e||s.end<=r?1:s.cc>e||s.start>=n?-1:0)}return null}function kr(a){switch(a.details){case O.FRAG_LOAD_TIMEOUT:case O.KEY_LOAD_TIMEOUT:case O.LEVEL_LOAD_TIMEOUT:case O.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function Mr(a,e){const t=kr(e);return a.default[`${t?"timeout":"error"}Retry`]}function Or(a,e){const t=a.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*a.retryDelayMs,a.maxRetryDelayMs)}function Wr(a){return S(S({},a),{errorRetry:null,timeoutRetry:null})}function pn(a,e,t,r){if(!a)return!1;const n=r==null?void 0:r.code,i=e<a.maxNumRetry&&(Qr(n)||!!t);return a.shouldRetry?a.shouldRetry(a,e,t,r,i):i}function Qr(a){return a===0&&navigator.onLine===!1||!!a&&(a<400||a>499)}var ir={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},Xe={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,SwitchToSDR:4};class Wt extends q{constructor(e){super("error-controller",e.logger),this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(m.ERROR,this.onError,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(m.ERROR,this.onError,this),e.off(m.ERROR,this.onErrorOut,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.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)===ie.MAIN?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var r;if(t.fatal)return;const n=this.hls,i=t.context;switch(t.details){case O.FRAG_LOAD_ERROR:case O.FRAG_LOAD_TIMEOUT:case O.KEY_LOAD_ERROR:case O.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case O.FRAG_PARSING_ERROR:if((r=t.frag)!=null&&r.gap){t.errorAction=Jt();return}case O.FRAG_GAP:case O.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=ir.SendAlternateToPenaltyBox;return}case O.LEVEL_EMPTY_ERROR:case O.LEVEL_PARSING_ERROR:{var s,l;const c=t.parent===ie.MAIN?t.level:n.loadLevel;t.details===O.LEVEL_EMPTY_ERROR&&((s=t.context)!=null&&(l=s.levelDetails)!=null&&l.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,c):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,c))}return;case O.LEVEL_LOAD_ERROR:case O.LEVEL_LOAD_TIMEOUT:typeof(i==null?void 0:i.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.level));return;case O.AUDIO_TRACK_LOAD_ERROR:case O.AUDIO_TRACK_LOAD_TIMEOUT:case O.SUBTITLE_LOAD_ERROR:case O.SUBTITLE_TRACK_LOAD_TIMEOUT:if(i){const c=n.loadLevelObj;if(c&&(i.type===de.AUDIO_TRACK&&c.hasAudioGroup(i.groupId)||i.type===de.SUBTITLE_TRACK&&c.hasSubtitleGroup(i.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,n.loadLevel),t.errorAction.action=ir.SendAlternateToPenaltyBox,t.errorAction.flags=Xe.MoveAllAlternatesMatchingHost;return}}return;case O.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const c=n.loadLevelObj,p=c==null?void 0:c.attrs["HDCP-LEVEL"];p?t.errorAction={action:ir.SendAlternateToPenaltyBox,flags:Xe.MoveAllAlternatesMatchingHDCP,hdcpLevel:p}:this.keySystemError(t)}return;case O.BUFFER_ADD_CODEC_ERROR:case O.REMUX_ALLOC_ERROR:case O.BUFFER_APPEND_ERROR:if(!t.errorAction){var h;t.errorAction=this.getLevelSwitchAction(t,(h=t.level)!=null?h:n.loadLevel)}return;case O.INTERNAL_EXCEPTION:case O.BUFFER_APPENDING_ERROR:case O.BUFFER_FULL_ERROR:case O.LEVEL_SWITCH_ERROR:case O.BUFFER_STALLED_ERROR:case O.BUFFER_SEEK_OVER_HOLE:case O.BUFFER_NUDGE_ON_STALL:t.errorAction=Jt();return}t.type===_e.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=Mr(r.config.playlistLoadPolicy,e),i=this.playlistError++;if(pn(n,i,kr(e),e.response))return{action:ir.RetryRequest,flags:Xe.None,retryConfig:n,retryCount:i};const l=this.getLevelSwitchAction(e,t);return n&&(l.retryConfig=n,l.retryCount=i),l}getFragRetryOrSwitchAction(e){const t=this.hls,r=this.getVariantLevelIndex(e.frag),n=t.levels[r],{fragLoadPolicy:i,keyLoadPolicy:s}=t.config,l=Mr(e.details.startsWith("key")?s:i,e),h=t.levels.reduce((p,_)=>p+_.fragmentError,0);if(n&&(e.details!==O.FRAG_GAP&&n.fragmentError++,pn(l,h,kr(e),e.response)))return{action:ir.RetryRequest,flags:Xe.None,retryConfig:l,retryCount:h};const c=this.getLevelSwitchAction(e,r);return l&&(c.retryConfig=l,c.retryCount=h),c}getLevelSwitchAction(e,t){const r=this.hls;t==null&&(t=r.loadLevel);const n=this.hls.levels[t];if(n){var i,s;const c=e.details;n.loadError++,c===O.BUFFER_APPEND_ERROR&&n.fragmentError++;let p=-1;const{levels:_,loadLevel:A,minAutoLevel:L,maxAutoLevel:I}=r;r.autoLevelEnabled||(r.loadLevel=-1);const re=(i=e.frag)==null?void 0:i.type,ke=(re===ie.AUDIO&&c===O.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(c===O.BUFFER_ADD_CODEC_ERROR||c===O.BUFFER_APPEND_ERROR))&&_.some(({audioCodec:Tt})=>n.audioCodec!==Tt),He=e.sourceBufferName==="video"&&(c===O.BUFFER_ADD_CODEC_ERROR||c===O.BUFFER_APPEND_ERROR)&&_.some(({codecSet:Tt,audioCodec:dt})=>n.codecSet!==Tt&&n.audioCodec===dt),{type:ct,groupId:ht}=(s=e.context)!=null?s:{};for(let Tt=_.length;Tt--;){const dt=(Tt+A)%_.length;if(dt!==A&&dt>=L&&dt<=I&&_[dt].loadError===0){var l,h;const xt=_[dt];if(c===O.FRAG_GAP&&re===ie.MAIN&&e.frag){const It=_[dt].details;if(It){const pt=nr(e.frag,It.fragments,e.frag.start);if(pt!=null&&pt.gap)continue}}else{if(ct===de.AUDIO_TRACK&&xt.hasAudioGroup(ht)||ct===de.SUBTITLE_TRACK&&xt.hasSubtitleGroup(ht))continue;if(re===ie.AUDIO&&(l=n.audioGroups)!=null&&l.some(It=>xt.hasAudioGroup(It))||re===ie.SUBTITLE&&(h=n.subtitleGroups)!=null&&h.some(It=>xt.hasSubtitleGroup(It))||ke&&n.audioCodec===xt.audioCodec||!ke&&n.audioCodec!==xt.audioCodec||He&&n.codecSet===xt.codecSet)continue}p=dt;break}}if(p>-1&&r.loadLevel!==p)return e.levelRetry=!0,this.playlistError=0,{action:ir.SendAlternateToPenaltyBox,flags:Xe.None,nextAutoLevel:p}}return{action:ir.SendAlternateToPenaltyBox,flags:Xe.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var r;switch((r=t.errorAction)==null?void 0:r.action){case ir.DoNothing:break;case ir.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==O.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 ir.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 Xe.None:this.switchLevel(e,s);break;case Xe.MoveAllAlternatesMatchingHDCP:i&&(t.maxHdcpLevel=Ir[Ir.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){if(t!==void 0&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel,e.details===O.BUFFER_ADD_CODEC_ERROR&&e.mimeType&&e.sourceBufferName!=="audiovideo")){const r=$t(e.mimeType),n=this.hls.levels;for(let i=n.length;i--;)n[i][`${e.sourceBufferName}Codec`]===r&&this.hls.removeLevel(i)}}}function Jt(a){const e={action:ir.DoNothing,flags:Xe.None};return a&&(e.resolved=!0),e}var yr={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class Sn{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(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.BUFFER_APPENDED,this.onBufferAppended,this),e.on(m.FRAG_BUFFERED,this.onFragBuffered,this),e.on(m.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:e}=this;e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.BUFFER_APPENDED,this.onBufferAppended,this),e.off(m.FRAG_BUFFERED,this.onFragBuffered,this),e.off(m.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){return this.getFragAtPos(e,t,!0)}getFragAtPos(e,t,r){const{fragments:n}=this,i=Object.keys(n);for(let s=i.length;s--;){const l=n[i[s]];if((l==null?void 0:l.body.type)===t&&(!r||l.buffered)){const h=l.body;if(h.start<=e&&e<=h.end)return h}}return null}detectEvictedFragments(e,t,r,n,i){this.timeRanges&&(this.timeRanges[e]=t);const s=(n==null?void 0:n.fragment.sn)||-1;Object.keys(this.fragments).forEach(l=>{const h=this.fragments[l];if(!h||s>=h.body.sn)return;if(!h.buffered&&(!h.loaded||i)){h.body.type===r&&this.removeFragment(h.body);return}const c=h.range[e];if(c){if(c.time.length===0){this.removeFragment(h.body);return}c.time.some(p=>{const _=!this.isTimeBuffered(p.startPTS,p.endPTS,t);return _&&this.removeFragment(h.body),_})}})}detectPartialFragments(e){const t=this.timeRanges;if(!t||e.frag.sn==="initSegment")return;const r=e.frag,n=In(r),i=this.fragments[n];if(!i||i.buffered&&r.gap)return;const s=!r.relurl;Object.keys(t).forEach(l=>{const h=r.elementaryStreams[l];if(!h)return;const c=t[l],p=s||h.partial===!0;i.range[l]=this.getBufferedTimes(r,e.part,p,c)}),i.loaded=null,Object.keys(i.range).length?(i.buffered=!0,(i.body.endList=r.endList||i.body.endList)&&(this.endListFragments[i.body.type]=i),vn(i)||this.removeParts(r.sn-1,r.type)):this.removeFragment(i.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=In(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,l=e.end,h=e.minEndPTS||l,c=e.maxStartPTS||s;for(let p=0;p<n.length;p++){const _=n.start(p)-this.bufferPadding,A=n.end(p)+this.bufferPadding;if(c>=_&&h<=A){i.time.push({startPTS:Math.max(s,n.start(p)),endPTS:Math.min(l,n.end(p))});break}else if(s<A&&l>_){const L=Math.max(s,n.start(p)),I=Math.min(l,n.end(p));I>L&&(i.partial=!0,i.time.push({startPTS:L,endPTS:I}))}else if(l<=_)break}return i}getPartialFragment(e){let t=null,r,n,i,s=0;const{bufferPadding:l,fragments:h}=this;return Object.keys(h).forEach(c=>{const p=h[c];p&&vn(p)&&(n=p.body.start-l,i=p.body.end+l,e>=n&&e<=i&&(r=Math.min(e-n,i-e),s<=r&&(t=p.body,s=r)))}),t}isEndListAppended(e){const t=this.endListFragments[e];return t!==void 0&&(t.buffered||vn(t))}getState(e){const t=In(e),r=this.fragments[t];return r?r.buffered?vn(r)?yr.PARTIAL:yr.OK:yr.APPENDING:yr.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}onManifestLoading(){this.removeAllFragments()}onFragLoaded(e,t){if(t.frag.sn==="initSegment"||t.frag.bitrateTest)return;const r=t.frag,n=t.part?null:t,i=In(r);this.fragments[i]={body:r,appendedPTS:null,loaded:n,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:r,part:n,timeRanges:i,type:s}=t;if(r.sn==="initSegment")return;const l=r.type;if(n){let c=this.activePartLists[l];c||(this.activePartLists[l]=c=[]),c.push(n)}this.timeRanges=i;const h=i[s];this.detectEvictedFragments(s,h,l,n)}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=In(e);return!!this.fragments[t]}hasFragments(e){const{fragments:t}=this,r=Object.keys(t);if(!e)return r.length>0;for(let n=r.length;n--;){const i=t[r[n]];if((i==null?void 0:i.body.type)===e)return!0}return!1}hasParts(e){var t;return!!((t=this.activePartLists[e])!=null&&t.length)}removeFragmentsInRange(e,t,r,n,i){n&&!this.hasGaps||Object.keys(this.fragments).forEach(s=>{const l=this.fragments[s];if(!l)return;const h=l.body;h.type!==r||n&&!h.gap||h.start<t&&h.end>e&&(l.buffered||i)&&this.removeFragment(h)})}removeFragment(e){const t=In(e);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(){var e,t;this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1;const r=(e=this.hls)==null||(t=e.latestLevelDetails)==null?void 0:t.partList;r&&r.forEach(n=>n.clearElementaryStreamInfo())}}function vn(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 In(a){return`${a.type}_${a.level}_${a.sn}`}var Sr={cbc:0,ctr:1};class wn{constructor(e,t,r){this.subtle=void 0,this.aesIV=void 0,this.aesMode=void 0,this.subtle=e,this.aesIV=t,this.aesMode=r}decrypt(e,t){switch(this.aesMode){case Sr.cbc:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e);case Sr.ctr:return this.subtle.decrypt({name:"AES-CTR",counter:this.aesIV,length:64},t,e);default:throw new Error(`[AESCrypto] invalid aes mode ${this.aesMode}`)}}}function Rn(a){const e=a.byteLength,t=e&&new DataView(a.buffer).getUint8(e-1);return t?a.slice(0,e-t):a}class hn{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],l=r[3],h=this.invSubMix,c=h[0],p=h[1],_=h[2],A=h[3],L=new Uint32Array(256);let I=0,re=0,ce=0;for(ce=0;ce<256;ce++)ce<128?L[ce]=ce<<1:L[ce]=ce<<1^283;for(ce=0;ce<256;ce++){let ke=re^re<<1^re<<2^re<<3^re<<4;ke=ke>>>8^ke&255^99,e[I]=ke,t[ke]=I;const We=L[I],He=L[We],ct=L[He];let ht=L[ke]*257^ke*16843008;n[I]=ht<<24|ht>>>8,i[I]=ht<<16|ht>>>16,s[I]=ht<<8|ht>>>24,l[I]=ht,ht=ct*16843009^He*65537^We*257^I*16843008,c[ke]=ht<<24|ht>>>8,p[ke]=ht<<16|ht>>>16,_[ke]=ht<<8|ht>>>24,A[ke]=ht,I?(I=We^L[L[L[ct^We]]],re^=L[L[re]]):I=re=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 l,h;const c=this.keySchedule=new Uint32Array(s),p=this.invKeySchedule=new Uint32Array(s),_=this.sBox,A=this.rcon,L=this.invSubMix,I=L[0],re=L[1],ce=L[2],ke=L[3];let We,He;for(l=0;l<s;l++){if(l<i){We=c[l]=t[l];continue}He=We,l%i===0?(He=He<<8|He>>>24,He=_[He>>>24]<<24|_[He>>>16&255]<<16|_[He>>>8&255]<<8|_[He&255],He^=A[l/i|0]<<24):i>6&&l%i===4&&(He=_[He>>>24]<<24|_[He>>>16&255]<<16|_[He>>>8&255]<<8|_[He&255]),c[l]=We=(c[l-i]^He)>>>0}for(h=0;h<s;h++)l=s-h,h&3?He=c[l]:He=c[l-4],h<4||l<=4?p[h]=He:p[h]=I[_[He>>>24]]^re[_[He>>>16&255]]^ce[_[He>>>8&255]]^ke[_[He&255]],p[h]=p[h]>>>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,l=this.invSubMix,h=l[0],c=l[1],p=l[2],_=l[3],A=this.uint8ArrayToUint32Array_(r);let L=A[0],I=A[1],re=A[2],ce=A[3];const ke=new Int32Array(e),We=new Int32Array(ke.length);let He,ct,ht,Tt,dt,xt,It,pt,Ht,er,tn,Cr,br,ur;const xr=this.networkToHostOrderSwap;for(;t<ke.length;){for(Ht=xr(ke[t]),er=xr(ke[t+1]),tn=xr(ke[t+2]),Cr=xr(ke[t+3]),dt=Ht^i[0],xt=Cr^i[1],It=tn^i[2],pt=er^i[3],br=4,ur=1;ur<n;ur++)He=h[dt>>>24]^c[xt>>16&255]^p[It>>8&255]^_[pt&255]^i[br],ct=h[xt>>>24]^c[It>>16&255]^p[pt>>8&255]^_[dt&255]^i[br+1],ht=h[It>>>24]^c[pt>>16&255]^p[dt>>8&255]^_[xt&255]^i[br+2],Tt=h[pt>>>24]^c[dt>>16&255]^p[xt>>8&255]^_[It&255]^i[br+3],dt=He,xt=ct,It=ht,pt=Tt,br=br+4;He=s[dt>>>24]<<24^s[xt>>16&255]<<16^s[It>>8&255]<<8^s[pt&255]^i[br],ct=s[xt>>>24]<<24^s[It>>16&255]<<16^s[pt>>8&255]<<8^s[dt&255]^i[br+1],ht=s[It>>>24]<<24^s[pt>>16&255]<<16^s[dt>>8&255]<<8^s[xt&255]^i[br+2],Tt=s[pt>>>24]<<24^s[dt>>16&255]<<16^s[xt>>8&255]<<8^s[It&255]^i[br+3],We[t]=xr(He^L),We[t+1]=xr(Tt^I),We[t+2]=xr(ht^re),We[t+3]=xr(ct^ce),L=Ht,I=er,re=tn,ce=Cr,t=t+4}return We.buffer}}class ai{constructor(e,t,r){this.subtle=void 0,this.key=void 0,this.aesMode=void 0,this.subtle=e,this.key=t,this.aesMode=r}expandKey(){const e=oi(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}function oi(a){switch(a){case Sr.cbc:return"AES-CBC";case Sr.ctr:return"AES-CTR";default:throw new Error(`[FastAESKey] invalid aes mode ${a}`)}}const qn=16;class Vn{constructor(e,{removePKCS7Padding:t=!0}={}){if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.enableSoftwareAES=void 0,this.enableSoftwareAES=e.enableSoftwareAES,this.removePKCS7Padding=t,t)try{const 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?Rn(r):r}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,t,r,n){return this.useSoftware?new Promise((i,s)=>{const l=ArrayBuffer.isView(e)?e:new Uint8Array(e);this.softwareDecrypt(l,t,r,n);const h=this.flush();h?i(h.buffer):s(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(e),t,r,n)}softwareDecrypt(e,t,r,n){const{currentIV:i,currentResult:s,remainderData:l}=this;if(n!==Sr.cbc||t.byteLength!==16)return J.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),l&&(e=De(l,e),this.remainderData=null);const h=this.getValidChunk(e);if(!h.length)return null;i&&(r=i);let c=this.softwareDecrypter;c||(c=this.softwareDecrypter=new hn),c.expandKey(t);const p=s;return this.currentResult=c.decrypt(h.buffer,0,r),this.currentIV=h.slice(-16).buffer,p||null}webCryptoDecrypt(e,t,r,n){if(this.key!==t||!this.fastAesKey){if(!this.subtle)return Promise.resolve(this.onWebCryptoError(e,t,r,n));this.key=t,this.fastAesKey=new ai(this.subtle,t,n)}return this.fastAesKey.expandKey().then(i=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new wn(this.subtle,new Uint8Array(r),n).decrypt(e.buffer,i)):Promise.reject(new Error("web crypto not initialized"))).catch(i=>(J.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${i.name}: ${i.message}`),this.onWebCryptoError(e,t,r,n)))}onWebCryptoError(e,t,r,n){const i=this.enableSoftwareAES;if(i){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,r,n);const s=this.flush();if(s)return s.buffer}throw new Error("WebCrypto"+(i?" and softwareDecrypt":"")+": failed to decrypt data")}getValidChunk(e){let t=e;const r=e.length-e.length%qn;return r!==e.length&&(t=e.slice(0,r),this.remainderData=e.slice(r)),t}logOnce(e){this.logEnabled&&(J.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const rr=Math.pow(2,17);class Tn{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 Mn({type:_e.NETWORK_ERROR,details:O.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((l,h)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(I=>I[0]==="GAP")){h(Pn(e));return}else e.gap=!1;const c=this.loader=i?new i(n):new s(n),p=nn(e);e.loader=c;const _=Wr(n.fragLoadPolicy.default),A={loadPolicy:_,timeout:_.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:rr};e.stats=c.stats;const L={onSuccess:(I,re,ce,ke)=>{this.resetLoader(e,c);let We=I.data;ce.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(We.slice(0,16)),We=We.slice(16)),l({frag:e,part:null,payload:We,networkDetails:ke})},onError:(I,re,ce,ke)=>{this.resetLoader(e,c),h(new Mn({type:_e.NETWORK_ERROR,details:O.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:S({url:r,data:void 0},I),error:new Error(`HTTP Error ${I.code} ${I.text}`),networkDetails:ce,stats:ke}))},onAbort:(I,re,ce)=>{this.resetLoader(e,c),h(new Mn({type:_e.NETWORK_ERROR,details:O.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:ce,stats:I}))},onTimeout:(I,re,ce)=>{this.resetLoader(e,c),h(new Mn({type:_e.NETWORK_ERROR,details:O.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${A.timeout}ms`),networkDetails:ce,stats:I}))}};t&&(L.onProgress=(I,re,ce,ke)=>t({frag:e,part:null,payload:ce,networkDetails:ke})),c.load(p,A,L)})}loadPart(e,t,r){this.abort();const n=this.config,i=n.fLoader,s=n.loader;return new Promise((l,h)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap){h(Pn(e,t));return}const c=this.loader=i?new i(n):new s(n),p=nn(e,t);e.loader=c;const _=Wr(n.fragLoadPolicy.default),A={loadPolicy:_,timeout:_.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:rr};t.stats=c.stats,c.load(p,A,{onSuccess:(L,I,re,ce)=>{this.resetLoader(e,c),this.updateStatsFromPart(e,t);const ke={frag:e,part:t,payload:L.data,networkDetails:ce};r(ke),l(ke)},onError:(L,I,re,ce)=>{this.resetLoader(e,c),h(new Mn({type:_e.NETWORK_ERROR,details:O.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:S({url:p.url,data:void 0},L),error:new Error(`HTTP Error ${L.code} ${L.text}`),networkDetails:re,stats:ce}))},onAbort:(L,I,re)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,c),h(new Mn({type:_e.NETWORK_ERROR,details:O.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:re,stats:L}))},onTimeout:(L,I,re)=>{this.resetLoader(e,c),h(new Mn({type:_e.NETWORK_ERROR,details:O.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${A.timeout}ms`),networkDetails:re,stats:L}))}})})}updateStatsFromPart(e,t){const r=e.stats,n=t.stats,i=n.total;if(r.loaded+=n.loaded,i){const h=Math.round(e.duration/t.duration),c=Math.min(Math.round(r.loaded/i),h),_=(h-c)*Math.round(r.loaded/c);r.total=r.loaded+_}else r.total=Math.max(r.loaded,r.total);const s=r.loading,l=n.loading;s.start?s.first+=l.first-l.start:(s.start=l.start,s.first=l.first),s.end=l.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function nn(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($(n)&&$(i)){var s;let l=n,h=i;if(a.sn==="initSegment"&&li((s=a.decryptdata)==null?void 0:s.method)){const c=i-n;c%16&&(h=i+(16-c%16)),n!==0&&(r.resetIV=!0,l=n-16)}r.rangeStart=l,r.rangeEnd=h}return r}function Pn(a,e){const t=new Error(`GAP ${a.gap?"tag":"attribute"} found`),r={type:_e.MEDIA_ERROR,details:O.FRAG_GAP,fatal:!1,frag:a,error:t,networkDetails:null};return e&&(r.part=e),(e||a).stats.aborted=!0,new Mn(r)}function li(a){return a==="AES-128"||a==="AES-256"}class Mn extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class _n extends q{constructor(e,t){super(e,t),this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}destroy(){this.onHandlerDestroying(),this.onHandlerDestroyed()}onHandlerDestroying(){this.clearNextTick(),this.clearInterval()}onHandlerDestroyed(){}hasInterval(){return!!this._tickInterval}hasNextTick(){return!!this._tickTimer}setInterval(e){return this._tickInterval?!1:(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)}clearInterval(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1}clearNextTick(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1}tick(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)}tickImmediate(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}doTick(){}}class Un{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=sn(),this.buffering={audio:sn(),video:sn(),audiovideo:sn()},this.level=e,this.sn=t,this.id=r,this.size=n,this.part=i,this.partial=s}}function sn(){return{start:0,executeStart:0,executeEnd:0,end:0}}const ni={length:0,start:()=>0,end:()=>0};class pr{static isBuffered(e,t){if(e){const r=pr.getBuffered(e);for(let n=r.length;n--;)if(t>=r.start(n)&&t<=r.end(n))return!0}return!1}static bufferedRanges(e){if(e){const t=pr.getBuffered(e);return pr.timeRangesToArray(t)}return[]}static timeRangesToArray(e){const t=[];for(let r=0;r<e.length;r++)t.push({start:e.start(r),end:e.end(r)});return t}static bufferInfo(e,t,r){if(e){const n=pr.bufferedRanges(e);if(n.length)return pr.bufferedInfo(n,t,r)}return{len:0,start:t,end:t,bufferedIndex:-1}}static bufferedInfo(e,t,r){t=Math.max(0,t),e.length>1&&e.sort((p,_)=>p.start-_.start||_.end-p.end);let n=-1,i=[];if(r)for(let p=0;p<e.length;p++){t>=e[p].start&&t<=e[p].end&&(n=p);const _=i.length;if(_){const A=i[_-1].end;e[p].start-A<r?e[p].end>A&&(i[_-1].end=e[p].end):i.push(e[p])}else i.push(e[p])}else i=e;let s=0,l,h=t,c=t;for(let p=0;p<i.length;p++){const _=i[p].start,A=i[p].end;if(n===-1&&t>=_&&t<=A&&(n=p),t+r>=_&&t<A)h=_,c=A,s=c-t;else if(t+r<_){l=_;break}}return{len:s,start:h||0,end:c||0,nextStart:l,buffered:e,bufferedIndex:n}}static getBuffered(e){try{return e.buffered||ni}catch(t){return J.log("failed to get media.buffered",t),ni}}}const ii=/\{\$([a-zA-Z0-9-_]+)\}/g;function ri(a){return ii.test(a)}function Zn(a,e){if(a.variableList!==null||a.hasVariableRefs){const t=a.variableList;return e.replace(ii,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 Hr(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 ui(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}"`))}const Ti=/^(\d+)x(\d+)$/,vi=/(.+?)=(".*?"|.*?)(?:,|$)/g;class Ar{constructor(e,t){typeof e=="string"&&(e=Ar.parseAttrList(e,t)),E(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}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]}enumeratedStringList(e,t){const r=this[e];return(r?r.split(/[ ,]+/):[]).reduce((n,i)=>(n[i.toLowerCase()]=!0,n),t)}bool(e){return this[e]==="YES"}decimalResolution(e){const t=Ti.exec(this[e]);if(t!==null)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e,t){let r;const n={},i='"';for(vi.lastIndex=0;(r=vi.exec(e))!==null;){const s=r[1].trim();let l=r[2];const h=l.indexOf(i)===0&&l.lastIndexOf(i)===l.length-1;let c=!1;if(h)l=l.slice(1,-1);else switch(s){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":c=!0}if(t&&(h||c))l=Zn(t,l);else if(!c&&!h)switch(s){case"CLOSED-CAPTIONS":if(l==="NONE")break;case"ALLOWED-CPC":case"CLASS":case"ASSOC-LANGUAGE":case"AUDIO":case"BYTERANGE":case"CHANNELS":case"CHARACTERISTICS":case"CODECS":case"DATA-ID":case"END-DATE":case"GROUP-ID":case"ID":case"IMPORT":case"INSTREAM-ID":case"KEYFORMAT":case"KEYFORMATVERSIONS":case"LANGUAGE":case"NAME":case"PATHWAY-ID":case"QUERYPARAM":case"RECENTLY-REMOVED-DATERANGES":case"SERVER-URI":case"STABLE-RENDITION-ID":case"STABLE-VARIANT-ID":case"START-DATE":case"SUBTITLES":case"SUPPLEMENTAL-CODECS":case"URI":case"VALUE":case"VIDEO":case"X-ASSET-LIST":case"X-ASSET-URI":J.warn(`${e}: attribute ${s} is missing quotes`)}n[s]=l}return n}}const _i="com.apple.hls.interstitial";function Ri(a){return a!=="ID"&&a!=="CLASS"&&a!=="CUE"&&a!=="START-DATE"&&a!=="DURATION"&&a!=="END-DATE"&&a!=="END-ON-NEXT"}function Gt(a){return a==="SCTE35-OUT"||a==="SCTE35-IN"||a==="SCTE35-CMD"}class Hn{constructor(e,t,r=0){var n;if(this.attr=void 0,this.tagAnchor=void 0,this.tagOrder=void 0,this._startDate=void 0,this._endDate=void 0,this._dateAtEnd=void 0,this._cue=void 0,this._badValueForSameId=void 0,this.tagAnchor=(t==null?void 0:t.tagAnchor)||null,this.tagOrder=(n=t==null?void 0:t.tagOrder)!=null?n:r,t){const i=t.attr;for(const s in i)if(Object.prototype.hasOwnProperty.call(e,s)&&e[s]!==i[s]){J.warn(`DATERANGE tag attribute: "${s}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=s;break}e=E(new Ar({}),i,e)}if(this.attr=e,t?(this._startDate=t._startDate,this._cue=t._cue,this._endDate=t._endDate,this._dateAtEnd=t._dateAtEnd):this._startDate=new Date(e["START-DATE"]),"END-DATE"in this.attr){const i=(t==null?void 0:t.endDate)||new Date(this.attr["END-DATE"]);$(i.getTime())&&(this._endDate=i)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get cue(){const e=this._cue;return e===void 0?this._cue=this.attr.enumeratedStringList(this.attr.CUE?"CUE":"X-CUE",{pre:!1,post:!1,once:!1}):e}get startTime(){const{tagAnchor:e}=this;return e===null||e.programDateTime===null?(J.warn(`Expected tagAnchor Fragment with PDT set for DateRange "${this.id}": ${e}`),NaN):e.start+(this.startDate.getTime()-e.programDateTime)/1e3}get startDate(){return this._startDate}get endDate(){const e=this._endDate||this._dateAtEnd;if(e)return e;const t=this.duration;return t!==null?this._dateAtEnd=new Date(this._startDate.getTime()+t*1e3):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if($(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isInterstitial(){return this.class===_i}get isValid(){return!!this.id&&!this._badValueForSameId&&$(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)&&(!this.attr.CUE||!this.cue.pre&&!this.cue.post||this.cue.pre!==this.cue.post)&&(!this.isInterstitial||"X-ASSET-URI"in this.attr||"X-ASSET-LIST"in this.attr)}}const ci=10;class hi{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.dateRangeTagCount=0,this.live=!0,this.requestScheduled=-1,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.appliedTimelineOffset=void 0,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e){this.advanced=!0,this.updated=!0;return}const t=this.lastPartSn-e.lastPartSn,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}get hasProgramDateTime(){return this.fragments.length?$(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||ci}get drift(){const e=this.driftEndTime-this.driftStartTime;return e>0?(this.driftEnd-this.driftStart)*1e3/e:1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){var e;return(e=this.fragments)!=null&&e.length?this.fragments[this.fragments.length-1].end:0}get fragmentStart(){var e;return(e=this.fragments)!=null&&e.length?this.fragments[0].start:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].index:-1}get maxPartIndex(){const e=this.partList;if(e){const t=this.lastPartIndex;if(t!==-1){for(let r=e.length;r--;)if(e[r].index>t)return e[r].index;return t}}return 0}get lastPartSn(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}get expired(){if(this.live&&this.age&&this.misses<3){const e=this.partEnd-this.fragmentStart;return this.age>Math.max(e,this.totalduration)+this.levelTargetDuration}return!1}}function An(a){return a==="AES-128"||a==="AES-256"||a==="AES-256-CTR"}function yn(a){switch(a){case"AES-128":case"AES-256":return Sr.cbc;case"AES-256-CTR":return Sr.ctr;default:throw new Error(`invalid full segment method ${a}`)}}function Xr(a){return Uint8Array.from(atob(a),e=>e.charCodeAt(0))}function Cn(a){return Uint8Array.from(unescape(encodeURIComponent(a)),e=>e.charCodeAt(0))}function Jn(a){const e=Cn(a).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function ei(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 Wn(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=Xr(s)):t=Jn(s)}}return t}const $n=typeof self!="undefined"?self:void 0;var Jr={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},jn={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function Li(a){switch(a){case jn.FAIRPLAY:return Jr.FAIRPLAY;case jn.PLAYREADY:return Jr.PLAYREADY;case jn.WIDEVINE:return Jr.WIDEVINE;case jn.CLEARKEY:return Jr.CLEARKEY}}var Oi={CENC:"1077efecc0b24d02ace33c1e52e2fb4b",CLEARKEY:"e2719d58a985b3c9781ab030af78d30e",PLAYREADY:"9a04f07998404286ab92e65be0885f95",WIDEVINE:"edef8ba979d64acea3c827dcd51d21ed"};function Pi(a){if(a===Oi.WIDEVINE)return Jr.WIDEVINE;if(a===Oi.PLAYREADY)return Jr.PLAYREADY;if(a===Oi.CENC||a===Oi.CLEARKEY)return Jr.CLEARKEY}function Ai(a){switch(a){case Jr.FAIRPLAY:return jn.FAIRPLAY;case Jr.PLAYREADY:return jn.PLAYREADY;case Jr.WIDEVINE:return jn.WIDEVINE;case Jr.CLEARKEY:return jn.CLEARKEY}}function ar(a){const{drmSystems:e,widevineLicenseUrl:t}=a,r=e?[Jr.FAIRPLAY,Jr.WIDEVINE,Jr.PLAYREADY,Jr.CLEARKEY].filter(n=>!!e[n]):[];return!r[Jr.WIDEVINE]&&t&&r.push(Jr.WIDEVINE),r}const fr=function(a){return $n!=null&&(a=$n.navigator)!=null&&a.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function bn(a,e,t,r){let n;switch(a){case Jr.FAIRPLAY:n=["cenc","sinf"];break;case Jr.WIDEVINE:case Jr.PLAYREADY:n=["cenc"];break;case Jr.CLEARKEY:n=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${a}`)}return Ln(n,e,t,r)}function Ln(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 an(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 l=s.childNodes[0]?s.childNodes[0].nodeValue:s.getAttribute("VALUE");if(l){const h=Xr(l).subarray(0,16);return ei(h),h}}return null}let di={};class Ci{static clearKeyUriToKeyIdMap(){di={}}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&&!An(e)}isSupported(){if(this.method){if(An(this.method)||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case jn.FAIRPLAY:case jn.WIDEVINE:case jn.PLAYREADY:case jn.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(An(this.method)&&this.uri&&!this.iv){typeof e!="number"&&(J.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const r=ji(e);return new Ci(this.method,this.uri,"identity",this.keyFormatVersions,r)}const t=Wn(this.uri);if(t)switch(this.keyFormat){case jn.WIDEVINE:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case jn.PLAYREADY:{const r=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=T(r,null,t),this.keyId=an(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=di[this.uri];if(!r){const n=Object.keys(di).length%Number.MAX_SAFE_INTEGER;r=new Uint8Array(16),new DataView(r.buffer,12,4).setUint32(0,n),di[this.uri]=r}this.keyId=r}return this}}function ji(a){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=a>>8*(15-t)&255;return e}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,ss=/#EXT-X-MEDIA:(.*)/g,Gs=/^#EXT(?:INF|-X-TARGETDURATION):/m,as=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#.*/.source].join("|"),"g"),os=new RegExp([/#EXT-X-(PROGRAM-DATE-TIME|BYTERANGE|DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP|INDEPENDENT-SEGMENTS)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class bi{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 G.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return Gs.test(e)}static parseMasterPlaylist(e,t){const r=ri(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 l;const c=new Ar(s[1],n),p=Zn(n,s[2]),_={attrs:c,bitrate:c.decimalInteger("BANDWIDTH")||c.decimalInteger("AVERAGE-BANDWIDTH"),name:c.NAME,url:bi.resolve(p,t)},A=c.decimalResolution("RESOLUTION");A&&(_.width=A.width,_.height=A.height),us(c.CODECS,_);const L=c["SUPPLEMENTAL-CODECS"];L&&(_.supplemental={},us(L,_.supplemental)),(l=_.unknownCodecs)!=null&&l.length||i.push(_),n.levels.push(_)}else if(s[3]){const c=s[3],p=s[4];switch(c){case"SESSION-DATA":{const _=new Ar(p,n),A=_["DATA-ID"];A&&(n.sessionData===null&&(n.sessionData={}),n.sessionData[A]=_);break}case"SESSION-KEY":{const _=ls(p,t,n);_.encrypted&&_.isSupported()?(n.sessionKeys===null&&(n.sessionKeys=[]),n.sessionKeys.push(_)):J.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${p}"`);break}case"DEFINE":{{const _=new Ar(p,n);Hr(n,_,t)}break}case"CONTENT-STEERING":{const _=new Ar(p,n);n.contentSteering={uri:bi.resolve(_["SERVER-URI"],t),pathwayId:_["PATHWAY-ID"]||"."};break}case"START":{n.startTimeOffset=qi(p);break}}}const h=i.length>0&&i.length<n.levels.length;return n.levels=h?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,l={AUDIO:s.map(c=>({id:c.attrs.AUDIO,audioCodec:c.audioCodec})),SUBTITLES:s.map(c=>({id:c.attrs.SUBTITLES,textCodec:c.textCodec})),"CLOSED-CAPTIONS":[]};let h=0;for(ss.lastIndex=0;(n=ss.exec(e))!==null;){const c=new Ar(n[1],r),p=c.TYPE;if(p){const _=l[p],A=i[p]||[];i[p]=A;const L=c.LANGUAGE,I=c["ASSOC-LANGUAGE"],re=c.CHANNELS,ce=c.CHARACTERISTICS,ke=c["INSTREAM-ID"],We={attrs:c,bitrate:0,id:h++,groupId:c["GROUP-ID"]||"",name:c.NAME||L||"",type:p,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:L,url:c.URI?bi.resolve(c.URI,t):""};if(I&&(We.assocLang=I),re&&(We.channels=re),ce&&(We.characteristics=ce),ke&&(We.instreamId=ke),_!=null&&_.length){const He=bi.findGroup(_,We.groupId)||_[0];Qi(We,He,"audioCodec"),Qi(We,He,"textCodec")}A.push(We)}}return i}static parseLevelPlaylist(e,t,r,n,i,s){var l;const h={url:t},c=new hi(t),p=c.fragments,_=[];let A=null,L=0,I=0,re=0,ce=0,ke=0,We=null,He=new Le(n,h),ct,ht,Tt,dt=-1,xt=!1,It=null,pt;if(as.lastIndex=0,c.m3u8=e,c.hasVariableRefs=ri(e),((l=as.exec(e))==null?void 0:l[0])!=="#EXTM3U")return c.playlistParsingError=new Error("Missing format identifier #EXTM3U"),c;for(;(ct=as.exec(e))!==null;){xt&&(xt=!1,He=new Le(n,h),He.playlistOffset=re,He.start=re,He.sn=L,He.cc=ce,ke&&(He.bitrate=ke),He.level=r,A&&(He.initSegment=A,A.rawProgramDateTime&&(He.rawProgramDateTime=A.rawProgramDateTime,A.rawProgramDateTime=null),It&&(He.setByteRange(It),It=null)));const Cr=ct[1];if(Cr){He.duration=parseFloat(Cr);const br=(" "+ct[2]).slice(1);He.title=br||null,He.tagList.push(br?["INF",Cr,br]:["INF",Cr])}else if(ct[3]){if($(He.duration)){He.playlistOffset=re,He.start=re,Tt&&Cs(He,Tt,c),He.sn=L,He.level=r,He.cc=ce,p.push(He);const br=(" "+ct[3]).slice(1);He.relurl=Zn(c,br),Ji(He,We,_),We=He,re+=He.duration,L++,I=0,xt=!0}}else{if(ct=ct[0].match(os),!ct){J.warn("No matches on slow regex match for level playlist!");continue}for(ht=1;ht<ct.length&&ct[ht]===void 0;ht++);const br=(" "+ct[ht]).slice(1),ur=(" "+ct[ht+1]).slice(1),xr=ct[ht+2]?(" "+ct[ht+2]).slice(1):null;switch(br){case"BYTERANGE":We?He.setByteRange(ur,We):He.setByteRange(ur);break;case"PROGRAM-DATE-TIME":He.rawProgramDateTime=ur,He.tagList.push(["PROGRAM-DATE-TIME",ur]),dt===-1&&(dt=p.length);break;case"PLAYLIST-TYPE":c.type&&fi(c,br,ct),c.type=ur.toUpperCase();break;case"MEDIA-SEQUENCE":c.startSN!==0?fi(c,br,ct):p.length>0&&js(c,br,ct),L=c.startSN=parseInt(ur);break;case"SKIP":{c.skippedSegments&&fi(c,br,ct);const vr=new Ar(ur,c),jt=vr.decimalInteger("SKIPPED-SEGMENTS");if($(jt)){c.skippedSegments+=jt;for(let Nr=jt;Nr--;)p.push(null);L+=jt}const Yt=vr.enumeratedString("RECENTLY-REMOVED-DATERANGES");Yt&&(c.recentlyRemovedDateranges=(c.recentlyRemovedDateranges||[]).concat(Yt.split(" ")));break}case"TARGETDURATION":c.targetduration!==0&&fi(c,br,ct),c.targetduration=Math.max(parseInt(ur),1);break;case"VERSION":c.version!==null&&fi(c,br,ct),c.version=parseInt(ur);break;case"INDEPENDENT-SEGMENTS":break;case"ENDLIST":c.live||fi(c,br,ct),c.live=!1;break;case"#":(ur||xr)&&He.tagList.push(xr?[ur,xr]:[ur]);break;case"DISCONTINUITY":ce++,He.tagList.push(["DIS"]);break;case"GAP":He.gap=!0,He.tagList.push([br]);break;case"BITRATE":He.tagList.push([br,ur]),ke=parseInt(ur)*1e3,$(ke)?He.bitrate=ke:ke=0;break;case"DATERANGE":{const vr=new Ar(ur,c),jt=new Hn(vr,c.dateRanges[vr.ID],c.dateRangeTagCount);c.dateRangeTagCount++,jt.isValid||c.skippedSegments?c.dateRanges[jt.id]=jt:J.warn(`Ignoring invalid DATERANGE tag: "${ur}"`),He.tagList.push(["EXT-X-DATERANGE",ur]);break}case"DEFINE":{{const vr=new Ar(ur,c);"IMPORT"in vr?ui(c,vr,s):Hr(c,vr,t)}break}case"DISCONTINUITY-SEQUENCE":c.startCC!==0?fi(c,br,ct):p.length>0&&js(c,br,ct),c.startCC=ce=parseInt(ur);break;case"KEY":{const vr=ls(ur,t,c);if(vr.isSupported()){if(vr.method==="NONE"){Tt=void 0;break}Tt||(Tt={}),Tt[vr.keyFormat]&&(Tt=E({},Tt)),Tt[vr.keyFormat]=vr}else J.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${ur}"`);break}case"START":c.startTimeOffset=qi(ur);break;case"MAP":{const vr=new Ar(ur,c);if(He.duration){const jt=new Le(n,h);Hs(jt,vr,r,Tt),A=jt,He.initSegment=A,A.rawProgramDateTime&&!He.rawProgramDateTime&&(He.rawProgramDateTime=A.rawProgramDateTime)}else{const jt=He.byteRangeEndOffset;if(jt){const Yt=He.byteRangeStartOffset;It=`${jt-Yt}@${Yt}`}else It=null;Hs(He,vr,r,Tt),A=He,xt=!0}A.cc=ce;break}case"SERVER-CONTROL":{pt&&fi(c,br,ct),pt=new Ar(ur),c.canBlockReload=pt.bool("CAN-BLOCK-RELOAD"),c.canSkipUntil=pt.optionalFloat("CAN-SKIP-UNTIL",0),c.canSkipDateRanges=c.canSkipUntil>0&&pt.bool("CAN-SKIP-DATERANGES"),c.partHoldBack=pt.optionalFloat("PART-HOLD-BACK",0),c.holdBack=pt.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{c.partTarget&&fi(c,br,ct);const vr=new Ar(ur);c.partTarget=vr.decimalFloatingPoint("PART-TARGET");break}case"PART":{let vr=c.partList;vr||(vr=c.partList=[]);const jt=I>0?vr[vr.length-1]:void 0,Yt=I++,Nr=new Ar(ur,c),Dr=new Fe(Nr,He,h,Yt,jt);vr.push(Dr),He.duration+=Dr.duration;break}case"PRELOAD-HINT":{const vr=new Ar(ur,c);c.preloadHint=vr;break}case"RENDITION-REPORT":{const vr=new Ar(ur,c);c.renditionReports=c.renditionReports||[],c.renditionReports.push(vr);break}default:J.warn(`line parsed but not handled: ${ct}`);break}}}We&&!We.relurl?(p.pop(),re-=We.duration,c.partList&&(c.fragmentHint=We)):c.partList&&(Ji(He,We,_),He.cc=ce,c.fragmentHint=He,Tt&&Cs(He,Tt,c)),c.targetduration||(c.playlistParsingError=new Error("#EXT-X-TARGETDURATION is required"));const Ht=p.length,er=p[0],tn=p[Ht-1];if(re+=c.skippedSegments*c.targetduration,re>0&&Ht&&tn){c.averagetargetduration=re/Ht;const Cr=tn.sn;c.endSN=Cr!=="initSegment"?Cr:0,c.live||(tn.endList=!0),er&&c.startCC===void 0&&(c.startCC=er.cc),dt>0&&(oa(p,dt),er&&_.unshift(er))}else c.endSN=0,c.startCC=0;return c.fragmentHint&&(re+=c.fragmentHint.duration),c.totalduration=re,_.length&&c.dateRangeTagCount&&er&&xi(_,c),c.endCC=ce,c}}function xi(a,e){const t=a.length,r=a[t-1],n=e.live?1/0:e.totalduration,i=Object.keys(e.dateRanges);for(let s=i.length;s--;){const l=e.dateRanges[i[s]],h=l.startDate.getTime();l.tagAnchor=r.ref;for(let c=t;c--;){const p=Ei(e,h,a,c,n);if(p!==-1){l.tagAnchor=e.fragments[p].ref;break}}}}function Ei(a,e,t,r,n){const i=t[r];if(i){const l=i.programDateTime;if(e>=l||r===0){var s;const h=(((s=t[r+1])==null?void 0:s.start)||n)-i.start;if(e<=l+h*1e3){const c=t[r].sn-a.startSN,p=a.fragments;if(p.length>t.length){const A=(t[r+1]||p[p.length-1]).sn-a.startSN;for(let L=A;L>c;L--){const I=p[L].programDateTime;if(e>=I&&e<I+p[L].duration*1e3)return L}}return c}}}return-1}function ls(a,e,t){var r,n;const i=new Ar(a,t),s=(r=i.METHOD)!=null?r:"",l=i.URI,h=i.hexadecimalInteger("IV"),c=i.KEYFORMATVERSIONS,p=(n=i.KEYFORMAT)!=null?n:"identity";l&&i.IV&&!h&&J.error(`Invalid IV: ${i.IV}`);const _=l?bi.resolve(l,e):"",A=(c||"1").split("/").map(Number).filter(Number.isFinite);return new Ci(s,_,p,A,h)}function qi(a){const t=new Ar(a).decimalFloatingPoint("TIME-OFFSET");return $(t)?t:null}function us(a,e){let t=(a||"").split(/[ ,]+/).filter(r=>r);["video","audio","text"].forEach(r=>{const n=t.filter(i=>Be(i,r));n.length&&(e[`${r}Codec`]=n.map(i=>i.split("/")[0]).join(","),t=t.filter(i=>n.indexOf(i)===-1))}),e.unknownCodecs=t}function Qi(a,e,t){const r=e[t];r&&(a[t]=r)}function oa(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 Ji(a,e,t){a.rawProgramDateTime?t.push(a):e!=null&&e.programDateTime&&(a.programDateTime=e.endProgramDateTime)}function Hs(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 Cs(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)}function fi(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must not appear more than once (${t[0]})`)}function js(a,e,t){a.playlistParsingError=new Error(`#EXT-X-${e} must appear before the first Media Segment (${t[0]})`)}function cs(a,e){const t=e.startPTS;if($(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.setDuration(r)}else e.sn>a.sn?a.cc===e.cc&&a.minEndPTS?e.setStart(a.start+(a.minEndPTS-a.start)):e.setStart(a.start+a.duration):e.setStart(Math.max(a.start-e.duration,0))}function Ki(a,e,t,r,n,i){r-t<=0&&(J.warn("Fragment should have a positive duration",e),r=t+e.duration,i=n+e.duration);let l=t,h=r;const c=e.startPTS,p=e.endPTS;if($(c)){const ce=Math.abs(c-t);$(e.deltaPTS)?e.deltaPTS=Math.max(ce,e.deltaPTS):e.deltaPTS=ce,l=Math.max(t,c),t=Math.min(t,c),n=Math.min(n,e.startDTS),h=Math.min(r,p),r=Math.max(r,p),i=Math.max(i,e.endDTS)}const _=t-e.start;e.start!==0&&e.setStart(t),e.setDuration(r-e.start),e.startPTS=t,e.maxStartPTS=l,e.startDTS=n,e.endPTS=r,e.minEndPTS=h,e.endDTS=i;const A=e.sn;if(!a||A<a.startSN||A>a.endSN)return 0;let L;const I=A-a.startSN,re=a.fragments;for(re[I]=e,L=I;L>0;L--)cs(re[L],re[L-1]);for(L=I;L<re.length-1;L++)cs(re[L],re[L+1]);return a.fragmentHint&&cs(re[re.length-1],a.fragmentHint),a.PTSKnown=a.alignedSliding=!0,_}function hs(a,e){if(a===e)return;let t=null;const r=a.fragments;for(let h=r.length-1;h>=0;h--){const c=r[h].initSegment;if(c){t=c;break}}a.fragmentHint&&delete a.fragmentHint.endPTS;let n;Ws(a,e,(h,c,p,_)=>{if(e.skippedSegments&&c.cc!==h.cc){const A=h.cc-c.cc;for(let L=p;L<_.length;L++)_[L].cc+=A}$(h.startPTS)&&$(h.endPTS)&&(c.setStart(c.startPTS=h.startPTS),c.startDTS=h.startDTS,c.maxStartPTS=h.maxStartPTS,c.endPTS=h.endPTS,c.endDTS=h.endDTS,c.minEndPTS=h.minEndPTS,c.setDuration(h.endPTS-h.startPTS),c.duration&&(n=c),e.PTSKnown=e.alignedSliding=!0),h.hasStreams&&(c.elementaryStreams=h.elementaryStreams),c.loader=h.loader,h.hasStats&&(c.stats=h.stats),h.initSegment&&(c.initSegment=h.initSegment,t=h.initSegment)});const i=e.fragments,s=e.fragmentHint?i.concat(e.fragmentHint):i;if(t&&s.forEach(h=>{var c;h&&(!h.initSegment||h.initSegment.relurl===((c=t)==null?void 0:c.relurl))&&(h.initSegment=t)}),e.skippedSegments)if(e.deltaUpdateFailed=i.some(h=>!h),e.deltaUpdateFailed){J.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let h=e.skippedSegments;h--;)i.shift();e.startSN=i[0].sn}else{e.endCC=i[i.length-1].cc,e.canSkipDateRanges&&(e.dateRanges=la(a.dateRanges,e));const h=a.fragments.filter(c=>c.rawProgramDateTime);if(a.hasProgramDateTime&&!e.hasProgramDateTime)for(let c=1;c<s.length;c++)s[c].programDateTime===null&&Ji(s[c],s[c-1],h);xi(h,e)}Ks(a.partList,e.partList,(h,c)=>{c.elementaryStreams=h.elementaryStreams,c.stats=h.stats}),n?Ki(e,n,n.startPTS,n.endPTS,n.startDTS,n.endDTS):pi(a,e),i.length&&(e.totalduration=e.edge-i[0].start),e.driftStartTime=a.driftStartTime,e.driftStart=a.driftStart;const l=e.advancedDateTime;if(e.advanced&&l){const h=e.edge;e.driftStart||(e.driftStartTime=l,e.driftStart=h),e.driftEndTime=l,e.driftEnd=h}else e.driftEndTime=a.driftEndTime,e.driftEnd=a.driftEnd,e.advancedDateTime=a.advancedDateTime;e.requestScheduled===-1&&(e.requestScheduled=a.requestScheduled)}function la(a,e){const{dateRanges:t,recentlyRemovedDateranges:r}=e,n=E({},a);r&&r.forEach(l=>{delete n[l]});const s=Object.keys(n).length;return s&&Object.keys(t).forEach(l=>{const h=n[l],c=new Hn(t[l].attr,h);c.isValid?(n[l]=c,h||(c.tagOrder+=s)):J.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${_r(t[l].attr)}"`)}),n}function Ks(a,e,t){if(a&&e){let r=0;for(let n=0,i=a.length;n<=i;n++){const s=a[n],l=e[n+r];s&&l&&s.index===l.index&&s.fragment.sn===l.fragment.sn?t(s,l):r--}}}function Ws(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,l=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,h=a.fragmentHint?a.fragments.concat(a.fragmentHint):a.fragments;for(let c=n;c<=i;c++){const p=h[s+c];let _=l[c];if(r&&!_&&p&&(_=e.fragments[c]=p),p&&_){if(t(p,_,c,l),p.url&&p.url!==_.url){e.playlistParsingError=Ds(`media sequence mismatch ${_.sn}:`,a,e,p,_);return}else if(p.cc!==_.cc){e.playlistParsingError=Ds(`discontinuity sequence mismatch (${p.cc}!=${_.cc})`,a,e,p,_);return}}}}function Ds(a,e,t,r,n){return new Error(`${a} ${n.url}
|
|
Playlist starting @${e.startSN}
|
|
${e.m3u8}
|
|
|
|
Playlist starting @${t.startSN}
|
|
${t.m3u8}`)}function pi(a,e,t=!0){const r=e.startSN+e.skippedSegments-a.startSN,n=a.fragments,i=r>=0;let s=0;if(i&&r<n.length)s=n[r].start;else if(i&&e.startSN===a.endSN+1)s=a.fragmentEnd;else if(i&&t)s=a.fragmentStart+r*e.levelTargetDuration;else if(!e.skippedSegments&&e.fragmentStart===0)s=a.fragmentStart;else return;ds(e,s)}function ds(a,e){if(e){const t=a.fragments;for(let r=a.skippedSegments;r<t.length;r++)t[r].addStart(e);a.fragmentHint&&a.fragmentHint.addStart(e)}}function Vs(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 fs(a,e,t){if(!a)return null;let r=a.fragments[e-a.startSN];return r||(r=a.fragmentHint,r&&r.sn===e)?r:e<a.startSN&&t&&t.sn===e?t:null}function ps(a,e,t){return a?ms(a.partList,e,t):null}function ms(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 gs(a){a.forEach((e,t)=>{var r;(r=e.details)==null||r.fragments.forEach(n=>{n.level=t,n.initSegment&&(n.initSegment.level=t)})})}function Wi(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 Mi(a,e){return!!(a&&e.startCC<a.endCC&&e.endCC>a.startCC)}function Is(a,e){if(a){const t=a.start+e;a.start=a.startPTS=t,a.endPTS=t+a.duration}}function dn(a,e){const t=e.fragments;for(let r=0,n=t.length;r<n;r++)Is(t[r],a);e.fragmentHint&&Is(e.fragmentHint,a),e.alignedSliding=!0}function cn(a,e){a&&(on(e,a),!e.alignedSliding&&a&&Qn(e,a),!e.alignedSliding&&a&&!e.skippedSegments&&pi(a,e,!1))}function on(a,e){if(!Mi(e,a))return;const t=Math.min(e.endCC,a.endCC),r=Wi(e.fragments,t),n=Wi(a.fragments,t);if(!r||!n)return;J.log(`Aligning playlist at start of dicontinuity sequence ${t}`);const i=r.start-n.start;dn(i,a)}function Qn(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=Wi(r,s),i=Wi(t,s)),(!n||!i)&&(n=r[Math.floor(r.length/2)],i=Wi(t,n.cc)||t[Math.floor(t.length/2)]);const l=n.programDateTime,h=i.programDateTime;if(!l||!h)return;const c=(h-l)/1e3-(i.start-n.start);dn(c,a)}const zn={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}},Rt={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 es extends _n{constructor(e,t,r,n,i){super(n,e.logger),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=Rt.STOPPED,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.buffering=!0,this.loadingParts=!1,this.loopSn=void 0,this.onMediaSeeking=()=>{const{config:s,fragCurrent:l,media:h,mediaBuffer:c,state:p}=this,_=h?h.currentTime:0,A=pr.bufferInfo(c||h,_,s.maxBufferHole);if(this.log(`media seeking to ${$(_)?_.toFixed(3):_}, state: ${p}`),this.state===Rt.ENDED)this.resetLoadingState();else if(l){const L=s.maxFragLookUpTolerance,I=l.start-L,re=l.start+l.duration+L;if(!A.len||re<A.start||I>A.end){const ce=_>re;(_<I||ce)&&(ce&&l.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),l.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}if(h){this.fragmentTracker.removeFragmentsInRange(_,1/0,this.playlistType,!0);const L=this.lastCurrentTime;if(_>L&&(this.lastCurrentTime=_),!this.loadingParts){const I=Math.max(A.end,_),re=this.shouldLoadParts(this.getLevelDetails(),I);re&&(this.log(`LL-Part loading ON after seeking to ${_.toFixed(2)} with buffer @${I.toFixed(2)}`),this.loadingParts=re)}}!this.hls.hasEnoughToStart&&!A.len&&(this.log(`setting startPosition to ${_} because of seek before start`),this.nextLoadPosition=this.startPosition=_),this.tickImmediate()},this.onMediaEnded=()=>{this.log("setting startPosition to 0 because media ended"),this.startPosition=this.lastCurrentTime=0},this.playlistType=i,this.hls=e,this.fragmentLoader=new Tn(e.config),this.keyLoader=r,this.fragmentTracker=t,this.config=e.config,this.decrypter=new Vn(e.config)}registerListeners(){const{hls:e}=this;e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(m.ERROR,this.onError,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){if(this.state===Rt.STOPPED)return;this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);const e=this.fragCurrent;e!=null&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=Rt.STOPPED}get startPositionValue(){const{nextLoadPosition:e,startPosition:t}=this;return t===-1&&e?e:t}get bufferingEnabled(){return this.buffering}pauseBuffering(){this.buffering=!1}resumeBuffering(){this.buffering=!0}get inFlightFrag(){return{frag:this.fragCurrent,state:this.state}}_streamEnded(e,t){if(t.live||!this.media)return!1;const r=e.end||0,n=this.config.timelineOffset||0;if(r<=n)return!1;const i=e.nextStart;if(i&&i>n&&i<t.edge||this.media.currentTime<e.start)return!1;const l=t.partList;if(l!=null&&l.length){const c=l[l.length-1];return pr.isBuffered(this.media,c.start+c.duration/2)}const h=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(h)}getLevelDetails(){if(this.levels&&this.levelLastLoaded!==null){var e;return(e=this.levelLastLoaded)==null?void 0:e.details}}get timelineOffset(){const e=this.config.timelineOffset;if(e){var t;return((t=this.getLevelDetails())==null?void 0:t.appliedTimelineOffset)||e}return 0}onMediaAttached(e,t){const r=this.media=this.mediaBuffer=t.media;r.removeEventListener("seeking",this.onMediaSeeking),r.removeEventListener("ended",this.onMediaEnded),r.addEventListener("seeking",this.onMediaSeeking),r.addEventListener("ended",this.onMediaEnded);const n=this.config;this.levels&&n.autoStartLoad&&this.state===Rt.STOPPED&&this.startLoad(n.startPosition)}onMediaDetaching(e,t){const r=!!t.transferMedia,n=this.media;if(n!==null){if(n.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),n.removeEventListener("seeking",this.onMediaSeeking),n.removeEventListener("ended",this.onMediaEnded),this.keyLoader&&!r&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loopSn=void 0,r){this.resetLoadingState(),this.resetTransmuxer();return}this.loadingParts=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}}onManifestLoading(){this.initPTS=[],this.levels=this.levelLastLoaded=this.fragCurrent=null,this.lastCurrentTime=this.startPosition=0,this.startFragRequested=!1}onError(e,t){}onManifestLoaded(e,t){this.startTimeOffset=t.startTimeOffset}onHandlerDestroying(){this.stopLoad(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),super.onHandlerDestroying(),this.hls=this.onMediaSeeking=this.onMediaEnded=null}onHandlerDestroyed(){this.state=Rt.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.startFragRequested=!0,this._loadFragForPlayback(e,t,r)}_loadFragForPlayback(e,t,r){const n=i=>{const s=i.frag;if(this.fragContextChanged(s)){this.warn(`${s.type} sn: ${s.sn}${i.part?" part: "+i.part.index:""} of ${this.fragInfo(s,!1,i.part)}) was dropped during download.`),this.fragmentTracker.removeFragment(s);return}s.stats.chunkCount++,this._handleFragmentLoadProgress(i)};this._doFragLoad(e,t,r,n).then(i=>{if(!i)return;const s=this.state,l=i.frag;if(this.fragContextChanged(l)){(s===Rt.FRAG_LOADING||!this.fragCurrent&&s===Rt.PARSING)&&(this.fragmentTracker.removeFragment(l),this.state=Rt.IDLE);return}"payload"in i&&(this.log(`Loaded ${l.type} sn: ${l.sn} of ${this.playlistLabel()} ${l.level}`),this.hls.trigger(m.FRAG_LOADED,i)),this._handleFragmentLoadComplete(i)}).catch(i=>{this.state===Rt.STOPPED||this.state===Rt.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)===yr.APPENDING){const i=e.type,s=this.getFwdBufferInfo(this.mediaBuffer,i),l=Math.max(e.duration,s?s.len:this.config.maxBufferLength),h=this.backtrackFragment;((h?e.sn-h.sn:0)===1||this.reduceMaxBufferLength(l,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)===yr.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)}waitForLive(e){const t=e.details;return(t==null?void 0:t.live)&&t.type!=="EVENT"&&(this.levelLastLoaded!==e||t.expired)}flushMainBuffer(e,t,r=null){if(!(e-t))return;const n={startOffset:e,endOffset:t,type:r};this.hls.trigger(m.BUFFER_FLUSHING,n)}_loadInitSegment(e,t){this._doFragLoad(e,t).then(r=>{const n=r==null?void 0:r.frag;if(!n||this.fragContextChanged(n)||!this.levels)throw new Error("init load aborted");return r}).then(r=>{const{hls:n}=this,{frag:i,payload:s}=r,l=i.decryptdata;if(s&&s.byteLength>0&&l!=null&&l.key&&l.iv&&An(l.method)){const h=self.performance.now();return this.decrypter.decrypt(new Uint8Array(s),l.key.buffer,l.iv.buffer,yn(l.method)).catch(c=>{throw n.trigger(m.ERROR,{type:_e.MEDIA_ERROR,details:O.FRAG_DECRYPT_ERROR,fatal:!1,error:c,reason:c.message,frag:i}),c}).then(c=>{const p=self.performance.now();return n.trigger(m.FRAG_DECRYPTED,{frag:i,payload:c,stats:{tstart:h,tdecrypt:p}}),r.payload=c,this.completeInitSegmentLoad(r)})}return this.completeInitSegmentLoad(r)}).catch(r=>{this.state===Rt.STOPPED||this.state===Rt.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!==Rt.STOPPED&&(this.state=Rt.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){const r=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)} > buffer:${r?zn.toString(pr.getBuffered(r)):"(detached)"})`),te(e)){var n;if(e.type!==ie.SUBTITLE){const s=e.elementaryStreams;if(!Object.keys(s).some(l=>!!s[l])){this.state=Rt.IDLE;return}}const i=(n=this.levels)==null?void 0:n[e.level];i!=null&&i.fragmentError&&(this.log(`Resetting level fragment error count of ${i.fragmentError} on frag buffered`),i.fragmentError=0)}this.state=Rt.IDLE}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:r,part:n,partsLoaded:i}=e,s=!i||i.length===0||i.some(h=>!h),l=new Un(r.level,r.sn,r.stats.chunkCount+1,0,n?n.index:-1,!s);t.flush(l)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,r=null,n){var i;this.fragCurrent=e;const s=t==null?void 0:t.details;if(!this.levels||!s)throw new Error(`frag load aborted, missing level${s?"":" detail"}s`);let l=null;e.encrypted&&!((i=e.decryptdata)!=null&&i.key)?(this.log(`Loading key for ${e.sn} of [${s.startSN}-${s.endSN}], ${this.playlistLabel()} ${e.level}`),this.state=Rt.KEY_LOADING,this.fragCurrent=e,l=this.keyLoader.load(e).then(_=>{if(!this.fragContextChanged(_.frag))return this.hls.trigger(m.KEY_LOADED,_),this.state===Rt.KEY_LOADING&&(this.state=Rt.IDLE),_}),this.hls.trigger(m.KEY_LOADING,{frag:e}),this.fragCurrent===null&&(l=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))):!e.encrypted&&s.encryptedFragments.length&&this.keyLoader.loadClear(e,s.encryptedFragments);const h=this.fragPrevious;if(te(e)&&(!h||e.sn!==h.sn)){const _=this.shouldLoadParts(t.details,e.end);_!==this.loadingParts&&(this.log(`LL-Part loading ${_?"ON":"OFF"} loading sn ${h==null?void 0:h.sn}->${e.sn}`),this.loadingParts=_)}if(r=Math.max(e.start,r||0),this.loadingParts&&te(e)){const _=s.partList;if(_&&n){r>e.end&&s.fragmentHint&&(e=s.fragmentHint);const A=this.getNextPart(_,e,r);if(A>-1){const L=_[A];e=this.fragCurrent=L.fragment,this.log(`Loading ${e.type} sn: ${e.sn} part: ${L.index} (${A}/${_.length-1}) of ${this.fragInfo(e,!1,L)}) cc: ${e.cc} [${s.startSN}-${s.endSN}], target: ${parseFloat(r.toFixed(3))}`),this.nextLoadPosition=L.start+L.duration,this.state=Rt.FRAG_LOADING;let I;return l?I=l.then(re=>!re||this.fragContextChanged(re.frag)?null:this.doFragPartsLoad(e,L,t,n)).catch(re=>this.handleFragLoadError(re)):I=this.doFragPartsLoad(e,L,t,n).catch(re=>this.handleFragLoadError(re)),this.hls.trigger(m.FRAG_LOADING,{frag:e,part:L,targetBufferTime:r}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):I}else if(!e.url||this.loadedEndOfParts(_,r))return Promise.resolve(null)}}if(te(e)&&this.loadingParts)this.log(`LL-Part loading OFF after next part miss @${r.toFixed(2)}`),this.loadingParts=!1;else if(!e.url)return Promise.resolve(null);this.log(`Loading ${e.type} sn: ${e.sn} of ${this.fragInfo(e,!1)}) cc: ${e.cc} ${s?"["+s.startSN+"-"+s.endSN+"]":""}, target: ${parseFloat(r.toFixed(3))}`),$(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=Rt.FRAG_LOADING;const c=this.config.progressive;let p;return c&&l?p=l.then(_=>!_||this.fragContextChanged(_==null?void 0:_.frag)?null:this.fragmentLoader.load(e,n)).catch(_=>this.handleFragLoadError(_)):p=Promise.all([this.fragmentLoader.load(e,c?n:void 0),l]).then(([_])=>(!c&&_&&n&&n(_),_)).catch(_=>this.handleFragLoadError(_)),this.hls.trigger(m.FRAG_LOADING,{frag:e,targetBufferTime:r}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):p}doFragPartsLoad(e,t,r,n){return new Promise((i,s)=>{var l;const h=[],c=(l=r.details)==null?void 0:l.partList,p=_=>{this.fragmentLoader.loadPart(e,_,n).then(A=>{h[_.index]=A;const L=A.part;this.hls.trigger(m.FRAG_LOADED,A);const I=ps(r.details,e.sn,_.index+1)||ms(c,e.sn,_.index+1);if(I)p(I);else return i({frag:e,part:L,partsLoaded:h})}).catch(s)};p(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;e.data&&t.details===O.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(m.ERROR,t)}else this.hls.trigger(m.ERROR,{type:_e.OTHER_ERROR,details:O.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==Rt.PARSING){!this.fragCurrent&&this.state!==Rt.STOPPED&&this.state!==Rt.ERROR&&(this.state=Rt.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);const l=this.getLevelDetails(),c=l&&r.sn>l.endSN||this.shouldLoadParts(l,r.end);c!==this.loadingParts&&(this.log(`LL-Part loading ${c?"ON":"OFF"} after parsing segment ending @${r.end.toFixed(2)}`),this.loadingParts=c),this.updateLevelTiming(r,n,i,e.partial)}shouldLoadParts(e,t){if(this.config.lowLatencyMode){if(!e)return this.loadingParts;if(e!=null&&e.partList){var r;const i=e.partList[0],s=i.end+(((r=e.fragmentHint)==null?void 0:r.duration)||0);if(t>=s){var n;if((this.hls.hasEnoughToStart?((n=this.media)==null?void 0:n.currentTime)||this.lastCurrentTime:this.getLoadPosition())>i.start-i.fragment.duration)return!0}}}return!1}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 ${this.playlistLabel()} ${n}. The current chunk will not be buffered.`),null;const l=t[n],h=l.details,c=s>-1?ps(h,i,s):null,p=c?c.fragment:fs(h,i,r);return p?(r&&r!==p&&(p.stats=r.stats),{frag:p,part:c,level:l}):null}bufferFragmentData(e,t,r,n,i){var s;if(!e||this.state!==Rt.PARSING)return;const{data1:l,data2:h}=e;let c=l;if(l&&h&&(c=De(l,h)),!((s=c)!=null&&s.length))return;const p={type:e.type,frag:t,part:r,chunkMeta:n,parent:t.type,data:c};if(this.hls.trigger(m.BUFFER_APPENDING,p),e.dropped&&e.independent&&!r){if(i)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!pr.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const r=t.currentTime,n=pr.bufferInfo(t,r,0),i=e.duration,s=Math.min(this.config.maxFragLookUpTolerance*2,i*.25),l=Math.max(Math.min(e.start-s,n.end-s),r+s);e.start-l>s&&this.flushMainBuffer(l,e.start)}getFwdBufferInfo(e,t){var r;const n=this.getLoadPosition();if(!$(n))return null;const s=this.lastCurrentTime>n||(r=this.media)!=null&&r.paused?0:this.config.maxBufferHole;return this.getFwdBufferInfoAtPos(e,n,t,s)}getFwdBufferInfoAtPos(e,t,r,n){const i=pr.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||s.gap)){const l=Math.max(Math.min(i.nextStart,s.end)-t,n);return pr.bufferInfo(e,t,l)}}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=ie.MAIN){var r;const n=(r=this.fragmentTracker)==null?void 0:r.getAppendedFrag(e,t);return n&&"fragment"in n?n.fragment:n}getNextFragment(e,t){const r=t.fragments,n=r.length;if(!n)return null;const{config:i}=this,s=r[0].start,l=i.lowLatencyMode&&!!t.partList;let h=null;if(t.live){const _=i.initialLiveManifestSize;if(n<_)return this.warn(`Not enough fragments to start playback (have: ${n}, need: ${_})`),null;if(!t.PTSKnown&&!this.startFragRequested&&this.startPosition===-1||e<s){var c;l&&!this.loadingParts&&(this.log("LL-Part loading ON for initial live fragment"),this.loadingParts=!0),h=this.getInitialLiveFragment(t,r);const A=this.hls.startPosition,L=this.hls.liveSyncPosition,I=h?(A!==-1&&A>=s?A:L)||h.start:e;this.log(`Setting startPosition to ${I} to match start frag at live edge. mainStart: ${A} liveSyncPosition: ${L} frag.start: ${(c=h)==null?void 0:c.start}`),this.startPosition=this.nextLoadPosition=I}}else e<=s&&(h=r[0]);if(!h){const _=this.loadingParts?t.partEnd:t.fragmentEnd;h=this.getFragmentAtPosition(e,_,t)}let p=this.filterReplacedPrimary(h,t);if(!p&&h){const _=h.sn-t.startSN;p=this.filterReplacedPrimary(r[_+1]||null,t)}return this.mapToInitFragWhenRequired(p)}isLoopLoading(e,t){const r=this.fragmentTracker.getState(e);return(r===yr.OK||r===yr.PARTIAL&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,r,n,i){let s=null;if(e.gap&&(s=this.getNextFragment(this.nextLoadPosition,t),s&&!s.gap&&r.nextStart)){const l=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,r.nextStart,n,0);if(l!==null&&r.len+l.len>=i){const h=s.sn;return this.loopSn!==h&&(this.log(`buffer full after gaps in "${n}" playlist starting at sn: ${h}`),this.loopSn=h),null}}return this.loopSn=void 0,s}get primaryPrefetch(){if(Rs(this.hls.config)){var e,t;if((e=this.hls.interstitialsManager)==null||(t=e.playingItem)==null?void 0:t.event)return!0}return!1}filterReplacedPrimary(e,t){if(!e)return e;if(Rs(this.hls.config)&&e.type!==ie.SUBTITLE){const r=this.hls.interstitialsManager,n=r==null?void 0:r.bufferingItem;if(n){const s=n.event;if(s){if(s.appendInPlace||Math.abs(e.start-n.start)>1||n.start===0)return null}else if(e.end<=n.start&&(t==null?void 0:t.live)===!1||e.start>n.end&&n.nextEvent&&(n.nextEvent.appendInPlace||e.start-n.end>1))return null}const i=r==null?void 0:r.playerQueue;if(i)for(let s=i.length;s--;){const l=i[s].interstitial;if(l.appendInPlace&&e.start>=l.startTime&&e.end<=l.resumeTime)return null}}return e}mapToInitFragWhenRequired(e){return e!=null&&e.initSegment&&!(e!=null&&e.initSegment.data)&&!this.bitrateTest?e.initSegment:e}getNextPart(e,t,r){let n=-1,i=!1,s=!0;for(let l=0,h=e.length;l<h;l++){const c=e[l];if(s=s&&!c.independent,n>-1&&r<c.start)break;const p=c.loaded;p?n=-1:(i||c.independent||s)&&c.fragment===t&&(n=l),i=p}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=Fr(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=rn(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:l}=r;const{fragmentHint:h}=r,{maxFragLookUpTolerance:c}=n,p=r.partList,_=!!(this.loadingParts&&p!=null&&p.length&&h);_&&h&&!this.bitrateTest&&p[p.length-1].fragment.sn===h.sn&&(s=s.concat(h),l=h.sn);let A;if(e<t){var L;const re=e<this.lastCurrentTime||e>t-c||(L=this.media)!=null&&L.paused||!this.startFragRequested?0:c;A=nr(i,s,e,re)}else A=s[s.length-1];if(A){const I=A.sn-r.startSN,re=this.fragmentTracker.getState(A);if((re===yr.OK||re===yr.PARTIAL&&A.gap)&&(i=A),i&&A.sn===i.sn&&(!_||p[0].fragment.sn>A.sn||!r.live&&!_)&&i&&A.level===i.level){const ke=s[I+1];A.sn<l&&this.fragmentTracker.getState(ke)!==yr.OK?A=ke:A=null}}return A}alignPlaylists(e,t,r){const n=e.fragments.length;if(!n)return this.warn("No fragments in live playlist"),0;const i=e.fragmentStart,s=!t,l=e.alignedSliding&&$(i);if(s||!l&&!i){cn(r,e);const h=e.fragmentStart;return this.log(`Live playlist sliding: ${h.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} fragments: ${n}`),h}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;r<t&&(r=-1);const n=this.timelineOffset;if(r===-1){const i=this.startTimeOffset!==null,s=i?this.startTimeOffset:e.startTimeOffset;s!==null&&$(s)?(r=t+s,s<0&&(r+=e.edge),r=Math.min(Math.max(t,r),t+e.totalduration),this.log(`Setting startPosition to ${r} for start time offset ${s} found in ${i?"multivariant":"media"} playlist`),this.startPosition=r):e.live?(r=this.hls.liveSyncPosition||t,this.log(`Setting startPosition to -1 to start at live edge ${r}`),this.startPosition=-1):(this.log("setting startPosition to 0 by default"),this.startPosition=r=0),this.lastCurrentTime=r+n}this.nextLoadPosition=r+n}getLoadPosition(){var e;const{media:t}=this;let r=0;return(e=this.hls)!=null&&e.hasEnoughToStart&&t?r=t.currentTime:this.nextLoadPosition>=0&&(r=this.nextLoadPosition),r}handleFragLoadAborted(e,t){this.transmuxer&&e.type===this.playlistType&&te(e)&&e.stats.aborted&&(this.warn(`Fragment ${e.sn}${t?" part "+t.index:""} of ${this.playlistLabel()} ${e.level} was aborted`),this.resetFragmentLoading(e))}resetFragmentLoading(e){(!this.fragCurrent||!this.fragContextChanged(e)&&this.state!==Rt.FRAG_LOADING_WAITING_RETRY)&&(this.state=Rt.IDLE)}onFragmentOrKeyLoadError(e,t){if(t.chunkMeta&&!t.frag){const I=this.getCurrentContext(t.chunkMeta);I&&(t.frag=I.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===O.FRAG_GAP;i&&this.fragmentTracker.fragBuffered(r,!0);const s=t.errorAction,{action:l,flags:h,retryCount:c=0,retryConfig:p}=s||{},_=!!s&&!!p,A=_&&l===ir.RetryRequest,L=_&&!s.resolved&&h===Xe.MoveAllAlternatesMatchingHost;if(!A&&L&&te(r)&&!r.endList)this.resetFragmentErrors(e),this.treatAsGap(r),s.resolved=!0;else if((A||L)&&c<p.maxNumRetry){this.resetStartWhenNotLoaded(this.levelLastLoaded);const I=Or(p,c);this.warn(`Fragment ${r.sn} of ${e} ${r.level} errored with ${t.details}, retrying loading ${c+1}/${p.maxNumRetry} in ${I}ms`),s.resolved=!0,this.retryDate=self.performance.now()+I,this.state=Rt.FRAG_LOADING_WAITING_RETRY}else if(p&&s)if(this.resetFragmentErrors(e),c<p.maxNumRetry)!i&&l!==ir.RemoveAlternatePermanently&&(s.resolved=!0);else{this.warn(`${t.details} reached or exceeded max retry (${c})`);return}else l===ir.SendAlternateToPenaltyBox?this.state=Rt.WAITING_LEVEL:this.state=Rt.ERROR;this.tickImmediate()}reduceLengthAndFlushBuffer(e){if(this.state===Rt.PARSING||this.state===Rt.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===ie.AUDIO&&(this.fragCurrent=null),this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.state!==Rt.STOPPED&&(this.state=Rt.IDLE)}afterBufferFlushed(e,t,r){if(!e)return;const n=pr.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,n,r),this.state===Rt.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==Rt.STOPPED&&(this.state=Rt.IDLE)}resetStartWhenNotLoaded(e){if(!this.hls.hasEnoughToStart){this.startFragRequested=!1;const t=e?e.details:null;t!=null&&t.live?(this.log("resetting startPosition for live start"),this.startPosition=-1,this.setStartPosition(t,t.fragmentStart),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){this.warn(`The loading context changed while buffering fragment ${e.sn} of ${this.playlistLabel()} ${e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,t,r,n){const i=r.details;if(!i){this.warn("level.details undefined");return}if(!Object.keys(e.elementaryStreams).reduce((h,c)=>{const p=e.elementaryStreams[c];if(p){const _=p.endPTS-p.startPTS;if(_<=0)return this.warn(`Could not parse fragment ${e.sn} ${c} duration reliably (${_})`),h||!1;const A=n?0:Ki(i,e,p.startPTS,p.endPTS,p.startDTS,p.endDTS);return this.hls.trigger(m.LEVEL_PTS_UPDATED,{details:i,level:r,drift:A,type:c,frag:e,start:p.startPTS,end:p.endPTS}),!0}return h},!1)){var l;if(r.fragmentError===0&&this.treatAsGap(e,r),((l=this.transmuxer)==null?void 0:l.error)===null){const h=new Error(`Found no media in fragment ${e.sn} of ${this.playlistLabel()} ${e.level} resetting transmuxer to fallback to playlist timing`);if(this.warn(h.message),this.hls.trigger(m.ERROR,{type:_e.MEDIA_ERROR,details:O.FRAG_PARSING_ERROR,fatal:!1,error:h,frag:e,reason:`Found no media in msn ${e.sn} of ${this.playlistLabel()} "${r.url}"`}),!this.hls)return;this.resetTransmuxer()}}this.state=Rt.PARSED,this.log(`Parsed ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e,!1,t)})`),this.hls.trigger(m.FRAG_PARSED,{frag:e,part:t})}playlistLabel(){return this.playlistType===ie.MAIN?"level":"track"}fragInfo(e,t=!0,r){var n,i;return`${this.playlistLabel()} ${e.level} (${r?"part":"frag"}:[${((n=t&&!r?e.startPTS:(r||e).start)!=null?n:NaN).toFixed(3)}-${((i=t&&!r?e.endPTS:(r||e).end)!=null?i:NaN).toFixed(3)}]${r&&e.type==="main"?"INDEPENDENT="+(r.independent?"YES":"NO"):""}`}treatAsGap(e,t){t&&t.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)}resetTransmuxer(){var e;(e=this.transmuxer)==null||e.reset()}recoverWorkerError(e){e.event==="demuxerWorker"&&(this.fragmentTracker.removeAllFragments(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}function Rs(a){return!!a.interstitialsController&&a.enableInterstitialPlayback!==!1}class Ls{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=ks(e,t);else return new Uint8Array(0);return this.reset(),r}reset(){this.chunks.length=0,this.dataLength=0}}function ks(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}var Bi={exports:{}},Vi;function Zs(){return Vi||(Vi=1,function(a){var e=Object.prototype.hasOwnProperty,t="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(t=!1));function n(h,c,p){this.fn=h,this.context=c,this.once=p||!1}function i(h,c,p,_,A){if(typeof p!="function")throw new TypeError("The listener must be a function");var L=new n(p,_||h,A),I=t?t+c:c;return h._events[I]?h._events[I].fn?h._events[I]=[h._events[I],L]:h._events[I].push(L):(h._events[I]=L,h._eventsCount++),h}function s(h,c){--h._eventsCount===0?h._events=new r:delete h._events[c]}function l(){this._events=new r,this._eventsCount=0}l.prototype.eventNames=function(){var c=[],p,_;if(this._eventsCount===0)return c;for(_ in p=this._events)e.call(p,_)&&c.push(t?_.slice(1):_);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(p)):c},l.prototype.listeners=function(c){var p=t?t+c:c,_=this._events[p];if(!_)return[];if(_.fn)return[_.fn];for(var A=0,L=_.length,I=new Array(L);A<L;A++)I[A]=_[A].fn;return I},l.prototype.listenerCount=function(c){var p=t?t+c:c,_=this._events[p];return _?_.fn?1:_.length:0},l.prototype.emit=function(c,p,_,A,L,I){var re=t?t+c:c;if(!this._events[re])return!1;var ce=this._events[re],ke=arguments.length,We,He;if(ce.fn){switch(ce.once&&this.removeListener(c,ce.fn,void 0,!0),ke){case 1:return ce.fn.call(ce.context),!0;case 2:return ce.fn.call(ce.context,p),!0;case 3:return ce.fn.call(ce.context,p,_),!0;case 4:return ce.fn.call(ce.context,p,_,A),!0;case 5:return ce.fn.call(ce.context,p,_,A,L),!0;case 6:return ce.fn.call(ce.context,p,_,A,L,I),!0}for(He=1,We=new Array(ke-1);He<ke;He++)We[He-1]=arguments[He];ce.fn.apply(ce.context,We)}else{var ct=ce.length,ht;for(He=0;He<ct;He++)switch(ce[He].once&&this.removeListener(c,ce[He].fn,void 0,!0),ke){case 1:ce[He].fn.call(ce[He].context);break;case 2:ce[He].fn.call(ce[He].context,p);break;case 3:ce[He].fn.call(ce[He].context,p,_);break;case 4:ce[He].fn.call(ce[He].context,p,_,A);break;default:if(!We)for(ht=1,We=new Array(ke-1);ht<ke;ht++)We[ht-1]=arguments[ht];ce[He].fn.apply(ce[He].context,We)}}return!0},l.prototype.on=function(c,p,_){return i(this,c,p,_,!1)},l.prototype.once=function(c,p,_){return i(this,c,p,_,!0)},l.prototype.removeListener=function(c,p,_,A){var L=t?t+c:c;if(!this._events[L])return this;if(!p)return s(this,L),this;var I=this._events[L];if(I.fn)I.fn===p&&(!A||I.once)&&(!_||I.context===_)&&s(this,L);else{for(var re=0,ce=[],ke=I.length;re<ke;re++)(I[re].fn!==p||A&&!I[re].once||_&&I[re].context!==_)&&ce.push(I[re]);ce.length?this._events[L]=ce.length===1?ce[0]:ce:s(this,L)}return this},l.prototype.removeAllListeners=function(c){var p;return c?(p=t?t+c:c,this._events[p]&&s(this,p)):(this._events=new r,this._eventsCount=0),this},l.prototype.off=l.prototype.removeListener,l.prototype.addListener=l.prototype.on,l.prefixed=t,l.EventEmitter=l,a.exports=l}(Bi)),Bi.exports}var Ra=Zs(),Ys=P(Ra);const vs="1.6.0",Zi={};function ua(){return typeof __HLS_WORKER_BUNDLE__=="function"}function La(){const a=Zi[vs];if(a)return a.clientCount++,a;const e=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),t=self.URL.createObjectURL(e),n={worker:new self.Worker(t),objectURL:t,clientCount:1};return Zi[vs]=n,n}function ka(a){const e=Zi[a];if(e)return e.clientCount++,e;const t=new self.URL(a,self.location.href).href,n={worker:new self.Worker(t),scriptURL:t,clientCount:1};return Zi[a]=n,n}function Oa(a){const e=Zi[a||vs];if(e&&e.clientCount--===1){const{worker:r,objectURL:n}=e;delete Zi[a||vs],n&&self.URL.revokeObjectURL(n),r.terminate()}}function Pa(a,e){return e+10<=a.length&&a[e]===51&&a[e+1]===68&&a[e+2]===73&&a[e+3]<255&&a[e+4]<255&&a[e+6]<128&&a[e+7]<128&&a[e+8]<128&&a[e+9]<128}function Os(a,e){return e+10<=a.length&&a[e]===73&&a[e+1]===68&&a[e+2]===51&&a[e+3]<255&&a[e+4]<255&&a[e+6]<128&&a[e+7]<128&&a[e+8]<128&&a[e+9]<128}function Ps(a,e){let t=0;return t=(a[e]&127)<<21,t|=(a[e+1]&127)<<14,t|=(a[e+2]&127)<<7,t|=a[e+3]&127,t}function _s(a,e){const t=e;let r=0;for(;Os(a,e);){r+=10;const n=Ps(a,e+6);r+=n,Pa(a,e+10)&&(r+=10),e+=r}if(r>0)return a.subarray(t,t+r)}function Ma(a,e,t,r){const n=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],i=e[t+2],s=i>>2&15;if(s>12){const L=new Error(`invalid ADTS sampling index:${s}`);a.emit(m.ERROR,m.ERROR,{type:_e.MEDIA_ERROR,details:O.FRAG_PARSING_ERROR,fatal:!0,error:L,reason:L.message});return}const l=(i>>6&3)+1,h=e[t+3]>>6&3|(i&1)<<2,c="mp4a.40."+l,p=n[s];let _=s;(l===5||l===29)&&(_-=3);const A=[l<<3|(_&14)>>1,(_&1)<<7|h<<3];return J.log(`manifest codec:${r}, parsed codec:${c}, channels:${h}, rate:${p} (ADTS object type:${l} sampling index:${s})`),{config:A,samplerate:p,channelCount:h,codec:c,parsedCodec:c,manifestCodec:r}}function ts(a,e){return a[e]===255&&(a[e+1]&246)===240}function ys(a,e){return a[e+1]&1?7:9}function ca(a,e){return(a[e+3]&3)<<11|a[e+4]<<3|(a[e+5]&224)>>>5}function fo(a,e){return e+5<a.length}function Ms(a,e){return e+1<a.length&&ts(a,e)}function po(a,e){return fo(a,e)&&ts(a,e)&&ca(a,e)<=a.length-e}function Ba(a,e){if(Ms(a,e)){const t=ys(a,e);if(e+t>=a.length)return!1;const r=ca(a,e);if(r<=t)return!1;const n=e+r;return n===a.length||Ms(a,n)}return!1}function ha(a,e,t,r,n){if(!a.samplerate){const i=Ma(e,t,r,n);if(!i)return;E(a,i)}}function Na(a){return 1024*9e4/a}function Fa(a,e){const t=ys(a,e);if(e+t<=a.length){const r=ca(a,e)-t;if(r>0)return{headerLength:t,frameLength:r}}}function $a(a,e,t,r,n){const i=Na(a.samplerate),s=r+n*i,l=Fa(e,t);let h;if(l){const{frameLength:_,headerLength:A}=l,L=A+_,I=Math.max(0,t+L-e.length);I?(h=new Uint8Array(L-A),h.set(e.subarray(t+A,e.length),0)):h=e.subarray(t+A,t+L);const re={unit:h,pts:s};return I||a.samples.push(re),{sample:re,length:L,missing:I}}const c=e.length-t;return h=new Uint8Array(c),h.set(e.subarray(t,e.length),0),{sample:{unit:h,pts:s},length:c,missing:-1}}function Ua(a,e){return Os(a,e)&&Ps(a,e+6)+10<=a.length-e}function da(a){if(a.size<2)return;const e=Ae(a.data,!0),t=new Uint8Array(a.data.subarray(e.length+1));return{key:a.type,info:e,data:t.buffer}}function fa(a){if(a.size<2)return;if(a.type==="TXXX"){let t=1;const r=Ae(a.data.subarray(t),!0);t+=r.length+1;const n=Ae(a.data.subarray(t));return{key:a.type,info:r,data:n}}const e=Ae(a.data.subarray(1));return{key:a.type,info:"",data:e}}function za(a){if(a.type==="WXXX"){if(a.size<2)return;let t=1;const r=Ae(a.data.subarray(t),!0);t+=r.length+1;const n=Ae(a.data.subarray(t));return{key:a.type,info:r,data:n}}const e=Ae(a.data);return{key:a.type,info:"",data:e}}function Ga(a){return btoa(String.fromCharCode(...a))}function pa(a,e){if(a<0)return-pa(-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 mo(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 Ha(){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)})}}}function ja(a){return a instanceof ArrayBuffer?a:a.byteOffset==0&&a.byteLength==a.buffer.byteLength?a.buffer:new Uint8Array(a).buffer}function ma(a,e=0,t=1/0){return Bs(a,e,t,Uint8Array)}function Bs(a,e,t,r){const n=ga(a);let i=1;"BYTES_PER_ELEMENT"in r&&(i=r.BYTES_PER_ELEMENT);const s=Ka(a)?a.byteOffset:0,l=(s+a.byteLength)/i,h=(s+e)/i,c=Math.floor(Math.max(0,Math.min(h,l))),p=Math.floor(Math.min(c+Math.max(t,0),l));return new r(n,c,p-c)}function ga(a){return a instanceof ArrayBuffer?a:a.buffer}function Ka(a){return a&&a.buffer instanceof ArrayBuffer&&a.byteLength!==void 0&&a.byteOffset!==void 0}function go(a){const e={key:a.type,description:"",data:"",mimeType:null,pictureType:null},t=3;if(a.size<2)return;if(a.data[0]!==t){console.log("Ignore frame with unrecognized character encoding");return}const r=a.data.subarray(1).indexOf(0);if(r===-1)return;const n=Ae(ma(a.data,1,r)),i=a.data[2+r],s=a.data.subarray(3+r).indexOf(0);if(s===-1)return;const l=Ae(ma(a.data,3+r,s));let h;return n==="-->"?h=Ae(ma(a.data,4+r+s)):h=ja(a.data.subarray(4+r+s)),e.mimeType=n,e.pictureType=i,e.description=l,e.data=h,e}function vo(a){return a.type==="PRIV"?da(a):a.type[0]==="W"?za(a):a.type==="APIC"?go(a):fa(a)}function _o(a){const e=String.fromCharCode(a[0],a[1],a[2],a[3]),t=Ps(a,4),r=10;return{type:e,size:t,data:a.subarray(r,r+t)}}const bs=10,yo=10;function Wa(a){let e=0;const t=[];for(;Os(a,e);){const r=Ps(a,e+6);a[e+5]>>6&1&&(e+=bs),e+=bs;const n=e+r;for(;e+yo<n;){const i=_o(a.subarray(e)),s=vo(i);s&&t.push(s),e+=i.size+bs}Pa(a,e)&&(e+=bs)}return t}function va(a){return a&&a.key==="PRIV"&&a.info==="com.apple.streaming.transportStreamTimestamp"}function bo(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)}}function Xs(a){const e=Wa(a);for(let t=0;t<e.length;t++){const r=e[t];if(va(r))return bo(r)}}let Si=function(a){return a.audioId3="org.id3",a.dateRange="com.apple.quicktime.HLS",a.emsg="https://aomedia.org/emsg/ID3",a.misbklv="urn:misb:KLV:bin:1910.1",a}({});function Re(a="",e=9e4){return{type:a,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}class qs{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=De(this.cachedData,e),this.cachedData=null);let r=_s(e,0),n=r?r.length:0,i;const s=this._audioTrack,l=this._id3Track,h=r?Xs(r):void 0,c=e.length;for((this.basePTS===null||this.frameIndex===0&&$(h))&&(this.basePTS=_a(h,t,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),r&&r.length>0&&l.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:Si.audioId3,duration:Number.POSITIVE_INFINITY});n<c;){if(this.canParse(e,n)){const p=this.appendFrame(s,e,n);p?(this.frameIndex++,this.lastPTS=p.sample.pts,n+=p.length,i=n):n=c}else Ua(e,n)?(r=_s(e,n),l.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:r,type:Si.audioId3,duration:Number.POSITIVE_INFINITY}),n+=r.length,i=n):n++;if(n===c&&i!==c){const p=e.slice(i);this.cachedData?this.cachedData=De(this.cachedData,p):this.cachedData=p}}return{audioTrack:s,videoTrack:Re(),id3Track:l,textTrack:Re()}}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:Re(),id3Track:this._id3Track,textTrack:Re()}}destroy(){this.cachedData=null,this._audioTrack=this._id3Track=void 0}}const _a=(a,e,t)=>{if($(a))return a*90;const r=t?t.baseTime*9e4/t.timescale:0;return e*9e4+r};let xs=null;const Va=[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],ya=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],Za=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],Ya=[0,1,1,4];function Xa(a,e,t,r,n){if(t+24>e.length)return;const i=ba(e,t);if(i&&t+i.frameLength<=e.length){const s=i.samplesPerFrame*9e4/i.sampleRate,l=r+n*s,h={unit:e.subarray(t,t+i.frameLength),pts:l,dts:l};return a.config=[],a.channelCount=i.channelCount,a.samplerate=i.sampleRate,a.samples.push(h),{sample:h,length:i.frameLength,missing:0}}}function ba(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,l=a[e+3]>>6,h=t===3?3-r:r===3?3:4,c=Va[h*14+n-1]*1e3,_=ya[(t===3?0:t===2?1:2)*3+i],A=l===3?1:2,L=Za[t][r],I=Ya[r],re=L*8*I,ce=Math.floor(L*c/_+s)*I;if(xs===null){const He=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);xs=He?parseInt(He[1]):0}return!!xs&&xs<=87&&r===2&&c>=224e3&&l===0&&(a[e+3]=a[e+3]|128),{sampleRate:_,channelCount:A,frameLength:ce,samplesPerFrame:re}}}function Qs(a,e){return a[e]===255&&(a[e+1]&224)===224&&(a[e+1]&6)!==0}function Ns(a,e){return e+1<a.length&&Qs(a,e)}function xo(a,e){return Qs(a,e)&&4<=a.length-e}function Js(a,e){if(e+1<a.length&&Qs(a,e)){const r=ba(a,e);let n=4;r!=null&&r.frameLength&&(n=r.frameLength);const i=e+n;return i===a.length||Ns(a,i)}return!1}class qa extends qs{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,t){if(!e)return!1;const r=_s(e,0);let n=(r==null?void 0:r.length)||0;if(Js(e,n))return!1;for(let i=e.length;n<i;n++)if(Ba(e,n))return t.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return po(e,t)}appendFrame(e,t,r){ha(e,this.observer,t,r,e.manifestCodec);const n=$a(e,t,r,this.basePTS,this.frameIndex);if(n&&n.missing===0)return n}}const Qa=(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 l=Math.min(r,8),h=8-l;i[0]=4278190080>>>24+h<<h,n[0]=(s[0]&i[0])>>h,t=t?t<<l|n[0]:n[0],e+=1,r-=l}return t};class Eo extends qs{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=xa(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=_s(e,0);if(!t)return!1;const r=t.length;return e[r]===11&&e[r+1]===119&&Xs(t)!==void 0&&Qa(e,r)<16}}function xa(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 l=[48e3,44100,32e3][i],h=e[t+4]&63,p=[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][h*3+i]*2;if(t+p>e.length)return-1;const _=e[t+6]>>5;let A=0;_===2?A+=2:(_&1&&_!==1&&(A+=2),_&4&&(A+=2));const L=(e[t+6]<<8|e[t+7])>>12-A&1,re=[2,1,2,3,3,4,4,5][_]+L,ce=e[t+5]>>3,ke=e[t+5]&7,We=new Uint8Array([i<<6|ce<<1|ke>>2,(ke&3)<<6|_<<3|L<<2|h>>4,h<<4&224]),He=1536/l*9e4,ct=r+n*He,ht=e.subarray(t,t+p);return a.config=We,a.channelCount=re,a.samplerate=l,a.samples.push({unit:ht,pts:ct}),p}class Ea extends qs{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=_s(e,0);let r=(t==null?void 0:t.length)||0;if(t&&e[r]===11&&e[r+1]===119&&Xs(t)!==void 0&&Qa(e,r)<=16)return!1;for(let n=e.length;r<n;r++)if(Js(e,r))return J.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return xo(e,t)}appendFrame(e,t,r){if(this.basePTS!==null)return Xa(e,t,r,this.basePTS,this.frameIndex)}}const So=/\/emsg[-/]ID3/i;class wo{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=Re("video",1),s=this.audioTrack=Re("audio",1),l=this.txtTrack=Re("text",1);if(this.id3Track=Re("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const h=Me(e);if(h.video){const{id:c,timescale:p,codec:_,supplemental:A}=h.video;i.id=c,i.timescale=l.timescale=p,i.codec=_,i.supplemental=A}if(h.audio){const{id:c,timescale:p,codec:_}=h.audio;s.id=c,s.timescale=p,s.codec=_}l.id=lt.text,i.sampleDuration=0,i.duration=s.duration=n}resetContiguity(){this.remainderData=null}static probe(e){return fe(e)}demux(e,t){this.timeOffset=t;let r=e;const n=this.videoTrack,i=this.txtTrack;if(this.config.progressive){this.remainderData&&(r=De(this.remainderData,e));const l=yt(r);this.remainderData=l.remainder,n.samples=l.valid||new Uint8Array}else n.samples=r;const s=this.extractID3Track(n,t);return i.samples=Pe(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=Pe(e,t),{videoTrack:t,audioTrack:Re(),id3Track:n,textTrack:Re()}}extractID3Track(e,t){const r=this.id3Track;if(e.samples.length){const n=he(e.samples,["emsg"]);n&&n.forEach(i=>{const s=gt(i);if(So.test(s.schemeIdUri)){const l=To(s,t);let h=s.eventDuration===4294967295?Number.POSITIVE_INFINITY:s.eventDuration/s.timeScale;h<=.001&&(h=Number.POSITIVE_INFINITY);const c=s.payload;r.samples.push({data:c,len:c.byteLength,dts:l,pts:l,type:Si.emsg,duration:h})}else if(this.config.enableEmsgKLVMetadata&&s.schemeIdUri.startsWith("urn:misb:KLV:bin:1910.1")){const l=To(s,t);r.samples.push({data:s.payload,len:s.payload.byteLength,dts:l,pts:l,type:Si.misbklv,duration:Number.POSITIVE_INFINITY})}})}return r}demuxSampleAes(e,t,r){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){this.config=null,this.remainderData=null,this.videoTrack=this.audioTrack=this.id3Track=this.txtTrack=void 0}}function To(a,e){return $(a.presentationTime)?a.presentationTime/a.timeScale:e+a.presentationTimeDelta/a.timeScale}class H{constructor(e,t,r){this.keyData=void 0,this.decrypter=void 0,this.keyData=r,this.decrypter=new Vn(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,Sr.cbc)}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(l=>{const h=new Uint8Array(l);n.set(h,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=mt(i.data),l=this.getAvcEncryptedData(s);this.decryptBuffer(l.buffer).then(h=>{i.data=this.getAvcDecryptedUnit(s,h),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}}}}class u{constructor(){this.VideoSample=null}createVideoSample(e,t,r){return{key:e,frame:!1,pts:t,dts:r,units:[],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)}}parseNALu(e,t,r){const n=t.byteLength;let i=e.naluState||0;const s=i,l=[];let h=0,c,p,_,A=-1,L=0;for(i===-1&&(A=0,L=this.getNALuType(t,0),i=0,h=1);h<n;){if(c=t[h++],!i){i=c?0:1;continue}if(i===1){i=c?0:2;continue}if(!c)i=3;else if(c===1){if(p=h-i-1,A>=0){const I={data:t.subarray(A,p),type:L};l.push(I)}else{const I=this.getLastNalUnit(e.samples);I&&(s&&h<=4-s&&I.state&&(I.data=I.data.subarray(0,I.data.byteLength-s)),p>0&&(I.data=De(I.data,t.subarray(0,p)),I.state=0))}h<n?(_=this.getNALuType(t,h),A=h,L=_,i=0):i=-1}else i=0}if(A>=0&&i>=0){const I={data:t.subarray(A,n),type:L,state:i};l.push(I)}if(l.length===0){const I=this.getLastNalUnit(e.samples);I&&(I.data=De(I.data,t))}return e.naluState=i,l}}class d{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&&J.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)}}class f extends u{parsePES(e,t,r,n){const i=this.parseNALu(e,r.data,n);let s=this.VideoSample,l,h=!1;r.data=null,s&&i.length&&!e.audFound&&(this.pushAccessUnit(s,e),s=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts)),i.forEach(c=>{var p,_;switch(c.type){case 1:{let re=!1;l=!0;const ce=c.data;if(h&&ce.length>4){const ke=this.readSliceType(ce);(ke===2||ke===4||ke===7||ke===9)&&(re=!0)}if(re){var A;(A=s)!=null&&A.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null)}s||(s=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),s.frame=!0,s.key=re;break}case 5:l=!0,(p=s)!=null&&p.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null),s||(s=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),s.key=!0,s.frame=!0;break;case 6:{l=!0,nt(c.data,1,r.pts,t.samples);break}case 7:{var L,I;l=!0,h=!0;const re=c.data,ce=this.readSPS(re);if(!e.sps||e.width!==ce.width||e.height!==ce.height||((L=e.pixelRatio)==null?void 0:L[0])!==ce.pixelRatio[0]||((I=e.pixelRatio)==null?void 0:I[1])!==ce.pixelRatio[1]){e.width=ce.width,e.height=ce.height,e.pixelRatio=ce.pixelRatio,e.sps=[re];const ke=re.subarray(1,4);let We="avc1.";for(let He=0;He<3;He++){let ct=ke[He].toString(16);ct.length<2&&(ct="0"+ct),We+=ct}e.codec=We}break}case 8:l=!0,e.pps=[c.data];break;case 9:l=!0,e.audFound=!0,(_=s)!=null&&_.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts));break;case 12:l=!0;break;default:l=!1;break}s&&l&&s.units.push(c)}),n&&s&&(this.pushAccessUnit(s,e),this.VideoSample=null)}getNALuType(e,t){return e[t]&31}readSliceType(e){const t=new d(e);return t.readUByte(),t.readUEG(),t.readUEG()}skipScalingList(e,t){let r=8,n=8,i;for(let s=0;s<e;s++)n!==0&&(i=t.readEG(),n=(r+i+256)%256),r=n===0?r:n}readSPS(e){const t=new d(e);let r=0,n=0,i=0,s=0,l,h,c;const p=t.readUByte.bind(t),_=t.readBits.bind(t),A=t.readUEG.bind(t),L=t.readBoolean.bind(t),I=t.skipBits.bind(t),re=t.skipEG.bind(t),ce=t.skipUEG.bind(t),ke=this.skipScalingList.bind(this);p();const We=p();if(_(5),I(3),p(),ce(),We===100||We===110||We===122||We===244||We===44||We===83||We===86||We===118||We===128){const xt=A();if(xt===3&&I(1),ce(),ce(),I(1),L())for(h=xt!==3?8:12,c=0;c<h;c++)L()&&(c<6?ke(16,t):ke(64,t))}ce();const He=A();if(He===0)A();else if(He===1)for(I(1),re(),re(),l=A(),c=0;c<l;c++)re();ce(),I(1);const ct=A(),ht=A(),Tt=_(1);Tt===0&&I(1),I(1),L()&&(r=A(),n=A(),i=A(),s=A());let dt=[1,1];if(L()&&L())switch(p()){case 1:dt=[1,1];break;case 2:dt=[12,11];break;case 3:dt=[10,11];break;case 4:dt=[16,11];break;case 5:dt=[40,33];break;case 6:dt=[24,11];break;case 7:dt=[20,11];break;case 8:dt=[32,11];break;case 9:dt=[80,33];break;case 10:dt=[18,11];break;case 11:dt=[15,11];break;case 12:dt=[64,33];break;case 13:dt=[160,99];break;case 14:dt=[4,3];break;case 15:dt=[3,2];break;case 16:dt=[2,1];break;case 255:{dt=[p()<<8|p(),p()<<8|p()];break}}return{width:Math.ceil((ct+1)*16-r*2-n*2),height:(2-Tt)*(ht+1)*16-(Tt?2:4)*(i+s),pixelRatio:dt}}}class g extends u{constructor(...e){super(...e),this.initVPS=null}parsePES(e,t,r,n){const i=this.parseNALu(e,r.data,n);let s=this.VideoSample,l,h=!1;r.data=null,s&&i.length&&!e.audFound&&(this.pushAccessUnit(s,e),s=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts)),i.forEach(c=>{var p,_;switch(c.type){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:s||(s=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts)),s.frame=!0,l=!0;break;case 16:case 17:case 18:case 21:if(l=!0,h){var A;(A=s)!=null&&A.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null)}s||(s=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),s.key=!0,s.frame=!0;break;case 19:case 20:l=!0,(p=s)!=null&&p.frame&&!s.key&&(this.pushAccessUnit(s,e),s=this.VideoSample=null),s||(s=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),s.key=!0,s.frame=!0;break;case 39:l=!0,nt(c.data,2,r.pts,t.samples);break;case 32:l=!0,e.vps||(typeof e.params!="object"&&(e.params={}),e.params=E(e.params,this.readVPS(c.data)),this.initVPS=c.data),e.vps=[c.data];break;case 33:if(l=!0,h=!0,e.vps!==void 0&&e.vps[0]!==this.initVPS&&e.sps!==void 0&&!this.matchSPS(e.sps[0],c.data)&&(this.initVPS=e.vps[0],e.sps=e.pps=void 0),!e.sps){const L=this.readSPS(c.data);e.width=L.width,e.height=L.height,e.pixelRatio=L.pixelRatio,e.codec=L.codecString,e.sps=[],typeof e.params!="object"&&(e.params={});for(const I in L.params)e.params[I]=L.params[I]}this.pushParameterSet(e.sps,c.data,e.vps),s||(s=this.VideoSample=this.createVideoSample(!0,r.pts,r.dts)),s.key=!0;break;case 34:if(l=!0,typeof e.params=="object"){if(!e.pps){e.pps=[];const L=this.readPPS(c.data);for(const I in L)e.params[I]=L[I]}this.pushParameterSet(e.pps,c.data,e.vps)}break;case 35:l=!0,e.audFound=!0,(_=s)!=null&&_.frame&&(this.pushAccessUnit(s,e),s=null),s||(s=this.VideoSample=this.createVideoSample(!1,r.pts,r.dts));break;default:l=!1;break}s&&l&&s.units.push(c)}),n&&s&&(this.pushAccessUnit(s,e),this.VideoSample=null)}pushParameterSet(e,t,r){(r&&r[0]===this.initVPS||!r&&!e.length)&&e.push(t)}getNALuType(e,t){return(e[t]&126)>>>1}ebsp2rbsp(e){const t=new Uint8Array(e.byteLength);let r=0;for(let n=0;n<e.byteLength;n++)n>=2&&e[n]===3&&e[n-1]===0&&e[n-2]===0||(t[r]=e[n],r++);return new Uint8Array(t.buffer,0,r)}pushAccessUnit(e,t){super.pushAccessUnit(e,t),this.initVPS&&(this.initVPS=null)}readVPS(e){const t=new d(e);t.readUByte(),t.readUByte(),t.readBits(4),t.skipBits(2),t.readBits(6);const r=t.readBits(3),n=t.readBoolean();return{numTemporalLayers:r+1,temporalIdNested:n}}readSPS(e){const t=new d(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.readBits(4);const r=t.readBits(3);t.readBoolean();const n=t.readBits(2),i=t.readBoolean(),s=t.readBits(5),l=t.readUByte(),h=t.readUByte(),c=t.readUByte(),p=t.readUByte(),_=t.readUByte(),A=t.readUByte(),L=t.readUByte(),I=t.readUByte(),re=t.readUByte(),ce=t.readUByte(),ke=t.readUByte(),We=[],He=[];for(let mn=0;mn<r;mn++)We.push(t.readBoolean()),He.push(t.readBoolean());if(r>0)for(let mn=r;mn<8;mn++)t.readBits(2);for(let mn=0;mn<r;mn++)We[mn]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),He[mn]&&t.readUByte();t.readUEG();const ct=t.readUEG();ct==3&&t.skipBits(1);const ht=t.readUEG(),Tt=t.readUEG(),dt=t.readBoolean();let xt=0,It=0,pt=0,Ht=0;dt&&(xt+=t.readUEG(),It+=t.readUEG(),pt+=t.readUEG(),Ht+=t.readUEG());const er=t.readUEG(),tn=t.readUEG(),Cr=t.readUEG(),br=t.readBoolean();for(let mn=br?0:r;mn<=r;mn++)t.skipUEG(),t.skipUEG(),t.skipUEG();if(t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.readBoolean()&&t.readBoolean())for(let gi=0;gi<4;gi++)for(let Fi=0;Fi<(gi===3?2:6);Fi++)if(!t.readBoolean())t.readUEG();else{const Hi=Math.min(64,1<<4+(gi<<1));gi>1&&t.readEG();for(let aa=0;aa<Hi;aa++)t.readEG()}t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.skipUEG(),t.skipUEG(),t.readBoolean());const vr=t.readUEG();let jt=0;for(let mn=0;mn<vr;mn++){let gi=!1;if(mn!==0&&(gi=t.readBoolean()),gi){mn===vr&&t.readUEG(),t.readBoolean(),t.readUEG();let Fi=0;for(let Us=0;Us<=jt;Us++){const Hi=t.readBoolean();let aa=!1;Hi||(aa=t.readBoolean()),(Hi||aa)&&Fi++}jt=Fi}else{const Fi=t.readUEG(),Us=t.readUEG();jt=Fi+Us;for(let Hi=0;Hi<Fi;Hi++)t.readUEG(),t.readBoolean();for(let Hi=0;Hi<Us;Hi++)t.readUEG(),t.readBoolean()}}if(t.readBoolean()){const mn=t.readUEG();for(let gi=0;gi<mn;gi++){for(let Fi=0;Fi<Cr+4;Fi++)t.readBits(1);t.readBits(1)}}let Nr=0,Dr=1,en=1,fn=!0,En=1,kn=0;t.readBoolean(),t.readBoolean();let wi=!1;if(t.readBoolean()){if(t.readBoolean()){const zs=t.readUByte(),Gl=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],ho=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];zs>0&&zs<16?(Dr=Gl[zs-1],en=ho[zs-1]):zs===255&&(Dr=t.readBits(16),en=t.readBits(16))}if(t.readBoolean()&&t.readBoolean(),t.readBoolean()&&(t.readBits(3),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.readUByte(),t.readUByte())),t.readBoolean()&&(t.readUEG(),t.readUEG()),t.readBoolean(),t.readBoolean(),t.readBoolean(),wi=t.readBoolean(),wi&&(xt+=t.readUEG(),It+=t.readUEG(),pt+=t.readUEG(),Ht+=t.readUEG()),t.readBoolean()&&(En=t.readBits(32),kn=t.readBits(32),t.readBoolean()&&t.readUEG(),t.readBoolean())){const ho=t.readBoolean(),Hl=t.readBoolean();let Da=!1;(ho||Hl)&&(Da=t.readBoolean(),Da&&(t.readUByte(),t.readBits(5),t.readBoolean(),t.readBits(5)),t.readBits(4),t.readBits(4),Da&&t.readBits(4),t.readBits(5),t.readBits(5),t.readBits(5));for(let jl=0;jl<=r;jl++){fn=t.readBoolean();const ec=fn||t.readBoolean();let Kl=!1;ec?t.readEG():Kl=t.readBoolean();const Wl=Kl?1:t.readUEG()+1;if(ho)for(let Ia=0;Ia<Wl;Ia++)t.readUEG(),t.readUEG(),Da&&(t.readUEG(),t.readUEG()),t.skipBits(1);if(Hl)for(let Ia=0;Ia<Wl;Ia++)t.readUEG(),t.readUEG(),Da&&(t.readUEG(),t.readUEG()),t.skipBits(1)}}t.readBoolean()&&(t.readBoolean(),t.readBoolean(),t.readBoolean(),Nr=t.readUEG())}let As=ht,zl=Tt;if(dt||wi){let mn=1,gi=1;ct===1?mn=gi=2:ct==2&&(mn=2),As=ht-mn*It-mn*xt,zl=Tt-gi*Ht-gi*pt}const Q0=n?["A","B","C"][n]:"",J0=l<<24|h<<16|c<<8|p;let Yo=0;for(let mn=0;mn<32;mn++)Yo=(Yo|(J0>>mn&1)<<31-mn)>>>0;let Xo=Yo.toString(16);return s===1&&Xo==="2"&&(Xo="6"),{codecString:`hvc1.${Q0}${s}.${Xo}.${i?"H":"L"}${ke}.B0`,params:{general_tier_flag:i,general_profile_idc:s,general_profile_space:n,general_profile_compatibility_flags:[l,h,c,p],general_constraint_indicator_flags:[_,A,L,I,re,ce],general_level_idc:ke,bit_depth:er+8,bit_depth_luma_minus8:er,bit_depth_chroma_minus8:tn,min_spatial_segmentation_idc:Nr,chroma_format_idc:ct,frame_rate:{fixed:fn,fps:kn/En}},width:As,height:zl,pixelRatio:[Dr,en]}}readPPS(e){const t=new d(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.skipUEG(),t.skipUEG(),t.skipBits(2),t.skipBits(3),t.skipBits(2),t.skipUEG(),t.skipUEG(),t.skipEG(),t.skipBits(2),t.readBoolean()&&t.skipUEG(),t.skipEG(),t.skipEG(),t.skipBits(4);const n=t.readBoolean(),i=t.readBoolean();let s=1;return i&&n?s=0:i?s=3:n&&(s=2),{parallelismType:s}}matchSPS(e,t){return String.fromCharCode.apply(null,e).substr(3)===String.fromCharCode.apply(null,t).substr(3)}}const C=188;class z{constructor(e,t,r,n){this.logger=void 0,this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=e,this.config=t,this.typeSupported=r,this.logger=n,this.videoParser=null}static probe(e,t){const r=z.syncOffset(e);return r>0&&t.warn(`MPEG2-TS detected but first sync word found @ offset ${r}`),r!==-1}static syncOffset(e){const t=e.length;let r=Math.min(C*5,t-C)+1,n=0;for(;n<r;){let i=!1,s=-1,l=0;for(let h=n;h<t;h+=C)if(e[h]===71&&(t-h===C||e[h+C]===71)){if(l++,s===-1&&(s=h,s!==0&&(r=Math.min(s+C*99,e.length-C)+1)),i||(i=ge(e,h)===0),i&&l>1&&(s===0&&l>2||h+C>r))return s}else{if(l)return-1;break}n++}return-1}static createTrack(e,t){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:lt[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=z.createTrack("video"),this._videoTrack.duration=n,this._audioTrack=z.createTrack("audio",n),this._id3Track=z.createTrack("id3"),this._txtTrack=z.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=r}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,l=this._audioTrack,h=this._id3Track,c=this._txtTrack;let p=s.pid,_=s.pesData,A=l.pid,L=h.pid,I=l.pesData,re=h.pesData,ce=null,ke=this.pmtParsed,We=this._pmtId,He=e.length;if(this.remainderData&&(e=De(this.remainderData,e),He=e.length,this.remainderData=null),He<C&&!n)return this.remainderData=e,{audioTrack:l,videoTrack:s,id3Track:h,textTrack:c};const ct=Math.max(0,z.syncOffset(e));He-=(He-ct)%C,He<e.byteLength&&!n&&(this.remainderData=new Uint8Array(e.buffer,He,e.buffer.byteLength-He));let ht=0;for(let dt=ct;dt<He;dt+=C)if(e[dt]===71){const xt=!!(e[dt+1]&64),It=ge(e,dt),pt=(e[dt+3]&48)>>4;let Ht;if(pt>1){if(Ht=dt+5+e[dt+4],Ht===dt+C)continue}else Ht=dt+4;switch(It){case p:if(xt){if(_&&(i=Et(_,this.logger))){if(this.videoParser===null)switch(s.segmentCodec){case"avc":this.videoParser=new f;break;case"hevc":this.videoParser=new g;break}this.videoParser!==null&&this.videoParser.parsePES(s,c,i,!1)}_={data:[],size:0}}_&&(_.data.push(e.subarray(Ht,dt+C)),_.size+=dt+C-Ht);break;case A:if(xt){if(I&&(i=Et(I,this.logger)))switch(l.segmentCodec){case"aac":this.parseAACPES(l,i);break;case"mp3":this.parseMPEGPES(l,i);break;case"ac3":this.parseAC3PES(l,i);break}I={data:[],size:0}}I&&(I.data.push(e.subarray(Ht,dt+C)),I.size+=dt+C-Ht);break;case L:xt&&(re&&(i=Et(re,this.logger))&&this.parseID3PES(h,i),re={data:[],size:0}),re&&(re.data.push(e.subarray(Ht,dt+C)),re.size+=dt+C-Ht);break;case 0:xt&&(Ht+=e[Ht]+1),We=this._pmtId=Te(e,Ht);break;case We:{xt&&(Ht+=e[Ht]+1);const er=Ne(e,Ht,this.typeSupported,r,this.observer,this.logger);p=er.videoPid,p>0&&(s.pid=p,s.segmentCodec=er.segmentVideoCodec),A=er.audioPid,A>0&&(l.pid=A,l.segmentCodec=er.segmentAudioCodec),L=er.id3Pid,L>0&&(h.pid=L),ce!==null&&!ke&&(this.logger.warn(`MPEG-TS PMT found at ${dt} after unknown PID '${ce}'. Backtracking to sync byte @${ct} to parse all TS packets.`),ce=null,dt=ct-188),ke=this.pmtParsed=!0;break}case 17:case 8191:break;default:ce=It;break}}else ht++;ht>0&&tt(this.observer,new Error(`Found ${ht} TS packet/s that do not start with 0x47`),void 0,this.logger),s.pesData=_,l.pesData=I,h.pesData=re;const Tt={audioTrack:l,videoTrack:s,id3Track:h,textTrack:c};return n&&this.extractRemainingSamples(Tt),Tt}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,l=t.pesData,h=n.pesData;let c;if(s&&(c=Et(s,this.logger))){if(this.videoParser===null)switch(r.segmentCodec){case"avc":this.videoParser=new f;break;case"hevc":this.videoParser=new g;break}this.videoParser!==null&&(this.videoParser.parsePES(r,i,c,!0),r.pesData=null)}else r.pesData=s;if(l&&(c=Et(l,this.logger))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,c);break;case"mp3":this.parseMPEGPES(t,c);break;case"ac3":this.parseAC3PES(t,c);break}t.pesData=null}else l!=null&&l.size&&this.logger.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=l;h&&(c=Et(h,this.logger))?(this.parseID3PES(n,c),n.pesData=null):n.pesData=h}demuxSampleAes(e,t,r){const n=this.demux(e,r,!0,!this.config.progressive),i=this.sampleAes=new H(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.observer&&this.observer.removeAllListeners(),this.config=this.logger=this.observer=null,this.aacOverFlow=this.videoParser=this.remainderData=this.sampleAes=null,this._videoTrack=this._audioTrack=this._id3Track=this._txtTrack=void 0}parseAACPES(e,t){let r=0;const n=this.aacOverFlow;let i=t.data;if(n){this.aacOverFlow=null;const _=n.missing,A=n.sample.unit.byteLength;if(_===-1)i=De(n.sample.unit,i);else{const L=A-_;n.sample.unit.set(i.subarray(0,_),L),e.samples.push(n.sample),r=n.missing}}let s,l;for(s=r,l=i.length;s<l-1&&!Ms(i,s);s++);if(s!==r){let _;const A=s<l-1;if(A?_=`AAC PES did not start with ADTS header,offset:${s}`:_="No ADTS header found in AAC PES",tt(this.observer,new Error(_),A,this.logger),!A)return}ha(e,this.observer,i,s,this.audioCodec);let h;if(t.pts!==void 0)h=t.pts;else if(n){const _=Na(e.samplerate);h=n.sample.pts+_}else{this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}let c=0,p;for(;s<l;)if(p=$a(e,i,s,h,c),s+=p.length,p.missing){this.aacOverFlow=p;break}else for(c++;s<l-1&&!Ms(i,s);s++);}parseMPEGPES(e,t){const r=t.data,n=r.length;let i=0,s=0;const l=t.pts;if(l===void 0){this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;s<n;)if(Ns(r,s)){const h=Xa(e,r,s,l,i);if(h)s+=h.length,i++;else break}else s++}parseAC3PES(e,t){{const r=t.data,n=t.pts;if(n===void 0){this.logger.warn("[tsdemuxer]: AC3 PES unknown PTS");return}const i=r.length;let s=0,l=0,h;for(;l<i&&(h=xa(e,r,l,n,s++))>0;)l+=h}}parseID3PES(e,t){if(t.pts===void 0){this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const r=E({},t,{type:this._videoTrack?Si.emsg:Si.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(r)}}function ge(a,e){return((a[e+1]&31)<<8)+a[e+2]}function Te(a,e){return(a[e+10]&31)<<8|a[e+11]}function Ne(a,e,t,r,n,i){const s={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},l=(a[e+1]&15)<<8|a[e+2],h=e+3+l-4,c=(a[e+10]&15)<<8|a[e+11];for(e+=12+c;e<h;){const p=ge(a,e),_=(a[e+3]&15)<<8|a[e+4];switch(a[e]){case 207:if(!r){ft("ADTS AAC",i);break}case 15:s.audioPid===-1&&(s.audioPid=p);break;case 21:s.id3Pid===-1&&(s.id3Pid=p);break;case 219:if(!r){ft("H.264",i);break}case 27:s.videoPid===-1&&(s.videoPid=p);break;case 3:case 4:!t.mpeg&&!t.mp3?i.log("MPEG audio found, not supported in this browser"):s.audioPid===-1&&(s.audioPid=p,s.segmentAudioCodec="mp3");break;case 193:if(!r){ft("AC-3",i);break}case 129:t.ac3?s.audioPid===-1&&(s.audioPid=p,s.segmentAudioCodec="ac3"):i.log("AC-3 audio found, not supported in this browser");break;case 6:if(s.audioPid===-1&&_>0){let A=e+5,L=_;for(;L>2;){switch(a[A]){case 106:t.ac3!==!0?i.log("AC-3 audio found, not supported in this browser for now"):(s.audioPid=p,s.segmentAudioCodec="ac3");break}const re=a[A+1]+2;A+=re,L-=re}}break;case 194:case 135:return tt(n,new Error("Unsupported EC-3 in M2TS found"),void 0,i),s;case 36:s.videoPid===-1&&(s.videoPid=p,s.segmentVideoCodec="hevc",i.log("HEVC in M2TS found"));break}e+=_+5}return s}function tt(a,e,t,r){r.warn(`parsing error: ${e.message}`),a.emit(m.ERROR,m.ERROR,{type:_e.MEDIA_ERROR,details:O.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function ft(a,e){e.log(`${a} with AES-128-CBC encryption found in unencrypted stream`)}function Et(a,e){let t=0,r,n,i,s,l;const h=a.data;if(!a||a.size===0)return null;for(;h[0].length<19&&h.length>1;)h[0]=De(h[0],h[1]),h.splice(1,1);if(r=h[0],(r[0]<<16)+(r[1]<<8)+r[2]===1){if(n=(r[4]<<8)+r[5],n&&n>a.size-6)return null;const p=r[7];p&192&&(s=(r[9]&14)*536870912+(r[10]&255)*4194304+(r[11]&254)*16384+(r[12]&255)*128+(r[13]&254)/2,p&64?(l=(r[14]&14)*536870912+(r[15]&255)*4194304+(r[16]&254)*16384+(r[17]&255)*128+(r[18]&254)/2,s-l>60*9e4&&(e.warn(`${Math.round((s-l)/9e4)}s delta between PTS and DTS, align them`),s=l)):l=s),i=r[8];let _=i+9;if(a.size<=_)return null;a.size-=_;const A=new Uint8Array(a.size);for(let L=0,I=h.length;L<I;L++){r=h[L];let re=r.byteLength;if(_)if(_>re){_-=re;continue}else r=r.subarray(_),re-=_,_=0;A.set(r,t),t+=re}return n&&(n-=i+3),{data:A,pts:s,dts:l,len:n}}return null}class Mt{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 Ft=Math.pow(2,32)-1;class je{static init(){je.types={avc1:[],avcC:[],hvc1:[],hvcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],dac3:[],"ac-3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};let e;for(e in je.types)je.types.hasOwnProperty(e)&&(je.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]);je.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]);je.STTS=je.STSC=je.STCO=i,je.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),je.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),je.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),je.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const s=new Uint8Array([105,115,111,109]),l=new Uint8Array([97,118,99,49]),h=new Uint8Array([0,0,0,1]);je.FTYP=je.box(je.types.ftyp,s,h,s,l),je.DINF=je.box(je.types.dinf,je.box(je.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 je.box(je.types.hdlr,je.HDLR_TYPES[e])}static mdat(e){return je.box(je.types.mdat,e)}static mdhd(e,t){t*=e;const r=Math.floor(t/(Ft+1)),n=Math.floor(t%(Ft+1));return je.box(je.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 je.box(je.types.mdia,je.mdhd(e.timescale||0,e.duration||0),je.hdlr(e.type),je.minf(e))}static mfhd(e){return je.box(je.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"?je.box(je.types.minf,je.box(je.types.smhd,je.SMHD),je.DINF,je.stbl(e)):je.box(je.types.minf,je.box(je.types.vmhd,je.VMHD),je.DINF,je.stbl(e))}static moof(e,t,r){return je.box(je.types.moof,je.mfhd(e),je.traf(r,t))}static moov(e){let t=e.length;const r=[];for(;t--;)r[t]=je.trak(e[t]);return je.box.apply(null,[je.types.moov,je.mvhd(e[0].timescale||0,e[0].duration||0)].concat(r).concat(je.mvex(e)))}static mvex(e){let t=e.length;const r=[];for(;t--;)r[t]=je.trex(e[t]);return je.box.apply(null,[je.types.mvex,...r])}static mvhd(e,t){t*=e;const r=Math.floor(t/(Ft+1)),n=Math.floor(t%(Ft+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 je.box(je.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 je.box(je.types.sdtp,r)}static stbl(e){return je.box(je.types.stbl,je.stsd(e),je.box(je.types.stts,je.STTS),je.box(je.types.stsc,je.STSC),je.box(je.types.stsz,je.STSZ),je.box(je.types.stco,je.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 l=je.box(je.types.avcC,new Uint8Array([1,t[3],t[4],t[5],255,224|e.sps.length].concat(t).concat([e.pps.length]).concat(r))),h=e.width,c=e.height,p=e.pixelRatio[0],_=e.pixelRatio[1];return je.box(je.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,h>>8&255,h&255,c>>8&255,c&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),l,je.box(je.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),je.box(je.types.pasp,new Uint8Array([p>>24,p>>16&255,p>>8&255,p&255,_>>24,_>>16&255,_>>8&255,_&255])))}static esds(e){const t=e.config;return new Uint8Array([0,0,0,0,3,25,0,1,0,4,17,64,21,0,0,0,0,0,0,0,0,0,0,0,5,2,...t,6,1,2])}static audioStsd(e){const t=e.samplerate||0;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount||0,0,16,0,0,0,0,t>>8&255,t&255,0,0])}static mp4a(e){return je.box(je.types.mp4a,je.audioStsd(e),je.box(je.types.esds,je.esds(e)))}static mp3(e){return je.box(je.types[".mp3"],je.audioStsd(e))}static ac3(e){return je.box(je.types["ac-3"],je.audioStsd(e),je.box(je.types.dac3,e.config))}static stsd(e){const{segmentCodec:t}=e;if(e.type==="audio"){if(t==="aac")return je.box(je.types.stsd,je.STSD,je.mp4a(e));if(t==="ac3"&&e.config)return je.box(je.types.stsd,je.STSD,je.ac3(e));if(t==="mp3"&&e.codec==="mp3")return je.box(je.types.stsd,je.STSD,je.mp3(e))}else if(e.pps&&e.sps){if(t==="avc")return je.box(je.types.stsd,je.STSD,je.avc1(e));if(t==="hevc"&&e.vps)return je.box(je.types.stsd,je.STSD,je.hvc1(e))}else throw new Error("video track missing pps or sps");throw new Error(`unsupported ${e.type} segment codec (${t}/${e.codec})`)}static tkhd(e){const t=e.id,r=(e.duration||0)*(e.timescale||0),n=e.width||0,i=e.height||0,s=Math.floor(r/(Ft+1)),l=Math.floor(r%(Ft+1));return je.box(je.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,t&255,0,0,0,0,s>>24,s>>16&255,s>>8&255,s&255,l>>24,l>>16&255,l>>8&255,l&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,n>>8&255,n&255,0,0,i>>8&255,i&255,0,0]))}static traf(e,t){const r=je.sdtp(e),n=e.id,i=Math.floor(t/(Ft+1)),s=Math.floor(t%(Ft+1));return je.box(je.types.traf,je.box(je.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,n&255])),je.box(je.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])),je.trun(e,r.length+16+20+8+16+8+8),r)}static trak(e){return e.duration=e.duration||4294967295,je.box(je.types.trak,je.tkhd(e),je.mdia(e))}static trex(e){const t=e.id;return je.box(je.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 l,h,c,p,_,A;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),l=0;l<n;l++)h=r[l],c=h.duration,p=h.size,_=h.flags,A=h.cts,s.set([c>>>24&255,c>>>16&255,c>>>8&255,c&255,p>>>24&255,p>>>16&255,p>>>8&255,p&255,_.isLeading<<2|_.dependsOn,_.isDependedOn<<6|_.hasRedundancy<<4|_.paddingValue<<1|_.isNonSync,_.degradPrio&61440,_.degradPrio&15,A>>>24&255,A>>>16&255,A>>>8&255,A&255],12+16*l);return je.box(je.types.trun,s)}static initSegment(e){je.types||je.init();const t=je.moov(e);return De(je.FTYP,t)}static hvc1(e){const t=e.params,r=[e.vps,e.sps,e.pps],n=4,i=new Uint8Array([1,t.general_profile_space<<6|(t.general_tier_flag?32:0)|t.general_profile_idc,t.general_profile_compatibility_flags[0],t.general_profile_compatibility_flags[1],t.general_profile_compatibility_flags[2],t.general_profile_compatibility_flags[3],t.general_constraint_indicator_flags[0],t.general_constraint_indicator_flags[1],t.general_constraint_indicator_flags[2],t.general_constraint_indicator_flags[3],t.general_constraint_indicator_flags[4],t.general_constraint_indicator_flags[5],t.general_level_idc,240|t.min_spatial_segmentation_idc>>8,255&t.min_spatial_segmentation_idc,252|t.parallelismType,252|t.chroma_format_idc,248|t.bit_depth_luma_minus8,248|t.bit_depth_chroma_minus8,0,parseInt(t.frame_rate.fps),n-1|t.temporal_id_nested<<2|t.num_temporal_layers<<3|(t.frame_rate.fixed?64:0),r.length]);let s=i.length;for(let I=0;I<r.length;I+=1){s+=3;for(let re=0;re<r[I].length;re+=1)s+=2+r[I][re].length}const l=new Uint8Array(s);l.set(i,0),s=i.length;const h=r.length-1;for(let I=0;I<r.length;I+=1){l.set(new Uint8Array([32+I|(I===h?128:0),0,r[I].length]),s),s+=3;for(let re=0;re<r[I].length;re+=1)l.set(new Uint8Array([r[I][re].length>>8,r[I][re].length&255]),s),s+=2,l.set(r[I][re],s),s+=r[I][re].length}const c=je.box(je.types.hvcC,l),p=e.width,_=e.height,A=e.pixelRatio[0],L=e.pixelRatio[1];return je.box(je.types.hvc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,p>>8&255,p&255,_>>8&255,_&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]),c,je.box(je.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),je.box(je.types.pasp,new Uint8Array([A>>24,A>>16&255,A>>8&255,A&255,L>>24,L>>16&255,L>>8&255,L&255])))}}je.types=void 0,je.HDLR_TYPES=void 0,je.STTS=void 0,je.STSC=void 0,je.STCO=void 0,je.STSZ=void 0,je.VMHD=void 0,je.SMHD=void 0,je.STSD=void 0,je.FTYP=void 0,je.DINF=void 0;const dr=9e4;function Rr(a,e,t=1,r=!1){const n=a*e*t;return r?Math.round(n):n}function $r(a,e,t=1,r=!1){return Rr(a,e,1/t,r)}function Br(a,e=!1){return Rr(a,1e3,1/dr,e)}function Dn(a,e=1){return Rr(a,dr,1/e)}const xn=10*1e3,Bn=1024,Nn=1152,Gn=1536;let Kn=null,Yn=null;function gn(a,e,t,r){return{duration:e,size:t,cts:r,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:a?2:1,isNonSync:a?0:1}}}class si{constructor(e,t,r,n){if(this.logger=void 0,this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=e,this.config=t,this.typeSupported=r,this.logger=n,this.ISGenerated=!1,Kn===null){const s=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Kn=s?parseInt(s[1]):0}if(Yn===null){const i=navigator.userAgent.match(/Safari\/(\d+)/i);Yn=i?parseInt(i[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){this.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){this.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){this.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}getVideoStartPts(e){let t=!1;const r=e[0].pts,n=e.reduce((i,s)=>{let l=s.pts,h=l-i;return h<-4294967296&&(t=!0,l=Xn(l,r),h=l-i),h>0?i:l},r);return t&&this.logger.debug("PTS rollover detected"),n}remux(e,t,r,n,i,s,l,h){let c,p,_,A,L,I,re=i,ce=i;const ke=e.pid>-1,We=t.pid>-1,He=t.samples.length,ct=e.samples.length>0,ht=l&&He>0||He>1;if((!ke||ct)&&(!We||ht)||this.ISGenerated||l){if(this.ISGenerated){var dt,xt,It,pt;const Cr=this.videoTrackConfig;(Cr&&(t.width!==Cr.width||t.height!==Cr.height||((dt=t.pixelRatio)==null?void 0:dt[0])!==((xt=Cr.pixelRatio)==null?void 0:xt[0])||((It=t.pixelRatio)==null?void 0:It[1])!==((pt=Cr.pixelRatio)==null?void 0:pt[1]))||!Cr&&ht||this.nextAudioPts===null&&ct)&&this.resetInitSegment()}this.ISGenerated||(_=this.generateIS(e,t,i,s));const Ht=this.isVideoContiguous;let er=-1,tn;if(ht&&(er=ki(t.samples),!Ht&&this.config.forceKeyFrameOnDiscontinuity))if(I=!0,er>0){this.logger.warn(`[mp4-remuxer]: Dropped ${er} out of ${He} video samples due to a missing keyframe`);const Cr=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(er),t.dropped+=er,ce+=(t.samples[0].pts-Cr)/t.inputTimeScale,tn=ce}else er===-1&&(this.logger.warn(`[mp4-remuxer]: No keyframe found out of ${He} video samples`),I=!1);if(this.ISGenerated){if(ct&&ht){const Cr=this.getVideoStartPts(t.samples),ur=(Xn(e.samples[0].pts,Cr)-Cr)/t.inputTimeScale;re+=Math.max(0,ur),ce+=Math.max(0,-ur)}if(ct){if(e.samplerate||(this.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),_=this.generateIS(e,t,i,s)),p=this.remuxAudio(e,re,this.isAudioContiguous,s,We||ht||h===ie.AUDIO?ce:void 0),ht){const Cr=p?p.endPTS-p.startPTS:0;t.inputTimeScale||(this.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),_=this.generateIS(e,t,i,s)),c=this.remuxVideo(t,ce,Ht,Cr)}}else ht&&(c=this.remuxVideo(t,ce,Ht,0));c&&(c.firstKeyFrame=er,c.independent=er!==-1,c.firstKeyFramePTS=tn)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(r.samples.length&&(L=ti(r,i,this._initPTS,this._initDTS)),n.samples.length&&(A=$i(n,i,this._initPTS))),{audio:p,video:c,initSegment:_,independent:I,text:A,id3:L}}generateIS(e,t,r,n){const i=e.samples,s=t.samples,l=this.typeSupported,h={},c=this._initPTS;let p=!c||n,_="audio/mp4",A,L,I;if(p&&(A=L=1/0),e.config&&i.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":l.mpeg?(_="audio/mpeg",e.codec=""):l.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}h.audio={id:"audio",container:_,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&l.mpeg?new Uint8Array(0):je.initSegment([e]),metadata:{channelCount:e.channelCount}},p&&(I=e.inputTimeScale,!c||I!==c.timescale?A=L=i[0].pts-Math.round(I*r):p=!1)}if(t.sps&&t.pps&&s.length){if(t.timescale=t.inputTimeScale,h.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:je.initSegment([t]),metadata:{width:t.width,height:t.height}},p)if(I=t.inputTimeScale,!c||I!==c.timescale){const re=this.getVideoStartPts(s),ce=Math.round(I*r);L=Math.min(L,Xn(s[0].dts,re)-ce),A=Math.min(A,re-ce)}else p=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(h).length)return this.ISGenerated=!0,p?(this._initPTS={baseTime:A,timescale:I},this._initDTS={baseTime:L,timescale:I}):A=I=void 0,{tracks:h,initPTS:A,timescale:I}}remuxVideo(e,t,r,n){const i=e.inputTimeScale,s=e.samples,l=[],h=s.length,c=this._initPTS;let p=this.nextAvcDts,_=8,A=this.videoSampleDuration,L,I,re=Number.POSITIVE_INFINITY,ce=Number.NEGATIVE_INFINITY,ke=!1;if(!r||p===null){const jt=t*i,Yt=s[0].pts-Xn(s[0].dts,s[0].pts);Kn&&p!==null&&Math.abs(jt-Yt-p)<15e3?r=!0:p=jt-Yt}const We=c.baseTime*i/c.timescale;for(let jt=0;jt<h;jt++){const Yt=s[jt];Yt.pts=Xn(Yt.pts-We,p),Yt.dts=Xn(Yt.dts-We,p),Yt.dts<s[jt>0?jt-1:jt].dts&&(ke=!0)}ke&&s.sort(function(jt,Yt){const Nr=jt.dts-Yt.dts,Dr=jt.pts-Yt.pts;return Nr||Dr}),L=s[0].dts,I=s[s.length-1].dts;const He=I-L,ct=He?Math.round(He/(h-1)):A||e.inputTimeScale/30;if(r){const jt=L-p,Yt=jt>ct,Nr=jt<-1;if((Yt||Nr)&&(Yt?this.logger.warn(`${(e.segmentCodec||"").toUpperCase()}: ${Br(jt,!0)} ms (${jt}dts) hole between fragments detected at ${t.toFixed(3)}`):this.logger.warn(`${(e.segmentCodec||"").toUpperCase()}: ${Br(-jt,!0)} ms (${jt}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!Nr||p>=s[0].pts||Kn)){L=p;const Dr=s[0].pts-jt;if(Yt)s[0].dts=L,s[0].pts=Dr;else{let en=!0;for(let fn=0;fn<s.length&&!(s[fn].dts>Dr&&en);fn++){const En=s[fn].pts;if(s[fn].dts-=jt,s[fn].pts-=jt,fn<s.length-1){const kn=s[fn+1].pts,wi=s[fn].pts,Ii=kn<=wi,As=kn<=En;en=Ii==As}}}this.logger.log(`Video: Initial PTS/DTS adjusted: ${Br(Dr,!0)}/${Br(L,!0)}, delta: ${Br(jt,!0)} ms`)}}L=Math.max(0,L);let ht=0,Tt=0,dt=L;for(let jt=0;jt<h;jt++){const Yt=s[jt],Nr=Yt.units,Dr=Nr.length;let en=0;for(let fn=0;fn<Dr;fn++)en+=Nr[fn].data.length;Tt+=en,ht+=Dr,Yt.length=en,Yt.dts<dt?(Yt.dts=dt,dt+=ct/4|0||1):dt=Yt.dts,re=Math.min(Yt.pts,re),ce=Math.max(Yt.pts,ce)}I=s[h-1].dts;const xt=Tt+4*ht+8;let It;try{It=new Uint8Array(xt)}catch(jt){this.observer.emit(m.ERROR,m.ERROR,{type:_e.MUX_ERROR,details:O.REMUX_ALLOC_ERROR,fatal:!1,error:jt,bytes:xt,reason:`fail allocating video mdat ${xt}`});return}const pt=new DataView(It.buffer);pt.setUint32(0,xt),It.set(je.types.mdat,4);let Ht=!1,er=Number.POSITIVE_INFINITY,tn=Number.POSITIVE_INFINITY,Cr=Number.NEGATIVE_INFINITY,br=Number.NEGATIVE_INFINITY;for(let jt=0;jt<h;jt++){const Yt=s[jt],Nr=Yt.units;let Dr=0;for(let En=0,kn=Nr.length;En<kn;En++){const wi=Nr[En],Ii=wi.data,As=wi.data.byteLength;pt.setUint32(_,As),_+=4,It.set(Ii,_),_+=As,Dr+=4+As}let en;if(jt<h-1)A=s[jt+1].dts-Yt.dts,en=s[jt+1].pts-Yt.pts;else{const En=this.config,kn=jt>0?Yt.dts-s[jt-1].dts:ct;if(en=jt>0?Yt.pts-s[jt-1].pts:ct,En.stretchShortVideoTrack&&this.nextAudioPts!==null){const wi=Math.floor(En.maxBufferHole*i),Ii=(n?re+n*i:this.nextAudioPts)-Yt.pts;Ii>wi?(A=Ii-kn,A<0?A=kn:Ht=!0,this.logger.log(`[mp4-remuxer]: It is approximately ${Ii/90} ms to the next segment; using duration ${A/90} ms for the last video frame.`)):A=kn}else A=kn}const fn=Math.round(Yt.pts-Yt.dts);er=Math.min(er,A),Cr=Math.max(Cr,A),tn=Math.min(tn,en),br=Math.max(br,en),l.push(gn(Yt.key,A,Dr,fn))}if(l.length){if(Kn){if(Kn<70){const jt=l[0].flags;jt.dependsOn=2,jt.isNonSync=0}}else if(Yn&&br-tn<Cr-er&&ct/Cr<.025&&l[0].cts===0){this.logger.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let jt=L;for(let Yt=0,Nr=l.length;Yt<Nr;Yt++){const Dr=jt+l[Yt].duration,en=jt+l[Yt].cts;if(Yt<Nr-1){const fn=Dr+l[Yt+1].cts;l[Yt].duration=fn-en}else l[Yt].duration=Yt?l[Yt-1].duration:ct;l[Yt].cts=0,jt=Dr}}}A=Ht||!A?ct:A,this.nextAvcDts=p=I+A,this.videoSampleDuration=A,this.isVideoContiguous=!0;const vr={data1:je.moof(e.sequenceNumber++,L,E(e,{samples:l})),data2:It,startPTS:re/i,endPTS:(ce+A)/i,startDTS:L/i,endDTS:p/i,type:"video",hasAudio:!1,hasVideo:!0,nb:l.length,dropped:e.dropped};return e.samples=[],e.dropped=0,vr}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return Nn;case"ac3":return Gn;default:return Bn}}remuxAudio(e,t,r,n,i){const s=e.inputTimeScale,l=e.samplerate?e.samplerate:s,h=s/l,c=this.getSamplesPerFrame(e),p=c*h,_=this._initPTS,A=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,L=[],I=i!==void 0;let re=e.samples,ce=A?0:8,ke=this.nextAudioPts||-1;const We=t*s,He=_.baseTime*s/_.timescale;if(this.isAudioContiguous=r=r||re.length&&ke>0&&(n&&Math.abs(We-ke)<9e3||Math.abs(Xn(re[0].pts-He,We)-ke)<20*p),re.forEach(function(ur){ur.pts=Xn(ur.pts-He,We)}),!r||ke<0){if(re=re.filter(ur=>ur.pts>=0),!re.length)return;i===0?ke=0:n&&!I?ke=Math.max(0,We):ke=re[0].pts}if(e.segmentCodec==="aac"){const ur=this.config.maxAudioFramesDrift;for(let xr=0,vr=ke;xr<re.length;xr++){const jt=re[xr],Yt=jt.pts,Nr=Yt-vr,Dr=Math.abs(1e3*Nr/s);if(Nr<=-ur*p&&I)xr===0&&(this.logger.warn(`Audio frame @ ${(Yt/s).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3*Nr/s)} ms.`),this.nextAudioPts=ke=vr=Yt);else if(Nr>=ur*p&&Dr<xn&&I){let en=Math.round(Nr/p);vr=Yt-en*p,vr<0&&(en--,vr+=p),xr===0&&(this.nextAudioPts=ke=vr),this.logger.warn(`[mp4-remuxer]: Injecting ${en} audio frame @ ${(vr/s).toFixed(3)}s due to ${Math.round(1e3*Nr/s)} ms gap.`);for(let fn=0;fn<en;fn++){const En=Math.max(vr,0);let kn=Mt.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);kn||(this.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),kn=jt.unit.subarray()),re.splice(xr,0,{unit:kn,pts:En}),vr+=p,xr++}}jt.pts=vr,vr+=p}}let ct=null,ht=null,Tt,dt=0,xt=re.length;for(;xt--;)dt+=re[xt].unit.byteLength;for(let ur=0,xr=re.length;ur<xr;ur++){const vr=re[ur],jt=vr.unit;let Yt=vr.pts;if(ht!==null){const Dr=L[ur-1];Dr.duration=Math.round((Yt-ht)/h)}else if(r&&e.segmentCodec==="aac"&&(Yt=ke),ct=Yt,dt>0){dt+=ce;try{Tt=new Uint8Array(dt)}catch(Dr){this.observer.emit(m.ERROR,m.ERROR,{type:_e.MUX_ERROR,details:O.REMUX_ALLOC_ERROR,fatal:!1,error:Dr,bytes:dt,reason:`fail allocating audio mdat ${dt}`});return}A||(new DataView(Tt.buffer).setUint32(0,dt),Tt.set(je.types.mdat,4))}else return;Tt.set(jt,ce);const Nr=jt.byteLength;ce+=Nr,L.push(gn(!0,c,Nr,0)),ht=Yt}const It=L.length;if(!It)return;const pt=L[L.length-1];this.nextAudioPts=ke=ht+h*pt.duration;const Ht=A?new Uint8Array(0):je.moof(e.sequenceNumber++,ct/h,E({},e,{samples:L}));e.samples=[];const er=ct/s,tn=ke/s,br={data1:Ht,data2:Tt,startPTS:er,endPTS:tn,startDTS:er,endDTS:tn,type:"audio",hasAudio:!0,hasVideo:!1,nb:It};return this.isAudioContiguous=!0,br}}function Xn(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 ki(a){for(let e=0;e<a.length;e++)if(a[e].key)return e;return-1}function ti(a,e,t,r){const n=a.samples.length;if(!n)return;const i=a.inputTimeScale;for(let l=0;l<n;l++){const h=a.samples[l];h.pts=Xn(h.pts-t.baseTime*i/t.timescale,e*i)/i,h.dts=Xn(h.dts-r.baseTime*i/r.timescale,e*i)/i}const s=a.samples;return a.samples=[],{samples:s}}function $i(a,e,t){const r=a.samples.length;if(!r)return;const n=a.inputTimeScale;for(let s=0;s<r;s++){const l=a.samples[s];l.pts=Xn(l.pts-t.baseTime*n/t.timescale,e*n)/n}a.samples.sort((s,l)=>s.pts-l.pts);const i=a.samples;return a.samples=[],{samples:i}}class Ui{constructor(e,t,r,n){this.logger=void 0,this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null,this.logger=n}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(Ie(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=Me(e);n.audio&&(t=eo(n.audio,y.AUDIO)),n.video&&(r=eo(n.video,y.VIDEO));const i={};n.audio&&n.video?i.audiovideo={container:"video/mp4",codec:t+","+r,supplemental:n.video.supplemental,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,supplemental:n.video.supplemental,initSegment:e,id:"main"}:this.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=i}remux(e,t,r,n,i,s){var l,h;let{initPTS:c,lastEndTime:p}=this;const _={audio:void 0,video:void 0,text:n,id3:r,initSegment:void 0};$(p)||(p=this.lastEndTime=i||0);const A=t.samples;if(!(A!=null&&A.length))return _;const L={initPTS:void 0,timescale:1};let I=this.initData;if((l=I)!=null&&l.length||(this.generateInitSegment(A),I=this.initData),!((h=I)!=null&&h.length))return this.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),_;this.emitInitSegment&&(L.tracks=this.initTracks,this.emitInitSegment=!1);const re=it(A,I),ce=Qe(I,A),ke=ce===null?i:ce;(s||!c)&&(Ja(c,ke,i,re)||L.timescale!==c.timescale)&&(L.initPTS=ke-i,c&&c.timescale===1&&this.logger.warn(`Adjusting initPTS @${i} from ${c.baseTime/c.timescale} to ${L.initPTS}`),this.initPTS=c={baseTime:L.initPTS,timescale:1});const We=e?ke-c.baseTime/c.timescale:p,He=We+re;Ke(I,A,c.baseTime/c.timescale),re>0?this.lastEndTime=He:(this.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const ct=!!I.audio,ht=!!I.video;let Tt="";ct&&(Tt+="audio"),ht&&(Tt+="video");const dt={data1:A,startPTS:We,startDTS:We,endPTS:He,endDTS:He,type:Tt,hasAudio:ct,hasVideo:ht,nb:1,dropped:0};return _.audio=dt.type==="audio"?dt:void 0,_.video=dt.type!=="audio"?dt:void 0,_.initSegment=L,_.id3=ti(r,i,c,c),n.samples.length&&(_.text=$i(n,i,c)),_}}function Ja(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 eo(a,e){const t=a==null?void 0:a.codec;return t&&t.length>4?t:e===y.AUDIO?t==="ec-3"||t==="ac-3"||t==="alac"?t:t==="fLaC"||t==="Opus"?Ce(t,!1):(J.warn(`Unhandled audio codec "${t}" in mp4 MAP`),t||"mp4a"):(J.warn(`Unhandled video codec "${t}" in mp4 MAP`),t||"avc1")}let mi;try{mi=self.performance.now.bind(self.performance)}catch(a){mi=Date.now}const zi=[{demux:wo,remux:Ui},{demux:z,remux:si},{demux:qa,remux:si},{demux:Ea,remux:si}];zi.splice(2,0,{demux:Eo,remux:si});class rs{constructor(e,t,r,n,i,s){this.asyncResult=!1,this.logger=void 0,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=r,this.id=i,this.logger=s}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,r,n){const i=r.transmuxing;i.executeStart=mi();let s=new Uint8Array(e);const{currentTransmuxState:l,transmuxConfig:h}=this;n&&(this.currentTransmuxState=n);const{contiguous:c,discontinuity:p,trackSwitch:_,accurateTimeOffset:A,timeOffset:L,initSegmentChange:I}=n||l,{audioCodec:re,videoCodec:ce,defaultInitPts:ke,duration:We,initSegmentData:He}=h,ct=ea(s,t);if(ct&&An(ct.method)){const xt=this.getDecrypter(),It=yn(ct.method);if(xt.isSync()){let pt=xt.softwareDecrypt(s,ct.key.buffer,ct.iv.buffer,It);if(r.part>-1){const er=xt.flush();pt=er&&er.buffer}if(!pt)return i.executeEnd=mi(),Es(r);s=new Uint8Array(pt)}else return this.asyncResult=!0,this.decryptionPromise=xt.webCryptoDecrypt(s,ct.key.buffer,ct.iv.buffer,It).then(pt=>{const Ht=this.push(pt,null,r);return this.decryptionPromise=null,Ht}),this.decryptionPromise}const ht=this.needsProbing(p,_);if(ht){const xt=this.configureTransmuxer(s);if(xt)return this.logger.warn(`[transmuxer] ${xt.message}`),this.observer.emit(m.ERROR,m.ERROR,{type:_e.MEDIA_ERROR,details:O.FRAG_PARSING_ERROR,fatal:!1,error:xt,reason:xt.message}),i.executeEnd=mi(),Es(r)}(p||_||I||ht)&&this.resetInitSegment(He,re,ce,We,t),(p||I||ht)&&this.resetInitialTimestamp(ke),c||this.resetContiguity();const Tt=this.transmux(s,ct,L,A,r);this.asyncResult=Fs(Tt);const dt=this.currentTransmuxState;return dt.contiguous=!0,dt.discontinuity=!1,dt.trackSwitch=!1,i.executeEnd=mi(),Tt}flush(e){const t=e.transmuxing;t.executeStart=mi();const{decrypter:r,currentTransmuxState:n,decryptionPromise:i}=this;if(i)return this.asyncResult=!0,i.then(()=>this.flush(e));const s=[],{timeOffset:l}=n;if(r){const _=r.flush();_&&s.push(this.push(_.buffer,null,e))}const{demuxer:h,remuxer:c}=this;if(!h||!c){t.executeEnd=mi();const _=[Es(e)];return this.asyncResult?Promise.resolve(_):_}const p=h.flush(l);return Fs(p)?(this.asyncResult=!0,p.then(_=>(this.flushRemux(s,_,e),s))):(this.flushRemux(s,p,e),this.asyncResult?Promise.resolve(s):s)}flushRemux(e,t,r){const{audioTrack:n,videoTrack:i,id3Track:s,textTrack:l}=t,{accurateTimeOffset:h,timeOffset:c}=this.currentTransmuxState;this.logger.log(`[transmuxer.ts]: Flushed ${this.id} sn: ${r.sn}${r.part>-1?" part: "+r.part:""} of ${this.id===ie.MAIN?"level":"track"} ${r.level}`);const p=this.remuxer.remux(n,i,s,l,c,h,!0,this.id);e.push({remuxResult:p,chunkMeta:r}),r.transmuxing.executeEnd=mi()}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:l}=this;!s||!l||(s.resetInitSegment(e,t,r,n),l.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:l,textTrack:h}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(i,s,l,h,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}=this;let i;for(let _=0,A=zi.length;_<A;_++){var s;if((s=zi[_].demux)!=null&&s.probe(e,this.logger)){i=zi[_];break}}if(!i)return new Error("Failed to find demuxer by probing fragment data");const l=this.demuxer,h=this.remuxer,c=i.remux,p=i.demux;(!h||!(h instanceof c))&&(this.remuxer=new c(r,t,n,this.logger)),(!l||!(l instanceof p))&&(this.demuxer=new p(r,t,n,this.logger),this.probe=p.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new Vn(this.config)),e}}function ea(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 Es=a=>({remuxResult:{},chunkMeta:a});function Fs(a){return"then"in a&&a.then instanceof Function}class Ao{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 Co{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}}let ta=0;class Sa{constructor(e,t,r,n){this.error=null,this.hls=void 0,this.id=void 0,this.instanceNo=ta++,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.onWorkerMessage=h=>{const c=h.data,p=this.hls;if(!(!p||!(c!=null&&c.event)||c.instanceNo!==this.instanceNo))switch(c.event){case"init":{var _;const A=(_=this.workerContext)==null?void 0:_.objectURL;A&&self.URL.revokeObjectURL(A);break}case"transmuxComplete":{this.handleTransmuxComplete(c.data);break}case"flush":{this.onFlush(c.data);break}case"workerLog":{p.logger[c.data.logType]&&p.logger[c.data.logType](c.data.message);break}default:{c.data=c.data||{},c.data.frag=this.frag,c.data.part=this.part,c.data.id=this.id,p.trigger(c.event,c.data);break}}},this.onWorkerError=h=>{if(!this.hls)return;const c=new Error(`${h.message} (${h.filename}:${h.lineno})`);this.hls.config.enableWorker=!1,this.hls.logger.warn(`Error in "${this.id}" Web Worker, fallback to inline`),this.hls.trigger(m.ERROR,{type:_e.OTHER_ERROR,details:O.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:c})};const i=e.config;this.hls=e,this.id=t,this.useWorker=!!i.enableWorker,this.onTransmuxComplete=r,this.onFlush=n;const s=(h,c)=>{c=c||{},c.frag=this.frag||void 0,h===m.ERROR&&(c=c,c.parent=this.id,c.part=this.part,this.error=c.error),this.hls.trigger(h,c)};this.observer=new Ys,this.observer.on(m.FRAG_DECRYPTED,s),this.observer.on(m.ERROR,s);const l=Kt(i.preferManagedMediaSource);if(this.useWorker&&typeof Worker!="undefined"){const h=this.hls.logger;if(i.workerPath||ua()){try{i.workerPath?(h.log(`loading Web Worker ${i.workerPath} for "${t}"`),this.workerContext=ka(i.workerPath)):(h.log(`injecting Web Worker for "${t}"`),this.workerContext=La());const{worker:p}=this.workerContext;p.addEventListener("message",this.onWorkerMessage),p.addEventListener("error",this.onWorkerError),p.postMessage({instanceNo:this.instanceNo,cmd:"init",typeSupported:l,id:t,config:_r(i)})}catch(p){h.warn(`Error setting up "${t}" Web Worker, fallback to inline`,p),this.terminateWorker(),this.error=null,this.transmuxer=new rs(this.observer,l,i,"",t,e.logger)}return}}this.transmuxer=new rs(this.observer,l,i,"",t,e.logger)}reset(){if(this.frag=null,this.part=null,this.workerContext){const e=this.instanceNo;this.instanceNo=ta++;const t=this.hls.config,r=Kt(t.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:e,typeSupported:r,id:this.id,config:_r(t)})}}terminateWorker(){if(this.workerContext){const{worker:e}=this.workerContext;this.workerContext=null,e.removeEventListener("message",this.onWorkerMessage),e.removeEventListener("error",this.onWorkerError),Oa(this.hls.config.workerPath)}}destroy(){if(this.workerContext)this.terminateWorker(),this.onWorkerMessage=this.onWorkerError=null;else{const t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.part=null,this.observer=null,this.hls=null}push(e,t,r,n,i,s,l,h,c,p){var _,A;c.transmuxing.start=self.performance.now();const{instanceNo:L,transmuxer:I}=this,re=s?s.start:i.start,ce=i.decryptdata,ke=this.frag,We=!(ke&&i.cc===ke.cc),He=!(ke&&c.level===ke.level),ct=ke?c.sn-ke.sn:-1,ht=this.part?c.part-this.part.index:-1,Tt=ct===0&&c.id>1&&c.id===(ke==null?void 0:ke.stats.chunkCount),dt=!He&&(ct===1||ct===0&&(ht===1||Tt&&ht<=0)),xt=self.performance.now();(He||ct||i.stats.parsing.start===0)&&(i.stats.parsing.start=xt),s&&(ht||!dt)&&(s.stats.parsing.start=xt);const It=!(ke&&((_=i.initSegment)==null?void 0:_.url)===((A=ke.initSegment)==null?void 0:A.url)),pt=new Co(We,dt,h,He,re,It);if(!dt||We||It){this.hls.logger.log(`[transmuxer-interface]: Starting new transmux session for ${i.type} sn: ${c.sn}${c.part>-1?" part: "+c.part:""} ${this.id===ie.MAIN?"level":"track"}: ${c.level} id: ${c.id}
|
|
discontinuity: ${We}
|
|
trackSwitch: ${He}
|
|
contiguous: ${dt}
|
|
accurateTimeOffset: ${h}
|
|
timeOffset: ${re}
|
|
initSegmentChange: ${It}`);const Ht=new Ao(r,n,t,l,p);this.configureTransmuxer(Ht)}if(this.frag=i,this.part=s,this.workerContext)this.workerContext.worker.postMessage({instanceNo:L,cmd:"demux",data:e,decryptdata:ce,chunkMeta:c,state:pt},e instanceof ArrayBuffer?[e]:[]);else if(I){const Ht=I.push(e,ce,c,pt);Fs(Ht)?Ht.then(er=>{this.handleTransmuxComplete(er)}).catch(er=>{this.transmuxerError(er,c,"transmuxer-interface push error")}):this.handleTransmuxComplete(Ht)}}flush(e){e.transmuxing.start=self.performance.now();const{instanceNo:t,transmuxer:r}=this;if(this.workerContext)this.workerContext.worker.postMessage({instanceNo:t,cmd:"flush",chunkMeta:e});else if(r){const n=r.flush(e);Fs(n)?n.then(i=>{this.handleFlushResult(i,e)}).catch(i=>{this.transmuxerError(i,e,"transmuxer-interface flush error")}):this.handleFlushResult(n,e)}}transmuxerError(e,t,r){this.hls&&(this.error=e,this.hls.trigger(m.ERROR,{type:_e.MEDIA_ERROR,details:O.FRAG_PARSING_ERROR,chunkMeta:t,frag:this.frag||void 0,part:this.part||void 0,fatal:!1,error:e,err:e,reason:r}))}handleFlushResult(e,t){e.forEach(r=>{this.handleTransmuxComplete(r)}),this.onFlush(t)}configureTransmuxer(e){const{instanceNo:t,transmuxer:r}=this;this.workerContext?this.workerContext.worker.postMessage({instanceNo:t,cmd:"configure",config:e}):r&&r.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}const wa=100;class to extends es{constructor(e,t,r){super(e,t,r,"audio-stream-controller",ie.AUDIO),this.mainAnchor=null,this.mainFragLoading=null,this.audioOnly=!1,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.flushing=!1,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.resetItem()}resetItem(){this.mainDetails=this.mainAnchor=this.mainFragLoading=this.bufferedTrack=this.switchingTrack=this.waitingData=this.cachedTrackLoadedData=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(m.LEVEL_LOADED,this.onLevelLoaded,this),e.on(m.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(m.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(m.BUFFER_RESET,this.onBufferReset,this),e.on(m.BUFFER_CREATED,this.onBufferCreated,this),e.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(m.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(m.FRAG_LOADING,this.onFragLoading,this),e.on(m.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){const{hls:e}=this;e&&(super.unregisterListeners(),e.off(m.LEVEL_LOADED,this.onLevelLoaded,this),e.off(m.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(m.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(m.BUFFER_RESET,this.onBufferReset,this),e.off(m.BUFFER_CREATED,this.onBufferCreated,this),e.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(m.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(m.FRAG_LOADING,this.onFragLoading,this),e.off(m.FRAG_BUFFERED,this.onFragBuffered,this))}onInitPtsFound(e,{frag:t,id:r,initPTS:n,timescale:i}){if(r===ie.MAIN){const s=t.cc,l=this.fragCurrent;if(this.initPTS[s]={baseTime:n,timescale:i},this.log(`InitPTS for cc: ${s} found from main: ${n}/${i}`),this.mainAnchor=t,this.state===Rt.WAITING_INIT_PTS){const h=this.waitingData;(!h&&!this.loadingParts||h&&h.frag.cc!==s)&&(this.nextLoadPosition=this.findSyncFrag(t).start),this.tick()}else!this.hls.hasEnoughToStart&&l&&l.cc!==s?(this.startFragRequested=!1,this.nextLoadPosition=this.findSyncFrag(t).start,l.abortRequests(),this.resetLoadingState()):this.state===Rt.IDLE&&this.tick()}}findSyncFrag(e){const t=this.getLevelDetails(),r=e.cc;return Yr(t,r,e)||t&&rn(t.fragments,r)||e}startLoad(e,t){if(!this.levels){this.startPosition=e,this.state=Rt.STOPPED;return}const r=this.lastCurrentTime;this.stopLoad(),this.setInterval(wa),r>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${r.toFixed(3)}`),e=r,this.state=Rt.IDLE):this.state=Rt.WAITING_TRACK,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}doTick(){switch(this.state){case Rt.IDLE:this.doTickIdle();break;case Rt.WAITING_TRACK:{const{levels:t,trackId:r}=this,n=t==null?void 0:t[r],i=n==null?void 0:n.details;if(i&&!this.waitForLive(n)){if(this.waitForCdnTuneIn(i))break;this.state=Rt.WAITING_INIT_PTS}break}case Rt.FRAG_LOADING_WAITING_RETRY:{var e;const t=performance.now(),r=this.retryDate;if(!r||t>=r||(e=this.media)!=null&&e.seeking){const{levels:n,trackId:i}=this;this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded((n==null?void 0:n[i])||null),this.state=Rt.IDLE}break}case Rt.WAITING_INIT_PTS:{const t=this.waitingData;if(t){const{frag:r,part:n,cache:i,complete:s}=t,l=this.mainAnchor;if(this.initPTS[r.cc]!==void 0){this.waitingData=null,this.state=Rt.FRAG_LOADING;const h=i.flush().buffer,c={frag:r,part:n,payload:h,networkDetails:null};this._handleFragmentLoadProgress(c),s&&super._handleFragmentLoadComplete(c)}else l&&l.cc!==t.frag.cc&&(this.log(`Waiting fragment cc (${r.cc}) cancelled because video is at cc ${l.cc}`),this.nextLoadPosition=this.findSyncFrag(l).start,this.clearWaitingFragment())}else this.state=Rt.IDLE}}this.onTickEnd()}clearWaitingFragment(){const e=this.waitingData;e&&(this.hls.hasEnoughToStart||(this.startFragRequested=!1),this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.state!==Rt.STOPPED&&(this.state=Rt.IDLE))}resetLoadingState(){this.clearWaitingFragment(),super.resetLoadingState()}onTickEnd(){const{media:e}=this;e!=null&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){var e;const{hls:t,levels:r,media:n,trackId:i}=this,s=t.config;if(!this.buffering||!n&&!this.primaryPrefetch&&(this.startFragRequested||!s.startFragPrefetch)||!(r!=null&&r[i]))return;const l=r[i],h=l.details;if(!h||this.waitForLive(l)||this.waitForCdnTuneIn(h)){this.state=Rt.WAITING_TRACK,this.startFragRequested=!1;return}const c=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&c&&(this.bufferFlushed=!1,this.afterBufferFlushed(c,y.AUDIO,ie.AUDIO));const p=this.getFwdBufferInfo(c,ie.AUDIO);if(p===null)return;if(!this.switchingTrack&&this._streamEnded(p,h)){t.trigger(m.BUFFER_EOS,{type:"audio"}),this.state=Rt.ENDED;return}const _=p.len,A=t.maxBufferLength,L=h.fragments,I=L[0].start,re=this.getLoadPosition(),ce=this.flushing?re:p.end;if(this.switchingTrack&&n){const He=re;h.PTSKnown&&He<I&&(p.end>I||p.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),n.currentTime=I+.05)}if(_>=A&&!this.switchingTrack&&ce<L[L.length-1].start)return;let ke=this.getNextFragment(ce,h);if(ke&&this.isLoopLoading(ke,ce)&&(ke=this.getNextFragmentLoopLoading(ke,h,p,ie.MAIN,A)),!ke){this.bufferFlushed=!0;return}let We=((e=this.mainFragLoading)==null?void 0:e.frag)||null;if(!this.audioOnly&&this.startFragRequested&&We&&te(ke)&&!ke.endList&&(!h.live||!this.loadingParts&&ce<this.hls.liveSyncPosition)&&(this.fragmentTracker.getState(We)===yr.OK&&(this.mainFragLoading=We=null),We&&te(We))){if(ke.start>We.end){const ct=this.fragmentTracker.getFragAtPos(ce,ie.MAIN);ct&&ct.end>We.end&&(We=ct,this.mainFragLoading={frag:ct,targetBufferTime:null})}if(ke.start>We.end)return}this.loadFragment(ke,l,ce)}onMediaDetaching(e,t){this.bufferFlushed=this.flushing=!1,super.onMediaDetaching(e,t)}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(r=>new zr(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.switchingTrack=t,this.flushAudioIfNeeded(t),this.state!==Rt.STOPPED&&(this.setInterval(wa),this.state=Rt.IDLE,this.tick())):(this.resetTransmuxer(),this.switchingTrack=null,this.bufferedTrack=t,this.clearInterval())}onManifestLoading(){super.onManifestLoading(),this.bufferFlushed=this.flushing=this.audioOnly=!1,this.resetItem(),this.trackId=-1}onLevelLoaded(e,t){this.mainDetails=t.details;const r=this.cachedTrackLoadedData;r&&(this.cachedTrackLoadedData=null,this.onAudioTrackLoaded(m.AUDIO_TRACK_LOADED,r))}onAudioTrackLoaded(e,t){var r;const{levels:n}=this,{details:i,id:s,groupId:l,track:h}=t;if(!n){this.warn(`Audio tracks reset while loading track ${s} "${h.name}" of "${l}"`);return}const c=this.mainDetails;if(!c||i.endCC>c.endCC||c.expired){this.cachedTrackLoadedData=t,this.state!==Rt.STOPPED&&(this.state=Rt.WAITING_TRACK);return}this.cachedTrackLoadedData=null,this.log(`Audio track ${s} "${h.name}" of "${l}" loaded [${i.startSN},${i.endSN}]${i.lastPartSn?`[part-${i.lastPartSn}-${i.lastPartIndex}]`:""},duration:${i.totalduration}`);const p=n[s];let _=0;if(i.live||(r=p.details)!=null&&r.live){if(this.checkLiveUpdate(i),i.deltaUpdateFailed)return;if(p.details){var A;_=this.alignPlaylists(i,p.details,(A=this.levelLastLoaded)==null?void 0:A.details)}i.alignedSliding||(on(i,c),i.alignedSliding||Qn(i,c),_=i.fragmentStart)}p.details=i,this.levelLastLoaded=p,this.startFragRequested||this.setStartPosition(c,_),this.hls.trigger(m.AUDIO_TRACK_UPDATED,{details:i,id:s,groupId:t.groupId}),this.state===Rt.WAITING_TRACK&&!this.waitForCdnTuneIn(i)&&(this.state=Rt.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const r=e.frag,{part:n,payload:i}=e,{config:s,trackId:l,levels:h}=this;if(!h){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 c=h[l];if(!c){this.warn("Audio track is undefined on fragment load progress");return}const p=c.details;if(!p){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(r.start);return}const _=s.defaultAudioCodec||c.audioCodec||"mp4a.40.2";let A=this.transmuxer;A||(A=this.transmuxer=new Sa(this.hls,ie.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const L=this.initPTS[r.cc],I=(t=r.initSegment)==null?void 0:t.data;if(L!==void 0){const ce=n?n.index:-1,ke=ce!==-1,We=new Un(r.level,r.sn,r.stats.chunkCount,i.byteLength,ce,ke);A.push(i,I,_,"",r,n,p.totalduration,!1,We,L)}else{this.log(`Unknown video PTS for cc ${r.cc}, waiting for video PTS before demuxing audio frag ${r.sn} of [${p.startSN} ,${p.endSN}],track ${l}`);const{cache:re}=this.waitingData=this.waitingData||{frag:r,part:n,cache:new Ls,complete:!1};re.push(new Uint8Array(i)),this.state!==Rt.STOPPED&&(this.state=Rt.WAITING_INIT_PTS)}}_handleFragmentLoadComplete(e){if(this.waitingData){this.waitingData.complete=!0;return}super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=null}onBufferCreated(e,t){this.bufferFlushed=this.flushing=!1;const r=t.tracks.audio;r&&(this.mediaBuffer=r.buffer||null)}onFragLoading(e,t){!this.audioOnly&&t.frag.type===ie.MAIN&&te(t.frag)&&(this.mainFragLoading=t,this.state===Rt.IDLE&&this.tick())}onFragBuffered(e,t){const{frag:r,part:n}=t;if(r.type!==ie.AUDIO){!this.audioOnly&&r.type===ie.MAIN&&!r.elementaryStreams.video&&!r.elementaryStreams.audiovideo&&(this.audioOnly=!0,this.mainFragLoading=null);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(te(r)){this.fragPrevious=r;const i=this.switchingTrack;i&&(this.bufferedTrack=i,this.switchingTrack=null,this.hls.trigger(m.AUDIO_TRACK_SWITCHED,S({},i)))}this.fragBufferedComplete(r,n),this.media&&this.tick()}onError(e,t){var r;if(t.fatal){this.state=Rt.ERROR;return}switch(t.details){case O.FRAG_GAP:case O.FRAG_PARSING_ERROR:case O.FRAG_DECRYPT_ERROR:case O.FRAG_LOAD_ERROR:case O.FRAG_LOAD_TIMEOUT:case O.KEY_LOAD_ERROR:case O.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(ie.AUDIO,t);break;case O.AUDIO_TRACK_LOAD_ERROR:case O.AUDIO_TRACK_LOAD_TIMEOUT:case O.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Rt.WAITING_TRACK&&((r=t.context)==null?void 0:r.type)===de.AUDIO_TRACK&&(this.state=Rt.IDLE);break;case O.BUFFER_ADD_CODEC_ERROR:case O.BUFFER_APPEND_ERROR:if(t.parent!=="audio")return;this.resetLoadingState();break;case O.BUFFER_FULL_ERROR:if(t.parent!=="audio")return;this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case O.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==y.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==y.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===Rt.ENDED&&(this.state=Rt.IDLE);const r=this.mediaBuffer||this.media;r&&(this.afterBufferFlushed(r,t,ie.AUDIO),this.tick())}}_handleTransmuxComplete(e){var t;const r="audio",{hls:n}=this,{remuxResult:i,chunkMeta:s}=e,l=this.getCurrentContext(s);if(!l){this.resetWhenMissingContext(s);return}const{frag:h,part:c,level:p}=l,{details:_}=p,{audio:A,text:L,id3:I,initSegment:re}=i;if(this.fragContextChanged(h)||!_){this.fragmentTracker.removeFragment(h);return}if(this.state=Rt.PARSING,this.switchingTrack&&A&&this.completeAudioSwitch(this.switchingTrack),re!=null&&re.tracks){const ce=h.initSegment||h;this._bufferInitSegment(p,re.tracks,ce,s),n.trigger(m.FRAG_PARSING_INIT_SEGMENT,{frag:ce,id:r,tracks:re.tracks})}if(A){const{startPTS:ce,endPTS:ke,startDTS:We,endDTS:He}=A;c&&(c.elementaryStreams[y.AUDIO]={startPTS:ce,endPTS:ke,startDTS:We,endDTS:He}),h.setElementaryStreamInfo(y.AUDIO,ce,ke,We,He),this.bufferFragmentData(A,h,c,s)}if(I!=null&&(t=I.samples)!=null&&t.length){const ce=E({id:r,frag:h,details:_},I);n.trigger(m.FRAG_PARSING_METADATA,ce)}if(L){const ce=E({id:r,frag:h,details:_},L);n.trigger(m.FRAG_PARSING_USERDATA,ce)}}_bufferInitSegment(e,t,r,n){if(this.state!==Rt.PARSING||(t.video&&delete t.video,t.audiovideo&&delete t.audiovideo,!t.audio))return;const i=t.audio;i.id=ie.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(m.BUFFER_CODECS,t);const l=i.initSegment;if(l!=null&&l.byteLength){const h={type:"audio",frag:r,part:null,chunkMeta:n,parent:r.type,data:l};this.hls.trigger(m.BUFFER_APPENDING,h)}this.tickImmediate()}loadFragment(e,t,r){const n=this.fragmentTracker.getState(e);if(this.switchingTrack||n===yr.NOT_LOADED||n===yr.PARTIAL){var i;if(!te(e))this._loadInitSegment(e,t);else if((i=t.details)!=null&&i.live&&!this.initPTS[e.cc]){this.log(`Waiting for video PTS in continuity counter ${e.cc} of live stream before loading audio fragment ${e.sn} of level ${this.trackId}`),this.state=Rt.WAITING_INIT_PTS;const s=this.mainDetails;s&&s.fragmentStart!==t.details.fragmentStart&&Qn(t.details,s)}else 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:l}=this.bufferedTrack;Dt({name:t,lang:r,assocLang:n,characteristics:i,audioCodec:s,channels:l},e,wt)||(Qt(e.url,this.hls)?(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null):this.bufferedTrack=e)}}completeAudioSwitch(e){const{hls:t}=this;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(m.AUDIO_TRACK_SWITCHED,S({},e))}}class Ss extends q{constructor(e,t){super(t,e.logger),this.hls=void 0,this.canLoad=!1,this.timer=-1,this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){this.timer!==-1&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t,r){const n=t==null?void 0:t.renditionReports;if(n){let i=-1;for(let s=0;s<n.length;s++){const l=n[s];let h;try{h=new self.URL(l.URI,t.url).href}catch(c){this.warn(`Could not construct new URL for Rendition Report: ${c}`),h=l.URI||""}if(h===e){i=s;break}else h===e.substring(0,h.length)&&(i=s)}if(i!==-1){const s=n[i],l=parseInt(s["LAST-MSN"])||(t==null?void 0:t.lastPartSn);let h=parseInt(s["LAST-PART"])||(t==null?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){const p=Math.min(t.age-t.partTarget,t.targetduration);h>=0&&p>t.partTarget&&(h+=1)}const c=r&&Fn(r);return new un(l,h>=0?h:void 0,c)}}}loadPlaylist(e){this.clearTimer()}loadingPlaylist(e,t){this.clearTimer()}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}getUrlWithDirectives(e,t){if(t)try{return t.addDirectives(e)}catch(r){this.warn(`Could not construct new URL with HLS Delivery Directives: ${r}`)}return e}playlistLoaded(e,t,r){const{details:n,stats:i}=t,s=self.performance.now(),l=i.loading.first?Math.max(0,s-i.loading.first):0;n.advancedDateTime=Date.now()-l;const h=this.hls.config.timelineOffset;if(h!==n.appliedTimelineOffset){const p=Math.max(h||0,0);n.appliedTimelineOffset=p,n.fragments.forEach(_=>{_.start=_.playlistOffset+p})}if(n.live||r!=null&&r.live){const p="levelInfo"in t?t.levelInfo:t.track;if(n.reloaded(r),r&&n.fragments.length>0){hs(r,n);const We=n.playlistParsingError;if(We){this.warn(We);const He=this.hls;if(!He.config.ignorePlaylistParsingErrors){var c;const{networkDetails:ct}=t;He.trigger(m.ERROR,{type:_e.NETWORK_ERROR,details:O.LEVEL_PARSING_ERROR,fatal:!1,url:n.url,error:We,reason:We.message,level:t.level||void 0,parent:(c=n.fragments[0])==null?void 0:c.type,networkDetails:ct,stats:i});return}n.playlistParsingError=null}}n.requestScheduled===-1&&(n.requestScheduled=i.loading.start);const _=this.hls.mainForwardBufferInfo,A=_?_.end-_.len:0,L=(n.edge-A)*1e3,I=Vs(n,L);if(n.requestScheduled+I<s?n.requestScheduled=s:n.requestScheduled+=I,this.log(`live playlist ${e} ${n.advanced?"REFRESHED "+n.lastPartSn+"-"+n.lastPartIndex:n.updated?"UPDATED":"MISSED"}`),!this.canLoad||!n.live)return;let re,ce,ke;if(n.canBlockReload&&n.endSN&&n.advanced){const We=this.hls.config.lowLatencyMode,He=n.lastPartSn,ct=n.endSN,ht=n.lastPartIndex,Tt=ht!==-1,dt=He===ct;Tt?dt?(ce=ct+1,ke=We?0:ht):(ce=He,ke=We?ht+1:n.maxPartIndex):ce=ct+1;const xt=n.age,It=xt+n.ageHeader;let pt=Math.min(It-n.partTarget,n.targetduration*1.5);if(pt>0){if(It>n.targetduration*3)this.log(`Playlist last advanced ${xt.toFixed(2)}s ago. Omitting segment and part directives.`),ce=void 0,ke=void 0;else if(r!=null&&r.tuneInGoal&&It-n.partTarget>r.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${r.tuneInGoal} to: ${pt} with playlist age: ${n.age}`),pt=0;else{const Ht=Math.floor(pt/n.targetduration);if(ce+=Ht,ke!==void 0){const er=Math.round(pt%n.targetduration/n.partTarget);ke+=er}this.log(`CDN Tune-in age: ${n.ageHeader}s last advanced ${xt.toFixed(2)}s goal: ${pt} skip sn ${Ht} to part ${ke}`)}n.tuneInGoal=pt}if(re=this.getDeliveryDirectives(n,t.deliveryDirectives,ce,ke),We||!dt){n.requestScheduled=s,this.loadingPlaylist(p,re);return}}else(n.canBlockReload||n.canSkipUntil)&&(re=this.getDeliveryDirectives(n,t.deliveryDirectives,ce,ke));re&&ce!==void 0&&n.canBlockReload&&(n.requestScheduled=i.loading.first+Math.max(I-l*2,I/2)),this.scheduleLoading(p,re,n)}else this.clearTimer()}scheduleLoading(e,t,r){const n=r||e.details;if(!n){this.loadingPlaylist(e,t);return}const i=self.performance.now(),s=n.requestScheduled;if(i>=s){this.loadingPlaylist(e,t);return}const l=s-i;this.log(`reload live playlist ${e.name||e.bitrate+"bps"} in ${Math.round(l)} ms`),this.clearTimer(),this.timer=self.setTimeout(()=>this.loadingPlaylist(e,t),l)}getDeliveryDirectives(e,t,r,n){let i=Fn(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(r=t.msn,n=t.part,i=Pr.No),new un(r,n,i)}checkRetry(e){const t=e.details,r=kr(e),n=e.errorAction,{action:i,retryCount:s=0,retryConfig:l}=n||{},h=!!n&&!!l&&(i===ir.RetryRequest||!n.resolved&&i===ir.SendAlternateToPenaltyBox);if(h){var c;if(s>=l.maxNumRetry)return!1;if(r&&(c=e.context)!=null&&c.deliveryDirectives)this.warn(`Retrying playlist loading ${s+1}/${l.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const p=Or(l,s);this.clearTimer(),this.timer=self.setTimeout(()=>this.loadPlaylist(),p),this.warn(`Retrying playlist loading ${s+1}/${l.maxNumRetry} after "${t}" in ${p}ms`)}e.levelRetry=!0,n.resolved=!0}return h}}function qo(a,e){if(a.length!==e.length)return!1;for(let t=0;t<a.length;t++)if(!Ta(a[t].attrs,e[t].attrs))return!1;return!0}function Ta(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 Do(a,e){return e.label.toLowerCase()===a.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(a.lang||"").toLowerCase())}class Xl extends Ss{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(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.LEVEL_LOADING,this.onLevelLoading,this),e.on(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(m.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.LEVEL_LOADING,this.onLevelLoading,this),e.off(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(m.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(m.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 l=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,l)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const 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(l=>(n==null?void 0:n.indexOf(l))===-1)){this.groupIds=r,this.trackId=-1,this.currentTrack=null;const l=this.tracks.filter(A=>!r||r.indexOf(A.groupId)!==-1);if(l.length)this.selectDefaultTrack&&!l.some(A=>A.default)&&(this.selectDefaultTrack=!1),l.forEach((A,L)=>{A.id=L});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=l;const h=this.hls.config.audioPreference;if(!i&&h){const A=bt(h,l,wt);if(A>-1)i=l[A];else{const L=bt(h,this.tracks);i=this.tracks[L]}}let c=this.findTrackId(i);c===-1&&i&&(c=this.findTrackId(null));const p={audioTracks:l};this.log(`Updating audio tracks, ${l.length} track(s) found in group(s): ${r==null?void 0:r.join(",")}`),this.hls.trigger(m.AUDIO_TRACKS_UPDATED,p);const _=this.trackId;if(c!==-1&&_===-1)this.setAudioTrack(c);else if(l.length&&_===-1){var s;const A=new Error(`No audio track selected for current audio group-ID(s): ${(s=this.groupIds)==null?void 0:s.join(",")} track count: ${l.length}`);this.warn(A.message),this.hls.trigger(m.ERROR,{type:_e.MEDIA_ERROR,details:O.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:A})}}}onError(e,t){t.fatal||!t.context||t.context.type===de.AUDIO_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allAudioTracks(){return this.tracks}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioOption(e){const t=this.hls;if(t.config.audioPreference=e,e){const r=this.allAudioTracks;if(this.selectDefaultTrack=!1,r.length){const n=this.currentTrack;if(n&&Dt(e,n,wt))return n;const i=bt(e,this.tracksInGroup,wt);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 l=Zt(e,t.levels,r,s,wt);if(l===-1)return null;t.nextLoadLevel=l}if(e.channels||e.audioCodec){const s=bt(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.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(m.AUDIO_TRACK_SWITCHING,S({},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||Dt(e,n,wt)))return r}if(e){const{name:r,lang:n,assocLang:i,characteristics:s,audioCodec:l,channels:h}=e;for(let c=0;c<t.length;c++){const p=t[c];if(Dt({name:r,lang:n,assocLang:i,characteristics:s,audioCodec:l,channels:h},p,wt))return c}for(let c=0;c<t.length;c++){const p=t[c];if(Ta(e.attrs,p.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return c}for(let c=0;c<t.length;c++){const p=t[c];if(Ta(e.attrs,p.attrs,["LANGUAGE"]))return c}}return-1}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;this.shouldLoadPlaylist(t)&&Qt(t.url,this.hls)&&this.scheduleLoading(t,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const r=e.id,n=e.groupId,i=this.getUrlWithDirectives(e.url,t),s=e.details,l=s==null?void 0:s.age;this.log(`Loading audio-track ${r} "${e.name}" lang:${e.lang} group:${n}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${l&&s.live?" age "+l.toFixed(1)+(s.type?" "+s.type||0:""):""} ${i}`),this.hls.trigger(m.AUDIO_TRACK_LOADING,{url:i,id:r,groupId:n,deliveryDirectives:t||null,track:e})}}class ql{constructor(e){this.tracks=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.tracks=e}destroy(){this.tracks=this.queues=null}append(e,t,r){if(this.queues===null||this.tracks===null)return;const n=this.queues[t];n.push(e),n.length===1&&!r&&this.executeNext(t)}appendBlocker(e){return new Promise(t=>{const r={label:"async-blocker",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.append(r,e)})}prependBlocker(e){return new Promise(t=>{if(this.queues){const r={label:"async-blocker-prepend",execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.queues[e].unshift(r)}})}removeBlockers(){this.queues!==null&&[this.queues.video,this.queues.audio,this.queues.audiovideo].forEach(e=>{var t;const r=(t=e[0])==null?void 0:t.label;(r==="async-blocker"||r==="async-blocker-prepend")&&(e[0].execute(),e.splice(0,1))})}unblockAudio(e){if(this.queues===null)return;this.queues.audio[0]===e&&this.shiftAndExecuteNext("audio")}executeNext(e){if(this.queues===null||this.tracks===null)return;const t=this.queues[e];if(t.length){const n=t[0];try{n.execute()}catch(i){var r;if(n.onError(i),this.queues===null||this.tracks===null)return;const s=(r=this.tracks[e])==null?void 0:r.buffer;s!=null&&s.updating||this.shiftAndExecuteNext(e)}}}shiftAndExecuteNext(e){this.queues!==null&&(this.queues[e].shift(),this.executeNext(e))}current(e){var t;return((t=this.queues)==null?void 0:t[e][0])||null}toString(){const{queues:e,tracks:t}=this;return e===null||t===null?"<destroyed>":`
|
|
${this.list("video")}
|
|
${this.list("audio")}
|
|
${this.list("audiovideo")}}`}list(e){var t,r;return(t=this.queues)!=null&&t[e]||(r=this.tracks)!=null&&r[e]?`${e}: (${this.listSbInfo(e)}) ${this.listOps(e)}`:""}listSbInfo(e){var t;const r=(t=this.tracks)==null?void 0:t[e],n=r==null?void 0:r.buffer;return n?`SourceBuffer${n.updating?" updating":""}${r.ended?" ended":""}${r.ending?" ending":""}`:"none"}listOps(e){var t;return((t=this.queues)==null?void 0:t[e].map(r=>r.label).join(", "))||""}}const Qo=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/,Jo="HlsJsTrackRemovedError";class Ql extends Error{constructor(e){super(e),this.name=Jo}}class Jl extends q{constructor(e,t){super("buffer-controller",e.logger),this.hls=void 0,this.fragmentTracker=void 0,this.details=null,this._objectUrl=null,this.operationQueue=null,this.bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.blockedAudioAppend=null,this.lastVideoAppendEnd=0,this.appendSource=void 0,this.transferData=void 0,this.overrides=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.sourceBuffers=[[null,null],[null,null]],this._onEndStreaming=r=>{var n;this.hls&&((n=this.mediaSource)==null?void 0:n.readyState)==="open"&&this.hls.pauseBuffering()},this._onStartStreaming=r=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=r=>{const{media:n,mediaSource:i}=this;r&&this.log("Media source opened"),!(!n||!i)&&(i.removeEventListener("sourceopen",this._onMediaSourceOpen),n.removeEventListener("emptied",this._onMediaEmptied),this.updateDuration(),this.hls.trigger(m.MEDIA_ATTACHED,{media:n,mediaSource:i}),this.mediaSource!==null&&this.checkPendingTracks())},this._onMediaSourceClose=()=>{this.log("Media source closed")},this._onMediaSourceEnded=()=>{this.log("Media source ended")},this._onMediaEmptied=()=>{const{mediaSrc:r,_objectUrl:n}=this;r!==n&&this.error(`Media element src was set while attaching MediaSource (${n} > ${r})`)},this.hls=e,this.fragmentTracker=t,this.appendSource=pe(ye(e.config.preferManagedMediaSource)),this.initTracks(),this.registerListeners()}hasSourceTypes(){return Object.keys(this.tracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.transferData=this.overrides=void 0,this.operationQueue&&(this.operationQueue.destroy(),this.operationQueue=null),this.hls=this.fragmentTracker=null,this._onMediaSourceOpen=this._onMediaSourceClose=null,this._onMediaSourceEnded=null,this._onStartStreaming=this._onEndStreaming=null}registerListeners(){const{hls:e}=this;e.on(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.BUFFER_RESET,this.onBufferReset,this),e.on(m.BUFFER_APPENDING,this.onBufferAppending,this),e.on(m.BUFFER_CODECS,this.onBufferCodecs,this),e.on(m.BUFFER_EOS,this.onBufferEos,this),e.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(m.FRAG_PARSED,this.onFragParsed,this),e.on(m.FRAG_CHANGED,this.onFragChanged,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.BUFFER_RESET,this.onBufferReset,this),e.off(m.BUFFER_APPENDING,this.onBufferAppending,this),e.off(m.BUFFER_CODECS,this.onBufferCodecs,this),e.off(m.BUFFER_EOS,this.onBufferEos,this),e.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(m.FRAG_PARSED,this.onFragParsed,this),e.off(m.FRAG_CHANGED,this.onFragChanged,this),e.off(m.ERROR,this.onError,this)}transferMedia(){const{media:e,mediaSource:t}=this;if(!e)return null;const r={};if(this.operationQueue){const i=this.isUpdating();i||this.operationQueue.removeBlockers();const s=this.isQueued();(i||s)&&this.warn(`Transfering MediaSource with${s?" operations in queue":""}${i?" updating SourceBuffer(s)":""} ${this.operationQueue}`),this.operationQueue.destroy()}const n=this.transferData;return!this.sourceBufferCount&&n&&n.mediaSource===t?E(r,n.tracks):this.sourceBuffers.forEach(i=>{const[s]=i;s&&(r[s]=E({},this.tracks[s]),this.removeBuffer(s)),i[0]=i[1]=null}),{media:e,mediaSource:t,tracks:r}}initTracks(){const e={};this.sourceBuffers=[[null,null],[null,null]],this.tracks=e,this.resetQueue(),this.resetAppendErrors(),this.lastMpegAudioChunk=this.blockedAudioAppend=null,this.lastVideoAppendEnd=0}onManifestLoading(){this.bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){var r;let n=2;(t.audio&&!t.video||!t.altAudio)&&(n=1),this.bufferCodecEventsTotal=n,this.log(`${n} bufferCodec event(s) expected.`),(r=this.transferData)!=null&&r.mediaSource&&this.sourceBufferCount&&n&&this.bufferCreated()}onMediaAttaching(e,t){const r=this.media=t.media,n=ye(this.appendSource);if(this.transferData=this.overrides=void 0,r&&n){const i=!!t.mediaSource;(i||t.overrides)&&(this.transferData=t,this.overrides=t.overrides);const s=this.mediaSource=t.mediaSource||new n;if(this.assignMediaSource(s),i)this._objectUrl=r.src,this.attachTransferred();else{const l=this._objectUrl=self.URL.createObjectURL(s);if(this.appendSource)try{r.removeAttribute("src");const h=self.ManagedMediaSource;r.disableRemotePlayback=r.disableRemotePlayback||h&&s instanceof h,el(r),eu(r,l),r.load()}catch(h){r.src=l}else r.src=l}r.addEventListener("emptied",this._onMediaEmptied)}}assignMediaSource(e){var t,r;this.log(`${((t=this.transferData)==null?void 0:t.mediaSource)===e?"transferred":"created"} media source: ${(r=e.constructor)==null?void 0:r.name}`),e.addEventListener("sourceopen",this._onMediaSourceOpen),e.addEventListener("sourceended",this._onMediaSourceEnded),e.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(e.addEventListener("startstreaming",this._onStartStreaming),e.addEventListener("endstreaming",this._onEndStreaming))}attachTransferred(){const e=this.media,t=this.transferData;if(!t||!e)return;const r=this.tracks,n=t.tracks,i=n?Object.keys(n):null,s=i?i.length:0,l=()=>{this.media&&this.mediaSourceOpenOrEnded&&this._onMediaSourceOpen()};if(n&&i&&s){if(!this.tracksReady){this.hls.config.startFragPrefetch=!0,this.log("attachTransferred: waiting for SourceBuffer track info");return}if(this.log(`attachTransferred: (bufferCodecEventsTotal ${this.bufferCodecEventsTotal})
|
|
required tracks: ${_r(r,(h,c)=>h==="initSegment"?void 0:c)};
|
|
transfer tracks: ${_r(n,(h,c)=>h==="initSegment"?void 0:c)}}`),!ve(n,r)){t.mediaSource=null,t.tracks=void 0;const h=e.currentTime,c=this.details,p=Math.max(h,(c==null?void 0:c.fragments[0].start)||0);if(p-h>1){this.log(`attachTransferred: waiting for playback to reach new tracks start time ${h} -> ${p}`);return}this.warn(`attachTransferred: resetting MediaSource for incompatible tracks ("${Object.keys(n)}"->"${Object.keys(r)}") start time: ${p} currentTime: ${h}`),this.onMediaDetaching(m.MEDIA_DETACHING,{}),this.onMediaAttaching(m.MEDIA_ATTACHING,t),e.currentTime=p;return}this.transferData=void 0,i.forEach(h=>{const c=h,p=n[c];if(p){const _=p.buffer;if(_){const A=this.fragmentTracker,L=p.id;if(A.hasFragments(L)||A.hasParts(L)){const ce=pr.getBuffered(_);A.detectEvictedFragments(c,ce,L,null,!0)}const I=Io(c),re=[c,_];this.sourceBuffers[I]=re,_.updating&&this.operationQueue&&this.operationQueue.prependBlocker(c),this.trackSourceBuffer(c,p)}}}),l(),this.bufferCreated()}else this.log("attachTransferred: MediaSource w/o SourceBuffers"),l()}get mediaSourceOpenOrEnded(){var e;const t=(e=this.mediaSource)==null?void 0:e.readyState;return t==="open"||t==="ended"}onMediaDetaching(e,t){const r=!!t.transferMedia;this.transferData=this.overrides=void 0;const{media:n,mediaSource:i,_objectUrl:s}=this;if(i){if(this.log(`media source ${r?"transferring":"detaching"}`),r)this.sourceBuffers.forEach(([l])=>{l&&this.removeBuffer(l)}),this.resetQueue();else{if(this.mediaSourceOpenOrEnded){const l=i.readyState==="open";try{const h=i.sourceBuffers;for(let c=h.length;c--;)l&&h[c].abort(),i.removeSourceBuffer(h[c]);l&&i.endOfStream()}catch(h){this.warn(`onMediaDetaching: ${h.message} while calling endOfStream`)}}this.sourceBufferCount&&this.onBufferReset()}i.removeEventListener("sourceopen",this._onMediaSourceOpen),i.removeEventListener("sourceended",this._onMediaSourceEnded),i.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(i.removeEventListener("startstreaming",this._onStartStreaming),i.removeEventListener("endstreaming",this._onEndStreaming)),this.mediaSource=null,this._objectUrl=null}n&&(n.removeEventListener("emptied",this._onMediaEmptied),r||(s&&self.URL.revokeObjectURL(s),this.mediaSrc===s?(n.removeAttribute("src"),this.appendSource&&el(n),n.load()):this.warn("media|source.src was changed by a third party - skip cleanup")),this.media=null),this.hls.trigger(m.MEDIA_DETACHED,t)}onBufferReset(){this.sourceBuffers.forEach(([e])=>{e&&this.resetBuffer(e)}),this.initTracks()}resetBuffer(e){var t;const r=(t=this.tracks[e])==null?void 0:t.buffer;if(this.removeBuffer(e),r)try{var n;(n=this.mediaSource)!=null&&n.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(r)}catch(i){this.warn(`onBufferReset ${e}`,i)}delete this.tracks[e]}removeBuffer(e){this.removeBufferListeners(e),this.sourceBuffers[Io(e)]=[null,null];const t=this.tracks[e];t&&(t.buffer=void 0)}resetQueue(){this.operationQueue&&this.operationQueue.destroy(),this.operationQueue=new ql(this.tracks)}onBufferCodecs(e,t){const r=this.tracks,n=Object.keys(t);this.log(`BUFFER_CODECS: "${n}" (current SB count ${this.sourceBufferCount})`);const i="audiovideo"in t&&(r.audio||r.video)||r.audiovideo&&("audio"in t||"video"in t),s=!i&&this.sourceBufferCount&&this.media&&n.some(l=>!r[l]);if(i||s){this.warn(`Unsupported transition between "${Object.keys(r)}" and "${n}" SourceBuffers`);return}n.forEach(l=>{var h,c,p;const _=t[l],{id:A,codec:L,levelCodec:I,container:re,metadata:ce,supplemental:ke}=_;let We=r[l];const He=(h=this.transferData)==null||(c=h.tracks)==null?void 0:c[l],ct=He!=null&&He.buffer?He:We,ht=(ct==null?void 0:ct.pendingCodec)||(ct==null?void 0:ct.codec),Tt=ct==null?void 0:ct.levelCodec;We||(We=r[l]={buffer:void 0,listeners:[],codec:L,supplemental:ke,container:re,levelCodec:I,metadata:ce,id:A});const dt=zt(ht,Tt),xt=dt==null?void 0:dt.replace(Qo,"$1");let It=zt(L,I);const pt=(p=It)==null?void 0:p.replace(Qo,"$1");It&&dt&&xt!==pt&&(l.slice(0,5)==="audio"&&(It=Ce(It,this.appendSource)),this.log(`switching codec ${ht} to ${It}`),It!==(We.pendingCodec||We.codec)&&(We.pendingCodec=It),We.container=re,this.appendChangeType(l,re,It))}),(this.tracksReady||this.sourceBufferCount)&&(t.tracks=this.sourceBufferTracks),!this.sourceBufferCount&&this.mediaSourceOpenOrEnded&&this.checkPendingTracks()}get sourceBufferTracks(){return Object.keys(this.tracks).reduce((e,t)=>{const r=this.tracks[t];return e[t]={id:r.id,container:r.container,codec:r.codec,levelCodec:r.levelCodec},e},{})}appendChangeType(e,t,r){const n=`${t};codecs=${r}`,i={label:`change-type=${n}`,execute:()=>{const s=this.tracks[e];if(s){const l=s.buffer;l!=null&&l.changeType&&(this.log(`changing ${e} sourceBuffer type to ${n}`),l.changeType(n),s.codec=r,s.container=t)}this.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:s=>{this.warn(`Failed to change ${e} SourceBuffer type`,s)}};this.append(i,e,this.isPending(this.tracks[e]))}blockAudio(e){var t;const r=e.start,n=r+e.duration*.05;if(((t=this.fragmentTracker.getAppendedFrag(r,ie.MAIN))==null?void 0:t.gap)===!0)return;const s={label:"block-audio",execute:()=>{var l;const h=this.tracks.video;(this.lastVideoAppendEnd>n||h!=null&&h.buffer&&pr.isBuffered(h.buffer,n)||((l=this.fragmentTracker.getAppendedFrag(n,ie.MAIN))==null?void 0:l.gap)===!0)&&(this.blockedAudioAppend=null,this.shiftAndExecuteNext("audio"))},onStart:()=>{},onComplete:()=>{},onError:l=>{this.warn("Error executing block-audio operation",l)}};this.blockedAudioAppend={op:s,frag:e},this.append(s,"audio",!0)}unblockAudio(){const{blockedAudioAppend:e,operationQueue:t}=this;e&&t&&(this.blockedAudioAppend=null,t.unblockAudio(e.op))}onBufferAppending(e,t){const{tracks:r}=this,{data:n,type:i,parent:s,frag:l,part:h,chunkMeta:c}=t,p=c.buffering[i],_=l.sn,A=self.performance.now();p.start=A;const L=l.stats.buffering,I=h?h.stats.buffering:null;L.start===0&&(L.start=A),I&&I.start===0&&(I.start=A);const re=r.audio;let ce=!1;i==="audio"&&(re==null?void 0:re.container)==="audio/mpeg"&&(ce=!this.lastMpegAudioChunk||c.id===1||this.lastMpegAudioChunk.sn!==c.sn,this.lastMpegAudioChunk=c);const ke=this.tracks.video,We=ke==null?void 0:ke.buffer;if(We&&_!=="initSegment"){const ht=h||l,Tt=this.blockedAudioAppend;if(i==="audio"&&s!=="main"&&!this.blockedAudioAppend){const xt=ht.start+ht.duration*.05,It=We.buffered,pt=this.currentOp("video");!It.length&&!pt?this.blockAudio(ht):!pt&&!pr.isBuffered(We,xt)&&this.lastVideoAppendEnd<xt&&this.blockAudio(ht)}else if(i==="video"){const dt=ht.end;if(Tt){const xt=Tt.frag.start;(dt>xt||dt<this.lastVideoAppendEnd||pr.isBuffered(We,xt))&&this.unblockAudio()}this.lastVideoAppendEnd=dt}}const He=(h||l).start,ct={label:`append-${i}`,execute:()=>{if(p.executeStart=self.performance.now(),ce){const ht=this.tracks[i];if(ht){const Tt=ht.buffer;if(Tt){const dt=He-Tt.timestampOffset;Math.abs(dt)>=.1&&(this.log(`Updating audio SourceBuffer timestampOffset to ${He} (delta: ${dt}) sn: ${_})`),Tt.timestampOffset=He)}}}this.appendExecutor(n,i)},onStart:()=>{},onComplete:()=>{const ht=self.performance.now();p.executeEnd=p.end=ht,L.first===0&&(L.first=ht),I&&I.first===0&&(I.first=ht);const Tt={};this.sourceBuffers.forEach(([dt,xt])=>{dt&&(Tt[dt]=pr.getBuffered(xt))}),this.appendErrors[i]=0,i==="audio"||i==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(m.BUFFER_APPENDED,{type:i,frag:l,part:h,chunkMeta:c,parent:l.type,timeRanges:Tt})},onError:ht=>{var Tt;const dt={type:_e.MEDIA_ERROR,parent:l.type,details:O.BUFFER_APPEND_ERROR,sourceBufferName:i,frag:l,part:h,chunkMeta:c,error:ht,err:ht,fatal:!1};if(ht.code===DOMException.QUOTA_EXCEEDED_ERR)dt.details=O.BUFFER_FULL_ERROR;else if(ht.code===DOMException.INVALID_STATE_ERR&&this.mediaSourceOpenOrEnded&&!((Tt=this.media)!=null&&Tt.error))dt.errorAction=Jt(!0);else if(ht.name===Jo)this.sourceBufferCount===0?dt.errorAction=Jt(!0):++this.appendErrors[i];else{const xt=++this.appendErrors[i];this.warn(`Failed ${xt}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${i}" sourceBuffer`),xt>=this.hls.config.appendErrorMaxRetry&&(dt.fatal=!0)}this.hls.trigger(m.ERROR,dt)}};this.append(ct,i,this.isPending(this.tracks[i]))}getFlushOp(e,t,r){return this.log(`queuing "${e}" remove ${t}-${r}`),{label:"remove",execute:()=>{this.removeExecutor(e,t,r)},onStart:()=>{},onComplete:()=>{this.hls.trigger(m.BUFFER_FLUSHED,{type:e})},onError:n=>{this.warn(`Failed to remove ${t}-${r} from "${e}" SourceBuffer`,n)}}}onBufferFlushing(e,t){const{type:r,startOffset:n,endOffset:i}=t;r?this.append(this.getFlushOp(r,n,i),r):this.sourceBuffers.forEach(([s])=>{s&&this.append(this.getFlushOp(s,n,i),s)})}onFragParsed(e,t){const{frag:r,part:n}=t,i=[],s=n?n.elementaryStreams:r.elementaryStreams;s[y.AUDIOVIDEO]?i.push("audiovideo"):(s[y.AUDIO]&&i.push("audio"),s[y.VIDEO]&&i.push("video"));const l=()=>{const h=self.performance.now();r.stats.buffering.end=h,n&&(n.stats.buffering.end=h);const c=n?n.stats:r.stats;this.hls.trigger(m.FRAG_BUFFERED,{frag:r,part:n,stats:c,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(l,i)}onFragChanged(e,t){this.trimBuffers()}get bufferedToEnd(){return this.sourceBufferCount>0&&!this.sourceBuffers.some(([e])=>{var t,r;return e&&(!((t=this.tracks[e])!=null&&t.ended)||((r=this.tracks[e])==null?void 0:r.ending))})}onBufferEos(e,t){var r;this.sourceBuffers.forEach(([s])=>{if(s){const l=this.tracks[s];(!t.type||t.type===s)&&(l.ending=!0,l.ended||(l.ended=!0,this.log(`${s} buffer reached EOS`)))}});const n=((r=this.overrides)==null?void 0:r.endOfStream)!==!1;this.sourceBufferCount>0&&!this.sourceBuffers.some(([s])=>{var l;return s&&!((l=this.tracks[s])!=null&&l.ended)})&&(n?(this.log("Queueing EOS"),this.blockUntilOpen(()=>{this.tracksEnded();const{mediaSource:s}=this;if(!s||s.readyState!=="open"){s&&this.log(`Could not call mediaSource.endOfStream(). mediaSource.readyState: ${s.readyState}`);return}this.log("Calling mediaSource.endOfStream()"),s.endOfStream(),this.hls.trigger(m.BUFFERED_TO_END,void 0)})):(this.tracksEnded(),this.hls.trigger(m.BUFFERED_TO_END,void 0)))}tracksEnded(){this.sourceBuffers.forEach(([e])=>{if(e!==null){const t=this.tracks[e];t&&(t.ending=!1)}})}onLevelUpdated(e,{details:t}){t.fragments.length&&(this.details=t,this.updateDuration())}updateDuration(){const e=this.getDurationAndRange();e&&this.blockUntilOpen(()=>this.updateMediaSource(e))}onError(e,t){if(t.details===O.BUFFER_APPEND_ERROR&&t.frag){var r;const n=(r=t.errorAction)==null?void 0:r.nextAutoLevel;$(n)&&n!==t.frag.level&&this.resetAppendErrors()}}resetAppendErrors(){this.appendErrors={audio:0,video:0,audiovideo:0}}trimBuffers(){const{hls:e,details:t,media:r}=this;if(!r||t===null||!this.sourceBufferCount)return;const n=e.config,i=r.currentTime,s=t.levelTargetDuration,l=t.live&&n.liveBackBufferLength!==null?n.liveBackBufferLength:n.backBufferLength;if($(l)&&l>=0){const h=Math.max(l,s),c=Math.floor(i/s)*s-h;this.flushBackBuffer(i,s,c)}if($(n.frontBufferFlushThreshold)&&n.frontBufferFlushThreshold>0){const h=Math.max(n.maxBufferLength,n.frontBufferFlushThreshold),c=Math.max(h,s),p=Math.floor(i/s)*s+c;this.flushFrontBuffer(i,s,p)}}flushBackBuffer(e,t,r){this.sourceBuffers.forEach(([n,i])=>{if(i){const l=pr.getBuffered(i);if(l.length>0&&r>l.start(0)){var s;this.hls.trigger(m.BACK_BUFFER_REACHED,{bufferEnd:r});const h=this.tracks[n];if((s=this.details)!=null&&s.live)this.hls.trigger(m.LIVE_BACK_BUFFER_REACHED,{bufferEnd:r});else if(h!=null&&h.ended){this.log(`Cannot flush ${n} back buffer while SourceBuffer is in ended state`);return}this.hls.trigger(m.BUFFER_FLUSHING,{startOffset:0,endOffset:r,type:n})}}})}flushFrontBuffer(e,t,r){this.sourceBuffers.forEach(([n,i])=>{if(i){const s=pr.getBuffered(i),l=s.length;if(l<2)return;const h=s.start(l-1),c=s.end(l-1);if(r>h||e>=h&&e<=c)return;this.hls.trigger(m.BUFFER_FLUSHING,{startOffset:h,endOffset:1/0,type:n})}})}getDurationAndRange(){var e;const{details:t,mediaSource:r}=this;if(!t||!this.media||(r==null?void 0:r.readyState)!=="open")return null;const n=t.edge;if(t.live&&this.hls.config.liveDurationInfinity){if(t.fragments.length&&t.live&&r.setLiveSeekableRange){const c=Math.max(0,t.fragmentStart),p=Math.max(c,n);return{duration:1/0,start:c,end:p}}return{duration:1/0}}const i=(e=this.overrides)==null?void 0:e.duration;if(i)return $(i)?{duration:i}:null;const s=this.media.duration,l=$(r.duration)?r.duration:0;return n>l&&n>s||!$(s)?{duration:n}:null}updateMediaSource({duration:e,start:t,end:r}){const n=this.mediaSource;!this.media||!n||n.readyState!=="open"||(n.duration!==e&&($(e)&&this.log(`Updating MediaSource duration to ${e.toFixed(3)}`),n.duration=e),t!==void 0&&r!==void 0&&(this.log(`MediaSource duration is set to ${n.duration}. Setting seekable range to ${t}-${r}.`),n.setLiveSeekableRange(t,r)))}get tracksReady(){const e=this.pendingTrackCount;return e>0&&(e>=this.bufferCodecEventsTotal||this.isPending(this.tracks.audiovideo))}checkPendingTracks(){const{bufferCodecEventsTotal:e,pendingTrackCount:t,tracks:r}=this;if(this.log(`checkPendingTracks (pending: ${t} codec events expected: ${e}) ${_r(r)}`),this.tracksReady){var n;const i=(n=this.transferData)==null?void 0:n.tracks;i&&Object.keys(i).length?this.attachTransferred():this.createSourceBuffers()}}bufferCreated(){if(this.sourceBufferCount){const e={};this.sourceBuffers.forEach(([t,r])=>{if(t){const n=this.tracks[t];e[t]={buffer:r,container:n.container,codec:n.codec,supplemental:n.supplemental,levelCodec:n.levelCodec,id:n.id,metadata:n.metadata}}}),this.hls.trigger(m.BUFFER_CREATED,{tracks:e}),this.log(`SourceBuffers created. Running queue: ${this.operationQueue}`),this.sourceBuffers.forEach(([t])=>{this.executeNext(t)})}else{const e=new Error("could not create source buffer for media codec(s)");this.hls.trigger(m.ERROR,{type:_e.MEDIA_ERROR,details:O.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:e,reason:e.message})}}createSourceBuffers(){const{tracks:e,sourceBuffers:t,mediaSource:r}=this;if(!r)throw new Error("createSourceBuffers called when mediaSource was null");for(const i in e){const s=i,l=e[s];if(this.isPending(l)){const h=this.getTrackCodec(l,s),c=`${l.container};codecs=${h}`;l.codec=h,this.log(`creating sourceBuffer(${c})${this.currentOp(s)?" Queued":""} ${_r(l)}`);try{const p=r.addSourceBuffer(c),_=Io(s),A=[s,p];t[_]=A,l.buffer=p}catch(p){var n;this.error(`error while trying to add sourceBuffer: ${p.message}`),this.shiftAndExecuteNext(s),(n=this.operationQueue)==null||n.removeBlockers(),delete this.tracks[s],this.hls.trigger(m.ERROR,{type:_e.MEDIA_ERROR,details:O.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:p,sourceBufferName:s,mimeType:c,parent:l.id});return}this.trackSourceBuffer(s,l)}}this.bufferCreated()}getTrackCodec(e,t){const r=e.supplemental;let n=e.codec;r&&(t==="video"||t==="audiovideo")&&ze(r,"video")&&(n=Ot(n,r));const i=zt(n,e.levelCodec);return i?t.slice(0,5)==="audio"?Ce(i,this.appendSource):i:""}trackSourceBuffer(e,t){const r=t.buffer;if(!r)return;const n=this.getTrackCodec(t,e);this.tracks[e]={buffer:r,codec:n,container:t.container,levelCodec:t.levelCodec,supplemental:t.supplemental,metadata:t.metadata,id:t.id,listeners:[]},this.removeBufferListeners(e),this.addBufferListener(e,"updatestart",this.onSBUpdateStart),this.addBufferListener(e,"updateend",this.onSBUpdateEnd),this.addBufferListener(e,"error",this.onSBUpdateError),this.appendSource&&this.addBufferListener(e,"bufferedchange",(i,s)=>{const l=s.removedRanges;l!=null&&l.length&&this.hls.trigger(m.BUFFER_FLUSHED,{type:i})})}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 t=this.currentOp(e);t&&t.onStart()}onSBUpdateEnd(e){var t;if(((t=this.mediaSource)==null?void 0:t.readyState)==="closed"){this.resetBuffer(e);return}const r=this.currentOp(e);r&&(r.onComplete(),this.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(m.ERROR,{type:_e.MEDIA_ERROR,details:O.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:n,fatal:!1});const i=this.currentOp(e);i&&i.onError(n)}removeExecutor(e,t,r){const{media:n,mediaSource:i}=this,s=this.tracks[e],l=s==null?void 0:s.buffer;if(!n||!i||!l){this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),this.shiftAndExecuteNext(e);return}const h=$(n.duration)?n.duration:1/0,c=$(i.duration)?i.duration:1/0,p=Math.max(0,t),_=Math.min(r,h,c);_>p&&(!s.ending||s.ended)?(s.ended=!1,this.log(`Removing [${p},${_}] from the ${e} SourceBuffer`),l.remove(p,_)):this.shiftAndExecuteNext(e)}appendExecutor(e,t){const r=this.tracks[t],n=r==null?void 0:r.buffer;if(!n)throw new Ql(`Attempting to append to the ${t} SourceBuffer, but it does not exist`);r.ending=!1,r.ended=!1,n.appendBuffer(e)}blockUntilOpen(e){this.isUpdating()||this.isQueued()?this.blockBuffers(e):e()}isUpdating(){return this.sourceBuffers.some(([e,t])=>e&&t.updating)}isQueued(){return this.sourceBuffers.some(([e])=>e&&!!this.currentOp(e))}isPending(e){return!!e&&!e.buffer}blockBuffers(e,t=this.sourceBufferTypes){if(!t.length){this.log("Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e);return}const{operationQueue:r}=this,n=t.map(s=>this.appendBlocker(s));t.length>1&&!!this.blockedAudioAppend&&this.unblockAudio(),Promise.all(n).then(s=>{r===this.operationQueue&&(e(),this.stepOperationQueue(t))})}stepOperationQueue(e){e.forEach(t=>{var r;const n=(r=this.tracks[t])==null?void 0:r.buffer;!n||n.updating||this.shiftAndExecuteNext(t)})}append(e,t,r){this.operationQueue&&this.operationQueue.append(e,t,r)}appendBlocker(e){if(this.operationQueue)return this.operationQueue.appendBlocker(e)}currentOp(e){return this.operationQueue?this.operationQueue.current(e):null}executeNext(e){e&&this.operationQueue&&this.operationQueue.executeNext(e)}shiftAndExecuteNext(e){this.operationQueue&&this.operationQueue.shiftAndExecuteNext(e)}get pendingTrackCount(){return Object.keys(this.tracks).reduce((e,t)=>e+(this.isPending(this.tracks[t])?1:0),0)}get sourceBufferCount(){return this.sourceBuffers.reduce((e,[t])=>e+(t?1:0),0)}get sourceBufferTypes(){return this.sourceBuffers.map(([e])=>e).filter(e=>!!e)}addBufferListener(e,t,r){const n=this.tracks[e];if(!n)return;const i=n.buffer;if(!i)return;const s=r.bind(this,e);n.listeners.push({event:t,listener:s}),i.addEventListener(t,s)}removeBufferListeners(e){const t=this.tracks[e];if(!t)return;const r=t.buffer;r&&(t.listeners.forEach(n=>{r.removeEventListener(n.event,n.listener)}),t.listeners.length=0)}}function el(a){const e=a.querySelectorAll("source");[].slice.call(e).forEach(t=>{a.removeChild(t)})}function eu(a,e){const t=self.document.createElement("source");t.type="video/mp4",t.src=e,a.appendChild(t)}function Io(a){return a==="audio"?1:0}class Ro{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(m.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(m.BUFFER_CODECS,this.onBufferCodecs,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(m.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(m.BUFFER_CODECS,this.onBufferCodecs,this),e.off(m.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&&$(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping(),this.media=null}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0){this.clientRect=null;return}const e=this.hls.levels;if(e.length){const t=this.hls,r=this.getMaxLevel(e.length-1);r!==this.autoLevelCapping&&t.logger.log(`Setting autoLevelCapping to ${r}: ${e[r].height}p@${e[r].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=r,t.autoLevelEnabled&&t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const r=t.filter((n,i)=>this.isLevelAllowed(n)&&i<=e);return this.clientRect=null,Ro.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 Math.min(e,this.hls.config.maxDevicePixelRatio)}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=(l,h)=>h?l.width!==h.width||l.height!==h.height:!0;let i=e.length-1;const s=Math.max(t,r);for(let l=0;l<e.length;l+=1){const h=e[l];if((h.width>=s||h.height>=s)&&n(h,e[l+1])){i=l;break}}return i}}const Di={MANIFEST:"m",AUDIO:"a",VIDEO:"v",MUXED:"av",INIT:"i",CAPTION:"c",TIMED_TEXT:"tt",KEY:"k",OTHER:"o"},tu={HLS:"h"},Aa={OBJECT:"CMCD-Object",REQUEST:"CMCD-Request",SESSION:"CMCD-Session",STATUS:"CMCD-Status"},ru={[Aa.OBJECT]:["br","d","ot","tb"],[Aa.REQUEST]:["bl","dl","mtp","nor","nrr","su"],[Aa.SESSION]:["cid","pr","sf","sid","st","v"],[Aa.STATUS]:["bs","rtp"]};class ra{constructor(e,t){Array.isArray(e)&&(e=e.map(r=>r instanceof ra?r:new ra(r))),this.value=e,this.params=t}}const nu="Dict";function iu(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 su(a,e,t,r){return new Error(`failed to ${a} "${iu(e)}" as ${t}`,{cause:r})}function Yi(a,e,t){return su("serialize",a,e,t)}class tl{constructor(e){this.description=e}}const rl="Bare Item",au="Boolean";function ou(a){if(typeof a!="boolean")throw Yi(a,au);return a?"?1":"?0"}const lu="Byte Sequence";function uu(a){if(ArrayBuffer.isView(a)===!1)throw Yi(a,lu);return`:${Ga(a)}:`}const cu="Integer";function hu(a){return a<-999999999999999||999999999999999<a}function nl(a){if(hu(a))throw Yi(a,cu);return a.toString()}function du(a){return`@${nl(a.getTime()/1e3)}`}const fu="Decimal";function pu(a){const e=pa(a,3);if(Math.floor(Math.abs(e)).toString().length>12)throw Yi(a,fu);const t=e.toString();return t.includes(".")?t:`${t}.0`}const mu="String",gu=/[\x00-\x1f\x7f]+/;function vu(a){if(gu.test(a))throw Yi(a,mu);return`"${a.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function _u(a){return a.description||a.toString().slice(7,-1)}const yu="Token";function il(a){const e=_u(a);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw Yi(e,yu);return e}function Lo(a){switch(typeof a){case"number":if(!$(a))throw Yi(a,rl);return Number.isInteger(a)?nl(a):pu(a);case"string":return vu(a);case"symbol":return il(a);case"boolean":return ou(a);case"object":if(a instanceof Date)return du(a);if(a instanceof Uint8Array)return uu(a);if(a instanceof tl)return il(a);default:throw Yi(a,rl)}}const bu="Key";function ko(a){if(/^[a-z*][a-z0-9\-_.*]*$/.test(a)===!1)throw Yi(a,bu);return a}function Oo(a){return a==null?"":Object.entries(a).map(([e,t])=>t===!0?`;${ko(e)}`:`;${ko(e)}=${Lo(t)}`).join("")}function sl(a){return a instanceof ra?`${Lo(a.value)}${Oo(a.params)}`:Lo(a)}function xu(a){return`(${a.value.map(sl).join(" ")})${Oo(a.params)}`}function Eu(a,e={whitespace:!0}){if(typeof a!="object")throw Yi(a,nu);const t=a instanceof Map?a.entries():Object.entries(a),r=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([n,i])=>{i instanceof ra||(i=new ra(i));let s=ko(n);return i.value===!0?s+=Oo(i.params):(s+="=",Array.isArray(i.value)?s+=xu(i):s+=sl(i)),s}).join(`,${r}`)}function Su(a,e){return Eu(a,e)}function wu(a){return a==="ot"||a==="sf"||a==="st"}function Tu(a){return typeof a=="number"?$(a):a!=null&&a!==""&&a!==!1}const ro=a=>Math.round(a),Au=(a,e)=>(e!=null&&e.baseUrl&&(a=mo(a,e.baseUrl)),encodeURIComponent(a)),no=a=>ro(a/100)*100,Cu={br:ro,d:ro,bl:no,dl:no,mtp:no,nor:Au,rtp:no,tb:ro};function Du(a,e){const t={};if(a==null||typeof a!="object")return t;const r=Object.keys(a).sort(),n=E({},Cu,e==null?void 0:e.formatters),i=e==null?void 0:e.filter;return r.forEach(s=>{if(i!=null&&i(s))return;let l=a[s];const h=n[s];h&&(l=h(l,e)),!(s==="v"&&l===1)&&(s=="pr"&&l===1||Tu(l)&&(wu(s)&&typeof l=="string"&&(l=new tl(l)),t[s]=l))}),t}function al(a,e={}){return a?Su(Du(a,e),E({whitespace:!1},e)):""}function Iu(a,e={}){const t={};if(!a)return t;const r=Object.entries(a),n=Object.entries(ru).concat(Object.entries((e==null?void 0:e.customHeaderMap)||{})),i=r.reduce((s,l)=>{var h,c;const[p,_]=l,A=((h=n.find(L=>L[1].includes(p)))===null||h===void 0?void 0:h[0])||Aa.REQUEST;return(c=s[A])!==null&&c!==void 0||(s[A]={}),s[A][p]=_,s},{});return Object.entries(i).reduce((s,[l,h])=>(s[l]=al(h,e),s),t)}function Ru(a,e,t){return E(a,Iu(e,t))}const Lu="CMCD";function ku(a,e={}){if(!a)return"";const t=al(a,e);return`${Lu}=${encodeURIComponent(t)}`}const ol=/CMCD=[^&#]+/;function Ou(a,e,t){const r=ku(e,t);if(!r)return a;if(ol.test(a))return a.replace(ol,r);const n=a.includes("?")?"&":"?";return`${a}${n}${r}`}class Pu{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:Di.MANIFEST,su:!this.initialized})}catch(i){this.hls.logger.warn("Could not generate manifest CMCD data.",i)}},this.applyFragmentData=n=>{try{const{frag:i,part:s}=n,l=this.hls.levels[i.level],h=this.getObjectType(i),c={d:(s||i).duration*1e3,ot:h};(h===Di.VIDEO||h===Di.AUDIO||h==Di.MUXED)&&(c.br=l.bitrate/1e3,c.tb=this.getTopBandwidth(h)/1e3,c.bl=this.getBufferLength(h));const p=s?this.getNextPart(s):this.getNextFrag(i);p!=null&&p.url&&p.url!==i.url&&(c.nor=p.url),this.apply(n,c)}catch(i){this.hls.logger.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||e.sessionId,this.cid=r.contentId,this.useHeaders=r.useHeaders===!0,this.includeKeys=r.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHED,this.onMediaDetached,this),e.on(m.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHED,this.onMediaDetached,this),e.off(m.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=this.media=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var 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:tu.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){E(t,this.createData());const r=t.ot===Di.INIT||t.ot===Di.VIDEO||t.ot===Di.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((s,l)=>(n.includes(l)&&(s[l]=t[l]),s),{}));const i={baseUrl:e.url};this.useHeaders?(e.headers||(e.headers={}),Ru(e.headers,t,i)):e.url=Ou(e.url,t,i)}getNextFrag(e){var t;const r=(t=this.hls.levels[e.level])==null?void 0:t.details;if(r){const n=e.sn-r.startSN;return r.fragments[n+1]}}getNextPart(e){var t,r;const{index:n,fragment:i}=e,s=(t=this.hls.levels[i.level])==null||(r=t.details)==null?void 0:r.partList;if(s){const{sn:l}=i;for(let h=s.length-1;h>=0;h--){const c=s[h];if(c.index===n&&c.fragment.sn===l)return s[h+1]}}}getObjectType(e){const{type:t}=e;if(t==="subtitle")return Di.TIMED_TEXT;if(e.sn==="initSegment")return Di.INIT;if(t==="audio")return Di.AUDIO;if(t==="main")return this.hls.audioTracks.length?Di.VIDEO:Di.MUXED}getTopBandwidth(e){let t=0,r;const n=this.hls;if(e===Di.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.media,r=e===Di.AUDIO?this.audioBuffer:this.videoBuffer;return!r||!t?NaN:pr.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,l){t(i),this.loader.load(i,s,l)}}}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,l){t(i),this.loader.load(i,s,l)}}}}const Mu=3e5;class Bu extends q{constructor(e){super("content-steering",e.logger),this.hls=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this._pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.ERROR,this.onError,this))}pathways(){return(this.levels||[]).reduce((e,t)=>(e.indexOf(t.pathwayId)===-1&&e.push(t.pathwayId),e),[])}get pathwayPriority(){return this._pathwayPriority}set pathwayPriority(e){this.updatePathwayPriority(e)}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=this.timeToLoad*1e3-(performance.now()-this.updated);if(e>0){this.scheduleRefresh(this.uri,e);return}}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){this.reloadTimer!==-1&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter(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)===ir.SendAlternateToPenaltyBox&&r.flags===Xe.MoveAllAlternatesMatchingHost){const n=this.levels;let i=this._pathwayPriority,s=this.pathwayId;if(t.context){const{groupId:l,pathwayId:h,type:c}=t.context;l&&n?s=this.getPathwayForGroupId(l,c,s):h&&(s=h)}s in this.penalizedPathways||(this.penalizedPathways[s]=performance.now()),!i&&n&&(i=this.pathways()),i&&i.length>1&&(this.updatePathwayPriority(i),r.resolved=this.pathwayId!==s),r.resolved||this.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${s} levels: ${n&&n.length} priorities: ${_r(i)} penalized: ${_r(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]>Mu&&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 l=this.hls.nextLoadLevel,h=this.hls.levels[l];if(t=this.getLevelsForPathway(s),t.length>0){this.log(`Setting Pathway to "${s}"`),this.pathwayId=s,gs(t),this.hls.trigger(m.LEVELS_UPDATED,{levels:t});const c=this.hls.levels[l];h&&c&&this.levels&&(c.attrs["STABLE-VARIANT-ID"]!==h.attrs["STABLE-VARIANT-ID"]&&c.bitrate!==h.bitrate&&this.log(`Unstable Pathways change from bitrate ${h.bitrate} to ${c.bitrate}`),this.hls.nextLoadLevel=l);break}}}getPathwayForGroupId(e,t,r){const n=this.getLevelsForPathway(r).concat(this.levels||[]);for(let i=0;i<n.length;i++)if(t===de.AUDIO_TRACK&&n[i].hasAudioGroup(e)||t===de.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":l,"URI-REPLACEMENT":h}=i;if(t.some(p=>p.pathwayId===s))return;const c=this.getLevelsForPathway(l).map(p=>{const _=new Ar(p.attrs);_["PATHWAY-ID"]=s;const A=_.AUDIO&&`${_.AUDIO}_clone_${s}`,L=_.SUBTITLES&&`${_.SUBTITLES}_clone_${s}`;A&&(r[_.AUDIO]=A,_.AUDIO=A),L&&(n[_.SUBTITLES]=L,_.SUBTITLES=L);const I=ul(p.uri,_["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",h),re=new zr({attrs:_,audioCodec:p.audioCodec,bitrate:p.bitrate,height:p.height,name:p.name,url:I,videoCodec:p.videoCodec,width:p.width});if(p.audioGroups)for(let ce=1;ce<p.audioGroups.length;ce++)re.addGroupId("audio",`${p.audioGroups[ce]}_clone_${s}`);if(p.subtitleGroups)for(let ce=1;ce<p.subtitleGroups.length;ce++)re.addGroupId("text",`${p.subtitleGroups[ce]}_clone_${s}`);return re});t.push(...c),ll(this.audioTracks,r,h,s),ll(this.subtitleTracks,n,h,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(p){this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(n.protocol!=="data:"){const p=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;n.searchParams.set("_HLS_pathway",this.pathwayId),n.searchParams.set("_HLS_throughput",""+p)}const i={responseType:"json",url:n.href},s=t.steeringManifestLoadPolicy.default,l=s.errorRetry||s.timeoutRetry||{},h={loadPolicy:s,timeout:s.maxLoadTimeMs,maxRetry:l.maxNumRetry||0,retryDelay:l.retryDelayMs||0,maxRetryDelay:l.maxRetryDelayMs||0},c={onSuccess:(p,_,A,L)=>{this.log(`Loaded steering manifest: "${n}"`);const I=p.data;if((I==null?void 0:I.VERSION)!==1){this.log(`Steering VERSION ${I.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=I.TTL;const{"RELOAD-URI":re,"PATHWAY-CLONES":ce,"PATHWAY-PRIORITY":ke}=I;if(re)try{this.uri=new self.URL(re,n).href}catch(He){this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${re}`);return}this.scheduleRefresh(this.uri||A.url),ce&&this.clonePathways(ce);const We={steeringManifest:I,url:n.toString()};this.hls.trigger(m.STEERING_MANIFEST_LOADED,We),ke&&this.updatePathwayPriority(ke)},onError:(p,_,A,L)=>{if(this.log(`Error loading steering manifest: ${p.code} ${p.text} (${_.url})`),this.stopLoad(),p.code===410){this.enabled=!1,this.log(`Steering manifest ${_.url} no longer available`);return}let I=this.timeToLoad*1e3;if(p.code===429){const re=this.loader;if(typeof(re==null?void 0:re.getResponseHeader)=="function"){const ce=re.getResponseHeader("Retry-After");ce&&(I=parseFloat(ce)*1e3)}this.log(`Steering manifest ${_.url} rate limited`);return}this.scheduleRefresh(this.uri||_.url,I)},onTimeout:(p,_,A)=>{this.log(`Timeout loading steering manifest (${_.url})`),this.scheduleRefresh(this.uri||_.url)}};this.log(`Requesting steering manifest: ${n}`),this.loader.load(i,h,c)}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 ll(a,e,t,r){a&&Object.keys(e).forEach(n=>{const i=a.filter(s=>s.groupId===n).map(s=>{const l=E({},s);return l.details=void 0,l.attrs=new Ar(l.attrs),l.url=l.attrs.URI=ul(s.url,s.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),l.groupId=l.attrs["GROUP-ID"]=e[n],l.attrs["PATHWAY-ID"]=r,l});a.push(...i)})}function ul(a,e,t,r){const{HOST:n,PARAMS:i,[t]:s}=r;let l;e&&(l=s==null?void 0:s[e],l&&(a=l));const h=new self.URL(a);return n&&!l&&(h.host=n),i&&Object.keys(i).sort().forEach(c=>{c&&h.searchParams.set(c,i[c])}),h.href}class na extends q{constructor(e){super("eme",e.logger),this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=na.CDMCleanupPromise?[na.CDMCleanupPromise]:[],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=ar(this.config));const l=s.map(Ai).filter(h=>!!h);this.keyFormatPromise=this.getKeyFormatPromise(l)}this.keyFormatPromise.then(s=>{const l=Li(s);let h,c;if(r==="sinf"){if(l!==Jr.FAIRPLAY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${r}" for selected key-system ${l}`);return}const I=St(new Uint8Array(n));try{const re=Xr(JSON.parse(I).sinf),ce=Oe(re);if(!ce)throw new Error("'schm' box missing or not cbcs/cenc with schi > tenc");h=new Uint8Array(ce.subarray(8,24)),c=Jr.FAIRPLAY}catch(re){this.warn(`${i} Failed to parse sinf: ${re}`);return}}else{if(l!==Jr.WIDEVINE&&l!==Jr.PLAYREADY){this.warn(`Ignoring unexpected "${t.type}" event with init data type: "${r}" for selected key-system ${l}`);return}const I=et(n),re=I.filter(ke=>!!ke.systemId&&Pi(ke.systemId)===l);re.length>1&&this.warn(`${i} Using first of ${re.length} pssh found for selected key-system ${l}`);const ce=re[0];if(!ce){I.length===0||I.some(ke=>!ke.systemId)?this.warn(`${i} contains incomplete or invalid pssh data`):this.log(`ignoring ${i} for ${I.map(ke=>Pi(ke.systemId)).join(",")} pssh data in favor of playlist keys`);return}if(c=Pi(ce.systemId),ce.version===0&&ce.data)if(c===Jr.WIDEVINE){const ke=ce.data.length-22;h=new Uint8Array(ce.data.subarray(ke,ke+16))}else c===Jr.PLAYREADY&&(h=an(ce.data))}if(!c||!h)return;const p=j.hexDump(h),{keyIdToKeySessionPromise:_,mediaKeySessions:A}=this;let L=_[p];for(let I=0;I<A.length;I++){const re=A[I],ce=re.decryptdata;if(!ce.keyId)continue;const ke=j.hexDump(ce.keyId);if(p===ke||ce.uri.replace(/-/g,"").indexOf(p)!==-1){if(L=_[ke],ce.pssh)break;delete _[ke],ce.pssh=new Uint8Array(n),ce.keyId=h,L=_[p]=L.then(()=>this.generateRequestWithPreferredKeySession(re,r,n,"encrypted-event-key-match")),L.catch(We=>this.handleError(We));break}}if(!L){if(c!==l){this.log(`Ignoring "${t.type}" event with ${c} init data for selected key-system ${l}`);return}L=_[p]=this.getKeySystemSelectionPromise([c]).then(({keySystem:I,mediaKeys:re})=>{var ce;this.throwIfDestroyed();const ke=new Ci("ISO-23001-7",p,(ce=Ai(I))!=null?ce:"");return ke.pssh=new Uint8Array(n),ke.keyId=h,this.attemptSetMediaKeys(I,re).then(()=>{this.throwIfDestroyed();const We=this.createMediaKeySessionContext({decryptdata:ke,keySystem:I,mediaKeys:re});return this.generateRequestWithPreferredKeySession(We,r,n,"encrypted-event-no-match")})}),L.catch(I=>this.handleError(I))}})}},this.onWaitingForKey=t=>{this.log(`"${t.type}" event`)},this.hls=e,this.config=e.config,this.registerListeners()}destroy(){const e=this.media;this.unregisterListeners(),this.onMediaDetached(),this._clear(e);const t=this.config;t.requestMediaKeySystemAccessFunc=null,t.licenseXhrSetup=t.licenseResponseCallback=void 0,t.drmSystems=t.drmSystemOptions={},this.hls=this.config=this.keyIdToKeySessionPromise=null,this.onMediaEncrypted=this.onWaitingForKey=null}registerListeners(){this.hls.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(m.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(m.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(m.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(m.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(m.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(m.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:r}=this.config,n=t[e];if(n)return n.licenseUrl;if(e===Jr.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,l,h)=>!!s&&h.indexOf(s)===l,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,l)=>{const h=c=>{const p=c.shift();this.getMediaKeysPromise(p,n,i).then(_=>s({keySystem:p,mediaKeys:_})).catch(_=>{c.length?h(c):_ instanceof Ni?l(_):l(new Ni({type:_e.KEY_SYSTEM_ERROR,details:O.KEY_SYSTEM_NO_ACCESS,error:_,fatal:!0},_.message))})};h(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:r}=this.config;if(typeof r!="function"){let n=`Configured requestMediaKeySystemAccess is not a function ${r}`;return fr===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=bn(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: ${_r(n)}`),s=this.requestMediaKeySystemAccess(e,n);const l=this.keySystemAccessPromises[e]={keySystemAccess:s};return s.catch(h=>{this.log(`Failed to obtain access to key-system "${e}": ${h}`)}),s.then(h=>{this.log(`Access for key-system "${h.keySystem}" obtained`);const c=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),l.mediaKeys=h.createMediaKeys().then(p=>(this.log(`Media-keys created for "${e}"`),c.then(_=>_?this.setMediaKeysServerCertificate(p,e,_):p))),l.mediaKeys.catch(p=>{this.error(`Failed to create media-keys for "${e}"}: ${p}`)}),l.mediaKeys})}return s.then(()=>i.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:r}){this.log(`Creating key-system session "${t}" keyId: ${j.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.buffer,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}getKeyIdString(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(e.keyId===null)throw new Error("keyId is null");return j.hexDump(e.keyId)}updateKeySession(e,t){var r;const n=e.mediaKeysSession;return this.log(`Updating key-session "${n.sessionId}" for keyID ${j.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=ar(this.config),i=e.map(Li).filter(s=>!!s&&n.indexOf(s)!==-1);return this.getKeySystemSelectionPromise(i).then(({keySystem:s})=>{const l=Ai(s);l?t(l):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.getKeySystemForKeyPromise(t).then(({keySystem:l,mediaKeys:h})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${n}`),this.attemptSetMediaKeys(l,h).then(()=>(this.throwIfDestroyed(),this.createMediaKeySessionContext({keySystem:l,mediaKeys:h,decryptdata:t}))))),(this.keyIdToKeySessionPromise[r]=i.then(l=>{const h="cenc",c=t.pssh?t.pssh.buffer:null;return this.generateRequestWithPreferredKeySession(l,h,c,"playlist-key")})).catch(l=>this.handleError(l))),i}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof Ni?this.hls.trigger(m.ERROR,e.data):this.hls.trigger(m.ERROR,{type:_e.KEY_SYSTEM_ERROR,details:O.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),r=this.keyIdToKeySessionPromise[t];if(!r){const n=Li(e.keyFormat),i=n?[n]:ar(this.config);return this.attemptKeySystemAccess(i)}return r}getKeySystemSelectionPromise(e){if(e.length||(e=ar(this.config)),e.length===0)throw new Ni({type:_e.KEY_SYSTEM_ERROR,details:O.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${_r({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 l=(i=this.config.drmSystems)==null||(s=i[e.keySystem])==null?void 0:s.generateRequest;if(l)try{const I=l.call(this.hls,t,r,e);if(!I)throw new Error("Invalid response from configured generateRequest filter");t=I.initDataType,r=I.initData?I.initData:null,e.decryptdata.pssh=r?new Uint8Array(r):null}catch(I){var h;if(this.warn(I.message),(h=this.hls)!=null&&h.config.debug)throw I}if(r===null)return this.log(`Skipping key-session request for "${n}" (no initData)`),Promise.resolve(e);const c=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${n}": ${c} (init data type: ${t} length: ${r?r.byteLength:null})`);const p=new Ys,_=e._onmessage=I=>{const re=e.mediaKeysSession;if(!re){p.emit("error",new Error("invalid state"));return}const{messageType:ce,message:ke}=I;this.log(`"${ce}" message event for session "${re.sessionId}" message size: ${ke.byteLength}`),ce==="license-request"||ce==="license-renewal"?this.renewLicense(e,ke).catch(We=>{p.eventNames().length?p.emit("error",We):this.handleError(We)}):ce==="license-release"?e.keySystem===Jr.FAIRPLAY&&(this.updateKeySession(e,Cn("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${ce}"`)},A=e._onkeystatuseschange=I=>{if(!e.mediaKeysSession){p.emit("error",new Error("invalid state"));return}this.onKeyStatusChange(e);const ce=e.keyStatus;p.emit("keyStatus",ce),ce==="expired"&&(this.warn(`${e.keySystem} expired for key ${c}`),this.renewKeySession(e))};e.mediaKeysSession.addEventListener("message",_),e.mediaKeysSession.addEventListener("keystatuseschange",A);const L=new Promise((I,re)=>{p.on("error",re),p.on("keyStatus",ce=>{ce.startsWith("usable")?I():ce==="output-restricted"?re(new Ni({type:_e.KEY_SYSTEM_ERROR,details:O.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):ce==="internal-error"?re(new Ni({type:_e.KEY_SYSTEM_ERROR,details:O.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${ce}"`)):ce==="expired"?re(new Error("key expired while generating request")):this.warn(`unhandled key status change "${ce}"`)})});return e.mediaKeysSession.generateRequest(t,r).then(()=>{var I;this.log(`Request generated for key-session "${(I=e.mediaKeysSession)==null?void 0:I.sessionId}" keyId: ${c}`)}).catch(I=>{throw new Ni({type:_e.KEY_SYSTEM_ERROR,details:O.KEY_SYSTEM_NO_SESSION,error:I,fatal:!1},`Error generating key-session request: ${I}`)}).then(()=>L).catch(I=>{throw p.removeAllListeners(),this.removeSession(e),I}).then(()=>(p.removeAllListeners(),e))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach((t,r)=>{this.log(`key status change "${t}" for keyStatuses keyId: ${j.hexDump("buffer"in r?new Uint8Array(r.buffer,r.byteOffset,r.byteLength):new Uint8Array(r))} session keyId: ${j.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,l)=>{const h={responseType:"arraybuffer",url:i},c=t.certLoadPolicy.default,p={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},_={onSuccess:(A,L,I,re)=>{s(A.data)},onError:(A,L,I,re)=>{l(new Ni({type:_e.KEY_SYSTEM_ERROR,details:O.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:I,response:S({url:h.url,data:void 0},A)},`"${e}" certificate request failed (${i}). Status: ${A.code} (${A.text})`))},onTimeout:(A,L,I)=>{l(new Ni({type:_e.KEY_SYSTEM_ERROR,details:O.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:I,response:{url:h.url,data:void 0}},`"${e}" certificate request timed out (${i})`))},onAbort:(A,L,I)=>{l(new Error("aborted"))}};n.load(h,p,_)})):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 Ni({type:_e.KEY_SYSTEM_ERROR,details:O.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 Ni({type:_e.KEY_SYSTEM_ERROR,details:O.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 p;for(let _=0,A=i.length;_<A;_++){var s,l;p=i[_];const L=(s=p.querySelector("name"))==null?void 0:s.textContent,I=(l=p.querySelector("value"))==null?void 0:l.textContent;L&&I&&e.setRequestHeader(L,I)}}const h=n.querySelector("Challenge"),c=h==null?void 0:h.textContent;if(!c)throw new Error("Cannot find <Challenge> in key message");return Cn(atob(c))}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 l=new XMLHttpRequest;l.responseType="arraybuffer",l.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return i(new Error("invalid state"));if(l.readyState===4)if(l.status===200){this._requestLicenseFailureCount=0;let h=l.response;this.log(`License received ${h instanceof ArrayBuffer?h.byteLength:h}`);const c=this.config.licenseResponseCallback;if(c)try{h=c.call(this.hls,l,s,e)}catch(p){this.error(p)}n(h)}else{const h=r.errorRetry,c=h?h.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>c||l.status>=400&&l.status<500)i(new Ni({type:_e.KEY_SYSTEM_ERROR,details:O.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:l,response:{url:s,data:void 0,code:l.status,text:l.statusText}},`License Request XHR failed (${s}). Status: ${l.status} (${l.statusText})`));else{const p=c-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${p} attempts left`),this.requestLicense(e,t).then(n,i)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=l,this.setupLicenseXHR(l,s,e,t).then(({xhr:h,licenseChallenge:c})=>{e.keySystem==Jr.PLAYREADY&&(c=this.unpackPlayReadyKeyMessage(h,c)),h.send(c)})})}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;e&&(e.removeEventListener("encrypted",this.onMediaEncrypted),e.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null)}_clear(e){var t;const r=this.mediaKeySessions;this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},Ci.clearKeyUriToKeyIdMap();const n=r.length;na.CDMCleanupPromise=Promise.all(r.map(i=>this.removeSession(i)).concat(e==null||(t=e.setMediaKeys(null))==null?void 0:t.catch(i=>{var s;this.log(`Could not clear media keys: ${i}`),(s=this.hls)==null||s.trigger(m.ERROR,{type:_e.OTHER_ERROR,details:O.KEY_SYSTEM_DESTROY_MEDIA_KEYS_ERROR,fatal:!1,error:new Error(`Could not clear media keys: ${i}`)})}))).then(()=>{n&&(this.log("finished closing key sessions and clearing media keys"),r.length=0)}).catch(i=>{var s;this.log(`Could not close sessions and clear media keys: ${i}`),(s=this.hls)==null||s.trigger(m.ERROR,{type:_e.OTHER_ERROR,details:O.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close sessions and clear media keys: ${i}`)})})}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:t}){if(!(!t||!this.config.emeEnabled)&&!this.keyFormatPromise){const 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=>{var s;this.log(`Could not remove session: ${i}`),(s=this.hls)==null||s.trigger(m.ERROR,{type:_e.OTHER_ERROR,details:O.KEY_SYSTEM_DESTROY_REMOVE_SESSION_ERROR,fatal:!1,error:new Error(`Could not remove session: ${i}`)})}).then(()=>t.close()).catch(i=>{var s;this.log(`Could not close session: ${i}`),(s=this.hls)==null||s.trigger(m.ERROR,{type:_e.OTHER_ERROR,details:O.KEY_SYSTEM_DESTROY_CLOSE_SESSION_ERROR,fatal:!1,error:new Error(`Could not close session: ${i}`)})})}}}na.CDMCleanupPromise=void 0;class Ni extends Error{constructor(e,t){super(t),this.data=void 0,e.error||(e.error=new Error(t)),this.data=e,e.err=e.error}}class Nu{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(m.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(m.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListeners(){this.hls.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(m.MEDIA_DETACHING,this.onMediaDetaching,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)}}onMediaDetaching(){this.media=null}checkFPS(e,t,r){const n=performance.now();if(t){if(this.lastTime){const i=n-this.lastTime,s=r-this.lastDroppedFrames,l=t-this.lastDecodedFrames,h=1e3*s/i,c=this.hls;if(c.trigger(m.FPS_DROP,{currentDropped:s,currentDecoded:l,totalDroppedFrames:r}),h>0&&s>c.config.fpsDroppedMonitoringThreshold*l){let p=c.currentLevel;c.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+p),p>0&&(c.autoLevelCapping===-1||c.autoLevelCapping>=p)&&(p=p-1,c.trigger(m.FPS_DROP_LEVEL_CAPPING,{level:p,droppedLevel:c.currentLevel}),c.autoLevelCapping=p,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)}}function cl(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 hl(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){J.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){J.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${n}`)}}t==="disabled"&&(a.mode=t)}function ia(a,e){const t=a.mode;if(t==="disabled"&&(a.mode="hidden"),a.cues)for(let r=a.cues.length;r--;)e&&a.cues[r].removeEventListener("enter",e),a.removeCue(a.cues[r]);t==="disabled"&&(a.mode=t)}function Po(a,e,t,r){const n=a.mode;if(n==="disabled"&&(a.mode="hidden"),a.cues&&a.cues.length>0){const i=$u(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 Fu(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,i;for(;r<=n;)if(i=Math.floor((n+r)/2),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 $u(a,e,t){const r=[],n=Fu(a,e);if(n>-1)for(let i=n,s=a.length;i<s;i++){const l=a[i];if(l.startTime>=e&&l.endTime<=t)r.push(l);else if(l.startTime>t)return r}return r}function io(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}class Uu extends Ss{constructor(e){super(e,"subtitle-track-controller"),this.media=null,this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.queuedDefaultTrack=-1,this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.asyncPollTrackChange=()=>this.pollTrackChange(0),this.onTextTracksChanged=()=>{if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let t=null;const r=io(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(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.LEVEL_LOADING,this.onLevelLoading,this),e.on(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(m.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(m.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.LEVEL_LOADING,this.onLevelLoading,this),e.off(m.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(m.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(m.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)}onMediaDetaching(e,t){const r=this.media;if(!r)return;const n=!!t.transferMedia;if(self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||r.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),this.subtitleTrack=-1,this.media=null,n)return;io(r.textTracks).forEach(s=>{ia(s)})}onManifestLoading(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.subtitleTracks}onSubtitleTrackLoaded(e,t){const{id: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 l=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,l)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const 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(p=>!r||r.indexOf(p.groupId)!==-1);if(s.length)this.selectDefaultTrack&&!s.some(p=>p.default)&&(this.selectDefaultTrack=!1),s.forEach((p,_)=>{p.id=_});else if(!i&&!this.tracksInGroup.length)return;this.tracksInGroup=s;const l=this.hls.config.subtitlePreference;if(!i&&l){this.selectDefaultTrack=!1;const p=bt(l,s);if(p>-1)i=s[p];else{const _=bt(l,this.tracks);i=this.tracks[_]}}let h=this.findTrackId(i);h===-1&&i&&(h=this.findTrackId(null));const c={subtitleTracks:s};this.log(`Updating subtitle tracks, ${s.length} track(s) found in "${r==null?void 0:r.join(",")}" group-id`),this.hls.trigger(m.SUBTITLE_TRACKS_UPDATED,c),h!==-1&&this.trackId===-1&&this.setSubtitleTrack(h)}}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||Dt(i,e)))return n}if(e){for(let n=0;n<t.length;n++){const i=t[n];if(Ta(e.attrs,i.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return n}for(let n=0;n<t.length;n++){const i=t[n];if(Ta(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(Do(n,e))return r}}return-1}onError(e,t){t.fatal||!t.context||t.context.type===de.SUBTITLE_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allSubtitleTracks(){return this.tracks}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}setSubtitleOption(e){if(this.hls.config.subtitlePreference=e,e){if(e.id===-1)return this.setSubtitleTrack(-1),null;const t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){const r=this.currentTrack;if(r&&Dt(e,r))return r;const n=bt(e,this.tracksInGroup);if(n>-1){const i=this.tracksInGroup[n];return this.setSubtitleTrack(n),i}else{if(r)return null;{const i=bt(e,t);if(i>-1)return t[i]}}}}return null}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentTrack)&&this.scheduleLoading(this.currentTrack,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const r=e.id,n=e.groupId,i=this.getUrlWithDirectives(e.url,t),s=e.details,l=s==null?void 0:s.age;this.log(`Loading subtitle ${r} "${e.name}" lang:${e.lang} group:${n}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${l&&s.live?" age "+l.toFixed(1)+(s.type?" "+s.type||0:""):""} ${i}`),this.hls.trigger(m.SUBTITLE_TRACK_LOADING,{url:i,id:r,groupId:n,deliveryDirectives:t||null,track:e})}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=io(e.textTracks),r=this.currentTrack;let n;if(r&&(n=t.filter(i=>Do(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||!$(e)){this.warn(`Invalid subtitle track id: ${e}`);return}this.selectDefaultTrack=!1;const r=this.currentTrack,n=t[e]||null;if(this.trackId=e,this.currentTrack=n,this.toggleTrackModes(),!n){this.hls.trigger(m.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:l="",name:h,type:c,url:p}=n;this.hls.trigger(m.SUBTITLE_TRACK_SWITCH,{id:s,groupId:l,name:h,type:c,url:p});const _=this.switchParams(n.url,r==null?void 0:r.details,n.details);this.loadPlaylist(_)}}function Ca(a){let e=5381,t=a.length;for(;t;)e=e*33^a.charCodeAt(--t);return(e>>>0).toString()}const sa=.025;let so=function(a){return a[a.Point=0]="Point",a[a.Range=1]="Range",a}({});function zu(a,e,t){return`${a.identifier}-${t+1}-${Ca(e)}`}class Gu{constructor(e,t){this.base=void 0,this._duration=null,this._timelineStart=null,this.appendInPlaceDisabled=void 0,this.appendInPlaceStarted=void 0,this.dateRange=void 0,this.hasPlayed=!1,this.cumulativeDuration=0,this.resumeOffset=NaN,this.playoutLimit=NaN,this.restrictions={skip:!1,jump:!1},this.snapOptions={out:!1,in:!1},this.assetList=[],this.assetListLoader=void 0,this.assetListResponse=null,this.resumeAnchor=void 0,this.error=void 0,this.resetOnResume=void 0,this.base=t,this.dateRange=e,this.setDateRange(e)}setDateRange(e){this.dateRange=e,this.resumeOffset=e.attr.optionalFloat("X-RESUME-OFFSET",this.resumeOffset),this.playoutLimit=e.attr.optionalFloat("X-PLAYOUT-LIMIT",this.playoutLimit),this.restrictions=e.attr.enumeratedStringList("X-RESTRICT",this.restrictions),this.snapOptions=e.attr.enumeratedStringList("X-SNAP",this.snapOptions)}reset(){var e;this.appendInPlaceStarted=!1,(e=this.assetListLoader)==null||e.destroy(),this.assetListLoader=void 0,this.supplementsPrimary||(this.assetListResponse=null,this.assetList=[],this._duration=null)}isAssetPastPlayoutLimit(e){if(e>=this.assetList.length)return!0;const t=this.playoutLimit;return e<=0||isNaN(t)?!1:this.assetList[e].startOffset>t}findAssetIndex(e){return this.assetList.indexOf(e)}get identifier(){return this.dateRange.id}get startDate(){return this.dateRange.startDate}get startTime(){const e=this.dateRange.startTime;if(this.snapOptions.out){const t=this.dateRange.tagAnchor;if(t)return Mo(e,t)}return e}get startOffset(){return this.cue.pre?0:this.startTime}get startIsAligned(){if(this.startTime===0||this.snapOptions.out)return!0;const e=this.dateRange.tagAnchor;if(e){const t=this.dateRange.startTime,r=Mo(t,e);return t-r<.1}return!1}get resumptionOffset(){const e=this.resumeOffset,t=$(e)?e:this.duration;return this.cumulativeDuration+t}get resumeTime(){const e=this.startOffset+this.resumptionOffset;if(this.snapOptions.in){const t=this.resumeAnchor;if(t)return Mo(e,t)}return e}get appendInPlace(){return this.appendInPlaceStarted?!0:this.appendInPlaceDisabled?!1:!!(!this.cue.once&&!this.cue.pre&&this.startIsAligned&&(isNaN(this.playoutLimit)&&isNaN(this.resumeOffset)||this.resumeOffset&&this.duration&&Math.abs(this.resumeOffset-this.duration)<sa))}set appendInPlace(e){if(this.appendInPlaceStarted){this.resetOnResume=!e;return}this.appendInPlaceDisabled=!e}get timelineStart(){return this._timelineStart!==null?this._timelineStart:this.startTime}set timelineStart(e){this._timelineStart=e}get duration(){const e=this.playoutLimit;let t;return this._duration!==null?t=this._duration:this.dateRange.duration?t=this.dateRange.duration:t=this.dateRange.plannedDuration||0,!isNaN(e)&&e<t&&(t=e),t}set duration(e){this._duration=e}get cue(){return this.dateRange.cue}get timelineOccupancy(){return this.dateRange.attr["X-TIMELINE-OCCUPIES"]==="RANGE"?so.Range:so.Point}get supplementsPrimary(){return this.dateRange.attr["X-TIMELINE-STYLE"]==="PRIMARY"}get contentMayVary(){return this.dateRange.attr["X-CONTENT-MAY-VARY"]!=="NO"}get assetUrl(){return this.dateRange.attr["X-ASSET-URI"]}get assetListUrl(){return this.dateRange.attr["X-ASSET-LIST"]}get baseUrl(){return this.base.url}get assetListLoaded(){return this.assetList.length>0||this.assetListResponse!==null}toString(){return Hu(this)}}function Mo(a,e){return a-e.start<e.duration/2&&!(Math.abs(a-(e.start+e.duration))<sa)?e.start:e.start+e.duration}function dl(a,e,t){const r=new self.URL(a,t);return r.protocol!=="data:"&&r.searchParams.set("_HLS_primary_id",e),r}function Hu(a){return`["${a.identifier}" ${a.cue.pre?"<pre>":a.cue.post?"<post>":""}${a.timelineStart.toFixed(2)}-${a.resumeTime.toFixed(2)}]`}function Bo(a){const e=a.timelineStart,t=a.duration||0;return`["${a.identifier}" ${e.toFixed(2)}-${(e+t).toFixed(2)}]`}class ju{constructor(e,t,r,n){this.hls=void 0,this.interstitial=void 0,this.assetItem=void 0,this.tracks=null,this.hasDetails=!1,this.mediaAttached=null,this._currentTime=void 0,this._bufferedEosTime=void 0,this.checkPlayout=()=>{const c=this.interstitial.playoutLimit,p=this.currentTime;this.startOffset+p>=c&&this.hls.trigger(m.PLAYOUT_LIMIT_REACHED,{})};const i=this.hls=new e(t);this.interstitial=r,this.assetItem=n;let s=n.uri;try{s=dl(s,i.sessionId).href}catch(h){}i.loadSource(s);const l=()=>{this.hasDetails=!0};i.once(m.LEVEL_LOADED,l),i.once(m.AUDIO_TRACK_LOADED,l),i.once(m.SUBTITLE_TRACK_LOADED,l),i.on(m.MEDIA_ATTACHING,(h,{media:c})=>{this.removeMediaListeners(),this.mediaAttached=c,this.interstitial.playoutLimit&&c.addEventListener("timeupdate",this.checkPlayout)})}bufferedInPlaceToEnd(e){var t;if(!this.interstitial.appendInPlace)return!1;if((t=this.hls)!=null&&t.bufferedToEnd)return!0;if(!e||!this._bufferedEosTime)return!1;const r=this.timelineOffset,n=pr.bufferInfo(e,r,0);return this.getAssetTime(n.end)>=this._bufferedEosTime-.02}get destroyed(){var e;return!((e=this.hls)!=null&&e.userConfig)}get assetId(){return this.assetItem.identifier}get interstitialId(){return this.assetItem.parentIdentifier}get media(){var e;return((e=this.hls)==null?void 0:e.media)||null}get bufferedEnd(){const e=this.media||this.mediaAttached;if(!e)return this._bufferedEosTime?this._bufferedEosTime:this.currentTime;const t=pr.bufferInfo(e,e.currentTime,.001);return this.getAssetTime(t.end)}get currentTime(){const e=this.media||this.mediaAttached;return e?this.getAssetTime(e.currentTime):this._currentTime||0}get duration(){const e=this.assetItem.duration;return e||0}get remaining(){const e=this.duration;return e?Math.max(0,e-this.currentTime):0}get startOffset(){return this.assetItem.startOffset}get timelineOffset(){var e;return((e=this.hls)==null?void 0:e.config.timelineOffset)||0}set timelineOffset(e){const t=this.timelineOffset;if(e!==t){const r=e-t;if(Math.abs(r)>1/9e4){if(this.hasDetails)throw new Error("Cannot set timelineOffset after playlists are loaded");this.hls.config.timelineOffset=e}}}getAssetTime(e){const t=this.timelineOffset,r=this.duration;return Math.min(Math.max(0,e-t),r)}removeMediaListeners(){const e=this.mediaAttached;e&&(this._currentTime=e.currentTime,this.bufferSnapShot(),e.removeEventListener("timeupdate",this.checkPlayout))}bufferSnapShot(){if(this.mediaAttached){var e;(e=this.hls)!=null&&e.bufferedToEnd&&(this._bufferedEosTime=this.bufferedEnd)}}destroy(){this.removeMediaListeners(),this.hls.destroy(),this.hls=this.interstitial=null,this.tracks=this.mediaAttached=this.checkPlayout=null}attachMedia(e){this.hls.attachMedia(e)}detachMedia(){this.removeMediaListeners(),this.mediaAttached=null,this.hls.detachMedia()}resumeBuffering(){this.hls.resumeBuffering()}pauseBuffering(){this.hls.pauseBuffering()}transferMedia(){return this.bufferSnapShot(),this.hls.transferMedia()}on(e,t,r){this.hls.on(e,t)}once(e,t,r){this.hls.once(e,t)}off(e,t,r){this.hls.off(e,t)}toString(){var e,t;return`HlsAssetPlayer: ${Bo(this.assetItem)} ${(e=this.hls)==null?void 0:e.sessionId} ${(t=this.interstitial)!=null&&t.appendInPlace?"append-in-place":""}`}}const fl=.033;class Ku extends q{constructor(e,t){super("interstitials-sched",t),this.onScheduleUpdate=void 0,this.eventMap={},this.events=null,this.items=null,this.durations={primary:0,playout:0,integrated:0},this.onScheduleUpdate=e}destroy(){this.reset(),this.onScheduleUpdate=null}reset(){this.eventMap={},this.setDurations(0,0,0),this.events&&this.events.forEach(e=>e.reset()),this.events=this.items=null}resetErrorsInRange(e,t){return this.events?this.events.reduce((r,n)=>e<=n.startOffset&&t>n.startOffset?(delete n.error,r+1):r,0):0}get duration(){const e=this.items;return e?e[e.length-1].end:0}get length(){return this.items?this.items.length:0}getEvent(e){return e&&this.eventMap[e]||null}hasEvent(e){return e in this.eventMap}findItemIndex(e,t){if(e.event)return this.findEventIndex(e.event.identifier);let r=-1;e.nextEvent?r=this.findEventIndex(e.nextEvent.identifier)-1:e.previousEvent&&(r=this.findEventIndex(e.previousEvent.identifier)+1);const n=this.items;if(n)for(n[r]||(t===void 0&&(t=e.start),r=this.findItemIndexAtTime(t));r>=0&&(i=n[r])!=null&&i.event;){var i;r--}return r}findItemIndexAtTime(e,t){const r=this.items;if(r)for(let n=0;n<r.length;n++){let i=r[n];if(t&&t!=="primary"&&(i=i[t]),e===i.start||e>i.start&&e<i.end)return n}return-1}findJumpRestrictedIndex(e,t){const r=this.items;if(r)for(let n=e;n<=t&&r[n];n++){const i=r[n].event;if(i!=null&&i.restrictions.jump&&!i.appendInPlace)return n}return-1}findEventIndex(e){const t=this.items;if(t)for(let n=t.length;n--;){var r;if(((r=t[n].event)==null?void 0:r.identifier)===e)return n}return-1}findAssetIndex(e,t){const r=e.assetList,n=r.length;if(n>1)for(let i=0;i<n;i++){const s=r[i];if(!s.error){const l=s.timelineStart;if(t===l||t>l&&t<l+(s.duration||0))return i}}return 0}get assetIdAtEnd(){var e,t;const r=(e=this.items)==null||(t=e[this.length-1])==null?void 0:t.event;if(r){const n=r.assetList,i=n[n.length-1];if(i)return i.identifier}return null}parseInterstitialDateRanges(e,t){const r=e.main.details,{dateRanges:n}=r,i=this.events,s=this.parseDateRanges(n,{url:r.url},t),l=Object.keys(n),h=i?i.filter(c=>!l.includes(c.identifier)):[];s.length&&s.sort((c,p)=>{const _=c.cue.pre,A=c.cue.post,L=p.cue.pre,I=p.cue.post;if(_&&!L)return-1;if(L&&!_||A&&!I)return 1;if(I&&!A)return-1;if(!_&&!L&&!A&&!I){const re=c.startTime,ce=p.startTime;if(re!==ce)return re-ce}return c.dateRange.tagOrder-p.dateRange.tagOrder}),this.events=s,h.forEach(c=>{this.removeEvent(c)}),this.updateSchedule(e,h)}updateSchedule(e,t=[]){const r=this.events||[];if(r.length||t.length||this.length<2){const n=this.items,i=this.parseSchedule(r,e);(t.length||(n==null?void 0:n.length)!==i.length||i.some((l,h)=>Math.abs(l.playout.start-n[h].playout.start)>.005||Math.abs(l.playout.end-n[h].playout.end)>.005))&&(this.items=i,this.onScheduleUpdate(t,n))}}parseDateRanges(e,t,r){const n=[],i=Object.keys(e);for(let s=0;s<i.length;s++){const l=i[s],h=e[l];if(h.isInterstitial){let c=this.eventMap[l];c?c.setDateRange(h):(c=new Gu(h,t),this.eventMap[l]=c,r===!1&&(c.appendInPlace=r)),n.push(c)}}return n}parseSchedule(e,t){const r=[],n=t.main.details,i=n.live?1/0:n.edge;let s=0;if(e=e.filter(h=>!h.error&&!(h.cue.once&&h.hasPlayed)),e.length){this.resolveOffsets(e,t);let h=0,c=0;if(e.forEach((p,_)=>{const A=p.cue.pre,L=p.cue.post,I=e[_-1]||null,re=p.appendInPlace,ce=L?i:p.startOffset,ke=p.duration,We=p.timelineOccupancy===so.Range?ke:0,He=p.resumptionOffset,ct=(I==null?void 0:I.startTime)===ce,ht=ce+p.cumulativeDuration;let Tt=re?ht+ke:ce+He;if(A||!L&&ce<=0){const xt=c;c+=We,p.timelineStart=ht;const It=s;s+=ke,r.push({event:p,start:ht,end:Tt,playout:{start:It,end:s},integrated:{start:xt,end:c}})}else if(ce<=i){if(!ct){const pt=ce-h;if(pt>fl){const Ht=h,er=c;c+=pt;const tn=s;s+=pt;const Cr={previousEvent:e[_-1]||null,nextEvent:p,start:Ht,end:Ht+pt,playout:{start:tn,end:s},integrated:{start:er,end:c}};r.push(Cr)}else pt>0&&I&&(I.cumulativeDuration+=pt,r[r.length-1].end=ce)}L&&(Tt=ht),p.timelineStart=ht;const xt=c;c+=We;const It=s;s+=ke,r.push({event:p,start:ht,end:Tt,playout:{start:It,end:s},integrated:{start:xt,end:c}})}else return;const dt=p.resumeTime;L||dt>i?h=i:h=dt}),h<i){var l;const p=h,_=c,A=i-h;c+=A;const L=s;s+=A,r.push({previousEvent:((l=r[r.length-1])==null?void 0:l.event)||null,nextEvent:null,start:h,end:p+A,playout:{start:L,end:s},integrated:{start:_,end:c}})}this.setDurations(i,s,c)}else r.push({previousEvent:null,nextEvent:null,start:0,end:i,playout:{start:0,end:i},integrated:{start:0,end:i}}),this.setDurations(i,i,i);return r}setDurations(e,t,r){this.durations={primary:e,playout:t,integrated:r}}resolveOffsets(e,t){const r=t.main.details,n=r.live?1/0:r.edge;let i=0,s=-1;e.forEach((l,h)=>{const c=l.cue.pre,p=l.cue.post,_=c?0:p?n:l.startTime;this.updateAssetDurations(l),s===_?l.cumulativeDuration=i:(i=0,s=_),!p&&l.snapOptions.in&&(l.resumeAnchor=nr(null,r.fragments,l.startOffset+l.resumptionOffset,0,0)||void 0),l.appendInPlace&&!l.appendInPlaceStarted&&(this.primaryCanResumeInPlaceAt(l,t)||(l.appendInPlace=!1)),!l.appendInPlace&&h+1<e.length&&e[h+1].startTime-e[h].resumeTime<fl&&(e[h+1].appendInPlace=!1,e[h+1].appendInPlace&&this.warn(`Could not change append strategy for abutting event ${l}`));const L=$(l.resumeOffset)?l.resumeOffset:l.duration;i+=L})}primaryCanResumeInPlaceAt(e,t){const r=e.resumeTime,n=e.startTime+e.resumptionOffset;return Math.abs(r-n)>sa?(this.log(`"${e.identifier}" resumption ${r} not aligned with estimated timeline end ${n}`),!1):t?!Object.keys(t).some(s=>{const l=t[s].details,h=l.edge;if(r>=h)return this.log(`"${e.identifier}" resumption ${r} past ${s} playlist end ${h}`),!1;const c=nr(null,l.fragments,r);if(!c)return this.log(`"${e.identifier}" resumption ${r} does not align with any fragments in ${s} playlist (${l.fragStart}-${l.fragmentEnd})`),!0;const p=s==="audio"?.175:0;return Math.abs(c.start-r)<sa+p||Math.abs(c.end-r)<sa+p?!1:(this.log(`"${e.identifier}" resumption ${r} not aligned with ${s} fragment bounds (${c.start}-${c.end} sn: ${c.sn} cc: ${c.cc})`),!0)}):(this.log(`"${e.identifier}" resumption ${r} can not be aligned with media (none selected)`),!1)}updateAssetDurations(e){if(!e.assetListLoaded)return;const t=e.timelineStart;let r=0,n=!1,i=!1;e.assetList.forEach((s,l)=>{const h=t+r;s.startOffset=r,s.timelineStart=h,n||(n=s.duration===null),i||(i=!!s.error);const c=s.error?0:s.duration||0;r+=c}),n&&!i?e.duration=Math.max(r,e.duration):e.duration=r}removeEvent(e){e.reset(),delete this.eventMap[e.identifier]}}function ws(a){return`[${a.event?'"'+a.event.identifier+'"':"primary"}: ${a.start.toFixed(2)}-${a.end.toFixed(2)}]`}class Wu{constructor(e){this.hls=void 0,this.hls=e}destroy(){this.hls=null}loadAssetList(e,t){const r=e.assetListUrl;let n;try{n=dl(r,this.hls.sessionId,e.baseUrl)}catch(A){const L=this.assignAssetListError(e,O.ASSET_LIST_LOAD_ERROR,A,r);this.hls.trigger(m.ERROR,L);return}t&&n.protocol!=="data:"&&n.searchParams.set("_HLS_start_offset",""+t);const i=this.hls.config,s=i.loader,l=new s(i),h={responseType:"json",url:n.href},c=i.interstitialAssetListLoadPolicy.default,p={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},_={onSuccess:(A,L,I,re)=>{const ce=A.data,ke=ce==null?void 0:ce.ASSETS;if(!Array.isArray(ke)){const We=this.assignAssetListError(e,O.ASSET_LIST_PARSING_ERROR,new Error("Invalid interstitial asset list"),I.url,L,re);this.hls.trigger(m.ERROR,We);return}e.assetListResponse=ce,this.hls.trigger(m.ASSET_LIST_LOADED,{event:e,assetListResponse:ce,networkDetails:re})},onError:(A,L,I,re)=>{const ce=this.assignAssetListError(e,O.ASSET_LIST_LOAD_ERROR,new Error(`Error loading X-ASSET-LIST: HTTP status ${A.code} ${A.text} (${L.url})`),L.url,re,I);this.hls.trigger(m.ERROR,ce)},onTimeout:(A,L,I)=>{const re=this.assignAssetListError(e,O.ASSET_LIST_LOAD_TIMEOUT,new Error(`Timeout loading X-ASSET-LIST (${L.url})`),L.url,A,I);this.hls.trigger(m.ERROR,re)}};return l.load(h,p,_),this.hls.trigger(m.ASSET_LIST_LOADING,{event:e}),l}assignAssetListError(e,t,r,n,i,s){return e.error=r,{type:_e.NETWORK_ERROR,details:t,fatal:!1,interstitial:e,url:n,error:r,networkDetails:s,stats:i}}}function ns(a,e,t){Xi(a,e,t),a.addEventListener(e,t)}function Xi(a,e,t){a.removeEventListener(e,t)}function pl(a){a==null||a.play().catch(()=>{})}class Vu extends q{constructor(e,t){super("interstitials",e.logger),this.HlsPlayerClass=void 0,this.hls=void 0,this.assetListLoader=void 0,this.mediaSelection=null,this.altSelection=null,this.media=null,this.detachedData=null,this.requiredTracks=null,this.manager=null,this.playerQueue=[],this.bufferedPos=-1,this.timelinePos=-1,this.schedule=void 0,this.playingItem=null,this.bufferingItem=null,this.waitingItem=null,this.endedItem=null,this.playingAsset=null,this.endedAsset=null,this.bufferingAsset=null,this.shouldPlay=!1,this.onPlay=()=>{this.shouldPlay=!0},this.onPause=()=>{this.shouldPlay=!1},this.onSeeking=()=>{const r=this.currentTime;if(r===void 0||this.playbackDisabled)return;const n=r-this.timelinePos;if(Math.abs(n)<1/7056e5)return;const s=n<=-.01;this.timelinePos=r,this.bufferedPos=r;const l=this.playingItem;if(!l){this.checkBuffer();return}if(s&&this.schedule.resetErrorsInRange(r,r-n)&&this.updateSchedule(),this.checkBuffer(),s&&r<l.start||r>=l.end){var h;const A=this.schedule.findItemIndexAtTime(this.timelinePos);if(!this.isInterstitial(l)&&(h=this.media)!=null&&h.paused&&(this.shouldPlay=!1),!s){const L=this.findItemIndex(l);if(A>L){const I=this.schedule.findJumpRestrictedIndex(L+1,A);if(I>L){this.setSchedulePosition(I);return}}}this.setSchedulePosition(A);return}const c=this.playingAsset;if(!c){if(this.playingLastItem&&this.isInterstitial(l)){const A=l.event.assetList[0];A&&(this.endedItem=this.playingItem,this.playingItem=null,this.setScheduleToAssetAtTime(r,A))}return}const p=c.timelineStart,_=c.duration||0;(s&&r<p||r>=p+_)&&this.setScheduleToAssetAtTime(r,c)},this.onTimeupdate=()=>{const r=this.currentTime;if(r===void 0||this.playbackDisabled)return;if(r>this.timelinePos)this.timelinePos=r,r>this.bufferedPos&&this.checkBuffer();else return;const n=this.playingItem;if(!n||this.playingLastItem)return;if(r>=n.end){this.timelinePos=n.end;const l=this.findItemIndex(n);this.setSchedulePosition(l+1)}const i=this.playingAsset;if(!i)return;const s=i.timelineStart+(i.duration||0);r>=s&&this.setScheduleToAssetAtTime(r,i)},this.onScheduleUpdate=(r,n)=>{const i=this.schedule,s=this.playingItem,l=i.events||[],h=i.items||[],c=i.durations,p=r.map(L=>L.identifier),_=!!(l.length||p.length);if(_&&this.log(`INTERSTITIALS_UPDATED (${l.length}): ${l}
|
|
Schedule: ${h.map(L=>ws(L))}`),p.length&&this.log(`Removed events ${p}`),this.playerQueue.forEach(L=>{if(L.interstitial.appendInPlace){const I=L.assetItem.timelineStart,re=L.timelineOffset-I;if(re)try{L.timelineOffset=I}catch(ce){Math.abs(re)>sa&&this.warn(`${ce} ("${L.assetId}" ${L.timelineOffset}->${I})`)}}}),s){const L=this.updateItem(s,this.timelinePos);this.itemsMatch(s,L)&&(this.playingItem=L,this.waitingItem=this.endedItem=null)}else this.waitingItem=this.updateItem(this.waitingItem),this.endedItem=this.updateItem(this.endedItem);const A=this.bufferingItem;if(A){const L=this.updateItem(A,this.bufferedPos);this.itemsMatch(A,L)?this.bufferingItem=L:A.event&&(this.bufferingItem=this.playingItem,this.clearInterstitial(A.event,null))}if(r.forEach(L=>{L.assetList.forEach(I=>{this.clearAssetPlayer(I.identifier,null)})}),_||n){if(this.hls.trigger(m.INTERSTITIALS_UPDATED,{events:l.slice(0),schedule:h.slice(0),durations:c,removedIds:p}),this.isInterstitial(s)&&p.includes(s.event.identifier)){this.warn(`Interstitial "${s.event.identifier}" removed while playing`),this.primaryFallback(s.event);return}this.checkBuffer()}},this.hls=e,this.HlsPlayerClass=t,this.assetListLoader=new Wu(e),this.schedule=new Ku(this.onScheduleUpdate,e.logger),this.registerListeners()}registerListeners(){const e=this.hls;e.on(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(m.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.on(m.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(m.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.on(m.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.on(m.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.on(m.BUFFER_APPENDED,this.onBufferAppended,this),e.on(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(m.BUFFERED_TO_END,this.onBufferedToEnd,this),e.on(m.MEDIA_ENDED,this.onMediaEnded,this),e.on(m.ERROR,this.onError,this),e.on(m.DESTROYING,this.onDestroying,this)}unregisterListeners(){const e=this.hls;e&&(e.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(m.AUDIO_TRACK_UPDATED,this.onAudioTrackUpdated,this),e.off(m.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(m.SUBTITLE_TRACK_UPDATED,this.onSubtitleTrackUpdated,this),e.off(m.EVENT_CUE_ENTER,this.onInterstitialCueEnter,this),e.off(m.ASSET_LIST_LOADED,this.onAssetListLoaded,this),e.off(m.BUFFER_CODECS,this.onBufferCodecs,this),e.off(m.BUFFER_APPENDED,this.onBufferAppended,this),e.off(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(m.BUFFERED_TO_END,this.onBufferedToEnd,this),e.off(m.MEDIA_ENDED,this.onMediaEnded,this),e.off(m.ERROR,this.onError,this),e.off(m.DESTROYING,this.onDestroying,this))}startLoad(){this.resumeBuffering()}stopLoad(){this.pauseBuffering()}resumeBuffering(){var e;(e=this.getBufferingPlayer())==null||e.resumeBuffering()}pauseBuffering(){var e;(e=this.getBufferingPlayer())==null||e.pauseBuffering()}destroy(){this.unregisterListeners(),this.stopLoad(),this.assetListLoader&&this.assetListLoader.destroy(),this.emptyPlayerQueue(),this.clearScheduleState(),this.schedule&&this.schedule.destroy(),this.media=this.detachedData=this.mediaSelection=this.requiredTracks=this.altSelection=this.manager=null,this.hls=this.HlsPlayerClass=this.schedule=this.log=null,this.assetListLoader=null,this.onPlay=this.onPause=this.onSeeking=this.onTimeupdate=null,this.onScheduleUpdate=null}onDestroying(){const e=this.primaryMedia||this.media;e&&this.removeMediaListeners(e)}removeMediaListeners(e){Xi(e,"play",this.onPlay),Xi(e,"pause",this.onPause),Xi(e,"seeking",this.onSeeking),Xi(e,"timeupdate",this.onTimeupdate)}onMediaAttaching(e,t){const r=this.media=t.media;ns(r,"seeking",this.onSeeking),ns(r,"timeupdate",this.onTimeupdate),ns(r,"play",this.onPlay),ns(r,"pause",this.onPause)}onMediaAttached(e,t){const r=this.effectivePlayingItem,n=this.detachedData;if(this.detachedData=null,r===null)this.checkStart();else if(!n){this.clearScheduleState();const i=this.findItemIndex(r);this.setSchedulePosition(i)}}clearScheduleState(){this.playingItem=this.bufferingItem=this.waitingItem=this.endedItem=this.playingAsset=this.endedAsset=this.bufferingAsset=null}onMediaDetaching(e,t){const r=!!t.transferMedia,n=this.media;if(this.media=null,!r&&(n&&this.removeMediaListeners(n),this.detachedData)){const i=this.getBufferingPlayer();i&&(this.playingAsset=this.endedAsset=this.bufferingAsset=this.bufferingItem=this.waitingItem=this.detachedData=null,i.detachMedia()),this.shouldPlay=!1}}get interstitialsManager(){if(!this.manager){if(!this.hls)return null;const e=this,t=()=>e.bufferingItem||e.waitingItem,r=_=>_&&e.getAssetPlayer(_.identifier),n=(_,A,L,I,re)=>{if(_){let ce=_[A].start;const ke=_.event;if(ke){if(A==="playout"||ke.timelineOccupancy!==so.Point){const We=r(L);(We==null?void 0:We.interstitial)===ke&&(ce+=We.assetItem.startOffset+We[re])}}else{const We=I==="bufferedPos"?s():e[I];ce+=We-_.start}return ce}return 0},i=(_,A)=>{if(_!==0&&A!=="primary"&&e.schedule.length){var L;const I=e.schedule.findItemIndexAtTime(_),re=(L=e.schedule.items)==null?void 0:L[I];if(re){const ce=re[A].start-re.start;return _+ce}}return _},s=()=>{const _=e.bufferedPos;return _===Number.MAX_VALUE?l("primary"):Math.max(_,0)},l=_=>{var A;return(A=e.primaryDetails)!=null&&A.live?e.primaryDetails.edge:e.schedule.durations[_]},h=(_,A)=>{var L,I;const re=e.effectivePlayingItem;if(re!=null&&(L=re.event)!=null&&L.restrictions.skip)return;e.log(`seek to ${_} "${A}"`);const ce=e.effectivePlayingItem,ke=e.schedule.findItemIndexAtTime(_,A),We=(I=e.schedule.items)==null?void 0:I[ke],He=e.getBufferingPlayer(),ct=He==null?void 0:He.interstitial,ht=ct==null?void 0:ct.appendInPlace,Tt=ce&&e.itemsMatch(ce,We);if(ce&&(ht||Tt)){const xt=r(e.playingAsset),It=(xt==null?void 0:xt.media)||e.primaryMedia;if(It){const pt=A==="primary"?It.currentTime:n(ce,A,e.playingAsset,"timelinePos","currentTime"),Ht=_-pt,er=(ht?pt:It.currentTime)+Ht;if(er>=0&&(!xt||ht||er<=xt.duration)){It.currentTime=er;return}}}if(We){let xt=_;if(A!=="primary"){const pt=We[A].start,Ht=_-pt;xt=We.start+Ht}const It=!e.isInterstitial(We);if((!e.isInterstitial(ce)||ce.event.appendInPlace)&&(It||We.event.appendInPlace)){const pt=e.media||(ht?He==null?void 0:He.media:null);pt&&(pt.currentTime=xt)}else if(ce){const pt=e.findItemIndex(ce);if(ke>pt){const er=e.schedule.findJumpRestrictedIndex(pt+1,ke);if(er>pt){e.setSchedulePosition(er);return}}let Ht=0;if(It)e.timelinePos=xt,e.checkBuffer();else{var dt;const er=We==null||(dt=We.event)==null?void 0:dt.assetList;if(er){const tn=_-(We[A]||We).start;for(let Cr=er.length;Cr--;){const br=er[Cr];if(br.duration&&tn>=br.startOffset&&tn<br.startOffset+br.duration){Ht=Cr;break}}}}e.setSchedulePosition(ke,Ht)}}},c=()=>{const _=e.effectivePlayingItem;if(e.isInterstitial(_))return _;const A=t();return e.isInterstitial(A)?A:null},p={get currentTime(){const _=c(),A=e.effectivePlayingItem;return A&&A===_?n(A,"playout",e.effectivePlayingAsset,"timelinePos","currentTime")-A.playout.start:0},set currentTime(_){const A=c(),L=e.effectivePlayingItem;L&&L===A&&h(_+L.playout.start,"playout")},get duration(){const _=c();return _?_.playout.end-_.playout.start:0},get assetPlayers(){var _;const A=(_=c())==null?void 0:_.event.assetList;return A?A.map(L=>e.getAssetPlayer(L.identifier)):[]},get playingIndex(){var _;const A=(_=c())==null?void 0:_.event;return A&&e.effectivePlayingAsset?A.findAssetIndex(e.effectivePlayingAsset):-1},get scheduleItem(){return c()}};this.manager={get events(){var _,A;return((_=e.schedule)==null||(A=_.events)==null?void 0:A.slice(0))||[]},get schedule(){var _,A;return((_=e.schedule)==null||(A=_.items)==null?void 0:A.slice(0))||[]},get interstitialPlayer(){return c()?p:null},get playerQueue(){return e.playerQueue.slice(0)},get bufferingAsset(){return e.bufferingAsset},get bufferingItem(){return t()},get bufferingIndex(){const _=t();return e.findItemIndex(_)},get playingAsset(){return e.effectivePlayingAsset},get playingItem(){return e.effectivePlayingItem},get playingIndex(){const _=e.effectivePlayingItem;return e.findItemIndex(_)},primary:{get bufferedEnd(){return s()},get currentTime(){const _=e.timelinePos;return _>0?_:0},set currentTime(_){h(_,"primary")},get duration(){return l("primary")},get seekableStart(){var _;return((_=e.primaryDetails)==null?void 0:_.fragmentStart)||0}},integrated:{get bufferedEnd(){return n(t(),"integrated",e.bufferingAsset,"bufferedPos","bufferedEnd")},get currentTime(){return n(e.effectivePlayingItem,"integrated",e.effectivePlayingAsset,"timelinePos","currentTime")},set currentTime(_){h(_,"integrated")},get duration(){return l("integrated")},get seekableStart(){var _;return i(((_=e.primaryDetails)==null?void 0:_.fragmentStart)||0,"integrated")}},skip:()=>{const _=e.effectivePlayingItem,A=_==null?void 0:_.event;if(A&&!A.restrictions.skip){const L=e.findItemIndex(_);if(A.appendInPlace){const I=_.playout.start+_.event.duration;h(I+.001,"playout")}else e.advanceAfterAssetEnded(A,L,1/0)}}}}return this.manager}get effectivePlayingItem(){return this.waitingItem||this.playingItem||this.endedItem}get effectivePlayingAsset(){return this.playingAsset||this.endedAsset}get playingLastItem(){var e;const t=this.playingItem,r=(e=this.schedule)==null?void 0:e.items;return!this.playbackStarted||!t||!r?!1:this.findItemIndex(t)===r.length-1}get playbackStarted(){return this.effectivePlayingItem!==null}get currentTime(){var e,t,r;if(this.mediaSelection===null)return;const n=this.waitingItem||this.playingItem;if(this.isInterstitial(n)&&!n.event.appendInPlace)return;let i=this.media;!i&&(e=this.bufferingItem)!=null&&(t=e.event)!=null&&t.appendInPlace&&(i=this.primaryMedia);const s=(r=i)==null?void 0:r.currentTime;if(!(s===void 0||!$(s)))return s}get primaryMedia(){var e;return this.media||((e=this.detachedData)==null?void 0:e.media)||null}isInterstitial(e){return!!(e!=null&&e.event)}retreiveMediaSource(e,t){const r=this.getAssetPlayer(e);r&&this.transferMediaFromPlayer(r,t)}transferMediaFromPlayer(e,t){const r=e.interstitial.appendInPlace,n=e.media;if(r&&n===this.primaryMedia){if(this.bufferingAsset=null,(!t||this.isInterstitial(t)&&!t.event.appendInPlace)&&t&&n){this.detachedData={media:n};return}const i=e.transferMedia();this.log(`transfer MediaSource from ${e} ${_r(i)}`),this.detachedData=i}else t&&n&&(this.shouldPlay||(this.shouldPlay=!n.paused))}transferMediaTo(e,t){var r,n;if(e.media===t)return;let i=null;const s=this.hls,l=e!==s,h=l&&e.interstitial.appendInPlace,c=(r=this.detachedData)==null?void 0:r.mediaSource;let p;if(s.media)h&&(i=s.transferMedia(),this.detachedData=i),p="Primary";else if(c){const L=this.getBufferingPlayer();L?(i=L.transferMedia(),p=`${L}`):p="detached MediaSource"}else p="detached media";if(!i){if(c)i=this.detachedData,this.log(`using detachedData: MediaSource ${_r(i)}`);else if(!this.detachedData||s.media===t){const L=this.playerQueue;L.length>1&&L.forEach(I=>{if(l&&I.interstitial.appendInPlace!==h){const re=I.interstitial;this.clearInterstitial(I.interstitial,null),re.appendInPlace=!1,re.appendInPlace&&this.warn(`Could not change append strategy for queued assets ${re}`)}}),this.hls.detachMedia(),this.detachedData={media:t}}}const _=i&&"mediaSource"in i&&((n=i.mediaSource)==null?void 0:n.readyState)!=="closed",A=_&&i?i:t;if(this.log(`${_?"transfering MediaSource":"attaching media"} to ${l?e:"Primary"} from ${p}`),A===i){const L=l&&e.assetId===this.schedule.assetIdAtEnd;A.overrides={duration:this.schedule.duration,endOfStream:!l||L,cueRemoval:!l}}e.attachMedia(A)}onInterstitialCueEnter(){this.onTimeupdate()}checkStart(){const e=this.schedule,t=e.events;if(!t||this.playbackDisabled||!this.media)return;this.bufferedPos===-1&&(this.bufferedPos=0);const r=this.timelinePos,n=this.effectivePlayingItem;if(r===-1){const i=this.hls.startPosition;if(this.timelinePos=i,t.length&&t[0].cue.pre){const s=e.findEventIndex(t[0].identifier);this.setSchedulePosition(s)}else if(i>=0||!this.primaryLive){const s=this.timelinePos=i>0?i:0,l=e.findItemIndexAtTime(s);this.setSchedulePosition(l)}}else if(n&&!this.playingItem){const i=e.findItemIndex(n);this.setSchedulePosition(i)}}advanceAfterAssetEnded(e,t,r){const n=r+1;if(!e.isAssetPastPlayoutLimit(n)&&!e.assetList[n].error)this.setSchedulePosition(t,n);else{const i=this.schedule.items;if(i){const s=t+1,l=i.length;if(s>=l){this.setSchedulePosition(-1);return}const h=e.resumeTime;this.timelinePos<h&&(this.timelinePos=h,this.checkBuffer()),this.setSchedulePosition(s)}}}setScheduleToAssetAtTime(e,t){const r=this.schedule,n=t.parentIdentifier,i=r.getEvent(n);if(i){const s=r.findEventIndex(n),l=r.findAssetIndex(i,e);this.setSchedulePosition(s,l)}}setSchedulePosition(e,t){const r=this.schedule.items;if(!r||this.playbackDisabled)return;this.log(`setSchedulePosition ${e}, ${t}`);const n=e>=0?r[e]:null,i=this.playingItem,s=this.playingLastItem;if(this.isInterstitial(i)){var l;const c=i.event,p=this.playingAsset,_=p==null?void 0:p.identifier,A=_?this.getAssetPlayer(_):null;if(A&&_&&(!this.eventItemsMatch(i,n)||t!==void 0&&_!==((l=c.assetList)==null?void 0:l[t].identifier))){var h;const L=c.findAssetIndex(p);this.log(`INTERSTITIAL_ASSET_ENDED ${L+1}/${c.assetList.length} ${Bo(p)}`),this.endedAsset=p,this.playingAsset=null,this.hls.trigger(m.INTERSTITIAL_ASSET_ENDED,{asset:p,assetListIndex:L,event:c,schedule:r.slice(0),scheduleIndex:e,player:A}),this.retreiveMediaSource(_,n),A.media&&!((h=this.detachedData)!=null&&h.mediaSource)&&A.detachMedia()}if(!this.eventItemsMatch(i,n)&&(this.endedItem=i,this.playingItem=null,this.log(`INTERSTITIAL_ENDED ${c} ${ws(i)}`),c.hasPlayed=!0,this.hls.trigger(m.INTERSTITIAL_ENDED,{event:c,schedule:r.slice(0),scheduleIndex:e}),c.cue.once)){this.updateSchedule();const L=this.schedule.items;if(n&&L){const I=this.schedule.findItemIndex(n);this.advanceSchedule(I,L,t,i,s)}return}}this.advanceSchedule(e,r,t,i,s)}advanceSchedule(e,t,r,n,i){const s=e>=0?t[e]:null,l=this.primaryMedia,h=this.playerQueue;if(h.length&&h.forEach(c=>{const p=c.interstitial,_=this.schedule.findEventIndex(p.identifier);(_<e||_>e+1)&&this.clearInterstitial(p,s)}),this.isInterstitial(s)){this.timelinePos=Math.min(Math.max(this.timelinePos,s.start),s.end);const c=s.event;r===void 0&&(r=this.schedule.findAssetIndex(c,this.timelinePos));const p=this.waitingItem;this.assetsBuffered(s,l)||this.setBufferingItem(s);let _=this.preloadAssets(c,r);if(this.eventItemsMatch(s,p||n)||(this.waitingItem=s,this.log(`INTERSTITIAL_STARTED ${ws(s)} ${c.appendInPlace?"append in place":""}`),this.hls.trigger(m.INTERSTITIAL_STARTED,{event:c,schedule:t.slice(0),scheduleIndex:e})),!c.assetListLoaded){this.log(`Waiting for ASSET-LIST to complete loading ${c}`);return}if(c.assetListLoader&&(c.assetListLoader.destroy(),c.assetListLoader=void 0),!l){this.log(`Waiting for attachMedia to start Interstitial ${c}`);return}this.waitingItem=this.endedItem=null,this.playingItem=s;const A=c.assetList[r];if(!A){const L=t[e+1],I=this.media;L&&I&&!this.isInterstitial(L)&&I.currentTime<L.start&&(I.currentTime=this.timelinePos=L.start),this.advanceAfterAssetEnded(c,e,r||0);return}if(_||(_=this.getAssetPlayer(A.identifier)),_===null||_.destroyed){const L=c.assetList.length;this.warn(`asset ${r+1}/${L} player destroyed ${c}`),_=this.createAssetPlayer(c,A,r)}if(!this.eventItemsMatch(s,this.bufferingItem)&&c.appendInPlace&&this.isAssetBuffered(A))return;this.startAssetPlayer(_,r,t,e,l),this.shouldPlay&&pl(_.media)}else s!==null?(this.resumePrimary(s,e,n),this.shouldPlay&&pl(this.hls.media)):i&&this.isInterstitial(n)&&(this.endedItem=null,this.playingItem=n,n.event.appendInPlace||this.attachPrimary(this.schedule.durations.primary,null))}get playbackDisabled(){return this.hls.config.enableInterstitialPlayback===!1}get primaryDetails(){var e,t;return(e=this.mediaSelection)==null||(t=e.main)==null?void 0:t.details}get primaryLive(){var e;return!!((e=this.primaryDetails)!=null&&e.live)}resumePrimary(e,t,r){var n;if(this.playingItem=e,this.playingAsset=this.endedAsset=null,this.waitingItem=this.endedItem=null,this.bufferedToItem(e),this.log(`resuming ${ws(e)}`),!((n=this.detachedData)!=null&&n.mediaSource)){let s=this.timelinePos;(s<e.start||s>=e.end)&&(s=this.getPrimaryResumption(e,t),this.timelinePos=s),this.attachPrimary(s,e)}if(!r)return;const i=this.schedule.items;i&&(this.log(`resumed ${ws(e)}`),this.hls.trigger(m.INTERSTITIALS_PRIMARY_RESUMED,{schedule:i.slice(0),scheduleIndex:t}),this.checkBuffer())}getPrimaryResumption(e,t){const r=e.start;if(this.primaryLive){const n=this.primaryDetails;if(t===0)return this.hls.startPosition;if(n&&(r<n.fragmentStart||r>n.edge))return this.hls.liveSyncPosition||-1}return r}isAssetBuffered(e){const t=this.getAssetPlayer(e.identifier);return t!=null&&t.hls?t.hls.bufferedToEnd:pr.bufferInfo(this.primaryMedia,this.timelinePos,0).end+1>=e.timelineStart+(e.duration||0)}attachPrimary(e,t,r){t?this.setBufferingItem(t):this.bufferingItem=this.playingItem,this.bufferingAsset=null;const n=this.primaryMedia;if(!n)return;const i=this.hls;i.media?this.checkBuffer():(this.transferMediaTo(i,n),r&&this.startLoadingPrimaryAt(e,r)),r||(this.timelinePos=e,this.startLoadingPrimaryAt(e,r))}startLoadingPrimaryAt(e,t){var r;const n=this.hls;!n.loadingEnabled||!n.media||Math.abs((((r=n.mainForwardBufferInfo)==null?void 0:r.start)||n.media.currentTime)-e)>.5?n.startLoad(e,t):n.bufferingEnabled||n.resumeBuffering()}onManifestLoading(){this.stopLoad(),this.schedule.reset(),this.emptyPlayerQueue(),this.clearScheduleState(),this.shouldPlay=!1,this.bufferedPos=this.timelinePos=-1,this.mediaSelection=this.altSelection=this.manager=this.requiredTracks=null,this.hls.off(m.BUFFER_CODECS,this.onBufferCodecs,this),this.hls.on(m.BUFFER_CODECS,this.onBufferCodecs,this)}onLevelUpdated(e,t){if(t.level===-1)return;const r=this.hls.levels[t.level],n=S(S({},this.mediaSelection||this.altSelection),{},{main:r});this.mediaSelection=n,this.schedule.parseInterstitialDateRanges(n,this.hls.config.interstitialAppendInPlace),!this.effectivePlayingItem&&this.schedule.items&&this.checkStart()}onAudioTrackUpdated(e,t){const r=this.hls.audioTracks[t.id],n=this.mediaSelection;if(!n){this.altSelection=S(S({},this.altSelection),{},{audio:r});return}const i=S(S({},n),{},{audio:r});this.mediaSelection=i}onSubtitleTrackUpdated(e,t){const r=this.hls.subtitleTracks[t.id],n=this.mediaSelection;if(!n){this.altSelection=S(S({},this.altSelection),{},{subtitles:r});return}const i=S(S({},n),{},{subtitles:r});this.mediaSelection=i}onAudioTrackSwitching(e,t){const r=at(t);this.playerQueue.forEach(n=>n.hls.setAudioOption(t)||n.hls.setAudioOption(r))}onSubtitleTrackSwitch(e,t){const r=at(t);this.playerQueue.forEach(n=>n.hls.setSubtitleOption(t)||t.id!==-1&&n.hls.setSubtitleOption(r))}onBufferCodecs(e,t){const r=t.tracks;r&&(this.requiredTracks=r)}onBufferAppended(e,t){this.checkBuffer()}onBufferFlushed(e,t){const r=this.playingItem;if(r&&!this.itemsMatch(r,this.bufferingItem)&&!this.isInterstitial(r)){const n=this.timelinePos;this.bufferedPos=n,this.checkBuffer()}}onBufferedToEnd(e){const t=this.schedule.events;if(this.bufferedPos<Number.MAX_VALUE&&t){for(let n=0;n<t.length;n++){const i=t[n];if(i.cue.post){var r;const s=this.schedule.findEventIndex(i.identifier),l=(r=this.schedule.items)==null?void 0:r[s];this.isInterstitial(l)&&this.eventItemsMatch(l,this.bufferingItem)&&this.bufferedToItem(l,0);break}}this.bufferedPos=Number.MAX_VALUE}}onMediaEnded(e){const t=this.playingItem;if(!this.playingLastItem&&t){const r=this.findItemIndex(t);this.setSchedulePosition(r+1)}else this.shouldPlay=!1}updateItem(e,t){const r=this.schedule.items;if(e&&r){const n=this.findItemIndex(e,t);return r[n]||null}return null}itemsMatch(e,t){return!!t&&(e===t||e.event&&t.event&&this.eventItemsMatch(e,t)||!e.event&&!t.event&&this.findItemIndex(e)===this.findItemIndex(t))}eventItemsMatch(e,t){var r;return!!t&&(e===t||e.event.identifier===((r=t.event)==null?void 0:r.identifier))}findItemIndex(e,t){return e?this.schedule.findItemIndex(e,t):-1}updateSchedule(){const e=this.mediaSelection;e&&this.schedule.updateSchedule(e,[])}checkBuffer(e){const t=this.schedule.items;if(!t)return;const r=pr.bufferInfo(this.primaryMedia,this.timelinePos,0);e&&(this.bufferedPos=this.timelinePos),e||(e=r.len<1),this.updateBufferedPos(r.end,t,e)}updateBufferedPos(e,t,r){const n=this.schedule,i=this.bufferingItem;if(this.bufferedPos>e)return;if(t.length===1&&this.itemsMatch(t[0],i)){this.bufferedPos=e;return}const s=this.playingItem,l=this.findItemIndex(s);let h=n.findItemIndexAtTime(e);if(this.bufferedPos<e){var c,p;const _=this.findItemIndex(i),A=Math.min(_+1,t.length-1),L=t[A];if((h===-1&&i&&e>=i.end||(c=L.event)!=null&&c.appendInPlace&&e+.01>=L.start)&&(h=A),A-l>1&&(i==null||(p=i.event)==null?void 0:p.appendInPlace)===!1)return;if(this.bufferedPos=e,h>_&&h>l)this.bufferedToItem(L);else{const I=this.primaryDetails;this.primaryLive&&I&&e>I.edge-I.targetduration&&L.start<I.edge+this.hls.config.interstitialLiveLookAhead&&this.isInterstitial(L)&&this.preloadAssets(L.event,0)}}else r&&s&&!this.itemsMatch(s,i)&&(h===l?this.bufferedToItem(s):h===l+1&&this.bufferedToItem(t[h]))}assetsBuffered(e,t){return e.event.assetList.length===0?!1:!e.event.assetList.some(n=>{const i=this.getAssetPlayer(n.identifier);return!(i!=null&&i.bufferedInPlaceToEnd(t))})}setBufferingItem(e){const t=this.bufferingItem,r=this.schedule;if(this.itemsMatch(e,t))this.bufferingItem!==e&&(this.bufferingItem=e);else{const{items:n,events:i}=r;if(!n||!i)return t;const s=this.isInterstitial(e),l=this.getBufferingPlayer();if(this.bufferingItem=e,this.bufferedPos=Math.max(e.start,Math.min(e.end,this.timelinePos)),!this.playbackDisabled){const h=l?l.remaining:t?t.end-this.timelinePos:0;this.log(`buffered to boundary ${ws(e)}`+(t?` (${h.toFixed(2)} remaining)`:"")),s?e.event.assetList.forEach(c=>{const p=this.getAssetPlayer(c.identifier);p&&p.resumeBuffering()}):(this.hls.resumeBuffering(),this.playerQueue.forEach(c=>c.pauseBuffering()))}this.hls.trigger(m.INTERSTITIALS_BUFFERED_TO_BOUNDARY,{events:i.slice(0),schedule:n.slice(0),bufferingIndex:this.findItemIndex(e),playingIndex:this.findItemIndex(this.playingItem)})}return t}bufferedToItem(e,t=0){const r=this.setBufferingItem(e);if(!this.playbackDisabled){if(this.isInterstitial(e))this.bufferedToEvent(e,t);else if(r!==null){this.bufferingAsset=null;const n=this.detachedData;n?n.mediaSource?this.attachPrimary(e.start,e,!0):this.preloadPrimary(e):this.preloadPrimary(e)}}}preloadPrimary(e){const t=this.findItemIndex(e),r=this.getPrimaryResumption(e,t);this.startLoadingPrimaryAt(r)}bufferedToEvent(e,t){const r=e.event,n=r.assetList.length===0&&!r.assetListLoader,i=r.cue.once;if(n||!i){const s=this.preloadAssets(r,t);if(s!=null&&s.interstitial.appendInPlace){const l=r.assetList[t],h=this.primaryMedia;l&&h&&this.bufferAssetPlayer(s,h)}}}preloadAssets(e,t){const r=e.assetUrl,n=e.assetList.length,i=n===0&&!e.assetListLoader,s=e.cue.once;if(i){const h=e.timelineStart;if(e.appendInPlace){var l;const A=this.playingItem;!this.isInterstitial(A)&&(A==null||(l=A.nextEvent)==null?void 0:l.identifier)===e.identifier&&this.flushFrontBuffer(h+.25)}let c,p=0;if(!this.playingItem&&this.primaryLive&&(p=this.hls.startPosition,p===-1&&(p=this.hls.liveSyncPosition||0)),p&&!(e.cue.pre||e.cue.post)){const A=p-h;A>0&&(c=Math.round(A*1e3)/1e3)}if(this.log(`Load interstitial asset ${t+1}/${r?1:n} ${e}${c?` live-start: ${p} start-offset: ${c}`:""}`),r)return this.createAsset(e,0,0,h,e.duration,r);const _=this.assetListLoader.loadAssetList(e,c);_&&(e.assetListLoader=_)}else if(!s&&n){for(let h=t;h<n;h++){const c=e.assetList[h],p=this.getAssetPlayerQueueIndex(c.identifier);(p===-1||this.playerQueue[p].destroyed)&&!c.error&&this.createAssetPlayer(e,c,h)}return this.getAssetPlayer(e.assetList[t].identifier)}return null}flushFrontBuffer(e){const t=this.requiredTracks;if(!t)return;this.log(`Removing front buffer starting at ${e}`),Object.keys(t).forEach(n=>{this.hls.trigger(m.BUFFER_FLUSHING,{startOffset:e,endOffset:1/0,type:n})})}getAssetPlayerQueueIndex(e){const t=this.playerQueue;for(let r=0;r<t.length;r++)if(e===t[r].assetId)return r;return-1}getAssetPlayer(e){const t=this.getAssetPlayerQueueIndex(e);return this.playerQueue[t]||null}getBufferingPlayer(){const{playerQueue:e,primaryMedia:t}=this;if(t){for(let r=0;r<e.length;r++)if(e[r].media===t)return e[r]}return null}createAsset(e,t,r,n,i,s){const l={parentIdentifier:e.identifier,identifier:zu(e,s,t),duration:i,startOffset:r,timelineStart:n,uri:s};return this.createAssetPlayer(e,l,t)}createAssetPlayer(e,t,r){this.log(`create HLSAssetPlayer for ${Bo(t)}`);const n=this.hls,i=n.userConfig;let s=i.videoPreference;const l=n.loadLevelObj||n.levels[n.currentLevel];(s||l)&&(s=E({},s),l.videoCodec&&(s.videoCodec=l.videoCodec),l.videoRange&&(s.allowedVideoRanges=[l.videoRange]));const h=n.audioTracks[n.audioTrack],c=n.subtitleTracks[n.subtitleTrack];let p=0;if(this.primaryLive||e.appendInPlace){const He=this.timelinePos-t.timelineStart;if(He>1){const ct=t.duration;ct&&He<ct&&(p=He)}}const _=t.identifier,A=S(S({},i),{},{autoStartLoad:!0,startFragPrefetch:!0,primarySessionId:n.sessionId,assetPlayerId:_,abrEwmaDefaultEstimate:n.bandwidthEstimate,interstitialsController:void 0,startPosition:p,liveDurationInfinity:!1,testBandwidth:!1,videoPreference:s,audioPreference:h||i.audioPreference,subtitlePreference:c||i.subtitlePreference});e.appendInPlace&&(e.appendInPlaceStarted=!0,t.timelineStart&&(A.timelineOffset=t.timelineStart));const L=A.cmcd;L!=null&&L.sessionId&&L.contentId&&(A.cmcd=E({},L,{contentId:Ca(t.uri)})),this.getAssetPlayer(_)&&this.warn(`Duplicate date range identifier ${e} and asset ${_}`);const I=new ju(this.HlsPlayerClass,A,e,t);this.playerQueue.push(I),e.assetList[r]=t;const re=He=>{if(He.live){const Tt=new Error(`Interstitials MUST be VOD assets ${e}`),dt={fatal:!0,type:_e.OTHER_ERROR,details:O.INTERSTITIAL_ASSET_ITEM_ERROR,error:Tt};this.handleAssetItemError(dt,e,this.schedule.findEventIndex(e.identifier),r,Tt.message);return}const ct=He.edge-He.fragmentStart,ht=t.duration;(ht===null||ct>ht)&&(this.log(`Interstitial asset "${_}" duration change ${ht} > ${ct}`),t.duration=ct,this.updateSchedule())};I.on(m.LEVEL_UPDATED,(He,{details:ct})=>re(ct)),I.on(m.LEVEL_PTS_UPDATED,(He,{details:ct})=>re(ct));const ce=(He,ct)=>{const ht=this.getAssetPlayer(_);if(ht&&ct.tracks){ht.off(m.BUFFER_CODECS,ce),ht.tracks=ct.tracks;const Tt=this.primaryMedia;this.bufferingAsset===ht.assetItem&&Tt&&!ht.media&&this.bufferAssetPlayer(ht,Tt)}};I.on(m.BUFFER_CODECS,ce);const ke=()=>{var He;const ct=this.getAssetPlayer(_);if(this.log(`buffered to end of asset ${ct}`),!ct)return;const ht=this.schedule.findEventIndex(e.identifier),Tt=e.findAssetIndex(t),dt=Tt+1,xt=(He=this.schedule.items)==null?void 0:He[ht];if(this.isInterstitial(xt))if(Tt!==-1&&!e.isAssetPastPlayoutLimit(dt)&&!e.assetList[dt].error)this.bufferedToItem(xt,dt);else{var It;const pt=(It=this.schedule.items)==null?void 0:It[ht+1];pt&&this.bufferedToItem(pt)}};I.on(m.BUFFERED_TO_END,ke);const We=He=>()=>{if(!this.getAssetPlayer(_))return;this.shouldPlay=!0;const ht=this.schedule.findEventIndex(e.identifier);this.advanceAfterAssetEnded(e,ht,He)};return I.once(m.MEDIA_ENDED,We(r)),I.once(m.PLAYOUT_LIMIT_REACHED,We(1/0)),I.on(m.ERROR,(He,ct)=>{const ht=this.getAssetPlayer(_);if(ct.details===O.BUFFER_STALLED_ERROR){if(ht!=null&&ht.media){const Tt=ht.currentTime,dt=ht.duration-Tt;Tt&&e.appendInPlace&&dt/ht.media.playbackRate<.5?(this.log(`Advancing buffer past end of asset ${_} ${e} at ${ht.media.currentTime}`),ke()):(this.warn(`Stalled at ${Tt} of ${Tt+dt} in asset ${_} ${e}`),this.onTimeupdate(),this.checkBuffer(!0))}return}this.handleAssetItemError(ct,e,this.schedule.findEventIndex(e.identifier),r,`Asset player error ${ct.error} ${e}`)}),I.on(m.DESTROYING,()=>{if(!this.getAssetPlayer(_))return;const ct=new Error(`Asset player destroyed unexpectedly ${_}`),ht={fatal:!0,type:_e.OTHER_ERROR,details:O.INTERSTITIAL_ASSET_ITEM_ERROR,error:ct};this.handleAssetItemError(ht,e,this.schedule.findEventIndex(e.identifier),r,ct.message)}),this.hls.trigger(m.INTERSTITIAL_ASSET_PLAYER_CREATED,{asset:t,assetListIndex:r,event:e,player:I}),I}clearInterstitial(e,t){e.assetList.forEach(r=>{this.clearAssetPlayer(r.identifier,t)}),e.reset()}clearAssetPlayer(e,t){const r=this.getAssetPlayerQueueIndex(e);if(r!==-1){this.log(`clearAssetPlayer "${e}" toSegment: ${t&&ws(t)}`);const n=this.playerQueue[r];this.transferMediaFromPlayer(n,t),this.playerQueue.splice(r,1),n.destroy()}}emptyPlayerQueue(){let e;for(;e=this.playerQueue.pop();)e.destroy();this.playerQueue=[]}startAssetPlayer(e,t,r,n,i){const{interstitial:s,assetItem:l,assetId:h}=e,c=s.assetList.length,p=this.playingAsset;this.endedAsset=null,this.playingAsset=l,(!p||p.identifier!==h)&&(p&&(this.clearAssetPlayer(p.identifier,r[n]),delete p.error),this.log(`INTERSTITIAL_ASSET_STARTED ${t+1}/${c} ${e}`),this.hls.trigger(m.INTERSTITIAL_ASSET_STARTED,{asset:l,assetListIndex:t,event:s,schedule:r.slice(0),scheduleIndex:n,player:e})),this.bufferAssetPlayer(e,i)}bufferAssetPlayer(e,t){var r,n;const{interstitial:i,assetItem:s,assetId:l}=e,h=this.schedule.findEventIndex(i.identifier),c=(r=this.schedule.items)==null?void 0:r[h];if(!c)return;this.setBufferingItem(c),this.bufferingAsset=s;const p=this.getBufferingPlayer();if(p===e)return;const _=i.appendInPlace;if(_&&(p==null?void 0:p.interstitial.appendInPlace)===!1)return;const A=(p==null?void 0:p.tracks)||((n=this.detachedData)==null?void 0:n.tracks)||this.requiredTracks;if(_&&s!==this.playingAsset){if(!e.tracks)return;if(A&&!ve(A,e.tracks)){const L=new Error(`Asset "${l}" SourceBuffer tracks ('${Object.keys(e.tracks)}') are not compatible with primary content tracks ('${Object.keys(A)}')`),I={fatal:!0,type:_e.OTHER_ERROR,details:O.INTERSTITIAL_ASSET_ITEM_ERROR,error:L},re=i.findAssetIndex(s);this.handleAssetItemError(I,i,h,re,L.message);return}}this.transferMediaTo(e,t)}handleAssetItemError(e,t,r,n,i){if(e.details===O.BUFFER_STALLED_ERROR)return;const s=t.assetList[n]||null;let l=null;if(s){const _=this.getAssetPlayerQueueIndex(s.identifier);l=this.playerQueue[_]||null}const h=this.schedule.items,c=E({},e,{fatal:!1,errorAction:Jt(!0),asset:s,assetListIndex:n,event:t,schedule:h,scheduleIndex:r,player:l});if(this.warn(`Asset item error: ${e.error}`),this.hls.trigger(m.INTERSTITIAL_ASSET_ERROR,c),!e.fatal)return;const p=new Error(i);s&&(this.playingAsset!==s&&this.clearAssetPlayer(s.identifier,null),s.error=p),t.assetList.some(_=>!_.error)?t.appendInPlace&&(t.error=p):t.error=p,this.primaryFallback(t)}primaryFallback(e){const t=e.timelineStart,r=this.effectivePlayingItem;if(this.updateSchedule(),r){this.log(`Fallback to primary from event "${e.identifier}" start: ${t} pos: ${this.timelinePos} playing: ${r?ws(r):"<none>"} error: ${e.error}`),e.appendInPlace&&(this.attachPrimary(t,null),this.flushFrontBuffer(t));let n=this.timelinePos;n===-1&&(n=this.hls.startPosition);const i=this.updateItem(r,n);if(this.itemsMatch(r,i))this.clearInterstitial(e,null);else{const s=this.schedule.findItemIndexAtTime(n);this.setSchedulePosition(s)}}else this.checkStart()}onAssetListLoaded(e,t){var r;const n=t.event,i=n.identifier,s=t.assetListResponse.ASSETS;if(!this.schedule.hasEvent(i))return;const l=n.timelineStart,h=n.duration;let c=0;s.forEach((I,re)=>{const ce=parseFloat(I.DURATION);this.createAsset(n,re,c,l+c,ce,I.URI),c+=ce}),n.duration=c,this.log(`Loaded asset-list with duration: ${c} (was: ${h}) ${n}`);const p=this.waitingItem,_=(p==null?void 0:p.event.identifier)===i;this.updateSchedule();const A=(r=this.bufferingItem)==null?void 0:r.event;if(_){var L;const I=this.schedule.findEventIndex(i),re=(L=this.schedule.items)==null?void 0:L[I];if(re){if(!this.playingItem&&this.timelinePos>re.end&&this.schedule.findItemIndexAtTime(this.timelinePos)!==I){n.error=new Error(`Interstitial no longer within playback range ${this.timelinePos} ${n}`),this.primaryFallback(n);return}this.setBufferingItem(re)}this.setSchedulePosition(I)}else if((A==null?void 0:A.identifier)===i&&A.appendInPlace){const I=n.assetList[0],re=this.getAssetPlayer(I.identifier),ce=this.primaryMedia;I&&re&&ce&&this.bufferAssetPlayer(re,ce)}}onError(e,t){switch(t.details){case O.ASSET_LIST_PARSING_ERROR:case O.ASSET_LIST_LOAD_ERROR:case O.ASSET_LIST_LOAD_TIMEOUT:{const r=t.interstitial;r&&this.primaryFallback(r);break}case O.BUFFER_STALLED_ERROR:{this.onTimeupdate(),this.checkBuffer(!0);break}}}}const ml=500;class Zu extends es{constructor(e,t,r){super(e,t,r,"subtitle-stream-controller",ie.SUBTITLE),this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(m.LEVEL_LOADED,this.onLevelLoaded,this),e.on(m.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(m.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(m.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(m.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(m.LEVEL_LOADED,this.onLevelLoaded,this),e.off(m.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(m.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(m.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(m.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this)}startLoad(e,t){this.stopLoad(),this.state=Rt.IDLE,this.setInterval(ml),this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}onManifestLoading(){super.onManifestLoading(),this.mainDetails=null}onMediaDetaching(e,t){this.tracksBuffered=[],super.onMediaDetaching(e,t)}onLevelLoaded(e,t){this.mainDetails=t.details}onSubtitleFragProcessed(e,t){const{frag:r,success:n}=t;if(te(r)&&(this.fragPrevious=r),this.state=Rt.IDLE,!n)return;const i=this.tracksBuffered[this.currentTrackId];if(!i)return;let s;const l=r.start;for(let c=0;c<i.length;c++)if(l>=i[c].start&&l<=i[c].end){s=i[c];break}const h=r.start+r.duration;s?s.end=h:(s={start:l,end:h},i.push(s)),this.fragmentTracker.fragBuffered(r),this.fragBufferedComplete(r,null),this.media&&this.tick()}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 l=0;l<s.length;){if(s[l].end<=i){s.shift();continue}else if(s[l].start<i)s[l].start=i;else break;l++}}),this.fragmentTracker.removeFragmentsInRange(r,i,ie.SUBTITLE)}}onError(e,t){const r=t.frag;(r==null?void 0:r.type)===ie.SUBTITLE&&(t.details===O.FRAG_GAP&&this.fragmentTracker.fragBuffered(r,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==Rt.STOPPED&&(this.state=Rt.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&qo(this.levels,t)){this.levels=t.map(r=>new zr(r));return}this.tracksBuffered=[],this.levels=t.map(r=>{const n=new zr(r);return this.tracksBuffered[n.id]=[],n}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,ie.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.state!==Rt.STOPPED&&this.setInterval(ml)}onSubtitleTrackLoaded(e,t){var r;const{currentTrackId:n,levels:i}=this,{details:s,id:l}=t;if(!i){this.warn(`Subtitle tracks were reset while loading level ${l}`);return}const h=i[l];if(l>=i.length||!h)return;this.log(`Subtitle track ${l} loaded [${s.startSN},${s.endSN}]${s.lastPartSn?`[part-${s.lastPartSn}-${s.lastPartIndex}]`:""},duration:${s.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let c=0;if(s.live||(r=h.details)!=null&&r.live){const _=this.mainDetails;if(s.deltaUpdateFailed||!_)return;const A=_.fragments[0];if(!h.details)s.hasProgramDateTime&&_.hasProgramDateTime?(Qn(s,_),c=s.fragmentStart):A&&(c=A.start,ds(s,c));else{var p;c=this.alignPlaylists(s,h.details,(p=this.levelLastLoaded)==null?void 0:p.details),c===0&&A&&(c=A.start,ds(s,c))}}h.details=s,this.levelLastLoaded=h,l===n&&(this.hls.trigger(m.SUBTITLE_TRACK_UPDATED,{details:s,id:l,groupId:t.groupId}),this.tick(),s.live&&!this.fragCurrent&&this.media&&this.state===Rt.IDLE&&(nr(null,s.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),h.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&&An(n.method)){const s=performance.now();this.decrypter.decrypt(new Uint8Array(r),n.key.buffer,n.iv.buffer,yn(n.method)).catch(l=>{throw i.trigger(m.ERROR,{type:_e.MEDIA_ERROR,details:O.FRAG_DECRYPT_ERROR,fatal:!1,error:l,reason:l.message,frag:t}),l}).then(l=>{const h=performance.now();i.trigger(m.FRAG_DECRYPTED,{frag:t,payload:l,stats:{tstart:s,tdecrypt:h}})}).catch(l=>{this.warn(`${l.name}: ${l.message}`),this.state=Rt.IDLE})}}doTick(){if(!this.media){this.state=Rt.IDLE;return}if(this.state===Rt.IDLE){const{currentTrackId:e,levels:t}=this,r=t==null?void 0:t[e];if(!r||!t.length||!r.details||this.waitForLive(r))return;const{config:n}=this,i=this.getLoadPosition(),s=pr.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],i,n.maxBufferHole),{end:l,len:h}=s,c=r.details,p=this.hls.maxBufferLength+c.levelTargetDuration;if(h>p)return;const _=c.fragments,A=_.length,L=c.edge;let I=null;const re=this.fragPrevious;if(l<L){const We=n.maxFragLookUpTolerance,He=l>L-We?0:We;I=nr(re,_,Math.max(_[0].start,l),He),!I&&re&&re.start<_[0].start&&(I=_[0])}else I=_[A-1];if(I=this.filterReplacedPrimary(I,r.details),!I)return;const ce=I.sn-c.startSN,ke=_[ce-1];if(ke&&ke.cc===I.cc&&this.fragmentTracker.getState(ke)===yr.NOT_LOADED&&(I=ke),this.fragmentTracker.getState(I)===yr.NOT_LOADED){const We=this.mapToInitFragWhenRequired(I);We&&this.loadFragment(We,r,l)}}}loadFragment(e,t,r){te(e)?super.loadFragment(e,t,r):this._loadInitSegment(e,t)}get mediaBufferTimeRanges(){return new Yu(this.tracksBuffered[this.currentTrackId]||[])}}class Yu{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)}}}}const Xu={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},gl=a=>String.fromCharCode(Xu[a]||a),Gi=15,is=100,qu={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Qu={17:2,18:4,21:6,22:8,23:10,19:13,20:15},Ju={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},e0={25:2,26:4,29:6,30:8,31:10,27:13,28:15},t0=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class r0{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const r=typeof t=="function"?t():t;J.log(`${this.time} [${e}] ${r}`)}}}const $s=function(e){const t=[];for(let r=0;r<e.length;r++)t.push(e[r].toString(16));return t};class vl{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 n0{constructor(){this.uchar=" ",this.penState=new vl}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 i0{constructor(e){this.chars=[],this.pos=0,this.currPenState=new vl,this.cueStartTime=null,this.logger=void 0;for(let t=0;t<is;t++)this.chars.push(new n0);this.logger=e}equals(e){for(let t=0;t<is;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<is;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<is;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>is&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=is)}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=gl(e);if(this.pos>=is){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<is;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<is;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 No{constructor(e){this.rows=[],this.currRow=Gi-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<Gi;t++)this.rows.push(new i0(e));this.logger=e}reset(){for(let e=0;e<Gi;e++)this.rows[e].clear();this.currRow=Gi-1}equals(e){let t=!0;for(let r=0;r<Gi;r++)if(!this.rows[r].equals(e.rows[r])){t=!1;break}return t}copy(e){for(let t=0;t<Gi;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<Gi;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 = "+_r(e));let t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(let l=0;l<Gi;l++)this.rows[l].clear();const i=this.currRow+1-this.nrRollUpRows,s=this.lastOutputScreen;if(s){const l=s.rows[i].cueStartTime,h=this.logger.time;if(l!==null&&h!==null&&l<h)for(let c=0;c<this.nrRollUpRows;c++)this.rows[t-this.nrRollUpRows+c+1].copy(s.rows[i+c])}}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 = "+_r(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<Gi;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 _l{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 No(r),this.nonDisplayedMemory=new No(r),this.lastOutputScreen=new No(r),this.currRollUpRow=this.displayedMemory.rows[Gi-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[Gi-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: "+_r(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 yl{constructor(e,t,r){this.channels=void 0,this.currentChannel=0,this.cmdHistory=a0(),this.logger=void 0;const n=this.logger=new r0;this.channels=[null,new _l(e,t,n),new _l(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,l=null;if(n===0&&i===0)continue;this.logger.log(3,()=>"["+$s([t[r],t[r+1]])+"] -> ("+$s([n,i])+")");const h=this.cmdHistory;if(n>=16&&n<=31){if(s0(n,i,h)){ao(null,null,h),this.logger.log(3,()=>"Repeated command ("+$s([n,i])+") is dropped");continue}ao(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 ao(null,null,h);if(!s&&(l=this.parseChars(n,i),l)){const p=this.currentChannel;p&&p>0?this.channels[p].insertChars(l):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!s&&!l&&this.logger.log(2,()=>"Couldn't parse cleaned data "+$s([n,i])+" orig: "+$s([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 ("+$s([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?qu[e]:Ju[e]:r=s===1?Qu[e]:e0[e];const l=this.channels[s];return l?(l.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 '"+gl(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 = "+$s(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=t0[i],t%2===1&&(s.background=s.background+"_semi")):t===45?s.background="transparent":(s.foreground="black",t===47&&(s.underline=!0));const l=e<=23?1:2;return this.channels[l].setBkgData(s),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}ao(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 ao(a,e,t){t.a=a,t.b=e}function s0(a,e,t){return t.a===a&&t.b===e}function a0(){return{a:null,b:null}}var Fo=function(){if($n!=null&&$n.VTTCue)return self.VTTCue;const a=["","lr","rl"],e=["start","middle","end","left","right"];function t(l,h){if(typeof h!="string"||!Array.isArray(l))return!1;const c=h.toLowerCase();return~l.indexOf(c)?c:!1}function r(l){return t(a,l)}function n(l){return t(e,l)}function i(l,...h){let c=1;for(;c<arguments.length;c++){const p=arguments[c];for(const _ in p)l[_]=p[_]}return l}function s(l,h,c){const p=this,_={enumerable:!0};p.hasBeenReset=!1;let A="",L=!1,I=l,re=h,ce=c,ke=null,We="",He=!0,ct="auto",ht="start",Tt=50,dt="middle",xt=50,It="middle";Object.defineProperty(p,"id",i({},_,{get:function(){return A},set:function(pt){A=""+pt}})),Object.defineProperty(p,"pauseOnExit",i({},_,{get:function(){return L},set:function(pt){L=!!pt}})),Object.defineProperty(p,"startTime",i({},_,{get:function(){return I},set:function(pt){if(typeof pt!="number")throw new TypeError("Start time must be set to a number.");I=pt,this.hasBeenReset=!0}})),Object.defineProperty(p,"endTime",i({},_,{get:function(){return re},set:function(pt){if(typeof pt!="number")throw new TypeError("End time must be set to a number.");re=pt,this.hasBeenReset=!0}})),Object.defineProperty(p,"text",i({},_,{get:function(){return ce},set:function(pt){ce=""+pt,this.hasBeenReset=!0}})),Object.defineProperty(p,"region",i({},_,{get:function(){return ke},set:function(pt){ke=pt,this.hasBeenReset=!0}})),Object.defineProperty(p,"vertical",i({},_,{get:function(){return We},set:function(pt){const Ht=r(pt);if(Ht===!1)throw new SyntaxError("An invalid or illegal string was specified.");We=Ht,this.hasBeenReset=!0}})),Object.defineProperty(p,"snapToLines",i({},_,{get:function(){return He},set:function(pt){He=!!pt,this.hasBeenReset=!0}})),Object.defineProperty(p,"line",i({},_,{get:function(){return ct},set:function(pt){if(typeof pt!="number"&&pt!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");ct=pt,this.hasBeenReset=!0}})),Object.defineProperty(p,"lineAlign",i({},_,{get:function(){return ht},set:function(pt){const Ht=n(pt);if(!Ht)throw new SyntaxError("An invalid or illegal string was specified.");ht=Ht,this.hasBeenReset=!0}})),Object.defineProperty(p,"position",i({},_,{get:function(){return Tt},set:function(pt){if(pt<0||pt>100)throw new Error("Position must be between 0 and 100.");Tt=pt,this.hasBeenReset=!0}})),Object.defineProperty(p,"positionAlign",i({},_,{get:function(){return dt},set:function(pt){const Ht=n(pt);if(!Ht)throw new SyntaxError("An invalid or illegal string was specified.");dt=Ht,this.hasBeenReset=!0}})),Object.defineProperty(p,"size",i({},_,{get:function(){return xt},set:function(pt){if(pt<0||pt>100)throw new Error("Size must be between 0 and 100.");xt=pt,this.hasBeenReset=!0}})),Object.defineProperty(p,"align",i({},_,{get:function(){return It},set:function(pt){const Ht=n(pt);if(!Ht)throw new SyntaxError("An invalid or illegal string was specified.");It=Ht,this.hasBeenReset=!0}})),p.displayState=void 0}return s.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},s}();class o0{decode(e,t){if(!e)return"";if(typeof e!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function bl(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 l0{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 xl(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 l=s[0],h=s[1];e(l,h)}}const $o=new Fo(0,0,""),oo=$o.align==="middle"?"middle":"center";function u0(a,e,t){const r=a;function n(){const l=bl(a);if(l===null)throw new Error("Malformed timestamp: "+r);return a=a.replace(/^[^\sa-zA-Z-]+/,""),l}function i(l,h){const c=new l0;xl(l,function(A,L){let I;switch(A){case"region":for(let re=t.length-1;re>=0;re--)if(t[re].id===L){c.set(A,t[re].region);break}break;case"vertical":c.alt(A,L,["rl","lr"]);break;case"line":I=L.split(","),c.integer(A,I[0]),c.percent(A,I[0])&&c.set("snapToLines",!1),c.alt(A,I[0],["auto"]),I.length===2&&c.alt("lineAlign",I[1],["start",oo,"end"]);break;case"position":I=L.split(","),c.percent(A,I[0]),I.length===2&&c.alt("positionAlign",I[1],["start",oo,"end","line-left","line-right","auto"]);break;case"size":c.percent(A,L);break;case"align":c.alt(A,L,["start",oo,"end","left","right"]);break}},/:/,/\s/),h.region=c.get("region",null),h.vertical=c.get("vertical","");let p=c.get("line","auto");p==="auto"&&$o.line===-1&&(p=-1),h.line=p,h.lineAlign=c.get("lineAlign","start"),h.snapToLines=c.get("snapToLines",!0),h.size=c.get("size",100),h.align=c.get("align",oo);let _=c.get("position","auto");_==="auto"&&$o.position===50&&(_=h.align==="start"||h.align==="left"?0:h.align==="end"||h.align==="right"?100:50),h.position=_}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 El(a){return a.replace(/<br(?: \/)?>/gi,`
|
|
`)}class c0{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new o0,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=El(i);s<i.length&&i[s]!=="\r"&&i[s]!==`
|
|
`;)++s;const l=i.slice(0,s);return i[s]==="\r"&&++s,i[s]===`
|
|
`&&++s,t.buffer=i.slice(s),l}function n(i){xl(i,function(s,l){},/:/)}try{let i="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;i=r();const l=i.match(/^()?WEBVTT([ \t].*)?$/);if(!(l!=null&&l[0]))throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let s=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(s?s=!1:i=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 Fo(0,0,""),t.state="CUE",i.indexOf("-->")===-1){t.cue.id=i;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{u0(i,t.cue,t.regionList)}catch(l){t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const l=i.indexOf("-->")!==-1;if(!i||l&&(s=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(t.cue===null)continue;t.cue.text&&(t.cue.text+=`
|
|
`),t.cue.text+=i}continue;case"BADCUE":i||(t.state="ID")}}}catch(i){t.state==="CUETEXT"&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=t.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this}flush(){const e=this;try{if((e.cue||e.state==="HEADER")&&(e.buffer+=`
|
|
|
|
`,e.parse()),e.state==="INITIAL"||e.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this}}const h0=/\r\n|\n\r|\n|\r/g,Uo=function(e,t,r=0){return e.slice(r,r+t.length)===t},d0=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(!$(t)||!$(r)||!$(n)||!$(i))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*r,t+=60*1e3*n,t+=60*60*1e3*i,t};function zo(a,e,t){return Ca(a.toString())+Ca(e.toString())+Ca(t)}const f0=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 p0(a,e,t,r,n,i,s){const l=new c0,h=Ae(new Uint8Array(a)).trim().replace(h0,`
|
|
`).split(`
|
|
`),c=[],p=e?Dn(e.baseTime,e.timescale):0;let _="00:00.000",A=0,L=0,I,re=!0;l.oncue=function(ce){const ke=t[r];let We=t.ccOffset;const He=(A-p)/9e4;if(ke!=null&&ke.new&&(L!==void 0?We=t.ccOffset=ke.start:f0(t,r,He)),He){if(!e){I=new Error("Missing initPTS for VTT MPEGTS");return}We=He-t.presentationOffset}const ct=ce.endTime-ce.startTime,ht=Xn((ce.startTime+We-L)*9e4,n*9e4)/9e4;ce.startTime=Math.max(ht,0),ce.endTime=Math.max(ht+ct,0);const Tt=ce.text.trim();ce.text=decodeURIComponent(encodeURIComponent(Tt)),ce.id||(ce.id=zo(ce.startTime,ce.endTime,Tt)),ce.endTime>0&&c.push(ce)},l.onparsingerror=function(ce){I=ce},l.onflush=function(){if(I){s(I);return}i(c)},h.forEach(ce=>{if(re)if(Uo(ce,"X-TIMESTAMP-MAP=")){re=!1,ce.slice(16).split(",").forEach(ke=>{Uo(ke,"LOCAL:")?_=ke.slice(6):Uo(ke,"MPEGTS:")&&(A=parseInt(ke.slice(7)))});try{L=d0(_)/1e3}catch(ke){I=ke}return}else ce===""&&(re=!1);l.parse(ce+`
|
|
`)}),l.flush()}const Go="stpp.ttml.im1t",Sl=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,wl=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,m0={left:"start",center:"center",right:"end",start:"start",end:"end"};function Tl(a,e,t,r){const n=he(new Uint8Array(a),["mdat"]);if(n.length===0){r(new Error("Could not parse IMSC1 mdat"));return}const i=n.map(l=>Ae(l)),s=$r(e.baseTime,1,e.timescale);try{i.forEach(l=>t(g0(l,s)))}catch(l){r(l)}}function g0(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((_,A)=>(_[A]=n.getAttribute(`ttp:${A}`)||i[A],_),{}),l=n.getAttribute("xml:space")!=="preserve",h=Al(Ho(n,"styling","style")),c=Al(Ho(n,"layout","region")),p=Ho(n,"body","[begin]");return[].map.call(p,_=>{const A=Cl(_,l);if(!A||!_.hasAttribute("begin"))return null;const L=Ko(_.getAttribute("begin"),s),I=Ko(_.getAttribute("dur"),s);let re=Ko(_.getAttribute("end"),s);if(L===null)throw Dl(_);if(re===null){if(I===null)throw Dl(_);re=L+I}const ce=new Fo(L-e,re-e,A);ce.id=zo(ce.startTime,ce.endTime,ce.text);const ke=c[_.getAttribute("region")],We=h[_.getAttribute("style")],He=v0(ke,We,h),{textAlign:ct}=He;if(ct){const ht=m0[ct];ht&&(ce.lineAlign=ht),ce.align=ct}return E(ce,He),ce}).filter(_=>_!==null)}function Ho(a,e,t){const r=a.getElementsByTagName(e)[0];return r?[].slice.call(r.querySelectorAll(t)):[]}function Al(a){return a.reduce((e,t)=>{const r=t.getAttribute("xml:id");return r&&(e[r]=t),e},{})}function Cl(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?Cl(r,e):e?t+r.textContent.trim().replace(/\s+/g," "):t+r.textContent},"")}function v0(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((l,h)=>{const c=jo(e,r,h)||jo(a,r,h)||jo(n,r,h);return c&&(l[h]=c),l},{})}function jo(a,e,t){return a&&a.hasAttributeNS(e,t)?a.getAttributeNS(e,t):null}function Dl(a){return new Error(`Could not parse ttml timestamp ${a}`)}function Ko(a,e){if(!a)return null;let t=bl(a);return t===null&&(Sl.test(a)?t=_0(a,e):wl.test(a)&&(t=y0(a,e))),t}function _0(a,e){const t=Sl.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 y0(a,e){const t=wl.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 lo{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}}class b0{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=Ll(),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(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(m.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(m.FRAG_LOADING,this.onFragLoading,this),e.on(m.FRAG_LOADED,this.onFragLoaded,this),e.on(m.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(m.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(m.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(m.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(m.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(m.FRAG_LOADING,this.onFragLoading,this),e.off(m.FRAG_LOADED,this.onFragLoaded,this),e.off(m.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(m.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(m.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(m.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.media=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){const e=new lo(this,"textTrack1"),t=new lo(this,"textTrack2"),r=new lo(this,"textTrack3"),n=new lo(this,"textTrack4");this.cea608Parser1=new yl(1,e,t),this.cea608Parser2=new yl(3,r,n)}addCues(e,t,r,n,i){let s=!1;for(let l=i.length;l--;){const h=i[l],c=x0(h[0],h[1],t,r);if(c>=0&&(h[0]=Math.min(h[0],t),h[1]=Math.max(h[1],r),s=!0,c/(r-t)>.5))return}if(s||i.push([t,r]),this.config.renderTextTracksNatively){const l=this.captionsTracks[e];this.Cues.newCue(l,t,r,n)}else{const l=this.Cues.newCue(null,t,r,n);this.hls.trigger(m.CUES_PARSED,{type:"captions",cues:l,track:e})}}onInitPtsFound(e,{frag:t,id:r,initPTS:n,timescale:i}){const{unparsedVttFrags:s}=this;r===ie.MAIN&&(this.initPTS[t.cc]={baseTime:n,timescale:i}),s.length&&(this.unparsedVttFrags=[],s.forEach(l=>{this.onFragLoaded(m.FRAG_LOADED,l)}))}getExistingTrack(e,t){const{media:r}=this;if(r)for(let n=0;n<r.textTracks.length;n++){const i=r.textTracks[n];if(Rl(i,{name:e,lang:t,characteristics:"transcribes-spoken-dialog,describes-music-and-sound"}))return i}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:t,captionsTracks:r,media:n}=this,{label:i,languageCode:s}=t[e],l=this.getExistingTrack(i,s);if(l)r[e]=l,ia(r[e]),cl(r[e],n);else{const h=this.createTextTrack("captions",i,s);h&&(h[e]=!0,r[e]=h)}}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(m.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,t.mediaSource||this._cleanTracks()}onMediaDetaching(e,t){const r=!!t.transferMedia;if(this.media=null,r)return;const{captionsTracks:n}=this;Object.keys(n).forEach(i=>{ia(n[i]),delete n[i]}),this.nonNativeCaptionsTracks={}}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=Ll(),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++)ia(t[r])}onSubtitleTracksUpdated(e,t){const r=t.subtitleTracks||[],n=r.some(i=>i.textCodec===Go);if(this.config.enableWebVTT||n&&this.config.enableIMSC1){if(qo(this.tracks,r)){this.tracks=r;return}if(this.textTracks=[],this.tracks=r,this.config.renderTextTracksNatively){const s=this.media,l=s?io(s.textTracks):null;if(this.tracks.forEach((h,c)=>{let p;if(l){let _=null;for(let A=0;A<l.length;A++)if(l[A]&&Rl(l[A],h)){_=l[A],l[A]=null;break}_&&(p=_)}if(p)ia(p);else{const _=Il(h);p=this.createTextTrack(_,h.name,h.lang),p&&(p.mode="disabled")}p&&this.textTracks.push(p)}),l!=null&&l.length){const h=l.filter(c=>c!==null).map(c=>c.label);h.length&&this.hls.logger.warn(`Media element contains unused subtitle tracks: ${h.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const s=this.tracks.map(l=>({label:l.name,kind:l.type.toLowerCase(),default:l.default,subtitleTrack:l}));this.hls.trigger(m.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===ie.MAIN){var r,n;const{cea608Parser1:i,cea608Parser2:s,lastSn:l}=this,{cc:h,sn:c}=t.frag,p=(r=(n=t.part)==null?void 0:n.index)!=null?r:-1;i&&s&&(c!==l+1||c===l&&p!==this.lastPartIndex+1||h!==this.lastCc)&&(i.reset(),s.reset()),this.lastCc=h,this.lastSn=c,this.lastPartIndex=p}}onFragLoaded(e,t){const{frag:r,payload:n}=t;if(r.type===ie.SUBTITLE)if(n.byteLength){const i=r.decryptdata,s="stats"in t;if(i==null||!i.encrypted||s){const l=this.tracks[r.level],h=this.vttCCs;h[r.cc]||(h[r.cc]={start:r.start,prevCC:this.prevCC,new:!0},this.prevCC=r.cc),l&&l.textCodec===Go?this._parseIMSC1(r,n):this._parseVTTs(t)}}else this.hls.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const r=this.hls;Tl(t,this.initPTS[e.cc],n=>{this._appendCues(n,e.level),r.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},n=>{r.logger.log(`Failed to parse IMSC1: ${n}`),r.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:n})})}_parseVTTs(e){var t;const{frag:r,payload:n}=e,{initPTS:i,unparsedVttFrags:s}=this,l=i.length-1;if(!i[r.cc]&&l===-1){s.push(e);return}const h=this.hls,c=(t=r.initSegment)!=null&&t.data?De(r.initSegment.data,new Uint8Array(n)).buffer:n;p0(c,this.initPTS[r.cc],this.vttCCs,r.cc,r.start,p=>{this._appendCues(p,r.level),h.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:r})},p=>{const _=p.message==="Missing initPTS for VTT MPEGTS";_?s.push(e):this._fallbackToIMSC1(r,n),h.logger.log(`Failed to parse VTT cue: ${p}`),!(_&&l>r.cc)&&h.trigger(m.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:r,error:p})})}_fallbackToIMSC1(e,t){const r=this.tracks[e.level];r.textCodec||Tl(t,this.initPTS[e.cc],()=>{r.textCodec=Go,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=>hl(n,i))}else{const n=this.tracks[t];if(!n)return;const i=n.default?"default":"subtitles"+t;r.trigger(m.CUES_PARSED,{type:"subtitles",cues:e,track:i})}}onFragDecrypted(e,t){const{frag:r}=t;r.type===ie.SUBTITLE&&this.onFragLoaded(m.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){if(!this.enabled||!this.config.enableCEA708Captions)return;const{frag:r,samples:n}=t;if(!(r.type===ie.MAIN&&this.closedCaptionsForLevel(r)==="NONE"))for(let i=0;i<n.length;i++){const s=n[i].bytes;if(s){this.cea608Parser1||this.initCea608Parsers();const l=this.extractCea608Data(s);this.cea608Parser1.addData(n[i].pts,l[0]),this.cea608Parser2.addData(n[i].pts,l[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:l}=this;Object.keys(l).forEach(h=>Po(l[h],t,r))}if(this.config.renderTextTracksNatively&&t===0&&n!==void 0){const{textTracks:l}=this;Object.keys(l).forEach(h=>Po(l[h],t,n))}}}extractCea608Data(e){const t=[[],[]],r=e[0]&31;let n=2;for(let i=0;i<r;i++){const s=e[n++],l=127&e[n++],h=127&e[n++];if(l===0&&h===0)continue;if((4&s)!==0){const p=3&s;(p===0||p===1)&&(t[p].push(l),t[p].push(h))}}return t}}function Il(a){return a.characteristics&&/transcribes-spoken-dialog/gi.test(a.characteristics)&&/describes-music-and-sound/gi.test(a.characteristics)?"captions":"subtitles"}function Rl(a,e){return!!a&&a.kind===Il(e)&&Do(e,a)}function x0(a,e,t,r){return Math.min(e,r)-Math.max(a,t)}function Ll(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}const E0=/\s/,S0={newCue(a,e,t,r){const n=[];let i,s,l,h,c;const p=self.VTTCue||self.TextTrackCue;for(let A=0;A<r.rows.length;A++)if(i=r.rows[A],l=!0,h=0,c="",!i.isEmpty()){var _;for(let re=0;re<i.chars.length;re++)E0.test(i.chars[re].uchar)&&l?h++:(c+=i.chars[re].uchar,l=!1);i.cueStartTime=e,e===t&&(t+=1e-4),h>=16?h--:h++;const L=El(c.trim()),I=zo(e,t,L);a!=null&&(_=a.cues)!=null&&_.getCueById(I)||(s=new p(e,t,L),s.id=I,s.line=A+1,s.align="left",s.position=10+Math.min(80,Math.floor(h*8/32)*10),n.push(s))}return a&&n.length&&(n.sort((A,L)=>A.line==="auto"||L.line==="auto"?0:A.line>8&&L.line>8?L.line-A.line:A.line-L.line),n.forEach(A=>hl(a,A))),n}};function w0(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch(a){}return!1}const T0=/(\d+)-(\d+)\/(\d+)/;class kl{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||I0,this.controller=new self.AbortController,this.stats=new v}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,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=A0(e,this.controller.signal),s=e.responseType==="arraybuffer",l=s?"byteLength":"length",{maxTimeToFirstByteMs:h,maxLoadTimeMs:c}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=r,this.request=this.fetchSetup(e,i),self.clearTimeout(this.requestTimeout),t.timeout=h&&$(h)?h:c,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(n,e,this.response))},t.timeout),(Fs(this.request)?this.request.then(self.fetch):self.fetch(this.request)).then(_=>{var A;this.response=this.loader=_;const L=Math.max(self.performance.now(),n.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=c,this.requestTimeout=self.setTimeout(()=>{this.callbacks&&(this.abortInternal(),this.callbacks.onTimeout(n,e,this.response))},c-(L-n.loading.start)),!_.ok){const{status:re,statusText:ce}=_;throw new R0(ce||"fetch, bad network response",re,_)}n.loading.first=L,n.total=D0(_.headers)||n.total;const I=(A=this.callbacks)==null?void 0:A.onProgress;return I&&$(t.highWaterMark)?this.loadProgressively(_,n,e,t.highWaterMark,I):s?_.arrayBuffer():e.responseType==="json"?_.json():_.text()}).then(_=>{var A,L;const I=this.response;if(!I)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),n.loading.end=Math.max(self.performance.now(),n.loading.first);const re=_[l];re&&(n.loaded=n.total=re);const ce={url:I.url,data:_,code:I.status},ke=(A=this.callbacks)==null?void 0:A.onProgress;ke&&!$(t.highWaterMark)&&ke(n,e,_,I),(L=this.callbacks)==null||L.onSuccess(ce,n,e,I)}).catch(_=>{var A;if(self.clearTimeout(this.requestTimeout),n.aborted)return;const L=_&&_.code||0,I=_?_.message:null;(A=this.callbacks)==null||A.onError({code:L,text:I},e,_?_.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 Ls,l=e.body.getReader(),h=()=>l.read().then(c=>{if(c.done)return s.dataLength&&i(t,r,s.flush().buffer,e),Promise.resolve(new ArrayBuffer(0));const p=c.value,_=p.length;return t.loaded+=_,_<n||s.dataLength?(s.push(p),s.dataLength>=n&&i(t,r,s.flush().buffer,e)):i(t,r,p.buffer,e),h()}).catch(()=>Promise.reject());return h()}}function A0(a,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(E({},a.headers))};return a.rangeEnd&&t.headers.set("Range","bytes="+a.rangeStart+"-"+String(a.rangeEnd-1)),t}function C0(a){const e=T0.exec(a);if(e)return parseInt(e[2])-parseInt(e[1])+1}function D0(a){const e=a.get("Content-Range");if(e){const r=C0(e);if($(r))return r}const t=a.get("Content-Length");if(t)return parseInt(t)}function I0(a,e){return new self.Request(a.url,e)}class R0 extends Error{constructor(e,t,r){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=r}}const L0=/^age:\s*[\d.]+\s*$/im;class Ol{constructor(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=null,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new v,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,e.readyState!==4&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,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=>{var l;(l=this.callbacks)==null||l.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 l in n)e.setRequestHeader(l,n[l]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),r.timeout=i&&$(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 c=t.status,p=t.responseType==="text"?t.responseText:null;if(c>=200&&c<300){const I=p!=null?p:t.response;if(I!=null){var s,l;r.loading.end=Math.max(self.performance.now(),r.loading.first);const re=t.responseType==="arraybuffer"?I.byteLength:I.length;r.loaded=r.total=re,r.bwEstimate=r.total*8e3/(r.loading.end-r.loading.first);const ce=(s=this.callbacks)==null?void 0:s.onProgress;ce&&ce(r,e,I,t);const ke={url:t.responseURL,data:I,code:c};(l=this.callbacks)==null||l.onSuccess(ke,r,e,t);return}}const _=i.loadPolicy.errorRetry,A=r.retry,L={url:e.url,data:void 0,code:c};if(pn(_,A,!1,L))this.retry(_);else{var h;J.error(`${c} while loading ${e.url}`),(h=this.callbacks)==null||h.onError({code:c,text:t.statusText},e,t,r)}}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,t=this.stats.retry;if(pn(e,t,!0))this.retry(e);else{var r;J.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=Or(e,r.retry),r.retry++,J.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&&L0.test(this.loader.getAllResponseHeaders())){const t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.loader&&new RegExp(`^${e}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}}const k0={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},O0=S(S({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,maxDevicePixelRatio:Number.POSITIVE_INFINITY,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,maxBufferSize:60*1e3*1e3,maxFragLookUpTolerance:.25,maxBufferHole:.1,detectStallWithCurrentTimeMs:1250,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,nudgeOnVideoHole:!0,liveSyncDurationCount:3,liveSyncOnStallIncrease:1,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,ignorePlaylistParsingErrors:!1,loader:Ol,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:Tr,bufferController:Jl,capLevelController:Ro,errorController:Wt,fpsController:Nu,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:fr,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableEmsgKLVMetadata:!1,enableID3MetadataCues:!0,enableInterstitialPlayback:!0,interstitialAppendInPlace:!0,interstitialLiveLookAhead:10,useMediaCapabilities:!0,certLoadPolicy:{default:k0},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},interstitialAssetListLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:3e4,timeoutRetry:{maxNumRetry:0,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:0,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},P0()),{},{subtitleStreamController:Zu,subtitleTrackController:Uu,timelineController:b0,audioStreamController:to,audioTrackController:Xl,emeController:na,cmcdController:Pu,contentSteeringController:Bu,interstitialsController:Vu});function P0(){return{cueHandler:S0,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 M0(a,e,t){if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(e.liveMaxLatencyDurationCount!==void 0&&(e.liveSyncDurationCount===void 0||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(e.liveMaxLatencyDuration!==void 0&&(e.liveSyncDuration===void 0||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const r=Wo(a),n=["manifest","level","frag"],i=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return n.forEach(s=>{const l=`${s==="level"?"playlist":s}LoadPolicy`,h=e[l]===void 0,c=[];i.forEach(p=>{const _=`${s}Loading${p}`,A=e[_];if(A!==void 0&&h){c.push(_);const L=r[l].default;switch(e[l]={default:L},p){case"TimeOut":L.maxLoadTimeMs=A,L.maxTimeToFirstByteMs=A;break;case"MaxRetry":L.errorRetry.maxNumRetry=A,L.timeoutRetry.maxNumRetry=A;break;case"RetryDelay":L.errorRetry.retryDelayMs=A,L.timeoutRetry.retryDelayMs=A;break;case"MaxRetryTimeout":L.errorRetry.maxRetryDelayMs=A,L.timeoutRetry.maxRetryDelayMs=A;break}}}),c.length&&t.warn(`hls.js config: "${c.join('", "')}" setting(s) are deprecated, use "${l}": ${_r(e[l])}`)}),S(S({},r),e)}function Wo(a){return a&&typeof a=="object"?Array.isArray(a)?a.map(Wo):Object.keys(a).reduce((e,t)=>(e[t]=Wo(a[t]),e),{}):a}function B0(a,e){const t=a.loader;t!==kl&&t!==Ol?(e.log("[config]: Custom loader detected, cannot enable progressive streaming"),a.progressive=!1):w0()&&(a.loader=kl,a.progressive=!0,a.enableSoftwareAES=!0,e.log("[config]: Progressive streaming enabled, using FetchLoader"))}const uo=2,N0=.1,F0=.05,$0=100;class U0 extends _n{constructor(e,t){super("gap-controller",e.logger),this.hls=null,this.fragmentTracker=null,this.media=null,this.mediaSource=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.buffered={},this.lastCurrentTime=0,this.ended=0,this.waiting=0,this.onMediaPlaying=()=>{this.ended=0,this.waiting=0},this.onMediaWaiting=()=>{var r;(r=this.media)!=null&&r.seeking||(this.waiting=self.performance.now(),this.tick())},this.onMediaEnded=()=>{if(this.hls){var r;this.ended=((r=this.media)==null?void 0:r.currentTime)||1,this.hls.trigger(m.MEDIA_ENDED,{stalled:!1})}},this.hls=e,this.fragmentTracker=t,this.registerListeners()}registerListeners(){const{hls:e}=this;e&&(e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.BUFFER_APPENDED,this.onBufferAppended,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.BUFFER_APPENDED,this.onBufferAppended,this))}destroy(){super.destroy(),this.unregisterListeners(),this.media=this.hls=this.fragmentTracker=null,this.mediaSource=void 0}onMediaAttached(e,t){this.setInterval($0),this.mediaSource=t.mediaSource;const r=this.media=t.media;ns(r,"playing",this.onMediaPlaying),ns(r,"waiting",this.onMediaWaiting),ns(r,"ended",this.onMediaEnded)}onMediaDetaching(e,t){this.clearInterval();const{media:r}=this;r&&(Xi(r,"playing",this.onMediaPlaying),Xi(r,"waiting",this.onMediaWaiting),Xi(r,"ended",this.onMediaEnded),this.media=null),this.mediaSource=void 0}onBufferAppended(e,t){this.buffered=t.timeRanges}get hasBuffered(){return Object.keys(this.buffered).length>0}tick(){var e;if(!((e=this.media)!=null&&e.readyState)||!this.hasBuffered)return;const t=this.media.currentTime;this.poll(t,this.lastCurrentTime),this.lastCurrentTime=t}poll(e,t){var r,n;const i=(r=this.hls)==null?void 0:r.config;if(!i)return;const{media:s,stalled:l}=this;if(!s)return;const{seeking:h}=s,c=this.seeking&&!h,p=!this.seeking&&h,_=s.paused&&!h||s.ended||s.playbackRate===0;if(this.seeking=h,e!==t){t&&(this.ended=0),this.moved=!0,h||(this.nudgeRetry=0,i.nudgeOnVideoHole&&!_&&e>t&&this.nudgeOnVideoHole(e,t)),this.waiting===0&&this.stallResolved(e);return}if(p||c){c&&this.stallResolved(e);return}if(_){this.nudgeRetry=0,this.stallResolved(e),!this.ended&&s.ended&&this.hls&&(this.ended=e||1,this.hls.trigger(m.MEDIA_ENDED,{stalled:!1}));return}if(!pr.getBuffered(s).length){this.nudgeRetry=0;return}const A=pr.bufferInfo(s,e,0),L=A.nextStart||0,I=this.fragmentTracker;if(h&&I&&this.hls){const Tt=Pl(this.hls.inFlightFragments,e),dt=A.len>uo,xt=!L||Tt||L-e>uo&&!I.getPartialFragment(e);if(dt||xt)return;this.moved=!1}const re=(n=this.hls)==null?void 0:n.latestLevelDetails;if(!this.moved&&this.stalled!==null&&I){if(!(A.len>0)&&!L)return;const dt=Math.max(L,A.start||0)-e,It=!!(re!=null&&re.live)?re.targetduration*2:uo,pt=I.getPartialFragment(e);if(dt>0&&(dt<=It||pt)){s.paused||this._trySkipBufferHole(pt);return}}const ce=i.detectStallWithCurrentTimeMs,ke=self.performance.now(),We=this.waiting;if(l===null){We>0&&ke-We<ce?this.stalled=We:this.stalled=ke;return}const He=ke-l;if(!h&&(He>=ce||We)&&this.hls){var ct;if(((ct=this.mediaSource)==null?void 0:ct.readyState)==="ended"&&!(re!=null&&re.live)&&Math.abs(e-((re==null?void 0:re.edge)||0))<1){if(this.ended)return;this.ended=e||1,this.hls.trigger(m.MEDIA_ENDED,{stalled:!0});return}if(this._reportStall(A),!this.media||!this.hls)return}const ht=pr.bufferInfo(s,e,i.maxBufferHole);this._tryFixBufferStall(ht,He)}stallResolved(e){const t=this.stalled;if(t&&this.hls&&(this.stalled=null,this.stallReported)){const r=self.performance.now()-t;this.log(`playback not stuck anymore @${e}, after ${Math.round(r)}ms`),this.stallReported=!1,this.waiting=0,this.hls.trigger(m.STALL_RESOLVED,{})}}nudgeOnVideoHole(e,t){var r;const n=this.buffered.video;if(this.hls&&this.media&&this.fragmentTracker&&(r=this.buffered.audio)!=null&&r.length&&n&&n.length>1&&e>n.end(0)){const i=pr.bufferedInfo(pr.timeRangesToArray(this.buffered.audio),e,0);if(i.len>1&&t>=i.start){const s=pr.timeRangesToArray(n),l=pr.bufferedInfo(s,t,0).bufferedIndex;if(l>-1&&l<s.length-1){const h=pr.bufferedInfo(s,e,0).bufferedIndex,c=s[l].end,p=s[l+1].start;if((h===-1||h>l)&&p-c<1&&e-c<2){const _=new Error(`nudging playhead to flush pipeline after video hole. currentTime: ${e} hole: ${c} -> ${p} buffered index: ${h}`);this.warn(_.message),this.media.currentTime+=1e-6;const A=this.fragmentTracker.getPartialFragment(e)||void 0,L=pr.bufferInfo(this.media,e,0);this.hls.trigger(m.ERROR,{type:_e.MEDIA_ERROR,details:O.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:_,reason:_.message,frag:A,buffer:L.len,bufferInfo:L})}}}}}_tryFixBufferStall(e,t){var r,n;const{fragmentTracker:i,media:s}=this,l=(r=this.hls)==null?void 0:r.config;if(!s||!i||!l)return;const h=s.currentTime,c=(n=this.hls)==null?void 0:n.latestLevelDetails,p=i.getPartialFragment(h);if((p||c!=null&&c.live&&h<c.fragmentStart)&&(this._trySkipBufferHole(p)||!this.media))return;const _=e.buffered;(_&&_.length>1&&e.len>l.maxBufferHole||e.nextStart&&e.nextStart-h<l.maxBufferHole)&&(t>l.highBufferWatchdogPeriod*1e3||this.waiting)&&(this.warn("Trying to nudge playhead over buffer-hole"),this._tryNudgeBuffer(e))}_reportStall(e){const{hls:t,media:r,stallReported:n,stalled:i}=this;if(!n&&i!==null&&r&&t){this.stallReported=!0;const s=new Error(`Playback stalling at @${r.currentTime} due to low buffer (${_r(e)})`);this.warn(s.message),t.trigger(m.ERROR,{type:_e.MEDIA_ERROR,details:O.BUFFER_STALLED_ERROR,fatal:!1,error:s,buffer:e.len,bufferInfo:e,stalled:{start:i}})}}_trySkipBufferHole(e){var t;const{fragmentTracker:r,media:n}=this,i=(t=this.hls)==null?void 0:t.config;if(!n||!r||!i)return 0;const s=n.currentTime,l=pr.bufferInfo(n,s,0),h=s<l.start?l.start:l.nextStart;if(h&&this.hls){const p=l.len<=i.maxBufferHole,_=l.len>0&&l.len<1&&n.readyState<3,A=h-s;if(A>0&&(p||_)){if(A>i.maxBufferHole){let I=!1;if(s===0){const re=r.getAppendedFrag(0,ie.MAIN);re&&h<re.end&&(I=!0)}if(!I){const re=e||r.getAppendedFrag(s,ie.MAIN);if(re){var c;if(!((c=this.hls.loadLevelObj)!=null&&c.details)||Pl(this.hls.inFlightFragments,h))return 0;let ke=!1,We=re.end;for(;We<h;){const He=r.getPartialFragment(We);if(He)We+=He.duration;else{ke=!0;break}}if(ke)return 0}}}const L=Math.max(h+F0,s+N0);if(this.warn(`skipping hole, adjusting currentTime from ${s} to ${L}`),this.moved=!0,n.currentTime=L,!(e!=null&&e.gap)){const I=new Error(`fragment loaded with buffer holes, seeking from ${s} to ${L}`);this.hls.trigger(m.ERROR,{type:_e.MEDIA_ERROR,details:O.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:I,reason:I.message,frag:e||void 0,buffer:l.len,bufferInfo:l})}return L}}return 0}_tryNudgeBuffer(e){const{hls:t,media:r,nudgeRetry:n}=this,i=t==null?void 0:t.config;if(!r||!i)return 0;const s=r.currentTime;if(this.nudgeRetry++,n<i.nudgeMaxRetry){const l=s+(n+1)*i.nudgeOffset,h=new Error(`Nudging 'currentTime' from ${s} to ${l}`);this.warn(h.message),r.currentTime=l,t.trigger(m.ERROR,{type:_e.MEDIA_ERROR,details:O.BUFFER_NUDGE_ON_STALL,error:h,fatal:!1,buffer:e.len,bufferInfo:e})}else{const l=new Error(`Playhead still not moving while enough data buffered @${s} after ${i.nudgeMaxRetry} nudges`);this.error(l.message),t.trigger(m.ERROR,{type:_e.MEDIA_ERROR,details:O.BUFFER_STALLED_ERROR,error:l,fatal:!0,buffer:e.len,bufferInfo:e})}}}function Pl(a,e){const t=Ml(a.main);if(t&&t.start<=e)return t;const r=Ml(a.audio);return r&&r.start<=e?r:null}function Ml(a){if(!a)return null;switch(a.state){case Rt.IDLE:case Rt.STOPPED:case Rt.ENDED:case Rt.ERROR:return null}return a.frag}const z0=.25;function Vo(){if(typeof self!="undefined")return self.VTTCue||self.TextTrackCue}function Bl(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,_r(n?S({type:n},r):r))}return i}const co=(()=>{const a=Vo();try{a&&new a(0,Number.POSITIVE_INFINITY,"")}catch(e){return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function G0(a){return Uint8Array.from(a.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}class H0{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.removeCues=!0,this.onEventCueEnter=()=>{this.hls&&this.hls.trigger(m.EVENT_CUE_ENTER,{})},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=this.onEventCueEnter=null}_registerListeners(){const{hls:e}=this;e.on(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(m.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(m.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(m.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(m.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this)}onMediaAttaching(e,t){var r;this.media=t.media,((r=t.overrides)==null?void 0:r.cueRemoval)===!1&&(this.removeCues=!1)}onMediaAttached(){const e=this.hls.latestLevelDetails;e&&this.updateDateRangeCues(e)}onMediaDetaching(e,t){this.media=null,!t.transferMedia&&(this.id3Track&&(this.removeCues&&ia(this.id3Track,this.onEventCueEnter),this.id3Track=null),this.dateRangeCuesAppended={})}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;t<e.length;t++){const r=e[t];if(r.kind==="metadata"&&r.label==="id3")return cl(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=Vo();if(s)for(let l=0;l<i.length;l++){const h=i[l].type;if(h===Si.emsg&&!r||!n)continue;const c=Wa(i[l].data);if(c){const p=i[l].pts;let _=p+i[l].duration;_>co&&(_=co),_-p<=0&&(_=p+z0);for(let L=0;L<c.length;L++){const I=c[L];if(!va(I)){this.updateId3CueEnds(p,h);const re=Bl(s,p,_,I,h);re&&this.id3Track.addCue(re)}}}}}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===co&&(s.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:r,type:n}){const{id3Track:i,hls:s}=this;if(!s)return;const{config:{enableEmsgMetadataCues:l,enableID3MetadataCues:h}}=s;if(i&&(l||h)){let c;n==="audio"?c=p=>p.type===Si.audioId3&&h:n==="video"?c=p=>p.type===Si.emsg&&l:c=p=>p.type===Si.audioId3&&h||p.type===Si.emsg&&l,Po(i,t,r,c)}}onLevelUpdated(e,{details:t}){this.updateDateRangeCues(t,!0)}onLevelPtsUpdated(e,t){Math.abs(t.drift)>.01&&this.updateDateRangeCues(t.details)}updateDateRangeCues(e,t){if(!this.media||!e.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{id3Track:r}=this,{dateRanges:n}=e,i=Object.keys(n);let s=this.dateRangeCuesAppended;if(r&&t){var l;if((l=r.cues)!=null&&l.length){const p=Object.keys(s).filter(_=>!i.includes(_));for(let _=p.length;_--;){const A=p[_],L=s[A].cues;delete s[A],Object.keys(L).forEach(I=>{try{const re=L[I];re.removeEventListener("enter",this.onEventCueEnter),r.removeCue(re)}catch(re){}})}}else s=this.dateRangeCuesAppended={}}const h=e.fragments[e.fragments.length-1];if(i.length===0||!$(h==null?void 0:h.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const c=Vo();for(let p=0;p<i.length;p++){const _=i[p],A=n[_],L=A.startTime,I=s[_],re=(I==null?void 0:I.cues)||{};let ce=(I==null?void 0:I.durationKnown)||!1,ke=co;const{duration:We,endDate:He}=A;if(He&&We!==null)ke=L+We,ce=!0;else if(A.endOnNext&&!ce){const ht=i.reduce((Tt,dt)=>{if(dt!==A.id){const xt=n[dt];if(xt.class===A.class&&xt.startDate>A.startDate&&(!Tt||A.startDate<Tt.startDate))return xt}return Tt},null);ht&&(ke=ht.startTime,ce=!0)}const ct=Object.keys(A.attr);for(let ht=0;ht<ct.length;ht++){const Tt=ct[ht];if(!Ri(Tt))continue;const dt=re[Tt];if(dt)ce&&!I.durationKnown?dt.endTime=ke:Math.abs(dt.startTime-L)>.01&&(dt.startTime=L,dt.endTime=ke);else if(c){let xt=A.attr[Tt];Gt(Tt)&&(xt=G0(xt));const pt=Bl(c,L,ke,{key:Tt,data:xt},Si.dateRange);pt&&(pt.id=_,this.id3Track.addCue(pt),re[Tt]=pt,this.hls.config.interstitialsController&&(Tt==="X-ASSET-LIST"||Tt==="X-ASSET-URL")&&pt.addEventListener("enter",this.onEventCueEnter))}}s[_]={cues:re,dateRange:A,durationKnown:ce}}}}class j0{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.currentTime=0,this.stallCount=0,this._latency=null,this._targetLatencyUpdated=!1,this.onTimeupdate=()=>{const{media:t}=this,r=this.levelDetails;if(!t||!r)return;this.currentTime=t.currentTime;const n=this.computeLatency();if(n===null)return;this._latency=n;const{lowLatencyMode:i,maxLiveSyncPlaybackRate:s}=this.config;if(!i||s===1||!r.live)return;const l=this.targetLatency;if(l===null)return;const h=n-l,c=Math.min(this.maxLatency,l+r.targetduration);if(h<c&&h>.05&&this.forwardBufferLength>1){const _=Math.min(2,Math.max(1,s)),A=Math.round(2/(1+Math.exp(-.75*h-this.edgeStalled))*20)/20,L=Math.min(_,Math.max(1,A));this.changeMediaPlaybackRate(t,L)}else t.playbackRate!==1&&t.playbackRate!==0&&this.changeMediaPlaybackRate(t,1)},this.hls=e,this.config=e.config,this.registerListeners()}get levelDetails(){var e;return((e=this.hls)==null?void 0:e.latestLevelDetails)||null}get latency(){return this._latency||0}get maxLatency(){const{config:e}=this;if(e.liveMaxLatencyDuration!==void 0)return e.liveMaxLatencyDuration;const t=this.levelDetails;return t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const e=this.levelDetails;if(e===null||this.hls===null)return null;const{holdBack:t,partHoldBack:r,targetduration:n}=e,{liveSyncDuration:i,liveSyncDurationCount:s,lowLatencyMode:l}=this.config,h=this.hls.userConfig;let c=l&&r||t;(this._targetLatencyUpdated||h.liveSyncDuration||h.liveSyncDurationCount||c===0)&&(c=i!==void 0?i:s*n);const p=n;return c+Math.min(this.stallCount*this.config.liveSyncOnStallIncrease,p)}set targetLatency(e){this.stallCount=0,this.config.liveSyncDuration=e,this._targetLatencyUpdated=!0}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency;if(e===null||t===null)return null;const r=this.levelDetails;if(r===null)return null;const n=r.edge,i=e-t-this.edgeStalled,s=n-r.totalduration,l=n-(this.config.lowLatencyMode&&r.partTarget||r.targetduration);return Math.min(Math.max(s,i),l)}get drift(){const e=this.levelDetails;return e===null?1:e.drift}get edgeStalled(){const e=this.levelDetails;if(e===null)return 0;const t=(this.config.lowLatencyMode&&e.partTarget||e.targetduration)*3;return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e}=this,t=this.levelDetails;if(!e||!t)return 0;const r=e.buffered.length;return(r?e.buffered.end(r-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.hls=null}registerListeners(){const{hls:e}=this;e&&(e.on(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(m.ERROR,this.onError,this))}unregisterListeners(){const{hls:e}=this;e&&(e.off(m.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(m.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(m.ERROR,this.onError,this))}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.onTimeupdate)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.onTimeupdate),this.media=null)}onManifestLoading(){this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){t.advanced&&this.onTimeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.onTimeupdate)}onError(e,t){var r;t.details===O.BUFFER_STALLED_ERROR&&(this.stallCount++,this.hls&&(r=this.levelDetails)!=null&&r.live&&this.hls.logger.warn("[latency-controller]: Stall detected, adjusting target latency"))}changeMediaPlaybackRate(e,t){var r,n;e.playbackRate!==t&&((r=this.hls)==null||r.logger.debug(`[latency-controller]: latency=${this.latency.toFixed(3)}, targetLatency=${(n=this.targetLatency)==null?void 0:n.toFixed(3)}, forwardBufferLength=${this.forwardBufferLength.toFixed(3)}: adjusting playback rate from ${e.playbackRate} to ${t}`),e.playbackRate=t)}estimateLiveEdge(){const e=this.levelDetails;return e===null?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return e===null?null:e-this.currentTime}}class K0 extends Ss{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(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(m.LEVEL_LOADED,this.onLevelLoaded,this),e.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(m.FRAG_BUFFERED,this.onFragBuffered,this),e.on(m.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(m.LEVEL_LOADED,this.onLevelLoaded,this),e.off(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(m.FRAG_BUFFERED,this.onFragBuffered,this),e.off(m.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 l=!1,h=!1,c=!1;t.levels.forEach(p=>{var _;const A=p.attrs;let{audioCodec:L,videoCodec:I}=p;L&&(p.audioCodec=L=Ce(L,r)||void 0),((_=I)==null?void 0:_.indexOf("avc1"))===0&&(I=p.videoCodec=cr(I));const{width:re,height:ce,unknownCodecs:ke}=p;let We=ke?ke.length:0;if(ke)for(let Ht=We;Ht--;){const er=ke[Ht];this.isAudioSupported(er)?(p.audioCodec=L=L?`${L},${er}`:er,We--,Bt.audio[L.substring(0,4)]=2):this.isVideoSupported(er)&&(p.videoCodec=I=I?`${I},${er}`:er,We--,Bt.video[I.substring(0,4)]=2)}if(l||(l=!!(re&&ce)),h||(h=!!I),c||(c=!!L),We||L&&!this.isAudioSupported(L)||I&&!this.isVideoSupported(I)){this.log(`Some or all CODECS not supported "${A.CODECS}"`);return}const{CODECS:He,"FRAME-RATE":ct,"HDCP-LEVEL":ht,"PATHWAY-ID":Tt,RESOLUTION:dt,"VIDEO-RANGE":xt}=A,pt=`${`${Tt||"."}-`}${p.bitrate}-${dt}-${ct}-${He}-${xt}-${ht}`;if(i[pt])if(i[pt].uri!==p.url&&!p.attrs["PATHWAY-ID"]){const Ht=s[pt]+=1;p.attrs["PATHWAY-ID"]=new Array(Ht+1).join(".");const er=this.createLevel(p);i[pt]=er,n.push(er)}else i[pt].addGroupId("audio",A.AUDIO),i[pt].addGroupId("text",A.SUBTITLES);else{const Ht=this.createLevel(p);i[pt]=Ht,s[pt]=1,n.push(Ht)}}),this.filterAndSortMediaOptions(n,t,l,h,c)}createLevel(e){const t=new zr(e),r=e.supplemental;if(r!=null&&r.videoCodec&&!this.isVideoSupported(r.videoCodec)){const n=new Error(`SUPPLEMENTAL-CODECS not supported "${r.videoCodec}"`);this.log(n.message),t.supportedResult=Vr(n,[])}return t}isAudioSupported(e){return ze(e,"audio",this.hls.config.preferManagedMediaSource)}isVideoSupported(e){return ze(e,"video",this.hls.config.preferManagedMediaSource)}filterAndSortMediaOptions(e,t,r,n,i){let s=[],l=[],h=e;if((r||n)&&i&&(h=h.filter(({videoCodec:I,videoRange:re,width:ce,height:ke})=>(!!I||!!(ce&&ke))&&ln(re))),h.length===0){Promise.resolve().then(()=>{if(this.hls){let I="no level with compatible codecs found in manifest",re=I;t.levels.length&&(re=`one or more CODECS in variant not supported: ${_r(t.levels.map(ke=>ke.attrs.CODECS).filter((ke,We,He)=>He.indexOf(ke)===We))}`,this.warn(re),I+=` (${re})`);const ce=new Error(I);this.hls.trigger(m.ERROR,{type:_e.MEDIA_ERROR,details:O.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:ce,reason:re})}});return}t.audioTracks&&(s=t.audioTracks.filter(I=>!I.audioCodec||this.isAudioSupported(I.audioCodec)),Nl(s)),t.subtitles&&(l=t.subtitles,Nl(l));const c=h.slice(0);h.sort((I,re)=>{if(I.attrs["HDCP-LEVEL"]!==re.attrs["HDCP-LEVEL"])return(I.attrs["HDCP-LEVEL"]||"")>(re.attrs["HDCP-LEVEL"]||"")?1:-1;if(r&&I.height!==re.height)return I.height-re.height;if(I.frameRate!==re.frameRate)return I.frameRate-re.frameRate;if(I.videoRange!==re.videoRange)return Lr.indexOf(I.videoRange)-Lr.indexOf(re.videoRange);if(I.videoCodec!==re.videoCodec){const ce=be(I.videoCodec),ke=be(re.videoCodec);if(ce!==ke)return ke-ce}if(I.uri===re.uri&&I.codecSet!==re.codecSet){const ce=me(I.codecSet),ke=me(re.codecSet);if(ce!==ke)return ke-ce}return I.averageBitrate!==re.averageBitrate?I.averageBitrate-re.averageBitrate:0});let p=c[0];if(this.steering&&(h=this.steering.filterParsedLevels(h),h.length!==c.length)){for(let I=0;I<c.length;I++)if(c[I].pathwayId===h[0].pathwayId){p=c[I];break}}this._levels=h;for(let I=0;I<h.length;I++)if(h[I]===p){var _;this._firstLevel=I;const re=p.bitrate,ce=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${h.length} level(s) found, first bitrate: ${re}`),((_=this.hls.userConfig)==null?void 0:_.abrEwmaDefaultEstimate)===void 0){const ke=Math.min(re,this.hls.config.abrEwmaDefaultEstimateMax);ke>ce&&ce===this.hls.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=ke)}break}const A=i&&!n,L={levels:h,audioTracks:s,subtitleTracks:l,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:i,video:n,altAudio:!A&&s.some(I=>!!I.url)};this.hls.trigger(m.MANIFEST_PARSED,L)}get levels(){return this._levels.length===0?null:this._levels}get loadLevelObj(){return this.currentLevel}get level(){return this.currentLevelIndex}set level(e){const t=this._levels;if(t.length===0)return;if(e<0||e>=t.length){const p=new Error("invalid level idx"),_=e<0;if(this.hls.trigger(m.ERROR,{type:_e.OTHER_ERROR,details:O.LEVEL_SWITCH_ERROR,level:e,fatal:_,error:p,reason:p.message}),_)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],l=s.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=s,r===e&&n&&i===l)return;this.log(`Switching to level ${e} (${s.height?s.height+"p ":""}${s.videoRange?s.videoRange+" ":""}${s.codecSet?s.codecSet+" ":""}@${s.bitrate})${l?" with Pathway "+l:""} from level ${r}${i?" with Pathway "+i:""}`);const h={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(m.LEVEL_SWITCHING,h);const c=s.details;if(!c||c.live){const p=this.switchParams(s.uri,n==null?void 0:n.details,c);this.loadPlaylist(p)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,this._startLevel===void 0&&(this._startLevel=e),e!==-1&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(this._startLevel===void 0){const e=this.hls.config.startLevel;return e!==void 0?e:this.hls.firstAutoLevel}return this._startLevel}set startLevel(e){this._startLevel=e}get pathways(){return this.steering?this.steering.pathways():[]}get pathwayPriority(){return this.steering?this.steering.pathwayPriority:null}set pathwayPriority(e){if(this.steering){const t=this.steering.pathways(),r=e.filter(n=>t.indexOf(n)!==-1);if(e.length<1){this.warn(`pathwayPriority ${e} should contain at least one pathway from list: ${t}`);return}this.steering.pathwayPriority=r}}onError(e,t){t.fatal||!t.context||t.context.type===de.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===ie.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=t.levelInfo;if(!s){var l;this.warn(`Invalid level index ${n}`),(l=t.deliveryDirectives)!=null&&l.skip&&(i.deltaUpdateFailed=!0);return}if(s===this.currentLevel||t.withoutMultiVariant){s.fragmentError===0&&(s.loadError=0);let h=s.details;h===t.details&&h.advanced&&(h=void 0),this.playlistLoaded(n,t,h)}else(r=t.deliveryDirectives)!=null&&r.skip&&(i.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist(),this.shouldLoadPlaylist(this.currentLevel)&&this.scheduleLoading(this.currentLevel,e)}loadingPlaylist(e,t){super.loadingPlaylist(e,t);const r=this.getUrlWithDirectives(e.uri,t),n=this.currentLevelIndex,i=e.attrs["PATHWAY-ID"],s=e.details,l=s==null?void 0:s.age;this.log(`Loading level index ${n}${(t==null?void 0:t.msn)!==void 0?" at sn "+t.msn+" part "+t.part:""}${i?" Pathway "+i:""}${l&&s.live?" age "+l.toFixed(1)+(s.type?" "+s.type||0:""):""} ${r}`),this.hls.trigger(m.LEVEL_LOADING,{url:r,level:n,levelInfo:e,pathwayId:e.attrs["PATHWAY-ID"],id:0,deliveryDirectives:t||null})}get nextLoadLevel(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;if(this._levels.length===1)return;const r=this._levels.filter((i,s)=>s!==e?!0:(this.steering&&this.steering.removeLevel(i),i===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,i.details&&i.details.fragments.forEach(l=>l.level=-1)),!1));gs(r),this._levels=r,this.currentLevelIndex>-1&&(t=this.currentLevel)!=null&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.manualLevelIndex>-1&&(this.manualLevelIndex=this.currentLevelIndex);const n=r.length-1;this._firstLevel=Math.min(this._firstLevel,n),this._startLevel&&(this._startLevel=Math.min(this._startLevel,n)),this.hls.trigger(m.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(m.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:r}))}}function Nl(a){const e={};a.forEach(t=>{const r=t.groupId||"";t.id=e[r]=e[r]||0,e[r]++})}function Fl(){return self.SourceBuffer||self.WebKitSourceBuffer}function $l(){if(!ye())return!1;const e=Fl();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function W0(){if(!$l())return!1;const a=ye();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(ee(e,"video")))||["mp4a.40.2","fLaC"].some(e=>a.isTypeSupported(ee(e,"audio"))))}function V0(){var a;const e=Fl();return typeof(e==null||(a=e.prototype)==null?void 0:a.changeType)=="function"}const Z0=100;class Y0 extends es{constructor(e,t,r){super(e,t,r,"stream-controller",ie.MAIN),this.audioCodecSwap=!1,this.level=-1,this._forceStartLoad=!1,this._hasEnoughToStart=!1,this.altAudio=0,this.audioOnly=!1,this.fragPlaying=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this.onMediaPlaying=()=>{this.tick()},this.onMediaSeeked=()=>{const n=this.media,i=n?n.currentTime:null;if(i===null||!$(i)||(this.log(`Media seeked to ${i.toFixed(3)}`),!this.getBufferedFrag(i)))return;const s=this.getFwdBufferInfoAtPos(n,i,ie.MAIN,0);if(s===null||s.len===0){this.warn(`Main forward buffer length at ${i} on "seeked" event ${s?s.len:"empty"})`);return}this.tick()},this.registerListeners()}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(m.MANIFEST_PARSED,this.onManifestParsed,this),e.on(m.LEVEL_LOADING,this.onLevelLoading,this),e.on(m.LEVEL_LOADED,this.onLevelLoaded,this),e.on(m.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(m.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(m.BUFFER_CREATED,this.onBufferCreated,this),e.on(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(m.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(m.MANIFEST_PARSED,this.onManifestParsed,this),e.off(m.LEVEL_LOADED,this.onLevelLoaded,this),e.off(m.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(m.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(m.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(m.BUFFER_CREATED,this.onBufferCreated,this),e.off(m.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(m.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(m.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this.onMediaPlaying=this.onMediaSeeked=null,this.unregisterListeners(),super.onHandlerDestroying()}startLoad(e,t){if(this.levels){const{lastCurrentTime:r,hls:n}=this;if(this.stopLoad(),this.setInterval(Z0),this.level=-1,!this.startFragRequested){let i=n.startLevel;i===-1&&(n.config.testBandwidth&&this.levels.length>1?(i=0,this.bitrateTest=!0):i=n.firstAutoLevel),n.nextLoadLevel=i,this.level=n.loadLevel,this._hasEnoughToStart=!!t}r>0&&e===-1&&!t&&(this.log(`Override startPosition with lastCurrentTime @${r.toFixed(3)}`),e=r),this.state=Rt.IDLE,this.nextLoadPosition=this.lastCurrentTime=e+this.timelineOffset,this.startPosition=t?-1:e,this.tick()}else this._forceStartLoad=!0,this.state=Rt.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case Rt.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&&!this.waitForLive(n))){if(this.waitForCdnTuneIn(i))break;this.state=Rt.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=Rt.IDLE;break}break}case Rt.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=Rt.IDLE}}break}this.state===Rt.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){var e;super.onTickEnd(),(e=this.media)!=null&&e.readyState&&this.media.seeking===!1&&(this.lastCurrentTime=this.media.currentTime),this.checkFragmentChanged()}doTickIdle(){const{hls:e,levelLastLoaded:t,levels:r,media:n}=this;if(t===null||!n&&!this.primaryPrefetch&&(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],l=this.getMainFwdBufferInfo();if(l===null)return;const h=this.getLevelDetails();if(h&&this._streamEnded(l,h)){const re={};this.altAudio===2&&(re.type="video"),this.hls.trigger(m.BUFFER_EOS,re),this.state=Rt.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 c=s.details;if(!c||this.state===Rt.WAITING_LEVEL||this.waitForLive(s)){this.level=i,this.state=Rt.WAITING_LEVEL,this.startFragRequested=!1;return}const p=l.len,_=this.getMaxBufferLength(s.maxBitrate);if(p>=_)return;this.backtrackFragment&&this.backtrackFragment.start>l.end&&(this.backtrackFragment=null);const A=this.backtrackFragment?this.backtrackFragment.start:l.end;let L=this.getNextFragment(A,c);if(this.couldBacktrack&&!this.fragPrevious&&L&&te(L)&&this.fragmentTracker.getState(L)!==yr.OK){var I;const ce=((I=this.backtrackFragment)!=null?I:L).sn-c.startSN,ke=c.fragments[ce-1];ke&&L.cc===ke.cc&&(L=ke,this.fragmentTracker.removeFragment(ke))}else this.backtrackFragment&&l.len&&(this.backtrackFragment=null);if(L&&this.isLoopLoading(L,A)){if(!L.gap){const ce=this.audioOnly&&!this.altAudio?y.AUDIO:y.VIDEO,ke=(ce===y.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;ke&&this.afterBufferFlushed(ke,ce,ie.MAIN)}L=this.getNextFragmentLoopLoading(L,c,l,ie.MAIN,_)}L&&(L.initSegment&&!L.initSegment.data&&!this.bitrateTest&&(L=L.initSegment),this.loadFragment(L,s,A))}loadFragment(e,t,r){const n=this.fragmentTracker.getState(e);n===yr.NOT_LOADED||n===yr.PARTIAL?te(e)?this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,t)):super.loadFragment(e,t,r):this._loadInitSegment(e,t):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,ie.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 l=this.getMainFwdBufferInfo();if(!l||l.len<i.targetduration*2)return}if(!t.paused&&e){const l=this.hls.nextLoadLevel,h=e[l],c=this.fragLastKbps;c&&this.fragCurrent?r=this.fragCurrent.duration*h.maxBitrate/(1e3*c)+1:r=0}else r=0;const s=this.getBufferedFrag(t.currentTime+r);if(s){const l=this.followingBufferedFrag(s);if(l){this.abortCurrentFrag();const h=l.maxStartPTS?l.maxStartPTS:l.start,c=l.duration,p=Math.max(s.end,h+Math.min(Math.max(c-this.config.maxFragLookUpTolerance,c*(this.couldBacktrack?.5:.125)),c*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(p,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 Rt.KEY_LOADING:case Rt.FRAG_LOADING:case Rt.FRAG_LOADING_WAITING_RETRY:case Rt.PARSING:case Rt.PARSED:this.state=Rt.IDLE;break}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,this.altAudio===2?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const r=t.media;ns(r,"playing",this.onMediaPlaying),ns(r,"seeked",this.onMediaSeeked)}onMediaDetaching(e,t){const{media:r}=this;r&&(Xi(r,"playing",this.onMediaPlaying),Xi(r,"seeked",this.onMediaSeeked)),this.videoBuffer=null,this.fragPlaying=null,super.onMediaDetaching(e,t),!t.transferMedia&&(this._hasEnoughToStart=!1)}onManifestLoading(){super.onManifestLoading(),this.log("Trigger BUFFER_RESET"),this.hls.trigger(m.BUFFER_RESET,void 0),this.couldBacktrack=!1,this.fragLastKbps=0,this.fragPlaying=this.backtrackFragment=null,this.altAudio=0,this.audioOnly=!1}onManifestParsed(e,t){let 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&&!V0(),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!==Rt.IDLE)return;const n=t.levelInfo;(!n.details||n.details.live&&(this.levelLastLoaded!==n||n.details.expired)||this.waitForCdnTuneIn(n.details))&&(this.state=Rt.WAITING_LEVEL)}onLevelLoaded(e,t){var r;const{levels:n,startFragRequested:i}=this,s=t.level,l=t.details,h=l.totalduration;if(!n){this.warn(`Levels were reset while loading level ${s}`);return}this.log(`Level ${s} loaded [${l.startSN},${l.endSN}]${l.lastPartSn?`[part-${l.lastPartSn}-${l.lastPartIndex}]`:""}, cc [${l.startCC}, ${l.endCC}] duration:${h}`);const c=t.levelInfo,p=this.fragCurrent;p&&(this.state===Rt.FRAG_LOADING||this.state===Rt.FRAG_LOADING_WAITING_RETRY)&&p.level!==t.level&&p.loader&&this.abortCurrentFrag();let _=0;if(l.live||(r=c.details)!=null&&r.live){var A;if(this.checkLiveUpdate(l),l.deltaUpdateFailed)return;_=this.alignPlaylists(l,c.details,(A=this.levelLastLoaded)==null?void 0:A.details)}if(c.details=l,this.levelLastLoaded=c,i||this.setStartPosition(l,_),this.hls.trigger(m.LEVEL_UPDATED,{details:l,level:s}),this.state===Rt.WAITING_LEVEL){if(this.waitForCdnTuneIn(l))return;this.state=Rt.IDLE}i&&l.live&&this.synchronizeToLiveEdge(l),this.tick()}synchronizeToLiveEdge(e){const{config:t,media:r}=this;if(!r)return;const n=this.hls.liveSyncPosition,i=this.getLoadPosition(),s=e.fragmentStart,l=e.edge,h=i>=s-t.maxFragLookUpTolerance&&i<=l;if(n!==null&&r.duration>n&&(i<n||!h)){const c=t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;(!h&&r.readyState<4||i<l-c)&&(this._hasEnoughToStart||(this.nextLoadPosition=n),r.readyState&&(this.warn(`Playback: ${i.toFixed(3)} is located too far from the end of live sliding playlist: ${l}, reset currentTime to : ${n.toFixed(3)}`),r.currentTime=n))}}_handleFragmentLoadProgress(e){var t;const r=e.frag,{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 l=s[r.level];if(!l){this.warn(`Level ${r.level} not found on progress`);return}const h=l.details;if(!h){this.warn(`Dropping fragment ${r.sn} of level ${r.level} after level details were reset`),this.fragmentTracker.removeFragment(r);return}const c=l.videoCodec,p=h.PTSKnown||!h.live,_=(t=r.initSegment)==null?void 0:t.data,A=this._getAudioCodec(l),L=this.transmuxer=this.transmuxer||new Sa(this.hls,ie.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),I=n?n.index:-1,re=I!==-1,ce=new Un(r.level,r.sn,r.stats.chunkCount,i.byteLength,I,re),ke=this.initPTS[r.cc];L.push(i,_,A,c,r,n,h.totalduration,p,ce,ke)}onAudioTrackSwitching(e,t){const r=this.hls,n=this.altAudio===2;if(Qt(t.url,r))this.altAudio=1;else{if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const s=this.fragCurrent;s&&(this.log("Switching to main audio track, cancel main fragment load"),s.abortRequests(),this.fragmentTracker.removeFragment(s)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();if(n){this.fragmentTracker.removeAllFragments(),r.once(m.BUFFER_FLUSHED,()=>{var s;(s=this.hls)==null||s.trigger(m.AUDIO_TRACK_SWITCHED,t)}),r.trigger(m.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null});return}r.trigger(m.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const r=Qt(t.url,this.hls);if(r){const n=this.videoBuffer;n&&this.mediaBuffer!==n&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=n)}this.altAudio=r?2:0,this.tick()}onBufferCreated(e,t){const r=t.tracks;let n,i,s=!1;for(const l in r){const h=r[l];if(h.id==="main"){if(i=l,n=h,l==="video"){const c=r[l];c&&(this.videoBuffer=c.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,i=r.type===ie.MAIN;if(i){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===Rt.PARSED&&(this.state=Rt.IDLE);return}const l=n?n.stats:r.stats;this.fragLastKbps=Math.round(8*l.total/(l.buffering.end-l.loading.first)),te(r)&&(this.fragPrevious=r),this.fragBufferedComplete(r,n)}const s=this.media;s&&(!this._hasEnoughToStart&&pr.getBuffered(s).length&&(this._hasEnoughToStart=!0,this.seekToStartPos()),i&&this.tick())}get hasEnoughToStart(){return this._hasEnoughToStart}onError(e,t){var r;if(t.fatal){this.state=Rt.ERROR;return}switch(t.details){case O.FRAG_GAP:case O.FRAG_PARSING_ERROR:case O.FRAG_DECRYPT_ERROR:case O.FRAG_LOAD_ERROR:case O.FRAG_LOAD_TIMEOUT:case O.KEY_LOAD_ERROR:case O.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(ie.MAIN,t);break;case O.LEVEL_LOAD_ERROR:case O.LEVEL_LOAD_TIMEOUT:case O.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===Rt.WAITING_LEVEL&&((r=t.context)==null?void 0:r.type)===de.LEVEL&&(this.state=Rt.IDLE);break;case O.BUFFER_ADD_CODEC_ERROR:case O.BUFFER_APPEND_ERROR:if(t.parent!=="main")return;this.resetLoadingState();break;case O.BUFFER_FULL_ERROR:if(t.parent!=="main")return;this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case O.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onFragLoadEmergencyAborted(){this.state=Rt.IDLE,this._hasEnoughToStart||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==y.AUDIO||!this.altAudio){const r=(t===y.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;r&&(this.afterBufferFlushed(r,t,ie.MAIN),this.tick())}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level,this.level===-1&&this.resetWhenMissingContext(this.fragCurrent)),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let 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=this.timelineOffset;n&&r&&(r+=n);const i=this.getLevelDetails(),s=pr.getBuffered(e),l=s.length?s.start(0):0,h=l-r,c=Math.max(this.config.maxBufferHole,this.config.maxFragLookUpTolerance);h>0&&(h<c||this.loadingParts&&h<2*((i==null?void 0:i.partTarget)||0))&&(this.log(`adjusting start position by ${h} to match buffer start`),r+=h,this.startPosition=r),t<r&&(this.log(`seek to target start position ${r} from current time ${t} buffer start ${l}`),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,i=r==null?void 0:r.frag;if(!i||this.fragContextChanged(i))return;t.fragmentError=0,this.state=Rt.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const s=i.stats;s.parsing.start=s.parsing.end=s.buffering.start=s.buffering.end=self.performance.now(),n.trigger(m.FRAG_LOADED,r),i.bitrateTest=!1})}_handleTransmuxComplete(e){var t;const r=this.playlistType,{hls:n}=this,{remuxResult:i,chunkMeta:s}=e,l=this.getCurrentContext(s);if(!l){this.resetWhenMissingContext(s);return}const{frag:h,part:c,level:p}=l,{video:_,text:A,id3:L,initSegment:I}=i,{details:re}=p,ce=this.altAudio?void 0:i.audio;if(this.fragContextChanged(h)){this.fragmentTracker.removeFragment(h);return}if(this.state=Rt.PARSING,I){if(I!=null&&I.tracks){const He=h.initSegment||h;this._bufferInitSegment(p,I.tracks,He,s),n.trigger(m.FRAG_PARSING_INIT_SEGMENT,{frag:He,id:r,tracks:I.tracks})}const ke=I.initPTS,We=I.timescale;$(ke)&&(this.initPTS[h.cc]={baseTime:ke,timescale:We},n.trigger(m.INIT_PTS_FOUND,{frag:h,id:r,initPTS:ke,timescale:We}))}if(_&&re){const ke=re.fragments[h.sn-1-re.startSN],We=h.sn===re.startSN,He=!ke||h.cc>ke.cc;if(i.independent!==!1){const{startPTS:ct,endPTS:ht,startDTS:Tt,endDTS:dt}=_;if(c)c.elementaryStreams[_.type]={startPTS:ct,endPTS:ht,startDTS:Tt,endDTS:dt};else if(_.firstKeyFrame&&_.independent&&s.id===1&&!He&&(this.couldBacktrack=!0),_.dropped&&_.independent){const xt=this.getMainFwdBufferInfo(),It=(xt?xt.end:this.getLoadPosition())+this.config.maxBufferHole,pt=_.firstKeyFramePTS?_.firstKeyFramePTS:ct;if(!We&&It<pt-this.config.maxBufferHole&&!He){this.backtrack(h);return}else He&&(h.gap=!0);h.setElementaryStreamInfo(_.type,h.start,ht,h.start,dt,!0)}else We&&ct-(re.appliedTimelineOffset||0)>uo&&(h.gap=!0);h.setElementaryStreamInfo(_.type,ct,ht,Tt,dt),this.backtrackFragment&&(this.backtrackFragment=h),this.bufferFragmentData(_,h,c,s,We||He)}else if(We||He)h.gap=!0;else{this.backtrack(h);return}}if(ce){const{startPTS:ke,endPTS:We,startDTS:He,endDTS:ct}=ce;c&&(c.elementaryStreams[y.AUDIO]={startPTS:ke,endPTS:We,startDTS:He,endDTS:ct}),h.setElementaryStreamInfo(y.AUDIO,ke,We,He,ct),this.bufferFragmentData(ce,h,c,s)}if(re&&L!=null&&(t=L.samples)!=null&&t.length){const ke={id:r,frag:h,details:re,samples:L.samples};n.trigger(m.FRAG_PARSING_METADATA,ke)}if(re&&A){const ke={id:r,frag:h,details:re,samples:A.samples};n.trigger(m.FRAG_PARSING_USERDATA,ke)}}_bufferInitSegment(e,t,r,n){if(this.state!==Rt.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&delete t.audio;const{audio:i,video:s,audiovideo:l}=t;if(i){let c=zt(i.codec,e.audioCodec);c==="mp4a"&&(c="mp4a.40.5");const p=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){c&&(c.indexOf("mp4a.40.5")!==-1?c="mp4a.40.2":c="mp4a.40.5");const _=i.metadata;_&&"channelCount"in _&&(_.channelCount||1)!==1&&p.indexOf("firefox")===-1&&(c="mp4a.40.5")}c&&c.indexOf("mp4a.40.5")!==-1&&p.indexOf("android")!==-1&&i.container!=="audio/mpeg"&&(c="mp4a.40.2",this.log(`Android: force audio codec to ${c}`)),e.audioCodec&&e.audioCodec!==c&&this.log(`Swapping manifest audio codec "${e.audioCodec}" for "${c}"`),i.levelCodec=c,i.id=ie.MAIN,this.log(`Init audio buffer, container:${i.container}, codecs[selected/level/parsed]=[${c||""}/${e.audioCodec||""}/${i.codec}]`),delete t.audiovideo}if(s){s.levelCodec=e.videoCodec,s.id=ie.MAIN;const c=s.codec;if((c==null?void 0:c.length)===4)switch(c){case"hvc1":case"hev1":s.codec="hvc1.1.6.L120.90";break;case"av01":s.codec="av01.0.04M.08";break;case"avc1":s.codec="avc1.42e01e";break}this.log(`Init video buffer, container:${s.container}, codecs[level/parsed]=[${e.videoCodec||""}/${c}]${s.codec!==c?" parsed-corrected="+s.codec:""}${s.supplemental?" supplemental="+s.supplemental:""}`),delete t.audiovideo}l&&(this.log(`Init audiovideo buffer, container:${l.container}, codecs[level/parsed]=[${e.codecs}/${l.codec}]`),delete t.video,delete t.audio);const h=Object.keys(t);if(h.length){if(this.hls.trigger(m.BUFFER_CODECS,t),!this.hls)return;h.forEach(c=>{const _=t[c].initSegment;_!=null&&_.byteLength&&this.hls.trigger(m.BUFFER_APPENDING,{type:c,data:_,frag:r,part:null,chunkMeta:n,parent:r.type})})}this.tickImmediate()}getMainFwdBufferInfo(){const e=this.mediaBuffer&&this.altAudio===2?this.mediaBuffer:this.media;return this.getFwdBufferInfo(e,ie.MAIN)}get maxBufferLength(){const{levels:e,level:t}=this,r=e==null?void 0:e[t];return r?this.getMaxBufferLength(r.maxBitrate):this.config.maxBufferLength}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=Rt.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const r=e.currentTime;if(pr.isBuffered(e,r)?t=this.getAppendedFrag(r):pr.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(m.FRAG_CHANGED,{frag:t}),(!n||n.level!==i)&&this.hls.trigger(m.LEVEL_SWITCHED,{level:i}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){var e;if(this.fragPlaying)return this.fragPlaying;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;return $(t)?this.getAppendedFrag(t):null}get currentProgramDateTime(){var e;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;if($(t)){const r=this.getLevelDetails(),n=this.currentFrag||(r?nr(null,r.fragments,t):null);if(n){const i=n.programDateTime;if(i!==null){const s=i+(t-n.start)*1e3;return new Date(s)}}}return null}get currentLevel(){const e=this.currentFrag;return e?e.level:-1}get nextBufferedFrag(){const e=this.currentFrag;return e?this.followingBufferedFrag(e):null}get forceStartLoad(){return this._forceStartLoad}}class X0{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=O.KEY_LOAD_ERROR,r,n,i){return new Mn({type:_e.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(l=>{s.setKeyFormat(l)});break}}}}load(e){return!e.decryptdata&&e.encrypted&&this.emeController&&this.config.emeEnabled?this.emeController.selectKeySystemFormat(e).then(t=>this.loadInternal(e,t)):this.loadInternal(e)}loadInternal(e,t){var r,n;t&&e.setKeyFormat(t);const i=e.decryptdata;if(!i){const c=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,O.KEY_LOAD_ERROR,c))}const s=i.uri;if(!s)return Promise.reject(this.createKeyLoadError(e,O.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${s}"`)));let l=this.keyUriToKeyInfo[s];if((r=l)!=null&&r.decryptdata.key)return i.key=l.decryptdata.key,Promise.resolve({frag:e,keyInfo:l});if((n=l)!=null&&n.keyLoadPromise){var h;switch((h=l.mediaKeySessionContext)==null?void 0:h.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return l.keyLoadPromise.then(c=>(i.key=c.keyInfo.decryptdata.key,{frag:e,keyInfo:l}))}}switch(l=this.keyUriToKeyInfo[s]={decryptdata:i,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},i.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return i.keyFormat==="identity"?this.loadKeyHTTP(l,e):this.loadKeyEME(l,e);case"AES-128":case"AES-256":case"AES-256-CTR":return this.loadKeyHTTP(l,e);default:return Promise.reject(this.createKeyLoadError(e,O.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,l)=>{const h={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},c=r.keyLoadPolicy.default,p={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},_={onSuccess:(A,L,I,re)=>{const{frag:ce,keyInfo:ke,url:We}=I;if(!ce.decryptdata||ke!==this.keyUriToKeyInfo[We])return l(this.createKeyLoadError(ce,O.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),re));ke.decryptdata.key=ce.decryptdata.key=new Uint8Array(A.data),ce.keyLoader=null,ke.loader=null,s({frag:ce,keyInfo:ke})},onError:(A,L,I,re)=>{this.resetLoader(L),l(this.createKeyLoadError(t,O.KEY_LOAD_ERROR,new Error(`HTTP Error ${A.code} loading key ${A.text}`),I,S({url:h.url,data:void 0},A)))},onTimeout:(A,L,I)=>{this.resetLoader(L),l(this.createKeyLoadError(t,O.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),I))},onAbort:(A,L,I)=>{this.resetLoader(L),l(this.createKeyLoadError(t,O.INTERNAL_ABORTED,new Error("key loading aborted"),I))}};i.load(h,p,_)})}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 Ul(a){const{type:e}=a;switch(e){case de.AUDIO_TRACK:return ie.AUDIO;case de.SUBTITLE_TRACK:return ie.SUBTITLE;default:return ie.MAIN}}function Zo(a,e){let t=a.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class q0{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.onManifestLoaded=this.checkAutostartLoad,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(m.MANIFEST_LOADING,this.onManifestLoading,this),e.on(m.LEVEL_LOADING,this.onLevelLoading,this),e.on(m.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(m.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.on(m.LEVELS_UPDATED,this.onLevelsUpdated,this)}unregisterListeners(){const{hls:e}=this;e.off(m.MANIFEST_LOADING,this.onManifestLoading,this),e.off(m.LEVEL_LOADING,this.onLevelLoading,this),e.off(m.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(m.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this),e.off(m.LEVELS_UPDATED,this.onLevelsUpdated,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:de.MANIFEST,url:r,deliveryDirectives:null,levelOrTrack:null})}onLevelLoading(e,t){const{id:r,level:n,pathwayId:i,url:s,deliveryDirectives:l,levelInfo:h}=t;this.load({id:r,level:n,pathwayId:i,responseType:"text",type:de.LEVEL,url:s,deliveryDirectives:l,levelOrTrack:h})}onAudioTrackLoading(e,t){const{id:r,groupId:n,url:i,deliveryDirectives:s,track:l}=t;this.load({id:r,groupId:n,level:null,responseType:"text",type:de.AUDIO_TRACK,url:i,deliveryDirectives:s,levelOrTrack:l})}onSubtitleTrackLoading(e,t){const{id:r,groupId:n,url:i,deliveryDirectives:s,track:l}=t;this.load({id:r,groupId:n,level:null,responseType:"text",type:de.SUBTITLE_TRACK,url:i,deliveryDirectives:s,levelOrTrack:l})}onLevelsUpdated(e,t){const r=this.loaders[de.LEVEL];if(r){const n=r.context;n&&!t.levels.some(i=>i===n.levelOrTrack)&&(r.abort(),delete this.loaders[de.LEVEL])}}load(e){var t;const r=this.hls.config;let n=this.getInternalLoader(e);if(n){const c=this.hls.logger,p=n.context;if(p&&p.levelOrTrack===e.levelOrTrack&&(p.url===e.url||p.deliveryDirectives&&!e.deliveryDirectives)){p.url===e.url?c.log(`[playlist-loader]: ignore ${e.url} ongoing request`):c.log(`[playlist-loader]: ignore ${e.url} in favor of ${p.url}`);return}c.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),n.abort()}let i;if(e.type===de.MANIFEST?i=r.manifestLoadPolicy.default:i=E({},r.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),n=this.createInternalLoader(e),$((t=e.deliveryDirectives)==null?void 0:t.part)){let c;if(e.type===de.LEVEL&&e.level!==null?c=this.hls.levels[e.level].details:e.type===de.AUDIO_TRACK&&e.id!==null?c=this.hls.audioTracks[e.id].details:e.type===de.SUBTITLE_TRACK&&e.id!==null&&(c=this.hls.subtitleTracks[e.id].details),c){const p=c.partTarget,_=c.targetduration;if(p&&_){const A=Math.max(p*3,_*.8)*1e3;i=E({},i,{maxTimeToFirstByteMs:Math.min(A,i.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(A,i.maxTimeToFirstByteMs)})}}}const s=i.errorRetry||i.timeoutRetry||{},l={loadPolicy:i,timeout:i.maxLoadTimeMs,maxRetry:s.maxNumRetry||0,retryDelay:s.retryDelayMs||0,maxRetryDelay:s.maxRetryDelayMs||0},h={onSuccess:(c,p,_,A)=>{const L=this.getInternalLoader(_);this.resetInternalLoader(_.type);const I=c.data;if(I.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(c,_,new Error("no EXTM3U delimiter"),A||null,p);return}p.parsing.start=performance.now(),bi.isMediaPlaylist(I)||_.type!==de.MANIFEST?this.handleTrackOrLevelPlaylist(c,p,_,A||null,L):this.handleMasterPlaylist(c,p,_,A)},onError:(c,p,_,A)=>{this.handleNetworkError(p,_,!1,c,A)},onTimeout:(c,p,_)=>{this.handleNetworkError(p,_,!0,void 0,c)}};n.load(e,l,h)}checkAutostartLoad(){if(!this.hls)return;const{config:{autoStartLoad:e,startPosition:t},forceStartLoad:r}=this.hls;(e||r)&&(this.hls.logger.log(`${e?"auto":"force"} startLoad with configured startPosition ${t}`),this.hls.startLoad(t))}handleMasterPlaylist(e,t,r,n){const i=this.hls,s=e.data,l=Zo(e,r),h=bi.parseMasterPlaylist(s,l);if(h.playlistParsingError){this.handleManifestParsingError(e,r,h.playlistParsingError,n,t);return}const{contentSteering:c,levels:p,sessionData:_,sessionKeys:A,startTimeOffset:L,variableList:I}=h;this.variableList=I;const{AUDIO:re=[],SUBTITLES:ce,"CLOSED-CAPTIONS":ke}=bi.parseMasterPlaylistMedia(s,l,h);re.length&&!re.some(He=>!He.url)&&p[0].audioCodec&&!p[0].attrs.AUDIO&&(this.hls.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),re.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new Ar({}),bitrate:0,url:""})),i.trigger(m.MANIFEST_LOADED,{levels:p,audioTracks:re,subtitles:ce,captions:ke,contentSteering:c,url:l,stats:t,networkDetails:n,sessionData:_,sessionKeys:A,startTimeOffset:L,variableList:I})}handleTrackOrLevelPlaylist(e,t,r,n,i){const s=this.hls,{id:l,level:h,type:c}=r,p=Zo(e,r),_=$(h)?h:$(l)?l:0,A=Ul(r),L=bi.parseLevelPlaylist(e.data,p,_,A,0,this.variableList);if(c===de.MANIFEST){const I={attrs:new Ar({}),bitrate:0,details:L,name:"",url:p};L.requestScheduled=t.loading.start+Vs(L,0),s.trigger(m.MANIFEST_LOADED,{levels:[I],audioTracks:[],url:p,stats:t,networkDetails:n,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),r.levelDetails=L,this.handlePlaylistLoaded(L,e,t,r,n,i)}handleManifestParsingError(e,t,r,n,i){this.hls.trigger(m.ERROR,{type:_e.NETWORK_ERROR,details:O.MANIFEST_PARSING_ERROR,fatal:t.type===de.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===de.LEVEL?s+=`: ${e.level} id: ${e.id}`:(e.type===de.AUDIO_TRACK||e.type===de.SUBTITLE_TRACK)&&(s+=` id: ${e.id} group-id: "${e.groupId}"`);const l=new Error(s);this.hls.logger.warn(`[playlist-loader]: ${s}`);let h=O.UNKNOWN,c=!1;const p=this.getInternalLoader(e);switch(e.type){case de.MANIFEST:h=r?O.MANIFEST_LOAD_TIMEOUT:O.MANIFEST_LOAD_ERROR,c=!0;break;case de.LEVEL:h=r?O.LEVEL_LOAD_TIMEOUT:O.LEVEL_LOAD_ERROR,c=!1;break;case de.AUDIO_TRACK:h=r?O.AUDIO_TRACK_LOAD_TIMEOUT:O.AUDIO_TRACK_LOAD_ERROR,c=!1;break;case de.SUBTITLE_TRACK:h=r?O.SUBTITLE_TRACK_LOAD_TIMEOUT:O.SUBTITLE_LOAD_ERROR,c=!1;break}p&&this.resetInternalLoader(e.type);const _={type:_e.NETWORK_ERROR,details:h,fatal:c,url:e.url,loader:p,context:e,error:l,networkDetails:t,stats:i};if(n){const A=(t==null?void 0:t.url)||e.url;_.response=S({url:A,data:void 0},n)}this.hls.trigger(m.ERROR,_)}handlePlaylistLoaded(e,t,r,n,i,s){const l=this.hls,{type:h,level:c,id:p,groupId:_,deliveryDirectives:A}=n,L=Zo(t,n),I=Ul(n),re=typeof n.level=="number"&&I===ie.MAIN?c:void 0;if(!e.fragments.length){const ke=e.playlistParsingError=new Error("No Segments found in Playlist");l.trigger(m.ERROR,{type:_e.NETWORK_ERROR,details:O.LEVEL_EMPTY_ERROR,fatal:!1,url:L,error:ke,reason:ke.message,response:t,context:n,level:re,parent:I,networkDetails:i,stats:r});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const ce=e.playlistParsingError;if(ce){if(this.hls.logger.warn(ce),!l.config.ignorePlaylistParsingErrors){l.trigger(m.ERROR,{type:_e.NETWORK_ERROR,details:O.LEVEL_PARSING_ERROR,fatal:!1,url:L,error:ce,reason:ce.message,response:t,context:n,level:re,parent:I,networkDetails:i,stats:r});return}e.playlistParsingError=null}switch(e.live&&s&&(s.getCacheAge&&(e.ageHeader=s.getCacheAge()||0),(!s.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),h){case de.MANIFEST:case de.LEVEL:l.trigger(m.LEVEL_LOADED,{details:e,levelInfo:n.levelOrTrack||l.levels[0],level:re||0,id:p||0,stats:r,networkDetails:i,deliveryDirectives:A,withoutMultiVariant:h===de.MANIFEST});break;case de.AUDIO_TRACK:l.trigger(m.AUDIO_TRACK_LOADED,{details:e,track:n.levelOrTrack,id:p||0,groupId:_||"",stats:r,networkDetails:i,deliveryDirectives:A});break;case de.SUBTITLE_TRACK:l.trigger(m.SUBTITLE_TRACK_LOADED,{details:e,track:n.levelOrTrack,id:p||0,groupId:_||"",stats:r,networkDetails:i,deliveryDirectives:A});break}}}class Ts{static get version(){return vs}static isMSESupported(){return $l()}static isSupported(){return W0()}static getMediaSource(){return ye()}static get Events(){return m}static get MetadataSchema(){return Si}static get ErrorTypes(){return _e}static get ErrorDetails(){return O}static get DefaultConfig(){return Ts.defaultConfig?Ts.defaultConfig:O0}static set DefaultConfig(e){Ts.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.logger=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new Ys,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioStreamController=void 0,this.subtititleStreamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.interstitialsController=void 0,this.gapController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this._url=null,this._sessionId=void 0,this.triggeringException=void 0,this.started=!1;const t=this.logger=oe(e.debug||!1,"Hls instance",e.assetPlayerId),r=this.config=M0(Ts.DefaultConfig,e,t);this.userConfig=e,r.progressive&&B0(r,t);const{abrController:n,bufferController:i,capLevelController:s,errorController:l,fpsController:h}=r,c=new l(this),p=this.abrController=new n(this),_=new Sn(this),A=r.interstitialsController,L=A?this.interstitialsController=new A(this,Ts):null,I=this.bufferController=new i(this,_),re=this.capLevelController=new s(this),ce=new h(this),ke=new q0(this),We=r.contentSteeringController,He=We?new We(this):null,ct=this.levelController=new K0(this,He),ht=new H0(this),Tt=new X0(this.config),dt=this.streamController=new Y0(this,_,Tt),xt=this.gapController=new U0(this,_);re.setStreamController(dt),ce.setStreamController(dt);const It=[ke,ct,dt];L&&It.splice(1,0,L),He&&It.splice(1,0,He),this.networkControllers=It;const pt=[p,I,xt,re,ce,ht,_];this.audioTrackController=this.createController(r.audioTrackController,It);const Ht=r.audioStreamController;Ht&&It.push(this.audioStreamController=new Ht(this,_,Tt)),this.subtitleTrackController=this.createController(r.subtitleTrackController,It);const er=r.subtitleStreamController;er&&It.push(this.subtititleStreamController=new er(this,_,Tt)),this.createController(r.timelineController,pt),Tt.emeController=this.emeController=this.createController(r.emeController,pt),this.cmcdController=this.createController(r.cmcdController,pt),this.latencyController=this.createController(j0,pt),this.coreComponents=pt,It.push(c);const tn=c.onErrorOut;typeof tn=="function"&&this.on(m.ERROR,tn,c),this.on(m.MANIFEST_LOADED,ke.onManifestLoaded,ke)}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(this.logger.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===m.ERROR;this.trigger(m.ERROR,{type:_e.OTHER_ERROR,details:O.INTERNAL_EXCEPTION,fatal:n,event:e,error:r}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){this.logger.log("destroy"),this.trigger(m.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this._url=null,this.networkControllers.forEach(t=>t.destroy()),this.networkControllers.length=0,this.coreComponents.forEach(t=>t.destroy()),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){if(!e||"media"in e&&!e.media){const i=new Error(`attachMedia failed: invalid argument (${e})`);this.trigger(m.ERROR,{type:_e.OTHER_ERROR,details:O.ATTACH_MEDIA_ERROR,fatal:!0,error:i});return}this.logger.log("attachMedia"),this._media&&(this.logger.warn("media must be detached before attaching"),this.detachMedia());const t="media"in e,r=t?e.media:e,n=t?e:{media:r};this._media=r,this.trigger(m.MEDIA_ATTACHING,n)}detachMedia(){this.logger.log("detachMedia"),this.trigger(m.MEDIA_DETACHING,{}),this._media=null}transferMedia(){this._media=null;const e=this.bufferController.transferMedia();return this.trigger(m.MEDIA_DETACHING,{transferMedia:e}),e}loadSource(e){this.stopLoad();const t=this.media,r=this._url,n=this._url=G.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.logger.log(`loadSource:${n}`),t&&r&&(r!==n||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(m.MANIFEST_LOADING,{url:e})}get url(){return this._url}get hasEnoughToStart(){return this.streamController.hasEnoughToStart}get startPosition(){return this.streamController.startPositionValue}startLoad(e=-1,t){this.logger.log(`startLoad(${e+(t?", <skip seek to start>":"")})`),this.started=!0,this.resumeBuffering();for(let r=0;r<this.networkControllers.length&&(this.networkControllers[r].startLoad(e,t),!(!this.started||!this.networkControllers));r++);}stopLoad(){this.logger.log("stopLoad"),this.started=!1;for(let e=0;e<this.networkControllers.length&&(this.networkControllers[e].stopLoad(),!(this.started||!this.networkControllers));e++);}get loadingEnabled(){return this.started}get bufferingEnabled(){return this.streamController.bufferingEnabled}resumeBuffering(){this.bufferingEnabled||(this.logger.log("resume buffering"),this.networkControllers.forEach(e=>{e.resumeBuffering&&e.resumeBuffering()}))}pauseBuffering(){this.bufferingEnabled&&(this.logger.log("pause buffering"),this.networkControllers.forEach(e=>{e.pauseBuffering&&e.pauseBuffering()}))}get inFlightFragments(){const e={[ie.MAIN]:this.streamController.inFlightFrag};return this.audioStreamController&&(e[ie.AUDIO]=this.audioStreamController.inFlightFrag),this.subtititleStreamController&&(e[ie.SUBTITLE]=this.subtititleStreamController.inFlightFrag),e}swapAudioCodec(){this.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){this.logger.log("recoverMediaError");const e=this._media,t=e==null?void 0:e.currentTime;this.detachMedia(),e&&(this.attachMedia(e),t&&this.startLoad(t))}removeLevel(e){this.levelController.removeLevel(e)}get sessionId(){let e=this._sessionId;return e||(e=this._sessionId=Ha()),e}get levels(){const e=this.levelController.levels;return e||[]}get latestLevelDetails(){return this.streamController.getLevelDetails()||null}get loadLevelObj(){return this.levelController.loadLevelObj}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){this.logger.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){this.logger.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){this.logger.log(`set loadLevel:${e}`),this.levelController.manualLevel=e}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(e){this.levelController.nextLoadLevel=e}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(e){this.logger.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){const e=this.levelController.startLevel;return e===-1&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:e}set startLevel(e){this.logger.log(`set startLevel:${e}`),e!==-1&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}set bandwidthEstimate(e){this.abrController.resetEstimator(e)}get abrEwmaDefaultEstimate(){const{bwEstimator:e}=this.abrController;return e?e.defaultEstimate:NaN}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(this.logger.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){Kr(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()}get maxBufferLength(){return this.streamController.maxBufferLength}setAudioOption(e){var t;return((t=this.audioTrackController)==null?void 0:t.setAudioOption(e))||null}setSubtitleOption(e){var t;return((t=this.subtitleTrackController)==null?void 0:t.setSubtitleOption(e))||null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return e?e.subtitleDisplay:!1}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}set targetLatency(e){this.latencyController.targetLatency=e}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}get pathways(){return this.levelController.pathways}get pathwayPriority(){return this.levelController.pathwayPriority}set pathwayPriority(e){this.levelController.pathwayPriority=e}get bufferedToEnd(){var e;return!!((e=this.bufferController)!=null&&e.bufferedToEnd)}get interstitialsManager(){var e;return((e=this.interstitialsController)==null?void 0:e.interstitialsManager)||null}getMediaDecodingInfo(e,t=this.allAudioTracks){const r=hr(t);return Vt(e,r,navigator.mediaCapabilities)}}Ts.defaultConfig=void 0},16722:function(Nt,rt,w){"use strict";w.d(rt,{Z:function(){return ie}});const $=o=>typeof o=="object"&&o!=null&&o.nodeType===1,ae=(o,Q)=>(!Q||o!=="hidden")&&o!=="visible"&&o!=="clip",Se=(o,Q)=>{if(o.clientHeight<o.scrollHeight||o.clientWidth<o.scrollWidth){const U=getComputedStyle(o,null);return ae(U.overflowY,Q)||ae(U.overflowX,Q)||(E=>{const b=(S=>{if(!S.ownerDocument||!S.ownerDocument.defaultView)return null;try{return S.ownerDocument.defaultView.frameElement}catch(D){return null}})(E);return!!b&&(b.clientHeight<E.scrollHeight||b.clientWidth<E.scrollWidth)})(o)}return!1},_e=(o,Q,U,E,b,S,D,V)=>S<o&&D>Q||S>o&&D<Q?0:S<=o&&V<=U||D>=Q&&V>=U?S-o-E:D>Q&&V<U||S<o&&V>U?D-Q+b:0,O=o=>{const Q=o.parentElement;return Q==null?o.getRootNode().host||null:Q},m=(o,Q)=>{var U,E,b,S;if(typeof document=="undefined")return[];const{scrollMode:D,block:V,inline:q,boundary:B,skipOverflowHiddenElements:R}=Q,Z=typeof B=="function"?B:Fe=>Fe!==B;if(!$(o))throw new TypeError("Invalid target");const ue=document.scrollingElement||document.documentElement,M=[];let Y=o;for(;$(Y)&&Z(Y);){if(Y=O(Y),Y===ue){M.push(Y);break}Y!=null&&Y===document.body&&Se(Y)&&!Se(document.documentElement)||Y!=null&&Se(Y,R)&&M.push(Y)}const oe=(E=(U=window.visualViewport)==null?void 0:U.width)!=null?E:innerWidth,J=(S=(b=window.visualViewport)==null?void 0:b.height)!=null?S:innerHeight,{scrollX:ye,scrollY:pe}=window,{height:ve,width:Ae,top:j,right:P,bottom:K,left:k}=o.getBoundingClientRect(),{top:ne,right:G,bottom:v,left:y}=(Fe=>{const Ue=window.getComputedStyle(Fe);return{top:parseFloat(Ue.scrollMarginTop)||0,right:parseFloat(Ue.scrollMarginRight)||0,bottom:parseFloat(Ue.scrollMarginBottom)||0,left:parseFloat(Ue.scrollMarginLeft)||0}})(o);let N=V==="start"||V==="nearest"?j-ne:V==="end"?K+v:j+ve/2-ne+v,te=q==="center"?k+Ae/2-y+G:q==="end"?P+G:k-y;const Le=[];for(let Fe=0;Fe<M.length;Fe++){const Ue=M[Fe],{height:Ye,width:ut,top:ot,right:lt,bottom:St,left:Lt}=Ue.getBoundingClientRect();if(D==="if-needed"&&j>=0&&k>=0&&K<=J&&P<=oe&&(Ue===ue&&!Se(Ue)||j>=ot&&K<=St&&k>=Lt&&P<=lt))return Le;const _t=getComputedStyle(Ue),At=parseInt(_t.borderLeftWidth,10),Pt=parseInt(_t.borderTopWidth,10),kt=parseInt(_t.borderRightWidth,10),fe=parseInt(_t.borderBottomWidth,10);let he=0,se=0;const Me="offsetWidth"in Ue?Ue.offsetWidth-Ue.clientWidth-At-kt:0,$e="offsetHeight"in Ue?Ue.offsetHeight-Ue.clientHeight-Pt-fe:0,F="offsetWidth"in Ue?Ue.offsetWidth===0?0:ut/Ue.offsetWidth:0,le="offsetHeight"in Ue?Ue.offsetHeight===0?0:Ye/Ue.offsetHeight:0;if(ue===Ue)he=V==="start"?N:V==="end"?N-J:V==="nearest"?_e(pe,pe+J,J,Pt,fe,pe+N,pe+N+ve,ve):N-J/2,se=q==="start"?te:q==="center"?te-oe/2:q==="end"?te-oe:_e(ye,ye+oe,oe,At,kt,ye+te,ye+te+Ae,Ae),he=Math.max(0,he+pe),se=Math.max(0,se+ye);else{he=V==="start"?N-ot-Pt:V==="end"?N-St+fe+$e:V==="nearest"?_e(ot,St,Ye,Pt,fe+$e,N,N+ve,ve):N-(ot+Ye/2)+$e/2,se=q==="start"?te-Lt-At:q==="center"?te-(Lt+ut/2)+Me/2:q==="end"?te-lt+kt+Me:_e(Lt,lt,ut,At,kt+Me,te,te+Ae,Ae);const{scrollLeft:xe,scrollTop:we}=Ue;he=le===0?0:Math.max(0,Math.min(we+he/le,Ue.scrollHeight-Ye/le+$e)),se=F===0?0:Math.max(0,Math.min(xe+se/F,Ue.scrollWidth-ut/F+Me)),N+=we-he,te+=xe-se}Le.push({el:Ue,top:he,left:se})}return Le},de=o=>o===!1?{block:"end",inline:"nearest"}:(Q=>Q===Object(Q)&&Object.keys(Q).length!==0)(o)?o:{block:"start",inline:"nearest"};function ie(o,Q){if(!o.isConnected||!(b=>{let S=b;for(;S&&S.parentNode;){if(S.parentNode===document)return!0;S=S.parentNode instanceof ShadowRoot?S.parentNode.host:S.parentNode}return!1})(o))return;const U=(b=>{const S=window.getComputedStyle(b);return{top:parseFloat(S.scrollMarginTop)||0,right:parseFloat(S.scrollMarginRight)||0,bottom:parseFloat(S.scrollMarginBottom)||0,left:parseFloat(S.scrollMarginLeft)||0}})(o);if((b=>typeof b=="object"&&typeof b.behavior=="function")(Q))return Q.behavior(m(o,Q));const E=typeof Q=="boolean"||Q==null?void 0:Q.behavior;for(const{el:b,top:S,left:D}of m(o,de(Q))){const V=S-U.top+U.bottom,q=D-U.left+U.right;b.scroll({top:V,left:q,behavior:E})}}}}]);
|
|
}()); |